rails-auth 2.0.1 → 2.0.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 2322612702ff801d290fd31d9d8502df8b77722d
4
- data.tar.gz: 921efc9a87c56702a8f8242644a61614f7a4eef8
3
+ metadata.gz: b92868091d02352a61ab49fd57ff7c661e896d5e
4
+ data.tar.gz: 00216460fde31f72a5e27ef4cec18a856a65eba9
5
5
  SHA512:
6
- metadata.gz: 5318762dc1c15d4b12bc2f25ec195c5ac3db0251bc83daf22f63687cf5bb5cff3d63d5aa5c44fea978b6ec63e9c4f1bae48e669a7c306d7f8eeb00ad7d9d1962
7
- data.tar.gz: 0b5c0890cb347e8e94b6353c9a14d9c5de348eed7417ecbdfc5e73262846e3d57bd778655f462209812ad03d27bec3103f1cebfc2acc36f5e002a458204b63a5
6
+ metadata.gz: 816e1c6b079531407868899e8d38cd60b23052de9b1e690ee1e8fa567d43981f2fa1710541a5ede5e56af05f3004ad87d06dcd61dbd63851d2fc5614886a722d
7
+ data.tar.gz: 6529e98a1bae73735564ab86b8502e9f676b6a3729e0b3bd9cab39e27f0ba89cdd528394798a95c2c263345b62a259f600713adf8aed0944d966d215f57ec6a9
data/CHANGES.md CHANGED
@@ -1,3 +1,10 @@
1
+ ### 2.0.2 (2016-07-19)
2
+
3
+ * [#37](https://github.com/square/rails-auth/pull/37)
4
+ Forward #each on Rails::Auth::Credentials and make
5
+ it Enumerable.
6
+ ([@tarcieri])
7
+
1
8
  ### 2.0.1 (2016-07-16)
2
9
 
3
10
  * [#36](https://github.com/square/rails-auth/pull/36)
@@ -8,8 +8,9 @@ module Rails
8
8
  # Stores a set of credentials
9
9
  class Credentials
10
10
  extend Forwardable
11
+ include Enumerable
11
12
 
12
- def_delegators :@credentials, :[], :fetch, :empty?, :key?, :to_hash
13
+ def_delegators :@credentials, :[], :fetch, :empty?, :key?, :each, :to_hash
13
14
 
14
15
  def self.from_rack_env(env)
15
16
  new(env.fetch(Rails::Auth::Env::CREDENTIALS_ENV_KEY, {}))
@@ -42,7 +42,7 @@ module Rails
42
42
  #
43
43
  # @param [String] :allowed_by label of what allowed the request
44
44
  def allowed_by=(allowed_by)
45
- raise AlreadyAuthorizedError, "already allowed by #{@allowed_by.ispect}" if @allowed_by
45
+ raise AlreadyAuthorizedError, "already allowed by #{@allowed_by.inspect}" if @allowed_by
46
46
  raise TypeError, "expected String for allowed_by, got #{allowed_by.class}" unless allowed_by.is_a?(String)
47
47
  @allowed_by = allowed_by
48
48
  end
@@ -3,6 +3,6 @@
3
3
  module Rails
4
4
  # Pluggable authentication and authorization for Rack/Rails
5
5
  module Auth
6
- VERSION = "2.0.1".freeze
6
+ VERSION = "2.0.2".freeze
7
7
  end
8
8
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rails-auth
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.0.1
4
+ version: 2.0.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Tony Arcieri
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2016-07-17 00:00:00.000000000 Z
11
+ date: 2016-07-19 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rack