paper_trail-rails 0.2.0 → 0.2.2

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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 70c683fd54f3d91ce5136dc79ccf3cae67564beebaed69d6fc94590588b2f9b2
4
- data.tar.gz: 6b75131fbe1e81b1cb40943ec9148a52357310ed7e6d505b0bde16f2bb126d14
3
+ metadata.gz: f5bb565d9f1560cbced48f6e7267b0f5bfd71a126aab0abca1552593051ef778
4
+ data.tar.gz: bea208743f7f24e024fb31166235b37d494408a1147dc6adad860802d3208dc4
5
5
  SHA512:
6
- metadata.gz: ffa6a5dbfa8c843e651a27394f51d7515498a0c486dc890e136f2c57cfcb832f932d931bdbe260efb4b758d02cf1d812ea8e3de7298443aaee69872fa55f3fbf
7
- data.tar.gz: faeb455308c26c59e0de58849563ac8fafe70b22b57f49fc7f2f844c9d32312646ca6d6f7ac1acb59e3552af4465dbadbe889c55db02c7a750134c7c1f7a33d1
6
+ metadata.gz: e82586b772678e3457ce068ac2aa54daab949702d4cddef94abbeae360eb57360cb8bc5fb5564d4196e4406cbdeabf05b2877e6260b3178117e0d0c79cf40f8d
7
+ data.tar.gz: d3f121829e868e56ec1d1efc19be968a631e64a3b5def419c7781b6a8a60c472e711a3769a0777b5e1b00751bfe388248f8c042a5fa398906a94e1c213d2fc2a
data/Changelog.md CHANGED
@@ -1,3 +1,6 @@
1
+ ## 0.2.2 (2019-07-18)
2
+ - Fix: undefined method `user_for_test' when running `rails console -e test`
3
+
1
4
  ## 0.2.0 (2019-05-23)
2
5
 
3
6
  ### Breaking changes
@@ -6,9 +6,6 @@ module PaperTrail
6
6
 
7
7
  config.select_user_filter = :itself
8
8
  config.select_user_other_allowed_values = ['system', 'admin']
9
- config.user_for_test = ->(users) {
10
- users.admins.last
11
- }
12
9
  end
13
10
 
14
11
  # Filter proc to use to show a list of users in select_user helper. For example:
@@ -19,10 +16,6 @@ module PaperTrail
19
16
  attr_accessor :select_user_filter
20
17
 
21
18
  attr_accessor :select_user_other_allowed_values
22
-
23
- # A proc that returns a user if you ever run `rails console` in test
24
- # environment (where you probably won't have any real data)
25
- attr_accessor :user_for_test
26
19
  end
27
20
  end
28
21
  end
@@ -18,6 +18,10 @@ module PaperTrail
18
18
  config.ask_for_reason = true
19
19
  config.require_reason = false
20
20
  config.auto_reset_reason = true
21
+
22
+ config.user_for_test = ->(users) {
23
+ users.last
24
+ }
21
25
  end
22
26
 
23
27
  attr_accessor :ask_for_user
@@ -28,6 +32,10 @@ module PaperTrail
28
32
  attr_accessor :require_reason
29
33
  attr_accessor :auto_reset_reason
30
34
 
35
+ # A proc that returns a user if you ever run `rails console` in test
36
+ # environment (where you probably won't have any real data)
37
+ attr_accessor :user_for_test
38
+
31
39
  class << self
32
40
  def configure
33
41
  yield self
@@ -1,7 +1,7 @@
1
1
  module PaperTrail
2
2
  module Rails
3
3
  def self.version
4
- "0.2.0"
4
+ "0.2.2"
5
5
  end
6
6
  end
7
7
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: paper_trail-rails
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.0
4
+ version: 0.2.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Tyler Rick
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2019-05-24 00:00:00.000000000 Z
11
+ date: 2019-07-18 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: paper_trail
@@ -128,7 +128,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
128
128
  - !ruby/object:Gem::Version
129
129
  version: '0'
130
130
  requirements: []
131
- rubygems_version: 3.0.1
131
+ rubygems_version: 3.0.3
132
132
  signing_key:
133
133
  specification_version: 4
134
134
  summary: Integrate with rails console and migrations. In rails console, ask who is