grape-app 0.3.4 → 0.3.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/.editorconfig +9 -0
- data/.travis.yml +7 -0
- data/Gemfile.lock +12 -9
- data/grape-app.gemspec +1 -1
- data/lib/grape/app/initializers/post.rb +3 -2
- data/spec/grape/app_spec.rb +2 -2
- data/spec/scenario/config/environments/{development.rb → test.rb} +1 -1
- data/spec/spec_helper.rb +1 -0
- metadata +6 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 6f036ccb754e375e8aab15cb8f33d7381571db80
|
4
|
+
data.tar.gz: 72eab574e793cd7ca5d0361230b3874612d1072a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a9291cf8eeb48134ffbbcf848bff1e2eec2ea24c4aede43fa4f2878cbcf827503e77d9d6b6d3ccf3c56ac5802ac462bebfff43271700734c7a4744c22abe179f
|
7
|
+
data.tar.gz: a830649d991127605069a8f46ccf5c4bb2817855e78ac3c5a3145dd9834137f1c4a0a9c30392caa51fbd9f6904a821ba4dced474975a759bc8281abf40984914
|
data/.editorconfig
ADDED
data/.travis.yml
ADDED
data/Gemfile.lock
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
grape-app (0.3.
|
4
|
+
grape-app (0.3.5)
|
5
5
|
activesupport
|
6
6
|
activesupport-json_encoder
|
7
7
|
grape
|
@@ -13,7 +13,7 @@ PATH
|
|
13
13
|
GEM
|
14
14
|
remote: https://rubygems.org/
|
15
15
|
specs:
|
16
|
-
activesupport (4.2.
|
16
|
+
activesupport (4.2.4)
|
17
17
|
i18n (~> 0.7)
|
18
18
|
json (~> 1.7, >= 1.7.7)
|
19
19
|
minitest (~> 5.1)
|
@@ -32,7 +32,7 @@ GEM
|
|
32
32
|
thread_safe (~> 0.3, >= 0.3.1)
|
33
33
|
diff-lcs (1.2.5)
|
34
34
|
equalizer (0.0.11)
|
35
|
-
grape (0.
|
35
|
+
grape (0.13.0)
|
36
36
|
activesupport
|
37
37
|
builder
|
38
38
|
hashie (>= 2.1.0)
|
@@ -42,7 +42,7 @@ GEM
|
|
42
42
|
rack-accept
|
43
43
|
rack-mount
|
44
44
|
virtus (>= 1.0.0)
|
45
|
-
grape-entity (0.4.
|
45
|
+
grape-entity (0.4.8)
|
46
46
|
activesupport
|
47
47
|
multi_json (>= 1.3.2)
|
48
48
|
hashie (3.4.2)
|
@@ -51,8 +51,8 @@ GEM
|
|
51
51
|
i18n (0.7.0)
|
52
52
|
ice_nine (0.11.1)
|
53
53
|
json (1.8.3)
|
54
|
-
minitest (5.
|
55
|
-
multi_json (1.11.
|
54
|
+
minitest (5.8.0)
|
55
|
+
multi_json (1.11.2)
|
56
56
|
multi_xml (0.5.5)
|
57
57
|
rack (1.6.4)
|
58
58
|
rack-accept (0.4.5)
|
@@ -65,12 +65,12 @@ GEM
|
|
65
65
|
rspec-core (~> 3.3.0)
|
66
66
|
rspec-expectations (~> 3.3.0)
|
67
67
|
rspec-mocks (~> 3.3.0)
|
68
|
-
rspec-core (3.3.
|
68
|
+
rspec-core (3.3.2)
|
69
69
|
rspec-support (~> 3.3.0)
|
70
|
-
rspec-expectations (3.3.
|
70
|
+
rspec-expectations (3.3.1)
|
71
71
|
diff-lcs (>= 1.2.0, < 2.0)
|
72
72
|
rspec-support (~> 3.3.0)
|
73
|
-
rspec-mocks (3.3.
|
73
|
+
rspec-mocks (3.3.2)
|
74
74
|
diff-lcs (>= 1.2.0, < 2.0)
|
75
75
|
rspec-support (~> 3.3.0)
|
76
76
|
rspec-support (3.3.0)
|
@@ -92,3 +92,6 @@ DEPENDENCIES
|
|
92
92
|
grape-app!
|
93
93
|
rake
|
94
94
|
rspec
|
95
|
+
|
96
|
+
BUNDLED WITH
|
97
|
+
1.10.6
|
data/grape-app.gemspec
CHANGED
@@ -1,12 +1,13 @@
|
|
1
1
|
if Grape::App.config.raise_on_missing_translations
|
2
|
-
handler =
|
2
|
+
handler = lambda {|exception, *| exception = exception.to_exception if exception.respond_to?(:to_exception); raise exception }
|
3
3
|
I18n.exception_handler = handler
|
4
4
|
end
|
5
5
|
|
6
6
|
if defined?(ActiveRecord)
|
7
7
|
require 'yaml'
|
8
|
+
require 'erb'
|
8
9
|
|
9
|
-
configurations = YAML.load(Grape::App.root.join('config', 'database.yml').read)
|
10
|
+
configurations = YAML.load(ERB.new(Grape::App.root.join('config', 'database.yml').read).result)
|
10
11
|
configurations[Grape::App.env.to_s]['url'] = ENV['DATABASE_URL'] if ENV['DATABASE_URL']
|
11
12
|
|
12
13
|
ActiveRecord::Base.configurations = configurations
|
data/spec/grape/app_spec.rb
CHANGED
@@ -7,7 +7,7 @@ RSpec.describe Grape::App do
|
|
7
7
|
|
8
8
|
it 'should have an env' do
|
9
9
|
expect(subject.env).to be_instance_of(ActiveSupport::StringInquirer)
|
10
|
-
expect(subject.env).to eq("
|
10
|
+
expect(subject.env).to eq("test")
|
11
11
|
end
|
12
12
|
|
13
13
|
it 'should have an root' do
|
@@ -30,7 +30,7 @@ RSpec.describe Grape::App do
|
|
30
30
|
|
31
31
|
it 'should read env specific initializers' do
|
32
32
|
expect(subject.config).to eq(
|
33
|
-
|
33
|
+
test_specific: true,
|
34
34
|
raise_on_missing_translations: true,
|
35
35
|
cors_allow_origins: ["example.com"],
|
36
36
|
)
|
data/spec/spec_helper.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: grape-app
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.3.
|
4
|
+
version: 0.3.5
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Black Square Media Ltd
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-
|
11
|
+
date: 2015-09-03 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: grape
|
@@ -158,7 +158,9 @@ executables:
|
|
158
158
|
extensions: []
|
159
159
|
extra_rdoc_files: []
|
160
160
|
files:
|
161
|
+
- ".editorconfig"
|
161
162
|
- ".gitignore"
|
163
|
+
- ".travis.yml"
|
162
164
|
- Gemfile
|
163
165
|
- Gemfile.lock
|
164
166
|
- README.md
|
@@ -193,7 +195,7 @@ files:
|
|
193
195
|
- lib/grape_app.rb
|
194
196
|
- spec/grape/app_spec.rb
|
195
197
|
- spec/scenario/Gemfile
|
196
|
-
- spec/scenario/config/environments/
|
198
|
+
- spec/scenario/config/environments/test.rb
|
197
199
|
- spec/scenario/config/locales/en.yml
|
198
200
|
- spec/scenario/lib/my_lib.rb
|
199
201
|
- spec/spec_helper.rb
|
@@ -224,7 +226,7 @@ summary: Stanalone Grape API apps
|
|
224
226
|
test_files:
|
225
227
|
- spec/grape/app_spec.rb
|
226
228
|
- spec/scenario/Gemfile
|
227
|
-
- spec/scenario/config/environments/
|
229
|
+
- spec/scenario/config/environments/test.rb
|
228
230
|
- spec/scenario/config/locales/en.yml
|
229
231
|
- spec/scenario/lib/my_lib.rb
|
230
232
|
- spec/spec_helper.rb
|