Giter Club home page Giter Club logo

spell_generator's Introduction

Build Status

SpellGenerator

It generates a random spell.

Why I created this project

Welcome!! I created this project specifically for helping people take the first step of their OSS journeys⭐️⭐️.

Contributing to an OSS project can be intimidating if you don't know how to do to it or have never experienced it. But if you know the process of making a PR and have already done it before, it can be very simple and fun.
That's why I want you to contribute to this project by opening an issue or making a PR to practice/start contributing to other OSS projects✨✨!!

Originally I started this project with this post on dev.to.

If you are not a begginer

You can contribute to the project and the whole dev community by opening an issue here or helping new devs to complete their PRs😊.
Some wonderful people have already opened some issues and also created PRs. I wholeheartedly appreciate them🙏🙏.

Or you are always very welcome to tackle any issue, even if you are not a begginer,

Installation

Add this line to your application's Gemfile:

gem 'spell_generator'

And then execute:

$ bundle

Or install it yourself as:

$ gem install spell_generator

Usage

You can do two things with this gem.

(1) Create a random spell.

SpellGenerator::Generator.generate #=> "brave fire"
SpellGenerator::Generator.new.generate #=> "symptomatic punch"

(2) Create a spell.

SpellGenerator::Generator.new.self_generate('Random' 'Fire') #=> "Random Fire"

How to run examples

First, you have to move to the directory of this project in your terminal.

$ cd spell_generator

Second, run the command below.

$ ruby examples/spells.rb

That's it☀️!

It would output some random spells for ya.

"efficient blow"
"entire stab"
"Random Fire"

How to run the test

First, you have to move to the directory of this project in your terminal.

$ cd spell_generator

Second, run the command below.

$ rake spec

That's it☀️!

License

The gem is available as open source under the terms of the MIT License.

Code of Conduct

Everyone interacting in the SpellGenerator project’s codebases, issue trackers, chat rooms and mailing lists is expected to follow the code of conduct.

spell_generator's People

Contributors

dalmo3 avatar dwgithubpage avatar grfxguru avatar jonpemby avatar k-sato1995 avatar pikap3w avatar reidoh avatar tonadev avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

spell_generator's Issues

Fix typos in README usage section

  • Trailing «r» missing for «Generator»:
SpellGenerator::Generato.new.generate #=> "Symptomatic punch"
  • Trailing «r» missing for «Generator»; missing comma between arguments if given output is what's expected:
SpellGenerator::Generato.new.self_generate('Random' 'Fire') #=> "Random Fire"

Fixing this does not require to write code (but requires to execute it to validate solution !)

self_generate misuse should raise an Error

As discussed in #8 :

self_generate() method expects two arguments to be given.

When used with another number of arguments, it is expected to raise a SpellGeneratorError.

However, when used with one argument, for example, self_generate still produces an output without raising any error.

Examples of unexpected behavior:

SpellGenerator::Generator.new.self_generate('RandomFire') #=> RandomFire
SpellGenerator::Generator.new.self_generate('Random' 'Fire') #=> RandomFire (no comma between strings: treated as only one argument, like the line above)

Include the travis build status image in the README

Hey there :),

I noticed that there is files for specs, travis, and rubocop. I think it would be good to add the travis status image within the README. I often find this useful to tell me at a quick glance that this project is properly tested and I gain confidence in the code :).

Given output does not match code execution in README usage section

In the following usage example:

SpellGenerator::Generator.generate #=> "Brave fire"
SpellGenerator::Generato.new.generate #=> "Symptomatic punch"

Given output is capitalized, but when code is executed, result is lower case:

@K-Sato1995 : what's the fix supposed to be?

  • If capitalized output is not an expected feature: adjust README given output to match actual output. In this case, this issue is related to #8.

  • If capitalized output is an expected feature: fix code to capitalize ouput

Missing comma in README

Follow-up to #8 :
In README.md «Usage» section, there is a missing comma between function arguments.

SpellGenerator::Generator.new.self_generate('Random' 'Fire') #=> "Random Fire"

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.