Skip to content

Commit 045319a

Browse files
committed
Update so we can use this on rails 5
1 parent 9a33735 commit 045319a

File tree

7 files changed

+154
-85
lines changed

7 files changed

+154
-85
lines changed

.ruby-version

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
2.1.3
1+
2.3.7

.travis.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ rvm:
66
- 2.0.0
77
- 2.1.5
88
- 2.2.0
9+
- 2.3.7
910
- jruby-19mode
1011
gemfile:
1112
- spec/gemfiles/Gemfile.rails-4.0.x
@@ -19,6 +20,8 @@ matrix:
1920
gemfile: spec/gemfiles/rails-4.1.x.gemfile
2021
- rvm: 1.9.3
2122
gemfile: spec/gemfiles/rails-4.2.x.gemfile
23+
- rvm: 2.3.7
24+
gemfile: spec/gemfiles/rails-5.0.x.gemfile
2225
- rvm: jruby-19mode
2326
gemfile: spec/gemfiles/Gemfile.rails-3.2.x
2427
fast_finish: true

Gemfile

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,5 @@ gemspec
44
gem 'pg', platform: :ruby
55
gem 'activerecord-jdbcpostgresql-adapter', platform: :jruby
66

7-
gem 'jquery-rails'
8-
9-
gem 'rails', '~> 4.0.12'
10-
gem 'sass-rails', '~> 4.0.5'
7+
gem "rails", "~> 5.2"
8+
gem "sass-rails", "~> 5.0"

Gemfile.lock

Lines changed: 133 additions & 77 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
PATH
22
remote: .
33
specs:
4-
recurring_select (2.0.0)
4+
recurring_select (2.1.0)
55
coffee-rails (>= 3.1)
66
ice_cube (>= 0.11)
77
jquery-rails (>= 3.0)
@@ -11,71 +11,118 @@ PATH
1111
GEM
1212
remote: https://rubygems.org/
1313
specs:
14-
actionmailer (4.0.13)
15-
actionpack (= 4.0.13)
14+
actioncable (5.2.0)
15+
actionpack (= 5.2.0)
16+
nio4r (~> 2.0)
17+
websocket-driver (>= 0.6.1)
18+
actionmailer (5.2.0)
19+
actionpack (= 5.2.0)
20+
actionview (= 5.2.0)
21+
activejob (= 5.2.0)
1622
mail (~> 2.5, >= 2.5.4)
17-
actionpack (4.0.13)
18-
activesupport (= 4.0.13)
19-
builder (~> 3.1.0)
20-
erubis (~> 2.7.0)
21-
rack (~> 1.5.2)
22-
rack-test (~> 0.6.2)
23-
activemodel (4.0.13)
24-
activesupport (= 4.0.13)
25-
builder (~> 3.1.0)
26-
activerecord (4.0.13)
27-
activemodel (= 4.0.13)
28-
activerecord-deprecated_finders (~> 1.0.2)
29-
activesupport (= 4.0.13)
30-
arel (~> 4.0.0)
31-
activerecord-deprecated_finders (1.0.4)
32-
activesupport (4.0.13)
33-
i18n (~> 0.6, >= 0.6.9)
34-
minitest (~> 4.2)
35-
multi_json (~> 1.3)
36-
thread_safe (~> 0.1)
37-
tzinfo (~> 0.3.37)
38-
arel (4.0.2)
39-
builder (3.1.4)
40-
coffee-rails (4.1.0)
23+
rails-dom-testing (~> 2.0)
24+
actionpack (5.2.0)
25+
actionview (= 5.2.0)
26+
activesupport (= 5.2.0)
27+
rack (~> 2.0)
28+
rack-test (>= 0.6.3)
29+
rails-dom-testing (~> 2.0)
30+
rails-html-sanitizer (~> 1.0, >= 1.0.2)
31+
actionview (5.2.0)
32+
activesupport (= 5.2.0)
33+
builder (~> 3.1)
34+
erubi (~> 1.4)
35+
rails-dom-testing (~> 2.0)
36+
rails-html-sanitizer (~> 1.0, >= 1.0.3)
37+
activejob (5.2.0)
38+
activesupport (= 5.2.0)
39+
globalid (>= 0.3.6)
40+
activemodel (5.2.0)
41+
activesupport (= 5.2.0)
42+
activerecord (5.2.0)
43+
activemodel (= 5.2.0)
44+
activesupport (= 5.2.0)
45+
arel (>= 9.0)
46+
activestorage (5.2.0)
47+
actionpack (= 5.2.0)
48+
activerecord (= 5.2.0)
49+
marcel (~> 0.3.1)
50+
activesupport (5.2.0)
51+
concurrent-ruby (~> 1.0, >= 1.0.2)
52+
i18n (>= 0.7, < 2)
53+
minitest (~> 5.1)
54+
tzinfo (~> 1.1)
55+
arel (9.0.0)
56+
builder (3.2.3)
57+
coffee-rails (4.2.2)
4158
coffee-script (>= 2.2.0)
42-
railties (>= 4.0.0, < 5.0)
59+
railties (>= 4.0.0)
4360
coffee-script (2.4.1)
4461
coffee-script-source
4562
execjs
46-
coffee-script-source (1.9.1.1)
63+
coffee-script-source (1.12.2)
64+
concurrent-ruby (1.0.5)
65+
crass (1.0.4)
4766
diff-lcs (1.2.5)
48-
erubis (2.7.0)
49-
execjs (2.6.0)
50-
hike (1.2.3)
51-
i18n (0.7.0)
52-
ice_cube (0.13.0)
53-
jquery-rails (3.1.2)
54-
railties (>= 3.0, < 5.0)
67+
erubi (1.7.1)
68+
execjs (2.7.0)
69+
ffi (1.9.25)
70+
globalid (0.4.1)
71+
activesupport (>= 4.2.0)
72+
i18n (1.0.1)
73+
concurrent-ruby (~> 1.0)
74+
ice_cube (0.16.2)
75+
jquery-rails (4.3.3)
76+
rails-dom-testing (>= 1, < 3)
77+
railties (>= 4.2.0)
5578
thor (>= 0.14, < 2.0)
56-
mail (2.6.3)
57-
mime-types (>= 1.16, < 3)
58-
mime-types (2.6.2)
59-
minitest (4.7.5)
60-
multi_json (1.11.2)
79+
loofah (2.2.2)
80+
crass (~> 1.0.2)
81+
nokogiri (>= 1.5.9)
82+
mail (2.7.0)
83+
mini_mime (>= 0.1.1)
84+
marcel (0.3.2)
85+
mimemagic (~> 0.3.2)
86+
method_source (0.9.0)
87+
mimemagic (0.3.2)
88+
mini_mime (1.0.0)
89+
mini_portile2 (2.3.0)
90+
minitest (5.11.3)
91+
nio4r (2.3.1)
92+
nokogiri (1.8.4)
93+
mini_portile2 (~> 2.3.0)
6194
pg (0.17.1)
62-
rack (1.5.5)
63-
rack-test (0.6.3)
64-
rack (>= 1.0)
65-
rails (4.0.13)
66-
actionmailer (= 4.0.13)
67-
actionpack (= 4.0.13)
68-
activerecord (= 4.0.13)
69-
activesupport (= 4.0.13)
70-
bundler (>= 1.3.0, < 2.0)
71-
railties (= 4.0.13)
72-
sprockets-rails (~> 2.0)
73-
railties (4.0.13)
74-
actionpack (= 4.0.13)
75-
activesupport (= 4.0.13)
95+
rack (2.0.5)
96+
rack-test (1.0.0)
97+
rack (>= 1.0, < 3)
98+
rails (5.2.0)
99+
actioncable (= 5.2.0)
100+
actionmailer (= 5.2.0)
101+
actionpack (= 5.2.0)
102+
actionview (= 5.2.0)
103+
activejob (= 5.2.0)
104+
activemodel (= 5.2.0)
105+
activerecord (= 5.2.0)
106+
activestorage (= 5.2.0)
107+
activesupport (= 5.2.0)
108+
bundler (>= 1.3.0)
109+
railties (= 5.2.0)
110+
sprockets-rails (>= 2.0.0)
111+
rails-dom-testing (2.0.3)
112+
activesupport (>= 4.2.0)
113+
nokogiri (>= 1.6)
114+
rails-html-sanitizer (1.0.4)
115+
loofah (~> 2.2, >= 2.2.2)
116+
railties (5.2.0)
117+
actionpack (= 5.2.0)
118+
activesupport (= 5.2.0)
119+
method_source
76120
rake (>= 0.8.7)
77121
thor (>= 0.18.1, < 2.0)
78-
rake (10.4.2)
122+
rake (12.3.1)
123+
rb-fsevent (0.10.3)
124+
rb-inotify (0.9.10)
125+
ffi (>= 0.5.0, < 2)
79126
rspec (3.1.0)
80127
rspec-core (~> 3.1.0)
81128
rspec-expectations (~> 3.1.0)
@@ -96,37 +143,46 @@ GEM
96143
rspec-mocks (~> 3.1.0)
97144
rspec-support (~> 3.1.0)
98145
rspec-support (3.1.2)
99-
sass (3.2.19)
100-
sass-rails (4.0.5)
101-
railties (>= 4.0.0, < 5.0)
102-
sass (~> 3.2.2)
103-
sprockets (~> 2.8, < 3.0)
104-
sprockets-rails (~> 2.0)
105-
sprockets (2.12.4)
106-
hike (~> 1.2)
107-
multi_json (~> 1.0)
108-
rack (~> 1.0)
109-
tilt (~> 1.1, != 1.3.0)
110-
sprockets-rails (2.3.3)
111-
actionpack (>= 3.0)
112-
activesupport (>= 3.0)
146+
sass (3.5.7)
147+
sass-listen (~> 4.0.0)
148+
sass-listen (4.0.0)
149+
rb-fsevent (~> 0.9, >= 0.9.4)
150+
rb-inotify (~> 0.9, >= 0.9.7)
151+
sass-rails (5.0.7)
152+
railties (>= 4.0.0, < 6)
153+
sass (~> 3.1)
113154
sprockets (>= 2.8, < 4.0)
114-
thor (0.19.1)
115-
thread_safe (0.3.5)
116-
tilt (1.4.1)
117-
tzinfo (0.3.44)
155+
sprockets-rails (>= 2.0, < 4.0)
156+
tilt (>= 1.1, < 3)
157+
sprockets (3.7.2)
158+
concurrent-ruby (~> 1.0)
159+
rack (> 1, < 3)
160+
sprockets-rails (3.2.1)
161+
actionpack (>= 4.0)
162+
activesupport (>= 4.0)
163+
sprockets (>= 3.0.0)
164+
thor (0.20.0)
165+
thread_safe (0.3.6)
166+
tilt (2.0.8)
167+
tzinfo (1.2.5)
168+
thread_safe (~> 0.1)
169+
websocket-driver (0.7.0)
170+
websocket-extensions (>= 0.1.0)
171+
websocket-extensions (0.1.3)
118172

119173
PLATFORMS
120174
ruby
121175

122176
DEPENDENCIES
123177
activerecord-jdbcpostgresql-adapter
124178
bundler (>= 1.3.5)
125-
jquery-rails
126179
pg
127-
rails (~> 4.0.12)
180+
rails (~> 5.2)
128181
rake (>= 0.9.6)
129182
recurring_select!
130183
rspec (>= 2.14)
131184
rspec-rails (>= 2.14)
132-
sass-rails (~> 4.0.5)
185+
sass-rails (~> 5.0)
186+
187+
BUNDLED WITH
188+
1.16.2

app/helpers/recurring_select_helper.rb

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
module RecurringSelectHelper
44
module FormHelper
5-
if Rails::VERSION::MAJOR == 4
5+
if Rails::VERSION::MAJOR >= 4
66
def select_recurring(object, method, default_schedules = nil, options = {}, html_options = {})
77
RecurringSelectTag.new(object, method, self, default_schedules, options, html_options).render
88
end
@@ -114,7 +114,11 @@ def initialize(object, method, template_object, default_schedules = nil, options
114114
end
115115

116116
def render
117-
option_tags = add_options(recurring_options_for_select(value(object), @default_schedules, @options), @options, value(object))
117+
if Rails::VERSION::STRING >= '5.2'
118+
option_tags = add_options(recurring_options_for_select(value, @default_schedules, @options), @options, value)
119+
else
120+
option_tags = add_options(recurring_options_for_select(value(object), @default_schedules, @options), @options, value(object))
121+
end
118122
select_content_tag(option_tags, @options, @html_options)
119123
end
120124
end

lib/recurring_select/version.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
module RecurringSelect
2-
VERSION = "2.0.0"
2+
VERSION = "2.1.0"
33
end

spec/gemfiles/Gemfile.rails-5.0.x

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
source "https://rubygems.org"
2+
gemspec :path => "./../.."
3+
4+
gem 'pg', platform: :ruby
5+
gem 'activerecord-jdbcpostgresql-adapter', platform: :jruby
6+
7+
gem "rails", "~> 5.2"
8+
gem "sass-rails", "~> 5.0"

0 commit comments

Comments
 (0)