grape_ape_rails 0.9.6 → 0.9.7

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: e03d7f7a7e36fd329b6dfcb1867b7aee6ef4568e
4
- data.tar.gz: 5a65a3f44ed5e00f819683a7822ac907fe854c49
3
+ metadata.gz: 6c38d5143f2dfadcec3a305dd4c2eafe3b4ed2e2
4
+ data.tar.gz: 9c9652e751f91aa44806c9a0774c2ca0384b3449
5
5
  SHA512:
6
- metadata.gz: 673e12e5793ce6a364bd2558959d35ef211c8ab0f5c14f3bc6c62ddbc38c5cf0be87e26e21dc3a66348cf62b5aee2bd44d8d3f9b7e8a589ed03edec502a156db
7
- data.tar.gz: 21de466677b803289f15941af1626f0aa4f9e2bc64f8f89b0a1a928a32fe63858b26e45c7af63f3b2e415d62ea5d964745f367d079c79e4b8a67435a9a58b5a0
6
+ metadata.gz: 83ae7387d5b330dc57a23380f5ffec25b87a0b6ddddac1da4e3d40cdfdc2f574dd030a1a95ba2bc74ebca9809fffb179c2cf3fb0ce27a3f90f780c252e5a78f7
7
+ data.tar.gz: 5220334028cd94d2fd7f4ba424862fc588fe510bc36cc58aeec77fc1525b837cf874785058a6ed8522cb477db060f892c45e40262680d7e946a8d8ce5245bda6
@@ -29,7 +29,7 @@ Gem::Specification.new do |spec|
29
29
  spec.add_dependency 'grape-active_model_serializers'
30
30
  spec.add_dependency 'http_accept_language'
31
31
  spec.add_dependency 'rabl'
32
- spec.add_dependency 'hashie_rails'
32
+ spec.add_dependency 'hashie-forbidden_attributes'
33
33
 
34
34
  spec.add_development_dependency "rails", "~> 4.1"
35
35
  spec.add_development_dependency "minitest"
@@ -5,6 +5,7 @@ GrapeApeRails.configure do |config|
5
5
  # config.api_header_security_enabled = true
6
6
  # config.api_security_algorithm = "sha256"
7
7
  # config.security_envelope_debug = false
8
+ # config.swagger_documentation = true
8
9
  config.available_locales = %i[ en ]
9
10
  end
10
11
 
@@ -2,7 +2,7 @@ require 'grape'
2
2
  require 'grape-kaminari'
3
3
  require 'grape-rails-cache'
4
4
  require 'swagger/grape_swagger_modified'
5
- require 'hashie_rails' if defined?(::Rails)
5
+ require 'hashie-forbidden_attributes' if defined?(::Rails)
6
6
  require 'http_accept_language'
7
7
  require 'grape_ape_rails/base'
8
8
  require 'grape_ape_rails/handlers/header_versioning'
@@ -49,11 +49,13 @@ module GrapeApeRails
49
49
  yield
50
50
  mount mounts_klass
51
51
  ensure
52
- puts "Swaggering #{api_version} endpoints..."
53
- klass.add_swagger_documentation hide_documentation_path: true,
54
- api_version: api_version.gsub('.','_'),
55
- mount_with_version: true,
56
- mount_path: "/api/docs"
52
+ if GrapeApeRails.configuration.swagger_documentation
53
+ puts "Swaggering #{api_version} endpoints at /api/docs ..."
54
+ klass.add_swagger_documentation hide_documentation_path: true,
55
+ api_version: api_version.gsub('.','_'),
56
+ mount_with_version: true,
57
+ mount_path: "/api/docs"
58
+ end
57
59
  end
58
60
 
59
61
  def API.grape_mount(resource)
@@ -1,3 +1,3 @@
1
1
  module GrapeApeRails
2
- VERSION = "0.9.6"
2
+ VERSION = "0.9.7"
3
3
  end
@@ -39,7 +39,8 @@ module GrapeApeRails
39
39
  class Configuration
40
40
  attr_accessor :app_name, :organization_name,
41
41
  :api_secret_key, :api_header_security_enabled,
42
- :available_locales, :security_envelope_debug
42
+ :available_locales, :security_envelope_debug,
43
+ :swagger_documentation
43
44
 
44
45
  def initialize
45
46
  @app_name = nil
@@ -48,6 +49,7 @@ module GrapeApeRails
48
49
  @api_header_security_enabled = true
49
50
  @api_security_algorithm = "sha256"
50
51
  @available_locales = [ :en ]
52
+ @swagger_documentation = true
51
53
  # ...
52
54
  end
53
55
  end
Binary file
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: grape_ape_rails
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.9.6
4
+ version: 0.9.7
5
5
  platform: ruby
6
6
  authors:
7
7
  - Matt E. Patterson
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-02-21 00:00:00.000000000 Z
11
+ date: 2015-03-27 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activesupport
@@ -165,7 +165,7 @@ dependencies:
165
165
  - !ruby/object:Gem::Version
166
166
  version: '0'
167
167
  - !ruby/object:Gem::Dependency
168
- name: hashie_rails
168
+ name: hashie-forbidden_attributes
169
169
  requirement: !ruby/object:Gem::Requirement
170
170
  requirements:
171
171
  - - ">="