paper_trail_scrapbook 0.1.19 → 0.2.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -2,8 +2,10 @@
2
2
  test: &test
3
3
  adapter: postgresql
4
4
  encoding: unicode
5
- host: localhost
5
+ host: <%= ENV['DATABASE_HOST'] || 'localhost' %>
6
6
  database: pts_db
7
+ username: postgres
8
+ password: postgres
7
9
  port: <%= ENV['DB_PORT'] || 5432 %>
8
10
  pool: 5
9
11
 
@@ -2,5 +2,5 @@
2
2
 
3
3
  # This file is used by Rack-based servers to start the application.
4
4
 
5
- require ::File.expand_path('../config/environment', __FILE__)
5
+ require ::File.expand_path('config/environment', __dir__)
6
6
  run Dummy::Application
@@ -5,36 +5,36 @@ require 'spec_helper'
5
5
  module PaperTrailScrapbook
6
6
  ::RSpec.describe Changes do
7
7
  let(:version) do
8
- OpenStruct.new(id: 2_674_798,
9
- item_type: 'Widget',
10
- item_id: 4804,
11
- event: 'update',
12
- whodunnit: '1742',
13
- object: ['---',
14
- 'id: ',
15
- 'amount: ',
16
- 'authorization_id: ',
17
- 'paid_on: ',
18
- 'created_at: ',
19
- 'updated_at: ',
20
- 'status: active',
21
- 'name: ',
22
- 'email: ',
23
- 'x_address: ',
24
- 'notes: ',
25
- 'internal_notes: ',
26
- 'discount_percent: !ruby/object:BigDecimal 18:0.0',
27
- 'order_number: ',
28
- 'sponsor_delivery_date: ',
29
- 'other_terms: ',
30
- 'payment_terms_cd: ',
31
- 'payment_due_date: ',
32
- 'other_payment_terms: ',
33
- 'created_by: ',
34
- 'sent: false',
35
- 'token: ',
36
- 'discounted_amount: '].join("\n"),
37
- created_at: Time.current,
8
+ OpenStruct.new(id: 2_674_798,
9
+ item_type: 'Widget',
10
+ item_id: 4804,
11
+ event: 'update',
12
+ whodunnit: '1742',
13
+ object: ['---',
14
+ 'id: ',
15
+ 'amount: ',
16
+ 'authorization_id: ',
17
+ 'paid_on: ',
18
+ 'created_at: ',
19
+ 'updated_at: ',
20
+ 'status: active',
21
+ 'name: ',
22
+ 'email: ',
23
+ 'x_address: ',
24
+ 'notes: ',
25
+ 'internal_notes: ',
26
+ 'discount_percent: !ruby/object:BigDecimal 18:0.0',
27
+ 'order_number: ',
28
+ 'sponsor_delivery_date: ',
29
+ 'other_terms: ',
30
+ 'payment_terms_cd: ',
31
+ 'payment_due_date: ',
32
+ 'other_payment_terms: ',
33
+ 'created_by: ',
34
+ 'sent: false',
35
+ 'token: ',
36
+ 'discounted_amount: '].join("\n"),
37
+ created_at: Time.current,
38
38
  object_changes: ['---',
39
39
  'email:',
40
40
  '- ',
@@ -5,15 +5,15 @@ require 'spec_helper'
5
5
  module PaperTrailScrapbook
6
6
  ::RSpec.describe Chapter do
7
7
  let(:version) do
8
- OpenStruct.new(id: 2_674_798,
9
- item_type: 'Widget',
10
- item_id: 4804,
11
- event: 'update',
12
- whodunnit: '1742',
13
- object: ['---',
14
- 'id: ',
15
- 'discounted_amount: '].join("\n"),
16
- created_at: Time.current,
8
+ OpenStruct.new(id: 2_674_798,
9
+ item_type: 'Widget',
10
+ item_id: 4804,
11
+ event: 'update',
12
+ whodunnit: '1742',
13
+ object: ['---',
14
+ 'id: ',
15
+ 'discounted_amount: '].join("\n"),
16
+ created_at: Time.current,
17
17
  object_changes: ['---',
18
18
  'email:',
19
19
  '- ',
@@ -24,5 +24,4 @@ RSpec.describe PaperTrailScrapbook::JournalEntry do
24
24
  "created Book[#{book.id}]:\n")
25
25
  end
26
26
  end
27
-
28
27
  end
@@ -5,15 +5,15 @@ require 'spec_helper'
5
5
  module PaperTrailScrapbook
6
6
  ::RSpec.describe SecondaryChapter do
7
7
  let(:version) do
8
- OpenStruct.new(id: 2_674_798,
9
- item_type: 'Widget',
10
- item_id: 4804,
11
- event: 'update',
12
- whodunnit: '1742',
13
- object: ['---',
14
- 'id: ',
15
- 'discounted_amount: '].join("\n"),
16
- created_at: Time.current,
8
+ OpenStruct.new(id: 2_674_798,
9
+ item_type: 'Widget',
10
+ item_id: 4804,
11
+ event: 'update',
12
+ whodunnit: '1742',
13
+ object: ['---',
14
+ 'id: ',
15
+ 'discounted_amount: '].join("\n"),
16
+ created_at: Time.current,
17
17
  object_changes: ['---',
18
18
  'email:',
19
19
  '- ',
@@ -1,7 +1,6 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  require 'spec_helper'
4
- require 'paper_trail_scrapbook/versions'
5
4
 
6
5
  module PaperTrailScrapbook
7
6
  ::RSpec.describe Versions do
@@ -80,9 +79,7 @@ module PaperTrailScrapbook
80
79
  allow(book).to receive(:respond_to?).with(:version_filter, true).and_return(true)
81
80
  allow(book).to receive(:respond_to?).with(:version_filter).and_return(true)
82
81
  allow(book).to receive(:version_filter) do |version|
83
- if version.event.eql?('update')
84
- version
85
- end
82
+ version if version.event.eql?('update')
86
83
  end
87
84
 
88
85
  result = object.filtered(book.versions)
data/spec/spec_helper.rb CHANGED
@@ -2,7 +2,6 @@
2
2
 
3
3
  # This file is copied to spec/ when you run 'rails generate rspec:install'
4
4
  ENV['RAILS_ENV'] ||= 'test'
5
- ENV['DB'] ||= 'sqlite'
6
5
 
7
6
  require 'simplecov'
8
7
 
@@ -62,7 +61,8 @@ require 'ffaker'
62
61
  require 'timecop'
63
62
 
64
63
  # Run any available migration
65
- ::ActiveRecord::MigrationContext.new(File.expand_path('dummy_app/db/migrate/', __dir__)).migrate
64
+ schema_migration = ActiveRecord::Base.connection.schema_migration
65
+ ::ActiveRecord::MigrationContext.new(File.expand_path('dummy_app/db/migrate/', __dir__), schema_migration).migrate
66
66
 
67
67
  require 'database_cleaner'
68
68
  DatabaseCleaner.strategy = :truncation
@@ -70,12 +70,4 @@ DatabaseCleaner.strategy = :truncation
70
70
  RSpec.configure do |config|
71
71
  config.fixture_path = "#{::Rails.root}/spec/fixtures"
72
72
  config.use_transactional_fixtures = active_record_gem_version >= ::Gem::Version.new('5')
73
-
74
- # In rails < 5, some tests seem to require DatabaseCleaner-truncation.
75
- # Truncation is about three times slower than transaction rollback, so it'll
76
- # be nice when we can drop support for rails < 5.
77
- if active_record_gem_version < ::Gem::Version.new('5')
78
- config.before(:each) { DatabaseCleaner.start }
79
- config.after(:each) { DatabaseCleaner.clean }
80
- end
81
73
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: paper_trail_scrapbook
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.19
4
+ version: 0.2.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Timothy Chambers
8
- autorequire:
8
+ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2020-12-21 00:00:00.000000000 Z
11
+ date: 2022-08-15 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activerecord
@@ -58,20 +58,20 @@ dependencies:
58
58
  requirements:
59
59
  - - ">="
60
60
  - !ruby/object:Gem::Version
61
- version: '5.2'
62
- - - "<="
61
+ version: '11'
62
+ - - "<"
63
63
  - !ruby/object:Gem::Version
64
- version: 10.2.1
64
+ version: '13'
65
65
  type: :runtime
66
66
  prerelease: false
67
67
  version_requirements: !ruby/object:Gem::Requirement
68
68
  requirements:
69
69
  - - ">="
70
70
  - !ruby/object:Gem::Version
71
- version: '5.2'
72
- - - "<="
71
+ version: '11'
72
+ - - "<"
73
73
  - !ruby/object:Gem::Version
74
- version: 10.2.1
74
+ version: '13'
75
75
  - !ruby/object:Gem::Dependency
76
76
  name: ffaker
77
77
  requirement: !ruby/object:Gem::Requirement
@@ -104,14 +104,14 @@ dependencies:
104
104
  name: railties
105
105
  requirement: !ruby/object:Gem::Requirement
106
106
  requirements:
107
- - - '='
107
+ - - ">="
108
108
  - !ruby/object:Gem::Version
109
109
  version: 5.2.3
110
110
  type: :development
111
111
  prerelease: false
112
112
  version_requirements: !ruby/object:Gem::Requirement
113
113
  requirements:
114
- - - '='
114
+ - - ">="
115
115
  - !ruby/object:Gem::Version
116
116
  version: 5.2.3
117
117
  - !ruby/object:Gem::Dependency
@@ -132,32 +132,18 @@ dependencies:
132
132
  name: database_cleaner
133
133
  requirement: !ruby/object:Gem::Requirement
134
134
  requirements:
135
- - - "~>"
135
+ - - ">="
136
136
  - !ruby/object:Gem::Version
137
- version: '1.2'
137
+ version: '0'
138
138
  type: :development
139
139
  prerelease: false
140
140
  version_requirements: !ruby/object:Gem::Requirement
141
141
  requirements:
142
- - - "~>"
142
+ - - ">="
143
143
  - !ruby/object:Gem::Version
144
- version: '1.2'
144
+ version: '0'
145
145
  - !ruby/object:Gem::Dependency
146
146
  name: loofah
147
- requirement: !ruby/object:Gem::Requirement
148
- requirements:
149
- - - "~>"
150
- - !ruby/object:Gem::Version
151
- version: 2.3.1
152
- type: :development
153
- prerelease: false
154
- version_requirements: !ruby/object:Gem::Requirement
155
- requirements:
156
- - - "~>"
157
- - !ruby/object:Gem::Version
158
- version: 2.3.1
159
- - !ruby/object:Gem::Dependency
160
- name: mutant
161
147
  requirement: !ruby/object:Gem::Requirement
162
148
  requirements:
163
149
  - - ">="
@@ -171,7 +157,7 @@ dependencies:
171
157
  - !ruby/object:Gem::Version
172
158
  version: '0'
173
159
  - !ruby/object:Gem::Dependency
174
- name: mutant-rspec
160
+ name: pg
175
161
  requirement: !ruby/object:Gem::Requirement
176
162
  requirements:
177
163
  - - ">="
@@ -185,21 +171,21 @@ dependencies:
185
171
  - !ruby/object:Gem::Version
186
172
  version: '0'
187
173
  - !ruby/object:Gem::Dependency
188
- name: pg
174
+ name: rack
189
175
  requirement: !ruby/object:Gem::Requirement
190
176
  requirements:
191
- - - '='
177
+ - - ">="
192
178
  - !ruby/object:Gem::Version
193
- version: 0.18.4
179
+ version: 2.0.6
194
180
  type: :development
195
181
  prerelease: false
196
182
  version_requirements: !ruby/object:Gem::Requirement
197
183
  requirements:
198
- - - '='
184
+ - - ">="
199
185
  - !ruby/object:Gem::Version
200
- version: 0.18.4
186
+ version: 2.0.6
201
187
  - !ruby/object:Gem::Dependency
202
- name: rspec-rails
188
+ name: rspec-jumpstart
203
189
  requirement: !ruby/object:Gem::Requirement
204
190
  requirements:
205
191
  - - ">="
@@ -213,7 +199,7 @@ dependencies:
213
199
  - !ruby/object:Gem::Version
214
200
  version: '0'
215
201
  - !ruby/object:Gem::Dependency
216
- name: rspec-jumpstart
202
+ name: rspec_junit_formatter
217
203
  requirement: !ruby/object:Gem::Requirement
218
204
  requirements:
219
205
  - - ">="
@@ -227,7 +213,7 @@ dependencies:
227
213
  - !ruby/object:Gem::Version
228
214
  version: '0'
229
215
  - !ruby/object:Gem::Dependency
230
- name: rspec_junit_formatter
216
+ name: rspec-rails
231
217
  requirement: !ruby/object:Gem::Requirement
232
218
  requirements:
233
219
  - - ">="
@@ -296,29 +282,16 @@ dependencies:
296
282
  - - "~>"
297
283
  - !ruby/object:Gem::Version
298
284
  version: 0.8.0
299
- - !ruby/object:Gem::Dependency
300
- name: rack
301
- requirement: !ruby/object:Gem::Requirement
302
- requirements:
303
- - - ">="
304
- - !ruby/object:Gem::Version
305
- version: 2.0.6
306
- type: :development
307
- prerelease: false
308
- version_requirements: !ruby/object:Gem::Requirement
309
- requirements:
310
- - - ">="
311
- - !ruby/object:Gem::Version
312
- version: 2.0.6
313
285
  description: Human Readable Change Log for Paper Trail'd data
314
286
  email: tim@hint.io
315
287
  executables: []
316
288
  extensions: []
317
289
  extra_rdoc_files: []
318
290
  files:
319
- - ".circleci/config.yml"
320
291
  - ".codeclimate.yml"
292
+ - ".github/workflows/ci.yml"
321
293
  - ".gitignore"
294
+ - ".old_circleci/old_config.yml"
322
295
  - ".rspec"
323
296
  - ".rubocop.yml"
324
297
  - ".ruby-gemset"
@@ -341,11 +314,7 @@ files:
341
314
  - lib/paper_trail_scrapbook/version.rb
342
315
  - lib/paper_trail_scrapbook/version_helpers.rb
343
316
  - lib/paper_trail_scrapbook/versions.rb
344
- - log/mutant/pts.log
345
317
  - paper_trail_scrapbook.gemspec
346
- - pkg/paper_trail_scrapbook-0.0.2.gem
347
- - pkg/paper_trail_scrapbook-0.1.6.gem
348
- - pkg/paper_trail_scrapbook-0.1.7.gem
349
318
  - spec/dummy_app/Rakefile
350
319
  - spec/dummy_app/app/models/animal.rb
351
320
  - spec/dummy_app/app/models/article.rb
@@ -433,7 +402,7 @@ homepage: https://github.com/hintmedia/paper_trail_scrapbook
433
402
  licenses:
434
403
  - MIT
435
404
  metadata: {}
436
- post_install_message:
405
+ post_install_message:
437
406
  rdoc_options: []
438
407
  require_paths:
439
408
  - lib
@@ -441,16 +410,15 @@ required_ruby_version: !ruby/object:Gem::Requirement
441
410
  requirements:
442
411
  - - ">="
443
412
  - !ruby/object:Gem::Version
444
- version: 2.3.0
413
+ version: '2.6'
445
414
  required_rubygems_version: !ruby/object:Gem::Requirement
446
415
  requirements:
447
416
  - - ">="
448
417
  - !ruby/object:Gem::Version
449
418
  version: 1.3.6
450
419
  requirements: []
451
- rubyforge_project:
452
- rubygems_version: 2.5.2.3
453
- signing_key:
420
+ rubygems_version: 3.0.3.1
421
+ signing_key:
454
422
  specification_version: 4
455
423
  summary: Paper Trail Scrapbook
456
424
  test_files: []