challah 1.2.5.pre → 1.2.5
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +5 -0
- data/db/migrate/20121116210759_create_authorizations.rb +2 -2
- data/lib/challah/audit.rb +4 -8
- data/lib/challah/version.rb +1 -1
- metadata +16 -16
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 00571904e7b531ba71d930963040ee5f0f86d7c5
|
4
|
+
data.tar.gz: 79b6eb4368053e6bd913a5253462d9524e6285f2
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 2d7a2712be87c28d145d6e6eaccdc42bd8ced60b5991243d0319317c8bd59de517a0a7c7c0354ab5db83c48c19f9c4c7cd0e38cbb300869f672a7daa2ed5cb45
|
7
|
+
data.tar.gz: d228fe2deab5d073f60d5c231481bf2a1d25d0b1f84ec593fc9c0982cfbabb66551f5bc6efc4a00c1663da1592532f3ba1b652e0c84179e1a23d93eba3e26006
|
data/CHANGELOG.md
CHANGED
@@ -1,3 +1,8 @@
|
|
1
|
+
## Challah 1.2.5
|
2
|
+
|
3
|
+
* Modified audit tracker for Rails 4.2 `ActiveRecord::AttributeSet`
|
4
|
+
* Added `timestamps null: true` to Authorizations table to remove deprecation warning
|
5
|
+
|
1
6
|
## Challah 1.2.4
|
2
7
|
|
3
8
|
* Modify `bcrypt` dependency [PR #10](https://github.com/jdtornow/challah/pull/10) @philtr
|
@@ -9,7 +9,7 @@ class CreateAuthorizations < ActiveRecord::Migration
|
|
9
9
|
t.datetime :last_session_at
|
10
10
|
t.string :last_session_ip
|
11
11
|
t.integer :session_count, default: 0
|
12
|
-
t.timestamps
|
12
|
+
t.timestamps null: true
|
13
13
|
end
|
14
14
|
|
15
15
|
add_index :authorizations, :user_id
|
@@ -17,4 +17,4 @@ class CreateAuthorizations < ActiveRecord::Migration
|
|
17
17
|
add_index :authorizations, :uid
|
18
18
|
add_index :authorizations, :token
|
19
19
|
end
|
20
|
-
end
|
20
|
+
end
|
data/lib/challah/audit.rb
CHANGED
@@ -59,18 +59,14 @@ module Challah
|
|
59
59
|
|
60
60
|
def before_save_audit
|
61
61
|
if new_record?
|
62
|
-
all_audit_attributes.each do |
|
63
|
-
|
64
|
-
|
65
|
-
|
66
|
-
if column || @attributes.has_key?(attr_name)
|
67
|
-
write_attribute(attr_name, current_user_id)
|
62
|
+
all_audit_attributes.map(&:to_s).each do |column|
|
63
|
+
if respond_to?(column) && respond_to?("#{ column }=")
|
64
|
+
write_attribute(column, current_user_id)
|
68
65
|
end
|
69
66
|
end
|
70
67
|
else
|
71
|
-
audit_attributes_for_update.each do |column|
|
68
|
+
audit_attributes_for_update.map(&:to_s).each do |column|
|
72
69
|
if respond_to?(column) && respond_to?("#{ column }=")
|
73
|
-
column = column.to_s
|
74
70
|
next if attribute_changed?(column) # don't update the column if we already manually did
|
75
71
|
write_attribute(column, current_user_id)
|
76
72
|
end
|
data/lib/challah/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: challah
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.2.5
|
4
|
+
version: 1.2.5
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- John Tornow
|
@@ -9,22 +9,22 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date:
|
12
|
+
date: 2015-01-07 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: highline
|
16
16
|
requirement: !ruby/object:Gem::Requirement
|
17
17
|
requirements:
|
18
|
-
- - "
|
18
|
+
- - "~>"
|
19
19
|
- !ruby/object:Gem::Version
|
20
|
-
version: '
|
20
|
+
version: '1.6'
|
21
21
|
type: :runtime
|
22
22
|
prerelease: false
|
23
23
|
version_requirements: !ruby/object:Gem::Requirement
|
24
24
|
requirements:
|
25
|
-
- - "
|
25
|
+
- - "~>"
|
26
26
|
- !ruby/object:Gem::Version
|
27
|
-
version: '
|
27
|
+
version: '1.6'
|
28
28
|
- !ruby/object:Gem::Dependency
|
29
29
|
name: rails
|
30
30
|
requirement: !ruby/object:Gem::Requirement
|
@@ -43,16 +43,16 @@ dependencies:
|
|
43
43
|
name: rake
|
44
44
|
requirement: !ruby/object:Gem::Requirement
|
45
45
|
requirements:
|
46
|
-
- - "
|
46
|
+
- - "~>"
|
47
47
|
- !ruby/object:Gem::Version
|
48
|
-
version: '
|
48
|
+
version: '10.3'
|
49
49
|
type: :runtime
|
50
50
|
prerelease: false
|
51
51
|
version_requirements: !ruby/object:Gem::Requirement
|
52
52
|
requirements:
|
53
|
-
- - "
|
53
|
+
- - "~>"
|
54
54
|
- !ruby/object:Gem::Version
|
55
|
-
version: '
|
55
|
+
version: '10.3'
|
56
56
|
- !ruby/object:Gem::Dependency
|
57
57
|
name: bcrypt
|
58
58
|
requirement: !ruby/object:Gem::Requirement
|
@@ -99,16 +99,16 @@ dependencies:
|
|
99
99
|
name: sqlite3
|
100
100
|
requirement: !ruby/object:Gem::Requirement
|
101
101
|
requirements:
|
102
|
-
- - "
|
102
|
+
- - "~>"
|
103
103
|
- !ruby/object:Gem::Version
|
104
|
-
version: '1.
|
104
|
+
version: '1.3'
|
105
105
|
type: :development
|
106
106
|
prerelease: false
|
107
107
|
version_requirements: !ruby/object:Gem::Requirement
|
108
108
|
requirements:
|
109
|
-
- - "
|
109
|
+
- - "~>"
|
110
110
|
- !ruby/object:Gem::Version
|
111
|
-
version: '1.
|
111
|
+
version: '1.3'
|
112
112
|
description: A simple gem for authorization and session management in Rails.
|
113
113
|
email:
|
114
114
|
- john@johntornow.com
|
@@ -179,9 +179,9 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
179
179
|
version: 1.9.2
|
180
180
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
181
181
|
requirements:
|
182
|
-
- - "
|
182
|
+
- - ">="
|
183
183
|
- !ruby/object:Gem::Version
|
184
|
-
version:
|
184
|
+
version: '0'
|
185
185
|
requirements: []
|
186
186
|
rubyforge_project:
|
187
187
|
rubygems_version: 2.2.2
|