Skip to content

Commit

Permalink
Add support for webpacker 4 prereleases
Browse files Browse the repository at this point in the history
For some reason, Gem::Specification.find_by_name("webpacker") doesn't identify Webpacker 4 prereleases like webpacker 4.0.0.pre.pre.2 while Gem::Specification.find_all_by_name("webpacker") does. I've tested Gem::Specification.find_all_by_name for possible undesired side-effects, like returning multiple results for Gem::Specification.find_all_by_name("react"), and it has worked as desired in all cases that I've tested it.
  • Loading branch information
Judahmeek authored Aug 21, 2018
1 parent 8920545 commit 76059a8
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/react_on_rails/utils.rb
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,7 @@ def self.generated_assets_full_path
end

def self.gem_available?(name)
Gem::Specification.find_by_name(name).present?
Gem::Specification.find_all_by_name(name).present?
rescue Gem::LoadError
false
rescue StandardError
Expand Down

0 comments on commit 76059a8

Please sign in to comment.