sequel-devise 0.0.3 → 0.0.4

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
1
  ---
2
2
  SHA1:
3
- metadata.gz: 37631eb36fa7041eac2d2d2f9799383543ba4b6f
4
- data.tar.gz: 486d20c083fac7eca012a688ca28ff170b8dc153
3
+ metadata.gz: c663c8b5035ae4ffc6f66bbd890ab51f289138c1
4
+ data.tar.gz: 2aac847fa2414521dae0b4d75652b5de2bb6b297
5
5
  SHA512:
6
- metadata.gz: 660366543d80b4f9ab79652ba13c05a280591af1132bff253994422bca2084354d63d9f7b82e9168cd307deff685bcdadcfd2c65825696f83a862d601ad536a7
7
- data.tar.gz: 65e1be90a85498668ffe97e5491133e23fd530709e85559b713f2df529b59674b006dc800496a3a0d751ab0a5a616408b0abd2f9656dedf6931e41db5ca58ccc
6
+ metadata.gz: fd8d6f671f4f93eb6aaa90e84dcf47fd468d777c879ac1974b1cbe00261d97e159bb75a3c95e60e1894a6a60a9553aaea2b226a2c90658178f83bc2d620dc5b2
7
+ data.tar.gz: ac58c6a6ec2dee6f11ef6bf50380ba46e2b1d17cb11f752f006c0301e0cd75a59ce598f93bc0281ce13c5750ecc786502e23360bb2163bab5ac06c8a8f06a429
@@ -12,6 +12,43 @@ module Sequel
12
12
  def changed? # For rememberable
13
13
  !changed_columns.empty?
14
14
  end
15
+
16
+ def email_changed? # For validatable
17
+ column_changed? :email
18
+ end
19
+
20
+ def email_was # For confirmable
21
+ column_changes[:email].first
22
+ end
23
+
24
+ # for database_authenticatable:
25
+ def assign_attributes(hash)
26
+ set hash
27
+ end
28
+
29
+ def update_attributes(hash, *ignored)
30
+ update hash
31
+ end
32
+ end
33
+
34
+ module ClassMethods
35
+ Model::HOOKS.each do |hook|
36
+ define_method(hook) do |method = nil, options = {}, &block|
37
+ if Symbol === (if_method = options[:if])
38
+ orig_block = block
39
+ block = nil
40
+ method_without_if = method
41
+ method = :"_sequel_hook_with_if_#{method}"
42
+ define_method(method) do
43
+ return unless send if_method
44
+ send method_without_if
45
+ instance_eval &orig_block if orig_block
46
+ end
47
+ private method
48
+ end
49
+ super method, &block
50
+ end
51
+ end
15
52
  end
16
53
  end
17
54
  end
@@ -1,5 +1,5 @@
1
1
  module Sequel
2
2
  module Devise
3
- VERSION = "0.0.3"
3
+ VERSION = "0.0.4"
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,41 +1,41 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: sequel-devise
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.3
4
+ version: 0.0.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Rodrigo Rosenfeld Rosas
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2013-12-08 00:00:00.000000000 Z
11
+ date: 2014-02-25 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: devise
15
15
  requirement: !ruby/object:Gem::Requirement
16
16
  requirements:
17
- - - '>='
17
+ - - ">="
18
18
  - !ruby/object:Gem::Version
19
19
  version: '0'
20
20
  type: :runtime
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
- - - '>='
24
+ - - ">="
25
25
  - !ruby/object:Gem::Version
26
26
  version: '0'
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: orm_adapter-sequel
29
29
  requirement: !ruby/object:Gem::Requirement
30
30
  requirements:
31
- - - '>='
31
+ - - ">="
32
32
  - !ruby/object:Gem::Version
33
33
  version: '0'
34
34
  type: :runtime
35
35
  prerelease: false
36
36
  version_requirements: !ruby/object:Gem::Requirement
37
37
  requirements:
38
- - - '>='
38
+ - - ">="
39
39
  - !ruby/object:Gem::Version
40
40
  version: '0'
41
41
  description: Devise support for Sequel models
@@ -45,7 +45,7 @@ executables: []
45
45
  extensions: []
46
46
  extra_rdoc_files: []
47
47
  files:
48
- - .gitignore
48
+ - ".gitignore"
49
49
  - Gemfile
50
50
  - LICENSE
51
51
  - README.md
@@ -63,17 +63,17 @@ require_paths:
63
63
  - lib
64
64
  required_ruby_version: !ruby/object:Gem::Requirement
65
65
  requirements:
66
- - - '>='
66
+ - - ">="
67
67
  - !ruby/object:Gem::Version
68
68
  version: '0'
69
69
  required_rubygems_version: !ruby/object:Gem::Requirement
70
70
  requirements:
71
- - - '>='
71
+ - - ">="
72
72
  - !ruby/object:Gem::Version
73
73
  version: '0'
74
74
  requirements: []
75
75
  rubyforge_project:
76
- rubygems_version: 2.1.11
76
+ rubygems_version: 2.2.2
77
77
  signing_key:
78
78
  specification_version: 4
79
79
  summary: Enable Devise support by adding plugin :devise to your Sequel Model