mongoid-userstamps 3.0.0.alpha1 → 3.1.0

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: 58bd01615e9f601fa966a26cc245fdc954f9b535
4
- data.tar.gz: ac09ac731fbe97c0e8930419c13ca9de3500a03d
3
+ metadata.gz: d1dac6e0316bd40bb00fee04954197bf457d7186
4
+ data.tar.gz: 13b38ba6f7a730291c988016f7dc74768488b87b
5
5
  SHA512:
6
- metadata.gz: 1beffda9c99474354d7221d94f50f2c4d1fcac15085e54a8e8031e048aebca154602fd3586163abf3d39b2116c8f0ae3af9da1eafc137210554a8a023c28d537
7
- data.tar.gz: 15ce0099583e72bec3d700e3baee8e4750a9d22331013b7975cba1b858f828171cefb232efcf37bef1a17165da83ca60958dd636e80e1a54b7c9ae7eb7854d0e
6
+ metadata.gz: 4ebf29e9719ebdef6df480d1d4232de2ca739e9866bd653eca4a20caa4ccb00f6494c085886356369fa9ebb623d9b68c31df046db3240c6ed06aa405d764c4d7
7
+ data.tar.gz: eadea41c16f9b433a5befd23e89edfb192ed879666a7a73bf56c55258287a69db312b18976e725f4482f8bd3c87077180537e1f40f64978d7e8106f92cb2f11c
@@ -12,7 +12,8 @@ module Mongoid
12
12
 
13
13
  belongs_to userstamps_config.created_name, {
14
14
  class_name: userstamps_model.user_model,
15
- inverse_of: nil
15
+ inverse_of: nil,
16
+ optional: true
16
17
  }
17
18
 
18
19
  set_callback :create, :before, :set_created_by
@@ -12,7 +12,8 @@ module Mongoid
12
12
 
13
13
  belongs_to userstamps_config.deleted_name, {
14
14
  class_name: userstamps_model.user_model,
15
- inverse_of: nil
15
+ inverse_of: nil,
16
+ optional: true
16
17
  }
17
18
 
18
19
  set_callback :destroy, :before, :set_deleted_by
@@ -12,7 +12,8 @@ module Mongoid
12
12
 
13
13
  belongs_to userstamps_config.updated_name, {
14
14
  class_name: userstamps_model.user_model,
15
- inverse_of: nil
15
+ inverse_of: nil,
16
+ optional: true
16
17
  }
17
18
 
18
19
  set_callback :save, :before, :set_updated_by
@@ -2,7 +2,7 @@
2
2
 
3
3
  module Mongoid
4
4
  module Userstamps
5
- VERSION = '3.0.0.alpha1'
5
+ VERSION = '3.1.0'
6
6
  end
7
7
  end
8
8
 
@@ -20,7 +20,7 @@ Gem::Specification.new do |s|
20
20
 
21
21
  s.post_install_message = File.read('UPGRADING') if File.exists?('UPGRADING')
22
22
 
23
- s.add_dependency 'mongoid', '~> 5.0'
24
- s.add_dependency 'activesupport', '~> 4.0'
23
+ s.add_dependency 'mongoid', '>= 5.0.0', '< 6.1.0'
24
+ s.add_dependency 'activesupport', '>= 4.2.0', '< 5.1.0'
25
25
  end
26
26
 
data/test/model_test.rb CHANGED
@@ -33,7 +33,7 @@ class ModelTest < BaseTest
33
33
  Mongoid::Userstamps::Config.set_current_user(User, nil)
34
34
  @post = Post.new
35
35
  @post.set_created_by
36
- assert_equal nil, @post.created_by
36
+ assert_nil @post.created_by
37
37
  end
38
38
 
39
39
  test 'set_updated_by' do
@@ -49,7 +49,7 @@ class ModelTest < BaseTest
49
49
  Mongoid::Userstamps::Config.set_current_user(User, nil)
50
50
  @post = Post.new
51
51
  @post.set_updated_by
52
- assert_equal nil, @post.updated_by
52
+ assert_nil @post.updated_by
53
53
  end
54
54
 
55
55
  test 'set_deleted_by' do
@@ -65,7 +65,7 @@ class ModelTest < BaseTest
65
65
  Mongoid::Userstamps::Config.set_current_user(Person, nil)
66
66
  @comment = Comment.new
67
67
  @comment.set_deleted_by
68
- assert_equal nil, @comment.deleted_by
68
+ assert_nil @comment.deleted_by
69
69
  end
70
70
  end
71
71
 
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.0.0.alpha1
4
+ version: 3.1.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Geoffroy Planquart
@@ -11,36 +11,48 @@ authors:
11
11
  autorequire:
12
12
  bindir: bin
13
13
  cert_chain: []
14
- date: 2015-09-14 00:00:00.000000000 Z
14
+ date: 2017-01-20 00:00:00.000000000 Z
15
15
  dependencies:
16
16
  - !ruby/object:Gem::Dependency
17
17
  name: mongoid
18
18
  requirement: !ruby/object:Gem::Requirement
19
19
  requirements:
20
- - - ~>
20
+ - - ">="
21
21
  - !ruby/object:Gem::Version
22
- version: '5.0'
22
+ version: 5.0.0
23
+ - - "<"
24
+ - !ruby/object:Gem::Version
25
+ version: 6.1.0
23
26
  type: :runtime
24
27
  prerelease: false
25
28
  version_requirements: !ruby/object:Gem::Requirement
26
29
  requirements:
27
- - - ~>
30
+ - - ">="
31
+ - !ruby/object:Gem::Version
32
+ version: 5.0.0
33
+ - - "<"
28
34
  - !ruby/object:Gem::Version
29
- version: '5.0'
35
+ version: 6.1.0
30
36
  - !ruby/object:Gem::Dependency
31
37
  name: activesupport
32
38
  requirement: !ruby/object:Gem::Requirement
33
39
  requirements:
34
- - - ~>
40
+ - - ">="
41
+ - !ruby/object:Gem::Version
42
+ version: 4.2.0
43
+ - - "<"
35
44
  - !ruby/object:Gem::Version
36
- version: '4.0'
45
+ version: 5.1.0
37
46
  type: :runtime
38
47
  prerelease: false
39
48
  version_requirements: !ruby/object:Gem::Requirement
40
49
  requirements:
41
- - - ~>
50
+ - - ">="
42
51
  - !ruby/object:Gem::Version
43
- version: '4.0'
52
+ version: 4.2.0
53
+ - - "<"
54
+ - !ruby/object:Gem::Version
55
+ version: 5.1.0
44
56
  description: Userstamps for creator and updater fields using Mongoid
45
57
  email:
46
58
  - geoffroy@planquart.fr
@@ -49,7 +61,7 @@ executables: []
49
61
  extensions: []
50
62
  extra_rdoc_files: []
51
63
  files:
52
- - .gitignore
64
+ - ".gitignore"
53
65
  - CHANGELOG.md
54
66
  - Gemfile
55
67
  - LICENSE
@@ -101,17 +113,17 @@ require_paths:
101
113
  - lib
102
114
  required_ruby_version: !ruby/object:Gem::Requirement
103
115
  requirements:
104
- - - '>='
116
+ - - ">="
105
117
  - !ruby/object:Gem::Version
106
118
  version: '0'
107
119
  required_rubygems_version: !ruby/object:Gem::Requirement
108
120
  requirements:
109
- - - '>'
121
+ - - ">="
110
122
  - !ruby/object:Gem::Version
111
- version: 1.3.1
123
+ version: '0'
112
124
  requirements: []
113
125
  rubyforge_project:
114
- rubygems_version: 2.4.6
126
+ rubygems_version: 2.5.1
115
127
  signing_key:
116
128
  specification_version: 4
117
129
  summary: Userstamps for Mongoid
@@ -138,4 +150,3 @@ test_files:
138
150
  - test/paranoia_test.rb
139
151
  - test/test_helper.rb
140
152
  - test/user_test.rb
141
- has_rdoc: