mongoid-userstamps 3.1.2 → 3.1.3

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
  SHA1:
3
- metadata.gz: 38c6a7b860e52bd4ccf674cd841db6bf38000946
4
- data.tar.gz: 610e18dea8ebdee0570c8de498fff551226d1664
3
+ metadata.gz: fab675ceb96be422d7d026a7942152b48740d6d3
4
+ data.tar.gz: 7af1bd67f73735fb89a834150359d560c9c0b5fc
5
5
  SHA512:
6
- metadata.gz: 83dbb0f49a24c5031422faaa6712cb6954873d0198b09b1eb73d855e2798f38ae3499dd9214a65d5f08ce973da3dc92340b1601b4fdfd0365335ae4fd8feac15
7
- data.tar.gz: 6216b9fd6373077c2e98e0bb44798910b9066a4f01bef7bedbcd8716c53620c584a1c00168766716bcc56ef82516f42fe00f81fa13b3f89f9d7d680c613aec34
6
+ metadata.gz: b3287832a48c42ce38b683cbb709669b0ed5834c648d91c7d3078014e804eea56173d18b9c4c81e2fe96ce516bfea92e0d18985e16576c0d9c2be3012aee7635
7
+ data.tar.gz: 2ffa155f13651285dae206cd5a9be1fa213e996ef7bde185bcf08016de67f7ab300cc280d550a20fe15fb432b823b50dcb127e9ccab7bffbccd4f39560ac6774
data/CHANGELOG.md CHANGED
@@ -1,5 +1,10 @@
1
1
  # Changelog
2
2
 
3
+ ## 3.1.3
4
+
5
+ * Mongoid 6.2 support
6
+ * Rails 5.1 support
7
+
3
8
  ## 3.1.2
4
9
 
5
10
  * Mongoid 6.1 support
@@ -4,10 +4,9 @@ module Mongoid
4
4
  module Userstamps
5
5
  module Config
6
6
  class Model
7
- attr_accessor :user_model
8
-
9
7
  def initialize(model)
10
8
  @model = model
9
+ @user_model = nil
11
10
  end
12
11
 
13
12
  def config
@@ -7,10 +7,6 @@ module Mongoid
7
7
  module Userstamps
8
8
  module Config
9
9
  class << self
10
- attr_accessor :created_name
11
- attr_accessor :updated_name
12
- attr_accessor :deleted_name
13
-
14
10
  DEFAULT_CREATED_NAME = :created_by
15
11
  DEFAULT_UPDATED_NAME = :updated_by
16
12
  DEFAULT_DELETED_NAME = :deleted_by
@@ -34,14 +30,23 @@ module Mongoid
34
30
  model_classes << klass
35
31
  end
36
32
 
33
+ def created_name=(value)
34
+ @created_name = value
35
+ end
37
36
  def created_name
38
37
  @created_name ||= DEFAULT_CREATED_NAME
39
38
  end
40
39
 
40
+ def updated_name=(value)
41
+ @updated_name = value
42
+ end
41
43
  def updated_name
42
44
  @updated_name ||= DEFAULT_UPDATED_NAME
43
45
  end
44
46
 
47
+ def deleted_name=(value)
48
+ @deleted_name = value
49
+ end
45
50
  def deleted_name
46
51
  @deleted_name ||= DEFAULT_DELETED_NAME
47
52
  end
@@ -2,7 +2,7 @@
2
2
 
3
3
  module Mongoid
4
4
  module Userstamps
5
- VERSION = '3.1.2'
5
+ VERSION = '3.1.3'
6
6
  end
7
7
  end
8
8
 
@@ -18,9 +18,9 @@ Gem::Specification.new do |s|
18
18
  s.test_files = s.files.grep(%r{^(test|spec|features)/})
19
19
  s.require_paths = ['lib']
20
20
 
21
- s.post_install_message = File.read('UPGRADING') if File.exists?('UPGRADING')
21
+ s.post_install_message = File.read('UPGRADING') if File.exist?('UPGRADING')
22
22
 
23
- s.add_dependency 'mongoid', '>= 5.0.0', '< 6.2.0'
24
- s.add_dependency 'activesupport', '>= 4.2.0', '< 5.1.0'
23
+ s.add_dependency 'mongoid', '>= 5.0.0', '< 6.3.0'
24
+ s.add_dependency 'activesupport', '>= 4.2.0', '< 5.2.0'
25
25
  end
26
26
 
data/test/config_test.rb CHANGED
@@ -2,8 +2,6 @@ require 'test_helper'
2
2
 
3
3
  class ConfigTest < BaseTest
4
4
  class ModelClass
5
- cattr_accessor :user_model
6
-
7
5
  def self.userstamps_model; self; end
8
6
  def self.user_model
9
7
  Mongoid::Userstamps::Config.user_classes.last
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: mongoid-userstamps
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.1.2
4
+ version: 3.1.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Geoffroy Planquart
@@ -11,7 +11,7 @@ authors:
11
11
  autorequire:
12
12
  bindir: bin
13
13
  cert_chain: []
14
- date: 2017-11-27 00:00:00.000000000 Z
14
+ date: 2017-12-21 00:00:00.000000000 Z
15
15
  dependencies:
16
16
  - !ruby/object:Gem::Dependency
17
17
  name: mongoid
@@ -22,7 +22,7 @@ dependencies:
22
22
  version: 5.0.0
23
23
  - - "<"
24
24
  - !ruby/object:Gem::Version
25
- version: 6.2.0
25
+ version: 6.3.0
26
26
  type: :runtime
27
27
  prerelease: false
28
28
  version_requirements: !ruby/object:Gem::Requirement
@@ -32,7 +32,7 @@ dependencies:
32
32
  version: 5.0.0
33
33
  - - "<"
34
34
  - !ruby/object:Gem::Version
35
- version: 6.2.0
35
+ version: 6.3.0
36
36
  - !ruby/object:Gem::Dependency
37
37
  name: activesupport
38
38
  requirement: !ruby/object:Gem::Requirement
@@ -42,7 +42,7 @@ dependencies:
42
42
  version: 4.2.0
43
43
  - - "<"
44
44
  - !ruby/object:Gem::Version
45
- version: 5.1.0
45
+ version: 5.2.0
46
46
  type: :runtime
47
47
  prerelease: false
48
48
  version_requirements: !ruby/object:Gem::Requirement
@@ -52,7 +52,7 @@ dependencies:
52
52
  version: 4.2.0
53
53
  - - "<"
54
54
  - !ruby/object:Gem::Version
55
- version: 5.1.0
55
+ version: 5.2.0
56
56
  description: Userstamps for creator and updater fields using Mongoid
57
57
  email:
58
58
  - geoffroy@planquart.fr