active_record-events 4.1.1 → 4.1.2

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: 7ec4cd90a44c6c550a55b4fed0e50686380441cb86a4089a9716d8d5db350984
4
- data.tar.gz: bf03cc5c153173f2bf842d240374e00e7a94957fcdd4b855dab0a00fc4999a12
3
+ metadata.gz: fdd9b91dd64522db4ca3d1d4da95870d2118d948b88f77f2c2e4ab729b1ab49f
4
+ data.tar.gz: 2a05bbc38a682f65f40dab0d55b1bf070d0f9905f543df2c7de1c5bd563704f8
5
5
  SHA512:
6
- metadata.gz: 7c567f576431e641cd39dad28b71c033093b8cd51e368003ec93b1a44ff1177ac0272a257d1b73b2398072aeb4d962d568865bbd110e2116085d76b513c5da3a
7
- data.tar.gz: 1b83157999bf3ad63a76475fcf4b011f0f95cd19d83792f1db2a9f5eaedcca178a69fcfccb01898f7d9452ed06d2ba1c28cac3bb0fe657f5e6ed7304b2db4dd2
6
+ metadata.gz: bce05e0ddc66b433962d60210d4924d80b78e91aba9571932f3cdcad9a1d0df339c0b4e201e7ef366684661e40b1d1c791a61438ed96225a33b58500cff68a40
7
+ data.tar.gz: e9cf9e1afe72c52c77736eae172b6d05dfd831c067d9f854ab18d7eb3727f21794bb11dc61ae5ccae974c26b32fac67111b99f774ecef634909976ba5cb9cb0f
@@ -1,5 +1,5 @@
1
1
  module ActiveRecord
2
2
  module Events
3
- VERSION = '4.1.1'.freeze
3
+ VERSION = '4.1.2'.freeze
4
4
  end
5
5
  end
@@ -122,7 +122,7 @@ RSpec.describe ActiveRecord::Events do
122
122
  task.update!(notified_on: Date.yesterday)
123
123
  expect(task.notified?).to eq(true)
124
124
 
125
- task.update!(notified_on: Date.today)
125
+ task.update!(notified_on: Date.current)
126
126
  expect(task.notified?).to eq(true)
127
127
 
128
128
  task.update!(notified_on: Date.tomorrow)
@@ -136,7 +136,7 @@ RSpec.describe ActiveRecord::Events do
136
136
  task.update!(notified_on: Date.yesterday)
137
137
  expect(task.not_notified?).to eq(false)
138
138
 
139
- task.update!(notified_on: Date.today)
139
+ task.update!(notified_on: Date.current)
140
140
  expect(task.not_notified?).to eq(false)
141
141
 
142
142
  task.update!(notified_on: Date.tomorrow)
@@ -150,7 +150,7 @@ RSpec.describe ActiveRecord::Events do
150
150
  task.update!(notified_on: Date.yesterday)
151
151
  expect(Task.notified).to include(task)
152
152
 
153
- task.update!(notified_on: Date.today)
153
+ task.update!(notified_on: Date.current)
154
154
  expect(Task.notified).to include(task)
155
155
 
156
156
  task.update!(notified_on: Date.tomorrow)
@@ -164,7 +164,7 @@ RSpec.describe ActiveRecord::Events do
164
164
  task.update!(notified_on: Date.yesterday)
165
165
  expect(Task.not_notified).not_to include(task)
166
166
 
167
- task.update!(notified_on: Date.today)
167
+ task.update!(notified_on: Date.current)
168
168
  expect(Task.not_notified).not_to include(task)
169
169
 
170
170
  task.update!(notified_on: Date.tomorrow)
data/spec/spec_helper.rb CHANGED
@@ -22,10 +22,20 @@ require 'factory_girl'
22
22
  require 'generator_spec'
23
23
  require 'timecop'
24
24
  require 'zonebie/rspec'
25
+ require 'database_cleaner'
25
26
 
26
27
  Dir["#{__dir__}/support/**/*.rb"].each { |f| require f }
27
28
 
28
29
  RSpec.configure do |config|
30
+ config.before(:suite) do
31
+ DatabaseCleaner.strategy = :transaction
32
+ DatabaseCleaner.clean_with(:truncation)
33
+ end
34
+
35
+ config.around(:each) do |example|
36
+ DatabaseCleaner.cleaning { example.run }
37
+ end
38
+
29
39
  config.include FactoryGirl::Syntax::Methods
30
40
  config.include GeneratorHelpers, type: :generator
31
41
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: active_record-events
3
3
  version: !ruby/object:Gem::Version
4
- version: 4.1.1
4
+ version: 4.1.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Bartosz Pieńkowski
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2023-03-21 00:00:00.000000000 Z
11
+ date: 2023-03-26 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activerecord
@@ -52,6 +52,26 @@ dependencies:
52
52
  - - "~>"
53
53
  - !ruby/object:Gem::Version
54
54
  version: '2.2'
55
+ - !ruby/object:Gem::Dependency
56
+ name: database_cleaner
57
+ requirement: !ruby/object:Gem::Requirement
58
+ requirements:
59
+ - - ">="
60
+ - !ruby/object:Gem::Version
61
+ version: '1.99'
62
+ - - "<"
63
+ - !ruby/object:Gem::Version
64
+ version: '3'
65
+ type: :development
66
+ prerelease: false
67
+ version_requirements: !ruby/object:Gem::Requirement
68
+ requirements:
69
+ - - ">="
70
+ - !ruby/object:Gem::Version
71
+ version: '1.99'
72
+ - - "<"
73
+ - !ruby/object:Gem::Version
74
+ version: '3'
55
75
  - !ruby/object:Gem::Dependency
56
76
  name: factory_girl
57
77
  requirement: !ruby/object:Gem::Requirement