grape-starter 0.8.4 → 0.8.5
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/.travis.yml +2 -3
- data/CHANGELOG.md +6 -0
- data/lib/starter/builder.rb +1 -1
- data/lib/starter/builder/orms.rb +29 -0
- data/lib/starter/builder/templates/activerecord.rb +2 -31
- data/lib/starter/builder/templates/sequel.rb +0 -29
- data/lib/starter/version.rb +1 -1
- data/template/spec/spec_helper.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: ac4a3b4fcc54cc1ab74b2f305b238f008241564c
|
4
|
+
data.tar.gz: 325b939a9e383dfcca234a7218aba8d4bd3a62ab
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 898bbcd8fdb4101bc3b33a7f1bd011d1c3629bd11d8d00e4a44cdfee99f97c217021d849c6456a63914abc23a98c3732cfec5651175806b1c7d0dc97a6e6c2ac
|
7
|
+
data.tar.gz: e0e2c5e4c1370764d9998d224cdf65a82301c17235d76ce93821d4e8678defc4b046df82fd82038ddf61fe8407e35d73d1cbf3f116217bd9708e3a6b9aaf7152
|
data/.travis.yml
CHANGED
data/CHANGELOG.md
CHANGED
@@ -2,6 +2,12 @@
|
|
2
2
|
|
3
3
|
- contributions
|
4
4
|
|
5
|
+
### 0.8.5
|
6
|
+
|
7
|
+
- [cbea8](https://github.com/LeFnord/grape-starter/commit/fa5edb5dc7e0883ff099e297e9cbd5bd5ebcbea8) - DRYs up template code; passes rubocop 0.51.0
|
8
|
+
|
9
|
+
- [6bbe7](https://github.com/LeFnord/grape-starter/commit/a224b5d8dfa001cb1e8dec3b1a1e28fc9826bbe7) - avoids overriding of dev db by running specs; fixes syntox error
|
10
|
+
|
5
11
|
### 0.8.4
|
6
12
|
|
7
13
|
- [d8e13](https://github.com/LeFnord/grape-starter/commit/1f5faef958799704163b7db25db07c569cad8e13) -
|
data/lib/starter/builder.rb
CHANGED
data/lib/starter/builder/orms.rb
CHANGED
@@ -26,6 +26,35 @@ module Starter
|
|
26
26
|
Starter::Config.save(dest: dest, content: { orm: orm.downcase })
|
27
27
|
end
|
28
28
|
|
29
|
+
def config
|
30
|
+
<<-FILE.strip_heredoc
|
31
|
+
# ActiveRecord Database Configuration
|
32
|
+
development:
|
33
|
+
adapter: 'sqlite3'
|
34
|
+
host: localhost
|
35
|
+
port: 27017
|
36
|
+
database: "db/development.sqlite3"
|
37
|
+
username:
|
38
|
+
password:
|
39
|
+
|
40
|
+
test:
|
41
|
+
adapter: 'sqlite3'
|
42
|
+
host: localhost
|
43
|
+
port: 27017
|
44
|
+
database: "db/test.sqlite3"
|
45
|
+
username:
|
46
|
+
password:
|
47
|
+
|
48
|
+
production:
|
49
|
+
adapter: 'sqlite3'
|
50
|
+
host: localhost
|
51
|
+
port: 27017
|
52
|
+
database: "db/production.sqlite3"
|
53
|
+
username:
|
54
|
+
password:
|
55
|
+
FILE
|
56
|
+
end
|
57
|
+
|
29
58
|
private
|
30
59
|
|
31
60
|
def build_initializer(dest)
|
@@ -21,7 +21,7 @@ module Starter
|
|
21
21
|
ActiveRecord::Base.establish_connection db_conf[env]
|
22
22
|
logger = if %w[development test].include? env
|
23
23
|
log_dir = File.join(Dir.getwd, 'log')
|
24
|
-
log_file = File.join(log_dir, 'db.log')
|
24
|
+
log_file = File.join(log_dir, 'db.log')
|
25
25
|
FileUtils.mkdir(log_dir) unless Dir.exist?(log_dir)
|
26
26
|
Logger.new(File.open(log_file, 'a'))
|
27
27
|
else
|
@@ -46,7 +46,7 @@ module Starter
|
|
46
46
|
end
|
47
47
|
|
48
48
|
return response
|
49
|
-
rescue
|
49
|
+
rescue StandardError
|
50
50
|
ActiveRecord::Base.clear_active_connections!
|
51
51
|
raise
|
52
52
|
end
|
@@ -56,35 +56,6 @@ module Starter
|
|
56
56
|
FILE
|
57
57
|
end
|
58
58
|
|
59
|
-
def config # TODO: Dry (Same config for Sequel)
|
60
|
-
<<-FILE.strip_heredoc
|
61
|
-
# ActiveRecord Database Configuration
|
62
|
-
development:
|
63
|
-
adapter: 'sqlite3'
|
64
|
-
host: localhost
|
65
|
-
port: 27017
|
66
|
-
database: "db/development.sqlite3"
|
67
|
-
username:
|
68
|
-
password:
|
69
|
-
|
70
|
-
test:
|
71
|
-
adapter: 'sqlite3'
|
72
|
-
host: localhost
|
73
|
-
port: 27017
|
74
|
-
database: "db/test.sqlite3"
|
75
|
-
username:
|
76
|
-
password:
|
77
|
-
|
78
|
-
production:
|
79
|
-
adapter: 'sqlite3'
|
80
|
-
host: localhost
|
81
|
-
port: 27017
|
82
|
-
database: "db/production.sqlite3"
|
83
|
-
username:
|
84
|
-
password:
|
85
|
-
FILE
|
86
|
-
end
|
87
|
-
|
88
59
|
def rakefile
|
89
60
|
<<-FILE.strip_heredoc
|
90
61
|
# ActiveRecord DB tasks
|
@@ -37,35 +37,6 @@ module Starter
|
|
37
37
|
FILE
|
38
38
|
end
|
39
39
|
|
40
|
-
def config
|
41
|
-
<<-FILE.strip_heredoc
|
42
|
-
# Sequel Database Configuration
|
43
|
-
development:
|
44
|
-
adapter: 'sqlite'
|
45
|
-
host: localhost
|
46
|
-
port: 27017
|
47
|
-
database: "db/development.sqlite3"
|
48
|
-
username:
|
49
|
-
password:
|
50
|
-
|
51
|
-
test:
|
52
|
-
adapter: 'sqlite'
|
53
|
-
host: localhost
|
54
|
-
port: 27017
|
55
|
-
database: "db/test.sqlite3"
|
56
|
-
username:
|
57
|
-
password:
|
58
|
-
|
59
|
-
production:
|
60
|
-
adapter: 'sqlite'
|
61
|
-
host: localhost
|
62
|
-
port: 27017
|
63
|
-
database: "db/production.sqlite3"
|
64
|
-
username:
|
65
|
-
password:
|
66
|
-
FILE
|
67
|
-
end
|
68
|
-
|
69
40
|
def rakefile
|
70
41
|
<<-FILE.strip_heredoc
|
71
42
|
# Sequel migration tasks
|
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.5
|
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
|
+
date: 2017-11-03 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: gli
|
@@ -150,7 +150,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
150
150
|
version: '0'
|
151
151
|
requirements: []
|
152
152
|
rubyforge_project:
|
153
|
-
rubygems_version: 2.6.
|
153
|
+
rubygems_version: 2.6.13
|
154
154
|
signing_key:
|
155
155
|
specification_version: 4
|
156
156
|
summary: Create a Grape Rack skeleton
|