Why Gemfury? Push, build, and install  RubyGems npm packages Python packages Maven artifacts PHP packages Go Modules Debian packages RPM packages NuGet packages

Repository URL to install this package:

Details    
  .dependabot
  bin
  exe
  lib
  .envrc
  .gitignore
  .rspec
  .rubocop.yml
  .solargraph.yml
  .travis.yml
  Gemfile
  LICENSE.txt
  README.md
  Rakefile
  fizzbuzz.gemspec
Size: Mime:
  README.md

Build Status codecov

Fizzbuzz

This is an experiment exploring:

  • building and publishing a Ruby gem
  • using the gem as a binary
  • generating code coverage
  • performing code analysis
  • auto-bumping dependencies

The word game Fizz buzz was used as a basis for this exercise.

Installation

Install it yourself as:

$ gem install fizzbuzz

Usage

Just call fizzbuzz <number>, i.e.:

$ fizzbuzz 15
1
2
fizz
4
buzz
fizz
7
8
fizz
buzz
11
fizz
13
14
fizzbuzz

Development

After checking out the repo, run bin/setup to install dependencies. Then, run bundle exec rake spec to run the tests (code coverage will be available at coverage/index.html). You can also run bin/console for an interactive prompt that will allow you to experiment.

To install this gem onto your local machine, run bundle exec rake install. To release a new version, update the version number in version.rb, and then run bundle exec rake release, which will create a git tag for the version, push git commits and tags, and push the .gem file to rubygems.org.

Run bundle exec rake rubocop perform code analysis.

Contributing

Bug reports and pull requests are welcome on GitHub at https://github.com/dlresende/fizzbuzz.

License

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