auditing 1.1.0 → 1.1.1

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.
data/VERSION CHANGED
@@ -1 +1 @@
1
- 1.1.0
1
+ 1.1.1
data/auditing.gemspec CHANGED
@@ -5,7 +5,7 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = %q{auditing}
8
- s.version = "1.1.0"
8
+ s.version = "1.1.1"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["Brad Cantin"]
@@ -90,7 +90,7 @@ module Auditing
90
90
  return unless send(model).respond_to?('log_association_create')
91
91
  field_names.each do |field|
92
92
  field_value = send(field)
93
- next unless field_value
93
+ next unless field_value.present?
94
94
  model_instance = send(model)
95
95
  model_instance.log_association_create(self, {:field => field,
96
96
  :value => field_value})
@@ -5,15 +5,13 @@ module Auditing
5
5
  undoable?
6
6
  end
7
7
 
8
- def show_action
9
- action
10
- end
11
-
12
8
  def old_value
9
+ return nil unless read_attribute(:old_value)
13
10
  Marshal.load(read_attribute(:old_value))
14
11
  end
15
12
 
16
13
  def new_value
14
+ return nil unless read_attribute(:new_value)
17
15
  Marshal.load(read_attribute(:new_value))
18
16
  end
19
17
 
@@ -2,7 +2,7 @@ require 'spec_helper'
2
2
 
3
3
  describe "Auditor" do
4
4
  it 'adds the Auditing::Auditor module to the Audit class' do
5
- Audit.new.should respond_to(:show_action)
5
+ Audit.new.should respond_to(:rollback)
6
6
  end
7
7
 
8
8
  describe "#rollback" do
metadata CHANGED
@@ -5,8 +5,8 @@ version: !ruby/object:Gem::Version
5
5
  segments:
6
6
  - 1
7
7
  - 1
8
- - 0
9
- version: 1.1.0
8
+ - 1
9
+ version: 1.1.1
10
10
  platform: ruby
11
11
  authors:
12
12
  - Brad Cantin