Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix rubygems deprecations #11

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions gettext.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -37,4 +37,5 @@ Gem::Specification.new do |s|
s.add_dependency(%q<locale>, [">= 0"])
s.add_dependency(%q<echoe>, [">= 0"])
end
s.add_dependency(%q<rubygems-update>, [">= 1.8.0"])
end
7 changes: 6 additions & 1 deletion lib/gettext/runtime/locale_path.rb
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,12 @@ def default_path_rules

load_path = $LOAD_PATH.dup
if defined? ::Gem
load_path += Gem.all_load_paths
paths_to_latest_gems = []
latest_specs = Gem::Specification.each do |spec|
paths_to_latest_gems << spec.gem_dir if spec.activated
end

load_path += paths_to_latest_gems
end
load_path.map!{|v| v.match(/(.*?)(\/lib)*?$/); $1}
load_path.each {|path|
Expand Down