-
Notifications
You must be signed in to change notification settings - Fork 2.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2 changed files
with
61 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
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" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,21 @@ | ||
# Template file for 'ruby-tmuxinator' | ||
pkgname=ruby-tmuxinator | ||
version=0.16.0 | ||
revision=5 | ||
build_style=gem | ||
depends="ruby-erubis>=2.6 ruby-thor>=0.15.0 ruby-xdg>=2.2.3 tmux" | ||
version=3.0.5 | ||
revision=1 | ||
build_style=gemspec | ||
depends="ruby-erubis>=2.6 ruby-thor>=1.2.1 ruby-xdg>=4.5.0 tmux" | ||
short_desc="Create and manage complex tmux sessions easily" | ||
maintainer="Alexander Egorenkov <egorenar-dev@posteo.net>" | ||
license="MIT" | ||
homepage="https://github.com/tmuxinator/tmuxinator" | ||
checksum=296f370ee7cfffd91ee42ab301479c7e632091097001728f6f2a84b629469538 | ||
distfiles="https://github.com/tmuxinator/tmuxinator/archive/refs/tags/v${version}.tar.gz" | ||
wrksrc="tmuxinator-${version}" | ||
checksum=f67296a0b600fb5d8e51bf8fc9f8376a887754fd74cd59b6a8d9c962ad8f80a4 | ||
|
||
post_install() { | ||
$XBPS_FETCH_CMD https://raw.githubusercontent.com/tmuxinator/tmuxinator/v${version}/LICENSE | ||
vlicense LICENSE | ||
cd completion/ | ||
for sh in bash fish zsh; do | ||
vcompletion "tmuxinator.${sh}" ${sh} | ||
done | ||
} |