notifiably_audited 1.0.11 → 3.0.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (41) hide show
  1. checksums.yaml +5 -13
  2. data/.gitignore +13 -7
  3. data/LICENSE.txt +22 -0
  4. data/audited-activerecord.gemspec +1 -3
  5. data/audited.gemspec +1 -1
  6. data/lib/audited.rb +15 -0
  7. data/lib/{notifiably_audited → audited}/audit.rb +4 -3
  8. data/lib/{notifiably_audited → audited}/auditor.rb +13 -27
  9. data/lib/{notifiably_audited → audited}/rspec_matchers.rb +0 -0
  10. data/lib/{notifiably_audited → audited}/sweeper.rb +6 -6
  11. data/lib/notifiably_audited.rb +1 -2
  12. data/lib/notifiably_audited/version.rb +3 -0
  13. data/notifiably_audited.gemspec +26 -0
  14. metadata +28 -66
  15. data/.travis.yml +0 -10
  16. data/.yardopts +0 -3
  17. data/lib/notifiably_audited-activerecord.rb +0 -2
  18. data/lib/notifiably_audited/engine.rb +0 -14
  19. data/lib/notifiably_audited/helper.rb +0 -22
  20. data/notifiably_audited-1.0.0.gem +0 -0
  21. data/notifiably_audited-1.0.1.gem +0 -0
  22. data/notifiably_audited-1.0.10.gem +0 -0
  23. data/notifiably_audited-1.0.2.gem +0 -0
  24. data/notifiably_audited-1.0.3.gem +0 -0
  25. data/notifiably_audited-1.0.4.gem +0 -0
  26. data/notifiably_audited-1.0.5.gem +0 -0
  27. data/notifiably_audited-1.0.6.gem +0 -0
  28. data/notifiably_audited-1.0.7.gem +0 -0
  29. data/notifiably_audited-1.0.8.gem +0 -0
  30. data/notifiably_audited-1.0.9.gem +0 -0
  31. data/notifiably_audited-activerecord-1.0.0.gem +0 -0
  32. data/notifiably_audited-activerecord-1.0.1.gem +0 -0
  33. data/notifiably_audited-activerecord-1.0.10.gem +0 -0
  34. data/notifiably_audited-activerecord-1.0.2.gem +0 -0
  35. data/notifiably_audited-activerecord-1.0.3.gem +0 -0
  36. data/notifiably_audited-activerecord-1.0.4.gem +0 -0
  37. data/notifiably_audited-activerecord-1.0.5.gem +0 -0
  38. data/notifiably_audited-activerecord-1.0.6.gem +0 -0
  39. data/notifiably_audited-activerecord-1.0.7.gem +0 -0
  40. data/notifiably_audited-activerecord-1.0.8.gem +0 -0
  41. data/notifiably_audited-activerecord-1.0.9.gem +0 -0
checksums.yaml CHANGED
@@ -1,15 +1,7 @@
1
1
  ---
2
- !binary "U0hBMQ==":
3
- metadata.gz: !binary |-
4
- ZDRkMDRlNGU2Nzg4N2ZlZmJiOGM0MjhkNDFkMzY3ODljNDlmMjg1ZQ==
5
- data.tar.gz: !binary |-
6
- NjBiMWZlMGFhZjY1YjNjNmQzYWUxZmYxNzRiMzY1NzRlMmQxMGMxYQ==
2
+ SHA1:
3
+ metadata.gz: 2c070373260c545f03135f36a2804122ca95f0ae
4
+ data.tar.gz: ca21c72abfa3b5df5a32365c432b9253d61bb388
7
5
  SHA512:
8
- metadata.gz: !binary |-
9
- YWIwMzI1NWNiZjlmM2ZkMjBlNGJkNmM4NGJmMGVkOWI0NmQwNzMyZDU0ODQ0
10
- OTMzY2MxYzcxZGZiNTNlMzg4YjQ0ODQyZThmMTg3MjYzNmI3ZTUxNDM1YmY5
11
- YzUwNTQwMWU3YWQ5ZWYyNDU1Y2U3MDliNzdmZGUxNDU5YTkzNDM=
12
- data.tar.gz: !binary |-
13
- MTc5MWYzMGJjOGYwMGJmNmE2NTNkNThiMjRmZDBjMDgyYjcyNWY5YTUyYTFj
14
- MzYwMjMzMDkyMWMxODc2MzJmYjIwZDhjYTM5MWM4MjQzNjk4ZjU3YTAzNmUz
15
- NmFmODBjYmY5N2FmYmUyMjE4Y2ZkY2UyZDk1MGQwYzNkYjQ5Yzc=
6
+ metadata.gz: 4152d9b98e2c8d88df8b33061128c022a5d6f5ba39d2d178796e692b3bbbe3cde96f543c7c49da86f1e4efb027889f622c974713a62a5793b707dc752b078bfc
7
+ data.tar.gz: 13cb0da17c4602d46d9754ae93add97fbb04a3af9229d573543ba5e765c236051b119586e22a913d9cd03b59cbd2015fc8ac94146d7d88ad22bf9b5bb080a0dc
data/.gitignore CHANGED
@@ -1,11 +1,17 @@
1
- *.log
2
- *.swp
1
+ *.gem
2
+ *.rbc
3
3
  .bundle
4
- .rvmrc
4
+ .config
5
5
  .yardoc
6
- coverage/
7
- doc/
8
6
  Gemfile.lock
9
- gemfiles/*.lock
7
+ InstalledFiles
8
+ _yardoc
9
+ coverage
10
+ doc/
11
+ lib/bundler/man
10
12
  pkg
11
- tmp/*
13
+ rdoc
14
+ spec/reports
15
+ test/tmp
16
+ test/version_tmp
17
+ tmp
data/LICENSE.txt ADDED
@@ -0,0 +1,22 @@
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.
@@ -2,7 +2,7 @@
2
2
 
3
3
  Gem::Specification.new do |gem|
4
4
  gem.name = 'notifiably_audited-activerecord'
5
- gem.version = '1.0.11'
5
+ gem.version = '0.0.7'
6
6
 
7
7
  gem.authors = ['senthil kumar']
8
8
  gem.email = 'senthilkumar.hce@gmail.com'
@@ -11,10 +11,8 @@ Gem::Specification.new do |gem|
11
11
  gem.homepage = ''
12
12
  gem.license = 'MIT'
13
13
 
14
-
15
14
  gem.add_dependency 'notifiably_audited', gem.version
16
15
  gem.add_dependency 'activerecord', '~> 3.0'
17
-
18
16
 
19
17
  gem.files = `git ls-files lib`.split($\).grep(/(active_?record|generators)/)
20
18
  gem.files << 'LICENSE'
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 = '1.0.11'
5
+ gem.version = '0.0.7'
6
6
 
7
7
  gem.authors = ['senthil kumar']
8
8
  gem.email = 'senthilkumar.hce@gmail.com'
data/lib/audited.rb ADDED
@@ -0,0 +1,15 @@
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,4 +1,4 @@
1
- module NotifiablyAudited
1
+ module Audited
2
2
  module Audit
3
3
  def self.included(klass)
4
4
  klass.extend(ClassMethods)
@@ -12,8 +12,9 @@ module NotifiablyAudited
12
12
  belongs_to :associated, :polymorphic => true
13
13
 
14
14
  before_create :set_version_number, :set_audit_user
15
-
16
- after_save :notify
15
+
16
+ # senthil 30jan2018: Commenting out because no notifications as of now
17
+ # after_save :notify
17
18
 
18
19
  cattr_accessor :audited_class_names
19
20
  self.audited_class_names = Set.new
@@ -1,4 +1,4 @@
1
- module NotifiablyAudited
1
+ module Audited
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 NotifiablyAudited
45
45
  #
46
46
  def notifiably_audited(options = {})
47
47
  # don't allow multiple calls
48
- return if self.included_modules.include?(NotifiablyAudited::Auditor::AuditedInstanceMethods)
48
+ return if self.included_modules.include?(Audited::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 NotifiablyAudited
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 + NotifiablyAudited.ignored_attributes
65
+ except = default_ignored_attributes + Audited.ignored_attributes
66
66
  except |= Array(options[:except]).collect(&:to_s) if options[:except]
67
67
  end
68
68
  self.non_audited_columns = except
@@ -86,8 +86,8 @@ module NotifiablyAudited
86
86
  attr_accessible :audit_comment
87
87
  end
88
88
 
89
- has_many :audits, :as => :auditable, :class_name => NotifiablyAudited.audit_class.name
90
- NotifiablyAudited.audit_class.audited_class_names << self.to_s
89
+ has_many :audits, :as => :auditable, :class_name => Audited.audit_class.name
90
+ Audited.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 NotifiablyAudited
100
100
 
101
101
  attr_accessor :version
102
102
 
103
- extend NotifiablyAudited::Auditor::AuditedClassMethods
104
- include NotifiablyAudited::Auditor::AuditedInstanceMethods
103
+ extend Audited::Auditor::AuditedClassMethods
104
+ include Audited::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 => NotifiablyAudited.audit_class.name
111
+ has_many :associated_audits, :as => :associated, :class_name => Audited.audit_class.name
112
112
  end
113
113
  end
114
114
 
@@ -224,13 +224,13 @@ module NotifiablyAudited
224
224
 
225
225
  # Get a specific revision specified by the version number, or +:previous+
226
226
  def revision(version)
227
- revision_with NotifiablyAudited.audit_class.reconstruct_attributes(audits_to(version))
227
+ revision_with Audited.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 NotifiablyAudited.audit_class.reconstruct_attributes(audits) unless audits.empty?
233
+ revision_with Audited.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 NotifiablyAudited
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
- NotifiablyAudited.audit_class.assign_revision_attributes(revision, attributes)
253
+ Audited.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
@@ -377,10 +377,8 @@ module NotifiablyAudited
377
377
  @audit_values[:title] = opts[1]
378
378
  @audit_values[:comment] = opts[2]
379
379
  # if 3rd argument is present in the opts, then overriding title
380
- # this is a little bit of a complicated option. If you mean that the specified column in [0], has to be only one column, contains an id of an object referenced by the [:model,:field_name] in [3], then go ahead and append it in the title.
381
- # If the [3] is not an array but a single symbol, then fetch its value from the current object and append
382
380
  if opts[3].present?
383
- to_append = decide_append(opts[0][0],opts[3])
381
+ append = opts[3][0].to_s.camelize.constantize.find(self.send(opts[0][0])).send(opts[3][1])
384
382
  @audit_values[:title] = @audit_values[:title] + "[#{append}]"
385
383
  end
386
384
  # actual recording of audit
@@ -389,18 +387,6 @@ module NotifiablyAudited
389
387
  @non_monitor = 0
390
388
  end
391
389
  end
392
-
393
- def decide_append(zero,three)
394
- if three.kind_of?(Array)
395
- append = three[0].to_s.camelize.constantize.find(self.send(zero)).send(three[1])
396
- elsif three.kind_of?(Symbol)
397
- append = self.send(three)
398
- else
399
- errors.add(:audit_comment, "The 3rd argument for a specific alert_for item should either be an array of [:model,:field_name] or a symbol of current object's :field_name ")
400
- return false
401
- end
402
- append
403
- end
404
390
  #========================================
405
391
 
406
392
  def write_audit(attrs)
@@ -456,7 +442,7 @@ module NotifiablyAudited
456
442
  # convenience wrapper around
457
443
  # @see Audit#as_user.
458
444
  def audit_as( user, &block )
459
- NotifiablyAudited.audit_class.as_user( user, &block )
445
+ Audited.audit_class.as_user( user, &block )
460
446
  end
461
447
  end
462
448
  end
@@ -1,6 +1,6 @@
1
- module NotifiablyAudited
1
+ module Audited
2
2
  class Sweeper < ActiveModel::Observer
3
- observe NotifiablyAudited.audit_class
3
+ observe Audited.audit_class
4
4
 
5
5
  def before(controller)
6
6
  self.controller = controller
@@ -17,7 +17,7 @@ module NotifiablyAudited
17
17
  end
18
18
 
19
19
  def current_user
20
- controller.send(NotifiablyAudited.current_user_method) if controller.respond_to?(NotifiablyAudited.current_user_method, true)
20
+ controller.send(Audited.current_user_method) if controller.respond_to?(Audited.current_user_method, true)
21
21
  end
22
22
 
23
23
  def add_observer!(klass)
@@ -35,17 +35,17 @@ module NotifiablyAudited
35
35
  end
36
36
 
37
37
  def controller
38
- ::NotifiablyAudited.store[:current_controller]
38
+ ::Audited.store[:current_controller]
39
39
  end
40
40
 
41
41
  def controller=(value)
42
- ::NotifiablyAudited.store[:current_controller] = value
42
+ ::Audited.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 NotifiablyAudited::Sweeper.instance
49
+ around_filter Audited::Sweeper.instance
50
50
  end
51
51
  end
@@ -1,7 +1,6 @@
1
- require "notifiably_audited/engine"
2
1
  require 'private_pub'
3
2
 
4
- module NotifiablyAudited
3
+ module Audited
5
4
  VERSION = '3.0.0'
6
5
 
7
6
  class << self
@@ -0,0 +1,3 @@
1
+ module NotifiablyAudited
2
+ VERSION = "2.0.0"
3
+ end
@@ -0,0 +1,26 @@
1
+ # encoding: utf-8
2
+
3
+ Gem::Specification.new do |gem|
4
+ gem.name = 'notifiably_audited'
5
+ gem.version = '3.0.0'
6
+
7
+ gem.authors = ['senthil kumar']
8
+ gem.email = 'senthilkumar.hce@gmail.com'
9
+ gem.description = 'Log all changes to your ActiveRecord models'
10
+ gem.summary = ''
11
+ gem.homepage = ''
12
+ gem.license = 'MIT'
13
+
14
+ gem.add_development_dependency 'activerecord', '~> 3.0'
15
+ gem.add_development_dependency 'appraisal', '~> 0.4'
16
+ gem.add_development_dependency 'bson_ext', '~> 1.6'
17
+ gem.add_development_dependency 'mongo_mapper', '~> 0.11'
18
+ gem.add_development_dependency 'rails', '~> 3.0'
19
+ gem.add_development_dependency 'rspec-rails', '~> 2.0'
20
+ gem.add_development_dependency 'sqlite3', '~> 1.0'
21
+
22
+ gem.files = `git ls-files`.split($\).reject{|f| f =~ /(lib\/audited\-|adapters|generators)/ }
23
+ gem.test_files = gem.files.grep(/^spec\//)
24
+ gem.require_paths = ['lib']
25
+ end
26
+
metadata CHANGED
@@ -1,140 +1,125 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: notifiably_audited
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.11
4
+ version: 3.0.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - senthil kumar
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-03-26 00:00:00.000000000 Z
11
+ date: 2018-01-30 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activerecord
15
15
  requirement: !ruby/object:Gem::Requirement
16
16
  requirements:
17
- - - ~>
17
+ - - "~>"
18
18
  - !ruby/object:Gem::Version
19
19
  version: '3.0'
20
20
  type: :development
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: '3.0'
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: appraisal
29
29
  requirement: !ruby/object:Gem::Requirement
30
30
  requirements:
31
- - - ~>
31
+ - - "~>"
32
32
  - !ruby/object:Gem::Version
33
33
  version: '0.4'
34
34
  type: :development
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.4'
41
41
  - !ruby/object:Gem::Dependency
42
42
  name: bson_ext
43
43
  requirement: !ruby/object:Gem::Requirement
44
44
  requirements:
45
- - - ~>
45
+ - - "~>"
46
46
  - !ruby/object:Gem::Version
47
47
  version: '1.6'
48
48
  type: :development
49
49
  prerelease: false
50
50
  version_requirements: !ruby/object:Gem::Requirement
51
51
  requirements:
52
- - - ~>
52
+ - - "~>"
53
53
  - !ruby/object:Gem::Version
54
54
  version: '1.6'
55
55
  - !ruby/object:Gem::Dependency
56
56
  name: mongo_mapper
57
57
  requirement: !ruby/object:Gem::Requirement
58
58
  requirements:
59
- - - ~>
59
+ - - "~>"
60
60
  - !ruby/object:Gem::Version
61
61
  version: '0.11'
62
62
  type: :development
63
63
  prerelease: false
64
64
  version_requirements: !ruby/object:Gem::Requirement
65
65
  requirements:
66
- - - ~>
66
+ - - "~>"
67
67
  - !ruby/object:Gem::Version
68
68
  version: '0.11'
69
69
  - !ruby/object:Gem::Dependency
70
70
  name: rails
71
71
  requirement: !ruby/object:Gem::Requirement
72
72
  requirements:
73
- - - ~>
73
+ - - "~>"
74
74
  - !ruby/object:Gem::Version
75
75
  version: '3.0'
76
76
  type: :development
77
77
  prerelease: false
78
78
  version_requirements: !ruby/object:Gem::Requirement
79
79
  requirements:
80
- - - ~>
80
+ - - "~>"
81
81
  - !ruby/object:Gem::Version
82
82
  version: '3.0'
83
83
  - !ruby/object:Gem::Dependency
84
84
  name: rspec-rails
85
85
  requirement: !ruby/object:Gem::Requirement
86
86
  requirements:
87
- - - ~>
87
+ - - "~>"
88
88
  - !ruby/object:Gem::Version
89
89
  version: '2.0'
90
90
  type: :development
91
91
  prerelease: false
92
92
  version_requirements: !ruby/object:Gem::Requirement
93
93
  requirements:
94
- - - ~>
94
+ - - "~>"
95
95
  - !ruby/object:Gem::Version
96
96
  version: '2.0'
97
97
  - !ruby/object:Gem::Dependency
98
98
  name: sqlite3
99
99
  requirement: !ruby/object:Gem::Requirement
100
100
  requirements:
101
- - - ~>
101
+ - - "~>"
102
102
  - !ruby/object:Gem::Version
103
103
  version: '1.0'
104
104
  type: :development
105
105
  prerelease: false
106
106
  version_requirements: !ruby/object:Gem::Requirement
107
107
  requirements:
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: :runtime
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: []
128
114
  extensions: []
129
115
  extra_rdoc_files: []
130
116
  files:
131
- - .gitignore
132
- - .travis.yml
133
- - .yardopts
117
+ - ".gitignore"
134
118
  - Appraisals
135
119
  - CHANGELOG
136
120
  - Gemfile
137
121
  - LICENSE
122
+ - LICENSE.txt
138
123
  - README.md
139
124
  - Rakefile
140
125
  - audited-activerecord.gemspec
@@ -143,36 +128,14 @@ files:
143
128
  - gemfiles/rails30.gemfile
144
129
  - gemfiles/rails31.gemfile
145
130
  - gemfiles/rails32.gemfile
146
- - lib/notifiably_audited-activerecord.rb
131
+ - lib/audited.rb
132
+ - lib/audited/audit.rb
133
+ - lib/audited/auditor.rb
134
+ - lib/audited/rspec_matchers.rb
135
+ - lib/audited/sweeper.rb
147
136
  - lib/notifiably_audited.rb
148
- - lib/notifiably_audited/audit.rb
149
- - lib/notifiably_audited/auditor.rb
150
- - lib/notifiably_audited/engine.rb
151
- - lib/notifiably_audited/helper.rb
152
- - lib/notifiably_audited/rspec_matchers.rb
153
- - lib/notifiably_audited/sweeper.rb
154
- - notifiably_audited-1.0.0.gem
155
- - notifiably_audited-1.0.1.gem
156
- - notifiably_audited-1.0.10.gem
157
- - notifiably_audited-1.0.2.gem
158
- - notifiably_audited-1.0.3.gem
159
- - notifiably_audited-1.0.4.gem
160
- - notifiably_audited-1.0.5.gem
161
- - notifiably_audited-1.0.6.gem
162
- - notifiably_audited-1.0.7.gem
163
- - notifiably_audited-1.0.8.gem
164
- - notifiably_audited-1.0.9.gem
165
- - notifiably_audited-activerecord-1.0.0.gem
166
- - notifiably_audited-activerecord-1.0.1.gem
167
- - notifiably_audited-activerecord-1.0.10.gem
168
- - notifiably_audited-activerecord-1.0.2.gem
169
- - notifiably_audited-activerecord-1.0.3.gem
170
- - notifiably_audited-activerecord-1.0.4.gem
171
- - notifiably_audited-activerecord-1.0.5.gem
172
- - notifiably_audited-activerecord-1.0.6.gem
173
- - notifiably_audited-activerecord-1.0.7.gem
174
- - notifiably_audited-activerecord-1.0.8.gem
175
- - notifiably_audited-activerecord-1.0.9.gem
137
+ - lib/notifiably_audited/version.rb
138
+ - notifiably_audited.gemspec
176
139
  - spec/audited_spec_helpers.rb
177
140
  - spec/rails_app/config/application.rb
178
141
  - spec/rails_app/config/database.yml
@@ -207,17 +170,17 @@ require_paths:
207
170
  - lib
208
171
  required_ruby_version: !ruby/object:Gem::Requirement
209
172
  requirements:
210
- - - ! '>='
173
+ - - ">="
211
174
  - !ruby/object:Gem::Version
212
175
  version: '0'
213
176
  required_rubygems_version: !ruby/object:Gem::Requirement
214
177
  requirements:
215
- - - ! '>='
178
+ - - ">="
216
179
  - !ruby/object:Gem::Version
217
180
  version: '0'
218
181
  requirements: []
219
182
  rubyforge_project:
220
- rubygems_version: 2.2.2
183
+ rubygems_version: 2.6.12
221
184
  signing_key:
222
185
  specification_version: 4
223
186
  summary: ''
@@ -238,4 +201,3 @@ test_files:
238
201
  - spec/support/active_record/schema.rb
239
202
  - spec/support/mongo_mapper/connection.rb
240
203
  - spec/support/mongo_mapper/models.rb
241
- has_rdoc:
data/.travis.yml DELETED
@@ -1,10 +0,0 @@
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 DELETED
@@ -1,3 +0,0 @@
1
- --no-private
2
- --title acts_as_audited
3
- --exclude lib/generators
@@ -1,2 +0,0 @@
1
- require 'notifiably_audited'
2
- require 'notifiably_audited/adapters/active_record'
@@ -1,14 +0,0 @@
1
- require 'rails'
2
-
3
- module NotifiablyAudited
4
- class Engine < ::Rails::Engine
5
- initializer 'notifiably_audited' do |app|
6
- ActiveSupport.on_load(:action_view) do
7
- require "notifiably_audited/helper"
8
- class ActionView::Base
9
- include NotifiablyAudited::NotifiablyAuditedHelpers
10
- end
11
- end
12
- end
13
- end
14
- end
@@ -1,22 +0,0 @@
1
- module NotifiablyAudited
2
- module NotifiablyAuditedHelpers
3
- def notifiably_audited(script)
4
- user_id = current_user.id rescue nil
5
-
6
- html = '<script>
7
-
8
- PrivatePub.subscribe("/notifiably_audited/'
9
-
10
- html += user_id.to_s
11
-
12
- html += '", function(data, channel) {'
13
-
14
- html += script
15
-
16
- html += '});</script>'
17
-
18
- html += subscribe_to "/notifiably_audited/#{user_id}"
19
- end
20
- end
21
- end
22
-
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file