gris 0.5.3 → 0.5.4

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: ba36f4e2e607cba06f2812fa378d65f8757f158f
4
- data.tar.gz: a69a898390400d437e5c96d5b486835ce3e94b75
3
+ metadata.gz: 2f18df032b26b058792ef0126cd1804e521e8069
4
+ data.tar.gz: 96a39de8380c363ce3021c6f1334a203dc4d6623
5
5
  SHA512:
6
- metadata.gz: a99a3dbf8338aeb8a3897c468e7f800c08d83fbb7ee638f9e730634579bf04b6e42a9753f0ec3fc05b8e5f54e14457c0c084ca8413d62f9d120eae0c887401e9
7
- data.tar.gz: 6c367e60923c73d404b0ff51238bf30c5367c35f2c75efc0443b7d79f7d8f00472555262d0c56cb25e75ded3c15b7f39c8e59d920fb8109ceeab6039d709f5b2
6
+ metadata.gz: bb2d11765da753b182bdbe99b10c3821e2eb3395740a0f98c6ed71b54e2fa48b7795d5131c7d44ccb2d88cfccdf2711fc6f6bf89c769cd7475892dee977e0c5d
7
+ data.tar.gz: 9f8603b80f808921782d336b1f094c96fa2b9aa9256b6524589a50499233f05eaf70cc01b8237ef102a4350dd26fada60cda586d4dccb923f1514ae45c3c55cb
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- gris (0.5.3)
4
+ gris (0.5.4)
5
5
  activesupport (~> 4.2, >= 4.2.0)
6
6
  chronic (~> 0.10.0)
7
7
  dalli (~> 2.7)
@@ -187,3 +187,6 @@ DEPENDENCIES
187
187
  hyperclient
188
188
  rspec (~> 3.3)
189
189
  rubocop
190
+
191
+ BUNDLED WITH
192
+ 1.10.6
@@ -1,7 +1,6 @@
1
1
  .DS_Store
2
2
  .env
3
3
  .rspec
4
- .env
5
4
  .env.*
6
5
  !log/.keep
7
6
  log/*
@@ -2,6 +2,7 @@ class ApplicationEndpoint < Grape::API
2
2
  format :json
3
3
  formatter :json, Grape::Formatter::Roar
4
4
  content_type :json, 'application/hal+json'
5
+ cascade true
5
6
 
6
7
  desc 'Get the Root API Endpoint'
7
8
  get do
@@ -1,5 +1,5 @@
1
1
  module Gris
2
- VERSION = '0.5.3'
2
+ VERSION = '0.5.4'
3
3
 
4
4
  class Version
5
5
  class << self
@@ -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.3
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-06 00:00:00.000000000 Z
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