51 lines
2.0 KiB
Diff
51 lines
2.0 KiB
Diff
diff --git a/lib/tmuxinator/config.rb b/lib/tmuxinator/config.rb
|
|
index d14eb9a17a5..d4eccaa36b0 100644
|
|
--- a/lib/tmuxinator/config.rb
|
|
+++ b/lib/tmuxinator/config.rb
|
|
@@ -29,7 +29,7 @@ module Tmuxinator
|
|
# a custom value. (e.g. if $XDG_CONFIG_HOME is set to ~/my-config, the
|
|
# return value will be ~/my-config/tmuxinator)
|
|
def xdg
|
|
- XDG["CONFIG"].to_s + "/tmuxinator"
|
|
+ XDG::Config.new.home.to_s + "/tmuxinator"
|
|
end
|
|
|
|
def xdg?
|
|
diff --git a/spec/lib/tmuxinator/config_spec.rb b/spec/lib/tmuxinator/config_spec.rb
|
|
index 09ab25f8831..9e971e0a414 100644
|
|
--- a/spec/lib/tmuxinator/config_spec.rb
|
|
+++ b/spec/lib/tmuxinator/config_spec.rb
|
|
@@ -53,7 +53,8 @@ describe Tmuxinator::Config do
|
|
|
|
Dir.mktmpdir do |dir|
|
|
config_parent = "#{dir}/non_existent_parent/s"
|
|
- allow(XDG).to receive(:[]).with("CONFIG").and_return config_parent
|
|
+ allow(XDG::Config).to receive_message_chain(:new, :home, :to_s).
|
|
+ and_return config_parent
|
|
expect(described_class.directory).
|
|
to eq "#{config_parent}/tmuxinator"
|
|
expect(File.directory?("#{config_parent}/tmuxinator")).to be true
|
|
@@ -134,7 +135,8 @@ describe Tmuxinator::Config do
|
|
|
|
describe "#xdg" do
|
|
it "is $XDG_CONFIG_HOME/tmuxinator" do
|
|
- expect(described_class.xdg).to eq "#{XDG['CONFIG_HOME']}/tmuxinator"
|
|
+ config_home = XDG::Config.new.home.to_s
|
|
+ expect(described_class.xdg).to eq "#{config_home}/tmuxinator"
|
|
end
|
|
end
|
|
|
|
diff --git a/tmuxinator.gemspec b/tmuxinator.gemspec
|
|
index df933d888e2..f8e9fe71d4e 100644
|
|
--- a/tmuxinator.gemspec
|
|
+++ b/tmuxinator.gemspec
|
|
@@ -41,7 +41,7 @@ Gem::Specification.new do |s|
|
|
|
|
s.add_dependency "erubis", "~> 2.6"
|
|
s.add_dependency "thor", "~> 1.3.0"
|
|
- s.add_dependency "xdg", "~> 2.2", ">= 2.2.5"
|
|
+ s.add_dependency "xdg", ">= 4.3.0"
|
|
|
|
s.add_development_dependency "activesupport", "< 5.0.0" # Please see issue #432
|
|
s.add_development_dependency "awesome_print", "~> 1.2"
|