mordor-auditing 0.0.23 → 0.1.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA1:
3
+ metadata.gz: 7a44cab63d6de2b3d011163e348776d71498135b
4
+ data.tar.gz: 0b285a862c161d25372b0a76de9fa3473a40eab5
5
+ SHA512:
6
+ metadata.gz: b0fd2319aaa0c3232eeb130bdbd02d00eb963107f06e151fe0667a5df926b5285f5357beda51d42d3d5d9a2896c3556427c187e6f93ed74942b0963a61d0014e
7
+ data.tar.gz: 006da48ef7016d2a41d12c030a4320c8eecb64c41f91576c7654c100cd1ba9834bfd68951ad9354c124de12b58ea001a17872101609d27017342e8363890f9e0
data/.gitignore CHANGED
@@ -1,3 +1,5 @@
1
1
  pkg/*
2
2
  .rvmrc
3
+ .ruby-*
3
4
  Gemfile.lock
5
+ .bundle
@@ -1,4 +1,6 @@
1
1
  language: ruby
2
+ cache: bundler
3
+ bundler_args: --without optional
2
4
 
3
5
  jdk:
4
6
  - oraclejdk7
@@ -7,14 +9,14 @@ services:
7
9
  - mongodb
8
10
 
9
11
  rvm:
10
- - 1.8.7
11
- - 1.9.2
12
12
  - 1.9.3
13
- - jruby-18mode
13
+ - 2.1.6
14
+ - 2.2.2
14
15
  - jruby-19mode
15
- - rbx-18mode
16
16
  - rbx-19mode
17
+ - rbx-2.5.3
17
18
 
18
19
  matrix:
19
20
  allow_failures:
20
21
  - rvm: rbx-19mode
22
+ - rvm: rbx-2.5.3
@@ -0,0 +1,9 @@
1
+ 0.1.0
2
+ -----------
3
+ - Requires mordor 0.3.x (adds connection pool support)
4
+ - Deprecates support for MRI/JRuby/Rbx < 1.9.3
5
+ - Adds support for MRI 2.1.x and 2.2.x
6
+
7
+ 0.0.23
8
+ -----------
9
+ - First stable release
data/Gemfile CHANGED
@@ -1,11 +1,3 @@
1
- source "http://rubygems.org"
2
- gem "bundler", "> 1.0.0"
3
- gem "rake"
4
- gem "extlib"
5
- gem "json"
6
- gem "mongo"
7
- gem "mordor"
1
+ source 'https://rubygems.org'
8
2
 
9
- group :test do
10
- gem "rspec", "~> 2.0"
11
- end
3
+ gemspec
@@ -1,26 +1,27 @@
1
+ require './lib/auditing/version'
2
+
1
3
  Gem::Specification.new do |s|
2
- s.name = "mordor-auditing"
3
-
4
+ s.name = 'mordor-auditing'
5
+
4
6
  # Do not set the version and date field manually, this is done by the release script
5
- s.version = "0.0.23"
6
- s.date = "2013-01-23"
7
+ s.version = Auditing::VERSION
8
+ s.date = "2015-05-15"
7
9
 
8
- s.summary = "mordor-auditing"
10
+ s.summary = 'mordor-auditing'
9
11
  s.description = <<-eos
10
12
  Auditing classes based on the Mordor gem, used to audit requests and modifications on objects
11
13
  eos
12
14
 
13
- s.add_development_dependency('rake')
14
- s.add_development_dependency('rspec', '~> 2.0')
15
-
16
- s.add_development_dependency('mordor')
17
- s.add_runtime_dependency('mordor')
18
-
19
15
  s.authors = ['Jan-Willem Koelewijn', 'Dirkjan Bussink']
20
16
  s.email = ['janwillem.koelewijn@nedap.com', 'dirkjan.bussink@nedap.com']
21
17
  s.homepage = 'http://www.nedap.com'
22
18
 
19
+ s.add_runtime_dependency 'mordor', '~> 0.3.0'
20
+
21
+ s.add_development_dependency 'rake'
22
+ s.add_development_dependency 'rspec', '~> 2.0', '< 2.99'
23
+
23
24
  # The files and test_files directives are set automatically by the release script.
24
25
  # Do not change them by hand, but make sure to add the files to the git repository.
25
- s.files = %w(.gitignore .travis.yml Gemfile LICENSE README.md Rakefile auditing.gemspec lib/auditing.rb lib/auditing/modification.rb lib/auditing/request.rb lib/auditing/version.rb spec/auditing/modification_spec.rb spec/auditing/request_spec.rb spec/spec.opts spec/spec_helper.rb tasks/github-gem.rake)
26
+ s.files = %w(.gitignore .travis.yml CHANGES.md Gemfile LICENSE README.md Rakefile auditing.gemspec lib/auditing.rb lib/auditing/modification.rb lib/auditing/request.rb lib/auditing/version.rb spec/auditing/modification_spec.rb spec/auditing/request_spec.rb spec/spec.opts spec/spec_helper.rb tasks/github-gem.rake)
26
27
  end
@@ -1,3 +1,3 @@
1
1
  module Auditing
2
- VERSION = "0.0.1"
2
+ VERSION = '0.1.0'
3
3
  end
@@ -85,7 +85,7 @@ describe "with respect to modifications" do
85
85
  }
86
86
 
87
87
  mod = Auditing::Modification.new(options)
88
- mod.save.should be_true
88
+ mod.save.should be true
89
89
  mod._id.should_not be_nil
90
90
 
91
91
  Auditing::Modification.collection.count.should == 1
@@ -109,7 +109,7 @@ describe "with respect to modifications" do
109
109
  }
110
110
 
111
111
  @modification = Auditing::Modification.new(options)
112
- @modification.save.should be_true
112
+ @modification.save.should be true
113
113
  @modification._id.should_not be_nil
114
114
  end
115
115
 
@@ -149,7 +149,7 @@ describe "with respect to modifications" do
149
149
 
150
150
  it "should correctly retrieve requests by request_id" do
151
151
  @modification.request_id = "4e79b0b20e02e145a9000001"
152
- @modification.save.should be_true
152
+ @modification.save.should be true
153
153
  mods = Auditing::Modification.find_by_request_id(@modification.request_id)
154
154
  mods.size.should == 1
155
155
  compare_modifications(@modification, mods.first)
@@ -157,7 +157,7 @@ describe "with respect to modifications" do
157
157
 
158
158
  it "should correctly retrieve requests by request" do
159
159
  @modification.request_id = "4e79b0b20e02e145a9000001"
160
- @modification.save.should be_true
160
+ @modification.save.should be true
161
161
  mods = Auditing::Modification.find_by_request(@modification.request_id)
162
162
  mods.size.should == 1
163
163
  compare_modifications(@modification, mods.first)
@@ -119,7 +119,7 @@ describe "with respect to auditing requests" do
119
119
  :at => Time.now
120
120
  }
121
121
  request = Auditing::Request.new(options)
122
- request.save.should be_true
122
+ request.save.should be true
123
123
  request._id.should_not be_nil
124
124
 
125
125
  Auditing::Request.collection.count.should == 1
@@ -142,7 +142,7 @@ describe "with respect to auditing requests" do
142
142
  :at => @request_time
143
143
  }
144
144
  @request = Auditing::Request.new(options)
145
- @request.save.should be_true
145
+ @request.save.should be true
146
146
  Auditing::Request.collection.find(:_id => @request._id).count.should == 1
147
147
  end
148
148
 
@@ -200,10 +200,9 @@ describe "with respect to auditing requests" do
200
200
  :changes => {:url => [@request.url, "#{@request.url}/request"]},
201
201
  :action => 'get',
202
202
  :at => @request_time,
203
- :request_id => @request._id
204
203
  }
205
204
  @modification = Auditing::Modification.new(options)
206
- @modification.save.should be_true
205
+ @modification.save.should be true
207
206
  @modification._id.should_not be_nil
208
207
  Auditing::Modification.collection.count == 1
209
208
  end
@@ -235,7 +234,7 @@ describe "with respect to auditing requests" do
235
234
  :at => Time.now
236
235
  }
237
236
  @request = Auditing::Request.new(options)
238
- @request.save.should be_true
237
+ @request.save.should be true
239
238
  end
240
239
 
241
240
  it "should create url parts when saved" do
@@ -265,7 +264,7 @@ describe "with respect to auditing requests" do
265
264
  :at => Time.now
266
265
  }
267
266
  request = Auditing::Request.new(options)
268
- request.save.should be_true
267
+ request.save.should be true
269
268
  request.url_parts.keys.should include "week"
270
269
  request.url_parts["week"].should == "2011-9"
271
270
 
@@ -278,7 +277,7 @@ describe "with respect to auditing requests" do
278
277
  :at => Time.now
279
278
  }
280
279
  request = Auditing::Request.new(options)
281
- request.save.should be_true
280
+ request.save.should be true
282
281
  request.url_parts.keys.should_not include "week"
283
282
  end
284
283
 
@@ -292,7 +291,7 @@ describe "with respect to auditing requests" do
292
291
  :at => Time.now
293
292
  }
294
293
  request = Auditing::Request.new(options)
295
- request.save.should be_true
294
+ request.save.should be true
296
295
 
297
296
  options2 = {
298
297
  :url => '/week/2011-9/staffing_agencies/13/customers/124/arrangements/123',
@@ -303,7 +302,7 @@ describe "with respect to auditing requests" do
303
302
  :at => Time.now
304
303
  }
305
304
  request2 = Auditing::Request.new(options2)
306
- request2.save.should be_true
305
+ request2.save.should be true
307
306
 
308
307
  search_options = {
309
308
  :week => "2011-9"
@@ -312,7 +311,7 @@ describe "with respect to auditing requests" do
312
311
  results.size.should == 2
313
312
 
314
313
  match = (results.first._id == request._id || results.first._id == request2._id)
315
- match.should be_true
314
+ match.should be true
316
315
 
317
316
  search_options = {
318
317
  :staffing_agencies => 1234
@@ -330,7 +329,7 @@ describe "with respect to auditing requests" do
330
329
  results.size.should == 2
331
330
 
332
331
  match = (results.first._id == request._id || results.first._id == request2._id)
333
- match.should be_true
332
+ match.should be true
334
333
  end
335
334
 
336
335
  it "should be possible to add extra query parts to the url_parts query" do
@@ -343,7 +342,7 @@ describe "with respect to auditing requests" do
343
342
  :at => Time.now
344
343
  }
345
344
  request = Auditing::Request.new(options)
346
- request.save.should be_true
345
+ request.save.should be true
347
346
 
348
347
  options2 = {
349
348
  :url => '/week/2011-9/staffing_agencies/13/customers/124/arrangements/123',
@@ -354,7 +353,7 @@ describe "with respect to auditing requests" do
354
353
  :at => Time.now
355
354
  }
356
355
  request2 = Auditing::Request.new(options2)
357
- request2.save.should be_true
356
+ request2.save.should be true
358
357
 
359
358
  search_options = {
360
359
  :week => "2011-9"
@@ -135,7 +135,7 @@ module GithubGem
135
135
 
136
136
  desc "Release a new version of the gem using the VERSION environment variable"
137
137
  task(:release => release_tasks) { release_task }
138
-
138
+
139
139
  namespace(:release) do
140
140
  desc "Release the next version of the gem, by incrementing the last version segment by 1"
141
141
  task(:next => [:next_version] + release_tasks) { release_task }
@@ -161,7 +161,7 @@ module GithubGem
161
161
  task(:next_patch_version) { next_version_task(:patch) }
162
162
  task(:next_minor_version) { next_version_task(:minor) }
163
163
  task(:next_major_version) { next_version_task(:major) }
164
-
164
+
165
165
  desc "Updates the gem release tasks with the latest version on Github"
166
166
  task(:update_tasks) { update_tasks_task }
167
167
  end
@@ -186,7 +186,7 @@ module GithubGem
186
186
  end
187
187
 
188
188
  def newest_version
189
- `#{git} tag`.split("\n").map { |tag| tag.split('-').last }.compact.map { |v| Gem::Version.new(v) }.max || Gem::Version.new('0.0.0')
189
+ `#{git} tag`.split("\n").map { |tag| tag.split('v').last }.compact.map { |v| Gem::Version.new(v) }.max || Gem::Version.new('0.0.0')
190
190
  end
191
191
 
192
192
  def next_version(increment = nil)
@@ -198,11 +198,11 @@ module GithubGem
198
198
  when :major then 0
199
199
  else next_version.length - 1
200
200
  end
201
-
201
+
202
202
  next_version[increment_index] ||= 0
203
203
  next_version[increment_index] = next_version[increment_index].succ
204
204
  ((increment_index + 1)...next_version.length).each { |i| next_version[i] = 0 }
205
-
205
+
206
206
  Gem::Version.new(next_version.join('.'))
207
207
  end
208
208
 
@@ -258,7 +258,7 @@ module GithubGem
258
258
 
259
259
  # Adds a tag for the released version
260
260
  def tag_version_task
261
- sh git, 'tag', '-a', "#{gemspec.name}-#{gemspec.version}", '-m', "Released #{gemspec.name} gem version #{gemspec.version}."
261
+ sh git, 'tag', '-a', "v#{gemspec.version}", '-m', "Released #{gemspec.name} gem version #{gemspec.version}."
262
262
  end
263
263
 
264
264
  # Pushes the changes and tag to github
@@ -334,7 +334,7 @@ module GithubGem
334
334
 
335
335
  # Reload the gemspec so the changes are incorporated
336
336
  load_gemspec!
337
-
337
+
338
338
  # Also mark the Gemfile.lock file as changed because of the new version.
339
339
  modified_files << 'Gemfile.lock' if File.exist?(File.join(root_dir, 'Gemfile.lock'))
340
340
  end
@@ -344,7 +344,7 @@ module GithubGem
344
344
  def update_tasks_task
345
345
  require 'net/https'
346
346
  require 'uri'
347
-
347
+
348
348
  uri = URI.parse('https://raw.github.com/wvanbergen/github-gem/master/tasks/github-gem.rake')
349
349
  http = Net::HTTP.new(uri.host, uri.port)
350
350
  http.use_ssl = true
metadata CHANGED
@@ -1,94 +1,76 @@
1
- --- !ruby/object:Gem::Specification
1
+ --- !ruby/object:Gem::Specification
2
2
  name: mordor-auditing
3
- version: !ruby/object:Gem::Version
4
- hash: 49
5
- prerelease:
6
- segments:
7
- - 0
8
- - 0
9
- - 23
10
- version: 0.0.23
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.1.0
11
5
  platform: ruby
12
- authors:
6
+ authors:
13
7
  - Jan-Willem Koelewijn
14
8
  - Dirkjan Bussink
15
9
  autorequire:
16
10
  bindir: bin
17
11
  cert_chain: []
18
-
19
- date: 2013-01-23 00:00:00 +01:00
20
- default_executable:
21
- dependencies:
22
- - !ruby/object:Gem::Dependency
23
- type: :development
12
+ date: 2015-05-15 00:00:00.000000000 Z
13
+ dependencies:
14
+ - !ruby/object:Gem::Dependency
15
+ name: mordor
16
+ requirement: !ruby/object:Gem::Requirement
17
+ requirements:
18
+ - - "~>"
19
+ - !ruby/object:Gem::Version
20
+ version: 0.3.0
21
+ type: :runtime
24
22
  prerelease: false
25
- version_requirements: &id001 !ruby/object:Gem::Requirement
26
- none: false
27
- requirements:
28
- - - ">="
29
- - !ruby/object:Gem::Version
30
- hash: 3
31
- segments:
32
- - 0
33
- version: "0"
23
+ version_requirements: !ruby/object:Gem::Requirement
24
+ requirements:
25
+ - - "~>"
26
+ - !ruby/object:Gem::Version
27
+ version: 0.3.0
28
+ - !ruby/object:Gem::Dependency
34
29
  name: rake
35
- requirement: *id001
36
- - !ruby/object:Gem::Dependency
30
+ requirement: !ruby/object:Gem::Requirement
31
+ requirements:
32
+ - - ">="
33
+ - !ruby/object:Gem::Version
34
+ version: '0'
37
35
  type: :development
38
36
  prerelease: false
39
- version_requirements: &id002 !ruby/object:Gem::Requirement
40
- none: false
41
- requirements:
42
- - - ~>
43
- - !ruby/object:Gem::Version
44
- hash: 3
45
- segments:
46
- - 2
47
- - 0
48
- version: "2.0"
37
+ version_requirements: !ruby/object:Gem::Requirement
38
+ requirements:
39
+ - - ">="
40
+ - !ruby/object:Gem::Version
41
+ version: '0'
42
+ - !ruby/object:Gem::Dependency
49
43
  name: rspec
50
- requirement: *id002
51
- - !ruby/object:Gem::Dependency
44
+ requirement: !ruby/object:Gem::Requirement
45
+ requirements:
46
+ - - "~>"
47
+ - !ruby/object:Gem::Version
48
+ version: '2.0'
49
+ - - "<"
50
+ - !ruby/object:Gem::Version
51
+ version: '2.99'
52
52
  type: :development
53
53
  prerelease: false
54
- version_requirements: &id003 !ruby/object:Gem::Requirement
55
- none: false
56
- requirements:
57
- - - ">="
58
- - !ruby/object:Gem::Version
59
- hash: 3
60
- segments:
61
- - 0
62
- version: "0"
63
- name: mordor
64
- requirement: *id003
65
- - !ruby/object:Gem::Dependency
66
- type: :runtime
67
- prerelease: false
68
- version_requirements: &id004 !ruby/object:Gem::Requirement
69
- none: false
70
- requirements:
71
- - - ">="
72
- - !ruby/object:Gem::Version
73
- hash: 3
74
- segments:
75
- - 0
76
- version: "0"
77
- name: mordor
78
- requirement: *id004
79
- description: " Auditing classes based on the Mordor gem, used to audit requests and modifications on objects\n"
80
- email:
54
+ version_requirements: !ruby/object:Gem::Requirement
55
+ requirements:
56
+ - - "~>"
57
+ - !ruby/object:Gem::Version
58
+ version: '2.0'
59
+ - - "<"
60
+ - !ruby/object:Gem::Version
61
+ version: '2.99'
62
+ description: |2
63
+ Auditing classes based on the Mordor gem, used to audit requests and modifications on objects
64
+ email:
81
65
  - janwillem.koelewijn@nedap.com
82
66
  - dirkjan.bussink@nedap.com
83
67
  executables: []
84
-
85
68
  extensions: []
86
-
87
69
  extra_rdoc_files: []
88
-
89
- files:
90
- - .gitignore
91
- - .travis.yml
70
+ files:
71
+ - ".gitignore"
72
+ - ".travis.yml"
73
+ - CHANGES.md
92
74
  - Gemfile
93
75
  - LICENSE
94
76
  - README.md
@@ -103,39 +85,27 @@ files:
103
85
  - spec/spec.opts
104
86
  - spec/spec_helper.rb
105
87
  - tasks/github-gem.rake
106
- has_rdoc: true
107
88
  homepage: http://www.nedap.com
108
89
  licenses: []
109
-
90
+ metadata: {}
110
91
  post_install_message:
111
92
  rdoc_options: []
112
-
113
- require_paths:
93
+ require_paths:
114
94
  - lib
115
- required_ruby_version: !ruby/object:Gem::Requirement
116
- none: false
117
- requirements:
95
+ required_ruby_version: !ruby/object:Gem::Requirement
96
+ requirements:
118
97
  - - ">="
119
- - !ruby/object:Gem::Version
120
- hash: 3
121
- segments:
122
- - 0
123
- version: "0"
124
- required_rubygems_version: !ruby/object:Gem::Requirement
125
- none: false
126
- requirements:
98
+ - !ruby/object:Gem::Version
99
+ version: '0'
100
+ required_rubygems_version: !ruby/object:Gem::Requirement
101
+ requirements:
127
102
  - - ">="
128
- - !ruby/object:Gem::Version
129
- hash: 3
130
- segments:
131
- - 0
132
- version: "0"
103
+ - !ruby/object:Gem::Version
104
+ version: '0'
133
105
  requirements: []
134
-
135
106
  rubyforge_project:
136
- rubygems_version: 1.5.2
107
+ rubygems_version: 2.4.6
137
108
  signing_key:
138
- specification_version: 3
109
+ specification_version: 4
139
110
  summary: mordor-auditing
140
111
  test_files: []
141
-