51 lines
1.9 KiB
Diff
51 lines
1.9 KiB
Diff
diff --git a/lib/tmuxinator/config.rb b/lib/tmuxinator/config.rb
|
|
index 25620bf..fcc61a3 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 71b8da2..d28a60a 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_existant_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 1b02053..3f4c8f8 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.2.1"
|
|
- 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"
|