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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: d6ec6d8bd266ca9919c062f8535487b10b074536
4
- data.tar.gz: e6c92474b6b7325d8cdc58b2e03b4678ef2ef536
3
+ metadata.gz: 3a0eadc52d87a26342d4316658f0ca47983a915c
4
+ data.tar.gz: 51916e1f0882f676c6806f7041008cc940bcc345
5
5
  SHA512:
6
- metadata.gz: 575674d2526e00e742510302264952c0f7316e552467e540815c52b7ba62d20f72c0e7bb792ded3ee3ea83396d325371c6e192becd356a5ccd52c21320cad362
7
- data.tar.gz: 799a694b7ddea894a99e2a5c2fbee265e397b54a535f0826283640ac8b256df8b6d6f948bbb46b699d4e0e1a31ce6ee7a0ae2d5fa7d0fddf4759569456072e70
6
+ metadata.gz: 8c73d7d57b99a3246040d7a86a5d7f87edaebd935ed7df33065acbe7ec6e48450ada78cf16cea623338a2950233854225ac9abbf3af17c21f859030841aff29a
7
+ data.tar.gz: af6b02e2d55249ce4050939ab6c9eef9cc06db634b3f9dd4fc287a6518717aa0d981aa72637b1ff98467d7ac78f9b1053aaf08c9a5f53539b51a076477dc8b63
@@ -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
@@ -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 *(BROKEN)*
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
@@ -1,4 +1,6 @@
1
1
  source "http://rubygems.org"
2
2
 
3
+ gem "codeclimate-test-reporter", group: :test, require: nil
4
+
3
5
  # Specify your gem's dependencies in schedule_atts.gemspec
4
6
  gemspec
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- dgp-schedule_attributes (0.5.1)
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
- byebug (2.7.0)
32
- columnize (~> 0.3)
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
@@ -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
 
@@ -2,6 +2,7 @@
2
2
 
3
3
  source "http://rubygems.org"
4
4
 
5
+ gem "codeclimate-test-reporter", :group => :test, :require => nil
5
6
  gem "activesupport", :github => "rails/rails", :branch => "3-2-stable"
6
7
  gem "strong_parameters"
7
8
 
@@ -35,7 +35,7 @@ GIT
35
35
  PATH
36
36
  remote: ../
37
37
  specs:
38
- dgp-schedule_attributes (0.5.0)
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
- byebug (5.0.0)
53
- columnize (= 0.9.0)
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
@@ -2,6 +2,7 @@
2
2
 
3
3
  source "http://rubygems.org"
4
4
 
5
+ gem "codeclimate-test-reporter", :group => :test, :require => nil
5
6
  gem "activesupport", :github => "rails/rails", :branch => "4-0-stable"
6
7
 
7
8
  gemspec :path => "../"
@@ -21,7 +21,7 @@ GIT
21
21
  PATH
22
22
  remote: ../
23
23
  specs:
24
- dgp-schedule_attributes (0.5.0)
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
- byebug (5.0.0)
40
- columnize (= 0.9.0)
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
@@ -2,6 +2,7 @@
2
2
 
3
3
  source "http://rubygems.org"
4
4
 
5
+ gem "codeclimate-test-reporter", :group => :test, :require => nil
5
6
  gem "activesupport", :github => "rails/rails", :branch => "4-1-stable"
6
7
 
7
8
  gemspec :path => "../"
@@ -20,7 +20,7 @@ GIT
20
20
  PATH
21
21
  remote: ../
22
22
  specs:
23
- dgp-schedule_attributes (0.5.0)
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
- byebug (5.0.0)
38
- columnize (= 0.9.0)
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
@@ -2,6 +2,7 @@
2
2
 
3
3
  source "http://rubygems.org"
4
4
 
5
+ gem "codeclimate-test-reporter", :group => :test, :require => nil
5
6
  gem "activesupport", :github => "rails/rails", :branch => "4-2-stable"
6
7
 
7
8
  gemspec :path => "../"
@@ -20,7 +20,7 @@ GIT
20
20
  PATH
21
21
  remote: ../
22
22
  specs:
23
- dgp-schedule_attributes (0.5.0)
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
- byebug (5.0.0)
38
- columnize (= 0.9.0)
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
@@ -2,6 +2,7 @@
2
2
 
3
3
  source "http://rubygems.org"
4
4
 
5
+ gem "codeclimate-test-reporter", :group => :test, :require => nil
5
6
  gem "activesupport", :github => "rails/rails"
6
7
  gem "arel", :github => "rails/arel"
7
8
 
@@ -27,7 +27,7 @@ GIT
27
27
  PATH
28
28
  remote: ../
29
29
  specs:
30
- dgp-schedule_attributes (0.5.0)
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
- byebug (5.0.0)
44
- columnize (= 0.9.0)
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 merged_start_time
160
+ if merged_end_time
160
161
  options.delete('end_date')
161
162
  options['end_time'] = merged_end_time.to_s
162
163
  end
@@ -1,3 +1,3 @@
1
1
  module ScheduleAttributes
2
- VERSION = "0.5.1"
2
+ VERSION = "0.5.2"
3
3
  end
@@ -29,5 +29,4 @@ Gem::Specification.new do |s|
29
29
  s.add_development_dependency 'activerecord', '>= 3.2'
30
30
  s.add_development_dependency 'sqlite3'
31
31
  s.add_development_dependency 'appraisal'
32
- s.add_development_dependency 'pry-byebug'
33
32
  end
@@ -1,6 +1,8 @@
1
+ require "codeclimate-test-reporter"
2
+ CodeClimate::TestReporter.start
3
+
1
4
  require 'active_support'
2
5
  require 'ostruct'
3
- require 'pry-byebug'
4
6
  require 'support/parser_macros'
5
7
 
6
8
  # $: << File.expand_path('../lib')
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.1
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