broadcast_calendar 1.1.0 → 1.1.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.
- data/Gemfile.lock +1 -1
- data/broadcast_calendar.gemspec +1 -1
- data/lib/broadcast_calendar.rb +4 -0
- data/lib/broadcast_calendar/version.rb +1 -1
- data/spec/broadcast_calendar_spec.rb +17 -0
- metadata +6 -8
data/Gemfile.lock
CHANGED
data/broadcast_calendar.gemspec
CHANGED
@@ -12,7 +12,7 @@ Gem::Specification.new do |s|
|
|
12
12
|
s.homepage = %q{http://github.com/subelsky/broadcast_calendar}
|
13
13
|
s.rdoc_options = ["--charset=UTF-8"]
|
14
14
|
s.require_paths = ["lib"]
|
15
|
-
s.summary = %q{
|
15
|
+
s.summary = %q{Returns the beginning and ending Gregorian (civil) dates for months in the broadcast calendar.}
|
16
16
|
s.description = %q{Library tht returns the beginning and ending Gregorian (civil) dates for months in the broadcast calendar.}
|
17
17
|
s.test_files = `git ls-files spec`.split("\n")
|
18
18
|
s.add_development_dependency 'rspec'
|
data/lib/broadcast_calendar.rb
CHANGED
@@ -63,4 +63,21 @@ describe BroadcastCalendar do
|
|
63
63
|
end
|
64
64
|
end
|
65
65
|
end
|
66
|
+
|
67
|
+
it "returns broadcast weeks for a given month and year" do
|
68
|
+
weeks = BroadcastCalendar.weeks_for(7,2011)
|
69
|
+
weeks[0].should == (Date.new(2011,6,27)..Date.new(2011,7,3))
|
70
|
+
weeks[1].should == (Date.new(2011,7,4)..Date.new(2011,7,10))
|
71
|
+
weeks[2].should == (Date.new(2011,7,11)..Date.new(2011,7,17))
|
72
|
+
weeks[3].should == (Date.new(2011,7,18)..Date.new(2011,7,24))
|
73
|
+
weeks[4].should == (Date.new(2011,7,25)..Date.new(2011,7,31))
|
74
|
+
|
75
|
+
weeks = BroadcastCalendar.weeks_for(8,2010)
|
76
|
+
weeks[0].should == (Date.new(2010,7,26)..Date.new(2010,8,1))
|
77
|
+
weeks[1].should == (Date.new(2010,8,2)..Date.new(2010,8,8))
|
78
|
+
weeks[2].should == (Date.new(2010,8,9)..Date.new(2010,8,15))
|
79
|
+
weeks[3].should == (Date.new(2010,8,16)..Date.new(2010,8,22))
|
80
|
+
weeks[4].should == (Date.new(2010,8,23)..Date.new(2010,8,29))
|
81
|
+
end
|
82
|
+
|
66
83
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: broadcast_calendar
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.1.
|
4
|
+
version: 1.1.1
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,12 +9,11 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2011-
|
13
|
-
default_executable:
|
12
|
+
date: 2011-08-25 00:00:00.000000000Z
|
14
13
|
dependencies:
|
15
14
|
- !ruby/object:Gem::Dependency
|
16
15
|
name: rspec
|
17
|
-
requirement: &
|
16
|
+
requirement: &2157378300 !ruby/object:Gem::Requirement
|
18
17
|
none: false
|
19
18
|
requirements:
|
20
19
|
- - ! '>='
|
@@ -22,7 +21,7 @@ dependencies:
|
|
22
21
|
version: '0'
|
23
22
|
type: :development
|
24
23
|
prerelease: false
|
25
|
-
version_requirements: *
|
24
|
+
version_requirements: *2157378300
|
26
25
|
description: Library tht returns the beginning and ending Gregorian (civil) dates
|
27
26
|
for months in the broadcast calendar.
|
28
27
|
email: mike@subelsky.com
|
@@ -45,7 +44,6 @@ files:
|
|
45
44
|
- lib/broadcast_calendar/version.rb
|
46
45
|
- spec/broadcast_calendar_spec.rb
|
47
46
|
- spec/spec_helper.rb
|
48
|
-
has_rdoc: true
|
49
47
|
homepage: http://github.com/subelsky/broadcast_calendar
|
50
48
|
licenses:
|
51
49
|
- MIT
|
@@ -68,10 +66,10 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
68
66
|
version: '0'
|
69
67
|
requirements: []
|
70
68
|
rubyforge_project:
|
71
|
-
rubygems_version: 1.
|
69
|
+
rubygems_version: 1.8.8
|
72
70
|
signing_key:
|
73
71
|
specification_version: 3
|
74
|
-
summary:
|
72
|
+
summary: Returns the beginning and ending Gregorian (civil) dates for months in the
|
75
73
|
broadcast calendar.
|
76
74
|
test_files:
|
77
75
|
- spec/broadcast_calendar_spec.rb
|