grape-starter 1.2.0 → 1.2.5

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 33b0c8dc1a0e50cd3c8670b7f8021efeaf815f549d53e15f354804bf8fad6e78
4
- data.tar.gz: d15bf5a32c109d86975f70932d24a4494294ab70f724b67f2c756dfd24f258fd
3
+ metadata.gz: fc328d324baf16a4ca6d533598944cef904a4a23c754cf2dec79a1d38e31f401
4
+ data.tar.gz: dfb725234b40172de9cc66ac47cac5a5d7ab40e958d70618409fcbe2b5d47a6f
5
5
  SHA512:
6
- metadata.gz: 7a86191e9dcf771a23c0e45ed44570d21411680bd9a9da6969c8ea8e1424709468fe436cc1e701cf329bd3c0dbd3a2ee4c98f825809a1c47ddcdebcee9dbd767
7
- data.tar.gz: 8ff943679d6ef2983cb5972b23f76467d5fcbee027cec120cb88a4fccff4372a13b8d16aee920d337b71f030a97b281de6ba4b6d368f26683c40282f1a5e3cb2
6
+ metadata.gz: 8a981c268e2591b126090c46d3776f84f1346a6ec25a21d0ff43941b8e4bafb27bd13fc7579de1ce0b48be34b3606bd2f04d641be083480692ec8c2a60e88456
7
+ data.tar.gz: e19a5b4b46853f692f95c1b067312d2d83470a4c0114f88cadda612b1143f049a4da3f20acb30c3e205ab3c90cef274814814dabe568cba7fa2e10aa78cadc14
@@ -0,0 +1,21 @@
1
+ name: Ruby
2
+
3
+ on: [push]
4
+
5
+ jobs:
6
+ build:
7
+
8
+ runs-on: ubuntu-latest
9
+
10
+ steps:
11
+ - uses: actions/checkout@v1
12
+ - name: Set up Ruby 2.7
13
+ uses: actions/setup-ruby@v1
14
+ with:
15
+ ruby-version: 2.7.1
16
+ - name: Build and test with Rake
17
+ run: |
18
+ gem install bundler
19
+ bundle install --jobs 4 --retry 3
20
+ bundle exec rspec
21
+ bundle exec rubocop
data/.gitignore CHANGED
@@ -5,10 +5,7 @@
5
5
  .bundle
6
6
  log
7
7
  Gemfile.lock
8
- docker-compose.yml
9
8
  tmp/
10
9
  pkg/
11
10
  template/Gemfile.lock
12
11
  grape-starter.md
13
- .Ulysses-Group.plist
14
- .Ulysses-favorites.plist
data/.inch.yml CHANGED
@@ -5,3 +5,4 @@ files:
5
5
  - lib/starter/builder/templates/sequel.rb
6
6
  - lib/starter/builder/names.rb
7
7
  - lib/starter/rake/grape_tasks.rb
8
+ - template
@@ -9,20 +9,20 @@ AllCops:
9
9
  - '**/template/api/**'
10
10
  - grape-starter.gemspec
11
11
  UseCache: true
12
- TargetRubyVersion: 2.6
12
+ TargetRubyVersion: 2.7
13
13
 
14
14
  Layout/IndentationWidth:
15
15
  Exclude:
16
16
  - 'lib/starter/builder/templates/files.rb'
17
17
  - 'lib/starter/builder/templates/endpoints.rb'
18
18
 
19
+ Layout/LineLength:
20
+ Max: 120
21
+
19
22
  Metrics/BlockLength:
20
23
  Exclude:
21
24
  - 'spec/**/*'
22
25
 
23
- Metrics/LineLength:
24
- Max: 120
25
-
26
26
  Metrics/AbcSize:
27
27
  Max: 20
28
28
 
@@ -38,7 +38,33 @@ Style/AsciiComments:
38
38
  Enabled: false
39
39
 
40
40
  Style/Documentation:
41
- Exclude:
42
- - 'template/**/*'
43
- - 'lib/**/*'
44
- - 'spec/**/*'
41
+ Enabled: false
42
+
43
+ Layout/EmptyLinesAroundAttributeAccessor:
44
+ Enabled: true
45
+ Layout/SpaceAroundMethodCallOperator:
46
+ Enabled: true
47
+ Lint/DeprecatedOpenSSLConstant:
48
+ Enabled: true
49
+ Lint/MixedRegexpCaptureTypes:
50
+ Enabled: true
51
+ Lint/RaiseException:
52
+ Enabled: true
53
+ Lint/StructNewOverride:
54
+ Enabled: true
55
+ Style/ExponentialNotation:
56
+ Enabled: true
57
+ Style/HashEachMethods:
58
+ Enabled: true
59
+ Style/HashTransformKeys:
60
+ Enabled: true
61
+ Style/HashTransformValues:
62
+ Enabled: true
63
+ Style/RedundantFetchBlock:
64
+ Enabled: true
65
+ Style/RedundantRegexpCharacterClass:
66
+ Enabled: true
67
+ Style/RedundantRegexpEscape:
68
+ Enabled: true
69
+ Style/SlicingWithRange:
70
+ Enabled: true
@@ -1,5 +1,5 @@
1
1
  language: ruby
2
-
2
+ os: linux
3
3
  sudo: false
4
4
 
5
5
  before_install:
@@ -7,13 +7,13 @@ before_install:
7
7
 
8
8
  rvm:
9
9
  - ruby-head
10
- - 2.6.1
11
- - 2.5.3
12
- - 2.4.5
10
+ - 2.7.0
11
+ - 2.6.5
12
+ - 2.5.7
13
13
 
14
- matrix:
14
+ jobs:
15
15
  fast_finish: true
16
16
 
17
17
  allow_failures:
18
- - rvm: ruby-head
19
- - rvm: 2.4.5
18
+ - rvm:
19
+ - ruby-head
@@ -1,78 +1,34 @@
1
1
  ### NEXT
2
2
 
3
- - contributions
3
+ - Fixes gems for sequel. [LeFnord](https://github.com/LeFnord)
4
+ - Minor template improvements. [LeFnord](https://github.com/LeFnord)
4
5
 
5
- ### v1.1.0 / 2019-02-22
6
- - Replaces own migration tasks through [standalone-migrations](https://github.com/thuss/standalone-migrations)
7
-
8
- ### v1.0.3 / 2019-02-10
9
- - Loosens reuby version to 2.4
10
- - prepare release 1.0.2
11
- - Cleans up travis ci.
12
-
13
- ### 1.0.1
14
- - [00993](https://github.com/LeFnord/grape-starter/commit/6fef3812fd587ea61c29b9eacde1fb856ad00993) - adds a rudimentary Dockerfile as starting point
15
-
16
- ### 1.0.0
17
-
18
- - [67a5f](https://github.com/LeFnord/grape-starter/commit/b1f32801844ed9a98bc4d5f7c938451ef7667a5f) - supports creating a migration file
19
- - [de26b](https://github.com/LeFnord/grape-starter/commit/22ad2170176b9602cff2239a7d0469c823cde26b) - ci adoptions
20
- - [7ad69](https://github.com/LeFnord/grape-starter/commit/925fa5fb161c8cc26c96834e185d8299a207ad69) - spec improvements
21
-
22
- ### 0.8.7
23
-
24
- - [c7cb2](https://github.com/LeFnord/grape-starter/commit/4be5bd9b7c06611e096d6eaa23d7168136bc7cb2) - updates dependencies; makes rubocop happy
25
- - [d9c6f](https://github.com/LeFnord/grape-starter/commit/2f97247767c3e76c4c33da50eec2ad160bed9c6f) - minor dependencies updates
26
-
27
- ### 0.8.6
28
-
29
- - [362c9](https://github.com/LeFnord/grape-starter/commit/56035384befacb877e89e8a04f7bc62c9e7362c9) - fixes a sequel configuration bug with sqlite3
30
- - [21892](https://github.com/LeFnord/grape-starter/commit/4e249978af71abba35e00b0d4e85ec6ffaa21892) - upgrades minimum ruby version to 2.3
6
+ ### v1.2.3 / 2019-12-15
31
7
 
32
- ### 0.8.5
8
+ - Removes require pry. [LeFnord](LeFnord) closes [!21](https://github.com/LeFnord/grape-starter/issues/21)
9
+ - [#22](https://github.com/LeFnord/grape-starter/pull/22) - accomodate activerecord 6.0 (#22) [Ignacio Carrera](https://github.com/nachokb)
33
10
 
34
- - [cbea8](https://github.com/LeFnord/grape-starter/commit/fa5edb5dc7e0883ff099e297e9cbd5bd5ebcbea8) - DRYs up template code; passes rubocop 0.51.0
11
+ ### v1.2.2 / 2019-02-28
35
12
 
36
- - [6bbe7](https://github.com/LeFnord/grape-starter/commit/a224b5d8dfa001cb1e8dec3b1a1e28fc9826bbe7) - avoids overriding of dev db by running specs; fixes syntox error
13
+ - Fixes loading of `aplication` instead of `environment` in `config.ru`
14
+ - [#19](https://github.com/LeFnord/grape-starter/pull/19) - Adds a module under lib as namespace. [LeFnord](https://github.com/LeFnord)
37
15
 
38
- ### 0.8.4
16
+ ### v1.2.1 / 2019-02-24
39
17
 
40
- - [d8e13](https://github.com/LeFnord/grape-starter/commit/1f5faef958799704163b7db25db07c569cad8e13) -
41
- fixes error on configuration
18
+ - [#17](https://github.com/LeFnord/grape-starter/pull/17) - Fix script/server shebang for ubuntu. [rawongithub](https://github.com/rawongithub)
42
19
 
43
- - [6baba](https://github.com/LeFnord/grape-starter/commit/e00433dee97509e71c1685a0da9134ce2a66baba) -
44
- minor re-working of Rakefile and initializer templates
20
+ ### v1.2.0 / 2019-02-24
45
21
 
46
- ### 0.8.3
22
+ - Code improvements, now `environment`, `application` and `boot` are used in a more expected way.
47
23
 
48
- - [3fe13](https://github.com/LeFnord/grape-starter/commit/3fe134c6ce0666dfd86165b5d2c1a219a4629862) - improves sequel rake tasks
49
-
50
- ### 0.8.2
51
-
52
- - [48458…](https://github.com/LeFnord/grape-starter/commit/48458938a341660453052660448a058aee0f8e81) - handles Sequel deprecation warning
53
-
54
- ### 0.8.1
55
-
56
- - [6b16c…](https://github.com/LeFnord/grape-starter/commit/6b16c0bf38e4cad8d486e805269157dcbaefbb64) - removes default ORM value, minor corrections
57
-
58
- ### 0.8.0
59
-
60
- - [#15](https://github.com/LeFnord/grape-starter/pull/15), [2af09…](https://github.com/LeFnord/grape-starter/commit/2af09dddf97f756e96c80c745ee68aad5ab4ccc3) **breaking change** prefix option on create is optional, no default
61
- - [#12](https://github.com/LeFnord/grape-starter/pull/12) - Add base configuration for ActiveRecord - ([@terry90](https://github.com/terry90))
62
-
63
- ### 0.7.0
24
+ ### v1.1.0 / 2019-02-22
25
+ - Replaces own migration tasks through [standalone-migrations](https://github.com/thuss/standalone-migrations)
64
26
 
65
- - [212e6…](https://github.com/LeFnord/grape-starter/commit/212e6245e10598efe286143dac39f46134c58c54) - makes mounting of doc more secure
66
- - [f3bb6…](https://github.com/LeFnord/grape-starter/commit/f3bb63fdee79df4552316524b1ac3adaebab811a) - adds orm option so that the `add` resource command can optional use configured ORM
67
- - [af138…](https://github.com/LeFnord/grape-starter/commit/af1388ae6479b81646c56ac55f856ea275dc9817) - resource respects configured orm
68
- - [5ac74…](https://github.com/LeFnord/grape-starter/commit/5ac747a7fb44d97eedbeba1e7a11e475846d7743) - improve README
69
- - [eb33c…](https://github.com/LeFnord/grape-starter/commit/eb33c910c623b34db54ccb64ee59af4c639029e4) - adds base storing of configuration
70
- - [751aa…](https://github.com/LeFnord/grape-starter/commit/751aa8ae929bed0ff66ac9830468279238bec252) - adding option to add Sequel support
71
- - [354e6…](https://github.com/LeFnord/grape-starter/commit/354e63abd77751fe0f3a1b405bb49ab754ab1522) - re-organizing of template files
72
- - [6e33e…](https://github.com/LeFnord/grape-starter/commit/6e33e8137aa293eef66913c50010c53d284a0d8d) - Add awesome_print dependency ([@terry90](https://github.com/terry90))
27
+ ### v1.0.3 / 2019-02-10
28
+ - Loosens reuby version to 2.4
29
+ - prepare release 1.0.2
30
+ - Cleans up travis ci.
73
31
 
74
- ### 0.6.0
32
+ ### before
75
33
 
76
- **breaking changes** renames all api stuff under lib to models (includes, of course, the namespace):
77
- - `lib/api.rb` -> `lib/models.rb`
78
- - `lib/api/` -> `lib/models/`
34
+ many things done
@@ -3,7 +3,6 @@
3
3
 
4
4
  $LOAD_PATH.unshift(File.join(File.dirname(__FILE__), '..', 'lib'))
5
5
 
6
- require 'pry'
7
6
  require 'gli'
8
7
  require 'starter'
9
8
 
@@ -22,10 +22,10 @@ Gem::Specification.new do |spec|
22
22
  spec.executables = spec.files.grep(%r{^bin/}) { |f| File.basename(f) }
23
23
  spec.require_paths = ['lib']
24
24
 
25
- spec.required_ruby_version = '>= 2.4'
25
+ spec.required_ruby_version = '>= 2.5'
26
26
 
27
- spec.add_dependency 'gli', '~> 2.18'
28
- spec.add_dependency 'activesupport', '~> 5'
29
- spec.add_dependency 'rubocop', '~> 0.64'
30
- spec.add_dependency 'awesome_print', '~> 1.7'
27
+ spec.add_dependency 'gli', '~> 2.19'
28
+ spec.add_dependency 'activesupport', '~> 6.0'
29
+ spec.add_dependency 'rubocop', '~> 0.86'
30
+ spec.add_dependency 'awesome_print', '~> 1.8'
31
31
  end
@@ -18,13 +18,15 @@ module Starter
18
18
 
19
19
  class << self
20
20
  attr_reader :prefix, :resource, :set, :force, :entity, :destination, :orm
21
+
21
22
  #
22
23
  # public methods
23
24
  #
24
25
  #
25
26
  # would be called from new command
26
27
  #
27
- # name - A String as project name
28
+ # name - A String as project name,
29
+ # it will also be the namespace in the lib folder
28
30
  # source - A String which provides the template path
29
31
  # destination - A String which provides the new project path
30
32
  # options - A Hash to provide some optional arguments (default: {})
@@ -41,13 +43,15 @@ module Starter
41
43
  replace_static(File.join(config[:file]), config[:pattern])
42
44
  end
43
45
 
46
+ add_namespace_with_version
47
+
48
+ Orms.build(name, destination, options[:orm]) if options[:orm]
49
+
44
50
  Starter::Config.save(
45
51
  dest: destination,
46
52
  content: { prefix: prefix, orm: options[:orm].to_s }
47
53
  )
48
54
 
49
- Orms.build(destination, options[:orm]) if options[:orm]
50
-
51
55
  self
52
56
  end
53
57
 
@@ -55,6 +59,7 @@ module Starter
55
59
  #
56
60
  # resource - A String as name
57
61
  # options - A Hash to provide some optional arguments (default: {})
62
+ # :resource - the name of the resource to create
58
63
  # :set – Whitespace separated list of http verbs
59
64
  # (default: nil, possible: post get put patch delete)
60
65
  # :force - A Boolean, if given existent files should be overwriten (default: false)
@@ -82,8 +87,8 @@ module Starter
82
87
 
83
88
  file_list.map { |x| send("#{x}_name") }.each do |file_to_remove|
84
89
  FileUtils.rm file_to_remove
85
- rescue StandardError => error
86
- $stdout.puts error.to_s
90
+ rescue StandardError => e
91
+ $stdout.puts e.to_s
87
92
  end
88
93
 
89
94
  remove_mount_point
@@ -113,12 +118,19 @@ module Starter
113
118
  ]
114
119
  end
115
120
 
121
+ #
122
+ # creates a new file in lib folder as namespace, includind the version
123
+ def add_namespace_with_version
124
+ new_lib = File.join(destination, 'lib', base_file_name)
125
+ FileFoo.write_file(new_lib, base_namespace_file.strip_heredoc)
126
+ end
127
+
116
128
  #
117
129
  # replace something in static files
118
130
  def replace_static(file, replacement)
119
- server_file = File.join(destination, file)
131
+ file_path = File.join(destination, file)
120
132
 
121
- FileFoo.call!(server_file) { |content| content.gsub!('{{{grape-starter}}}', replacement.to_s) }
133
+ FileFoo.call!(file_path) { |content| content.gsub!('{{{grape-starter}}}', replacement.to_s) }
122
134
  end
123
135
 
124
136
  # #add! a new resource releated helper methods
@@ -3,10 +3,12 @@
3
3
  module Starter
4
4
  class Orms
5
5
  class << self
6
- def build(dest, orm)
6
+ def build(name, dest, orm)
7
7
  load_orm(orm: orm)
8
8
  return if @orm.nil?
9
9
 
10
+ @name = name
11
+
10
12
  if @orm == 'ar' || @orm == 'activerecord'
11
13
  # Fixes pooling
12
14
  add_middleware(dest, 'ActiveRecord::Rack::ConnectionManagement')
@@ -35,21 +37,21 @@ module Starter
35
37
  encoding: unicode
36
38
  timeout: 5000
37
39
  user: postgres
38
- database: name_development
40
+ database: #{@name}_development
39
41
 
40
42
  test:
41
43
  adapter: #{adapter}
42
44
  encoding: unicode
43
45
  timeout: 5000
44
46
  user: postgres
45
- database: name_test
47
+ database: #{@name}_test
46
48
 
47
49
  production:
48
50
  adapter: #{adapter}
49
51
  encoding: unicode
50
52
  timeout: 5000
51
53
  user: postgres
52
- database: name_production
54
+ database: #{@name}_production
53
55
  FILE
54
56
  end
55
57
 
@@ -29,7 +29,9 @@ module Starter
29
29
  # POST
30
30
  def post
31
31
  "
32
- desc 'create #{resource.singularize}'
32
+ desc 'create #{resource.singularize}' do
33
+ tags %w[#{resource.singularize}]
34
+ end
33
35
  params do
34
36
  # TODO: specify the parameters
35
37
  end
@@ -41,8 +43,10 @@ module Starter
41
43
  # GET
42
44
  def get_all
43
45
  "
44
- desc 'get all of #{resource.pluralize}',
45
- is_array: true
46
+ desc 'get all of #{resource.pluralize}' do
47
+ is_array true
48
+ tags %w[#{resource.singularize}]
49
+ end
46
50
  get do
47
51
  # your code goes here
48
52
  end"
@@ -51,7 +55,9 @@ module Starter
51
55
  %w[get put patch delete].each do |verb|
52
56
  define_method(:"#{verb}_one") do
53
57
  "
54
- desc '#{verb} #{resource.singularize}'
58
+ desc '#{verb} #{resource.singularize}' do
59
+ tags %w[#{resource.singularize}]
60
+ end
55
61
  #{verb} do
56
62
  # your code goes here
57
63
  end"
@@ -61,7 +67,9 @@ module Starter
61
67
  %w[get put patch delete].each do |verb|
62
68
  define_method(:"#{verb}_specific") do
63
69
  "
64
- desc '#{verb} specific #{resource.singularize}'
70
+ desc '#{verb} specific #{resource.singularize}' do
71
+ tags %w[#{resource.singularize}]
72
+ end
65
73
  params do
66
74
  requires :id
67
75
  end
@@ -36,6 +36,16 @@ module Starter
36
36
  end
37
37
 
38
38
  # LIB template for resource
39
+ def base_namespace_file
40
+ <<-FILE.strip_heredoc
41
+ # frozen_string_literal: true
42
+
43
+ module #{klass_name}
44
+ VERSION = '0.1.0'
45
+ end
46
+ FILE
47
+ end
48
+
39
49
  def lib_file
40
50
  <<-FILE.strip_heredoc
41
51
  # frozen_string_literal: true
@@ -83,7 +83,7 @@ module Starter
83
83
  <<-FILE.strip_heredoc
84
84
  # DB stack
85
85
  gem 'sequel'
86
- gem 'sqlite3'
86
+ gem 'pg'
87
87
  FILE
88
88
  end
89
89
 
@@ -52,16 +52,14 @@ module Starter
52
52
  def build_path(route)
53
53
  path = route.path
54
54
 
55
- path.sub!(/\(\.\w+?\)$/, '')
56
- path.sub!('(.:format)', '')
55
+ path = path.sub(/\(\.\w+?\)$/, '')
56
+ path = path.sub('(.:format)', '')
57
57
 
58
58
  if route.version
59
- path.sub!(':version', route.version.to_s)
59
+ path.sub(':version', route.version.to_s)
60
60
  else
61
- path.sub!('/:version', '')
61
+ path.sub('/:version', '')
62
62
  end
63
-
64
- path
65
63
  end
66
64
 
67
65
  def app
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Starter
4
- VERSION = '1.2.0'
4
+ VERSION = '1.2.5'
5
5
  end
@@ -1,5 +1,3 @@
1
- inherit_from: .rubocop_todo.yml
2
-
3
1
  AllCops:
4
2
  Exclude:
5
3
  - '**/tmp/**/*'
@@ -7,16 +5,51 @@ AllCops:
7
5
  - Rakefile
8
6
  - Gemfile
9
7
  UseCache: true
10
- TargetRubyVersion: 2.6
8
+ TargetRubyVersion: 2.7
11
9
 
12
- Metrics/LineLength:
10
+ Layout/LineLength:
13
11
  Max: 120
14
12
 
15
13
  Metrics/AbcSize:
16
14
  Max: 20
17
15
 
16
+ Metrics/BlockLength:
17
+ Exclude:
18
+ - 'api/endpoints/**/*'
18
19
  Metrics/MethodLength:
19
20
  Max: 20
20
21
 
21
22
  Style/AsciiComments:
22
23
  Enabled: false
24
+
25
+ Style/Documentation:
26
+ Enabled: false
27
+
28
+ Layout/EmptyLinesAroundAttributeAccessor:
29
+ Enabled: true
30
+ Layout/SpaceAroundMethodCallOperator:
31
+ Enabled: true
32
+ Lint/DeprecatedOpenSSLConstant:
33
+ Enabled: true
34
+ Lint/MixedRegexpCaptureTypes:
35
+ Enabled: true
36
+ Lint/RaiseException:
37
+ Enabled: true
38
+ Lint/StructNewOverride:
39
+ Enabled: true
40
+ Style/ExponentialNotation:
41
+ Enabled: true
42
+ Style/HashEachMethods:
43
+ Enabled: true
44
+ Style/HashTransformKeys:
45
+ Enabled: true
46
+ Style/HashTransformValues:
47
+ Enabled: true
48
+ Style/RedundantFetchBlock:
49
+ Enabled: true
50
+ Style/RedundantRegexpCharacterClass:
51
+ Enabled: true
52
+ Style/RedundantRegexpEscape:
53
+ Enabled: true
54
+ Style/SlicingWithRange:
55
+ Enabled: true
@@ -20,5 +20,5 @@ group :development, :test do
20
20
  gem 'rack-test'
21
21
  gem 'rake'
22
22
  gem 'rspec'
23
- gem 'rubocop', '~> 0.65'
23
+ gem 'rubocop', '~> 0.86'
24
24
  end
@@ -6,9 +6,10 @@ module Api
6
6
  module Endpoints
7
7
  class Root < Grape::API
8
8
  namespace :root do
9
- desc 'Exposes all routes',
10
- success: Entities::Route,
11
- is_array: true
9
+ desc 'Exposes all routes' do
10
+ success Entities::Route
11
+ is_array true
12
+ end
12
13
  get do
13
14
  api_routes = Starter::Rake::GrapeTasks.new(::Api::Base).api_routes
14
15
 
@@ -1,7 +1,7 @@
1
1
  # frozen_string_literal: false
2
2
 
3
3
  require 'rack/cors'
4
- require_relative 'config/environment'
4
+ require_relative 'config/application'
5
5
 
6
6
  use Rack::CommonLogger
7
7
 
@@ -9,18 +9,18 @@ $LOAD_PATH.unshift(File.join(File.dirname(__FILE__), '..', 'lib'))
9
9
  $LOAD_PATH.unshift(File.join(File.dirname(__FILE__), '..', 'api'))
10
10
  $LOAD_PATH.unshift(File.dirname(__FILE__))
11
11
 
12
- Dir[File.expand_path('../config/initializers/*.rb', __dir__)].each do |initializer|
12
+ Dir[File.expand_path('../config/initializers/*.rb', __dir__)].sort.each do |initializer|
13
13
  require initializer
14
14
  end
15
15
 
16
- Dir[File.expand_path('../lib/**/*.rb', __dir__)].each do |lib|
16
+ Dir[File.expand_path('../lib/**/*.rb', __dir__)].sort.each do |lib|
17
17
  require lib
18
18
  end
19
19
 
20
- Dir[File.expand_path('../api/entities/*.rb', __dir__)].each do |entity|
20
+ Dir[File.expand_path('../api/entities/*.rb', __dir__)].sort.each do |entity|
21
21
  require entity
22
22
  end
23
23
 
24
- Dir[File.expand_path('../api/endpoints/*.rb', __dir__)].each do |endpoint|
24
+ Dir[File.expand_path('../api/endpoints/*.rb', __dir__)].sort.each do |endpoint|
25
25
  require endpoint
26
26
  end
@@ -1,4 +1,4 @@
1
- #!/usr/bin/env bash -l
1
+ #!/usr/bin/env bash
2
2
 
3
3
  set -e
4
4
 
File without changes
@@ -7,7 +7,7 @@ require File.expand_path('../config/application', __dir__)
7
7
 
8
8
  grape_starter_gem = Gem::Specification.find_by_name('grape-starter').gem_dir
9
9
 
10
- Dir[grape_starter_gem + '/lib/starter/rspec/**/*.rb'].each { |f| require f }
10
+ Dir[grape_starter_gem + '/lib/starter/rspec/**/*.rb'].sort.each { |f| require f }
11
11
 
12
12
  RSpec.configure do |config|
13
13
  include Rack::Test::Methods
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: grape-starter
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.2.0
4
+ version: 1.2.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - LeFnord
8
- autorequire:
8
+ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2019-02-24 00:00:00.000000000 Z
11
+ date: 2020-07-04 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: gli
@@ -16,56 +16,56 @@ dependencies:
16
16
  requirements:
17
17
  - - "~>"
18
18
  - !ruby/object:Gem::Version
19
- version: '2.18'
19
+ version: '2.19'
20
20
  type: :runtime
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
24
  - - "~>"
25
25
  - !ruby/object:Gem::Version
26
- version: '2.18'
26
+ version: '2.19'
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: activesupport
29
29
  requirement: !ruby/object:Gem::Requirement
30
30
  requirements:
31
31
  - - "~>"
32
32
  - !ruby/object:Gem::Version
33
- version: '5'
33
+ version: '6.0'
34
34
  type: :runtime
35
35
  prerelease: false
36
36
  version_requirements: !ruby/object:Gem::Requirement
37
37
  requirements:
38
38
  - - "~>"
39
39
  - !ruby/object:Gem::Version
40
- version: '5'
40
+ version: '6.0'
41
41
  - !ruby/object:Gem::Dependency
42
42
  name: rubocop
43
43
  requirement: !ruby/object:Gem::Requirement
44
44
  requirements:
45
45
  - - "~>"
46
46
  - !ruby/object:Gem::Version
47
- version: '0.64'
47
+ version: '0.86'
48
48
  type: :runtime
49
49
  prerelease: false
50
50
  version_requirements: !ruby/object:Gem::Requirement
51
51
  requirements:
52
52
  - - "~>"
53
53
  - !ruby/object:Gem::Version
54
- version: '0.64'
54
+ version: '0.86'
55
55
  - !ruby/object:Gem::Dependency
56
56
  name: awesome_print
57
57
  requirement: !ruby/object:Gem::Requirement
58
58
  requirements:
59
59
  - - "~>"
60
60
  - !ruby/object:Gem::Version
61
- version: '1.7'
61
+ version: '1.8'
62
62
  type: :runtime
63
63
  prerelease: false
64
64
  version_requirements: !ruby/object:Gem::Requirement
65
65
  requirements:
66
66
  - - "~>"
67
67
  - !ruby/object:Gem::Version
68
- version: '1.7'
68
+ version: '1.8'
69
69
  description: CLI to create a API skeleton based on Grape and Rack
70
70
  email:
71
71
  - pscholz.le@gmail.com
@@ -74,6 +74,7 @@ executables:
74
74
  extensions: []
75
75
  extra_rdoc_files: []
76
76
  files:
77
+ - ".github/workflows/ruby.yml"
77
78
  - ".gitignore"
78
79
  - ".inch.yml"
79
80
  - ".rspec"
@@ -104,7 +105,6 @@ files:
104
105
  - lib/starter/version.rb
105
106
  - template/.gitignore
106
107
  - template/.rubocop.yml
107
- - template/.rubocop_todo.yml
108
108
  - template/Dockerfile
109
109
  - template/Gemfile
110
110
  - template/LICENSE
@@ -128,7 +128,7 @@ files:
128
128
  - template/script/stop
129
129
  - template/script/test
130
130
  - template/script/update
131
- - template/spec/lib/models/version_spec.rb
131
+ - template/spec/lib/models/.keep
132
132
  - template/spec/requests/documentation_spec.rb
133
133
  - template/spec/requests/root_spec.rb
134
134
  - template/spec/spec_helper.rb
@@ -136,7 +136,7 @@ homepage: https://github.com/LeFnord/grape-starter
136
136
  licenses:
137
137
  - MIT
138
138
  metadata: {}
139
- post_install_message:
139
+ post_install_message:
140
140
  rdoc_options: []
141
141
  require_paths:
142
142
  - lib
@@ -144,15 +144,15 @@ required_ruby_version: !ruby/object:Gem::Requirement
144
144
  requirements:
145
145
  - - ">="
146
146
  - !ruby/object:Gem::Version
147
- version: '2.4'
147
+ version: '2.5'
148
148
  required_rubygems_version: !ruby/object:Gem::Requirement
149
149
  requirements:
150
150
  - - ">="
151
151
  - !ruby/object:Gem::Version
152
152
  version: '0'
153
153
  requirements: []
154
- rubygems_version: 3.0.2
155
- signing_key:
154
+ rubygems_version: 3.1.4
155
+ signing_key:
156
156
  specification_version: 4
157
157
  summary: Creates a Grape Rack skeleton
158
158
  test_files: []
@@ -1,18 +0,0 @@
1
- # This configuration was generated by
2
- # `rubocop --auto-gen-config`
3
- # on 2016-10-18 20:40:59 +0200 using RuboCop version 0.44.1.
4
- # The point is for the user to remove these configuration records
5
- # one by one as the offenses are removed from the code base.
6
- # Note that changes in the inspected code, or installation of new
7
- # versions of RuboCop, may require this file to be generated again.
8
-
9
- # Offense count: 1
10
- # Configuration parameters: AllowHeredoc, AllowURI, URISchemes.
11
- # URISchemes: http, https
12
-
13
- # Offense count: 6
14
- Style/Documentation:
15
- Exclude:
16
- - 'spec/**/*'
17
- - 'api/**/*'
18
- - 'lib/**/*'
@@ -1,9 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- require 'spec_helper'
4
-
5
- describe Models do
6
- it 'has a version number' do
7
- expect(Models::VERSION).not_to be nil
8
- end
9
- end