Skip to content

Commit

Permalink
init
Browse files Browse the repository at this point in the history
  • Loading branch information
matthewstyler committed Jul 6, 2023
0 parents commit 1f932bc
Show file tree
Hide file tree
Showing 28 changed files with 1,887 additions and 0 deletions.
13 changes: 13 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
/.bundle/
/.yardoc
/_yardoc/
/coverage/
/doc/
/pkg/
/spec/reports/
/tmp/
*.bundle
*.so
*.o
*.a
mkmf.log
1 change: 1 addition & 0 deletions .rubocop.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
inherit_from: .rubocop_todo.yml
90 changes: 90 additions & 0 deletions .rubocop_todo.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,90 @@
# This configuration was generated by
# `rubocop --auto-gen-config`
# on 2023-07-06 02:10:34 UTC using RuboCop version 1.54.1.
# The point is for the user to remove these configuration records
# one by one as the offenses are removed from the code base.
# Note that changes in the inspected code, or installation of new
# versions of RuboCop, may require this file to be generated again.

# Offense count: 1
# Configuration parameters: Severity, Include.
# Include: **/*.gemspec
Gemspec/RequiredRubyVersion:
Exclude:
- 'ruby-perlin-2D-map-generator.gemspec'

# Offense count: 2
Lint/FloatComparison:
Exclude:
- 'lib/tile_perlin_generator.rb'
- 'test/tile_perlin_generator_test.rb'

# Offense count: 10
# Configuration parameters: AllowedMethods, AllowedPatterns, CountRepeatedAttributes.
Metrics/AbcSize:
Max: 44

# Offense count: 4
# Configuration parameters: CountComments, CountAsOne.
Metrics/ClassLength:
Max: 209

# Offense count: 2
# Configuration parameters: AllowedMethods, AllowedPatterns.
Metrics/CyclomaticComplexity:
Max: 26

# Offense count: 16
# Configuration parameters: CountComments, CountAsOne, AllowedMethods, AllowedPatterns.
Metrics/MethodLength:
Max: 74

# Offense count: 2
# Configuration parameters: CountKeywordArgs, MaxOptionalParameters.
Metrics/ParameterLists:
Max: 6

# Offense count: 2
# Configuration parameters: AllowedMethods, AllowedPatterns.
Metrics/PerceivedComplexity:
Max: 28

# Offense count: 6
# Configuration parameters: MinNameLength, AllowNamesEndingInNumbers, AllowedNames, ForbiddenNames.
# AllowedNames: as, at, by, cc, db, id, if, in, io, ip, of, on, os, pp, to
Naming/MethodParameterName:
Exclude:
- 'lib/tile.rb'
- 'lib/tile_perlin_generator.rb'
- 'test/tile_perlin_generator_test.rb'

# Offense count: 2
# Configuration parameters: EnforcedStyle, CheckMethodNames, CheckSymbols, AllowedIdentifiers, AllowedPatterns.
# SupportedStyles: snake_case, normalcase, non_integer
# AllowedIdentifiers: capture3, iso8601, rfc1123_date, rfc822, rfc2822, rfc3339, x86_64
Naming/VariableNumber:
Exclude:
- 'test/tile_perlin_generator_test.rb'

# Offense count: 9
# Configuration parameters: AllowedConstants.
Style/Documentation:
Exclude:
- 'spec/**/*'
- 'test/**/*'
- 'lib/CLI/command.rb'
- 'lib/biome.rb'
- 'lib/flora.rb'
- 'lib/map.rb'
- 'lib/map_config.rb'
- 'lib/map_tile_generator.rb'
- 'lib/tile.rb'
- 'lib/tile_item.rb'
- 'lib/tile_perlin_generator.rb'

# Offense count: 17
# This cop supports safe autocorrection (--autocorrect).
# Configuration parameters: AllowHeredoc, AllowURI, URISchemes, IgnoreCopDirectives, AllowedPatterns.
# URISchemes: http, https
Layout/LineLength:
Max: 193
1 change: 1 addition & 0 deletions .ruby-version
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
3.0.0
5 changes: 5 additions & 0 deletions Gemfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# frozen_string_literal: true

source 'https://rubygems.org'

gemspec
39 changes: 39 additions & 0 deletions Gemfile.lock
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
PATH
remote: .
specs:
ruby-perlin-2D-map-generator (0.0.1)
perlin
tty-option

GEM
remote: https://rubygems.org/
specs:
ast (1.1.0)
minitest (5.18.1)
mocha (2.0.4)
ruby2_keywords (>= 0.0.5)
parser (2.0.0.pre1)
ast (~> 1.1)
slop (~> 3.4, >= 3.4.5)
perlin (0.2.2)
rainbow (3.1.1)
rake (13.0.6)
rubocop (0.9.1)
parser (= 2.0.0.pre1)
rainbow (>= 1.1.4)
ruby2_keywords (0.0.5)
slop (3.6.0)
tty-option (0.3.0)

PLATFORMS
x86_64-darwin-21

DEPENDENCIES
minitest
mocha
rake
rubocop
ruby-perlin-2D-map-generator!

BUNDLED WITH
2.2.3
10 changes: 10 additions & 0 deletions Rakefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
# frozen_string_literal: true

require 'minitest/test_task'

Minitest::TestTask.create(:test) do |t|
t.libs << 'test'
t.libs << 'lib'
t.warning = false
t.test_globs = ['test/**/*_test.rb']
end
13 changes: 13 additions & 0 deletions bin/ruby-perlin-2D-map-generator
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
#!/usr/bin/env ruby
# frozen_string_literal: true

lib_path = File.expand_path('../lib', __dir__)
$LOAD_PATH.unshift(lib_path) unless $LOAD_PATH.include?(lib_path)
require 'CLI/command'

Signal.trap('INT') do
warn("\n#{caller.join("\n")}: interrupted")
exit(1)
end

CLI::Command.new.parse.run
Loading

0 comments on commit 1f932bc

Please sign in to comment.