runcom 6.0.1 → 6.4.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: 51f9eacd1ade03026ed02aeab5d127350283311280cba07cc985a26ae107b6f2
4
- data.tar.gz: 580f96f8545ff05151a903d0abf5c36892ac08112017389f283fd0b356063445
3
+ metadata.gz: 820afb1271e98cd76a8b8437dc3b2e31f2c476fec3bcbab5f8ba1fd0e2fdc114
4
+ data.tar.gz: 17ec4d904eb127458a5f590c905533bbc969efe9cf6f05ca0c4e042cc74b62c6
5
5
  SHA512:
6
- metadata.gz: 56b7a3708f994b9734d961aeaa27062cb03657ecc42f63a2372429db1bbf9ed5f3cc1e2b3c67ab79dd8527bb79bcdc0e4797e00b4724a88678c2f67d8d831296
7
- data.tar.gz: a369b0ca63f6e994ef44e377ee8cf0cec4bd7d79d6b1e5dc62002e1196ee44dedd2515d0944c89d1664f4f08f1154406912fa6f984efa30881d468343dd22abf
6
+ metadata.gz: 39f41bbdae3834b15eb03ef4a534738e89b9b63ab0713c0822841c5cf6530342c87b9703a10652d6ca32cadaf57a354c414200224ca15d177828ddaf07203caa
7
+ data.tar.gz: c3c524c9f622531c6d83219f012935733f60db8d17b800c3bd6611a2dd01b0f5919ff09d6c72dad3a16a38ebec6e23da7bfb49e341fc404ede48317df13154c8
Binary file
data.tar.gz.sig CHANGED
Binary file
@@ -1,4 +1,4 @@
1
- # Apache License
1
+ = Apache License
2
2
 
3
3
  Version 2.0, January 2004
4
4
 
@@ -6,7 +6,7 @@ http://www.apache.org/licenses
6
6
 
7
7
  TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
8
8
 
9
- ## 1. Definitions
9
+ == 1. Definitions
10
10
 
11
11
  "License" shall mean the terms and conditions for use, reproduction, and distribution as defined by
12
12
  Sections 1 through 9 of this document.
@@ -54,14 +54,14 @@ Contribution."
54
54
  "Contributor" shall mean Licensor and any individual or Legal Entity on behalf of whom a
55
55
  Contribution has been received by Licensor and subsequently incorporated within the Work.
56
56
 
57
- ## 2. Grant of Copyright License
57
+ == 2. Grant of Copyright License
58
58
 
59
59
  Subject to the terms and conditions of this License, each Contributor hereby grants to You a
60
60
  perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable copyright license to
61
61
  reproduce, prepare Derivative Works of, publicly display, publicly perform, sublicense, and
62
62
  distribute the Work and such Derivative Works in Source or Object form.
63
63
 
64
- ## 3. Grant of Patent License
64
+ == 3. Grant of Patent License
65
65
 
66
66
  Subject to the terms and conditions of this License, each Contributor hereby grants to You a
67
67
  perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable (except as stated in this
@@ -74,39 +74,38 @@ a Contribution incorporated within the Work constitutes direct or contributory p
74
74
  then any patent licenses granted to You under this License for that Work shall terminate as of the
75
75
  date such litigation is filed.
76
76
 
77
- ## 4. Redistribution
77
+ == 4. Redistribution
78
78
 
79
79
  You may reproduce and distribute copies of the Work or Derivative Works thereof in any medium, with
80
80
  or without modifications, and in Source or Object form, provided that You meet the following
81
81
  conditions:
82
82
 
83
- 1. You must give any other recipients of the Work or Derivative Works a copy of this License; and
83
+ . You must give any other recipients of the Work or Derivative Works a copy of this License; and
84
84
 
85
- 2. You must cause any modified files to carry prominent notices stating that You changed the
86
- files; and
85
+ . You must cause any modified files to carry prominent notices stating that You changed the files;
86
+ and
87
87
 
88
- 3. You must retain, in the Source form of any Derivative Works that You distribute, all copyright,
89
- patent, trademark, and attribution notices from the Source form of the Work, excluding those
90
- notices that do not pertain to any part of the Derivative Works; and
88
+ . You must retain, in the Source form of any Derivative Works that You distribute, all copyright,
89
+ patent, trademark, and attribution notices from the Source form of the Work, excluding those
90
+ notices that do not pertain to any part of the Derivative Works; and
91
91
 
92
- 4. If the Work includes a "NOTICE" text file as part of its distribution, then any Derivative
93
- Works that You distribute must include a readable copy of the attribution notices contained
94
- within such NOTICE file, excluding those notices that do not pertain to any part of the
95
- Derivative Works, in at least one of the following places: within a NOTICE text file
96
- distributed as part of the Derivative Works; within the Source form or documentation, if
97
- provided along with the Derivative Works; or, within a display generated by the Derivative
98
- Works, if and wherever such third-party notices normally appear. The contents of the NOTICE
99
- file are for informational purposes only and do not modify the License. You may add Your own
100
- attribution notices within Derivative Works that You distribute, alongside or as an addendum to
101
- the NOTICE text from the Work, provided that such additional attribution notices cannot be
102
- construed as modifying the License.
92
+ . If the Work includes a "NOTICE" text file as part of its distribution, then any Derivative Works
93
+ that You distribute must include a readable copy of the attribution notices contained within such
94
+ NOTICE file, excluding those notices that do not pertain to any part of the Derivative Works, in
95
+ at least one of the following places: within a NOTICE text file distributed as part of the
96
+ Derivative Works; within the Source form or documentation, if provided along with the Derivative
97
+ Works; or, within a display generated by the Derivative Works, if and wherever such third-party
98
+ notices normally appear. The contents of the NOTICE file are for informational purposes only and
99
+ do not modify the License. You may add Your own attribution notices within Derivative Works that
100
+ You distribute, alongside or as an addendum to the NOTICE text from the Work, provided that such
101
+ additional attribution notices cannot be construed as modifying the License.
103
102
 
104
103
  You may add Your own copyright statement to Your modifications and may provide additional or
105
104
  different license terms and conditions for use, reproduction, or distribution of Your modifications,
106
105
  or for any such Derivative Works as a whole, provided Your use, reproduction, and distribution of
107
106
  the Work otherwise complies with the conditions stated in this License.
108
107
 
109
- ## 5. Submission of Contributions
108
+ == 5. Submission of Contributions
110
109
 
111
110
  Unless You explicitly state otherwise, any Contribution intentionally submitted for inclusion in the
112
111
  Work by You to the Licensor shall be under the terms and conditions of this License, without any
@@ -114,13 +113,13 @@ additional terms or conditions. Notwithstanding the above, nothing herein shall
114
113
  the terms of any separate license agreement you may have executed with Licensor regarding such
115
114
  Contributions.
116
115
 
117
- ## 6. Trademarks
116
+ == 6. Trademarks
118
117
 
119
118
  This License does not grant permission to use the trade names, trademarks, service marks, or product
120
119
  names of the Licensor, except as required for reasonable and customary use in describing the origin
121
120
  of the Work and reproducing the content of the NOTICE file.
122
121
 
123
- ## 7. Disclaimer of Warranty
122
+ == 7. Disclaimer of Warranty
124
123
 
125
124
  Unless required by applicable law or agreed to in writing, Licensor provides the Work (and each
126
125
  Contributor provides its Contributions) on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
@@ -129,7 +128,7 @@ TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE. Y
129
128
  responsible for determining the appropriateness of using or redistributing the Work and assume any
130
129
  risks associated with Your exercise of permissions under this License.
131
130
 
132
- ## 8. Limitation of Liability
131
+ == 8. Limitation of Liability
133
132
 
134
133
  In no event and under no legal theory, whether in tort (including negligence), contract, or
135
134
  otherwise, unless required by applicable law (such as deliberate and grossly negligent acts) or
@@ -139,7 +138,7 @@ License or out of the use or inability to use the Work (including but not limite
139
138
  loss of goodwill, work stoppage, computer failure or malfunction, or any and all other commercial
140
139
  damages or losses), even if such Contributor has been advised of the possibility of such damages.
141
140
 
142
- ## 9. Accepting Warranty or Additional Liability
141
+ == 9. Accepting Warranty or Additional Liability
143
142
 
144
143
  While redistributing the Work or Derivative Works thereof, You may choose to offer, and charge a fee
145
144
  for, acceptance of support, warranty, indemnity, or other liability obligations and/or rights
@@ -151,11 +150,11 @@ additional liability.
151
150
 
152
151
  END OF TERMS AND CONDITIONS
153
152
 
154
- Copyright 2016 [Alchemists](https://www.alchemists.io).
153
+ Copyright 2016 link:https://www.alchemists.io/team/brooke_kuhlmann[Brooke Kuhlmann].
155
154
 
156
155
  Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in
157
- compliance with the License. You may obtain a [copy](http://www.apache.org/licenses/LICENSE-2.0) of
158
- the License.
156
+ compliance with the License. You may obtain a link:https://www.apache.org/licenses/LICENSE-2.0[copy]
157
+ of the License.
159
158
 
160
159
  Unless required by applicable law or agreed to in writing, software distributed under the License is
161
160
  distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
@@ -0,0 +1,234 @@
1
+ :toc: macro
2
+ :toclevels: 5
3
+ :figure-caption!:
4
+
5
+ = Runcom
6
+
7
+ [link=http://badge.fury.io/rb/runcom]
8
+ image::https://badge.fury.io/rb/runcom.svg[Gem Version]
9
+ [link=https://www.alchemists.io/projects/code_quality]
10
+ image::https://img.shields.io/badge/code_style-alchemists-brightgreen.svg[Alchemists Style Guide]
11
+ [link=https://circleci.com/gh/bkuhlmann/runcom]
12
+ image::https://circleci.com/gh/bkuhlmann/runcom.svg?style=svg[Circle CI Status]
13
+
14
+ Runcom (short for link:https://en.wikipedia.org/wiki/Run_commands[Run Command]) provides common
15
+ functionality for Command Line Interfaces (CLIs) in which to manage global, local, or multiple
16
+ caches, configurations, or data in general. It does this by leveraging the
17
+ https://standards.freedesktop.org/basedir-spec/basedir-spec-latest.html[XDG Base Directory
18
+ Specification] built atop the link:https://www.alchemists.io/projects/xdg[XDG] implementation.
19
+
20
+ toc::[]
21
+
22
+ == Features
23
+
24
+ * Wraps the link:https://www.alchemists.io/projects/xdg[XDG] implementation which provides access to
25
+ the following environment variables:
26
+ ** `+$XDG_CACHE_HOME+`
27
+ ** `+$XDG_CONFIG_HOME+`
28
+ ** `+$XDG_CONFIG_DIRS+`
29
+ ** `+$XDG_DATA_HOME+`
30
+ ** `+$XDG_DATA_DIRS+`
31
+ * Enhances the XDG cache, config, and data implementation. For the config, the following is
32
+ supported:
33
+ ** Supports loading of CLI-specific http://yaml.org[YAML] configuration file.
34
+ ** Supports loading and merging of nested/complex configurations.
35
+ ** Supports hash representation of configuration.
36
+
37
+ == Requirements
38
+
39
+ . https://www.ruby-lang.org[Ruby]
40
+
41
+ == Setup
42
+
43
+ To install, run:
44
+
45
+ [source,bash]
46
+ ----
47
+ gem install runcom
48
+ ----
49
+
50
+ Add the following to your Gemfile:
51
+
52
+ [source,ruby]
53
+ ----
54
+ gem "runcom"
55
+ ----
56
+
57
+ == Usage
58
+
59
+ The following describes the enhancements built atop the
60
+ link:https://www.alchemists.io/projects/xdg[XDG] implementation.
61
+
62
+ === Overview
63
+
64
+ While there isn’t an environment convenience object as found in the `+XDG+` namespace, you can
65
+ instantiate each object individually:
66
+
67
+ [source,ruby]
68
+ ----
69
+ cache = Runcom::Cache.new "example/data.json"
70
+ config = Runcom::Config.new "example/configuration.yml"
71
+ data = Runcom::Data.new "example/store.dat"
72
+ ----
73
+
74
+ Each of the above objects share the same API:
75
+
76
+ * `#relative` - Answers the relative path from which the object was constructed.
77
+ * `#namespace` - Answers the relative namespace as a pathname object from which the object was
78
+ constructed. The namespace must be identical across the cache, config, and data objects as this is
79
+ what uniquely identifies and organizes all files associated with your program.
80
+ * `#file_name` - Answers the file name from which the object was constructed.
81
+ * `#current` - Answers first _existing_ file system path computed by `$XDG_*_HOME` followed by each
82
+ computed `$XDG_*_DIRS` path in order defined. Otherwise, `nil` is answered back.
83
+ * `#all` - Answers all file system paths which is the combined `$XDG_*_HOME` and
84
+ `$XDG_*_DIRS` values in order defined. These paths _may_ or _may not_ exist on the file system.
85
+ * `#inspect` - Answers a string representation of default XDG home and directory paths for debugging
86
+ purposes.
87
+
88
+ Using the `cache` object (created above) as an example, here is what each method answers back:
89
+
90
+ [source,ruby]
91
+ ----
92
+ cache.relative # => #<Pathname:example/data.json>
93
+ cache.namespace # #<Pathname:example>
94
+ cache.file_name # #<Pathname:data.json>
95
+ cache.current # #<Pathname:/Users/bkuhlmann/.cache/example/data.json>
96
+ cache.all # [#<Pathname:/Users/bkuhlmann/.cache/example/data.json>]
97
+ cache.inspect # "XDG_CACHE_HOME=/Users/bkuhlmann/.cache"
98
+ ----
99
+
100
+ === Variable Priority
101
+
102
+ Path precedence is determined in the following order (with the first taking highest priority):
103
+
104
+ . *Local Configuration* - If a `$XDG_*_HOME` or `$XDG_*_DIRS` path relative to the
105
+ current working directory is detected, it will take precedence over the global configuration.
106
+ This is the same behavior as found in Git where the local `.git/config` takes precedence over the
107
+ global `$HOME/.gitconfig`.
108
+ . *Global Configuration* - When a local configuration isn’t found, the global configuration is used
109
+ as defined by the _XDG Base Directory Specification_.
110
+
111
+ === Configuration Specialization
112
+
113
+ The `Runcom::Config` deserves additional highlighting as it provides support for loading custom
114
+ CLI configurations directly from the command line or from custom locations. It is meant to be used
115
+ within your program(s).
116
+
117
+ An object is initialized as follows:
118
+
119
+ [source,ruby]
120
+ ----
121
+ configuration = Runcom::Config.new "example/configuration.yml"
122
+ ----
123
+
124
+ Default settings can be initialized as well:
125
+
126
+ [source,ruby]
127
+ ----
128
+ configuration = Runcom::Config.new "example/configuration.yml", defaults: {name: "Example"}
129
+ ----
130
+
131
+ Once a configuration has been initialized, a hash representation can be obtained:
132
+
133
+ [source,ruby]
134
+ ----
135
+ configuration.to_h
136
+ ----
137
+
138
+ A configuration can be merged with another hash (handy for runtime overrides):
139
+
140
+ [source,ruby]
141
+ ----
142
+ updated_configuration = configuration.merge {name: "Updated Name"}
143
+ ----
144
+
145
+ A configuration can also be merged with another configuration:
146
+
147
+ [source,ruby]
148
+ ----
149
+ updated_configuration = configuration.merge Runcom::Config.new("other", defaults: {a: 1})
150
+ ----
151
+
152
+ The current path of the configuration can be asked for as well:
153
+
154
+ [source,ruby]
155
+ ----
156
+ configuration.current # "~/.config/example/configuration.yml"
157
+ ----
158
+
159
+ For further details, study the public interface as provided by the
160
+ link:lib/runcom/config.rb[`Runcom::Config`] object.
161
+
162
+ === Examples
163
+
164
+ Examples of gems built atop this gem are:
165
+
166
+ * link:https://www.alchemists.io/projects/gemsmith[Gemsmith] - A command line interface for smithing
167
+ new Ruby gems.
168
+ * link:https://www.alchemists.io/projects/git-cop[Git Cop] - Enforces consistent Git commits.
169
+ * link:https://www.alchemists.io/projects/milestoner[Milestoner] - A command line interface for
170
+ releasing Git repository milestones.
171
+ * link:https://www.alchemists.io/projects/pennyworth[Pennyworth] - A command line interface that
172
+ enhances and extends link:https://www.alfredapp.com[Alfred] with Ruby support.
173
+ * link:https://www.alchemists.io/projects/pragmater[Pragmater] - A command line interface for
174
+ managing/formatting source file pragma comments.
175
+ * link:https://www.alchemists.io/projects/sublime_text_kit[Sublime Text Kit] - A command line
176
+ interface for managing Sublime Text metadata.
177
+ * link:https://www.alchemists.io/projects/tocer[Tocer] - A command line interface for generating
178
+ table of contents for Markdown files.
179
+
180
+ == Development
181
+
182
+ To contribute, run:
183
+
184
+ [source,bash]
185
+ ----
186
+ git clone https://github.com/bkuhlmann/runcom.git
187
+ cd runcom
188
+ bin/setup
189
+ ----
190
+
191
+ You can also use the IRB console for direct access to all objects:
192
+
193
+ [source,bash]
194
+ ----
195
+ bin/console
196
+ ----
197
+
198
+ == Tests
199
+
200
+ To test, run:
201
+
202
+ [source,bash]
203
+ ----
204
+ bundle exec rake
205
+ ----
206
+
207
+ == Versioning
208
+
209
+ Read link:https://semver.org[Semantic Versioning] for details. Briefly, it means:
210
+
211
+ * Major (X.y.z) - Incremented for any backwards incompatible public API changes.
212
+ * Minor (x.Y.z) - Incremented for new, backwards compatible, public API enhancements/fixes.
213
+ * Patch (x.y.Z) - Incremented for small, backwards compatible, bug fixes.
214
+
215
+ == Code of Conduct
216
+
217
+ Please note that this project is released with a link:CODE_OF_CONDUCT.adoc[CODE OF CONDUCT]. By
218
+ participating in this project you agree to abide by its terms.
219
+
220
+ == Contributions
221
+
222
+ Read link:CONTRIBUTING.adoc[CONTRIBUTING] for details.
223
+
224
+ == License
225
+
226
+ Read link:LICENSE.adoc[LICENSE] for details.
227
+
228
+ == History
229
+
230
+ Read link:CHANGES.adoc[CHANGES] for details.
231
+
232
+ == Credits
233
+
234
+ Engineered by link:https://www.alchemists.io/team/brooke_kuhlmann[Brooke Kuhlmann].
@@ -3,20 +3,9 @@
3
3
  module Runcom
4
4
  # Gem identity information.
5
5
  module Identity
6
- def self.name
7
- "runcom"
8
- end
9
-
10
- def self.label
11
- "Runcom"
12
- end
13
-
14
- def self.version
15
- "6.0.1"
16
- end
17
-
18
- def self.version_label
19
- "#{label} #{version}"
20
- end
6
+ NAME = "runcom"
7
+ LABEL = "Runcom"
8
+ VERSION = "6.4.0"
9
+ VERSION_LABEL = "#{LABEL} #{VERSION}"
21
10
  end
22
11
  end
metadata CHANGED
@@ -1,18 +1,18 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: runcom
3
3
  version: !ruby/object:Gem::Version
4
- version: 6.0.1
4
+ version: 6.4.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Brooke Kuhlmann
8
- autorequire:
8
+ autorequire:
9
9
  bindir: bin
10
10
  cert_chain:
11
11
  - |
12
12
  -----BEGIN CERTIFICATE-----
13
- MIIC/jCCAeagAwIBAgIBAjANBgkqhkiG9w0BAQsFADAlMSMwIQYDVQQDDBpicm9v
14
- a2UvREM9YWxjaGVtaXN0cy9EQz1pbzAeFw0xOTAyMTcxNjAxMTFaFw0yMDAyMTcx
15
- NjAxMTFaMCUxIzAhBgNVBAMMGmJyb29rZS9EQz1hbGNoZW1pc3RzL0RDPWlvMIIB
13
+ MIIC/jCCAeagAwIBAgIBAzANBgkqhkiG9w0BAQsFADAlMSMwIQYDVQQDDBpicm9v
14
+ a2UvREM9YWxjaGVtaXN0cy9EQz1pbzAeFw0yMDAzMTUxNDQ1MzJaFw0yMTAzMTUx
15
+ NDQ1MzJaMCUxIzAhBgNVBAMMGmJyb29rZS9EQz1hbGNoZW1pc3RzL0RDPWlvMIIB
16
16
  IjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIBCgKCAQEA6l1qpXTiomH1RfMRloyw7MiE
17
17
  xyVx/x8Yc3EupdH7uhNaTXQGyORN6aOY//1QXXMHIZ9tW74nZLhesWMSUMYy0XhB
18
18
  brs+KkurHnc9FnEJAbG7ebGvl/ncqZt72nQvaxpDxvuCBHgJAz+8i5wl6FhLw+oT
@@ -20,15 +20,15 @@ cert_chain:
20
20
  D5vkU0YlAm1r98BymuJlcQ1qdkVEI1d48ph4kcS0S0nv1RiuyVb6TCAR3Nu3VaVq
21
21
  3fPzZKJLZBx67UvXdbdicWPiUR75elI4PXpLIic3xytaF52ZJYyKZCNZJhNwfQID
22
22
  AQABozkwNzAJBgNVHRMEAjAAMAsGA1UdDwQEAwIEsDAdBgNVHQ4EFgQU0nzow9vc
23
- 2CdikiiE3fJhP/gY4ggwDQYJKoZIhvcNAQELBQADggEBANgfX7kPZkJvsbdWMvbe
24
- DUUYxRTqTUzCDpLd2p3sQvgLMKjTNSKt6CFq/kh+98b6RCgO6DqiVfxvOEq02dvf
25
- ebMN/ylQqan2FgiAs1rpP0/D4C0MlBjoDktsT+2IyLol1KmkDB20ExJ4Sf1GRNdA
26
- hpWOtcgqHtmrc7xzgB6BuyoYufrKKUlCO3ewTM4C375D2qO7hIdKuMOO3CdPMtSk
27
- OrWpbzCL+nbbXqeoqiHgZaUvcyyQrGj5sQRxMTzuMXzzQxtHnuTuKrcz16HMTX/O
28
- dKvURM+1PwDCzC5tvRwjhUJIizau6+MtkFCvJHmaAj1aZL3odcPejHj5Hxt/0CUW
29
- y84=
23
+ 2CdikiiE3fJhP/gY4ggwDQYJKoZIhvcNAQELBQADggEBAIHhAlD3po4sTYqacXaQ
24
+ XI9jIhrfMy//2PgbHWcETtlJPBeNUbbSNBABcllUHKqYsVDlSvSmss034KSWNR8F
25
+ bF1GcloicyvcCC4y6IoW4it0COAcdeaaxkxiBSgKdQFpff9REnDlIKK4uQ9lLxIo
26
+ Y2G5xubiziKZkyfWFuSr67PIjW3Bu673D1JVBArhA1qbgQmYQcy1CkGOjo+iO8Nf
27
+ 7u/QSfBHb+r/bXhKscDgPpnKwbUmvgO2+94zJG9KsrmIydlzYfsD09aXKx0t6Xy4
28
+ 2XV8FRa7/JimI07sPLC13eLY3xd/aYTi85Z782KIA4j0G8XEEWAX0ouBhlXPocZv
29
+ QWc=
30
30
  -----END CERTIFICATE-----
31
- date: 2020-02-01 00:00:00.000000000 Z
31
+ date: 2020-11-14 00:00:00.000000000 Z
32
32
  dependencies:
33
33
  - !ruby/object:Gem::Dependency
34
34
  name: refinements
@@ -36,70 +36,56 @@ dependencies:
36
36
  requirements:
37
37
  - - "~>"
38
38
  - !ruby/object:Gem::Version
39
- version: '7.0'
39
+ version: '7.14'
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: '7.0'
46
+ version: '7.14'
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: '4.0'
53
+ version: '4.4'
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: '4.0'
60
+ version: '4.4'
61
61
  - !ruby/object:Gem::Dependency
62
62
  name: bundler-audit
63
63
  requirement: !ruby/object:Gem::Requirement
64
64
  requirements:
65
65
  - - "~>"
66
66
  - !ruby/object:Gem::Version
67
- version: '0.6'
67
+ version: '0.7'
68
68
  type: :development
69
69
  prerelease: false
70
70
  version_requirements: !ruby/object:Gem::Requirement
71
71
  requirements:
72
72
  - - "~>"
73
73
  - !ruby/object:Gem::Version
74
- version: '0.6'
74
+ version: '0.7'
75
75
  - !ruby/object:Gem::Dependency
76
- name: gemsmith
76
+ name: bundler-leak
77
77
  requirement: !ruby/object:Gem::Requirement
78
78
  requirements:
79
79
  - - "~>"
80
80
  - !ruby/object:Gem::Version
81
- version: '14.0'
81
+ version: '0.2'
82
82
  type: :development
83
83
  prerelease: false
84
84
  version_requirements: !ruby/object:Gem::Requirement
85
85
  requirements:
86
86
  - - "~>"
87
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'
88
+ version: '0.2'
103
89
  - !ruby/object:Gem::Dependency
104
90
  name: guard-rspec
105
91
  requirement: !ruby/object:Gem::Requirement
@@ -120,28 +106,28 @@ dependencies:
120
106
  requirements:
121
107
  - - "~>"
122
108
  - !ruby/object:Gem::Version
123
- version: '0.12'
109
+ version: '0.13'
124
110
  type: :development
125
111
  prerelease: false
126
112
  version_requirements: !ruby/object:Gem::Requirement
127
113
  requirements:
128
114
  - - "~>"
129
115
  - !ruby/object:Gem::Version
130
- version: '0.12'
116
+ version: '0.13'
131
117
  - !ruby/object:Gem::Dependency
132
118
  name: pry-byebug
133
119
  requirement: !ruby/object:Gem::Requirement
134
120
  requirements:
135
121
  - - "~>"
136
122
  - !ruby/object:Gem::Version
137
- version: '3.7'
123
+ version: '3.9'
138
124
  type: :development
139
125
  prerelease: false
140
126
  version_requirements: !ruby/object:Gem::Requirement
141
127
  requirements:
142
128
  - - "~>"
143
129
  - !ruby/object:Gem::Version
144
- version: '3.7'
130
+ version: '3.9'
145
131
  - !ruby/object:Gem::Dependency
146
132
  name: rake
147
133
  requirement: !ruby/object:Gem::Requirement
@@ -162,56 +148,56 @@ dependencies:
162
148
  requirements:
163
149
  - - "~>"
164
150
  - !ruby/object:Gem::Version
165
- version: '5.6'
151
+ version: '6.0'
166
152
  type: :development
167
153
  prerelease: false
168
154
  version_requirements: !ruby/object:Gem::Requirement
169
155
  requirements:
170
156
  - - "~>"
171
157
  - !ruby/object:Gem::Version
172
- version: '5.6'
158
+ version: '6.0'
173
159
  - !ruby/object:Gem::Dependency
174
160
  name: rspec
175
161
  requirement: !ruby/object:Gem::Requirement
176
162
  requirements:
177
163
  - - "~>"
178
164
  - !ruby/object:Gem::Version
179
- version: '3.9'
165
+ version: '3.10'
180
166
  type: :development
181
167
  prerelease: false
182
168
  version_requirements: !ruby/object:Gem::Requirement
183
169
  requirements:
184
170
  - - "~>"
185
171
  - !ruby/object:Gem::Version
186
- version: '3.9'
172
+ version: '3.10'
187
173
  - !ruby/object:Gem::Dependency
188
174
  name: rubocop
189
175
  requirement: !ruby/object:Gem::Requirement
190
176
  requirements:
191
177
  - - "~>"
192
178
  - !ruby/object:Gem::Version
193
- version: '0.79'
179
+ version: '1.3'
194
180
  type: :development
195
181
  prerelease: false
196
182
  version_requirements: !ruby/object:Gem::Requirement
197
183
  requirements:
198
184
  - - "~>"
199
185
  - !ruby/object:Gem::Version
200
- version: '0.79'
186
+ version: '1.3'
201
187
  - !ruby/object:Gem::Dependency
202
188
  name: rubocop-performance
203
189
  requirement: !ruby/object:Gem::Requirement
204
190
  requirements:
205
191
  - - "~>"
206
192
  - !ruby/object:Gem::Version
207
- version: '1.5'
193
+ version: '1.8'
208
194
  type: :development
209
195
  prerelease: false
210
196
  version_requirements: !ruby/object:Gem::Requirement
211
197
  requirements:
212
198
  - - "~>"
213
199
  - !ruby/object:Gem::Version
214
- version: '1.5'
200
+ version: '1.8'
215
201
  - !ruby/object:Gem::Dependency
216
202
  name: rubocop-rake
217
203
  requirement: !ruby/object:Gem::Requirement
@@ -232,39 +218,39 @@ dependencies:
232
218
  requirements:
233
219
  - - "~>"
234
220
  - !ruby/object:Gem::Version
235
- version: '1.37'
221
+ version: '2.0'
236
222
  type: :development
237
223
  prerelease: false
238
224
  version_requirements: !ruby/object:Gem::Requirement
239
225
  requirements:
240
226
  - - "~>"
241
227
  - !ruby/object:Gem::Version
242
- version: '1.37'
228
+ version: '2.0'
243
229
  - !ruby/object:Gem::Dependency
244
230
  name: simplecov
245
231
  requirement: !ruby/object:Gem::Requirement
246
232
  requirements:
247
233
  - - "~>"
248
234
  - !ruby/object:Gem::Version
249
- version: '0.18'
235
+ version: '0.19'
250
236
  type: :development
251
237
  prerelease: false
252
238
  version_requirements: !ruby/object:Gem::Requirement
253
239
  requirements:
254
240
  - - "~>"
255
241
  - !ruby/object:Gem::Version
256
- version: '0.18'
257
- description:
242
+ version: '0.19'
243
+ description:
258
244
  email:
259
245
  - brooke@alchemists.io
260
246
  executables: []
261
247
  extensions: []
262
248
  extra_rdoc_files:
263
- - README.md
264
- - LICENSE.md
249
+ - README.adoc
250
+ - LICENSE.adoc
265
251
  files:
266
- - LICENSE.md
267
- - README.md
252
+ - LICENSE.adoc
253
+ - README.adoc
268
254
  - lib/runcom.rb
269
255
  - lib/runcom/cache.rb
270
256
  - lib/runcom/config.rb
@@ -275,14 +261,15 @@ files:
275
261
  - lib/runcom/identity.rb
276
262
  - lib/runcom/paths/common.rb
277
263
  - lib/runcom/paths/home.rb
278
- homepage: https://github.com/bkuhlmann/runcom
264
+ homepage: https://www.alchemists.io/projects/runcom
279
265
  licenses:
280
266
  - Apache-2.0
281
267
  metadata:
282
- source_code_uri: https://github.com/bkuhlmann/runcom
283
- changelog_uri: https://github.com/bkuhlmann/runcom/blob/master/CHANGES.md
284
268
  bug_tracker_uri: https://github.com/bkuhlmann/runcom/issues
285
- post_install_message:
269
+ changelog_uri: https://www.alchemists.io/projects/runcom/changes.html
270
+ documentation_uri: https://www.alchemists.io/projects/runcom
271
+ source_code_uri: https://github.com/bkuhlmann/runcom
272
+ post_install_message:
286
273
  rdoc_options: []
287
274
  require_paths:
288
275
  - lib
@@ -297,8 +284,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
297
284
  - !ruby/object:Gem::Version
298
285
  version: '0'
299
286
  requirements: []
300
- rubygems_version: 3.1.2
301
- signing_key:
287
+ rubygems_version: 3.1.4
288
+ signing_key:
302
289
  specification_version: 4
303
290
  summary: An XDG enhanced run command manager for command line interfaces.
304
291
  test_files: []
metadata.gz.sig CHANGED
@@ -1,2 +1 @@
1
- [��|�9v��2������I���ޞ�|���G 6y�`�9 �O�z$J��f=��Dy�t�e��������x얧�,^u_�\;����.e��lVYw��kT��n�gCGQ
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
1
+ ��&����TB XSmR/�}�:�F���NSٙ!H�%L_f�+��ӹO$���BSFT���ڢ�N�^����E���V�݄��/*�֯x$Lj��b_x+z�������$���#x�F���2w�s���^�ۓB���_~ ��<,i8Lq���zV)�G͊�r�.�i
data/README.md DELETED
@@ -1,204 +0,0 @@
1
- <p align="center">
2
- <img src="runcom.png" alt="Runcom Icon"/>
3
- </p>
4
-
5
- # Runcom
6
-
7
- [![Gem Version](https://badge.fury.io/rb/runcom.svg)](http://badge.fury.io/rb/runcom)
8
- [![Code Climate Maintainability](https://api.codeclimate.com/v1/badges/129b7ea524a0f5a6a805/maintainability)](https://codeclimate.com/github/bkuhlmann/runcom/maintainability)
9
- [![Code Climate Test Coverage](https://api.codeclimate.com/v1/badges/129b7ea524a0f5a6a805/test_coverage)](https://codeclimate.com/github/bkuhlmann/runcom/test_coverage)
10
- [![Circle CI Status](https://circleci.com/gh/bkuhlmann/runcom.svg?style=svg)](https://circleci.com/gh/bkuhlmann/runcom)
11
-
12
- Runcom (short for [Run Command](https://en.wikipedia.org/wiki/Run_commands)) provides common
13
- functionality for Command Line Interfaces (CLIs) in which to manage global, local, or multiple
14
- caches, configurations, or data in general. It does this by leveraging the [XDG Base Directory
15
- Specification](https://standards.freedesktop.org/basedir-spec/basedir-spec-latest.html) built atop
16
- the [XDG](https://github.com/bkuhlmann/xdg) implementation.
17
-
18
- <!-- Tocer[start]: Auto-generated, don't remove. -->
19
-
20
- ## Table of Contents
21
-
22
- - [Features](#features)
23
- - [Requirements](#requirements)
24
- - [Setup](#setup)
25
- - [Usage](#usage)
26
- - [Overview](#overview)
27
- - [Variable Priority](#variable-priority)
28
- - [Configuration Specialization](#configuration-specialization)
29
- - [Examples](#examples)
30
- - [Tests](#tests)
31
- - [Versioning](#versioning)
32
- - [Code of Conduct](#code-of-conduct)
33
- - [Contributions](#contributions)
34
- - [License](#license)
35
- - [History](#history)
36
- - [Credits](#credits)
37
-
38
- <!-- Tocer[finish]: Auto-generated, don't remove. -->
39
-
40
- ## Features
41
-
42
- - Wraps the [XDG](https://github.com/bkuhlmann/xdg) implementation which provides access to the
43
- following environment variables:
44
- - `$XDG_CACHE_HOME`
45
- - `$XDG_CONFIG_HOME`
46
- - `$XDG_CONFIG_DIRS`
47
- - `$XDG_DATA_HOME`
48
- - `$XDG_DATA_DIRS`
49
- - Enhances the XDG cache, config, and data implementation. For the config, the following is
50
- supported:
51
- - Supports loading of CLI-specific [YAML](http://yaml.org) configuration file.
52
- - Supports loading and merging of nested/complex configurations.
53
- - Supports hash representation of configuration.
54
-
55
- ## Requirements
56
-
57
- 1. [Ruby 2.7.x](https://www.ruby-lang.org).
58
-
59
- ## Setup
60
-
61
- Type the following to install:
62
-
63
- gem install runcom
64
-
65
- Add the following to your Gemfile:
66
-
67
- gem "runcom"
68
-
69
- ## Usage
70
-
71
- The following describes the enhancements built atop the [XDG](https://github.com/bkuhlmann/xdg)
72
- implementation.
73
-
74
- #### Overview
75
-
76
- While there isn't an environment convenience object as found in the `XDG` namespace, you can
77
- instantiate each object individually:
78
-
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
-
83
- Each of the above objects share the same API:
84
-
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`
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"
105
-
106
- #### Variable Priority
107
-
108
- Path precedence is determined in the following order (with the first taking highest priority):
109
-
110
- 1. **Local Configuration** - If a `$XDG_*_HOME` or `$XDG_*_DIRS` path relative to the current
111
- working directory is detected, it will take precedence over the global configuration. This is the
112
- same behavior as found in Git where the local `.git/config` takes precedence over the global
113
- `~/.gitconfig`.
114
- 1. **Global Configuration** - When a local configuration isn't found, the global configuration is
115
- used as defined by the *XDG Base Directory Specification*.
116
-
117
- #### Configuration Specialization
118
-
119
- The `Runcom::Config` deserves additional highlighting as it provides support for loading custom CLI
120
- configurations directly from the command line or from custom locations. It is meant to be used
121
- within your program(s).
122
-
123
- An object is initialized as follows:
124
-
125
- configuration = Runcom::Config.new "example/configuration.yml"
126
-
127
- Default settings can be initialized as well:
128
-
129
- configuration = Runcom::Config.new "example/configuration.yml", defaults: {name: "Example"}
130
-
131
- Once a configuration has been initialized, a hash representation can be obtained:
132
-
133
- configuration.to_h
134
-
135
- A configuration can be merged with another hash (handy for runtime overrides):
136
-
137
- updated_configuration = configuration.merge {name: "Updated Name"}
138
-
139
- A configuration can also be merged with another configuration:
140
-
141
- updated_configuration = configuration.merge Runcom::Config.new("other", defaults: {a: 1})
142
-
143
- The current path of the configuration can be asked for as well:
144
-
145
- configuration.current # "~/.config/example/configuration.yml"
146
-
147
- For further details, study the public interface as provided by the
148
- [`Runcom::Config`](lib/runcom/config.rb) object.
149
-
150
- ### Examples
151
-
152
- Examples of gems built atop this gem are:
153
-
154
- - [Gemsmith](https://github.com/bkuhlmann/gemsmith) - A command line interface for smithing new Ruby
155
- gems.
156
- - [Git Cop](https://github.com/bkuhlmann/git-cop) - Enforces consistent Git commits.
157
- - [Milestoner](https://github.com/bkuhlmann/milestoner) - A command line interface for releasing Git
158
- repository milestones.
159
- - [Pennyworth](https://github.com/bkuhlmann/pennyworth) - A command line interface that enhances and
160
- extends [Alfred](https://www.alfredapp.com) with Ruby support.
161
- - [Pragmater](https://github.com/bkuhlmann/pragmater) - A command line interface for
162
- managing/formatting source file pragma comments.
163
- - [Sublime Text Kit](https://github.com/bkuhlmann/sublime_text_kit) - A command line interface for
164
- managing Sublime Text metadata.
165
- - [Tocer](https://github.com/bkuhlmann/tocer) - A command line interface for generating table of
166
- contents for Markdown files.
167
-
168
- ## Tests
169
-
170
- To test, run:
171
-
172
- bundle exec rake
173
-
174
- ## Versioning
175
-
176
- Read [Semantic Versioning](https://semver.org) for details. Briefly, it means:
177
-
178
- - Major (X.y.z) - Incremented for any backwards incompatible public API changes.
179
- - Minor (x.Y.z) - Incremented for new, backwards compatible, public API enhancements/fixes.
180
- - Patch (x.y.Z) - Incremented for small, backwards compatible, bug fixes.
181
-
182
- ## Code of Conduct
183
-
184
- Please note that this project is released with a [CODE OF CONDUCT](CODE_OF_CONDUCT.md). By
185
- participating in this project you agree to abide by its terms.
186
-
187
- ## Contributions
188
-
189
- Read [CONTRIBUTING](CONTRIBUTING.md) for details.
190
-
191
- ## License
192
-
193
- Copyright 2016 [Alchemists](https://www.alchemists.io).
194
- Read [LICENSE](LICENSE.md) for details.
195
-
196
- ## History
197
-
198
- Read [CHANGES](CHANGES.md) for details.
199
- Built with [Gemsmith](https://github.com/bkuhlmann/gemsmith).
200
-
201
- ## Credits
202
-
203
- Developed by [Brooke Kuhlmann](https://www.alchemists.io) at
204
- [Alchemists](https://www.alchemists.io).