Skip to content

Commit 464a852

Browse files
committed
🎉 Rails 5 Support. Closes #2.
1 parent e9625e0 commit 464a852

File tree

4 files changed

+10
-6
lines changed

4 files changed

+10
-6
lines changed

.travis.yml

+4-2
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,12 @@ rvm:
55
- 2.0.0
66
- 2.1.0
77
- 2.2.2
8+
- 2.3.0
89

910
env:
10-
- 'RAILS_VERSION=4.1'
11-
- 'RAILS_VERSION=4.2'
11+
- 'RAILS_VERSION=4.1.0'
12+
- 'RAILS_VERSION=4.2.0'
13+
- 'RAILS_VERSION=5.x'
1214

1315
bundler_args: --without development
1416

Gemfile

+2-2
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,9 @@ gemspec
44

55
gem 'rake', '~> 10.4'
66

7-
rails_version = ENV['RAILS_VERSION'] || '4.2'
7+
rails_version = ENV['RAILS_VERSION'] || '5.x'
88

9-
gem 'rails', "~> #{rails_version}.0"
9+
gem 'rails', "~> #{rails_version}"
1010

1111
group :development do
1212
gem 'pry-byebug'

lib/opencomponents/rails/renderer.rb

+3-1
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@ module Renderer
44

55
include ::ActionView::Helpers::TagHelper
66

7+
OC_COMPONENT_TAG = 'oc-component'.freeze
8+
79
# Returns a rendered component.
810
#
911
# render_component('my-component')
@@ -60,7 +62,7 @@ def oc_component_tag(component, opts = {})
6062
options[:href] << "?#{opts[:params].to_param}" if opts[:params]
6163
end
6264

63-
tag('oc-component', options)
65+
tag(OC_COMPONENT_TAG, options)
6466
end
6567
end
6668
end

opencomponents-rails.gemspec

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ Gem::Specification.new do |spec|
77
spec.required_ruby_version = '>= 1.9.3'
88

99
spec.add_dependency 'opencomponents', '~> 0.4.0'
10-
spec.add_dependency 'railties', '~> 4.1', '< 5.0.0.alpha'
10+
spec.add_dependency 'railties', '>= 4.1', '< 6'
1111
spec.add_development_dependency 'bundler', '~> 1.10'
1212

1313
spec.authors = ['Todd Bealmear']

0 commit comments

Comments
 (0)