paper_trail_scrapbook 0.1.17 → 0.1.18

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 9ff0a97ed68a0f3cef1d5ef251af365708fd314ffad8b62884317c1a6777849b
4
- data.tar.gz: 48584f1b21cc3bdd6cf6029225cdbb4be4fcbe2d83cc24a6209ff0524d308857
3
+ metadata.gz: aa47cf69ac7a2144dc53b73398b15ca2de056a755288b8d046dff1b5a81f72ac
4
+ data.tar.gz: d3287790361e5a2ebca3faec7898f242593658386fcff8edb682e5b61680681c
5
5
  SHA512:
6
- metadata.gz: ecc1c2525dd8566b5b055e61b96b09672d07fd19c1bfb03c4d1519ce6e326e97ff14b90a34daf3590e560041a14a92a29685f47b2e1574894faf962686412290
7
- data.tar.gz: 4c6e7c3101c504792db22b7e01a283f281399ce2c72814ede5a8c1eed94b8658426342244f0e7d9d4b2f68c04fffe37091dac1953aa084394aff1a35a64f9173
6
+ metadata.gz: 5f160146eca7e32aa5f1bad9251db38b9a25f58f404c0b02f70526a450a86e294983e1bd5a9be3903cceb76d1d5e6746d0dfef941fa59bd6931c1059581114d7
7
+ data.tar.gz: c1af014f91175252110e50459bc33f594ff4a5d1edfd738ea7502f83ed8d9e7c79d70081fb7ac0cd003ea4779bece333628e714712232834149949897ec7967e
@@ -1,6 +1,8 @@
1
1
  defaults: &defaults
2
2
  docker:
3
3
  - image: circleci/ruby:2.5.0-node-browsers
4
+ environment:
5
+ PGUSER: circleci
4
6
  - image: circleci/postgres:9.5-alpine
5
7
  environment:
6
8
  POSTGRES_USER: circleci
@@ -21,10 +23,11 @@ jobs:
21
23
  command: |
22
24
  echo 'export BUNDLER_VERSION=$(cat Gemfile.lock | tail -1 | tr -d " ")' >> $BASH_ENV
23
25
  source $BASH_ENV
24
- gem install bundler
26
+ gem install bundler -v $BUNDLER_VERSION
25
27
  - run:
26
28
  name: Bundle Install
27
- command: bundle check || bundle install
29
+ command:
30
+ bundle check || bundle install
28
31
  - save_cache:
29
32
  key: paper_trail_scrapbook-{{ checksum "Gemfile.lock" }}
30
33
  paths:
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- paper_trail_scrapbook (0.1.17)
4
+ paper_trail_scrapbook (0.1.18)
5
5
  activerecord
6
6
  adamantium
7
7
  concord
@@ -98,7 +98,7 @@ GEM
98
98
  mutant-rspec (0.8.14)
99
99
  mutant (~> 0.8.14)
100
100
  rspec-core (>= 3.4.0, < 3.7.0)
101
- nokogiri (1.10.5)
101
+ nokogiri (1.10.8)
102
102
  mini_portile2 (~> 2.4.0)
103
103
  paper_trail (10.2.1)
104
104
  activerecord (>= 4.2, < 6.1)
@@ -109,7 +109,7 @@ GEM
109
109
  pg (0.18.4)
110
110
  powerpack (0.1.1)
111
111
  procto (0.0.3)
112
- rack (2.0.7)
112
+ rack (2.0.8)
113
113
  rack-test (1.1.0)
114
114
  rack (>= 1.0, < 3)
115
115
  rails-dom-testing (2.0.3)
@@ -124,15 +124,16 @@ GEM
124
124
  rake (>= 0.8.7)
125
125
  thor (>= 0.19.0, < 2.0)
126
126
  rainbow (3.0.0)
127
- rake (10.4.2)
127
+ rake (13.0.1)
128
128
  regexp_parser (0.4.9)
129
- request_store (1.4.1)
129
+ request_store (1.5.0)
130
130
  rack (>= 1.4)
131
131
  rspec-core (3.6.0)
132
132
  rspec-support (~> 3.6.0)
133
133
  rspec-expectations (3.6.0)
134
134
  diff-lcs (>= 1.2.0, < 2.0)
135
135
  rspec-support (~> 3.6.0)
136
+ rspec-jumpstart (1.1.2)
136
137
  rspec-mocks (3.6.0)
137
138
  diff-lcs (>= 1.2.0, < 2.0)
138
139
  rspec-support (~> 3.6.0)
@@ -191,7 +192,8 @@ DEPENDENCIES
191
192
  pg (= 0.18.4)
192
193
  rack (>= 2.0.6)
193
194
  railties (= 5.2.3)
194
- rake (~> 10.4.2)
195
+ rake (~> 13.0.1)
196
+ rspec-jumpstart
195
197
  rspec-rails
196
198
  rspec_junit_formatter
197
199
  rubocop
@@ -200,4 +202,4 @@ DEPENDENCIES
200
202
  timecop (~> 0.8.0)
201
203
 
202
204
  BUNDLED WITH
203
- 2.0.2
205
+ 2.1.4
data/README.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # Paper Trail Scrapbook
2
2
 
3
- [![CircleCI](https://circleci.com/gh/tjchambers/paper_trail_scrapbook/tree/master.svg?style=svg)](https://circleci.com/gh/tjchambers/paper_trail_scrapbook/tree/master)
3
+ [![CircleCI](https://circleci.com/gh/hintmedia/paper_trail_scrapbook/tree/master.svg?style=svg)](https://circleci.com/gh/tjchambers/paper_trail_scrapbook/tree/master)
4
4
  [![Gem Version](https://badge.fury.io/rb/paper_trail_scrapbook.svg)](https://badge.fury.io/rb/paper_trail_scrapbook)
5
5
 
6
6
  Human Readable audit reporting for users of [PaperTrail](https://github.com/paper-trail-gem/paper_trail) gem.
@@ -18,7 +18,7 @@ Add PaperTrailScrapBook to your `Gemfile`.
18
18
  This gem is dependent on [PaperTrail](https://github.com/paper-trail-gem/paper_trail),
19
19
  and specifically, on the `object_changes` column in the `PaperTrail::Version`
20
20
  table. If your `PaperTrail` installation does not include this column, you can
21
- add it manually, or re-runthe `PaperTrail` generator:
21
+ add it manually, or re-run the `PaperTrail` generator:
22
22
 
23
23
  ```
24
24
  bundle exec rake generate paper_trail:install --with_changes
@@ -199,7 +199,7 @@ text = PaperTrailScrapbook::UserJournal.new(who, start: 1.month.ago, end: Time.n
199
199
 
200
200
  ## Problems
201
201
 
202
- Please use GitHub's [issue tracker](http://github.com/tjchambers/paper_trail_scrapbook/issues).
202
+ Please use GitHub's [issue tracker](http://github.com/hintmedia/paper_trail_scrapbook/issues).
203
203
 
204
204
 
205
205
  ## Contributors
@@ -3,7 +3,7 @@
3
3
  module PaperTrailScrapbook
4
4
  # Class Changes provides detailed attribute by attribute analysis
5
5
  #
6
- # @author Timothy Chambers <tim@possibilogy.com>
6
+ # @author Timothy Chambers <tim@hint.io>
7
7
  #
8
8
  class Changes
9
9
  include Concord.new(:version)
@@ -5,7 +5,7 @@ require_relative 'version_helpers'
5
5
  module PaperTrailScrapbook
6
6
  # Class Chapter provides single version history analysis
7
7
  #
8
- # @author Timothy Chambers <tim@possibilogy.com>
8
+ # @author Timothy Chambers <tim@hint.io>
9
9
  #
10
10
  class Chapter
11
11
  include Concord.new(:version)
@@ -5,7 +5,7 @@ require_relative 'version_helpers'
5
5
  module PaperTrailScrapbook
6
6
  # Class JournalEntry provides single version history analysis
7
7
  #
8
- # @author Jason Dinsmore <jason@dinjas.com>
8
+ # @author Jason Dinsmore <jason@hint.io>
9
9
  #
10
10
  class JournalEntry
11
11
  include Concord.new(:version)
@@ -3,7 +3,7 @@
3
3
  module PaperTrailScrapbook
4
4
  # Class LifeHistory provides Full multi version history
5
5
  #
6
- # @author Timothy Chambers <tim@possibilogy.com>
6
+ # @author Timothy Chambers <tim@hint.io>
7
7
  #
8
8
  class LifeHistory
9
9
  def initialize(object)
@@ -4,7 +4,7 @@ module PaperTrailScrapbook
4
4
  # Class UserJournal provides history for a user, optionally scoped by
5
5
  # object class and/or date range
6
6
  #
7
- # @author Jason Dinsmore <jason@dinjas.com>
7
+ # @author Jason Dinsmore <jason@hint.io>
8
8
  #
9
9
  class UserJournal
10
10
  include Adamantium::Flat
@@ -2,5 +2,5 @@
2
2
 
3
3
  module PaperTrailScrapbook
4
4
  # Current version
5
- VERSION = '0.1.17'
5
+ VERSION = '0.1.18'
6
6
  end
@@ -24,7 +24,7 @@ Gem::Specification.new do |gem|
24
24
  gem.add_dependency 'paper_trail', ['>= 5.2', '<= 10.2.1']
25
25
 
26
26
  gem.add_development_dependency 'ffaker', '~> 2.5'
27
- gem.add_development_dependency 'rake', '~> 10.4.2'
27
+ gem.add_development_dependency 'rake', '~> 13.0.1'
28
28
 
29
29
  # Why `railties`? Possibly used by `spec/dummy_app` boot up?
30
30
  gem.add_development_dependency 'railties', '= 5.2.3'
@@ -36,6 +36,7 @@ Gem::Specification.new do |gem|
36
36
  gem.add_development_dependency 'mutant-rspec'
37
37
  gem.add_development_dependency 'pg', '= 0.18.4'
38
38
  gem.add_development_dependency 'rspec-rails'
39
+ gem.add_development_dependency 'rspec-jumpstart'
39
40
  gem.add_development_dependency 'rspec_junit_formatter'
40
41
  gem.add_development_dependency 'rubocop'
41
42
  gem.add_development_dependency 'rubocop-rspec'
@@ -0,0 +1,28 @@
1
+ # frozen_string_literal: true
2
+
3
+ require 'spec_helper'
4
+ require './lib/paper_trail_scrapbook/journal_entry'
5
+
6
+ RSpec.describe PaperTrailScrapbook::JournalEntry do
7
+ let(:person) { Person.create!(name: 'The Tim Man') }
8
+ let(:book) { Book.create!(title: 'How the Grinch stole Xmas') }
9
+ let(:version) do
10
+ OpenStruct.new(event: 'create',
11
+ item_type: 'Book',
12
+ item_id: book.id,
13
+ created_at: whenn,
14
+ version_author: person.id)
15
+ end
16
+ let(:subject) { described_class.new(version) }
17
+ let(:whenn) { Time.parse('2019-12-16 12:01:29 -0800') }
18
+
19
+ describe '#story' do
20
+ it 'story' do
21
+ result = subject.story
22
+
23
+ expect(result).to eql('On Monday, 16 Dec 2019 at 12:01 PM, '\
24
+ "created Book[#{book.id}]:\n")
25
+ end
26
+ end
27
+
28
+ end
@@ -2,5 +2,13 @@
2
2
 
3
3
  require 'spec_helper'
4
4
 
5
- module PaperTrailScrapbook
5
+ RSpec.describe PaperTrailScrapbook do
6
+ describe '.config' do
7
+ it 'sets the @config ivar' do
8
+ described_class.config
9
+
10
+ expect(described_class.instance_variable_get(:@config))
11
+ .to equal(PaperTrailScrapbook::Config.instance)
12
+ end
13
+ end
6
14
  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.17
4
+ version: 0.1.18
5
5
  platform: ruby
6
6
  authors:
7
7
  - Timothy Chambers
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2019-12-07 00:00:00.000000000 Z
11
+ date: 2020-03-06 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activerecord
@@ -92,14 +92,14 @@ dependencies:
92
92
  requirements:
93
93
  - - "~>"
94
94
  - !ruby/object:Gem::Version
95
- version: 10.4.2
95
+ version: 13.0.1
96
96
  type: :development
97
97
  prerelease: false
98
98
  version_requirements: !ruby/object:Gem::Requirement
99
99
  requirements:
100
100
  - - "~>"
101
101
  - !ruby/object:Gem::Version
102
- version: 10.4.2
102
+ version: 13.0.1
103
103
  - !ruby/object:Gem::Dependency
104
104
  name: railties
105
105
  requirement: !ruby/object:Gem::Requirement
@@ -212,6 +212,20 @@ dependencies:
212
212
  - - ">="
213
213
  - !ruby/object:Gem::Version
214
214
  version: '0'
215
+ - !ruby/object:Gem::Dependency
216
+ name: rspec-jumpstart
217
+ requirement: !ruby/object:Gem::Requirement
218
+ requirements:
219
+ - - ">="
220
+ - !ruby/object:Gem::Version
221
+ version: '0'
222
+ type: :development
223
+ prerelease: false
224
+ version_requirements: !ruby/object:Gem::Requirement
225
+ requirements:
226
+ - - ">="
227
+ - !ruby/object:Gem::Version
228
+ version: '0'
215
229
  - !ruby/object:Gem::Dependency
216
230
  name: rspec_junit_formatter
217
231
  requirement: !ruby/object:Gem::Requirement
@@ -405,6 +419,7 @@ files:
405
419
  - spec/paper_trail_scrapbook/changes_spec.rb
406
420
  - spec/paper_trail_scrapbook/chapter_spec.rb
407
421
  - spec/paper_trail_scrapbook/config_spec.rb
422
+ - spec/paper_trail_scrapbook/journal_entry_spec.rb
408
423
  - spec/paper_trail_scrapbook/life_history_spec.rb
409
424
  - spec/paper_trail_scrapbook/secondary_chapter_spec.rb
410
425
  - spec/paper_trail_scrapbook/user_journal_spec.rb
@@ -431,7 +446,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
431
446
  - !ruby/object:Gem::Version
432
447
  version: 1.3.6
433
448
  requirements: []
434
- rubygems_version: 3.0.6
449
+ rubygems_version: 3.1.2
435
450
  signing_key:
436
451
  specification_version: 4
437
452
  summary: Paper Trail Scrapbook