smart_month 1.0.0
Sign up to get free protection for your applications and to get access to all the features.
- data/MIT-LICENSE +20 -0
- data/README +33 -0
- data/Rakefile +51 -0
- data/VERSION +1 -0
- data/lib/month.rb +26 -0
- data/lib/smart_month.rb +11 -0
- data/lib/smart_month/calculations.rb +87 -0
- data/lib/smart_month/collection.rb +51 -0
- data/lib/smart_month/extensions/date.rb +19 -0
- data/lib/smart_month/magic.rb +71 -0
- data/lib/smart_month/math.rb +41 -0
- data/lib/smart_month/rulesets.rb +151 -0
- data/lib/smart_month/util.rb +37 -0
- data/pkg/smart_month-1.0.0.gem +0 -0
- data/rdoc/classes/Date.html +209 -0
- data/rdoc/classes/Month.html +189 -0
- data/rdoc/classes/SmartMonth.html +136 -0
- data/rdoc/classes/SmartMonth/Calculations.html +383 -0
- data/rdoc/classes/SmartMonth/Collection.html +306 -0
- data/rdoc/classes/SmartMonth/Magic.html +214 -0
- data/rdoc/classes/SmartMonth/Magic/MonthFactory.html +178 -0
- data/rdoc/classes/SmartMonth/Math.html +311 -0
- data/rdoc/classes/SmartMonth/Rulesets.html +419 -0
- data/rdoc/classes/SmartMonth/Util.html +302 -0
- data/rdoc/classes/Time.html +152 -0
- data/rdoc/created.rid +1 -0
- data/rdoc/files/README.html +170 -0
- data/rdoc/files/lib/month_rb.html +113 -0
- data/rdoc/files/lib/smart_month/calculations_rb.html +101 -0
- data/rdoc/files/lib/smart_month/collection_rb.html +101 -0
- data/rdoc/files/lib/smart_month/extensions/date_rb.html +108 -0
- data/rdoc/files/lib/smart_month/magic_rb.html +101 -0
- data/rdoc/files/lib/smart_month/math_rb.html +101 -0
- data/rdoc/files/lib/smart_month/rulesets_rb.html +108 -0
- data/rdoc/files/lib/smart_month/util_rb.html +101 -0
- data/rdoc/files/lib/smart_month_rb.html +108 -0
- data/rdoc/fr_class_index.html +37 -0
- data/rdoc/fr_file_index.html +36 -0
- data/rdoc/fr_method_index.html +74 -0
- data/rdoc/index.html +24 -0
- data/rdoc/rdoc-style.css +208 -0
- data/smart_month.gemspec +179 -0
- data/test/spec/date/accessor_spec.rb +91 -0
- data/test/spec/date/add_month_spec.rb +24 -0
- data/test/spec/date/add_spec.rb +23 -0
- data/test/spec/date/boat_spec.rb +20 -0
- data/test/spec/date/civil_spec.rb +28 -0
- data/test/spec/date/commercial_spec.rb +29 -0
- data/test/spec/date/constants_spec.rb +41 -0
- data/test/spec/date/conversions_spec.rb +153 -0
- data/test/spec/date/downto_spec.rb +18 -0
- data/test/spec/date/eql_spec.rb +10 -0
- data/test/spec/date/gregorian_spec.rb +28 -0
- data/test/spec/date/hash_spec.rb +14 -0
- data/test/spec/date/infinity_spec.rb +77 -0
- data/test/spec/date/julian_spec.rb +52 -0
- data/test/spec/date/minus_month_spec.rb +23 -0
- data/test/spec/date/minus_spec.rb +30 -0
- data/test/spec/date/new_spec.rb +9 -0
- data/test/spec/date/neww_spec.rb +9 -0
- data/test/spec/date/ordinal_spec.rb +29 -0
- data/test/spec/date/parse_spec.rb +149 -0
- data/test/spec/date/relationship_spec.rb +20 -0
- data/test/spec/date/shared/civil.rb +66 -0
- data/test/spec/date/shared/commercial.rb +39 -0
- data/test/spec/date/shared/parse.rb +54 -0
- data/test/spec/date/shared/parse_eu.rb +30 -0
- data/test/spec/date/shared/parse_us.rb +29 -0
- data/test/spec/date/step_spec.rb +56 -0
- data/test/spec/date/strftime_spec.rb +205 -0
- data/test/spec/date/strptime_spec.rb +143 -0
- data/test/spec/date/upto_spec.rb +18 -0
- data/test/spec/parsedate/parsedate.rb +95 -0
- data/test/spec/time/httpdate_spec.rb +21 -0
- data/test/spec/time/iso8601_spec.rb +7 -0
- data/test/spec/time/rfc2822_spec.rb +7 -0
- data/test/spec/time/rfc822_spec.rb +7 -0
- data/test/spec/time/shared/rfc2822.rb +65 -0
- data/test/spec/time/shared/xmlschema.rb +53 -0
- data/test/spec/time/xmlschema_spec.rb +7 -0
- data/test/spec_helper.rb +56 -0
- data/test/test_helper.rb +4 -0
- data/test/unit/calculations_test.rb +82 -0
- data/test/unit/collection_test.rb +42 -0
- data/test/unit/magic_test.rb +37 -0
- data/test/unit/math_test.rb +30 -0
- data/test/unit/rulesets_test.rb +94 -0
- data/test/unit/samples/test_ruleset.yml +6 -0
- data/test/unit/util_test.rb +29 -0
- metadata +196 -0
data/test/test_helper.rb
ADDED
@@ -0,0 +1,82 @@
|
|
1
|
+
require 'test_helper'
|
2
|
+
|
3
|
+
class CalculationsTest < Test::Unit::TestCase
|
4
|
+
|
5
|
+
# Tested By: Derek Perez
|
6
|
+
def test_should_return_first_day_of_month
|
7
|
+
# test an ambiguous first, no weekday defined.
|
8
|
+
assert_equal Month.april(2008).first, Date.new(2008,4,1)
|
9
|
+
# test a specific first weekday.
|
10
|
+
assert_equal Month.march(2002).first(:tuesday), Date.new(2002,3,5)
|
11
|
+
end
|
12
|
+
|
13
|
+
# Tested By: Derek Perez
|
14
|
+
def test_should_return_second_day_of_month
|
15
|
+
assert_equal Month.june(2007).second(:friday), Date.new(2007,6,8)
|
16
|
+
end
|
17
|
+
|
18
|
+
# Tested By: Derek Perez
|
19
|
+
def test_should_return_third_day_of_month
|
20
|
+
assert_equal Month.august(2008).third(:wednesday), Date.new(2008,8,20)
|
21
|
+
end
|
22
|
+
|
23
|
+
# Tested By: Derek Perez
|
24
|
+
def test_should_return_last_day_of_month
|
25
|
+
# test an ambiguous last, no weekday defined.
|
26
|
+
assert_equal Month.december(2008).last, Date.new(2008,12,31)
|
27
|
+
# test a specific last weekday.
|
28
|
+
assert_equal Month.september(2004).last(:friday), Date.new(2004,9,24)
|
29
|
+
# test a specific ambiguous, fourth, no weekday defined.
|
30
|
+
assert_equal Month.june(2004).fourth(:friday), Date.new(2004,6,25)
|
31
|
+
end
|
32
|
+
|
33
|
+
# Tested By: Derek Perez
|
34
|
+
def test_should_return_fourth_and_last_day_of_month
|
35
|
+
assert_equal Month.june(2004).fourth(:friday), Month.june(2004).last(:friday)
|
36
|
+
end
|
37
|
+
|
38
|
+
# Tested By: Derek Perez
|
39
|
+
def test_should_return_every_day_of_month
|
40
|
+
assertion = Month.april(2003).every(:tuesday)
|
41
|
+
assert_equal assertion.size, 5
|
42
|
+
assert_equal assertion, [Date.new(2003,4,1),Date.new(2003,4,8),Date.new(2003,4,15),Date.new(2003,4,22),Date.new(2003,4,29)]
|
43
|
+
end
|
44
|
+
|
45
|
+
# Tested By: Derek Perez
|
46
|
+
def test_should_retun_every_set_of_days_of_month
|
47
|
+
assertion = Month.august(2006).every!(:monday,:wednesday)
|
48
|
+
# verify
|
49
|
+
assert assertion.is_a?(Hash)
|
50
|
+
# monday assertions
|
51
|
+
assert_equal assertion[:monday].size, 4
|
52
|
+
assert_equal assertion[:monday], [Date.new(2006,8,7),Date.new(2006,8,14),Date.new(2006,8,21),Date.new(2006,8,28)]
|
53
|
+
# wednesday assertions
|
54
|
+
assert_equal assertion[:wednesday].size, 5
|
55
|
+
assert_equal assertion[:wednesday],
|
56
|
+
[Date.new(2006,8,2),Date.new(2006,8,9),Date.new(2006,8,16),Date.new(2006,8,23),Date.new(2006,8,30)]
|
57
|
+
end
|
58
|
+
|
59
|
+
# Tested By: Derek Perez
|
60
|
+
def test_should_return_every_day_of_month_as_array
|
61
|
+
assertion = Month.april(2003).every(:tuesday)
|
62
|
+
assert_equal assertion.size, 5
|
63
|
+
assert_equal assertion, [Date.new(2003,4,1),Date.new(2003,4,8),Date.new(2003,4,15),Date.new(2003,4,22),Date.new(2003,4,29)]
|
64
|
+
end
|
65
|
+
|
66
|
+
# Tested By: Derek Perez
|
67
|
+
def test_should_retun_every_set_of_days_of_month_as_array
|
68
|
+
assertion = Month.august(2006).every(:monday,:wednesday)
|
69
|
+
# verify
|
70
|
+
assert assertion.is_a?(Array)
|
71
|
+
# check for data integrity
|
72
|
+
assert_equal assertion.size, 9
|
73
|
+
assert_equal assertion, [Date.new(2006,8,2),Date.new(2006,8,9),Date.new(2006,8,16),Date.new(2006,8,23),Date.new(2006,8,30),Date.new(2006,8,7),Date.new(2006,8,14),Date.new(2006,8,21),Date.new(2006,8,28)]
|
74
|
+
end
|
75
|
+
|
76
|
+
# Tested By: Derek Perez
|
77
|
+
def test_should_return_total_days_of_month
|
78
|
+
assert_equal Month.april(2004).size, 30
|
79
|
+
assert_equal Month.april(2004).length, 30 # alternate access
|
80
|
+
end
|
81
|
+
|
82
|
+
end
|
@@ -0,0 +1,42 @@
|
|
1
|
+
require 'test_helper'
|
2
|
+
|
3
|
+
class CollectionTest < Test::Unit::TestCase
|
4
|
+
|
5
|
+
# Tested By: Derek Perez
|
6
|
+
def test_should_return_next_month
|
7
|
+
# default by copy
|
8
|
+
assert_equal Month.april.next, Month.may
|
9
|
+
# alternate approach
|
10
|
+
month = Month.april
|
11
|
+
month.next!
|
12
|
+
assert month, Month.may
|
13
|
+
end
|
14
|
+
|
15
|
+
# Tested By: Derek Perez
|
16
|
+
def test_should_return_previous_month
|
17
|
+
# default by copy
|
18
|
+
assert_equal Month.may.previous, Month.april
|
19
|
+
# alternate approach (by copy)
|
20
|
+
assert_equal Month.june.prev, Month.may
|
21
|
+
# alternate approach (by ref)
|
22
|
+
month = Month.august
|
23
|
+
month.previous!
|
24
|
+
assert_equal month, Month.july
|
25
|
+
# alternate approach (by copy)
|
26
|
+
month = Month.july
|
27
|
+
month.prev!
|
28
|
+
assert_equal month, Month.june
|
29
|
+
end
|
30
|
+
|
31
|
+
# Tested By: Derek Perez
|
32
|
+
def test_should_iterate_through_each_day_of_month
|
33
|
+
counter = 0
|
34
|
+
Month.april(2009).each do |day|
|
35
|
+
counter += 1
|
36
|
+
assert Month::DAYS.include?(day.to_day)
|
37
|
+
assert (1..31).include?(day.to_i)
|
38
|
+
end
|
39
|
+
assert_equal counter, Month.april.size
|
40
|
+
end
|
41
|
+
|
42
|
+
end
|
@@ -0,0 +1,37 @@
|
|
1
|
+
require 'test_helper'
|
2
|
+
|
3
|
+
class MagicTest < Test::Unit::TestCase
|
4
|
+
|
5
|
+
# Tested By: Derek Perez
|
6
|
+
def test_should_create_month_through_class_factory
|
7
|
+
assert_equal Month.april, Month.new("April")
|
8
|
+
assert_equal Month.march, Month.new(3)
|
9
|
+
assert_equal Month.june(2010), Month.new("June",2010)
|
10
|
+
end
|
11
|
+
|
12
|
+
# Tested By: Derek Perez
|
13
|
+
def test_should_magically_determine_function_execution
|
14
|
+
assert_equal Month.march.first(:tuesday), Month.march.first_tuesday
|
15
|
+
assert_equal Month.may.every_thursday, Month.may.every(:thursday)
|
16
|
+
assert_equal Month.june.every_tuesday_and_friday, Month.june.every(:tuesday,:friday)
|
17
|
+
end
|
18
|
+
|
19
|
+
# Tested By: Derek Perez
|
20
|
+
def test_should_return_month_as_array_index
|
21
|
+
assert_equal Month[3], Month.march
|
22
|
+
end
|
23
|
+
|
24
|
+
# Tested By: Derek Perez
|
25
|
+
def test_should_return_month_as_hash_key
|
26
|
+
assert_equal Month[:june], Month.june
|
27
|
+
assert_equal Month["april"], Month.april # alternate
|
28
|
+
end
|
29
|
+
|
30
|
+
# Tested By: Derek Perez
|
31
|
+
def test_should_return_days_week_control
|
32
|
+
assert_equal Month.march.first_and_third_tuesday, [Month.march.first(:tuesday), Month.march.third(:tuesday)]
|
33
|
+
assert_equal Month.march.first_and_last_friday, [Month.march.first(:friday), Month.march.last(:friday)]
|
34
|
+
assert_equal Month.march.first_and_second_last_friday, [Month.march.first(:friday), Month.march.second(:friday), Month.march.last(:friday)]
|
35
|
+
end
|
36
|
+
|
37
|
+
end
|
@@ -0,0 +1,30 @@
|
|
1
|
+
require 'test_helper'
|
2
|
+
|
3
|
+
class MathTest < Test::Unit::TestCase
|
4
|
+
|
5
|
+
# Tested By: Derek Perez
|
6
|
+
def test_should_add_month_and_fixnum
|
7
|
+
assert_equal (Month.march + 2), 5
|
8
|
+
end
|
9
|
+
|
10
|
+
# Tested By: Derek Perez
|
11
|
+
def text_should_subtract_month_and_fixnum
|
12
|
+
assert_equal (Month.june - 4), 2
|
13
|
+
end
|
14
|
+
|
15
|
+
# Tested By: Derek Perez
|
16
|
+
def test_should_divide_month_and_fixnum
|
17
|
+
assert_equal (Month.december / 2), 6
|
18
|
+
end
|
19
|
+
|
20
|
+
# Tested By: Derek Perez
|
21
|
+
def test_should_exponent_month_and_fixnum
|
22
|
+
assert_equal (Month.may ** 2), 25
|
23
|
+
end
|
24
|
+
|
25
|
+
# Tested By: Derek Perez
|
26
|
+
def test_should_modulo_month_and_fixnum
|
27
|
+
assert_equal (Month.june % 7), 6
|
28
|
+
end
|
29
|
+
|
30
|
+
end
|
@@ -0,0 +1,94 @@
|
|
1
|
+
require 'test_helper'
|
2
|
+
|
3
|
+
class RulesetsTest < Test::Unit::TestCase
|
4
|
+
|
5
|
+
# load up the test ruleset yaml file
|
6
|
+
def setup
|
7
|
+
SmartMonth::Rulesets.load_file(File.dirname(__FILE__)+'/samples/test_ruleset.yml')
|
8
|
+
end
|
9
|
+
|
10
|
+
# tested by: Derek Perez
|
11
|
+
def test_should_return_date_from_string_with_floating_year
|
12
|
+
floating_year = {:year => Time.now.year, :month => 12, :day => 25}
|
13
|
+
assert_equal [:date,floating_year], SmartMonth::Rulesets.new.send(:parse_string_as_date,{'when' => "December 25th"})
|
14
|
+
end
|
15
|
+
|
16
|
+
# tested by: Derek Perez
|
17
|
+
def test_should_return_date_from_string_with_fixed_year
|
18
|
+
fixed_year = {:year => 2010, :month => 12, :day => 25}
|
19
|
+
assert_equal [:date,fixed_year], SmartMonth::Rulesets.new.send(:parse_string_as_date,{'when' => "December 25th, 2010"})
|
20
|
+
end
|
21
|
+
|
22
|
+
# tested by: Derek Perez
|
23
|
+
def test_should_insert_rule_manually
|
24
|
+
SmartMonth::Rulesets.add_rule('My Manual Rule', 'March 25th 2009')
|
25
|
+
assert_equal Month[3].my_manual_rule, Date.new(2009,3,25)
|
26
|
+
end
|
27
|
+
|
28
|
+
# tested by: Derek Perez
|
29
|
+
def test_should_override_rule_definition_manually
|
30
|
+
initial = Month.december.christmas
|
31
|
+
SmartMonth::Rulesets.add_rule('Christmas', 'December 12th, 2009')
|
32
|
+
assert initial != Month.december.christmas
|
33
|
+
assert_equal Month.december.christmas, Date.new(2009,12,12)
|
34
|
+
end
|
35
|
+
|
36
|
+
# tested by: Derek Perez
|
37
|
+
def test_should_return_frequency_from_string
|
38
|
+
# parsed values
|
39
|
+
expected_every = [:freq, 'every_friday_and_saturday',nil,0]
|
40
|
+
expected_first_second = [:freq,'first_and_second_wednesday',nil,0]
|
41
|
+
expected_monday = [:freq, 'first_monday',nil,0]
|
42
|
+
# test
|
43
|
+
assert_equal expected_every, SmartMonth::Rulesets.new.send(:parse_string_as_frequency,{'when' => "every friday and saturday"})
|
44
|
+
assert_equal expected_first_second, SmartMonth::Rulesets.new.send(:parse_string_as_frequency,{'when' => "first and second wednesday"})
|
45
|
+
assert_equal expected_monday, SmartMonth::Rulesets.new.send(:parse_string_as_frequency,{'when' => "first monday"})
|
46
|
+
end
|
47
|
+
|
48
|
+
# tested by: Derek Perez
|
49
|
+
def test_should_return_context_of_months
|
50
|
+
# parsed values
|
51
|
+
expected_march = [:freq, 'every_monday',['march'], 0]
|
52
|
+
expected_march_june = [:freq, 'first_tuesday',['march','june'],0]
|
53
|
+
expected_march_june_april = [:freq, 'second_tuesday',['march','june','april'],0]
|
54
|
+
# test
|
55
|
+
assert_equal expected_march, SmartMonth::Rulesets.new.send(:parse_string_as_frequency,{'when' => "every monday in march"})
|
56
|
+
assert_equal expected_march_june, SmartMonth::Rulesets.new.send(:parse_string_as_frequency,{'when' => "first tuesday in march and june"})
|
57
|
+
assert_equal expected_march_june_april, SmartMonth::Rulesets.new.send(:parse_string_as_frequency,{'when' => "second tuesday in march, june, and april"})
|
58
|
+
end
|
59
|
+
|
60
|
+
# tested by: Derek Perez
|
61
|
+
def test_should_return_context_of_month_with_year
|
62
|
+
expected_2010 = [:freq, 'every_monday',['november'],2010]
|
63
|
+
assert_equal expected_2010, SmartMonth::Rulesets.new.send(:parse_string_as_frequency,{'when' => 'every monday in november', 'year' => '2010'})
|
64
|
+
end
|
65
|
+
|
66
|
+
# tested by: Derek Perez
|
67
|
+
def test_should_parse_rules
|
68
|
+
# parsed values
|
69
|
+
rule_with_date = [:date, {:year => 2009, :day => 5, :month => 12}]
|
70
|
+
rule_with_freq = [:freq, "every_monday", ["march"], 0]
|
71
|
+
rule_with_freq_and_year = [:freq, "first_and_second_tuesday",["april"],2009]
|
72
|
+
# test
|
73
|
+
assert_equal rule_with_date, SmartMonth::Rulesets.new.send(:parse,{'when'=>'December 5th, 2009'})
|
74
|
+
assert_equal rule_with_freq, SmartMonth::Rulesets.new.send(:parse,{'when'=>'every monday in march'})
|
75
|
+
assert_equal rule_with_freq_and_year, SmartMonth::Rulesets.new.send(:parse,{'when'=>'first and second tuesday in april','year'=>'2009'})
|
76
|
+
end
|
77
|
+
|
78
|
+
|
79
|
+
def test_should_not_apply_alias_if_root_undefined
|
80
|
+
end
|
81
|
+
|
82
|
+
# tested by: Derek Perez
|
83
|
+
def test_should_not_remove_undefined_rule
|
84
|
+
assert !SmartMonth::Rulesets.remove_rule("Rule fake")
|
85
|
+
end
|
86
|
+
|
87
|
+
# tested by: Derek Perez
|
88
|
+
def test_should_remove_defined_rule
|
89
|
+
assert SmartMonth::Rulesets.remove_rule("Christmas")
|
90
|
+
assert !Month.december.respond_to?(:christmas)
|
91
|
+
assert !Month.december.first.respond_to?(:is_christmas?)
|
92
|
+
end
|
93
|
+
|
94
|
+
end
|
@@ -0,0 +1,29 @@
|
|
1
|
+
require 'test_helper'
|
2
|
+
|
3
|
+
class UtilTest < Test::Unit::TestCase
|
4
|
+
|
5
|
+
def test_should_return_year_of_month
|
6
|
+
assert_equal Month.march(2004).year, 2004
|
7
|
+
end
|
8
|
+
|
9
|
+
# Tested By: Derek Perez
|
10
|
+
def test_should_inspect_month_as_string
|
11
|
+
assert_equal Month.march.inspect, "March"
|
12
|
+
end
|
13
|
+
|
14
|
+
# Tested By: Derek Perez
|
15
|
+
def test_should_inspect_month_and_year_as_string
|
16
|
+
assert_equal Month.july(2012).inspect!, "July 2012"
|
17
|
+
end
|
18
|
+
|
19
|
+
# Tested By: Derek Perez
|
20
|
+
def test_should_convert_month_to_string
|
21
|
+
assert_equal Month.march.to_s, "March"
|
22
|
+
end
|
23
|
+
|
24
|
+
# Tested By: Derek Perez
|
25
|
+
def test_should_convert_month_to_fixnum
|
26
|
+
assert_equal Month.june.to_i, 6
|
27
|
+
end
|
28
|
+
|
29
|
+
end
|
metadata
ADDED
@@ -0,0 +1,196 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: smart_month
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 1.0.0
|
5
|
+
platform: ruby
|
6
|
+
authors:
|
7
|
+
- Derek Perez
|
8
|
+
- Jonathan Silverman
|
9
|
+
autorequire:
|
10
|
+
bindir: bin
|
11
|
+
cert_chain: []
|
12
|
+
|
13
|
+
date: 2010-01-06 00:00:00 -07:00
|
14
|
+
default_executable:
|
15
|
+
dependencies: []
|
16
|
+
|
17
|
+
description: |-
|
18
|
+
You can use SmartMonth to:
|
19
|
+
- Determine the first tuesday of any month in any year.
|
20
|
+
- Determine all of the fridays of any month in any year.
|
21
|
+
- Iterate through all the days of a month.
|
22
|
+
- Determine how many days of the month there are.
|
23
|
+
- Determine the first and last days of the month.
|
24
|
+
- And other fun date/month related things!
|
25
|
+
email: derek@derekperez.com
|
26
|
+
executables: []
|
27
|
+
|
28
|
+
extensions: []
|
29
|
+
|
30
|
+
extra_rdoc_files:
|
31
|
+
- README
|
32
|
+
files:
|
33
|
+
- MIT-LICENSE
|
34
|
+
- README
|
35
|
+
- Rakefile
|
36
|
+
- VERSION
|
37
|
+
- lib/month.rb
|
38
|
+
- lib/smart_month.rb
|
39
|
+
- lib/smart_month/calculations.rb
|
40
|
+
- lib/smart_month/collection.rb
|
41
|
+
- lib/smart_month/extensions/date.rb
|
42
|
+
- lib/smart_month/magic.rb
|
43
|
+
- lib/smart_month/math.rb
|
44
|
+
- lib/smart_month/rulesets.rb
|
45
|
+
- lib/smart_month/util.rb
|
46
|
+
- pkg/smart_month-1.0.0.gem
|
47
|
+
- rdoc/classes/Date.html
|
48
|
+
- rdoc/classes/Month.html
|
49
|
+
- rdoc/classes/SmartMonth.html
|
50
|
+
- rdoc/classes/SmartMonth/Calculations.html
|
51
|
+
- rdoc/classes/SmartMonth/Collection.html
|
52
|
+
- rdoc/classes/SmartMonth/Magic.html
|
53
|
+
- rdoc/classes/SmartMonth/Magic/MonthFactory.html
|
54
|
+
- rdoc/classes/SmartMonth/Math.html
|
55
|
+
- rdoc/classes/SmartMonth/Rulesets.html
|
56
|
+
- rdoc/classes/SmartMonth/Util.html
|
57
|
+
- rdoc/classes/Time.html
|
58
|
+
- rdoc/created.rid
|
59
|
+
- rdoc/files/README.html
|
60
|
+
- rdoc/files/lib/month_rb.html
|
61
|
+
- rdoc/files/lib/smart_month/calculations_rb.html
|
62
|
+
- rdoc/files/lib/smart_month/collection_rb.html
|
63
|
+
- rdoc/files/lib/smart_month/extensions/date_rb.html
|
64
|
+
- rdoc/files/lib/smart_month/magic_rb.html
|
65
|
+
- rdoc/files/lib/smart_month/math_rb.html
|
66
|
+
- rdoc/files/lib/smart_month/rulesets_rb.html
|
67
|
+
- rdoc/files/lib/smart_month/util_rb.html
|
68
|
+
- rdoc/files/lib/smart_month_rb.html
|
69
|
+
- rdoc/fr_class_index.html
|
70
|
+
- rdoc/fr_file_index.html
|
71
|
+
- rdoc/fr_method_index.html
|
72
|
+
- rdoc/index.html
|
73
|
+
- rdoc/rdoc-style.css
|
74
|
+
- smart_month.gemspec
|
75
|
+
- test/spec/date/accessor_spec.rb
|
76
|
+
- test/spec/date/add_month_spec.rb
|
77
|
+
- test/spec/date/add_spec.rb
|
78
|
+
- test/spec/date/boat_spec.rb
|
79
|
+
- test/spec/date/civil_spec.rb
|
80
|
+
- test/spec/date/commercial_spec.rb
|
81
|
+
- test/spec/date/constants_spec.rb
|
82
|
+
- test/spec/date/conversions_spec.rb
|
83
|
+
- test/spec/date/downto_spec.rb
|
84
|
+
- test/spec/date/eql_spec.rb
|
85
|
+
- test/spec/date/gregorian_spec.rb
|
86
|
+
- test/spec/date/hash_spec.rb
|
87
|
+
- test/spec/date/infinity_spec.rb
|
88
|
+
- test/spec/date/julian_spec.rb
|
89
|
+
- test/spec/date/minus_month_spec.rb
|
90
|
+
- test/spec/date/minus_spec.rb
|
91
|
+
- test/spec/date/new_spec.rb
|
92
|
+
- test/spec/date/neww_spec.rb
|
93
|
+
- test/spec/date/ordinal_spec.rb
|
94
|
+
- test/spec/date/parse_spec.rb
|
95
|
+
- test/spec/date/relationship_spec.rb
|
96
|
+
- test/spec/date/shared/civil.rb
|
97
|
+
- test/spec/date/shared/commercial.rb
|
98
|
+
- test/spec/date/shared/parse.rb
|
99
|
+
- test/spec/date/shared/parse_eu.rb
|
100
|
+
- test/spec/date/shared/parse_us.rb
|
101
|
+
- test/spec/date/step_spec.rb
|
102
|
+
- test/spec/date/strftime_spec.rb
|
103
|
+
- test/spec/date/strptime_spec.rb
|
104
|
+
- test/spec/date/upto_spec.rb
|
105
|
+
- test/spec/parsedate/parsedate.rb
|
106
|
+
- test/spec/time/httpdate_spec.rb
|
107
|
+
- test/spec/time/iso8601_spec.rb
|
108
|
+
- test/spec/time/rfc2822_spec.rb
|
109
|
+
- test/spec/time/rfc822_spec.rb
|
110
|
+
- test/spec/time/shared/rfc2822.rb
|
111
|
+
- test/spec/time/shared/xmlschema.rb
|
112
|
+
- test/spec/time/xmlschema_spec.rb
|
113
|
+
- test/spec_helper.rb
|
114
|
+
- test/test_helper.rb
|
115
|
+
- test/unit/calculations_test.rb
|
116
|
+
- test/unit/collection_test.rb
|
117
|
+
- test/unit/magic_test.rb
|
118
|
+
- test/unit/math_test.rb
|
119
|
+
- test/unit/rulesets_test.rb
|
120
|
+
- test/unit/samples/test_ruleset.yml
|
121
|
+
- test/unit/util_test.rb
|
122
|
+
has_rdoc: true
|
123
|
+
homepage: http://github.com/perezd/smart_month
|
124
|
+
licenses: []
|
125
|
+
|
126
|
+
post_install_message:
|
127
|
+
rdoc_options:
|
128
|
+
- --charset=UTF-8
|
129
|
+
require_paths:
|
130
|
+
- lib
|
131
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
132
|
+
requirements:
|
133
|
+
- - ">="
|
134
|
+
- !ruby/object:Gem::Version
|
135
|
+
version: "0"
|
136
|
+
version:
|
137
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
138
|
+
requirements:
|
139
|
+
- - ">="
|
140
|
+
- !ruby/object:Gem::Version
|
141
|
+
version: "0"
|
142
|
+
version:
|
143
|
+
requirements: []
|
144
|
+
|
145
|
+
rubyforge_project:
|
146
|
+
rubygems_version: 1.3.5
|
147
|
+
signing_key:
|
148
|
+
specification_version: 3
|
149
|
+
summary: SmartMonth is a "bodysnatcher" plugin that takes boring Date month fixnums and replaces them with a rich toolkit of functionality.
|
150
|
+
test_files:
|
151
|
+
- test/test_helper.rb
|
152
|
+
- test/spec/date/strftime_spec.rb
|
153
|
+
- test/spec/date/ordinal_spec.rb
|
154
|
+
- test/spec/date/step_spec.rb
|
155
|
+
- test/spec/date/hash_spec.rb
|
156
|
+
- test/spec/date/new_spec.rb
|
157
|
+
- test/spec/date/relationship_spec.rb
|
158
|
+
- test/spec/date/julian_spec.rb
|
159
|
+
- test/spec/date/shared/parse.rb
|
160
|
+
- test/spec/date/shared/civil.rb
|
161
|
+
- test/spec/date/shared/parse_eu.rb
|
162
|
+
- test/spec/date/shared/parse_us.rb
|
163
|
+
- test/spec/date/shared/commercial.rb
|
164
|
+
- test/spec/date/strptime_spec.rb
|
165
|
+
- test/spec/date/neww_spec.rb
|
166
|
+
- test/spec/date/add_month_spec.rb
|
167
|
+
- test/spec/date/add_spec.rb
|
168
|
+
- test/spec/date/minus_spec.rb
|
169
|
+
- test/spec/date/civil_spec.rb
|
170
|
+
- test/spec/date/minus_month_spec.rb
|
171
|
+
- test/spec/date/commercial_spec.rb
|
172
|
+
- test/spec/date/parse_spec.rb
|
173
|
+
- test/spec/date/gregorian_spec.rb
|
174
|
+
- test/spec/date/downto_spec.rb
|
175
|
+
- test/spec/date/accessor_spec.rb
|
176
|
+
- test/spec/date/upto_spec.rb
|
177
|
+
- test/spec/date/infinity_spec.rb
|
178
|
+
- test/spec/date/boat_spec.rb
|
179
|
+
- test/spec/date/eql_spec.rb
|
180
|
+
- test/spec/date/constants_spec.rb
|
181
|
+
- test/spec/date/conversions_spec.rb
|
182
|
+
- test/spec/parsedate/parsedate.rb
|
183
|
+
- test/spec/time/shared/rfc2822.rb
|
184
|
+
- test/spec/time/shared/xmlschema.rb
|
185
|
+
- test/spec/time/httpdate_spec.rb
|
186
|
+
- test/spec/time/rfc2822_spec.rb
|
187
|
+
- test/spec/time/iso8601_spec.rb
|
188
|
+
- test/spec/time/xmlschema_spec.rb
|
189
|
+
- test/spec/time/rfc822_spec.rb
|
190
|
+
- test/unit/util_test.rb
|
191
|
+
- test/unit/calculations_test.rb
|
192
|
+
- test/unit/collection_test.rb
|
193
|
+
- test/unit/math_test.rb
|
194
|
+
- test/unit/rulesets_test.rb
|
195
|
+
- test/unit/magic_test.rb
|
196
|
+
- test/spec_helper.rb
|