api-auth 0.9.2 → 0.9.3

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- api_auth (0.9.2)
4
+ api-auth (0.9.3)
5
5
 
6
6
  GEM
7
7
  remote: http://rubygems.org/
@@ -12,9 +12,7 @@ GEM
12
12
  activeresource (2.3.14)
13
13
  activesupport (= 2.3.14)
14
14
  activesupport (2.3.14)
15
- amatch (0.2.10)
16
- tins (~> 0.3)
17
- curb (0.7.18)
15
+ curb (0.8.1)
18
16
  diff-lcs (1.1.3)
19
17
  mime-types (1.17.2)
20
18
  rack (1.1.3)
@@ -28,7 +26,6 @@ GEM
28
26
  rspec-expectations (2.4.0)
29
27
  diff-lcs (~> 1.1.2)
30
28
  rspec-mocks (2.4.0)
31
- tins (0.3.9)
32
29
 
33
30
  PLATFORMS
34
31
  ruby
@@ -37,8 +34,7 @@ DEPENDENCIES
37
34
  actionpack (~> 2.3.2)
38
35
  activeresource (~> 2.3.2)
39
36
  activesupport (~> 2.3.2)
40
- amatch (~> 0.2.10)
41
- api_auth!
42
- curb (~> 0.7.7)
37
+ api-auth!
38
+ curb (~> 0.8.1)
43
39
  rest-client (~> 1.6.0)
44
40
  rspec (~> 2.4.0)
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.9.2
1
+ 0.9.3
@@ -11,12 +11,11 @@ Gem::Specification.new do |s|
11
11
  s.email = "mauricio@edge14.com"
12
12
 
13
13
  s.add_development_dependency "rspec", "~> 2.4.0"
14
- s.add_development_dependency "amatch", "~> 0.2.10"
15
14
  s.add_development_dependency "actionpack", "~> 2.3.2"
16
15
  s.add_development_dependency "activesupport", "~> 2.3.2"
17
16
  s.add_development_dependency "activeresource", "~> 2.3.2"
18
17
  s.add_development_dependency "rest-client", "~> 1.6.0"
19
- s.add_development_dependency "curb", "~> 0.7.7"
18
+ s.add_development_dependency "curb", "~> 0.8.1"
20
19
 
21
20
  s.files = `git ls-files`.split("\n")
22
21
  s.test_files = `git ls-files -- {test,spec,features}/*`.split("\n")
@@ -18,7 +18,11 @@ module ApiAuth
18
18
  when /ActionController::Request/
19
19
  @request = ActionControllerRequest.new(request)
20
20
  when /ActionController::TestRequest/
21
- @request = ActionControllerRequest.new(request)
21
+ if defined?(ActionDispatch)
22
+ @request = ActionDispatchRequest.new(request)
23
+ else
24
+ @request = ActionControllerRequest.new(request)
25
+ end
22
26
  when /ActionDispatch::Request/
23
27
  @request = ActionDispatchRequest.new(request)
24
28
  else
@@ -25,7 +25,7 @@ module ApiAuth
25
25
  gem 'activesupport'
26
26
  require 'action_controller'
27
27
  require 'active_support'
28
- rescue
28
+ rescue LoadError
29
29
  nil
30
30
  end
31
31
  end
@@ -42,10 +42,17 @@ module ApiAuth
42
42
 
43
43
  def self.included(base)
44
44
  base.extend(ClassMethods)
45
+
46
+ if base.respond_to?('class_attribute')
47
+ base.class_attribute :hmac_access_id
48
+ base.class_attribute :hmac_secret_key
49
+ base.class_attribute :use_hmac
50
+ else
51
+ base.class_inheritable_accessor :hmac_access_id
52
+ base.class_inheritable_accessor :hmac_secret_key
53
+ base.class_inheritable_accessor :use_hmac
54
+ end
45
55
 
46
- base.class_inheritable_accessor :hmac_access_id
47
- base.class_inheritable_accessor :hmac_secret_key
48
- base.class_inheritable_accessor :use_hmac
49
56
  end
50
57
 
51
58
  module ClassMethods
@@ -103,7 +110,7 @@ module ApiAuth
103
110
  require 'rubygems'
104
111
  gem 'activeresource'
105
112
  require 'active_resource'
106
- rescue
113
+ rescue LoadError
107
114
  nil
108
115
  end
109
116
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: api-auth
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.9.2
4
+ version: 0.9.3
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,11 +9,11 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2012-03-08 00:00:00.000000000 Z
12
+ date: 2012-08-15 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: rspec
16
- requirement: &70291317916400 !ruby/object:Gem::Requirement
16
+ requirement: !ruby/object:Gem::Requirement
17
17
  none: false
18
18
  requirements:
19
19
  - - ~>
@@ -21,21 +21,15 @@ dependencies:
21
21
  version: 2.4.0
22
22
  type: :development
23
23
  prerelease: false
24
- version_requirements: *70291317916400
25
- - !ruby/object:Gem::Dependency
26
- name: amatch
27
- requirement: &70291317915760 !ruby/object:Gem::Requirement
24
+ version_requirements: !ruby/object:Gem::Requirement
28
25
  none: false
29
26
  requirements:
30
27
  - - ~>
31
28
  - !ruby/object:Gem::Version
32
- version: 0.2.10
33
- type: :development
34
- prerelease: false
35
- version_requirements: *70291317915760
29
+ version: 2.4.0
36
30
  - !ruby/object:Gem::Dependency
37
31
  name: actionpack
38
- requirement: &70291317915220 !ruby/object:Gem::Requirement
32
+ requirement: !ruby/object:Gem::Requirement
39
33
  none: false
40
34
  requirements:
41
35
  - - ~>
@@ -43,10 +37,15 @@ dependencies:
43
37
  version: 2.3.2
44
38
  type: :development
45
39
  prerelease: false
46
- version_requirements: *70291317915220
40
+ version_requirements: !ruby/object:Gem::Requirement
41
+ none: false
42
+ requirements:
43
+ - - ~>
44
+ - !ruby/object:Gem::Version
45
+ version: 2.3.2
47
46
  - !ruby/object:Gem::Dependency
48
47
  name: activesupport
49
- requirement: &70291317914540 !ruby/object:Gem::Requirement
48
+ requirement: !ruby/object:Gem::Requirement
50
49
  none: false
51
50
  requirements:
52
51
  - - ~>
@@ -54,10 +53,15 @@ dependencies:
54
53
  version: 2.3.2
55
54
  type: :development
56
55
  prerelease: false
57
- version_requirements: *70291317914540
56
+ version_requirements: !ruby/object:Gem::Requirement
57
+ none: false
58
+ requirements:
59
+ - - ~>
60
+ - !ruby/object:Gem::Version
61
+ version: 2.3.2
58
62
  - !ruby/object:Gem::Dependency
59
63
  name: activeresource
60
- requirement: &70291317913500 !ruby/object:Gem::Requirement
64
+ requirement: !ruby/object:Gem::Requirement
61
65
  none: false
62
66
  requirements:
63
67
  - - ~>
@@ -65,10 +69,15 @@ dependencies:
65
69
  version: 2.3.2
66
70
  type: :development
67
71
  prerelease: false
68
- version_requirements: *70291317913500
72
+ version_requirements: !ruby/object:Gem::Requirement
73
+ none: false
74
+ requirements:
75
+ - - ~>
76
+ - !ruby/object:Gem::Version
77
+ version: 2.3.2
69
78
  - !ruby/object:Gem::Dependency
70
79
  name: rest-client
71
- requirement: &70291317912540 !ruby/object:Gem::Requirement
80
+ requirement: !ruby/object:Gem::Requirement
72
81
  none: false
73
82
  requirements:
74
83
  - - ~>
@@ -76,18 +85,28 @@ dependencies:
76
85
  version: 1.6.0
77
86
  type: :development
78
87
  prerelease: false
79
- version_requirements: *70291317912540
88
+ version_requirements: !ruby/object:Gem::Requirement
89
+ none: false
90
+ requirements:
91
+ - - ~>
92
+ - !ruby/object:Gem::Version
93
+ version: 1.6.0
80
94
  - !ruby/object:Gem::Dependency
81
95
  name: curb
82
- requirement: &70291317911220 !ruby/object:Gem::Requirement
96
+ requirement: !ruby/object:Gem::Requirement
83
97
  none: false
84
98
  requirements:
85
99
  - - ~>
86
100
  - !ruby/object:Gem::Version
87
- version: 0.7.7
101
+ version: 0.8.1
88
102
  type: :development
89
103
  prerelease: false
90
- version_requirements: *70291317911220
104
+ version_requirements: !ruby/object:Gem::Requirement
105
+ none: false
106
+ requirements:
107
+ - - ~>
108
+ - !ruby/object:Gem::Version
109
+ version: 0.8.1
91
110
  description: Full HMAC auth implementation for use in your gems and Rails apps.
92
111
  email: mauricio@edge14.com
93
112
  executables: []
@@ -143,7 +162,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
143
162
  version: '0'
144
163
  requirements: []
145
164
  rubyforge_project:
146
- rubygems_version: 1.8.16
165
+ rubygems_version: 1.8.24
147
166
  signing_key:
148
167
  specification_version: 3
149
168
  summary: Simple HMAC authentication for your APIs