active_date_range 0.3.0 → 0.3.1
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 +4 -4
- data/CHANGELOG.md +6 -0
- data/Gemfile +1 -1
- data/Gemfile.lock +37 -39
- data/active_date_range.gemspec +1 -1
- data/lib/active_date_range/date_range.rb +7 -1
- data/lib/active_date_range/version.rb +1 -1
- metadata +8 -8
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 35a7b655ef32c770ab582f7228e59a90091cdba9553de211e1b18d4efbbb016c
|
|
4
|
+
data.tar.gz: 2f8b685dcaa03b9df69a3d17876023c6e0de5dd8d3bc2f2c0a8208ecffd6b1df
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 292d7bc594e974903c6f73e4edf7b4e3775901f1c970ec54623950d019a8c327ba04e25b0d743c36605df2f514ee752471bd3787d86ff25ece1cdf9903b5b157
|
|
7
|
+
data.tar.gz: 156323981ba292945aebe705431e86eb5474dcf2adfc1caea88fa9703a60b6f4b164222312ae14710b825b3ed8e2482fdd8545ae839bb3165dcb666a683b8ae0
|
data/CHANGELOG.md
CHANGED
data/Gemfile
CHANGED
data/Gemfile.lock
CHANGED
|
@@ -1,49 +1,48 @@
|
|
|
1
1
|
PATH
|
|
2
2
|
remote: .
|
|
3
3
|
specs:
|
|
4
|
-
active_date_range (0.3.
|
|
5
|
-
activesupport (
|
|
4
|
+
active_date_range (0.3.1)
|
|
5
|
+
activesupport (> 6.1)
|
|
6
6
|
i18n
|
|
7
7
|
|
|
8
8
|
GEM
|
|
9
9
|
remote: https://rubygems.org/
|
|
10
10
|
specs:
|
|
11
|
-
actionpack (
|
|
12
|
-
actionview (=
|
|
13
|
-
activesupport (=
|
|
14
|
-
rack (~> 2.0, >= 2.0
|
|
11
|
+
actionpack (7.0.0.alpha2)
|
|
12
|
+
actionview (= 7.0.0.alpha2)
|
|
13
|
+
activesupport (= 7.0.0.alpha2)
|
|
14
|
+
rack (~> 2.0, >= 2.2.0)
|
|
15
15
|
rack-test (>= 0.6.3)
|
|
16
16
|
rails-dom-testing (~> 2.0)
|
|
17
17
|
rails-html-sanitizer (~> 1.0, >= 1.2.0)
|
|
18
|
-
actionview (
|
|
19
|
-
activesupport (=
|
|
18
|
+
actionview (7.0.0.alpha2)
|
|
19
|
+
activesupport (= 7.0.0.alpha2)
|
|
20
20
|
builder (~> 3.1)
|
|
21
21
|
erubi (~> 1.4)
|
|
22
22
|
rails-dom-testing (~> 2.0)
|
|
23
23
|
rails-html-sanitizer (~> 1.1, >= 1.2.0)
|
|
24
|
-
activemodel (
|
|
25
|
-
activesupport (=
|
|
26
|
-
activesupport (
|
|
24
|
+
activemodel (7.0.0.alpha2)
|
|
25
|
+
activesupport (= 7.0.0.alpha2)
|
|
26
|
+
activesupport (7.0.0.alpha2)
|
|
27
27
|
concurrent-ruby (~> 1.0, >= 1.0.2)
|
|
28
28
|
i18n (>= 1.6, < 2)
|
|
29
29
|
minitest (>= 5.1)
|
|
30
30
|
tzinfo (~> 2.0)
|
|
31
|
-
zeitwerk (~> 2.3)
|
|
32
31
|
ast (2.4.2)
|
|
33
32
|
builder (3.2.4)
|
|
34
33
|
coderay (1.1.3)
|
|
35
|
-
concurrent-ruby (1.1.
|
|
34
|
+
concurrent-ruby (1.1.9)
|
|
36
35
|
crass (1.0.6)
|
|
37
36
|
erubi (1.10.0)
|
|
38
|
-
ffi (1.15.
|
|
39
|
-
formatador (0.
|
|
40
|
-
guard (2.
|
|
37
|
+
ffi (1.15.4)
|
|
38
|
+
formatador (0.3.0)
|
|
39
|
+
guard (2.18.0)
|
|
41
40
|
formatador (>= 0.2.4)
|
|
42
41
|
listen (>= 2.7, < 4.0)
|
|
43
42
|
lumberjack (>= 1.0.12, < 2.0)
|
|
44
43
|
nenv (~> 0.1)
|
|
45
44
|
notiffany (~> 0.0)
|
|
46
|
-
pry (>= 0.
|
|
45
|
+
pry (>= 0.13.0)
|
|
47
46
|
shellany (~> 0.0)
|
|
48
47
|
thor (>= 0.18.1)
|
|
49
48
|
guard-compat (1.2.1)
|
|
@@ -52,25 +51,23 @@ GEM
|
|
|
52
51
|
minitest (>= 3.0)
|
|
53
52
|
i18n (1.8.10)
|
|
54
53
|
concurrent-ruby (~> 1.0)
|
|
55
|
-
listen (3.
|
|
54
|
+
listen (3.7.0)
|
|
56
55
|
rb-fsevent (~> 0.10, >= 0.10.3)
|
|
57
56
|
rb-inotify (~> 0.9, >= 0.9.10)
|
|
58
|
-
loofah (2.
|
|
57
|
+
loofah (2.12.0)
|
|
59
58
|
crass (~> 1.0.2)
|
|
60
59
|
nokogiri (>= 1.5.9)
|
|
61
60
|
lumberjack (1.2.8)
|
|
62
61
|
method_source (1.0.0)
|
|
63
|
-
mini_portile2 (2.5.1)
|
|
64
62
|
minitest (5.14.4)
|
|
65
63
|
nenv (0.3.0)
|
|
66
|
-
nokogiri (1.
|
|
67
|
-
mini_portile2 (~> 2.5.0)
|
|
64
|
+
nokogiri (1.12.5-x86_64-linux)
|
|
68
65
|
racc (~> 1.4)
|
|
69
66
|
notiffany (0.1.3)
|
|
70
67
|
nenv (~> 0.1)
|
|
71
68
|
shellany (~> 0.0)
|
|
72
|
-
parallel (1.
|
|
73
|
-
parser (3.0.
|
|
69
|
+
parallel (1.21.0)
|
|
70
|
+
parser (3.0.2.0)
|
|
74
71
|
ast (~> 2.4.1)
|
|
75
72
|
pry (0.14.1)
|
|
76
73
|
coderay (~> 1.1)
|
|
@@ -82,14 +79,15 @@ GEM
|
|
|
82
79
|
rails-dom-testing (2.0.3)
|
|
83
80
|
activesupport (>= 4.2.0)
|
|
84
81
|
nokogiri (>= 1.6)
|
|
85
|
-
rails-html-sanitizer (1.
|
|
82
|
+
rails-html-sanitizer (1.4.2)
|
|
86
83
|
loofah (~> 2.3)
|
|
87
|
-
railties (
|
|
88
|
-
actionpack (=
|
|
89
|
-
activesupport (=
|
|
84
|
+
railties (7.0.0.alpha2)
|
|
85
|
+
actionpack (= 7.0.0.alpha2)
|
|
86
|
+
activesupport (= 7.0.0.alpha2)
|
|
90
87
|
method_source
|
|
91
|
-
rake (>= 0.
|
|
88
|
+
rake (>= 0.13)
|
|
92
89
|
thor (~> 1.0)
|
|
90
|
+
zeitwerk (~> 2.5.0.beta3)
|
|
93
91
|
rainbow (3.0.0)
|
|
94
92
|
rake (12.3.3)
|
|
95
93
|
rb-fsevent (0.11.0)
|
|
@@ -97,23 +95,23 @@ GEM
|
|
|
97
95
|
ffi (~> 1.0)
|
|
98
96
|
regexp_parser (2.1.1)
|
|
99
97
|
rexml (3.2.5)
|
|
100
|
-
rubocop (1.
|
|
98
|
+
rubocop (1.21.0)
|
|
101
99
|
parallel (~> 1.10)
|
|
102
100
|
parser (>= 3.0.0.0)
|
|
103
101
|
rainbow (>= 2.2.2, < 4.0)
|
|
104
102
|
regexp_parser (>= 1.8, < 3.0)
|
|
105
103
|
rexml
|
|
106
|
-
rubocop-ast (>= 1.
|
|
104
|
+
rubocop-ast (>= 1.9.1, < 2.0)
|
|
107
105
|
ruby-progressbar (~> 1.7)
|
|
108
106
|
unicode-display_width (>= 1.4.0, < 3.0)
|
|
109
|
-
rubocop-ast (1.
|
|
107
|
+
rubocop-ast (1.11.0)
|
|
110
108
|
parser (>= 3.0.1.1)
|
|
111
109
|
rubocop-packaging (0.5.1)
|
|
112
110
|
rubocop (>= 0.89, < 2.0)
|
|
113
|
-
rubocop-performance (1.11.
|
|
111
|
+
rubocop-performance (1.11.5)
|
|
114
112
|
rubocop (>= 1.7.0, < 2.0)
|
|
115
113
|
rubocop-ast (>= 0.4.0)
|
|
116
|
-
rubocop-rails (2.
|
|
114
|
+
rubocop-rails (2.12.2)
|
|
117
115
|
activesupport (>= 4.2.0)
|
|
118
116
|
rack (>= 1.1)
|
|
119
117
|
rubocop (>= 1.7.0, < 2.0)
|
|
@@ -122,11 +120,11 @@ GEM
|
|
|
122
120
|
thor (1.1.0)
|
|
123
121
|
tzinfo (2.0.4)
|
|
124
122
|
concurrent-ruby (~> 1.0)
|
|
125
|
-
unicode-display_width (2.
|
|
126
|
-
zeitwerk (2.
|
|
123
|
+
unicode-display_width (2.1.0)
|
|
124
|
+
zeitwerk (2.5.0.beta3)
|
|
127
125
|
|
|
128
126
|
PLATFORMS
|
|
129
|
-
|
|
127
|
+
x86_64-linux
|
|
130
128
|
|
|
131
129
|
DEPENDENCIES
|
|
132
130
|
active_date_range!
|
|
@@ -135,7 +133,7 @@ DEPENDENCIES
|
|
|
135
133
|
guard-minitest
|
|
136
134
|
minitest (~> 5.0)
|
|
137
135
|
pry
|
|
138
|
-
railties (
|
|
136
|
+
railties (> 6.1)
|
|
139
137
|
rake (~> 12.0)
|
|
140
138
|
rubocop
|
|
141
139
|
rubocop-packaging
|
|
@@ -143,4 +141,4 @@ DEPENDENCIES
|
|
|
143
141
|
rubocop-rails
|
|
144
142
|
|
|
145
143
|
BUNDLED WITH
|
|
146
|
-
2.
|
|
144
|
+
2.3.5
|
data/active_date_range.gemspec
CHANGED
|
@@ -26,7 +26,7 @@ Gem::Specification.new do |spec|
|
|
|
26
26
|
spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
|
|
27
27
|
spec.require_paths = ["lib"]
|
|
28
28
|
|
|
29
|
-
spec.add_dependency "activesupport", "
|
|
29
|
+
spec.add_dependency "activesupport", "> 6.1"
|
|
30
30
|
spec.add_dependency "i18n"
|
|
31
31
|
|
|
32
32
|
spec.add_development_dependency "rubocop"
|
|
@@ -306,7 +306,13 @@ module ActiveDateRange
|
|
|
306
306
|
def next(periods = 1)
|
|
307
307
|
raise BoundlessRangeError, "Can't calculate next for boundless range" if boundless?
|
|
308
308
|
|
|
309
|
-
end_date =
|
|
309
|
+
end_date = if granularity
|
|
310
|
+
self.end + periods.send(granularity)
|
|
311
|
+
elsif full_month?
|
|
312
|
+
in_groups_of(:month).last.next(periods * months).end
|
|
313
|
+
else
|
|
314
|
+
self.end + (periods * days).days
|
|
315
|
+
end
|
|
310
316
|
end_date = end_date.at_end_of_month if full_month?
|
|
311
317
|
|
|
312
318
|
DateRange.new(self.end + 1.day, end_date)
|
metadata
CHANGED
|
@@ -1,27 +1,27 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: active_date_range
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.3.
|
|
4
|
+
version: 0.3.1
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Edwin Vlieg
|
|
8
|
-
autorequire:
|
|
8
|
+
autorequire:
|
|
9
9
|
bindir: exe
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date:
|
|
11
|
+
date: 2022-02-25 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: activesupport
|
|
15
15
|
requirement: !ruby/object:Gem::Requirement
|
|
16
16
|
requirements:
|
|
17
|
-
- - "
|
|
17
|
+
- - ">"
|
|
18
18
|
- !ruby/object:Gem::Version
|
|
19
19
|
version: '6.1'
|
|
20
20
|
type: :runtime
|
|
21
21
|
prerelease: false
|
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
|
23
23
|
requirements:
|
|
24
|
-
- - "
|
|
24
|
+
- - ">"
|
|
25
25
|
- !ruby/object:Gem::Version
|
|
26
26
|
version: '6.1'
|
|
27
27
|
- !ruby/object:Gem::Dependency
|
|
@@ -145,7 +145,7 @@ metadata:
|
|
|
145
145
|
homepage_uri: https://github.com/moneybird/active-date-range
|
|
146
146
|
source_code_uri: https://github.com/moneybird/active-date-range
|
|
147
147
|
changelog_uri: https://github.com/moneybird/active-date-range/blob/main/CHANGELOG.md
|
|
148
|
-
post_install_message:
|
|
148
|
+
post_install_message:
|
|
149
149
|
rdoc_options: []
|
|
150
150
|
require_paths:
|
|
151
151
|
- lib
|
|
@@ -160,8 +160,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
|
160
160
|
- !ruby/object:Gem::Version
|
|
161
161
|
version: '0'
|
|
162
162
|
requirements: []
|
|
163
|
-
rubygems_version: 3.
|
|
164
|
-
signing_key:
|
|
163
|
+
rubygems_version: 3.2.9
|
|
164
|
+
signing_key:
|
|
165
165
|
specification_version: 4
|
|
166
166
|
summary: DateRange for ActiveSupport
|
|
167
167
|
test_files: []
|