schedule_attributes 0.3.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (40) hide show
  1. data/.gitignore +4 -0
  2. data/.rspec +1 -0
  3. data/Gemfile +6 -0
  4. data/Gemfile.lock +57 -0
  5. data/README.markdown +69 -0
  6. data/Rakefile +7 -0
  7. data/lib/schedule_attributes.rb +18 -0
  8. data/lib/schedule_attributes/active_record.rb +50 -0
  9. data/lib/schedule_attributes/configuration.rb +22 -0
  10. data/lib/schedule_attributes/core.rb +144 -0
  11. data/lib/schedule_attributes/extensions/ice_cube.rb +11 -0
  12. data/lib/schedule_attributes/form_builder.rb +42 -0
  13. data/lib/schedule_attributes/input.rb +151 -0
  14. data/lib/schedule_attributes/model.rb +24 -0
  15. data/lib/schedule_attributes/railtie.rb +13 -0
  16. data/lib/schedule_attributes/rule_parser.rb +25 -0
  17. data/lib/schedule_attributes/rule_parser/base.rb +96 -0
  18. data/lib/schedule_attributes/rule_parser/day.rb +13 -0
  19. data/lib/schedule_attributes/rule_parser/month.rb +40 -0
  20. data/lib/schedule_attributes/rule_parser/week.rb +18 -0
  21. data/lib/schedule_attributes/rule_parser/year.rb +21 -0
  22. data/lib/schedule_attributes/serializer.rb +30 -0
  23. data/lib/schedule_attributes/time_helpers.rb +31 -0
  24. data/lib/schedule_attributes/version.rb +3 -0
  25. data/schedule_attributes.gemspec +28 -0
  26. data/spec/active_record_integration_spec.rb +45 -0
  27. data/spec/schedule_attributes/configuration_spec.rb +25 -0
  28. data/spec/schedule_attributes/input_spec.rb +174 -0
  29. data/spec/schedule_attributes/rule_parser/day_spec.rb +113 -0
  30. data/spec/schedule_attributes/rule_parser/month_spec.rb +47 -0
  31. data/spec/schedule_attributes/rule_parser/week_spec.rb +36 -0
  32. data/spec/schedule_attributes/rule_parser/year_spec.rb +53 -0
  33. data/spec/schedule_attributes/rule_parser_spec.rb +18 -0
  34. data/spec/schedule_attributes/time_helpers_spec.rb +39 -0
  35. data/spec/schedule_attributes_spec.rb +219 -0
  36. data/spec/spec_helper.rb +11 -0
  37. data/spec/support/parser_macros.rb +27 -0
  38. data/spec/support/scheduled_active_record_model.rb +42 -0
  39. data/spec/support/scheduled_model.rb +16 -0
  40. metadata +218 -0
@@ -0,0 +1,53 @@
1
+ require 'spec_helper'
2
+ require 'ice_cube'
3
+ require 'schedule_attributes/rule_parser'
4
+ require 'schedule_attributes/input'
5
+
6
+ describe ScheduleAttributes::RuleParser::Year do
7
+ let(:t) { Date.today }
8
+ let(:n) { Date.new(Date.current.year,3,14) }
9
+
10
+ let(:every_year) { [t, t>>12, t>>24, t>>36, t>>48].map(&:to_time) }
11
+ let(:every_2nd_year) { [t, t>>24, t>>48].map(&:to_time) }
12
+ let(:every_pi_day) { [n, n>>12, n>>24, n>>36, n>>48].tap{ |a| a.shift if t.yday > n.yday }.map(&:to_time) }
13
+
14
+ describe "#rule" do
15
+ let(:input) { ScheduleAttributes::Input.new(example.metadata[:args]) }
16
+ let(:parser) { described_class.new(input) }
17
+ subject { parser.rule }
18
+
19
+ context args: {} do
20
+ it { should == IceCube::Rule.yearly }
21
+ its_occurrences_until(4.years.from_now) { should == every_year }
22
+ end
23
+
24
+ context args: {"interval" => "2"} do
25
+ it { should == IceCube::Rule.yearly(2) }
26
+ its_occurrences_until(4.years.from_now) { should == every_2nd_year }
27
+ end
28
+
29
+ context args: {"start_date" => "2000-03-14"} do
30
+ it { should == IceCube::Rule.yearly.month_of_year(3).day_of_month(14) }
31
+ end
32
+
33
+ context args: {"start_date" => "2000-01-30"} do
34
+ it { should == IceCube::Rule.yearly.month_of_year(1).day_of_month(30) }
35
+ end
36
+
37
+ context args: {"start_date" => "2000-03-14", "end_date" => "#{Date.current.year+4}-03-14"} do
38
+ it { should == IceCube::Rule.yearly.month_of_year(3).day_of_month(14).until(Date.new(Date.current.year+4,3,14).to_time) }
39
+ its_occurrences_until(10.years.from_now) { should == every_pi_day }
40
+ end
41
+
42
+ context "ignoring yearly_start and end limits", args: {
43
+ "start_date" => "2000-03-14",
44
+ "yearly_start_month" => "4",
45
+ "yearly_start_month_day" => "15",
46
+ "yearly_end_month" => "5",
47
+ "yearly_end_month_day" => "20"
48
+ } do
49
+ it { should == IceCube::Rule.yearly.month_of_year(3).day_of_month(14) }
50
+ its_occurrences_until(Date.new(Date.current.year+4,12,31)) { should == every_pi_day }
51
+ end
52
+ end
53
+ end
@@ -0,0 +1,18 @@
1
+ require 'spec_helper'
2
+ require 'schedule_attributes/rule_parser'
3
+
4
+ describe ScheduleAttributes::RuleParser do
5
+ describe "class methods" do
6
+ {
7
+ "day" => ScheduleAttributes::RuleParser::Day,
8
+ "week" => ScheduleAttributes::RuleParser::Week,
9
+ "month" => ScheduleAttributes::RuleParser::Month,
10
+ "year" => ScheduleAttributes::RuleParser::Year
11
+ }. each do |key,parser_class|
12
+
13
+ it "returns parser for #{key} interval units" do
14
+ ScheduleAttributes::RuleParser[key].should == parser_class
15
+ end
16
+ end
17
+ end
18
+ end
@@ -0,0 +1,39 @@
1
+ require 'spec_helper'
2
+ require 'schedule_attributes/time_helpers'
3
+ require 'active_support/time_with_zone'
4
+
5
+ describe ScheduleAttributes::TimeHelpers do
6
+ describe '.parse_in_zone' do
7
+
8
+ context "with time zone" do
9
+ before { Time.zone = 'UTC' }
10
+
11
+ it "returns a time from a date string" do
12
+ subject.parse_in_zone("2000-12-31").should == Time.zone.parse("2000-12-31")
13
+ end
14
+
15
+ it "returns a time from a time" do
16
+ local_offset = "-08:00"
17
+ local_time = Time.new(2000,12,31,0,0,0,local_offset)
18
+ subject.parse_in_zone(local_time).should == Time.zone.parse("2000-12-31 08:00:00")
19
+ end
20
+
21
+ it "returns a time from a date" do
22
+ subject.parse_in_zone(Date.new(2000,12,31)).should == Time.zone.parse("2000-12-31")
23
+ end
24
+ end
25
+
26
+ context "without ActiveSupport" do
27
+ before { Time.zone = nil }
28
+
29
+ it "returns a time from a date string" do
30
+ subject.parse_in_zone("2000-12-31").should == Time.parse("2000-12-31")
31
+ end
32
+
33
+ it "returns a time from a time" do
34
+ subject.parse_in_zone(Time.new(2000,12,31)).should == Time.parse("2000-12-31")
35
+ end
36
+ end
37
+
38
+ end
39
+ end
@@ -0,0 +1,219 @@
1
+ require 'spec_helper'
2
+ require 'support/scheduled_model'
3
+
4
+ describe ScheduledModel do
5
+
6
+ describe "#schedule" do
7
+ subject(:schedule) { ScheduledModel.new.schedule }
8
+
9
+ it "should default to a daily schedule" do
10
+ schedule.should be_a(IceCube::Schedule)
11
+ schedule.rtimes.should == []
12
+ schedule.start_time.should == Date.today.to_time
13
+ schedule.end_time.should be nil
14
+ schedule.rrules.should == [IceCube::Rule.daily]
15
+ end
16
+ end
17
+
18
+ describe "#schedule_attributes=" do
19
+ describe "setting the correct schedule" do
20
+ let(:scheduled_model) { ScheduledModel.new.tap { |m| m.schedule_attributes = example.metadata[:args] } }
21
+ subject(:schedule) { scheduled_model.schedule }
22
+
23
+ context args: {repeat: '0', date: '1-1-1985', interval: '5 (ignore this)'} do
24
+ its(:start_time) { should == Time.new(1985,1,1) }
25
+ its(:all_occurrences) { should == [Time.new(1985,1,1)] }
26
+ its(:rrules) { should be_blank }
27
+ end
28
+
29
+ context args: {repeat: '0', dates: ['1-1-1985', '31-12-1985'], interval: '5 (ignore this)'} do
30
+ its(:start_time) { should == Time.new(1985,1,1) }
31
+ its(:all_occurrences) { should == [Time.new(1985,1,1), Time.new(1985,12,31)] }
32
+ its(:rrules) { should be_blank }
33
+ end
34
+
35
+ context args: {repeat: '0', dates: ['1-1-1985', '31-12-1985'], start_time: '12:00', end_time: '14:00', interval: '5 (ignore this)'} do
36
+ its(:start_time) { should == Time.new(1985,1,1,12,0) }
37
+ its(:duration) { should == 7200 }
38
+ its(:all_occurrences) { should == [Time.new(1985,1,1,12,0), Time.new(1985,12,31,12,0)] }
39
+ its(:rrules) { should be_blank }
40
+ specify { schedule.occurring_between?(helpers.parse_in_zone('1985-1-1 12:00'), helpers.parse_in_zone('1985-6-25 14:00')).should be_true }
41
+ specify { schedule.occurs_at?(helpers.parse_in_zone('1985-1-1 12:00')).should be_true }
42
+ specify { schedule.occurs_at?(helpers.parse_in_zone('1985-6-6 15:00')).should be_false }
43
+ end
44
+
45
+ context args: {repeat: '1'} do
46
+ its(:start_time) { should == Date.today.to_time }
47
+ its(:rrules) { should == [IceCube::Rule.daily] }
48
+ end
49
+
50
+ context args: {repeat: '1', start_date: '1-1-1985', interval_unit: 'day', interval: '3'} do
51
+ its(:start_time) { should == Date.new(1985,1,1).to_time }
52
+ its(:rrules) { should == [IceCube::Rule.daily(3)] }
53
+ specify { schedule.first(3).should == [Date.civil(1985,1,1), Date.civil(1985,1,4), Date.civil(1985,1,7)].map(&:to_time) }
54
+ end
55
+
56
+ context args: {repeat: "1", start_date: "1-1-1985", interval_unit: "day", interval: "3", end_date: "29-12-1985", ends: "eventually"} do
57
+ its(:start_time) { should == Date.new(1985,1,1).to_time }
58
+ its(:rrules) { should == [ IceCube::Rule.daily(3).until(Date.new(1985,12,29).to_time_in_current_zone) ] }
59
+ specify { schedule.first(3).should == [Date.civil(1985,1,1), Date.civil(1985,1,4), Date.civil(1985,1,7)].map(&:to_time) }
60
+ end
61
+
62
+ context args: {repeat: '1', start_date: '1-1-1985', interval_unit: 'day', interval: '3', until_date: '29-12-1985', ends: 'never'} do
63
+ its(:start_time) { should == Date.new(1985,1,1).to_time }
64
+ its(:rrules) { should == [IceCube::Rule.daily(3)] }
65
+ specify { schedule.first(3).should == [Date.civil(1985,1,1), Date.civil(1985,1,4), Date.civil(1985,1,7)].map(&:to_time) }
66
+ end
67
+
68
+ context args: {repeat: '1', start_date: '1-1-1985', interval_unit: 'week', interval: '3', monday: '1', wednesday: '1', friday: '1'} do
69
+ its(:start_time) { should == Date.new(1985,1,1).to_time }
70
+ its(:rrules) { should == [IceCube::Rule.weekly(3).day(:monday, :wednesday, :friday)] }
71
+ specify { schedule.occurs_at?(helpers.parse_in_zone('1985-1-2')).should be_true }
72
+ specify { schedule.occurs_at?(helpers.parse_in_zone('1985-1-4')).should be_true }
73
+ specify { schedule.occurs_at?(helpers.parse_in_zone('1985-1-7')).should be_false }
74
+ specify { schedule.occurs_at?(helpers.parse_in_zone('1985-1-21')).should be_true }
75
+ end
76
+
77
+ context args: {repeat: '1', start_date: '1-1-1985', interval_unit: 'day'} do
78
+ its(:rrules) { should == [IceCube::Rule.daily(1)] }
79
+ end
80
+
81
+ context args: {repeat: '1', start_date: '1-1-1985', interval_unit: 'year'} do
82
+ its(:start_time) { should == Date.new(1985,1,1).to_time }
83
+ its(:rrules) { should == [IceCube::Rule.yearly.day_of_month(1).month_of_year(1)] }
84
+ specify { schedule.first(3).should == [Date.civil(1985,1,1), Date.civil(1986,1,1), Date.civil(1987,1,1)].map(&:to_time) }
85
+ end
86
+
87
+ context args: {repeat: '1', interval_unit: 'day', start_date: '2012-09-27', yearly_start_month: '12', yearly_start_month_day: '1', yearly_end_month: '4', yearly_end_month_day: '21'} do
88
+ its(:start_time) { should == Time.new(2012,9,27) }
89
+ its(:rrules) { should == [IceCube::Rule.daily.month_of_year(12,1,2,3,4)] }
90
+ its(:exrules) { should == [IceCube::Rule.daily.month_of_year(4).day_of_month(*22..31)] }
91
+ end
92
+
93
+ context "all_day", pending: "Work in progress"
94
+ end
95
+
96
+ describe "setting the schedule field", args: {repeat: '1', start_date: '1-1-1985', interval_unit: 'day', interval: '3'} do
97
+ let(:scheduled_model) { ScheduledModel.new.tap { |m| m.schedule_attributes = example.metadata[:args] } }
98
+ subject { scheduled_model }
99
+
100
+ its(:schedule) { should == IceCube::Schedule.new(Date.new(1985,1,1).to_time).tap { |s| s.add_recurrence_rule IceCube::Rule.daily(3) } }
101
+ end
102
+
103
+ end
104
+
105
+ describe "schedule_attributes" do
106
+ let(:scheduled_model) { ScheduledModel.new }
107
+ let(:schedule) { IceCube::Schedule.new(Date.tomorrow.to_time) }
108
+ subject { scheduled_model.schedule_attributes }
109
+ before { scheduled_model.stub(schedule: schedule) }
110
+
111
+ context "for a single date" do
112
+ before { schedule.add_recurrence_time(Date.tomorrow.to_time) }
113
+ it { should == OpenStruct.new(repeat: 0, interval: 1, date: Date.tomorrow, dates: [Date.tomorrow], start_date: Date.today, all_day: true) }
114
+ its(:date) { should be_a(Date) }
115
+ end
116
+
117
+ context "when it repeats daily" do
118
+ before do
119
+ schedule.add_recurrence_rule(IceCube::Rule.daily(4))
120
+ end
121
+ it { should == OpenStruct.new(repeat: 1, start_date: Date.tomorrow, interval_unit: 'day', interval: 4, ends: 'never', date: Date.today, all_day: true) }
122
+ its(:start_date){ should be_a(Date) }
123
+ end
124
+
125
+ context "when it repeats with an end date" do
126
+ before do
127
+ schedule.add_recurrence_rule(IceCube::Rule.daily(4).until((Date.today+10).to_time))
128
+ end
129
+ it { should == OpenStruct.new(repeat: 1, start_date: Date.tomorrow, interval_unit: 'day', interval: 4, ends: 'eventually', end_date: Date.today+10, date: Date.today, all_day: true) }
130
+ its(:start_date){ should be_a(Date) }
131
+ its(:end_date){ should be_a(Date) }
132
+ end
133
+
134
+ context "when it repeats weekly" do
135
+ before do
136
+ schedule.add_recurrence_time(Date.tomorrow)
137
+ schedule.add_recurrence_rule(IceCube::Rule.weekly(4).day(:monday, :wednesday, :friday))
138
+ end
139
+ it do
140
+ should == OpenStruct.new(
141
+ :repeat => 1,
142
+ :start_date => Date.tomorrow,
143
+ :interval_unit => 'week',
144
+ :interval => 4,
145
+ :ends => 'never',
146
+ :monday => 1,
147
+ :wednesday => 1,
148
+ :friday => 1,
149
+ :all_day => true,
150
+
151
+ :date => Date.today #for the form
152
+ )
153
+ end
154
+ end
155
+
156
+ context "when it repeats yearly" do
157
+ before do
158
+ schedule.add_recurrence_time(Date.tomorrow)
159
+ schedule.add_recurrence_rule(IceCube::Rule.yearly)
160
+ end
161
+ it do
162
+ should == OpenStruct.new(
163
+ :repeat => 1,
164
+ :start_date => Date.tomorrow,
165
+ :interval_unit => 'year',
166
+ :interval => 1,
167
+ :ends => 'never',
168
+ :all_day => true,
169
+
170
+ :date => Date.today #for the form
171
+ )
172
+ end
173
+ end
174
+
175
+ context "when it has yearly date range" do
176
+ it "should have yearly start and end months" do
177
+ schedule.add_recurrence_rule(IceCube::Rule.daily.month_of_year(12,1,2))
178
+
179
+ subject.yearly_start_month.should == 12
180
+ subject.yearly_end_month.should == 2
181
+ end
182
+
183
+ it "should have a yearly start date" do
184
+ schedule.add_recurrence_rule(IceCube::Rule.daily.month_of_year(11,12,1,2))
185
+ schedule.add_exception_rule(IceCube::Rule.daily.month_of_year(11).day_of_month(*1..6))
186
+
187
+ subject.yearly_start_month.should == 11
188
+ subject.yearly_start_month_day.should == 7
189
+ end
190
+
191
+ it "should have a yearly end date" do
192
+ schedule.add_recurrence_rule(IceCube::Rule.daily.month_of_year(1,2,3))
193
+ schedule.add_exception_rule(IceCube::Rule.daily.month_of_year(3).day_of_month(*26..31))
194
+
195
+ subject.yearly_end_month.should == 3
196
+ subject.yearly_end_month_day.should == 25
197
+ end
198
+
199
+ it "should have no yearly start day for months only" do
200
+ schedule.add_recurrence_rule(IceCube::Rule.daily.month_of_year(1,2,3))
201
+
202
+ subject.yearly_start_month_day.should be_nil
203
+ end
204
+
205
+ it "should have a yearly start day on the first when end day is set" do
206
+ schedule.add_recurrence_rule(IceCube::Rule.daily.month_of_year(1,2,3))
207
+ schedule.add_exception_rule(IceCube::Rule.daily.month_of_year(3).day_of_month(*26..31))
208
+
209
+ subject.yearly_start_month_day.should == 1
210
+ end
211
+ end
212
+
213
+ context "all_day", pending: "Work in progress"
214
+ end
215
+
216
+ def helpers
217
+ ScheduleAttributes::TimeHelpers
218
+ end
219
+ end
@@ -0,0 +1,11 @@
1
+ require 'active_support/core_ext'
2
+ require 'ostruct'
3
+ require 'pry'
4
+ require 'support/parser_macros'
5
+
6
+ $: << File.expand_path('../lib')
7
+
8
+ RSpec.configure do |config|
9
+ config.include SpecHelpers::ParserMacros
10
+ config.expect_with :rspec
11
+ end
@@ -0,0 +1,27 @@
1
+ module SpecHelpers
2
+ module ParserMacros
3
+ extend ActiveSupport::Concern
4
+
5
+ module ClassMethods
6
+ def its_occurrences_until(date, &block)
7
+ describe "occurrences" do
8
+ shared_examples do
9
+
10
+ orig_subject = subject
11
+
12
+ self.class.class_eval do
13
+ define_method(:subject) do
14
+ schedule = IceCube::Schedule.new(Date.today.to_time)
15
+ schedule.add_recurrence_rule(orig_subject)
16
+ @_subject = schedule.occurrences(date)
17
+ end
18
+ end
19
+
20
+ yield
21
+ end
22
+ end
23
+ end
24
+ end
25
+
26
+ end
27
+ end
@@ -0,0 +1,42 @@
1
+ require 'active_record'
2
+ require 'schedule_attributes/active_record'
3
+
4
+ class ActiveRecord::Base
5
+ extend ScheduleAttributes::ActiveRecord::Sugar
6
+
7
+ establish_connection(
8
+ adapter: "sqlite3",
9
+ database: ":memory:"
10
+ )
11
+ end
12
+
13
+ ActiveRecord::Migration.create_table :calendars do |t|
14
+ t.text :schedule
15
+ t.text :my_schedule
16
+ end
17
+
18
+ class CustomScheduledActiveRecordModel < ActiveRecord::Base
19
+ self.table_name = :calendars
20
+ has_schedule_attributes :column_name => :my_schedule
21
+
22
+ def default_schedule
23
+ s = IceCube::Schedule.new(Date.today.to_time)
24
+ s.add_recurrence_rule IceCube::Rule.hourly
25
+ s
26
+ end
27
+
28
+ def initialize(*args)
29
+ super
30
+ @can_access_default_schedule_in_initialize = my_schedule.next_occurrence
31
+ end
32
+ end
33
+
34
+ class DefaultScheduledActiveRecordModel < ActiveRecord::Base
35
+ self.table_name = :calendars
36
+ has_schedule_attributes
37
+
38
+ def initialize(*args)
39
+ super
40
+ @can_access_default_schedule_in_initialize = schedule.next_occurrence
41
+ end
42
+ end
@@ -0,0 +1,16 @@
1
+ require 'schedule_attributes'
2
+
3
+ class ScheduledModel
4
+ include ScheduleAttributes::Model
5
+ attr_accessor :schedule
6
+
7
+ schedule_field = :schedule
8
+
9
+ def schedule
10
+ @schedule or ScheduleAttributes.default_schedule
11
+ end
12
+
13
+ def schedule=(new_schedule)
14
+ @schedule = new_schedule
15
+ end
16
+ end
metadata ADDED
@@ -0,0 +1,218 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: schedule_attributes
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.3.0
5
+ prerelease:
6
+ platform: ruby
7
+ authors:
8
+ - Andrew Vit
9
+ - Mike Nicholaides
10
+ autorequire:
11
+ bindir: bin
12
+ cert_chain: []
13
+ date: 2013-05-10 00:00:00.000000000 Z
14
+ dependencies:
15
+ - !ruby/object:Gem::Dependency
16
+ name: ice_cube
17
+ requirement: !ruby/object:Gem::Requirement
18
+ none: false
19
+ requirements:
20
+ - - ! '>='
21
+ - !ruby/object:Gem::Version
22
+ version: 0.10.0
23
+ type: :runtime
24
+ prerelease: false
25
+ version_requirements: !ruby/object:Gem::Requirement
26
+ none: false
27
+ requirements:
28
+ - - ! '>='
29
+ - !ruby/object:Gem::Version
30
+ version: 0.10.0
31
+ - !ruby/object:Gem::Dependency
32
+ name: activesupport
33
+ requirement: !ruby/object:Gem::Requirement
34
+ none: false
35
+ requirements:
36
+ - - ! '>='
37
+ - !ruby/object:Gem::Version
38
+ version: '0'
39
+ type: :runtime
40
+ prerelease: false
41
+ version_requirements: !ruby/object:Gem::Requirement
42
+ none: false
43
+ requirements:
44
+ - - ! '>='
45
+ - !ruby/object:Gem::Version
46
+ version: '0'
47
+ - !ruby/object:Gem::Dependency
48
+ name: tzinfo
49
+ requirement: !ruby/object:Gem::Requirement
50
+ none: false
51
+ requirements:
52
+ - - ! '>='
53
+ - !ruby/object:Gem::Version
54
+ version: '0'
55
+ type: :runtime
56
+ prerelease: false
57
+ version_requirements: !ruby/object:Gem::Requirement
58
+ none: false
59
+ requirements:
60
+ - - ! '>='
61
+ - !ruby/object:Gem::Version
62
+ version: '0'
63
+ - !ruby/object:Gem::Dependency
64
+ name: rspec
65
+ requirement: !ruby/object:Gem::Requirement
66
+ none: false
67
+ requirements:
68
+ - - ! '>='
69
+ - !ruby/object:Gem::Version
70
+ version: '0'
71
+ type: :development
72
+ prerelease: false
73
+ version_requirements: !ruby/object:Gem::Requirement
74
+ none: false
75
+ requirements:
76
+ - - ! '>='
77
+ - !ruby/object:Gem::Version
78
+ version: '0'
79
+ - !ruby/object:Gem::Dependency
80
+ name: pry
81
+ requirement: !ruby/object:Gem::Requirement
82
+ none: false
83
+ requirements:
84
+ - - ! '>='
85
+ - !ruby/object:Gem::Version
86
+ version: '0'
87
+ type: :development
88
+ prerelease: false
89
+ version_requirements: !ruby/object:Gem::Requirement
90
+ none: false
91
+ requirements:
92
+ - - ! '>='
93
+ - !ruby/object:Gem::Version
94
+ version: '0'
95
+ - !ruby/object:Gem::Dependency
96
+ name: activerecord
97
+ requirement: !ruby/object:Gem::Requirement
98
+ none: false
99
+ requirements:
100
+ - - ! '>='
101
+ - !ruby/object:Gem::Version
102
+ version: '0'
103
+ type: :development
104
+ prerelease: false
105
+ version_requirements: !ruby/object:Gem::Requirement
106
+ none: false
107
+ requirements:
108
+ - - ! '>='
109
+ - !ruby/object:Gem::Version
110
+ version: '0'
111
+ - !ruby/object:Gem::Dependency
112
+ name: sqlite3
113
+ requirement: !ruby/object:Gem::Requirement
114
+ none: false
115
+ requirements:
116
+ - - ! '>='
117
+ - !ruby/object:Gem::Version
118
+ version: '0'
119
+ type: :development
120
+ prerelease: false
121
+ version_requirements: !ruby/object:Gem::Requirement
122
+ none: false
123
+ requirements:
124
+ - - ! '>='
125
+ - !ruby/object:Gem::Version
126
+ version: '0'
127
+ description: Converts to/from date & time inputs for managing scheduled models.
128
+ email:
129
+ - andrew@avit.ca
130
+ - mike@ablegray.com
131
+ executables: []
132
+ extensions: []
133
+ extra_rdoc_files: []
134
+ files:
135
+ - .gitignore
136
+ - .rspec
137
+ - Gemfile
138
+ - Gemfile.lock
139
+ - README.markdown
140
+ - Rakefile
141
+ - lib/schedule_attributes.rb
142
+ - lib/schedule_attributes/active_record.rb
143
+ - lib/schedule_attributes/configuration.rb
144
+ - lib/schedule_attributes/core.rb
145
+ - lib/schedule_attributes/extensions/ice_cube.rb
146
+ - lib/schedule_attributes/form_builder.rb
147
+ - lib/schedule_attributes/input.rb
148
+ - lib/schedule_attributes/model.rb
149
+ - lib/schedule_attributes/railtie.rb
150
+ - lib/schedule_attributes/rule_parser.rb
151
+ - lib/schedule_attributes/rule_parser/base.rb
152
+ - lib/schedule_attributes/rule_parser/day.rb
153
+ - lib/schedule_attributes/rule_parser/month.rb
154
+ - lib/schedule_attributes/rule_parser/week.rb
155
+ - lib/schedule_attributes/rule_parser/year.rb
156
+ - lib/schedule_attributes/serializer.rb
157
+ - lib/schedule_attributes/time_helpers.rb
158
+ - lib/schedule_attributes/version.rb
159
+ - schedule_attributes.gemspec
160
+ - spec/active_record_integration_spec.rb
161
+ - spec/schedule_attributes/configuration_spec.rb
162
+ - spec/schedule_attributes/input_spec.rb
163
+ - spec/schedule_attributes/rule_parser/day_spec.rb
164
+ - spec/schedule_attributes/rule_parser/month_spec.rb
165
+ - spec/schedule_attributes/rule_parser/week_spec.rb
166
+ - spec/schedule_attributes/rule_parser/year_spec.rb
167
+ - spec/schedule_attributes/rule_parser_spec.rb
168
+ - spec/schedule_attributes/time_helpers_spec.rb
169
+ - spec/schedule_attributes_spec.rb
170
+ - spec/spec_helper.rb
171
+ - spec/support/parser_macros.rb
172
+ - spec/support/scheduled_active_record_model.rb
173
+ - spec/support/scheduled_model.rb
174
+ homepage: https://github.com/avit/schedule_attributes
175
+ licenses: []
176
+ post_install_message:
177
+ rdoc_options: []
178
+ require_paths:
179
+ - lib
180
+ required_ruby_version: !ruby/object:Gem::Requirement
181
+ none: false
182
+ requirements:
183
+ - - ! '>='
184
+ - !ruby/object:Gem::Version
185
+ version: '0'
186
+ segments:
187
+ - 0
188
+ hash: -134151832476221113
189
+ required_rubygems_version: !ruby/object:Gem::Requirement
190
+ none: false
191
+ requirements:
192
+ - - ! '>='
193
+ - !ruby/object:Gem::Version
194
+ version: '0'
195
+ segments:
196
+ - 0
197
+ hash: -134151832476221113
198
+ requirements: []
199
+ rubyforge_project:
200
+ rubygems_version: 1.8.25
201
+ signing_key:
202
+ specification_version: 3
203
+ summary: Handle form inputs for IceCube schedules
204
+ test_files:
205
+ - spec/active_record_integration_spec.rb
206
+ - spec/schedule_attributes/configuration_spec.rb
207
+ - spec/schedule_attributes/input_spec.rb
208
+ - spec/schedule_attributes/rule_parser/day_spec.rb
209
+ - spec/schedule_attributes/rule_parser/month_spec.rb
210
+ - spec/schedule_attributes/rule_parser/week_spec.rb
211
+ - spec/schedule_attributes/rule_parser/year_spec.rb
212
+ - spec/schedule_attributes/rule_parser_spec.rb
213
+ - spec/schedule_attributes/time_helpers_spec.rb
214
+ - spec/schedule_attributes_spec.rb
215
+ - spec/spec_helper.rb
216
+ - spec/support/parser_macros.rb
217
+ - spec/support/scheduled_active_record_model.rb
218
+ - spec/support/scheduled_model.rb