ar-audit-tracer 2.0.0 → 2.0.1

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: b0cc3002d73e4ecaeae431164cbac4078b67a10f
4
- data.tar.gz: 8bce9b4669e9d8c2cbe44ed3b54b4aff002ee924
3
+ metadata.gz: 26c0ae9367503e4fbdf82979c8dc9e6282abc370
4
+ data.tar.gz: 746cd974116dcceec534489d53af3ecfdd656523
5
5
  SHA512:
6
- metadata.gz: 0419dacc98f06fb067be5d487f03540f14b2dfaf6620eb83d76a559d479064add1c8ca24d2bb46e45ec1ae33c6a8766f6acbee5c715a14ebbc3511e1487824d8
7
- data.tar.gz: 0fb20cc963c08ed92ee12d41f24d9326bd4f6deaf3b3d855c71f6d83208264cb05901ddab6f58086c5de846aea8ac0a6ed0ea5df89bfd1339be7ef7cc250f1f2
6
+ metadata.gz: cac3e876798d3d2227896d8ad0695b7df5f4efe59f850a7f3a7199bb1e166ce1fb353b80288411ee6fca056a492e65da22ea65315474b6dadc06b3b291f357e7
7
+ data.tar.gz: 6c72b621047bccdebf36a9d553ca12f8584ab7f14f7840ea25f32eab0a0b33a26b18be8945c62fe3daf2428df8c3b939bb6eba9bb1f988a76e48b11e088ec0b8
@@ -1,6 +1,8 @@
1
1
  = ar-audit-tracer
2
2
 
3
+ {<img src="https://badge.fury.io/rb/ar-audit-tracer.png" alt="Gem Version" />}[http://badge.fury.io/rb/ar-audit-tracer]
3
4
  {<img src="https://secure.travis-ci.org/verticonaut/ar-audit-tracer.png" />}[http://travis-ci.org/verticonaut/ar-audit-tracer]
5
+ {<img src="https://codeclimate.com/github/verticonaut/ar-audit-tracer.png" />}[https://codeclimate.com/github/verticonaut/ar-audit-tracer]
4
6
 
5
7
  == Summary
6
8
 
@@ -9,7 +11,7 @@ It works exactly like 'timestamps' (see usage below).
9
11
 
10
12
  The new version 2.0.0 works now for Rails 4.0 with Ruby 1.9.3 and 2.0.0. Use the version 1.0.2 for Rails ~3.0 with Ruby 1.8.7 or higher.
11
13
 
12
- **Note**<br/>
14
+ === Note
13
15
  The migration helpers changed. The column statement is now named +t.authorstamps+ instead of +t.authors+.
14
16
  Similar the changing a table is named +add_authorstamp+. The columns generated are still named the same - so they are calles
15
17
  +created_by+ and +updated_by+.
@@ -45,15 +47,15 @@ or
45
47
 
46
48
  ==== Note
47
49
  The _authorstamps_ methods are simple conveniance methods (as regular timestamp methods are). You can simply
48
- add columns named +created_by+ and +updated_by+ using regular migration statements.<br/>
49
- **Note** You can name the attributes +created_by_id+ and +updated_by_id+. If these columns are detected they are filled as well.
50
+ add columns named +created_by+ and +updated_by+ using regular migration statements.<p/>
51
+ You can name the attributes +created_by_id+ and +updated_by_id+. If these columns are detected they are filled as well.
50
52
 
51
53
  === Configuration
52
54
 
53
55
  All you need to do is to set the current author such as e.g:
54
56
  Concern::Audit::Author.current="bad_man"
55
57
 
56
- Each ActiveRecord +save+ or +update+ then will set the respetive attributes +created_by+ and +modified_by+ automatically, whereas the modifier is set to the same value as the creator on model creation.
58
+ Each ActiveRecord +save+ or +update+ then will set the respetive attributes +created_by+ and +updated_by+ automatically, whereas the modifier is set to the same value as the creator on model creation.
57
59
 
58
60
  In a Rails Application you would set the author as described above in a +before_filter+.
59
61
  <tt>Concern::Audit::Author</tt> stores the author in a Thread-Local variable.
@@ -69,4 +71,4 @@ In case you need associations to a respective Author Model you have to set them
69
71
  * Works now not only for +created_by+ and +updated_by+, but as well for attributes +created_by_id+ and +updated_by_id+
70
72
 
71
73
  === Version 1.0.2
72
- * Fixed migrations so option can be passed
74
+ * Fixed migrations so option can be passed
@@ -15,8 +15,7 @@ Gem::Specification.new do |s|
15
15
 
16
16
  s.add_dependency "activerecord", "~> 4.0"
17
17
 
18
- s.add_development_dependency "activerecord", "~> 4.0"
19
- s.add_development_dependency "sqlite3"
18
+ s.add_development_dependency "sqlite3", "~> 0"
20
19
 
21
20
  s.rdoc_options << '--charset' << 'UTF-8' << '--line-numbers'
22
21
  s.files = `git ls-files`.split("\n")
@@ -27,7 +27,7 @@ module ActiveRecord
27
27
 
28
28
  private
29
29
 
30
- def create_record
30
+ def _create_record
31
31
  if self.record_authorstamps
32
32
  all_authorstamp_attributes.each do |column|
33
33
  if respond_to?(column) && respond_to?("#{column}=") && self.send(column).nil?
@@ -39,7 +39,7 @@ module ActiveRecord
39
39
  super
40
40
  end
41
41
 
42
- def update_record(*args)
42
+ def _update_record(*args)
43
43
  if should_record_authorstamps?
44
44
  authorstamp_attributes_for_update_in_model.each do |column|
45
45
  column = column.to_s
@@ -1,3 +1,3 @@
1
1
  module ArAuditTracer
2
- VERSION = '2.0.0'
2
+ VERSION = '2.0.1'
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ar-audit-tracer
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.0.0
4
+ version: 2.0.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Martin Schweizer
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2013-07-24 00:00:00.000000000 Z
11
+ date: 2014-08-08 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activerecord
@@ -24,32 +24,18 @@ dependencies:
24
24
  - - ~>
25
25
  - !ruby/object:Gem::Version
26
26
  version: '4.0'
27
- - !ruby/object:Gem::Dependency
28
- name: activerecord
29
- requirement: !ruby/object:Gem::Requirement
30
- requirements:
31
- - - ~>
32
- - !ruby/object:Gem::Version
33
- version: '4.0'
34
- type: :development
35
- prerelease: false
36
- version_requirements: !ruby/object:Gem::Requirement
37
- requirements:
38
- - - ~>
39
- - !ruby/object:Gem::Version
40
- version: '4.0'
41
27
  - !ruby/object:Gem::Dependency
42
28
  name: sqlite3
43
29
  requirement: !ruby/object:Gem::Requirement
44
30
  requirements:
45
- - - '>='
31
+ - - ~>
46
32
  - !ruby/object:Gem::Version
47
33
  version: '0'
48
34
  type: :development
49
35
  prerelease: false
50
36
  version_requirements: !ruby/object:Gem::Requirement
51
37
  requirements:
52
- - - '>='
38
+ - - ~>
53
39
  - !ruby/object:Gem::Version
54
40
  version: '0'
55
41
  description: Handles ActiveRecord authors in the same way as timstamps.
@@ -104,7 +90,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
104
90
  version: '0'
105
91
  requirements: []
106
92
  rubyforge_project:
107
- rubygems_version: 2.0.5
93
+ rubygems_version: 2.2.2
108
94
  signing_key:
109
95
  specification_version: 4
110
96
  summary: Track creator/modifiers of you AR Models similar to timestamps.