gris 0.5.3 → 0.5.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +4 -1
- data/lib/gris/generators/templates/scaffold/.gitignore.tt +0 -1
- data/lib/gris/generators/templates/scaffold/app/endpoints/application_endpoint.rb +1 -0
- data/lib/gris/version.rb +1 -1
- data/spec/generators/scaffold_generator_spec.rb +4 -0
- data/spec/integration/application_accept_content_types_spec.rb +14 -0
- metadata +4 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 2f18df032b26b058792ef0126cd1804e521e8069
|
4
|
+
data.tar.gz: 96a39de8380c363ce3021c6f1334a203dc4d6623
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: bb2d11765da753b182bdbe99b10c3821e2eb3395740a0f98c6ed71b54e2fa48b7795d5131c7d44ccb2d88cfccdf2711fc6f6bf89c769cd7475892dee977e0c5d
|
7
|
+
data.tar.gz: 9f8603b80f808921782d336b1f094c96fa2b9aa9256b6524589a50499233f05eaf70cc01b8237ef102a4350dd26fada60cda586d4dccb923f1514ae45c3c55cb
|
data/Gemfile.lock
CHANGED
data/lib/gris/version.rb
CHANGED
@@ -93,6 +93,10 @@ describe Gris::Generators::ScaffoldGenerator do
|
|
93
93
|
expect(application_api_file).to include "content_type :json, 'application/hal+json'"
|
94
94
|
end
|
95
95
|
|
96
|
+
it 'the application endpoint enables cascading' do
|
97
|
+
expect(application_api_file).to include 'cascade true'
|
98
|
+
end
|
99
|
+
|
96
100
|
it 'mounts the RootPresenter' do
|
97
101
|
expect(application_api_file).to match(/present self, with: RootPresenter/)
|
98
102
|
end
|
@@ -0,0 +1,14 @@
|
|
1
|
+
require 'spec_helper'
|
2
|
+
require 'faraday'
|
3
|
+
|
4
|
+
describe 'cascade api versions' do
|
5
|
+
include_context 'with a generated app'
|
6
|
+
|
7
|
+
it 'returns a the default content_type' do
|
8
|
+
request = Faraday.get "http://localhost:#{app_port}/", {}, 'Accept' => 'vnd.bogus-v2+json'
|
9
|
+
expect(request.to_hash[:response_headers]['content-type']).to eq(
|
10
|
+
'application/hal+json'
|
11
|
+
)
|
12
|
+
expect(request.status).to eq 200
|
13
|
+
end
|
14
|
+
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: gris
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.5.
|
4
|
+
version: 0.5.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Dylan Fareed
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-09-
|
11
|
+
date: 2015-09-14 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: thor
|
@@ -390,6 +390,7 @@ files:
|
|
390
390
|
- spec/grape_extensions/date_time_helpers_spec.rb
|
391
391
|
- spec/grape_extensions/error_helpers_spec.rb
|
392
392
|
- spec/identity_spec.rb
|
393
|
+
- spec/integration/application_accept_content_types_spec.rb
|
393
394
|
- spec/integration/application_error_response_spec.rb
|
394
395
|
- spec/middleware/error_handlers_spec.rb
|
395
396
|
- spec/output_formatters/presenter_link_helpers_spec.rb
|
@@ -437,6 +438,7 @@ test_files:
|
|
437
438
|
- spec/grape_extensions/date_time_helpers_spec.rb
|
438
439
|
- spec/grape_extensions/error_helpers_spec.rb
|
439
440
|
- spec/identity_spec.rb
|
441
|
+
- spec/integration/application_accept_content_types_spec.rb
|
440
442
|
- spec/integration/application_error_response_spec.rb
|
441
443
|
- spec/middleware/error_handlers_spec.rb
|
442
444
|
- spec/output_formatters/presenter_link_helpers_spec.rb
|