Skip to content

Commit

Permalink
Make railties an optional dependency
Browse files Browse the repository at this point in the history
  • Loading branch information
cllns committed Aug 2, 2017
1 parent 591d8ab commit 2b18bec
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
11 changes: 6 additions & 5 deletions lib/vanilla/ujs.rb
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
require 'vanilla/ujs/version'
require 'vanilla/ujs/rails'

module Vanilla
module Rails
# Your code goes here...
module Ujs
require 'vanilla/ujs/version'

if defined?(Rails)
require 'vanilla/ujs/rails'
end
end
end
3 changes: 1 addition & 2 deletions vanilla-ujs.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@ Gem::Specification.new do |spec|

spec.required_rubygems_version = '>= 1.3.6'

spec.add_dependency 'railties', '>= 4.2.0'

spec.add_development_dependency 'railties', '>= 4.2.0'
spec.add_development_dependency 'bundler', '~> 1.11'
end

0 comments on commit 2b18bec

Please sign in to comment.