notifiably_audited 0.0.7 → 0.1.11

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.
Files changed (36) hide show
  1. checksums.yaml +8 -8
  2. data/.gitignore +7 -13
  3. data/.travis.yml +10 -0
  4. data/.yardopts +3 -0
  5. data/audited-activerecord.gemspec +2 -1
  6. data/audited.gemspec +1 -2
  7. data/lib/{audited → notifiably_audited}/audit.rb +1 -1
  8. data/lib/{audited → notifiably_audited}/auditor.rb +11 -11
  9. data/lib/{audited → notifiably_audited}/rspec_matchers.rb +0 -0
  10. data/lib/{audited → notifiably_audited}/sweeper.rb +6 -6
  11. data/lib/notifiably_audited-activerecord.rb +2 -0
  12. data/lib/notifiably_audited.rb +1 -1
  13. data/notifiably_audited-0.1.0.gem +0 -0
  14. data/notifiably_audited-0.1.1.gem +0 -0
  15. data/notifiably_audited-0.1.2.gem +0 -0
  16. data/notifiably_audited-0.1.3.gem +0 -0
  17. data/notifiably_audited-0.1.4.gem +0 -0
  18. data/notifiably_audited-0.1.5.gem +0 -0
  19. data/notifiably_audited-0.1.6.gem +0 -0
  20. data/notifiably_audited-0.1.7.gem +0 -0
  21. data/notifiably_audited-0.1.8.gem +0 -0
  22. data/notifiably_audited-0.1.9.gem +0 -0
  23. data/notifiably_audited-activerecord-0.1.0.gem +0 -0
  24. data/notifiably_audited-activerecord-0.1.1.gem +0 -0
  25. data/notifiably_audited-activerecord-0.1.2.gem +0 -0
  26. data/notifiably_audited-activerecord-0.1.3.gem +0 -0
  27. data/notifiably_audited-activerecord-0.1.4.gem +0 -0
  28. data/notifiably_audited-activerecord-0.1.5.gem +0 -0
  29. data/notifiably_audited-activerecord-0.1.6.gem +0 -0
  30. data/notifiably_audited-activerecord-0.1.8.gem +0 -0
  31. data/notifiably_audited-activerecord-0.1.9.gem +0 -0
  32. metadata +27 -23
  33. data/LICENSE.txt +0 -22
  34. data/lib/audited.rb +0 -15
  35. data/lib/notifiably_audited/version.r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NzE4NWZhMjA1YWM1NjE1MWEwMjZh
14
+ ZDgzOWYyYmE3ODMyMmJmMzBkZmM3ODhhZDdlODI0ZWI4NTUxYWM4NzdjY2Zl
15
+ NDkwMjE2YjNiYWVmM2JlMzNkZWNlZmVhOGZhZDNlNjYxMjhkYjY=
data/.gitignore CHANGED
@@ -1,17 +1,11 @@
1
- *.gem
2
- *.rbc
1
+ *.log
2
+ *.swp
3
3
  .bundle
4
- .config
4
+ .rvmrc
5
5
  .yardoc
6
- Gemfile.lock
7
- InstalledFiles
8
- _yardoc
9
- coverage
6
+ coverage/
10
7
  doc/
11
- lib/bundler/man
8
+ Gemfile.lock
9
+ gemfiles/*.lock
12
10
  pkg
13
- rdoc
14
- spec/reports
15
- test/tmp
16
- test/version_tmp
17
- tmp
11
+ tmp/*
data/.travis.yml ADDED
@@ -0,0 +1,10 @@
1
+ language: ruby
2
+ services: mongodb
3
+ rvm:
4
+ - 1.8.7
5
+ - 1.9.2
6
+ - 1.9.3
7
+ gemfile:
8
+ - gemfiles/rails30.gemfile
9
+ - gemfiles/rails31.gemfile
10
+ - gemfiles/rails32.gemfile
data/.yardopts ADDED
@@ -0,0 +1,3 @@
1
+ --no-private
2
+ --title acts_as_audited
3
+ --exclude lib/generators
@@ -2,7 +2,7 @@
2
2
 
3
3
  Gem::Specification.new do |gem|
4
4
  gem.name = 'notifiably_audited-activerecord'
5
- gem.version = '0.0.6'
5
+ gem.version = '0.1.11'
6
6
 
7
7
  gem.authors = ['senthil kumar']
8
8
  gem.email = 'senthilkumar.hce@gmail.com'
@@ -11,6 +11,7 @@ Gem::Specification.new do |gem|
11
11
  gem.homepage = ''
12
12
  gem.license = 'MIT'
13
13
 
14
+
14
15
  gem.add_dependency 'notifiably_audited', gem.version
15
16
  gem.add_dependency 'activerecord', '~> 3.0'
16
17
 
data/audited.gemspec CHANGED
@@ -2,7 +2,7 @@
2
2
 
3
3
  Gem::Specification.new do |gem|
4
4
  gem.name = 'notifiably_audited'
5
- gem.version = '0.0.7'
5
+ gem.version = '0.1.11'
6
6
 
7
7
  gem.authors = ['senthil kumar']
8
8
  gem.email = 'senthilkumar.hce@gmail.com'
@@ -18,7 +18,6 @@ Gem::Specification.new do |gem|
18
18
  gem.add_development_dependency 'rails', '~> 3.0'
19
19
  gem.add_development_dependency 'rspec-rails', '~> 2.0'
20
20
  gem.add_development_dependency 'sqlite3', '~> 1.0'
21
- gem.add_development_dependency 'private_pub'
22
21
 
23
22
  gem.files = `git ls-files`.split($\).reject{|f| f =~ /(lib\/audited\-|adapters|generators)/ }
24
23
  gem.test_files = gem.files.grep(/^spec\//)
@@ -1,4 +1,4 @@
1
- module Audited
1
+ module NotifiablyAudited
2
2
  module Audit
3
3
  def self.included(klass)
4
4
  klass.extend(ClassMethods)
@@ -1,4 +1,4 @@
1
- module Audited
1
+ module NotifiablyAudited
2
2
  # Specify this act if you want changes to your model to be saved in an
3
3
  # audit table. This assumes there is an audits table ready.
4
4
  #
@@ -45,7 +45,7 @@ module Audited
45
45
  #
46
46
  def notifiably_audited(options = {})
47
47
  # don't allow multiple calls
48
- return if self.included_modules.include?(Audited::Auditor::AuditedInstanceMethods)
48
+ return if self.included_modules.include?(NotifiablyAudited::Auditor::AuditedInstanceMethods)
49
49
 
50
50
  class_attribute :non_audited_columns, :instance_writer => false
51
51
  class_attribute :auditing_enabled, :instance_writer => false
@@ -62,7 +62,7 @@ module Audited
62
62
  if options[:only]
63
63
  except = self.column_names - options[:only].flatten.map(&:to_s)
64
64
  else
65
- except = default_ignored_attributes + Audited.ignored_attributes
65
+ except = default_ignored_attributes + NotifiablyAudited.ignored_attributes
66
66
  except |= Array(options[:except]).collect(&:to_s) if options[:except]
67
67
  end
68
68
  self.non_audited_columns = except
@@ -87,7 +87,7 @@ module Audited
87
87
  end
88
88
 
89
89
  has_many :audits, :as => :auditable, :class_name => Audited.audit_class.name
90
- Audited.audit_class.audited_class_names << self.to_s
90
+ NotifiablyAudited.audit_class.audited_class_names << self.to_s
91
91
 
92
92
  after_create :audit_create if !options[:on] || (options[:on] && options[:on].include?(:create))
93
93
  before_update :audit_update if !options[:on] || (options[:on] && options[:on].include?(:update))
@@ -100,15 +100,15 @@ module Audited
100
100
 
101
101
  attr_accessor :version
102
102
 
103
- extend Audited::Auditor::AuditedClassMethods
104
- include Audited::Auditor::AuditedInstanceMethods
103
+ extend NotifiablyAudited::Auditor::AuditedClassMethods
104
+ include NotifiablyAudited::Auditor::AuditedInstanceMethods
105
105
 
106
106
  self.auditing_enabled = true
107
107
 
108
108
  end
109
109
 
110
110
  def has_associated_audits
111
- has_many :associated_audits, :as => :associated, :class_name => Audited.audit_class.name
111
+ has_many :associated_audits,:as => :associated,:class_name => NotifiablyAudited.audit_class.name
112
112
  end
113
113
  end
114
114
 
@@ -224,13 +224,13 @@ module Audited
224
224
 
225
225
  # Get a specific revision specified by the version number, or +:previous+
226
226
  def revision(version)
227
- revision_with Audited.audit_class.reconstruct_attributes(audits_to(version))
227
+ revision_with NotifiablyAudited.audit_class.reconstruct_attributes(audits_to(version))
228
228
  end
229
229
 
230
230
  # Find the oldest revision recorded prior to the date/time provided.
231
231
  def revision_at(date_or_time)
232
232
  audits = self.audits.up_until(date_or_time)
233
- revision_with Audited.audit_class.reconstruct_attributes(audits) unless audits.empty?
233
+ revision_with NotifiablyAudited.audit_class.reconstruct_attributes(audits) unless audits.empty?
234
234
  end
235
235
 
236
236
  # List of attributes that are audited.
@@ -250,7 +250,7 @@ module Audited
250
250
  revision.send :instance_variable_set, '@destroyed', false
251
251
  revision.send :instance_variable_set, '@_destroyed', false
252
252
  revision.send :instance_variable_set, '@marked_for_destruction', false
253
- Audited.audit_class.assign_revision_attributes(revision, attributes)
253
+ NotifiablyAudited.audit_class.assign_revision_attributes(revision, attributes)
254
254
 
255
255
  # Remove any association proxies so that they will be recreated
256
256
  # and reference the correct object for this revision. The only way
@@ -442,7 +442,7 @@ module Audited
442
442
  # convenience wrapper around
443
443
  # @see Audit#as_user.
444
444
  def audit_as( user, &block )
445
- Audited.audit_class.as_user( user, &block )
445
+ NotifiablyAudited.audit_class.as_user( user, &block )
446
446
  end
447
447
  end
448
448
  end
@@ -1,6 +1,6 @@
1
- module Audited
1
+ module NotifiablyAudited
2
2
  class Sweeper < ActiveModel::Observer
3
- observe Audited.audit_class
3
+ observe NotifiablyAudited.audit_class
4
4
 
5
5
  def before(controller)
6
6
  self.controller = controller
@@ -17,7 +17,7 @@ module Audited
17
17
  end
18
18
 
19
19
  def current_user
20
- controller.send(Audited.current_user_method) if controller.respond_to?(Audited.current_user_method, true)
20
+ controller.send(NotifiablyAudited.current_user_method) if controller.respond_to?(NotifiablyAudited.current_user_method, true)
21
21
  end
22
22
 
23
23
  def add_observer!(klass)
@@ -35,17 +35,17 @@ module Audited
35
35
  end
36
36
 
37
37
  def controller
38
- ::Audited.store[:current_controller]
38
+ ::NotifiablyAudited.store[:current_controller]
39
39
  end
40
40
 
41
41
  def controller=(value)
42
- ::Audited.store[:current_controller] = value
42
+ ::NotifiablyAudited.store[:current_controller] = value
43
43
  end
44
44
  end
45
45
  end
46
46
 
47
47
  if defined?(ActionController) and defined?(ActionController::Base)
48
48
  ActionController::Base.class_eval do
49
- around_filter Audited::Sweeper.instance
49
+ around_filter NotifiablyAudited::Sweeper.instance
50
50
  end
51
51
  end
@@ -0,0 +1,2 @@
1
+ require 'notifiably_audited'
2
+ require 'notifiably_audited/adapters/active_record'
@@ -1,4 +1,4 @@
1
- module Audited
1
+ module NotifiablyAudited
2
2
  VERSION = '3.0.0'
3
3
 
4
4
  class << self
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: notifiably_audited
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.7
4
+ version: 0.1.11
5
5
  platform: ruby
6
6
  authors:
7
7
  - senthil kumar
@@ -108,20 +108,6 @@ dependencies:
108
108
  - - ~>
109
109
  - !ruby/object:Gem::Version
110
110
  version: '1.0'
111
- - !ruby/object:Gem::Dependency
112
- name: private_pub
113
- requirement: !ruby/object:Gem::Requirement
114
- requirements:
115
- - - ! '>='
116
- - !ruby/object:Gem::Version
117
- version: '0'
118
- type: :development
119
- prerelease: false
120
- version_requirements: !ruby/object:Gem::Requirement
121
- requirements:
122
- - - ! '>='
123
- - !ruby/object:Gem::Version
124
- version: '0'
125
111
  description: Log all changes to your ActiveRecord models
126
112
  email: senthilkumar.hce@gmail.com
127
113
  executables: []
@@ -129,11 +115,12 @@ extensions: []
129
115
  extra_rdoc_files: []
130
116
  files:
131
117
  - .gitignore
118
+ - .travis.yml
119
+ - .yardopts
132
120
  - Appraisals
133
121
  - CHANGELOG
134
122
  - Gemfile
135
123
  - LICENSE
136
- - LICENSE.txt
137
124
  - README.md
138
125
  - Rakefile
139
126
  - audited-activerecord.gemspec
@@ -142,14 +129,31 @@ files:
142
129
  - gemfiles/rails30.gemfile
143
130
  - gemfiles/rails31.gemfile
144
131
  - gemfiles/rails32.gemfile
145
- - lib/audited.rb
146
- - lib/audited/audit.rb
147
- - lib/audited/auditor.rb
148
- - lib/audited/rspec_matchers.rb
149
- - lib/audited/sweeper.rb
132
+ - lib/notifiably_audited-activerecord.rb
150
133
  - lib/notifiably_audited.rb
151
- - lib/notifiably_audited/version.rb
152
- - notifiably_audited.gemspec
134
+ - lib/notifiably_audited/audit.rb
135
+ - lib/notifiably_audited/auditor.rb
136
+ - lib/notifiably_audited/rspec_matchers.rb
137
+ - lib/notifiably_audited/sweeper.rb
138
+ - notifiably_audited-0.1.0.gem
139
+ - notifiably_audited-0.1.1.gem
140
+ - notifiably_audited-0.1.2.gem
141
+ - notifiably_audited-0.1.3.gem
142
+ - notifiably_audited-0.1.4.gem
143
+ - notifiably_audited-0.1.5.gem
144
+ - notifiably_audited-0.1.6.gem
145
+ - notifiably_audited-0.1.7.gem
146
+ - notifiably_audited-0.1.8.gem
147
+ - notifiably_audited-0.1.9.gem
148
+ - notifiably_audited-activerecord-0.1.0.gem
149
+ - notifiably_audited-activerecord-0.1.1.gem
150
+ - notifiably_audited-activerecord-0.1.2.gem
151
+ - notifiably_audited-activerecord-0.1.3.gem
152
+ - notifiably_audited-activerecord-0.1.4.gem
153
+ - notifiably_audited-activerecord-0.1.5.gem
154
+ - notifiably_audited-activerecord-0.1.6.gem
155
+ - notifiably_audited-activerecord-0.1.8.gem
156
+ - notifiably_audited-activerecord-0.1.9.gem
153
157
  - spec/audited_spec_helpers.rb
154
158
  - spec/rails_app/config/application.rb
155
159
  - spec/rails_app/config/database.yml
data/LICENSE.txt DELETED
@@ -1,22 +0,0 @@
1
- Copyright (c) 2014 TODO: Write your name
2
-
3
- MIT License
4
-
5
- Permission is hereby granted, free of charge, to any person obtaining
6
- a copy of this software and associated documentation files (the
7
- "Software"), to deal in the Software without restriction, including
8
- without limitation the rights to use, copy, modify, merge, publish,
9
- distribute, sublicense, and/or sell copies of the Software, and to
10
- permit persons to whom the Software is furnished to do so, subject to
11
- the following conditions:
12
-
13
- The above copyright notice and this permission notice shall be
14
- included in all copies or substantial portions of the Software.
15
-
16
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
17
- EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
18
- MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
19
- NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
20
- LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
21
- OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
22
- WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
data/lib/audited.rb DELETED
@@ -1,15 +0,0 @@
1
- module Audited
2
- VERSION = '3.0.0'
3
-
4
- class << self
5
- attr_accessor :ignored_attributes, :current_user_method, :audit_class
6
-
7
- def store
8
- Thread.current[:audited_store] ||= {}
9
- end
10
- end
11
-
12
- @ignored_attributes = %w(lock_version created_at updated_at created_on updated_on)
13
-
14
- @current_user_method = :current_user
15
- end
@@ -1,3 +0,0 @@
1
- module NotifiablyAudited
2
- VERSION = "0.0.1"
3
- end
@@ -1,23 +0,0 @@
1
- # coding: utf-8
2
- lib = File.expand_path('../lib', __FILE__)
3
- $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
4
- require 'notifiably_audited/version'
5
-
6
- Gem::Specification.new do |spec|
7
- spec.name = "notifiably_audited"
8
- spec.version = NotifiablyAudited::VERSION
9
- spec.authors = ["TODO: Write your name"]
10
- spec.email = ["TODO: Write your email address"]
11
- spec.summary = %q{TODO: Write a short summary. Required.}
12
- spec.description = %q{TODO: Write a longer description. Optional.}
13
- spec.homepage = ""
14
- spec.license = "MIT"
15
-
16
- spec.files = `git ls-files -z`.split("\x0")
17
- spec.executables = spec.files.grep(%r{^bin/}) { |f| File.basename(f) }
18
- spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
19
- spec.require_paths = ["lib"]
20
-
21
- spec.add_development_dependency "bundler", "~> 1.5"
22
- spec.add_development_dependency "rake"
23
- end