rack-simple_auth 1.0.0 → 1.0.1

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
- ---
2
- SHA1:
3
- metadata.gz: 40096c8f67c41259b34e662419464350f2ccaea7
4
- data.tar.gz: 1ee42ec21e3b7defd704872cb5752ed02451f7a6
5
- SHA512:
6
- metadata.gz: 8a87664b0113fcc0ec50bb4256c24bda3e04c19bc8ba9f1066f02623bf274878ee8df5ebed5038031da010c5c18c806c8c7788a882a4d58c0718980c44e0ba84
7
- data.tar.gz: b1033d3210ceccaf16cce58fc5e89f8c97fe3457fd6349c82fd81ef52404382ccc7812bc81eaea274050cf669fcb9887dc7102df6ab54082fd5c0d4c8be7317f
1
+ ---
2
+ SHA1:
3
+ metadata.gz: b292b620827a52e32d62b15027cad1d4a14c73d2
4
+ data.tar.gz: b78e47f4f8ecf282c030f784414e678320a1a5a9
5
+ SHA512:
6
+ metadata.gz: 4c3003c442e1f644b2d1b65e74121e8e0d00896c851a389c30474bf5aadce6ea786ec6c4e61d11034d5183f8379c60c29a5343ff02beb4b70264c878be15ce6a
7
+ data.tar.gz: 34a602e7ed297d971bfcd98de0324e0df70aa089f6edb8c33cc859234451785f6cdae2c8eba00d99ac3b26e1f4157641a4c1ae7e5626eb6b5c4e0daaac6ca6ec
@@ -184,22 +184,20 @@ module Rack
184
184
  # (Rack::SimpleAuth::Logger.log has IO action, i think there are some performance issues)
185
185
  #
186
186
  def log
187
- if @config.logpath
188
- msg = "#{Time.new} - #{@request.request_method} #{@request.path} - 400 Unauthorized\n"
189
- msg << "HTTP_AUTHORIZATION: #{@request.env['HTTP_AUTHORIZATION']}\n"
190
- msg << "Auth Message Config: #{@config.request_config[@request.request_method]}\n"
191
-
192
- if @allowed_messages
193
- msg << "Allowed Encrypted Messages:\n"
194
- @allowed_messages.each do |hash|
195
- msg << "#{hash}\n"
196
- end
187
+ msg = "#{Time.new} - #{@request.request_method} #{@request.path} - 400 Unauthorized\n"
188
+ msg << "HTTP_AUTHORIZATION: #{@request.env['HTTP_AUTHORIZATION']}\n"
189
+ msg << "Auth Message Config: #{@config.request_config[@request.request_method]}\n"
190
+
191
+ if @allowed_messages
192
+ msg << "Allowed Encrypted Messages:\n"
193
+ @allowed_messages.each do |hash|
194
+ msg << "#{hash}\n"
197
195
  end
196
+ end
198
197
 
199
- msg << "Auth Signature: #{@config.signature}"
198
+ msg << "Auth Signature: #{@config.signature}"
200
199
 
201
- Rack::SimpleAuth::Logger.log(@config.logpath, @config.verbose, ENV['RACK_ENV'], msg)
202
- end
200
+ Rack::SimpleAuth::Logger.log(@config.logpath, @config.verbose, ENV['RACK_ENV'], msg)
203
201
  end
204
202
  end # Middleware
205
203
  end # HMAC
@@ -10,10 +10,12 @@ module Rack
10
10
  # @param [TrueClass|FalseClass] verbose [if true print to stdout]
11
11
  # @param [String] msg [Message defined by each Authorization class]
12
12
  #
13
- def self.log(logpath, verbose = false, env, msg)
14
- system("mkdir #{logpath}") unless Dir.exist?("#{logpath}")
15
- open("#{logpath}/#{env}_error.log", 'a') do |f|
16
- f << "#{msg}\n"
13
+ def self.log(logpath, verbose, env, msg)
14
+ if logpath
15
+ system("mkdir #{logpath}") unless Dir.exist?("#{logpath}")
16
+ open("#{logpath}/#{env}_error.log", 'a') do |f|
17
+ f << "#{msg}\n"
18
+ end
17
19
  end
18
20
 
19
21
  puts msg if verbose
@@ -2,6 +2,6 @@ module Rack
2
2
  # Module which Contains different Authorization / Authentication Classes (HMAC, ..)
3
3
  module SimpleAuth
4
4
  # Current Gem Version
5
- VERSION = '1.0.0'
5
+ VERSION = '1.0.1'
6
6
  end
7
7
  end
metadata CHANGED
@@ -1,77 +1,92 @@
1
- --- !ruby/object:Gem::Specification
1
+ --- !ruby/object:Gem::Specification
2
2
  name: rack-simple_auth
3
- version: !ruby/object:Gem::Version
4
- version: 1.0.0
3
+ version: !ruby/object:Gem::Version
4
+ version: 1.0.1
5
5
  platform: ruby
6
- authors:
6
+ authors:
7
7
  - Benny1992
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
-
12
- date: 2014-04-30 00:00:00 Z
13
- dependencies:
14
- - !ruby/object:Gem::Dependency
11
+ date: 2014-04-30 00:00:00.000000000 Z
12
+ dependencies:
13
+ - !ruby/object:Gem::Dependency
15
14
  name: rack
16
- prerelease: false
17
- requirement: &id001 !ruby/object:Gem::Requirement
18
- requirements:
19
- - &id006
20
- - ">="
21
- - !ruby/object:Gem::Version
22
- version: "0"
15
+ requirement: !ruby/object:Gem::Requirement
16
+ requirements:
17
+ - - ">="
18
+ - !ruby/object:Gem::Version
19
+ version: '0'
23
20
  type: :runtime
24
- version_requirements: *id001
25
- - !ruby/object:Gem::Dependency
26
- name: bundler
27
21
  prerelease: false
28
- requirement: &id002 !ruby/object:Gem::Requirement
29
- requirements:
30
- - - ~>
31
- - !ruby/object:Gem::Version
32
- version: "1.6"
22
+ version_requirements: !ruby/object:Gem::Requirement
23
+ requirements:
24
+ - - ">="
25
+ - !ruby/object:Gem::Version
26
+ version: '0'
27
+ - !ruby/object:Gem::Dependency
28
+ name: bundler
29
+ requirement: !ruby/object:Gem::Requirement
30
+ requirements:
31
+ - - "~>"
32
+ - !ruby/object:Gem::Version
33
+ version: '1.6'
33
34
  type: :development
34
- version_requirements: *id002
35
- - !ruby/object:Gem::Dependency
36
- name: rake
37
35
  prerelease: false
38
- requirement: &id003 !ruby/object:Gem::Requirement
39
- requirements:
40
- - - ~>
41
- - !ruby/object:Gem::Version
42
- version: "10.3"
36
+ version_requirements: !ruby/object:Gem::Requirement
37
+ requirements:
38
+ - - "~>"
39
+ - !ruby/object:Gem::Version
40
+ version: '1.6'
41
+ - !ruby/object:Gem::Dependency
42
+ name: rake
43
+ requirement: !ruby/object:Gem::Requirement
44
+ requirements:
45
+ - - "~>"
46
+ - !ruby/object:Gem::Version
47
+ version: '10.3'
43
48
  type: :development
44
- version_requirements: *id003
45
- - !ruby/object:Gem::Dependency
46
- name: coveralls
47
49
  prerelease: false
48
- requirement: &id004 !ruby/object:Gem::Requirement
49
- requirements:
50
- - - ~>
51
- - !ruby/object:Gem::Version
52
- version: "0.7"
50
+ version_requirements: !ruby/object:Gem::Requirement
51
+ requirements:
52
+ - - "~>"
53
+ - !ruby/object:Gem::Version
54
+ version: '10.3'
55
+ - !ruby/object:Gem::Dependency
56
+ name: coveralls
57
+ requirement: !ruby/object:Gem::Requirement
58
+ requirements:
59
+ - - "~>"
60
+ - !ruby/object:Gem::Version
61
+ version: '0.7'
53
62
  type: :development
54
- version_requirements: *id004
55
- - !ruby/object:Gem::Dependency
56
- name: rack-test
57
63
  prerelease: false
58
- requirement: &id005 !ruby/object:Gem::Requirement
59
- requirements:
60
- - - ~>
61
- - !ruby/object:Gem::Version
62
- version: "0.6"
64
+ version_requirements: !ruby/object:Gem::Requirement
65
+ requirements:
66
+ - - "~>"
67
+ - !ruby/object:Gem::Version
68
+ version: '0.7'
69
+ - !ruby/object:Gem::Dependency
70
+ name: rack-test
71
+ requirement: !ruby/object:Gem::Requirement
72
+ requirements:
73
+ - - "~>"
74
+ - !ruby/object:Gem::Version
75
+ version: '0.6'
63
76
  type: :development
64
- version_requirements: *id005
77
+ prerelease: false
78
+ version_requirements: !ruby/object:Gem::Requirement
79
+ requirements:
80
+ - - "~>"
81
+ - !ruby/object:Gem::Version
82
+ version: '0.6'
65
83
  description: SimpleAuth HMAC authentication
66
- email:
84
+ email:
67
85
  - r3qnbenni@gmail.com
68
86
  executables: []
69
-
70
87
  extensions: []
71
-
72
88
  extra_rdoc_files: []
73
-
74
- files:
89
+ files:
75
90
  - LICENSE.txt
76
91
  - MANIFEST
77
92
  - README.rdoc
@@ -110,29 +125,28 @@ files:
110
125
  - lib/rack/simple_auth/version.rb
111
126
  - rack-simple_auth.gemspec
112
127
  homepage: https://github.com/Benny1992/rack-simple_auth
113
- licenses:
128
+ licenses:
114
129
  - MIT
115
130
  metadata: {}
116
-
117
- post_install_message: "Please report any issues at: https://github.com/Benny1992/rack-simple_auth/issues/new"
131
+ post_install_message: 'Please report any issues at: https://github.com/Benny1992/rack-simple_auth/issues/new'
118
132
  rdoc_options: []
119
-
120
- require_paths:
133
+ require_paths:
121
134
  - lib
122
- required_ruby_version: !ruby/object:Gem::Requirement
123
- requirements:
135
+ required_ruby_version: !ruby/object:Gem::Requirement
136
+ requirements:
124
137
  - - ">="
125
- - !ruby/object:Gem::Version
138
+ - !ruby/object:Gem::Version
126
139
  version: 1.8.7
127
- required_rubygems_version: !ruby/object:Gem::Requirement
128
- requirements:
129
- - *id006
140
+ required_rubygems_version: !ruby/object:Gem::Requirement
141
+ requirements:
142
+ - - ">="
143
+ - !ruby/object:Gem::Version
144
+ version: '0'
130
145
  requirements: []
131
-
132
146
  rubyforge_project:
133
147
  rubygems_version: 2.2.2
134
148
  signing_key:
135
149
  specification_version: 4
136
150
  summary: SimpleAuth HMAC authentication
137
151
  test_files: []
138
-
152
+ has_rdoc: