rrule 0.7.0 → 0.8.0
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/.rubocop.yml +1 -0
- data/CHANGELOG.md +6 -0
- data/Gemfile +1 -1
- data/gemfiles/activesupport_7_0.gemfile +1 -1
- data/gemfiles/activesupport_7_1.gemfile +1 -1
- data/gemfiles/activesupport_7_2.gemfile +1 -1
- data/gemfiles/activesupport_8_0.gemfile +1 -1
- data/lib/rrule/humanizer.rb +22 -3
- data/lib/rrule/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 8244156c02becc5578d2b3560c42e1e5fe15829089cb79686a11dfc58ed8c6b8
|
|
4
|
+
data.tar.gz: 0726f9f83f0397fd763477ede2240ce171d16cb74492ea7cc4a87623549f7638
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 7a881ffc1860944956206db3c8c9e775ce5113b403f3043880854515af5d2917d0cfa2bf0c97b620668fd3407a8f87063e98c2e6029cb0e7deb4dc1adee77260
|
|
7
|
+
data.tar.gz: 0bed0ef70cf76b91ffb159ce374d972440081d8e806017d0a41ed03449e3ddce15a27873554e7c36d64e63cc2b5e0f9d375d8c958c33f61e5d53bdccc66a1353
|
data/.rubocop.yml
CHANGED
data/CHANGELOG.md
CHANGED
|
@@ -1,6 +1,12 @@
|
|
|
1
1
|
Change Log
|
|
2
2
|
==========
|
|
3
3
|
|
|
4
|
+
Version 0.8.0 *(2026-04-13)*
|
|
5
|
+
----------------------------
|
|
6
|
+
## What's Changed
|
|
7
|
+
* Add humanizer support for hourly, minutely, and secondly frequencies https://github.com/square/ruby-rrule/pull/73
|
|
8
|
+
* Update rubocop version https://github.com/square/ruby-rrule/pull/72
|
|
9
|
+
|
|
4
10
|
Version 0.7.0 *(2025-10-20)*
|
|
5
11
|
----------------------------
|
|
6
12
|
## What's Changed
|
data/Gemfile
CHANGED
data/lib/rrule/humanizer.rb
CHANGED
|
@@ -48,7 +48,7 @@ module RRule
|
|
|
48
48
|
|
|
49
49
|
raise 'Implement Until' if until_option
|
|
50
50
|
if count_option
|
|
51
|
-
add 'for'
|
|
51
|
+
add 'for' unless subdaily?
|
|
52
52
|
add count_option
|
|
53
53
|
add plural?(count_option) ? 'times' : 'time'
|
|
54
54
|
end
|
|
@@ -89,6 +89,25 @@ module RRule
|
|
|
89
89
|
num.to_i % 100 != 1
|
|
90
90
|
end
|
|
91
91
|
|
|
92
|
+
def subdaily?
|
|
93
|
+
%w[HOURLY MINUTELY SECONDLY].include?(freq_option)
|
|
94
|
+
end
|
|
95
|
+
|
|
96
|
+
def hourly
|
|
97
|
+
add interval_option if interval_option != 1
|
|
98
|
+
add plural?(interval_option) ? 'hours' : 'hour'
|
|
99
|
+
end
|
|
100
|
+
|
|
101
|
+
def minutely
|
|
102
|
+
add interval_option if interval_option != 1
|
|
103
|
+
add plural?(interval_option) ? 'minutes' : 'minute'
|
|
104
|
+
end
|
|
105
|
+
|
|
106
|
+
def secondly
|
|
107
|
+
add interval_option if interval_option != 1
|
|
108
|
+
add plural?(interval_option) ? 'seconds' : 'second'
|
|
109
|
+
end
|
|
110
|
+
|
|
92
111
|
def daily
|
|
93
112
|
add interval_option if interval_option != 1
|
|
94
113
|
|
|
@@ -120,7 +139,7 @@ module RRule
|
|
|
120
139
|
|
|
121
140
|
add list(options.fetch(:bymonth), method(:monthtext), 'and') if bymonth_option
|
|
122
141
|
|
|
123
|
-
add list
|
|
142
|
+
add list(bymonthday_option.map { |o| nth(o) }, :to_s, 'and') if bymonthday_option
|
|
124
143
|
end
|
|
125
144
|
|
|
126
145
|
def weekly
|
|
@@ -220,7 +239,7 @@ module RRule
|
|
|
220
239
|
|
|
221
240
|
def _bymonthday
|
|
222
241
|
add 'on the'
|
|
223
|
-
add list
|
|
242
|
+
add list(bymonthday_option.map { |o| nth(o) }, :to_s, 'and')
|
|
224
243
|
end
|
|
225
244
|
|
|
226
245
|
def _byhour
|
data/lib/rrule/version.rb
CHANGED
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: rrule
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.
|
|
4
|
+
version: 0.8.0
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Ryan Mitchell
|
|
@@ -90,7 +90,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
|
90
90
|
- !ruby/object:Gem::Version
|
|
91
91
|
version: '0'
|
|
92
92
|
requirements: []
|
|
93
|
-
rubygems_version:
|
|
93
|
+
rubygems_version: 4.0.9
|
|
94
94
|
specification_version: 4
|
|
95
95
|
summary: RRule expansion
|
|
96
96
|
test_files: []
|