grape-starter 0.8.5 → 0.8.6
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/grape-starter.gemspec +2 -2
- data/lib/starter/builder/orms.rb +8 -3
- data/lib/starter/version.rb +1 -1
- metadata +4 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: e0fd54ea95c799dfe3a1b1f5852afac53c5b44c2
|
4
|
+
data.tar.gz: ca463bf6797583f0ffb4b8fbd10ccf5c4432d516
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a1958eee5389080fb76844b44196d6003feab8733e911e4efa78f8f51986b3ae8d9b776e299f1eeb70a251d5d428bf72efdf65df7e0455f4218d324711d883f1
|
7
|
+
data.tar.gz: b125e2a27e8f1f0364b589d1a82546fe61f8c8bb40a60eda08eef81d0f4abd40bb0c3b1a54bc673b0532c86c759911f7ecc890d08ad9033fdc9ee8397e826154
|
data/grape-starter.gemspec
CHANGED
@@ -10,7 +10,7 @@ Gem::Specification.new do |spec|
|
|
10
10
|
spec.authors = ['LeFnord']
|
11
11
|
spec.email = ['pscholz.le@gmail.com']
|
12
12
|
|
13
|
-
spec.summary = '
|
13
|
+
spec.summary = 'Creates a Grape Rack skeleton'
|
14
14
|
spec.description = 'CLI to create a API skeleton based on Grape and Rack'
|
15
15
|
spec.homepage = 'https://github.com/LeFnord/grape-starter'
|
16
16
|
spec.license = 'MIT'
|
@@ -22,7 +22,7 @@ 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.3'
|
26
26
|
|
27
27
|
spec.add_dependency 'gli', '~> 2.16'
|
28
28
|
spec.add_dependency 'activesupport', '~> 5.1'
|
data/lib/starter/builder/orms.rb
CHANGED
@@ -4,6 +4,7 @@ module Starter
|
|
4
4
|
class Orms
|
5
5
|
class << self
|
6
6
|
def build(dest, orm)
|
7
|
+
@orm = orm
|
7
8
|
case orm.downcase
|
8
9
|
when 'sequel'
|
9
10
|
require 'starter/builder/templates/sequel'
|
@@ -30,7 +31,7 @@ module Starter
|
|
30
31
|
<<-FILE.strip_heredoc
|
31
32
|
# ActiveRecord Database Configuration
|
32
33
|
development:
|
33
|
-
adapter: '
|
34
|
+
adapter: '#{adapter}'
|
34
35
|
host: localhost
|
35
36
|
port: 27017
|
36
37
|
database: "db/development.sqlite3"
|
@@ -38,7 +39,7 @@ module Starter
|
|
38
39
|
password:
|
39
40
|
|
40
41
|
test:
|
41
|
-
adapter: '
|
42
|
+
adapter: '#{adapter}'
|
42
43
|
host: localhost
|
43
44
|
port: 27017
|
44
45
|
database: "db/test.sqlite3"
|
@@ -46,7 +47,7 @@ module Starter
|
|
46
47
|
password:
|
47
48
|
|
48
49
|
production:
|
49
|
-
adapter: '
|
50
|
+
adapter: '#{adapter}'
|
50
51
|
host: localhost
|
51
52
|
port: 27017
|
52
53
|
database: "db/production.sqlite3"
|
@@ -57,6 +58,10 @@ module Starter
|
|
57
58
|
|
58
59
|
private
|
59
60
|
|
61
|
+
def adapter
|
62
|
+
@orm == 'sequel' ? 'sqlite' : 'sqlite3'
|
63
|
+
end
|
64
|
+
|
60
65
|
def build_initializer(dest)
|
61
66
|
FileUtils.mkdir_p(dest)
|
62
67
|
FileFoo.write_file(File.join(dest, 'database.rb'), initializer)
|
data/lib/starter/version.rb
CHANGED
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: 0.8.
|
4
|
+
version: 0.8.6
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- LeFnord
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2017-11-
|
11
|
+
date: 2017-11-29 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: gli
|
@@ -142,7 +142,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
142
142
|
requirements:
|
143
143
|
- - ">="
|
144
144
|
- !ruby/object:Gem::Version
|
145
|
-
version: 2.
|
145
|
+
version: '2.3'
|
146
146
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
147
147
|
requirements:
|
148
148
|
- - ">="
|
@@ -153,5 +153,5 @@ rubyforge_project:
|
|
153
153
|
rubygems_version: 2.6.13
|
154
154
|
signing_key:
|
155
155
|
specification_version: 4
|
156
|
-
summary:
|
156
|
+
summary: Creates a Grape Rack skeleton
|
157
157
|
test_files: []
|