runcom 8.5.0 → 8.7.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: 67fa811a782911f2e0d7e5b6da711e14cbde4a71f664e2fae7c9e4b267f6357c
4
- data.tar.gz: 7b9e62670cb84bcb4199d49cb2533db1e8a8253cae34fefaa56d840866f1adbc
3
+ metadata.gz: 80a75e87770a191dfcc5183a1dd822bee2bc308b076015cb0b173d7c2cb01f51
4
+ data.tar.gz: 2b7b115709682810188558626abb810fe1b486fc669023926333957ace5d99ed
5
5
  SHA512:
6
- metadata.gz: 1f4c231db97e8c2e86057574e24092e919489ee9f247ea68fd26c2d95660921a9531c180e9c3dbfccf86cc917202d77dacbced86cb3fb232be797bb4825ad408
7
- data.tar.gz: 1a80e531b8dfb8e2f0765bb77025cc880413ceada4a44aa0acde0c805c636e2e26653f513e005f0a4bad530aba32992580ce47a743bf3ef3da1d88e69cb75859
6
+ metadata.gz: 6b75016e8a9a16a3e81ef9edb08b3f1d6b511e9311653879877b9460f4ab6521c57c91f1faa714d83b2b9287e4aadb103aa494ced2bd9d21c2600969a32aa4ae
7
+ data.tar.gz: a21040d83c1bb0b3258dce2458ae87db986ac823a72cdc5d0466c663baf2866ceeb52ff5101d2f824e5e554f574f8d169cc1a85370316981371af55b5ab6481e
checksums.yaml.gz.sig CHANGED
Binary file
data/README.adoc CHANGED
@@ -17,12 +17,13 @@ toc::[]
17
17
 
18
18
  * Wraps the link:https://www.alchemists.io/projects/xdg[XDG] implementation which provides access to
19
19
  the following environment variables:
20
- ** `+$XDG_CACHE_HOME+`
21
- ** `+$XDG_CONFIG_HOME+`
22
- ** `+$XDG_CONFIG_DIRS+`
23
- ** `+$XDG_DATA_HOME+`
24
- ** `+$XDG_DATA_DIRS+`
25
- * Enhances the XDG cache, config, and data implementation. For the config, the following is
20
+ ** `$XDG_CACHE_HOME`
21
+ ** `$XDG_CONFIG_HOME`
22
+ ** `$XDG_CONFIG_DIRS`
23
+ ** `$XDG_DATA_HOME`
24
+ ** `$XDG_DATA_DIRS`
25
+ ** `$XDG_STATE_HOME`
26
+ * Enhances the XDG cache, config, data, and state implementation. For the config, the following is
26
27
  supported:
27
28
  ** Supports loading of CLI-specific http://yaml.org[YAML] configuration file.
28
29
  ** Supports loading and merging of nested/complex configurations.
@@ -63,6 +64,7 @@ instantiate each object individually:
63
64
  cache = Runcom::Cache.new "example/data.json"
64
65
  config = Runcom::Config.new "example/configuration.yml"
65
66
  data = Runcom::Data.new "example/store.dat"
67
+ state = Runcom::State.new "example/history.log"
66
68
  ----
67
69
 
68
70
  Each of the above objects share the same API:
@@ -179,7 +181,7 @@ To contribute, run:
179
181
 
180
182
  [source,bash]
181
183
  ----
182
- git clone https://github.com/bkuhlmann/runcom.git
184
+ git clone https://github.com/bkuhlmann/runcom
183
185
  cd runcom
184
186
  bin/setup
185
187
  ----
@@ -9,9 +9,7 @@ module Runcom
9
9
  self[:home] ||= Paths::Home
10
10
  self[:environment] ||= ENV
11
11
 
12
- # rubocop:disable Style/MethodCallWithArgsParentheses
13
12
  self[:xdg] = xdg.new(home:, environment:) if xdg
14
- # rubocop:enable Style/MethodCallWithArgsParentheses
15
13
  end
16
14
  end
17
15
  end
@@ -0,0 +1,22 @@
1
+ # frozen_string_literal: true
2
+
3
+ require "forwardable"
4
+
5
+ module Runcom
6
+ # A developer friendly wrapper of XDG state.
7
+ class State
8
+ extend Forwardable
9
+
10
+ DEFAULT_CONTEXT = Context.new xdg: XDG::State
11
+
12
+ delegate %i[relative namespace file_name current all inspect] => :common
13
+
14
+ def initialize path, context: DEFAULT_CONTEXT
15
+ @common = Paths::Common.new path, context:
16
+ end
17
+
18
+ private
19
+
20
+ attr_reader :common
21
+ end
22
+ end
data/lib/runcom.rb CHANGED
@@ -8,3 +8,4 @@ require "runcom/context"
8
8
  require "runcom/cache"
9
9
  require "runcom/config"
10
10
  require "runcom/data"
11
+ require "runcom/state"
data/runcom.gemspec CHANGED
@@ -2,7 +2,7 @@
2
2
 
3
3
  Gem::Specification.new do |spec|
4
4
  spec.name = "runcom"
5
- spec.version = "8.5.0"
5
+ spec.version = "8.7.0"
6
6
  spec.authors = ["Brooke Kuhlmann"]
7
7
  spec.email = ["brooke@alchemists.io"]
8
8
  spec.homepage = "https://www.alchemists.io/projects/runcom"
@@ -23,8 +23,8 @@ Gem::Specification.new do |spec|
23
23
  spec.cert_chain = [Gem.default_cert_path]
24
24
 
25
25
  spec.required_ruby_version = "~> 3.1"
26
- spec.add_dependency "refinements", "~> 9.6"
27
- spec.add_dependency "xdg", "~> 6.5"
26
+ spec.add_dependency "refinements", "~> 9.7"
27
+ spec.add_dependency "xdg", "~> 6.6"
28
28
 
29
29
  spec.files = Dir["*.gemspec", "lib/**/*"]
30
30
  spec.extra_rdoc_files = Dir["README*", "LICENSE*"]
data.tar.gz.sig CHANGED
@@ -1 +1 @@
1
- ��\�tj�[7�N���� G�|� C/�G�3�]��"�V��~�-�|g�9���#}�Ϋ8���7;%���Y�v����j���Q� �U7��ϙ`��U0�C.����qSkx��X�Z�b@6;Of�1x�{v�ܞ�]mлOGl5י�l}������4Ƿg��#�_j5YN�H�r�֏t�{�;����d��@���-���9�� �����,)i���*��BO�`n��ł̪�+U��8[rLEJ1
1
+ <5Y�|6"^�D\��5 ��(&���3"H<6dv�~���s��_�㋵m����o7�8�V5i���dM�����u�?Qz0���|�0��=��JW|��d%f������1����&�����{�徫�+��w���h����i"ï��Vf��q*�'m[i��1�1띧-U0fBN7!:
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: runcom
3
3
  version: !ruby/object:Gem::Version
4
- version: 8.5.0
4
+ version: 8.7.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-07-17 00:00:00.000000000 Z
31
+ date: 2022-10-22 00:00:00.000000000 Z
32
32
  dependencies:
33
33
  - !ruby/object:Gem::Dependency
34
34
  name: refinements
@@ -36,28 +36,28 @@ dependencies:
36
36
  requirements:
37
37
  - - "~>"
38
38
  - !ruby/object:Gem::Version
39
- version: '9.6'
39
+ version: '9.7'
40
40
  type: :runtime
41
41
  prerelease: false
42
42
  version_requirements: !ruby/object:Gem::Requirement
43
43
  requirements:
44
44
  - - "~>"
45
45
  - !ruby/object:Gem::Version
46
- version: '9.6'
46
+ version: '9.7'
47
47
  - !ruby/object:Gem::Dependency
48
48
  name: xdg
49
49
  requirement: !ruby/object:Gem::Requirement
50
50
  requirements:
51
51
  - - "~>"
52
52
  - !ruby/object:Gem::Version
53
- version: '6.5'
53
+ version: '6.6'
54
54
  type: :runtime
55
55
  prerelease: false
56
56
  version_requirements: !ruby/object:Gem::Requirement
57
57
  requirements:
58
58
  - - "~>"
59
59
  - !ruby/object:Gem::Version
60
- version: '6.5'
60
+ version: '6.6'
61
61
  description:
62
62
  email:
63
63
  - brooke@alchemists.io
@@ -77,6 +77,7 @@ files:
77
77
  - lib/runcom/error.rb
78
78
  - lib/runcom/paths/common.rb
79
79
  - lib/runcom/paths/home.rb
80
+ - lib/runcom/state.rb
80
81
  - runcom.gemspec
81
82
  homepage: https://www.alchemists.io/projects/runcom
82
83
  licenses:
@@ -104,7 +105,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
104
105
  - !ruby/object:Gem::Version
105
106
  version: '0'
106
107
  requirements: []
107
- rubygems_version: 3.3.18
108
+ rubygems_version: 3.3.24
108
109
  signing_key:
109
110
  specification_version: 4
110
111
  summary: An XDG enhanced run command manager for command line interfaces.
metadata.gz.sig CHANGED
Binary file