Giter Club home page Giter Club logo

primes_table's Introduction

Maintainability Test Coverage Build Status Gem Version FOSSA Status

PrimesTable

Command line tool for printing out a multiplication table of the first N prime numbers.

Installation

Add this line to your application's Gemfile:

gem 'primes_table'

And then execute:

$ bundle

Or install it yourself as:

$ gem install primes_table

Usage

  • By default the table will be generated as a matrix of 10X10;

  • Only values greater or equal than 10 will be considered for specifying rows or columns;

  • If you enter a value minor than 10, it will default to 10;

  • Only integer values are considered. For example, if you enter an string, it will be converted to integer, the result will be 0 (zero) and will default to 10 because zero is minor than 10;

  • Options:

    • -h, --help to see the available options;
    • -r, --rows ROWS to specify how many rows;
    • -c, --columns COLUMNS to specify how many columns;
    • --version it will give you the version of the gem you are using;
  • Command examples:

    • primes_table --version;
    • primes_table --help;
    • primes_table;
    • primes_table -r 17;
    • primes_table -c 23;
    • primes_table -r 17 -c 23;

Tests

  • Rspec:
    • bundle exec rspec

Development

When working on this gem locally, if you want to run it, you just need to:

$ bundle exec bin/primes_table

and you will get the default output:

2 3 5 7
2 4 6 10 14
3 6 9 15 21
5 10 15 25 35
7 14 21 35 49

License

FOSSA Status

primes_table's People

Contributors

dependabot-preview[bot] avatar dependabot-support avatar dependabot[bot] avatar fossabot avatar nisevi avatar

Watchers

 avatar  avatar  avatar

Forkers

fossabot

primes_table's Issues

Dependabot can't resolve your Ruby dependency files

Dependabot can't resolve your Ruby dependency files.

As a result, Dependabot couldn't update your dependencies.

The error Dependabot encountered was:

Bundler::VersionConflict with message: Bundler could not find compatible versions for gem "multi_test":
  In Gemfile:
    aruba (~> 0.14.3) was resolved to 0.14.6, which depends on
      cucumber (>= 1.3.19) was resolved to 2.0.0.rc.3, which depends on
        multi_test (>= 0.1.1)

Could not find gem 'multi_test (>= 0.1.1)', which is required by gem 'cucumber (>= 1.3.19)', in any of the sources.

If you think the above is an error on Dependabot's side please don't hesitate to get in touch - we'll do whatever we can to fix it.

You can mention @dependabot in the comments below to contact the Dependabot team.

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.