restrict_request_type 1.0.5 → 1.0.6

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 2047e449b7eb40539cb7dc85f56077c2b7978ccb
4
- data.tar.gz: dc281af82c84b55fd439cb8da1996de3396c0335
3
+ metadata.gz: 780b5ee88448b20d59c280d3dde081da6e03061f
4
+ data.tar.gz: 160078298ced645e7ed68d314a557aa7e35e71c0
5
5
  SHA512:
6
- metadata.gz: 5ebe3770e786db077c8fada84566db4e9ab845a14fd7622e96a46244b900487bc8abc22976b2d28a6c13ca67fd6a9bf2ce746b0c67f3a3e3fc726de4b2a9fc7d
7
- data.tar.gz: ada46edec2569013c06e2e983a45862b89a7711ea536c6393dc0db47c4f3d81fc7a22737995314c1ee5af5d801d33dace9e28c0f5b510395b99e079c464c44ce
6
+ metadata.gz: e2709f45bf48cd0a65701b31c7ed8d257ff5632b8bbb9920dc1ab36dfded2f0ee6509267db1d713b7947bc76d9620daf0425a037d19835768fbcdb317de4ce13
7
+ data.tar.gz: f215cc0237c90da0a8f634796384ba3837ea1c0117c51cbde25e25cd65012071a160779abbfb51d507b15a27204c2ad0989d199846f8c27c727edfa370a29cb9
@@ -1,3 +1,3 @@
1
1
  module RestrictRequestType
2
- VERSION = "1.0.5"
2
+ VERSION = "1.0.6"
3
3
  end
@@ -7,7 +7,7 @@ module RestrictRequestType
7
7
  options = defaults.merge options
8
8
 
9
9
  before_filter(only: options[:of]) do |controller|
10
- format = controller.request.format.to_sym
10
+ format = controller.request.format.try(:to_sym)
11
11
  handle_request_with_invalid_format if options[:to].exclude?(format)
12
12
  end
13
13
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: restrict_request_type
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.5
4
+ version: 1.0.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - Unnikrishnan KP
@@ -9,34 +9,34 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2014-04-25 00:00:00.000000000 Z
12
+ date: 2014-05-15 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: bundler
16
16
  requirement: !ruby/object:Gem::Requirement
17
17
  requirements:
18
- - - ~>
18
+ - - "~>"
19
19
  - !ruby/object:Gem::Version
20
20
  version: '1.3'
21
21
  type: :development
22
22
  prerelease: false
23
23
  version_requirements: !ruby/object:Gem::Requirement
24
24
  requirements:
25
- - - ~>
25
+ - - "~>"
26
26
  - !ruby/object:Gem::Version
27
27
  version: '1.3'
28
28
  - !ruby/object:Gem::Dependency
29
29
  name: rake
30
30
  requirement: !ruby/object:Gem::Requirement
31
31
  requirements:
32
- - - '>='
32
+ - - ">="
33
33
  - !ruby/object:Gem::Version
34
34
  version: '0'
35
35
  type: :development
36
36
  prerelease: false
37
37
  version_requirements: !ruby/object:Gem::Requirement
38
38
  requirements:
39
- - - '>='
39
+ - - ">="
40
40
  - !ruby/object:Gem::Version
41
41
  version: '0'
42
42
  description: Allow only specific request formats to a controller action
@@ -47,7 +47,7 @@ executables: []
47
47
  extensions: []
48
48
  extra_rdoc_files: []
49
49
  files:
50
- - .gitignore
50
+ - ".gitignore"
51
51
  - Gemfile
52
52
  - LICENSE.txt
53
53
  - README.md
@@ -65,17 +65,17 @@ require_paths:
65
65
  - lib
66
66
  required_ruby_version: !ruby/object:Gem::Requirement
67
67
  requirements:
68
- - - '>='
68
+ - - ">="
69
69
  - !ruby/object:Gem::Version
70
70
  version: '0'
71
71
  required_rubygems_version: !ruby/object:Gem::Requirement
72
72
  requirements:
73
- - - '>='
73
+ - - ">="
74
74
  - !ruby/object:Gem::Version
75
75
  version: '0'
76
76
  requirements: []
77
77
  rubyforge_project:
78
- rubygems_version: 2.0.5
78
+ rubygems_version: 2.2.2
79
79
  signing_key:
80
80
  specification_version: 4
81
81
  summary: Allow only specific request formats to a controller action