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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 35fda6888b2ff285a76febe526e36ac90c17ab05
4
- data.tar.gz: f82a2dca85ce724bf26b4e68ee66b4c17b518af2
3
+ metadata.gz: 6f036ccb754e375e8aab15cb8f33d7381571db80
4
+ data.tar.gz: 72eab574e793cd7ca5d0361230b3874612d1072a
5
5
  SHA512:
6
- metadata.gz: a5486d18163f99e82cb9dec238aea8d2d0bcb0cd7415b9463229530342dd7521bdbb0a9d81a14fdaf23be3dabb5a0d346decd821aa9cccbdc3aee64b26ac48a2
7
- data.tar.gz: 26abb9bd50d83ecc058b762a20c37dbe6f1f07193586307c31a92fb1c5604e4a85176973e113e182b021420fc2b7a0ada0bc0d94ab953dfe1683b612e55aab53
6
+ metadata.gz: a9291cf8eeb48134ffbbcf848bff1e2eec2ea24c4aede43fa4f2878cbcf827503e77d9d6b6d3ccf3c56ac5802ac462bebfff43271700734c7a4744c22abe179f
7
+ data.tar.gz: a830649d991127605069a8f46ccf5c4bb2817855e78ac3c5a3145dd9834137f1c4a0a9c30392caa51fbd9f6904a821ba4dced474975a759bc8281abf40984914
data/.editorconfig ADDED
@@ -0,0 +1,9 @@
1
+ root = true
2
+
3
+ [*]
4
+ indent_style = space
5
+ indent_size = 2
6
+ end_of_line = lf
7
+ charset = utf-8
8
+ trim_trailing_whitespace = true
9
+ insert_final_newline = true
data/.travis.yml ADDED
@@ -0,0 +1,7 @@
1
+ language: ruby
2
+ rvm:
3
+ - 1.9.3
4
+ - 2.0.0
5
+ - 2.1.4
6
+ - 2.2.1
7
+ - jruby-19mode
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- grape-app (0.3.4)
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.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.12.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.5)
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.7.0)
55
- multi_json (1.11.1)
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.1)
68
+ rspec-core (3.3.2)
69
69
  rspec-support (~> 3.3.0)
70
- rspec-expectations (3.3.0)
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.1)
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
@@ -2,7 +2,7 @@
2
2
 
3
3
  Gem::Specification.new do |s|
4
4
  s.name = 'grape-app'
5
- s.version = '0.3.4'
5
+ s.version = '0.3.5'
6
6
  s.authors = ['Black Square Media Ltd']
7
7
  s.email = ['info@blacksquaremedia.com']
8
8
  s.summary = %{Stanalone Grape API apps}
@@ -1,12 +1,13 @@
1
1
  if Grape::App.config.raise_on_missing_translations
2
- handler = -> (exception, *) { exception = exception.to_exception if exception.respond_to?(:to_exception); raise exception }
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
@@ -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("development")
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
- dev_specific: true,
33
+ test_specific: true,
34
34
  raise_on_missing_translations: true,
35
35
  cors_allow_origins: ["example.com"],
36
36
  )
@@ -1,5 +1,5 @@
1
1
  Grape::App.configure do |c|
2
- c.dev_specific = true
2
+ c.test_specific = true
3
3
  c.raise_on_missing_translations = true
4
4
  c.cors_allow_origins = ['example.com']
5
5
  end
data/spec/spec_helper.rb CHANGED
@@ -1 +1,2 @@
1
+ ENV['RACK_ENV'] ||= "test"
1
2
  require 'grape-app'
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
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-06-22 00:00:00.000000000 Z
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/development.rb
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/development.rb
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