lockbox_middleware 1.4.2 → 1.5.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,3 +1,5 @@
1
+ require 'rubygems'
2
+ gem 'dnclabs-httparty'
1
3
  require 'httparty'
2
4
  require 'lockbox_cache'
3
5
  require 'digest/md5'
@@ -21,6 +23,7 @@ class LockBox
21
23
  environment ||= 'test'
22
24
  if !environment.nil?
23
25
  if !yaml_config['all'].nil?
26
+ $stderr.puts "The 'all' environment is deprecated in lockbox.yml; use built-in yaml convention instead."
24
27
  return_config = yaml_config['all']
25
28
  return_config.merge!(yaml_config[environment])
26
29
  else
@@ -12,12 +12,12 @@ describe 'LockBox' do
12
12
  LockBox.new(Proc.new {|env| [200,{'Content-Type' => 'text/plain'},["successfully hit rails app"]]})
13
13
  end
14
14
 
15
- def safely_edit_config_file(settings, env=nil)
15
+ def safely_edit_config_file(settings)
16
16
  Object.class_eval do
17
17
  remove_const LockBox.to_s if const_defined? :LockBox
18
18
  end
19
19
 
20
- env ||= Rails.env if defined?(Rails)
20
+ env = Rails.env if defined?(Rails)
21
21
  env ||= ENV['RACK_ENV']
22
22
  env ||= 'test'
23
23
  @config_file = File.join(File.dirname(__FILE__),'..','..','config','lockbox.yml')
@@ -54,7 +54,7 @@ describe 'LockBox' do
54
54
  let(:path3) { "/lookup/?$" }
55
55
 
56
56
  before :each do
57
- safely_edit_config_file({:protect_paths => [path1, path2, path3]}, 'all')
57
+ safely_edit_config_file({:protect_paths => [path1, path2, path3]})
58
58
  successful_response = mock("MockResponse")
59
59
  successful_response.stubs(:code).returns(200)
60
60
  successful_response.stubs(:headers).returns({'Cache-Control' => 'public,no-cache'})
metadata CHANGED
@@ -5,9 +5,9 @@ version: !ruby/object:Gem::Version
5
5
  prerelease: false
6
6
  segments:
7
7
  - 1
8
- - 4
9
- - 2
10
- version: 1.4.2
8
+ - 5
9
+ - 0
10
+ version: 1.5.0
11
11
  platform: ruby
12
12
  authors:
13
13
  - Chris Gill
@@ -19,13 +19,45 @@ autorequire:
19
19
  bindir: bin
20
20
  cert_chain: []
21
21
 
22
- date: 2010-08-26 00:00:00 -04:00
22
+ date: 2010-12-28 00:00:00 -06:00
23
23
  default_executable:
24
24
  dependencies:
25
25
  - !ruby/object:Gem::Dependency
26
- name: httparty
26
+ name: rails
27
27
  prerelease: false
28
28
  requirement: &id001 !ruby/object:Gem::Requirement
29
+ none: false
30
+ requirements:
31
+ - - "="
32
+ - !ruby/object:Gem::Version
33
+ hash: 19
34
+ segments:
35
+ - 2
36
+ - 3
37
+ - 8
38
+ version: 2.3.8
39
+ type: :runtime
40
+ version_requirements: *id001
41
+ - !ruby/object:Gem::Dependency
42
+ name: rack
43
+ prerelease: false
44
+ requirement: &id002 !ruby/object:Gem::Requirement
45
+ none: false
46
+ requirements:
47
+ - - "="
48
+ - !ruby/object:Gem::Version
49
+ hash: 19
50
+ segments:
51
+ - 1
52
+ - 1
53
+ - 0
54
+ version: 1.1.0
55
+ type: :runtime
56
+ version_requirements: *id002
57
+ - !ruby/object:Gem::Dependency
58
+ name: dnclabs-auth-hmac
59
+ prerelease: false
60
+ requirement: &id003 !ruby/object:Gem::Requirement
29
61
  none: false
30
62
  requirements:
31
63
  - - ">="
@@ -35,7 +67,119 @@ dependencies:
35
67
  - 0
36
68
  version: "0"
37
69
  type: :runtime
38
- version_requirements: *id001
70
+ version_requirements: *id003
71
+ - !ruby/object:Gem::Dependency
72
+ name: dnclabs-httparty
73
+ prerelease: false
74
+ requirement: &id004 !ruby/object:Gem::Requirement
75
+ none: false
76
+ requirements:
77
+ - - ">="
78
+ - !ruby/object:Gem::Version
79
+ hash: 3
80
+ segments:
81
+ - 0
82
+ version: "0"
83
+ type: :runtime
84
+ version_requirements: *id004
85
+ - !ruby/object:Gem::Dependency
86
+ name: net-ssh
87
+ prerelease: false
88
+ requirement: &id005 !ruby/object:Gem::Requirement
89
+ none: false
90
+ requirements:
91
+ - - ">="
92
+ - !ruby/object:Gem::Version
93
+ hash: 3
94
+ segments:
95
+ - 0
96
+ version: "0"
97
+ type: :runtime
98
+ version_requirements: *id005
99
+ - !ruby/object:Gem::Dependency
100
+ name: pg
101
+ prerelease: false
102
+ requirement: &id006 !ruby/object:Gem::Requirement
103
+ none: false
104
+ requirements:
105
+ - - ">="
106
+ - !ruby/object:Gem::Version
107
+ hash: 3
108
+ segments:
109
+ - 0
110
+ version: "0"
111
+ type: :runtime
112
+ version_requirements: *id006
113
+ - !ruby/object:Gem::Dependency
114
+ name: paperclip
115
+ prerelease: false
116
+ requirement: &id007 !ruby/object:Gem::Requirement
117
+ none: false
118
+ requirements:
119
+ - - ">="
120
+ - !ruby/object:Gem::Version
121
+ hash: 3
122
+ segments:
123
+ - 0
124
+ version: "0"
125
+ type: :runtime
126
+ version_requirements: *id007
127
+ - !ruby/object:Gem::Dependency
128
+ name: authlogic
129
+ prerelease: false
130
+ requirement: &id008 !ruby/object:Gem::Requirement
131
+ none: false
132
+ requirements:
133
+ - - ">="
134
+ - !ruby/object:Gem::Version
135
+ hash: 3
136
+ segments:
137
+ - 0
138
+ version: "0"
139
+ type: :runtime
140
+ version_requirements: *id008
141
+ - !ruby/object:Gem::Dependency
142
+ name: ruby-debug
143
+ prerelease: false
144
+ requirement: &id009 !ruby/object:Gem::Requirement
145
+ none: false
146
+ requirements:
147
+ - - ">="
148
+ - !ruby/object:Gem::Version
149
+ hash: 3
150
+ segments:
151
+ - 0
152
+ version: "0"
153
+ type: :development
154
+ version_requirements: *id009
155
+ - !ruby/object:Gem::Dependency
156
+ name: jeweler
157
+ prerelease: false
158
+ requirement: &id010 !ruby/object:Gem::Requirement
159
+ none: false
160
+ requirements:
161
+ - - ">="
162
+ - !ruby/object:Gem::Version
163
+ hash: 3
164
+ segments:
165
+ - 0
166
+ version: "0"
167
+ type: :development
168
+ version_requirements: *id010
169
+ - !ruby/object:Gem::Dependency
170
+ name: dnclabs-httparty
171
+ prerelease: false
172
+ requirement: &id011 !ruby/object:Gem::Requirement
173
+ none: false
174
+ requirements:
175
+ - - ">="
176
+ - !ruby/object:Gem::Version
177
+ hash: 3
178
+ segments:
179
+ - 0
180
+ version: "0"
181
+ type: :runtime
182
+ version_requirements: *id011
39
183
  description: Rack middleware for the LockBox centralized API authorization service. Brought to you by the DNC Innovation Lab.
40
184
  email: innovationlab@dnc.org
41
185
  executables: []
@@ -50,8 +194,8 @@ files:
50
194
  - lib/lockbox_middleware.rb
51
195
  - LICENSE
52
196
  - README.rdoc
53
- - spec/lib/lockbox_middleware_spec.rb
54
197
  - spec/lib/lockbox_cache_spec.rb
198
+ - spec/lib/lockbox_middleware_spec.rb
55
199
  - spec/spec.opts
56
200
  - spec/spec_helper.rb
57
201
  - spec/support/helper_methods.rb
@@ -61,8 +205,8 @@ homepage: http://github.com/dnclabs/lockbox
61
205
  licenses: []
62
206
 
63
207
  post_install_message:
64
- rdoc_options:
65
- - --charset=UTF-8
208
+ rdoc_options: []
209
+
66
210
  require_paths:
67
211
  - lib
68
212
  required_ruby_version: !ruby/object:Gem::Requirement
@@ -91,8 +235,8 @@ signing_key:
91
235
  specification_version: 3
92
236
  summary: Rack middleware for the LockBox centralized API authorization service.
93
237
  test_files:
94
- - spec/lib/lockbox_middleware_spec.rb
95
238
  - spec/lib/lockbox_cache_spec.rb
239
+ - spec/lib/lockbox_middleware_spec.rb
96
240
  - spec/spec.opts
97
241
  - spec/spec_helper.rb
98
242
  - spec/support/helper_methods.rb