xdg 5.1.0 → 5.1.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 4e6b5d2f30e45bafa693f66461e978000ad9b427eb483770c8d69a7b8d5f7ac9
4
- data.tar.gz: 35ab363d66fcc6e6d71354ac4d0314869cb769fc382c8046bd9febfc51d2136f
3
+ metadata.gz: 94fe25ddbad33f6e84bb1167b8d44772c37a1b2443987402a637472eac0e6fb0
4
+ data.tar.gz: 9f7f080991b1353d5cc62b6e96bf3c5a8ce8b929114e9f61e0ccd1638ed4f8cf
5
5
  SHA512:
6
- metadata.gz: fbc32d54321856457ad10db7249284c12f7ba7c48fa159462d240c5352ec46c9798f5a85d02179b30be4befe1ac02f8227eeb53506b91ce49496ee07ebacc179
7
- data.tar.gz: b5c2dec1918ef0437c8fe50f41f9428a3e273c18df30181ba34a245cb9b4edccdeb5bccf18aebb6f9c290f2d4512efd2bf2ca8b879d21317d9ef8afb573ffc20
6
+ metadata.gz: a47af1478f23173618062adae68bda0c25ec097bce38d152eafcfa08791421c72edaf408628b3a19efa82876d4e2d1c689788a4520d23e0a4d68f69262d3aeb5
7
+ data.tar.gz: 4958c541915eed9d72333e53ed2c5866fdaee6ae43c75036c4b70f233334fbdb8e491f30325f2da7e942c2e2b777cdb9e2b59126b95b1d52d3026a8f9befa6f9
checksums.yaml.gz.sig CHANGED
Binary file
data.tar.gz.sig CHANGED
Binary file
@@ -8,29 +8,17 @@ module XDG
8
8
  @data = Data.new home: home, directories: directories, environment: environment
9
9
  end
10
10
 
11
- def cache_home
12
- cache.home
13
- end
11
+ def cache_home = cache.home
14
12
 
15
- def config_home
16
- config.home
17
- end
13
+ def config_home = config.home
18
14
 
19
- def config_dirs
20
- config.directories
21
- end
15
+ def config_dirs = config.directories
22
16
 
23
- def data_home
24
- data.home
25
- end
17
+ def data_home = data.home
26
18
 
27
- def data_dirs
28
- data.directories
29
- end
19
+ def data_dirs = data.directories
30
20
 
31
- def inspect
32
- "#{cache.inspect} #{config.inspect} #{data.inspect}"
33
- end
21
+ def inspect = "#{cache.inspect} #{config.inspect} #{data.inspect}"
34
22
 
35
23
  private
36
24
 
data/lib/xdg/identity.rb CHANGED
@@ -5,7 +5,7 @@ module XDG
5
5
  module Identity
6
6
  NAME = "xdg"
7
7
  LABEL = "XDG"
8
- VERSION = "5.1.0"
8
+ VERSION = "5.1.1"
9
9
  VERSION_LABEL = "#{LABEL} #{VERSION}"
10
10
  end
11
11
  end
data/lib/xdg/pair.rb CHANGED
@@ -5,21 +5,13 @@ module XDG
5
5
 
6
6
  # A generic key-value pair (KVP).
7
7
  Pair = Struct.new :key, :value do
8
- def to_env
9
- Hash[*values]
10
- end
8
+ def to_env = Hash[*values]
11
9
 
12
- def key?
13
- key.to_s.size.positive?
14
- end
10
+ def key? = key.to_s.size.positive?
15
11
 
16
- def value?
17
- value.to_s.size.positive?
18
- end
12
+ def value? = value.to_s.size.positive?
19
13
 
20
- def empty?
21
- !(key? && value?)
22
- end
14
+ def empty? = !(key? && value?)
23
15
 
24
16
  def inspect
25
17
  return "" unless key? || value?
@@ -11,21 +11,13 @@ module XDG
11
11
  @initial_directories = initial_directories
12
12
  end
13
13
 
14
- def home
15
- initial_home.dynamic
16
- end
14
+ def home = initial_home.dynamic
17
15
 
18
- def directories
19
- initial_directories.dynamic
20
- end
16
+ def directories = initial_directories.dynamic
21
17
 
22
- def all
23
- directories.prepend home
24
- end
18
+ def all = directories.prepend(home)
25
19
 
26
- def inspect
27
- [initial_home.inspect, initial_directories.inspect].reject(&:empty?).join " "
28
- end
20
+ def inspect = [initial_home.inspect, initial_directories.inspect].reject(&:empty?).join(" ")
29
21
 
30
22
  private
31
23
 
@@ -13,9 +13,7 @@ module XDG
13
13
  @environment = environment
14
14
  end
15
15
 
16
- def default
17
- value.split(DELIMITER).map { |path| expand path }
18
- end
16
+ def default = value.split(DELIMITER).map { |path| expand path }
19
17
 
20
18
  def dynamic
21
19
  String(environment[key]).then { |env_value| env_value.empty? ? value : env_value }
@@ -24,25 +22,17 @@ module XDG
24
22
  .map { |path| expand path }
25
23
  end
26
24
 
27
- def inspect
28
- [key, dynamic.join(DELIMITER)].reject(&:empty?).join XDG::PAIR_DELIMITER
29
- end
25
+ def inspect = [key, dynamic.join(DELIMITER)].reject(&:empty?).join(XDG::PAIR_DELIMITER)
30
26
 
31
27
  private
32
28
 
33
29
  attr_reader :pair, :environment
34
30
 
35
- def key
36
- String pair.key
37
- end
31
+ def key = String(pair.key)
38
32
 
39
- def value
40
- String pair.value
41
- end
33
+ def value = String(pair.value)
42
34
 
43
- def expand path
44
- Pathname(path).expand_path
45
- end
35
+ def expand(path) = Pathname(path).expand_path
46
36
  end
47
37
  end
48
38
  end
@@ -18,29 +18,19 @@ module XDG
18
18
  @environment = environment
19
19
  end
20
20
 
21
- def default
22
- expand String(value)
23
- end
21
+ def default = expand(String(value))
24
22
 
25
- def dynamic
26
- String(environment[key]).then { |path| path.empty? ? default : expand(path) }
27
- end
23
+ def dynamic = String(environment[key]).then { |path| path.empty? ? default : expand(path) }
28
24
 
29
- def inspect
30
- [pair.key, dynamic].compact.join XDG::PAIR_DELIMITER
31
- end
25
+ def inspect = [pair.key, dynamic].compact.join(XDG::PAIR_DELIMITER)
32
26
 
33
27
  private
34
28
 
35
29
  attr_reader :pair, :environment
36
30
 
37
- def expand path
38
- home.join(path).expand_path
39
- end
31
+ def expand(path) = home.join(path).expand_path
40
32
 
41
- def home
42
- Pathname environment.fetch(KEY)
43
- end
33
+ def home = Pathname(environment.fetch(KEY))
44
34
  end
45
35
  end
46
36
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: xdg
3
3
  version: !ruby/object:Gem::Version
4
- version: 5.1.0
4
+ version: 5.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Brooke Kuhlmann
@@ -10,9 +10,9 @@ bindir: bin
10
10
  cert_chain:
11
11
  - |
12
12
  -----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9lLxIo
26
- Y2G5xubiziKZkyfWFuSr67PIjW3Bu673D1JVBArhA1qbgQmYQcy1CkGOjo+iO8Nf
27
- 7u/QSfBHb+r/bXhKscDgPpnKwbUmvgO2+94zJG9KsrmIydlzYfsD09aXKx0t6Xy4
28
- 2XV8FRa7/JimI07sPLC13eLY3xd/aYTi85Z782KIA4j0G8XEEWAX0ouBhlXPocZv
29
- QWc=
23
+ 2CdikiiE3fJhP/gY4ggwDQYJKoZIhvcNAQELBQADggEBAEjpaOXHHp8s/7GL2qCb
24
+ YAs7urOLv9VHSPfQWAwaTMVnSsIf3Sw4xzISOP/mmfEPBPXtz61K5esrE/uTFtgb
25
+ FyjxQk2H0sEWgrRXGGNHBWQRhhEs7LP/TByoC15A0br++xLxRz4r7HBLGAWQQDpg
26
+ 66BJ2TBVjxS6K64tKbq7+ACyrOZGgTfNHACh4M076y0x0oRf/rwBrU39/KRfuhbb
27
+ cm+nNCEtO35gTmZ2bVDHLGvWazi3gJt6+huQjfXTCUUG2YYBxwhu+GPdAGQPxpf9
28
+ lkHilIrX69jq8wMPpBhlaw2mRmeSL50Wv5u6xVBvOHhXFSP1crXM95vfLhLyRYod
29
+ W2A=
30
30
  -----END CERTIFICATE-----
31
- date: 2021-01-20 00:00:00.000000000 Z
31
+ date: 2021-04-18 00:00:00.000000000 Z
32
32
  dependencies: []
33
33
  description:
34
34
  email:
@@ -74,7 +74,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
74
74
  - !ruby/object:Gem::Version
75
75
  version: '0'
76
76
  requirements: []
77
- rubygems_version: 3.2.5
77
+ rubygems_version: 3.2.16
78
78
  signing_key:
79
79
  specification_version: 4
80
80
  summary: Provides an implementation of the XDG Base Directory Specification.
metadata.gz.sig CHANGED
Binary file