grape-starter 1.2.1 → 1.2.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/.gitignore +0 -3
- data/.inch.yml +1 -0
- data/.travis.yml +0 -2
- data/CHANGELOG.md +8 -68
- data/grape-starter.gemspec +2 -2
- data/lib/starter/builder.rb +12 -3
- data/lib/starter/builder/templates/files.rb +10 -0
- data/lib/starter/version.rb +1 -1
- data/template/config.ru +1 -1
- data/template/spec/lib/models/.keep +0 -0
- metadata +6 -6
- data/template/spec/lib/models/version_spec.rb +0 -9
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 5884f8b3adf88506228c5687564f7305f0510d9d73d818c788711a17eb52f80e
|
|
4
|
+
data.tar.gz: 2e59c13074d311fca1689ecd477dce53724e809d9fed8e8196d8fcb937b18a7d
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 81545a8c7486d0ad80d3ee569dd5a4d23f61b98addb6b88e44fe78bccea16c25bc2d24db4ca00bdb624cfe977dbd03667288b58e6b5c6aba5b67e7d4e438cafd
|
|
7
|
+
data.tar.gz: 8a960cb7ed31a2f53ef0bcdf21f10a20dc92478d5a2090e4c8379d472dd62f6fad24cb167fd0d9f5e75c16ea66fa2229fe5da8d71e40e274813760deb4cc3582
|
data/.gitignore
CHANGED
data/.inch.yml
CHANGED
data/.travis.yml
CHANGED
data/CHANGELOG.md
CHANGED
|
@@ -2,11 +2,14 @@
|
|
|
2
2
|
|
|
3
3
|
- contributions
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
- Fixes loading of `aaplication` instead of `evironment` in `config.ru`
|
|
6
|
+
- [#19](https://github.com/LeFnord/grape-starter/pull/19) - Adds a module under lib as namespace. [LeFnord](https://github.com/LeFnord)
|
|
6
7
|
|
|
7
|
-
|
|
8
|
+
### v1.2.1 / 2019-02-24
|
|
8
9
|
|
|
9
|
-
|
|
10
|
+
- [#17](https://github.com/LeFnord/grape-starter/pull/17) - Fix script/server shebang for ubuntu. [rawongithub](https://github.com/rawongithub)
|
|
11
|
+
|
|
12
|
+
### v1.2.0 / 2019-02-24
|
|
10
13
|
|
|
11
14
|
- Code improvements, now `environment`, `application` and `boot` are used in a more expected way.
|
|
12
15
|
|
|
@@ -18,69 +21,6 @@
|
|
|
18
21
|
- prepare release 1.0.2
|
|
19
22
|
- Cleans up travis ci.
|
|
20
23
|
|
|
21
|
-
###
|
|
22
|
-
- [00993](https://github.com/LeFnord/grape-starter/commit/6fef3812fd587ea61c29b9eacde1fb856ad00993) - adds a rudimentary Dockerfile as starting point
|
|
23
|
-
|
|
24
|
-
### 1.0.0
|
|
25
|
-
|
|
26
|
-
- [67a5f](https://github.com/LeFnord/grape-starter/commit/b1f32801844ed9a98bc4d5f7c938451ef7667a5f) - supports creating a migration file
|
|
27
|
-
- [de26b](https://github.com/LeFnord/grape-starter/commit/22ad2170176b9602cff2239a7d0469c823cde26b) - ci adoptions
|
|
28
|
-
- [7ad69](https://github.com/LeFnord/grape-starter/commit/925fa5fb161c8cc26c96834e185d8299a207ad69) - spec improvements
|
|
29
|
-
|
|
30
|
-
### 0.8.7
|
|
31
|
-
|
|
32
|
-
- [c7cb2](https://github.com/LeFnord/grape-starter/commit/4be5bd9b7c06611e096d6eaa23d7168136bc7cb2) - updates dependencies; makes rubocop happy
|
|
33
|
-
- [d9c6f](https://github.com/LeFnord/grape-starter/commit/2f97247767c3e76c4c33da50eec2ad160bed9c6f) - minor dependencies updates
|
|
34
|
-
|
|
35
|
-
### 0.8.6
|
|
36
|
-
|
|
37
|
-
- [362c9](https://github.com/LeFnord/grape-starter/commit/56035384befacb877e89e8a04f7bc62c9e7362c9) - fixes a sequel configuration bug with sqlite3
|
|
38
|
-
- [21892](https://github.com/LeFnord/grape-starter/commit/4e249978af71abba35e00b0d4e85ec6ffaa21892) - upgrades minimum ruby version to 2.3
|
|
39
|
-
|
|
40
|
-
### 0.8.5
|
|
41
|
-
|
|
42
|
-
- [cbea8](https://github.com/LeFnord/grape-starter/commit/fa5edb5dc7e0883ff099e297e9cbd5bd5ebcbea8) - DRYs up template code; passes rubocop 0.51.0
|
|
43
|
-
|
|
44
|
-
- [6bbe7](https://github.com/LeFnord/grape-starter/commit/a224b5d8dfa001cb1e8dec3b1a1e28fc9826bbe7) - avoids overriding of dev db by running specs; fixes syntox error
|
|
45
|
-
|
|
46
|
-
### 0.8.4
|
|
47
|
-
|
|
48
|
-
- [d8e13](https://github.com/LeFnord/grape-starter/commit/1f5faef958799704163b7db25db07c569cad8e13) -
|
|
49
|
-
fixes error on configuration
|
|
50
|
-
|
|
51
|
-
- [6baba](https://github.com/LeFnord/grape-starter/commit/e00433dee97509e71c1685a0da9134ce2a66baba) -
|
|
52
|
-
minor re-working of Rakefile and initializer templates
|
|
53
|
-
|
|
54
|
-
### 0.8.3
|
|
55
|
-
|
|
56
|
-
- [3fe13](https://github.com/LeFnord/grape-starter/commit/3fe134c6ce0666dfd86165b5d2c1a219a4629862) - improves sequel rake tasks
|
|
57
|
-
|
|
58
|
-
### 0.8.2
|
|
59
|
-
|
|
60
|
-
- [48458…](https://github.com/LeFnord/grape-starter/commit/48458938a341660453052660448a058aee0f8e81) - handles Sequel deprecation warning
|
|
61
|
-
|
|
62
|
-
### 0.8.1
|
|
63
|
-
|
|
64
|
-
- [6b16c…](https://github.com/LeFnord/grape-starter/commit/6b16c0bf38e4cad8d486e805269157dcbaefbb64) - removes default ORM value, minor corrections
|
|
65
|
-
|
|
66
|
-
### 0.8.0
|
|
67
|
-
|
|
68
|
-
- [#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
|
|
69
|
-
- [#12](https://github.com/LeFnord/grape-starter/pull/12) - Add base configuration for ActiveRecord - ([@terry90](https://github.com/terry90))
|
|
70
|
-
|
|
71
|
-
### 0.7.0
|
|
72
|
-
|
|
73
|
-
- [212e6…](https://github.com/LeFnord/grape-starter/commit/212e6245e10598efe286143dac39f46134c58c54) - makes mounting of doc more secure
|
|
74
|
-
- [f3bb6…](https://github.com/LeFnord/grape-starter/commit/f3bb63fdee79df4552316524b1ac3adaebab811a) - adds orm option so that the `add` resource command can optional use configured ORM
|
|
75
|
-
- [af138…](https://github.com/LeFnord/grape-starter/commit/af1388ae6479b81646c56ac55f856ea275dc9817) - resource respects configured orm
|
|
76
|
-
- [5ac74…](https://github.com/LeFnord/grape-starter/commit/5ac747a7fb44d97eedbeba1e7a11e475846d7743) - improve README
|
|
77
|
-
- [eb33c…](https://github.com/LeFnord/grape-starter/commit/eb33c910c623b34db54ccb64ee59af4c639029e4) - adds base storing of configuration
|
|
78
|
-
- [751aa…](https://github.com/LeFnord/grape-starter/commit/751aa8ae929bed0ff66ac9830468279238bec252) - adding option to add Sequel support
|
|
79
|
-
- [354e6…](https://github.com/LeFnord/grape-starter/commit/354e63abd77751fe0f3a1b405bb49ab754ab1522) - re-organizing of template files
|
|
80
|
-
- [6e33e…](https://github.com/LeFnord/grape-starter/commit/6e33e8137aa293eef66913c50010c53d284a0d8d) - Add awesome_print dependency ([@terry90](https://github.com/terry90))
|
|
81
|
-
|
|
82
|
-
### 0.6.0
|
|
24
|
+
### before
|
|
83
25
|
|
|
84
|
-
|
|
85
|
-
- `lib/api.rb` -> `lib/models.rb`
|
|
86
|
-
- `lib/api/` -> `lib/models/`
|
|
26
|
+
many things done …
|
data/grape-starter.gemspec
CHANGED
|
@@ -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.
|
|
25
|
+
spec.required_ruby_version = '>= 2.5'
|
|
26
26
|
|
|
27
27
|
spec.add_dependency 'gli', '~> 2.18'
|
|
28
28
|
spec.add_dependency 'activesupport', '~> 5'
|
|
29
|
-
spec.add_dependency 'rubocop', '~> 0.
|
|
29
|
+
spec.add_dependency 'rubocop', '~> 0.65'
|
|
30
30
|
spec.add_dependency 'awesome_print', '~> 1.7'
|
|
31
31
|
end
|
data/lib/starter/builder.rb
CHANGED
|
@@ -24,7 +24,8 @@ module Starter
|
|
|
24
24
|
#
|
|
25
25
|
# would be called from new command
|
|
26
26
|
#
|
|
27
|
-
# name - A String as project name
|
|
27
|
+
# name - A String as project name,
|
|
28
|
+
# it will also be the namespace in the lib folder
|
|
28
29
|
# source - A String which provides the template path
|
|
29
30
|
# destination - A String which provides the new project path
|
|
30
31
|
# options - A Hash to provide some optional arguments (default: {})
|
|
@@ -40,14 +41,14 @@ module Starter
|
|
|
40
41
|
config_static.each do |config|
|
|
41
42
|
replace_static(File.join(config[:file]), config[:pattern])
|
|
42
43
|
end
|
|
44
|
+
add_namespace_with_version
|
|
45
|
+
Orms.build(destination, options[:orm]) if options[:orm]
|
|
43
46
|
|
|
44
47
|
Starter::Config.save(
|
|
45
48
|
dest: destination,
|
|
46
49
|
content: { prefix: prefix, orm: options[:orm].to_s }
|
|
47
50
|
)
|
|
48
51
|
|
|
49
|
-
Orms.build(destination, options[:orm]) if options[:orm]
|
|
50
|
-
|
|
51
52
|
self
|
|
52
53
|
end
|
|
53
54
|
|
|
@@ -55,6 +56,7 @@ module Starter
|
|
|
55
56
|
#
|
|
56
57
|
# resource - A String as name
|
|
57
58
|
# options - A Hash to provide some optional arguments (default: {})
|
|
59
|
+
# :resource - the name of the resource to create
|
|
58
60
|
# :set – Whitespace separated list of http verbs
|
|
59
61
|
# (default: nil, possible: post get put patch delete)
|
|
60
62
|
# :force - A Boolean, if given existent files should be overwriten (default: false)
|
|
@@ -113,6 +115,13 @@ module Starter
|
|
|
113
115
|
]
|
|
114
116
|
end
|
|
115
117
|
|
|
118
|
+
#
|
|
119
|
+
# creates a new file in lib folder as namespace, includind the version
|
|
120
|
+
def add_namespace_with_version
|
|
121
|
+
new_lib = File.join(destination, 'lib', base_file_name)
|
|
122
|
+
FileFoo.write_file(new_lib, base_namespace_file.strip_heredoc)
|
|
123
|
+
end
|
|
124
|
+
|
|
116
125
|
#
|
|
117
126
|
# replace something in static files
|
|
118
127
|
def replace_static(file, replacement)
|
|
@@ -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
|
data/lib/starter/version.rb
CHANGED
data/template/config.ru
CHANGED
|
File without changes
|
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.
|
|
4
|
+
version: 1.2.2
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- LeFnord
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2019-02-
|
|
11
|
+
date: 2019-02-28 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: gli
|
|
@@ -44,14 +44,14 @@ dependencies:
|
|
|
44
44
|
requirements:
|
|
45
45
|
- - "~>"
|
|
46
46
|
- !ruby/object:Gem::Version
|
|
47
|
-
version: '0.
|
|
47
|
+
version: '0.65'
|
|
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.
|
|
54
|
+
version: '0.65'
|
|
55
55
|
- !ruby/object:Gem::Dependency
|
|
56
56
|
name: awesome_print
|
|
57
57
|
requirement: !ruby/object:Gem::Requirement
|
|
@@ -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
|
|
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
|
|
@@ -144,7 +144,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
|
144
144
|
requirements:
|
|
145
145
|
- - ">="
|
|
146
146
|
- !ruby/object:Gem::Version
|
|
147
|
-
version: '2.
|
|
147
|
+
version: '2.5'
|
|
148
148
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
|
149
149
|
requirements:
|
|
150
150
|
- - ">="
|