hiccup 0.5.18 → 0.5.19
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
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: f309cbeec6d69a8c8fd3577a5df9b8b96e22ccd4
|
4
|
+
data.tar.gz: a3cc99a866dcdb0a414bdc8d802289e033f89286
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f1f5fc8cfa1d4c175acabc66ffaf0f6920090da237515622d3d8c1b7384cd8010bec40fe981f31b65bf77a1536367641ff923a41852c907d1fd0643a3b283ec5
|
7
|
+
data.tar.gz: c479e685962de09343e830d8a606ca1c83a162b24bd747f33ee197b8228be01b1335ed6f674f00db69ac805d1951927c647a0cb90ba2e6bc16a5afda49da0bc7
|
data/lib/hiccup/version.rb
CHANGED
data/test/enumerable_test.rb
CHANGED
@@ -460,6 +460,49 @@ class EnumerableTest < ActiveSupport::TestCase
|
|
460
460
|
|
461
461
|
|
462
462
|
|
463
|
+
context "Duplication:" do
|
464
|
+
context "A weekly schedule that lists the same day twice" do
|
465
|
+
setup do
|
466
|
+
@schedule = Schedule.new(
|
467
|
+
kind: :weekly,
|
468
|
+
start_date: Date.new(2015, 1, 1),
|
469
|
+
weekly_pattern: %w{Monday Monday})
|
470
|
+
end
|
471
|
+
|
472
|
+
should "not enumerate that date more than once" do
|
473
|
+
assert_equal [5, 12, 19, 26], occurrences_during_month(schedule, 2015, 1).map(&:day)
|
474
|
+
end
|
475
|
+
end
|
476
|
+
|
477
|
+
context "A monthly (by-weekday) schedule that lists the same day twice" do
|
478
|
+
setup do
|
479
|
+
@schedule = Schedule.new(
|
480
|
+
kind: :monthly,
|
481
|
+
start_date: Date.new(2015, 1, 1),
|
482
|
+
monthly_pattern: [[3, "Monday"], [3, "Monday"]])
|
483
|
+
end
|
484
|
+
|
485
|
+
should "not enumerate that date more than once" do
|
486
|
+
assert_equal [19], occurrences_during_month(schedule, 2015, 1).map(&:day)
|
487
|
+
end
|
488
|
+
end
|
489
|
+
|
490
|
+
context "A monthly (by-day) schedule that lists the same day twice" do
|
491
|
+
setup do
|
492
|
+
@schedule = Schedule.new(
|
493
|
+
kind: :monthly,
|
494
|
+
start_date: Date.new(2015, 1, 1),
|
495
|
+
monthly_pattern: [3, 5])
|
496
|
+
end
|
497
|
+
|
498
|
+
should "not enumerate that date more than once" do
|
499
|
+
assert_equal [3, 5], occurrences_during_month(schedule, 2015, 1).map(&:day)
|
500
|
+
end
|
501
|
+
end
|
502
|
+
end
|
503
|
+
|
504
|
+
|
505
|
+
|
463
506
|
if ENV['PERFORMANCE_TEST']
|
464
507
|
test "performance test" do
|
465
508
|
n = 1000
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: hiccup
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.5.
|
4
|
+
version: 0.5.19
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Bob Lail
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-12-
|
11
|
+
date: 2015-12-07 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activesupport
|