dgp-schedule_attributes 0.5.1 → 0.5.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.travis.yml +4 -0
- data/CHANGELOG.md +5 -1
- data/Gemfile +2 -0
- data/Gemfile.lock +10 -10
- data/README.markdown +2 -0
- data/gemfiles/rails_3.2.gemfile +1 -0
- data/gemfiles/rails_3.2.gemfile.lock +10 -8
- data/gemfiles/rails_4.0.gemfile +1 -0
- data/gemfiles/rails_4.0.gemfile.lock +11 -8
- data/gemfiles/rails_4.1.gemfile +1 -0
- data/gemfiles/rails_4.1.gemfile.lock +10 -8
- data/gemfiles/rails_4.2.gemfile +1 -0
- data/gemfiles/rails_4.2.gemfile.lock +10 -8
- data/gemfiles/rails_edge.gemfile +1 -0
- data/gemfiles/rails_edge.gemfile.lock +10 -8
- data/lib/schedule_attributes/core.rb +2 -1
- data/lib/schedule_attributes/version.rb +1 -1
- data/schedule_attributes.gemspec +0 -1
- data/spec/spec_helper.rb +3 -1
- metadata +1 -15
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 3a0eadc52d87a26342d4316658f0ca47983a915c
|
4
|
+
data.tar.gz: 51916e1f0882f676c6806f7041008cc940bcc345
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 8c73d7d57b99a3246040d7a86a5d7f87edaebd935ed7df33065acbe7ec6e48450ada78cf16cea623338a2950233854225ac9abbf3af17c21f859030841aff29a
|
7
|
+
data.tar.gz: af6b02e2d55249ce4050939ab6c9eef9cc06db634b3f9dd4fc287a6518717aa0d981aa72637b1ff98467d7ac78f9b1053aaf08c9a5f53539b51a076477dc8b63
|
data/.travis.yml
CHANGED
@@ -1,3 +1,4 @@
|
|
1
|
+
sudo: false
|
1
2
|
rvm:
|
2
3
|
- 1.9.3
|
3
4
|
- 2.0.0
|
@@ -26,3 +27,6 @@ matrix:
|
|
26
27
|
gemfile: gemfiles/rails_edge.gemfile
|
27
28
|
allow_failures:
|
28
29
|
- gemfile: gemfiles/rails_edge.gemfile
|
30
|
+
addons:
|
31
|
+
code_climate:
|
32
|
+
repo_token: 4059ce412c6d923b0d5b281f87da3431fdfe2edf267f60d0ff890656432b7af5
|
data/CHANGELOG.md
CHANGED
@@ -5,9 +5,13 @@ All notable changes to this project will be documented in this file.
|
|
5
5
|
|
6
6
|
## 0.5.1
|
7
7
|
|
8
|
+
- Fix bug with end_time merging ~ @dgilperez
|
9
|
+
|
10
|
+
## 0.5.2
|
11
|
+
|
8
12
|
- Fix several failing combinations of start/end_time and start/end_date after allowing Model#schedule_attributes to accept string- and symbol-keyed hashes ~ @dgilperez
|
9
13
|
|
10
|
-
## 0.5.0
|
14
|
+
## 0.5.0
|
11
15
|
|
12
16
|
- Added Code of Conduct from Contributor Covenant ~ @dgilperez
|
13
17
|
- Tests are now rspec-3 like ~ @dgilperez
|
data/Gemfile
CHANGED
data/Gemfile.lock
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
dgp-schedule_attributes (0.5.
|
4
|
+
dgp-schedule_attributes (0.5.2)
|
5
5
|
activesupport (>= 3.2)
|
6
6
|
ice_cube (~> 0.13)
|
7
7
|
tzinfo
|
@@ -28,13 +28,11 @@ GEM
|
|
28
28
|
thor (>= 0.14.0)
|
29
29
|
arel (6.0.3)
|
30
30
|
builder (3.2.2)
|
31
|
-
|
32
|
-
|
33
|
-
debugger-linecache (~> 1.2)
|
31
|
+
codeclimate-test-reporter (0.4.7)
|
32
|
+
simplecov (>= 0.7.1, < 1.0.0)
|
34
33
|
coderay (1.0.9)
|
35
|
-
columnize (0.9.0)
|
36
|
-
debugger-linecache (1.2.0)
|
37
34
|
diff-lcs (1.2.5)
|
35
|
+
docile (1.1.5)
|
38
36
|
i18n (0.7.0)
|
39
37
|
ice_cube (0.13.0)
|
40
38
|
json (1.8.3)
|
@@ -44,9 +42,6 @@ GEM
|
|
44
42
|
coderay (~> 1.0.5)
|
45
43
|
method_source (~> 0.8)
|
46
44
|
slop (~> 3.4)
|
47
|
-
pry-byebug (1.3.2)
|
48
|
-
byebug (~> 2.7)
|
49
|
-
pry (~> 0.9.12)
|
50
45
|
rake (10.0.4)
|
51
46
|
rspec (2.99.0)
|
52
47
|
rspec-core (~> 2.99.0)
|
@@ -56,6 +51,11 @@ GEM
|
|
56
51
|
rspec-expectations (2.99.2)
|
57
52
|
diff-lcs (>= 1.1.3, < 2.0)
|
58
53
|
rspec-mocks (2.99.4)
|
54
|
+
simplecov (0.10.0)
|
55
|
+
docile (~> 1.1.0)
|
56
|
+
json (~> 1.8)
|
57
|
+
simplecov-html (~> 0.10.0)
|
58
|
+
simplecov-html (0.10.0)
|
59
59
|
slop (3.4.4)
|
60
60
|
sqlite3 (1.3.10)
|
61
61
|
thor (0.19.1)
|
@@ -69,9 +69,9 @@ PLATFORMS
|
|
69
69
|
DEPENDENCIES
|
70
70
|
activerecord (>= 3.2)
|
71
71
|
appraisal
|
72
|
+
codeclimate-test-reporter
|
72
73
|
dgp-schedule_attributes!
|
73
74
|
pry
|
74
|
-
pry-byebug
|
75
75
|
rake
|
76
76
|
rspec (~> 2.99)
|
77
77
|
sqlite3
|
data/README.markdown
CHANGED
@@ -1,5 +1,7 @@
|
|
1
1
|
# Schedule Attributes
|
2
2
|
[![Build Status](https://travis-ci.org/dgilperez/schedule_attributes.png)](https://travis-ci.org/dgilperez/schedule_attributes)
|
3
|
+
[![Code Climate](https://codeclimate.com/github/dgilperez/schedule_attributes/badges/gpa.svg)](https://codeclimate.com/github/dgilperez/schedule_attributes)
|
4
|
+
[![Test Coverage](https://codeclimate.com/github/dgilperez/schedule_attributes/badges/coverage.svg)](https://codeclimate.com/github/dgilperez/schedule_attributes/coverage)
|
3
5
|
|
4
6
|
Schedule Attributes allows models (ORM agnostic) to accept recurring schedule form parameters and translate them into an [IceCube](https://github.com/seejohnrun/ice_cube/) `Schedule` object. Schedule Attributes adds `#schedule_attributes` and `#schedule_attributes=` methods that let your model automatically populate Rails forms and receive HTML form parameters. Additionally, it provides access to the `IceCube::Schedule` object itself.
|
5
7
|
|
data/gemfiles/rails_3.2.gemfile
CHANGED
@@ -35,7 +35,7 @@ GIT
|
|
35
35
|
PATH
|
36
36
|
remote: ../
|
37
37
|
specs:
|
38
|
-
dgp-schedule_attributes (0.5.
|
38
|
+
dgp-schedule_attributes (0.5.2)
|
39
39
|
activesupport (>= 3.2)
|
40
40
|
ice_cube (~> 0.13)
|
41
41
|
tzinfo
|
@@ -49,11 +49,11 @@ GEM
|
|
49
49
|
thor (>= 0.14.0)
|
50
50
|
arel (3.0.3)
|
51
51
|
builder (3.0.4)
|
52
|
-
|
53
|
-
|
52
|
+
codeclimate-test-reporter (0.4.7)
|
53
|
+
simplecov (>= 0.7.1, < 1.0.0)
|
54
54
|
coderay (1.1.0)
|
55
|
-
columnize (0.9.0)
|
56
55
|
diff-lcs (1.2.5)
|
56
|
+
docile (1.1.5)
|
57
57
|
erubis (2.7.0)
|
58
58
|
hike (1.2.3)
|
59
59
|
i18n (0.7.0)
|
@@ -66,9 +66,6 @@ GEM
|
|
66
66
|
coderay (~> 1.1.0)
|
67
67
|
method_source (~> 0.8.1)
|
68
68
|
slop (~> 3.4)
|
69
|
-
pry-byebug (3.2.0)
|
70
|
-
byebug (~> 5.0)
|
71
|
-
pry (~> 0.10)
|
72
69
|
rack (1.4.7)
|
73
70
|
rack-cache (1.2)
|
74
71
|
rack (>= 0.4)
|
@@ -87,6 +84,11 @@ GEM
|
|
87
84
|
rspec-expectations (2.99.2)
|
88
85
|
diff-lcs (>= 1.1.3, < 2.0)
|
89
86
|
rspec-mocks (2.99.4)
|
87
|
+
simplecov (0.10.0)
|
88
|
+
docile (~> 1.1.0)
|
89
|
+
json (~> 1.8)
|
90
|
+
simplecov-html (~> 0.10.0)
|
91
|
+
simplecov-html (0.10.0)
|
90
92
|
slop (3.6.0)
|
91
93
|
sprockets (2.2.3)
|
92
94
|
hike (~> 1.2)
|
@@ -110,9 +112,9 @@ DEPENDENCIES
|
|
110
112
|
activerecord (>= 3.2)
|
111
113
|
activesupport!
|
112
114
|
appraisal
|
115
|
+
codeclimate-test-reporter
|
113
116
|
dgp-schedule_attributes!
|
114
117
|
pry
|
115
|
-
pry-byebug
|
116
118
|
rake
|
117
119
|
rspec (~> 2.99)
|
118
120
|
sqlite3
|
data/gemfiles/rails_4.0.gemfile
CHANGED
@@ -21,7 +21,7 @@ GIT
|
|
21
21
|
PATH
|
22
22
|
remote: ../
|
23
23
|
specs:
|
24
|
-
dgp-schedule_attributes (0.5.
|
24
|
+
dgp-schedule_attributes (0.5.2)
|
25
25
|
activesupport (>= 3.2)
|
26
26
|
ice_cube (~> 0.13)
|
27
27
|
tzinfo
|
@@ -36,13 +36,14 @@ GEM
|
|
36
36
|
thor (>= 0.14.0)
|
37
37
|
arel (4.0.2)
|
38
38
|
builder (3.1.4)
|
39
|
-
|
40
|
-
|
39
|
+
codeclimate-test-reporter (0.4.7)
|
40
|
+
simplecov (>= 0.7.1, < 1.0.0)
|
41
41
|
coderay (1.1.0)
|
42
|
-
columnize (0.9.0)
|
43
42
|
diff-lcs (1.2.5)
|
43
|
+
docile (1.1.5)
|
44
44
|
i18n (0.7.0)
|
45
45
|
ice_cube (0.13.0)
|
46
|
+
json (1.8.3)
|
46
47
|
method_source (0.8.2)
|
47
48
|
minitest (4.7.5)
|
48
49
|
multi_json (1.11.2)
|
@@ -50,9 +51,6 @@ GEM
|
|
50
51
|
coderay (~> 1.1.0)
|
51
52
|
method_source (~> 0.8.1)
|
52
53
|
slop (~> 3.4)
|
53
|
-
pry-byebug (3.2.0)
|
54
|
-
byebug (~> 5.0)
|
55
|
-
pry (~> 0.10)
|
56
54
|
rake (10.4.2)
|
57
55
|
rspec (2.99.0)
|
58
56
|
rspec-core (~> 2.99.0)
|
@@ -62,6 +60,11 @@ GEM
|
|
62
60
|
rspec-expectations (2.99.2)
|
63
61
|
diff-lcs (>= 1.1.3, < 2.0)
|
64
62
|
rspec-mocks (2.99.4)
|
63
|
+
simplecov (0.10.0)
|
64
|
+
docile (~> 1.1.0)
|
65
|
+
json (~> 1.8)
|
66
|
+
simplecov-html (~> 0.10.0)
|
67
|
+
simplecov-html (0.10.0)
|
65
68
|
slop (3.6.0)
|
66
69
|
sqlite3 (1.3.10)
|
67
70
|
thor (0.19.1)
|
@@ -75,9 +78,9 @@ DEPENDENCIES
|
|
75
78
|
activerecord (>= 3.2)
|
76
79
|
activesupport!
|
77
80
|
appraisal
|
81
|
+
codeclimate-test-reporter
|
78
82
|
dgp-schedule_attributes!
|
79
83
|
pry
|
80
|
-
pry-byebug
|
81
84
|
rake
|
82
85
|
rspec (~> 2.99)
|
83
86
|
sqlite3
|
data/gemfiles/rails_4.1.gemfile
CHANGED
@@ -20,7 +20,7 @@ GIT
|
|
20
20
|
PATH
|
21
21
|
remote: ../
|
22
22
|
specs:
|
23
|
-
dgp-schedule_attributes (0.5.
|
23
|
+
dgp-schedule_attributes (0.5.2)
|
24
24
|
activesupport (>= 3.2)
|
25
25
|
ice_cube (~> 0.13)
|
26
26
|
tzinfo
|
@@ -34,11 +34,11 @@ GEM
|
|
34
34
|
thor (>= 0.14.0)
|
35
35
|
arel (5.0.1.20140414130214)
|
36
36
|
builder (3.2.2)
|
37
|
-
|
38
|
-
|
37
|
+
codeclimate-test-reporter (0.4.7)
|
38
|
+
simplecov (>= 0.7.1, < 1.0.0)
|
39
39
|
coderay (1.1.0)
|
40
|
-
columnize (0.9.0)
|
41
40
|
diff-lcs (1.2.5)
|
41
|
+
docile (1.1.5)
|
42
42
|
i18n (0.7.0)
|
43
43
|
ice_cube (0.13.0)
|
44
44
|
json (1.8.3)
|
@@ -48,9 +48,6 @@ GEM
|
|
48
48
|
coderay (~> 1.1.0)
|
49
49
|
method_source (~> 0.8.1)
|
50
50
|
slop (~> 3.4)
|
51
|
-
pry-byebug (3.2.0)
|
52
|
-
byebug (~> 5.0)
|
53
|
-
pry (~> 0.10)
|
54
51
|
rake (10.4.2)
|
55
52
|
rspec (2.99.0)
|
56
53
|
rspec-core (~> 2.99.0)
|
@@ -60,6 +57,11 @@ GEM
|
|
60
57
|
rspec-expectations (2.99.2)
|
61
58
|
diff-lcs (>= 1.1.3, < 2.0)
|
62
59
|
rspec-mocks (2.99.4)
|
60
|
+
simplecov (0.10.0)
|
61
|
+
docile (~> 1.1.0)
|
62
|
+
json (~> 1.8)
|
63
|
+
simplecov-html (~> 0.10.0)
|
64
|
+
simplecov-html (0.10.0)
|
63
65
|
slop (3.6.0)
|
64
66
|
sqlite3 (1.3.10)
|
65
67
|
thor (0.19.1)
|
@@ -74,9 +76,9 @@ DEPENDENCIES
|
|
74
76
|
activerecord (>= 3.2)
|
75
77
|
activesupport!
|
76
78
|
appraisal
|
79
|
+
codeclimate-test-reporter
|
77
80
|
dgp-schedule_attributes!
|
78
81
|
pry
|
79
|
-
pry-byebug
|
80
82
|
rake
|
81
83
|
rspec (~> 2.99)
|
82
84
|
sqlite3
|
data/gemfiles/rails_4.2.gemfile
CHANGED
@@ -20,7 +20,7 @@ GIT
|
|
20
20
|
PATH
|
21
21
|
remote: ../
|
22
22
|
specs:
|
23
|
-
dgp-schedule_attributes (0.5.
|
23
|
+
dgp-schedule_attributes (0.5.2)
|
24
24
|
activesupport (>= 3.2)
|
25
25
|
ice_cube (~> 0.13)
|
26
26
|
tzinfo
|
@@ -34,11 +34,11 @@ GEM
|
|
34
34
|
thor (>= 0.14.0)
|
35
35
|
arel (6.0.3)
|
36
36
|
builder (3.2.2)
|
37
|
-
|
38
|
-
|
37
|
+
codeclimate-test-reporter (0.4.7)
|
38
|
+
simplecov (>= 0.7.1, < 1.0.0)
|
39
39
|
coderay (1.1.0)
|
40
|
-
columnize (0.9.0)
|
41
40
|
diff-lcs (1.2.5)
|
41
|
+
docile (1.1.5)
|
42
42
|
i18n (0.7.0)
|
43
43
|
ice_cube (0.13.0)
|
44
44
|
json (1.8.3)
|
@@ -48,9 +48,6 @@ GEM
|
|
48
48
|
coderay (~> 1.1.0)
|
49
49
|
method_source (~> 0.8.1)
|
50
50
|
slop (~> 3.4)
|
51
|
-
pry-byebug (3.2.0)
|
52
|
-
byebug (~> 5.0)
|
53
|
-
pry (~> 0.10)
|
54
51
|
rake (10.4.2)
|
55
52
|
rspec (2.99.0)
|
56
53
|
rspec-core (~> 2.99.0)
|
@@ -60,6 +57,11 @@ GEM
|
|
60
57
|
rspec-expectations (2.99.2)
|
61
58
|
diff-lcs (>= 1.1.3, < 2.0)
|
62
59
|
rspec-mocks (2.99.4)
|
60
|
+
simplecov (0.10.0)
|
61
|
+
docile (~> 1.1.0)
|
62
|
+
json (~> 1.8)
|
63
|
+
simplecov-html (~> 0.10.0)
|
64
|
+
simplecov-html (0.10.0)
|
63
65
|
slop (3.6.0)
|
64
66
|
sqlite3 (1.3.10)
|
65
67
|
thor (0.19.1)
|
@@ -74,9 +76,9 @@ DEPENDENCIES
|
|
74
76
|
activerecord (>= 3.2)
|
75
77
|
activesupport!
|
76
78
|
appraisal
|
79
|
+
codeclimate-test-reporter
|
77
80
|
dgp-schedule_attributes!
|
78
81
|
pry
|
79
|
-
pry-byebug
|
80
82
|
rake
|
81
83
|
rspec (~> 2.99)
|
82
84
|
sqlite3
|
data/gemfiles/rails_edge.gemfile
CHANGED
@@ -27,7 +27,7 @@ GIT
|
|
27
27
|
PATH
|
28
28
|
remote: ../
|
29
29
|
specs:
|
30
|
-
dgp-schedule_attributes (0.5.
|
30
|
+
dgp-schedule_attributes (0.5.2)
|
31
31
|
activesupport (>= 3.2)
|
32
32
|
ice_cube (~> 0.13)
|
33
33
|
tzinfo
|
@@ -40,12 +40,12 @@ GEM
|
|
40
40
|
rake
|
41
41
|
thor (>= 0.14.0)
|
42
42
|
builder (3.2.2)
|
43
|
-
|
44
|
-
|
43
|
+
codeclimate-test-reporter (0.4.7)
|
44
|
+
simplecov (>= 0.7.1, < 1.0.0)
|
45
45
|
coderay (1.1.0)
|
46
|
-
columnize (0.9.0)
|
47
46
|
concurrent-ruby (0.9.1)
|
48
47
|
diff-lcs (1.2.5)
|
48
|
+
docile (1.1.5)
|
49
49
|
i18n (0.7.0)
|
50
50
|
ice_cube (0.13.0)
|
51
51
|
json (1.8.3)
|
@@ -55,9 +55,6 @@ GEM
|
|
55
55
|
coderay (~> 1.1.0)
|
56
56
|
method_source (~> 0.8.1)
|
57
57
|
slop (~> 3.4)
|
58
|
-
pry-byebug (3.2.0)
|
59
|
-
byebug (~> 5.0)
|
60
|
-
pry (~> 0.10)
|
61
58
|
rake (10.4.2)
|
62
59
|
rspec (2.99.0)
|
63
60
|
rspec-core (~> 2.99.0)
|
@@ -67,6 +64,11 @@ GEM
|
|
67
64
|
rspec-expectations (2.99.2)
|
68
65
|
diff-lcs (>= 1.1.3, < 2.0)
|
69
66
|
rspec-mocks (2.99.4)
|
67
|
+
simplecov (0.10.0)
|
68
|
+
docile (~> 1.1.0)
|
69
|
+
json (~> 1.8)
|
70
|
+
simplecov-html (~> 0.10.0)
|
71
|
+
simplecov-html (0.10.0)
|
70
72
|
slop (3.6.0)
|
71
73
|
sqlite3 (1.3.10)
|
72
74
|
thor (0.19.1)
|
@@ -82,9 +84,9 @@ DEPENDENCIES
|
|
82
84
|
activesupport!
|
83
85
|
appraisal
|
84
86
|
arel!
|
87
|
+
codeclimate-test-reporter
|
85
88
|
dgp-schedule_attributes!
|
86
89
|
pry
|
87
|
-
pry-byebug
|
88
90
|
rake
|
89
91
|
rspec (~> 2.99)
|
90
92
|
sqlite3
|
@@ -29,6 +29,7 @@ module ScheduleAttributes
|
|
29
29
|
|
30
30
|
def schedule_attributes=(options)
|
31
31
|
raise ArgumentError "expecting a Hash" unless options.is_a? Hash
|
32
|
+
|
32
33
|
options = options.with_indifferent_access
|
33
34
|
merge_date_and_time_into_time_attribute!(options)
|
34
35
|
|
@@ -156,7 +157,7 @@ module ScheduleAttributes
|
|
156
157
|
options.delete('start_date')
|
157
158
|
options['start_time'] = merged_start_time.to_s
|
158
159
|
end
|
159
|
-
if
|
160
|
+
if merged_end_time
|
160
161
|
options.delete('end_date')
|
161
162
|
options['end_time'] = merged_end_time.to_s
|
162
163
|
end
|
data/schedule_attributes.gemspec
CHANGED
data/spec/spec_helper.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: dgp-schedule_attributes
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.5.
|
4
|
+
version: 0.5.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- David Gil
|
@@ -136,20 +136,6 @@ dependencies:
|
|
136
136
|
- - ">="
|
137
137
|
- !ruby/object:Gem::Version
|
138
138
|
version: '0'
|
139
|
-
- !ruby/object:Gem::Dependency
|
140
|
-
name: pry-byebug
|
141
|
-
requirement: !ruby/object:Gem::Requirement
|
142
|
-
requirements:
|
143
|
-
- - ">="
|
144
|
-
- !ruby/object:Gem::Version
|
145
|
-
version: '0'
|
146
|
-
type: :development
|
147
|
-
prerelease: false
|
148
|
-
version_requirements: !ruby/object:Gem::Requirement
|
149
|
-
requirements:
|
150
|
-
- - ">="
|
151
|
-
- !ruby/object:Gem::Version
|
152
|
-
version: '0'
|
153
139
|
description: Converts to/from date & time inputs for managing scheduled models.
|
154
140
|
email:
|
155
141
|
- dgilperez@gmail.com
|