has_schedule 1.1.0 → 1.2.0
Sign up to get free protection for your applications and to get access to all the features.
- data/VERSION +1 -1
- data/has_schedule.gemspec +3 -4
- data/lib/has_schedule.rb +9 -3
- metadata +16 -16
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
1.
|
1
|
+
1.2.0
|
data/has_schedule.gemspec
CHANGED
@@ -5,11 +5,11 @@
|
|
5
5
|
|
6
6
|
Gem::Specification.new do |s|
|
7
7
|
s.name = %q{has_schedule}
|
8
|
-
s.version = "1.
|
8
|
+
s.version = "1.2.0"
|
9
9
|
|
10
10
|
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
11
11
|
s.authors = ["Ryan Schlesinger"]
|
12
|
-
s.date = %q{2011-
|
12
|
+
s.date = %q{2011-03-14}
|
13
13
|
s.description = %q{Exposes an ice_cube schedule object and serializes it.}
|
14
14
|
s.email = %q{ryan@instanceinc.com}
|
15
15
|
s.extra_rdoc_files = [
|
@@ -31,11 +31,10 @@ Gem::Specification.new do |s|
|
|
31
31
|
s.homepage = %q{http://github.com/ryansch/has_schedule}
|
32
32
|
s.licenses = ["MIT"]
|
33
33
|
s.require_paths = ["lib"]
|
34
|
-
s.rubygems_version = %q{1.3
|
34
|
+
s.rubygems_version = %q{1.5.3}
|
35
35
|
s.summary = %q{Adds schedule serialization for use with ice_cube}
|
36
36
|
|
37
37
|
if s.respond_to? :specification_version then
|
38
|
-
current_version = Gem::Specification::CURRENT_SPECIFICATION_VERSION
|
39
38
|
s.specification_version = 3
|
40
39
|
|
41
40
|
if Gem::Version.new(Gem::VERSION) >= Gem::Version.new('1.2.0') then
|
data/lib/has_schedule.rb
CHANGED
@@ -7,8 +7,6 @@ module HasSchedule
|
|
7
7
|
def has_schedule
|
8
8
|
send :include, InstanceMethods
|
9
9
|
|
10
|
-
attr_writer :schedule
|
11
|
-
|
12
10
|
alias_method_chain :reload, :schedule
|
13
11
|
before_save :save_with_schedule
|
14
12
|
end
|
@@ -21,7 +19,15 @@ module HasSchedule
|
|
21
19
|
end
|
22
20
|
|
23
21
|
def save_with_schedule
|
24
|
-
self.schedule_yaml = @schedule.to_yaml
|
22
|
+
self.schedule_yaml = @schedule.andand.to_yaml
|
23
|
+
end
|
24
|
+
|
25
|
+
def schedule=(schedule)
|
26
|
+
@schedule = schedule
|
27
|
+
|
28
|
+
if @schedule.nil?
|
29
|
+
save_with_schedule
|
30
|
+
end
|
25
31
|
end
|
26
32
|
|
27
33
|
def schedule
|
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: has_schedule
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
5
|
-
prerelease:
|
4
|
+
hash: 31
|
5
|
+
prerelease:
|
6
6
|
segments:
|
7
7
|
- 1
|
8
|
-
-
|
8
|
+
- 2
|
9
9
|
- 0
|
10
|
-
version: 1.
|
10
|
+
version: 1.2.0
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- Ryan Schlesinger
|
@@ -15,12 +15,10 @@ autorequire:
|
|
15
15
|
bindir: bin
|
16
16
|
cert_chain: []
|
17
17
|
|
18
|
-
date: 2011-
|
18
|
+
date: 2011-03-14 00:00:00 -07:00
|
19
19
|
default_executable:
|
20
20
|
dependencies:
|
21
21
|
- !ruby/object:Gem::Dependency
|
22
|
-
prerelease: false
|
23
|
-
type: :runtime
|
24
22
|
name: ice_cube
|
25
23
|
version_requirements: &id001 !ruby/object:Gem::Requirement
|
26
24
|
none: false
|
@@ -31,10 +29,10 @@ dependencies:
|
|
31
29
|
segments:
|
32
30
|
- 0
|
33
31
|
version: "0"
|
32
|
+
prerelease: false
|
33
|
+
type: :runtime
|
34
34
|
requirement: *id001
|
35
35
|
- !ruby/object:Gem::Dependency
|
36
|
-
prerelease: false
|
37
|
-
type: :development
|
38
36
|
name: shoulda
|
39
37
|
version_requirements: &id002 !ruby/object:Gem::Requirement
|
40
38
|
none: false
|
@@ -45,10 +43,10 @@ dependencies:
|
|
45
43
|
segments:
|
46
44
|
- 0
|
47
45
|
version: "0"
|
48
|
-
requirement: *id002
|
49
|
-
- !ruby/object:Gem::Dependency
|
50
46
|
prerelease: false
|
51
47
|
type: :development
|
48
|
+
requirement: *id002
|
49
|
+
- !ruby/object:Gem::Dependency
|
52
50
|
name: bundler
|
53
51
|
version_requirements: &id003 !ruby/object:Gem::Requirement
|
54
52
|
none: false
|
@@ -61,10 +59,10 @@ dependencies:
|
|
61
59
|
- 0
|
62
60
|
- 0
|
63
61
|
version: 1.0.0
|
64
|
-
requirement: *id003
|
65
|
-
- !ruby/object:Gem::Dependency
|
66
62
|
prerelease: false
|
67
63
|
type: :development
|
64
|
+
requirement: *id003
|
65
|
+
- !ruby/object:Gem::Dependency
|
68
66
|
name: jeweler
|
69
67
|
version_requirements: &id004 !ruby/object:Gem::Requirement
|
70
68
|
none: false
|
@@ -77,10 +75,10 @@ dependencies:
|
|
77
75
|
- 5
|
78
76
|
- 2
|
79
77
|
version: 1.5.2
|
80
|
-
requirement: *id004
|
81
|
-
- !ruby/object:Gem::Dependency
|
82
78
|
prerelease: false
|
83
79
|
type: :development
|
80
|
+
requirement: *id004
|
81
|
+
- !ruby/object:Gem::Dependency
|
84
82
|
name: rcov
|
85
83
|
version_requirements: &id005 !ruby/object:Gem::Requirement
|
86
84
|
none: false
|
@@ -91,6 +89,8 @@ dependencies:
|
|
91
89
|
segments:
|
92
90
|
- 0
|
93
91
|
version: "0"
|
92
|
+
prerelease: false
|
93
|
+
type: :development
|
94
94
|
requirement: *id005
|
95
95
|
description: Exposes an ice_cube schedule object and serializes it.
|
96
96
|
email: ryan@instanceinc.com
|
@@ -142,7 +142,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
142
142
|
requirements: []
|
143
143
|
|
144
144
|
rubyforge_project:
|
145
|
-
rubygems_version: 1.3
|
145
|
+
rubygems_version: 1.5.3
|
146
146
|
signing_key:
|
147
147
|
specification_version: 3
|
148
148
|
summary: Adds schedule serialization for use with ice_cube
|