mordor-auditing 0.0.7 → 0.0.8

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/Gemfile.lock CHANGED
@@ -1,8 +1,8 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- mordor-auditing (0.0.6)
5
- mordor (= 0.2.2)
4
+ mordor-auditing (0.0.7)
5
+ mordor (= 0.2.3)
6
6
 
7
7
  GEM
8
8
  specs:
@@ -13,7 +13,7 @@ GEM
13
13
  json (1.6.1)
14
14
  mongo (1.4.0)
15
15
  bson (= 1.4.0)
16
- mordor (0.2.2)
16
+ mordor (0.2.3)
17
17
  bson_ext
18
18
  extlib
19
19
  json
@@ -32,7 +32,7 @@ PLATFORMS
32
32
  ruby
33
33
 
34
34
  DEPENDENCIES
35
- mordor (= 0.2.2)
35
+ mordor (= 0.2.3)
36
36
  mordor-auditing!
37
37
  rake
38
38
  rspec (~> 2.0)
data/auditing.gemspec CHANGED
@@ -2,8 +2,8 @@ Gem::Specification.new do |s|
2
2
  s.name = "mordor-auditing"
3
3
 
4
4
  # Do not set the version and date field manually, this is done by the release script
5
- s.version = "0.0.7"
6
- s.date = "2011-12-28"
5
+ s.version = "0.0.8"
6
+ s.date = "2012-01-02"
7
7
 
8
8
  s.summary = "mordor-auditing"
9
9
  s.description = <<-eos
@@ -13,9 +13,9 @@ Gem::Specification.new do |s|
13
13
  s.add_development_dependency('rake')
14
14
  s.add_development_dependency('rspec', '~> 2.0')
15
15
 
16
- s.add_development_dependency('mordor', '0.2.2')
16
+ s.add_development_dependency('mordor', '0.2.3')
17
17
 
18
- s.add_runtime_dependency('mordor', '0.2.2')
18
+ s.add_runtime_dependency('mordor', '0.2.3')
19
19
 
20
20
  s.authors = ['Jan-Willem Koelewijn', 'Dirkjan Bussink']
21
21
  s.email = ['janwillem.koelewijn@nedap.com', 'dirkjan.bussink@nedap.com']
@@ -37,15 +37,9 @@ module Auditing
37
37
  end
38
38
 
39
39
  def to_hash
40
- {
41
- :request_id => request_id,
42
- :object_type => object_type,
43
- :object_id => object_id,
44
- :changes => changes,
45
- :action => action,
46
- :at => at,
47
- :timestamp => timestamp
48
- }
40
+ h = super
41
+ h[:request_id] = request_id
42
+ h
49
43
  end
50
44
 
51
45
  def changes=(changes)
@@ -11,19 +11,6 @@ module Auditing
11
11
  attribute :at, :index => true
12
12
  attribute :timestamp, :timestamp => true, :index => true
13
13
 
14
- def to_hash
15
- {
16
- :user_id => user_id,
17
- :real_user_id => real_user_id,
18
- :params => params,
19
- :url => url,
20
- :url_parts => url_parts,
21
- :method => method,
22
- :at => at,
23
- :timestamp => timestamp
24
- }
25
- end
26
-
27
14
  def url=(url)
28
15
  self.url_parts = url_to_parts(url)
29
16
  @url = url
@@ -69,6 +69,7 @@ describe "with respect to modifications" do
69
69
  }
70
70
 
71
71
  mod = Auditing::Modification.create(options)
72
+ mod.reload
72
73
  mod.timestamp.should_not be_nil
73
74
  mod.timestamp.should_not == BSON::Timestamp.new(0,0)
74
75
  end
@@ -87,6 +87,7 @@ describe "with respect to auditing requests" do
87
87
  :params => {:first => Date.today}
88
88
  }
89
89
  request = Auditing::Request.create(options)
90
+ request.reload
90
91
  request.timestamp.should_not be_nil
91
92
  request.timestamp.should_not == BSON::Timestamp.new(0,0)
92
93
  end
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: mordor-auditing
3
3
  version: !ruby/object:Gem::Version
4
- hash: 17
4
+ hash: 15
5
5
  prerelease: false
6
6
  segments:
7
7
  - 0
8
8
  - 0
9
- - 7
10
- version: 0.0.7
9
+ - 8
10
+ version: 0.0.8
11
11
  platform: ruby
12
12
  authors:
13
13
  - Jan-Willem Koelewijn
@@ -16,7 +16,7 @@ autorequire:
16
16
  bindir: bin
17
17
  cert_chain: []
18
18
 
19
- date: 2011-12-28 00:00:00 +01:00
19
+ date: 2012-01-02 00:00:00 +01:00
20
20
  default_executable:
21
21
  dependencies:
22
22
  - !ruby/object:Gem::Dependency
@@ -56,12 +56,12 @@ dependencies:
56
56
  requirements:
57
57
  - - "="
58
58
  - !ruby/object:Gem::Version
59
- hash: 19
59
+ hash: 17
60
60
  segments:
61
61
  - 0
62
62
  - 2
63
- - 2
64
- version: 0.2.2
63
+ - 3
64
+ version: 0.2.3
65
65
  type: :development
66
66
  version_requirements: *id003
67
67
  - !ruby/object:Gem::Dependency
@@ -72,12 +72,12 @@ dependencies:
72
72
  requirements:
73
73
  - - "="
74
74
  - !ruby/object:Gem::Version
75
- hash: 19
75
+ hash: 17
76
76
  segments:
77
77
  - 0
78
78
  - 2
79
- - 2
80
- version: 0.2.2
79
+ - 3
80
+ version: 0.2.3
81
81
  type: :runtime
82
82
  version_requirements: *id004
83
83
  description: " Auditing classes based on the Mordor gem, used to audit requests and modifications on objects\n"