switch_user 1.0.2 → 1.1.0

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: 298959f7be5e189d86db97729a7684e08029e57e
4
- data.tar.gz: 3ce27c56ef2e8b666dcf62461d57f44134e82dc2
3
+ metadata.gz: 703c786469cf8a796e024e2ec4cca3037d75c944
4
+ data.tar.gz: dc4d80d1a338401476ef22205bfee5bc215b07ca
5
5
  SHA512:
6
- metadata.gz: 3f177c7d22660c949bef98580a6c14d1f3d00ed478435b60850c7c362fbe8e7653dd17757bbe187e472326cba9ab4ff09bc0f8be87dd1cbf037455e1bb342927
7
- data.tar.gz: 4f3a5af7f73f55fc84c706aa7b6fb1ff592a9e35773d943c5b630e784599524dcda6a7bad608182d3d20ff29006afccbddddb0dcf53f6cb8605b2193c036510b
6
+ metadata.gz: df717cc06e736487dde734d3f19fb390c0a2ffde9f69adbbd3a0ba365912e9a2c0d211ef9f865ae5b0740cd1fe558c3c72dd85160bc0ba6ec344fc464c75b7a3
7
+ data.tar.gz: c47e07ed11ff0bb6a0b0f7e6514e92f963c6eb5d526750d77136dff973571bd94635c9ac08faacccc2f6495f04742c4cb21f7df0f72d944a858a862a59d3b3c3
data/CHANGELOG.md CHANGED
@@ -1,12 +1,9 @@
1
1
  # Next Release
2
2
 
3
- ## 1.0.2
3
+ ## 1.1.0 (07/01/2015)
4
4
 
5
- * Don't attempt to query db if scope str isn't in scope_id str
6
-
7
- ## 1.0.1
8
-
9
- * Fix typo in `GuestDataSource`
5
+ * Rails 3.x compatibility
6
+ * Don't attempt to query db if scope str isn't in `scope_id` str
10
7
  * Allow custom method as `available_users_names`
11
8
 
12
9
  ## 1.0.0 (06/22/2015)
@@ -33,7 +33,7 @@ module SwitchUser
33
33
  scope_regexp = /\A#{scope}_/
34
34
  return unless scope_id =~ scope_regexp
35
35
 
36
- user = loader.call.find_by identifier => scope_id.sub(scope_regexp, '')
36
+ user = loader.call.where(identifier => scope_id.sub(scope_regexp, '')).first
37
37
  Record.new(user, self)
38
38
  end
39
39
  end
@@ -1,3 +1,3 @@
1
1
  module SwitchUser
2
- VERSION = "1.0.2"
2
+ VERSION = "1.1.0"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: switch_user
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.2
4
+ version: 1.1.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Richard Huang
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2015-06-29 00:00:00.000000000 Z
12
+ date: 2015-07-01 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: activesupport