hash-auth 0.1.0 → 0.1.1

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,3 +1,5 @@
1
+ Dir["lib/hash-auth/*.rb"].each {|file| require "hash-auth/#{File.basename file, '.rb'}" }
2
+
1
3
  HashAuth.configure do
2
4
 
3
5
  ## Block to allow dynamic loading of customer keys (Optional)
@@ -39,7 +39,7 @@ module HashAuth
39
39
 
40
40
  def self.find_strategy(name)
41
41
  strategy = self.strategies.select{|s| s.identifier == name}[0]
42
- raise "Strategy specified with name = #{name} does not exist" unless strategy
42
+ raise "Strategy specified with name = :#{name} does not exist" unless strategy
43
43
  strategy
44
44
  end
45
45
 
@@ -5,7 +5,11 @@ module HashAuth
5
5
 
6
6
  module ClassMethods
7
7
  def initialize_for_hash_auth(actions_requiring_hash_verification)
8
- before_filter :verify_hash, :only => actions_requiring_hash_verification
8
+ if actions_requiring_hash_verification = [:all]
9
+ before_filter :verify_hash
10
+ else
11
+ before_filter :verify_hash, :only => actions_requiring_hash_verification
12
+ end
9
13
  end
10
14
  end
11
15
 
@@ -1,3 +1,3 @@
1
1
  module HashAuth
2
- VERSION = "0.1.0"
2
+ VERSION = "0.1.1"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: hash-auth
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.1.1
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2013-04-02 00:00:00.000000000 Z
12
+ date: 2013-04-05 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: rails