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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 0b84788595120b01ebc9b0e351ddeae392d14de0
4
- data.tar.gz: 30582692d9a7c0f4400c9c4f3f0e5e3ea3606d91
3
+ metadata.gz: 00571904e7b531ba71d930963040ee5f0f86d7c5
4
+ data.tar.gz: 79b6eb4368053e6bd913a5253462d9524e6285f2
5
5
  SHA512:
6
- metadata.gz: dab9364358a429ff1aaee242b82f01eb617b054f7db15d094875dd8d8f23cf0694e5c65548360cf9a426a9dad2fe0ed4ed2b9beaf0ae5ad06e02cd56b6703f27
7
- data.tar.gz: 4facdf21a2179483323b9e6734b3eb7ce47a5e05259ebee1e9a79fc318191941490058c2b1eb9716c8949ca5f3959e053609a35536f1a441dd2e44388e8414f0
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 |attr_name|
63
- attr_name = attr_name.to_s
64
- column = column_for_attribute(attr_name)
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
@@ -1,3 +1,3 @@
1
1
  module Challah
2
- VERSION = "1.2.5.pre" unless defined?(::Challah::VERSION)
2
+ VERSION = "1.2.5" unless defined?(::Challah::VERSION)
3
3
  end
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.pre
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: 2014-11-15 00:00:00.000000000 Z
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: '0'
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: '0'
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: '0.9'
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: '0.9'
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.0'
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.0'
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: 1.3.1
184
+ version: '0'
185
185
  requirements: []
186
186
  rubyforge_project:
187
187
  rubygems_version: 2.2.2