runcom 6.0.0 → 6.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- checksums.yaml.gz.sig +0 -0
- data.tar.gz.sig +0 -0
- data/README.md +29 -18
- data/lib/runcom/identity.rb +1 -1
- metadata +36 -8
- metadata.gz.sig +2 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 51f9eacd1ade03026ed02aeab5d127350283311280cba07cc985a26ae107b6f2
|
4
|
+
data.tar.gz: 580f96f8545ff05151a903d0abf5c36892ac08112017389f283fd0b356063445
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 56b7a3708f994b9734d961aeaa27062cb03657ecc42f63a2372429db1bbf9ed5f3cc1e2b3c67ab79dd8527bb79bcdc0e4797e00b4724a88678c2f67d8d831296
|
7
|
+
data.tar.gz: a369b0ca63f6e994ef44e377ee8cf0cec4bd7d79d6b1e5dc62002e1196ee44dedd2515d0944c89d1664f4f08f1154406912fa6f984efa30881d468343dd22abf
|
checksums.yaml.gz.sig
CHANGED
Binary file
|
data.tar.gz.sig
CHANGED
Binary file
|
data/README.md
CHANGED
@@ -54,7 +54,7 @@ the [XDG](https://github.com/bkuhlmann/xdg) implementation.
|
|
54
54
|
|
55
55
|
## Requirements
|
56
56
|
|
57
|
-
1. [Ruby 2.
|
57
|
+
1. [Ruby 2.7.x](https://www.ruby-lang.org).
|
58
58
|
|
59
59
|
## Setup
|
60
60
|
|
@@ -76,16 +76,32 @@ implementation.
|
|
76
76
|
While there isn't an environment convenience object as found in the `XDG` namespace, you can
|
77
77
|
instantiate each object individually:
|
78
78
|
|
79
|
-
cache = Runcom::Cache.new
|
80
|
-
config = Runcom::Config.new
|
81
|
-
data = Runcom::Data.new
|
79
|
+
cache = Runcom::Cache.new "example/data.json"
|
80
|
+
config = Runcom::Config.new "example/configuration.yml"
|
81
|
+
data = Runcom::Data.new "example/store.dat"
|
82
82
|
|
83
|
-
Each of the above objects share the same
|
83
|
+
Each of the above objects share the same API:
|
84
84
|
|
85
|
-
- `#
|
86
|
-
|
87
|
-
|
85
|
+
- `#relative` - Answers the relative path from which the object was constructed.
|
86
|
+
- `#namespace` - Answers the relative namespace as a pathname object from which the object was
|
87
|
+
constructed. The namespace must be identical across the cache, config, and data objects as this is
|
88
|
+
what uniquely identifies and organizes all files associated with your program.
|
89
|
+
- `#file_name` - Answers the file name from which the object was constructed.
|
90
|
+
- `#current` - Answers first *existing* file system path computed by `$XDG_*_HOME` followed by each
|
91
|
+
computed `$XDG_*_DIRS` path in order defined. Otherwise, `nil` is answered back.
|
92
|
+
- `#all` - Answers all file system paths which is the combined `$XDG_*_HOME` and `$XDG_*_DIRS`
|
88
93
|
values in order defined. These paths *may* or *may not* exist on the file system.
|
94
|
+
- `#inspect` - Answers a string representation of default XDG home and directory paths for debugging
|
95
|
+
purposes.
|
96
|
+
|
97
|
+
Using the `cache` object (created above) as an example, here is what each method answers back:
|
98
|
+
|
99
|
+
cache.relative # => #<Pathname:example/data.json>
|
100
|
+
cache.namespace # #<Pathname:example>
|
101
|
+
cache.file_name # #<Pathname:data.json>
|
102
|
+
cache.current # #<Pathname:/Users/bkuhlmann/.cache/example/data.json>
|
103
|
+
cache.all # [#<Pathname:/Users/bkuhlmann/.cache/example/data.json>]
|
104
|
+
cache.inspect # "XDG_CACHE_HOME=/Users/bkuhlmann/.cache"
|
89
105
|
|
90
106
|
#### Variable Priority
|
91
107
|
|
@@ -104,18 +120,13 @@ The `Runcom::Config` deserves additional highlighting as it provides support for
|
|
104
120
|
configurations directly from the command line or from custom locations. It is meant to be used
|
105
121
|
within your program(s).
|
106
122
|
|
107
|
-
An object
|
108
|
-
|
109
|
-
configuration = Runcom::Config.new "example"
|
110
|
-
|
111
|
-
The default file name for a configuration is `configuration.yml` but a custom name can be used if
|
112
|
-
desired:
|
123
|
+
An object is initialized as follows:
|
113
124
|
|
114
|
-
configuration = Runcom::Config.new "example
|
125
|
+
configuration = Runcom::Config.new "example/configuration.yml"
|
115
126
|
|
116
127
|
Default settings can be initialized as well:
|
117
128
|
|
118
|
-
configuration = Runcom::Config.new "example", defaults: {name: "Example"}
|
129
|
+
configuration = Runcom::Config.new "example/configuration.yml", defaults: {name: "Example"}
|
119
130
|
|
120
131
|
Once a configuration has been initialized, a hash representation can be obtained:
|
121
132
|
|
@@ -129,9 +140,9 @@ A configuration can also be merged with another configuration:
|
|
129
140
|
|
130
141
|
updated_configuration = configuration.merge Runcom::Config.new("other", defaults: {a: 1})
|
131
142
|
|
132
|
-
The
|
143
|
+
The current path of the configuration can be asked for as well:
|
133
144
|
|
134
|
-
configuration.
|
145
|
+
configuration.current # "~/.config/example/configuration.yml"
|
135
146
|
|
136
147
|
For further details, study the public interface as provided by the
|
137
148
|
[`Runcom::Config`](lib/runcom/config.rb) object.
|
data/lib/runcom/identity.rb
CHANGED
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: 6.0.
|
4
|
+
version: 6.0.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Brooke Kuhlmann
|
@@ -28,7 +28,7 @@ cert_chain:
|
|
28
28
|
dKvURM+1PwDCzC5tvRwjhUJIizau6+MtkFCvJHmaAj1aZL3odcPejHj5Hxt/0CUW
|
29
29
|
y84=
|
30
30
|
-----END CERTIFICATE-----
|
31
|
-
date: 2020-
|
31
|
+
date: 2020-02-01 00:00:00.000000000 Z
|
32
32
|
dependencies:
|
33
33
|
- !ruby/object:Gem::Dependency
|
34
34
|
name: refinements
|
@@ -72,6 +72,34 @@ dependencies:
|
|
72
72
|
- - "~>"
|
73
73
|
- !ruby/object:Gem::Version
|
74
74
|
version: '0.6'
|
75
|
+
- !ruby/object:Gem::Dependency
|
76
|
+
name: gemsmith
|
77
|
+
requirement: !ruby/object:Gem::Requirement
|
78
|
+
requirements:
|
79
|
+
- - "~>"
|
80
|
+
- !ruby/object:Gem::Version
|
81
|
+
version: '14.0'
|
82
|
+
type: :development
|
83
|
+
prerelease: false
|
84
|
+
version_requirements: !ruby/object:Gem::Requirement
|
85
|
+
requirements:
|
86
|
+
- - "~>"
|
87
|
+
- !ruby/object:Gem::Version
|
88
|
+
version: '14.0'
|
89
|
+
- !ruby/object:Gem::Dependency
|
90
|
+
name: git-cop
|
91
|
+
requirement: !ruby/object:Gem::Requirement
|
92
|
+
requirements:
|
93
|
+
- - "~>"
|
94
|
+
- !ruby/object:Gem::Version
|
95
|
+
version: '4.0'
|
96
|
+
type: :development
|
97
|
+
prerelease: false
|
98
|
+
version_requirements: !ruby/object:Gem::Requirement
|
99
|
+
requirements:
|
100
|
+
- - "~>"
|
101
|
+
- !ruby/object:Gem::Version
|
102
|
+
version: '4.0'
|
75
103
|
- !ruby/object:Gem::Dependency
|
76
104
|
name: guard-rspec
|
77
105
|
requirement: !ruby/object:Gem::Requirement
|
@@ -134,14 +162,14 @@ dependencies:
|
|
134
162
|
requirements:
|
135
163
|
- - "~>"
|
136
164
|
- !ruby/object:Gem::Version
|
137
|
-
version: '5.
|
165
|
+
version: '5.6'
|
138
166
|
type: :development
|
139
167
|
prerelease: false
|
140
168
|
version_requirements: !ruby/object:Gem::Requirement
|
141
169
|
requirements:
|
142
170
|
- - "~>"
|
143
171
|
- !ruby/object:Gem::Version
|
144
|
-
version: '5.
|
172
|
+
version: '5.6'
|
145
173
|
- !ruby/object:Gem::Dependency
|
146
174
|
name: rspec
|
147
175
|
requirement: !ruby/object:Gem::Requirement
|
@@ -162,14 +190,14 @@ dependencies:
|
|
162
190
|
requirements:
|
163
191
|
- - "~>"
|
164
192
|
- !ruby/object:Gem::Version
|
165
|
-
version: '0.
|
193
|
+
version: '0.79'
|
166
194
|
type: :development
|
167
195
|
prerelease: false
|
168
196
|
version_requirements: !ruby/object:Gem::Requirement
|
169
197
|
requirements:
|
170
198
|
- - "~>"
|
171
199
|
- !ruby/object:Gem::Version
|
172
|
-
version: '0.
|
200
|
+
version: '0.79'
|
173
201
|
- !ruby/object:Gem::Dependency
|
174
202
|
name: rubocop-performance
|
175
203
|
requirement: !ruby/object:Gem::Requirement
|
@@ -218,14 +246,14 @@ dependencies:
|
|
218
246
|
requirements:
|
219
247
|
- - "~>"
|
220
248
|
- !ruby/object:Gem::Version
|
221
|
-
version: '0.
|
249
|
+
version: '0.18'
|
222
250
|
type: :development
|
223
251
|
prerelease: false
|
224
252
|
version_requirements: !ruby/object:Gem::Requirement
|
225
253
|
requirements:
|
226
254
|
- - "~>"
|
227
255
|
- !ruby/object:Gem::Version
|
228
|
-
version: '0.
|
256
|
+
version: '0.18'
|
229
257
|
description:
|
230
258
|
email:
|
231
259
|
- brooke@alchemists.io
|
metadata.gz.sig
CHANGED
@@ -1 +1,2 @@
|
|
1
|
-
|
1
|
+
[��|�9v��2������I���ޞ�|���G�6�y�`�9�O�z$J��f=��Dy�t�e��������x얧�,^u_�\;����.e��lVY�w��kT��n�g�CG�Q
|
2
|
+
�\������m)ky���0�d�g3&�R�R��G�����]eh0�;���df���l*?��'�U�0�1�'�l�Ծ*p`1��U�7�G{�)aA9�dJ������ĚY,���n�J�'�Pnz���O�&�V�]9
|