xdg 6.6.2 → 7.0.0

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: 14a4371c54f653df0c35ca0f1d55c5d217df17ea8149c6cd20043c05b1ce4015
4
- data.tar.gz: 46753f863b896494a0d0a8106da21ca592f259b9dca6bc554e197977d6febf7e
3
+ metadata.gz: c79c1b46eb91fca13f71267449f96c20b986cd35590107cae8fe8e07b56b64ff
4
+ data.tar.gz: 86eb9862d397d1540ede8bfe2c7bd3ff19f339a0e23fd14b2b556f9df1067ef6
5
5
  SHA512:
6
- metadata.gz: 727ae7037d8962e9de00da8f4bef99ef2149657953df6bb7d68776afb02d789231c0a097a3b35423d8d24ade4467bade760964f7501fa7dada099bdc8434af31
7
- data.tar.gz: 5c41e3d1cec4be310cf5bdfb1db49031c3220d7284be940a34f71f9a0de43f15d8fd585fac854f394208ed7522e8e3daf0416a5d4ebed654e81850fa6ef2b783
6
+ metadata.gz: 6ed15d242a45891a94834900d85b4eba4267641ee09bb013db970e6116f24f3bfa7cf7303ce8f64d8ffddc99778fa535e4b4ab7b6d23c96e9aa9ee4ce378c278
7
+ data.tar.gz: 844ced9a1d5c6fd15d778fe9fb9a099af2decdf104faa3a62aa5a2953fafc8b1821f885f7ce965a90689ed10b471a8df20fd7e279f9b228d21d300260989e0eb
checksums.yaml.gz.sig CHANGED
Binary file
data/lib/xdg/cache.rb CHANGED
@@ -1,6 +1,7 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  require "forwardable"
4
+ require "xdg/pair"
4
5
 
5
6
  module XDG
6
7
  # Provides cache support.
data/lib/xdg/config.rb CHANGED
@@ -1,6 +1,7 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  require "forwardable"
4
+ require "xdg/pair"
4
5
 
5
6
  module XDG
6
7
  # Provides configuration support.
data/lib/xdg/data.rb CHANGED
@@ -1,6 +1,7 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  require "forwardable"
4
+ require "xdg/pair"
4
5
 
5
6
  module XDG
6
7
  # Provides data support.
data/lib/xdg/pair.rb CHANGED
@@ -1,11 +1,14 @@
1
1
  # frozen_string_literal: true
2
2
 
3
+ # :reek:ModuleInitialize
3
4
  module XDG
4
- PAIR_DELIMITER = "="
5
-
6
5
  # A generic key-value pair (KVP).
7
- Pair = Struct.new :key, :value do
8
- def to_env = Hash[*values]
6
+ Pair = Data.define :key, :value do
7
+ def initialize key: nil, value: nil
8
+ super
9
+ end
10
+
11
+ def to_env = {key => value}
9
12
 
10
13
  def key? = key.to_s.size.positive?
11
14
 
@@ -13,6 +16,6 @@ module XDG
13
16
 
14
17
  def empty? = !(key? && value?)
15
18
 
16
- def inspect = key? || value? ? "#{key}#{PAIR_DELIMITER}#{value}" : ""
19
+ def inspect = key? || value? ? "#{key}#{DELIMITER}#{value}" : ""
17
20
  end
18
21
  end
@@ -22,7 +22,7 @@ module XDG
22
22
  .map { |path| expand path }
23
23
  end
24
24
 
25
- def inspect = [key, dynamic.join(DELIMITER)].reject(&:empty?).join(XDG::PAIR_DELIMITER)
25
+ def inspect = [key, dynamic.join(DELIMITER)].reject(&:empty?).join(XDG::DELIMITER)
26
26
 
27
27
  private
28
28
 
@@ -22,7 +22,7 @@ module XDG
22
22
 
23
23
  def dynamic = String(environment[key]).then { |path| path.empty? ? default : expand(path) }
24
24
 
25
- def inspect = [pair.key, dynamic].compact.join(XDG::PAIR_DELIMITER)
25
+ def inspect = [pair.key, dynamic].compact.join(XDG::DELIMITER)
26
26
 
27
27
  private
28
28
 
data/lib/xdg/state.rb CHANGED
@@ -1,6 +1,7 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  require "forwardable"
4
+ require "xdg/pair"
4
5
 
5
6
  module XDG
6
7
  # Provides state support.
data/lib/xdg.rb CHANGED
@@ -1,11 +1,15 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- require "xdg/pair"
4
- require "xdg/paths/home"
5
- require "xdg/paths/directory"
6
- require "xdg/paths/combined"
3
+ require "xdg/cache"
7
4
  require "xdg/config"
8
5
  require "xdg/data"
9
- require "xdg/cache"
10
- require "xdg/state"
11
6
  require "xdg/environment"
7
+ require "xdg/pair"
8
+ require "xdg/paths/combined"
9
+ require "xdg/paths/directory"
10
+ require "xdg/paths/home"
11
+ require "xdg/state"
12
+
13
+ module XDG
14
+ DELIMITER = "="
15
+ end
data/xdg.gemspec CHANGED
@@ -2,7 +2,7 @@
2
2
 
3
3
  Gem::Specification.new do |spec|
4
4
  spec.name = "xdg"
5
- spec.version = "6.6.2"
5
+ spec.version = "7.0.0"
6
6
  spec.authors = ["Brooke Kuhlmann"]
7
7
  spec.email = ["brooke@alchemists.io"]
8
8
  spec.homepage = "https://www.alchemists.io/projects/xdg"
@@ -22,7 +22,7 @@ Gem::Specification.new do |spec|
22
22
  spec.signing_key = Gem.default_key_path
23
23
  spec.cert_chain = [Gem.default_cert_path]
24
24
 
25
- spec.required_ruby_version = "~> 3.1"
25
+ spec.required_ruby_version = "~> 3.2"
26
26
 
27
27
  spec.files = Dir["*.gemspec", "lib/**/*"]
28
28
  spec.extra_rdoc_files = Dir["README*", "LICENSE*"]
data.tar.gz.sig CHANGED
@@ -1 +1,2 @@
1
- b"�ωNw�Oէ ��x��w�� �}r�i_ݪ�R_X��.ٸ�%~��9l�w:ߨׄ]�NQ����?��!N"�>��C���*l*zY*|��Q]a8�xFw��������h�hV�~E7~�`� r��T,��'�ʔ)f���b. ���Cu �� ��@w� ���e*~h�43ĸ����N L&�<]� ��..<���"��׷�6ˆ�)y����c<��*���I8�
1
+ q��,�
2
+ � �Ҋ����ZQ�X�X�F�뇌�FJ�!H� )���G{��G���3 ���A�uh�S�e9C `�^�.�/u%�uc�Q�},������W�S��SQ0����_�N��A�?eGȯK�B�8�^���@���2v��u��
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: 6.6.2
4
+ version: 7.0.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Brooke Kuhlmann
@@ -28,7 +28,7 @@ cert_chain:
28
28
  CxDe2+VuChj4I1nvIHdu+E6XoEVlanUPKmSg6nddhkKn2gC45Kyzh6FZqnzH/CRp
29
29
  RFE=
30
30
  -----END CERTIFICATE-----
31
- date: 2022-10-22 00:00:00.000000000 Z
31
+ date: 2022-12-25 00:00:00.000000000 Z
32
32
  dependencies: []
33
33
  description:
34
34
  email:
@@ -71,14 +71,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
71
71
  requirements:
72
72
  - - "~>"
73
73
  - !ruby/object:Gem::Version
74
- version: '3.1'
74
+ version: '3.2'
75
75
  required_rubygems_version: !ruby/object:Gem::Requirement
76
76
  requirements:
77
77
  - - ">="
78
78
  - !ruby/object:Gem::Version
79
79
  version: '0'
80
80
  requirements: []
81
- rubygems_version: 3.3.24
81
+ rubygems_version: 3.4.1
82
82
  signing_key:
83
83
  specification_version: 4
84
84
  summary: Provides an implementation of the XDG Base Directory Specification.
metadata.gz.sig CHANGED
Binary file