diff options
| author | a14m <[email protected]> | 2020-11-29 23:55:44 +0100 |
|---|---|---|
| committer | a14m <[email protected]> | 2020-11-29 23:55:44 +0100 |
| commit | 77543134da94fa5edb0e471e1a859b4190eb3cb0 (patch) | |
| tree | bfc34bf70b2975fded82e63d0a0839b196d0cfc2 /CLI/ruby | |
| parent | c357c9c730440b297c1bc59d91181f62f9f3f9f7 (diff) | |
Fix some linting issues
Diffstat (limited to 'CLI/ruby')
| -rwxr-xr-x | CLI/ruby/bin/game-of-life | 2 | ||||
| -rw-r--r-- | CLI/ruby/game_of_life.gemspec | 2 | ||||
| -rw-r--r-- | CLI/ruby/lib/game_of_life/generators/input.rb | 6 |
3 files changed, 7 insertions, 3 deletions
diff --git a/CLI/ruby/bin/game-of-life b/CLI/ruby/bin/game-of-life index 4403598..14f5647 100755 --- a/CLI/ruby/bin/game-of-life +++ b/CLI/ruby/bin/game-of-life @@ -33,7 +33,7 @@ class CLI < Thor }.merge(options) universe = GameOfLife::Generators::Input.new(options_with_defaults) - p universe + puts universe end class << self diff --git a/CLI/ruby/game_of_life.gemspec b/CLI/ruby/game_of_life.gemspec index 2b9d2ef..3131ad3 100644 --- a/CLI/ruby/game_of_life.gemspec +++ b/CLI/ruby/game_of_life.gemspec @@ -14,7 +14,7 @@ Gem::Specification.new do |spec| spec.license = "MIT" spec.required_ruby_version = ">= 2.4.0" - spec.metadata['allowed_push_host'] = "https://rubygems.org" + spec.metadata["allowed_push_host"] = "https://rubygems.org" spec.metadata["homepage_uri"] = spec.homepage spec.metadata["source_code_uri"] = "https://gitlab.com/a14m/game-of-life/-/tree/master/CLI/ruby/" diff --git a/CLI/ruby/lib/game_of_life/generators/input.rb b/CLI/ruby/lib/game_of_life/generators/input.rb index 3965131..77adc85 100644 --- a/CLI/ruby/lib/game_of_life/generators/input.rb +++ b/CLI/ruby/lib/game_of_life/generators/input.rb @@ -12,6 +12,9 @@ module GameOfLife # @option options [Numeric] "width" (floored) and used as the width of the universe # @option options [Numeric] "height" (floored) and used as the height of the universe # @return [TODO] + # @smell + # rubocop:disable Metrics/AbcSize as the method needs to do the reading/parsing and initialization of the + # universe array def self.new(options) # By design, it's intentional that we use URI.open to to allow seamless file and url access raw = URI.open(options["input"]).read.split("\n") # rubocop:disable Security/Open @@ -28,8 +31,9 @@ module GameOfLife universe[i][j] = cell end end - return universe + universe end + # rubocop:enable Metrics/AbcSize end end end |
