runcom 1.1.0 → 1.2.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +36 -33
- data/lib/runcom/identity.rb +1 -1
- metadata +20 -6
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 95605d459868a8f22b027950497882bf06a5503e
|
4
|
+
data.tar.gz: 6cfb7d798e5a9477082cb6056a3deb3b500110fc
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 8f1db1b1db39582a76ff9f00e8b49858f29f8eaff0a72ccbfb40fc76da002d5949434e7b116831709c3e07a2c797819049a5d964dc28f274b1780f66396738fa
|
7
|
+
data.tar.gz: 52582c7528ba3f2ca35e19e27fcd5da9303e605a568abda48895195075c9c8e5e4fd00c955c23be11a4e2e8071d288541d9067787bb53c004397b4775b36d81a
|
data/README.md
CHANGED
@@ -15,28 +15,28 @@ Read on for further details.
|
|
15
15
|
|
16
16
|
<!-- Tocer[start]: Auto-generated, don't remove. -->
|
17
17
|
|
18
|
-
|
18
|
+
## Table of Contents
|
19
19
|
|
20
|
-
- [Features](#features)
|
21
|
-
- [Requirements](#requirements)
|
20
|
+
- [Features](#features)
|
21
|
+
- [Requirements](#requirements)
|
22
22
|
- [Setup](#setup)
|
23
|
-
- [Usage](#usage)
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
- [Tests](#tests)
|
30
|
-
- [Versioning](#versioning)
|
31
|
-
- [Code of Conduct](#code-of-conduct)
|
32
|
-
- [Contributions](#contributions)
|
33
|
-
- [License](#license)
|
34
|
-
- [History](#history)
|
35
|
-
- [Credits](#credits)
|
23
|
+
- [Usage](#usage)
|
24
|
+
- [`Runcom::Configuration`](#runcomconfiguration)
|
25
|
+
- [XDG](#xdg)
|
26
|
+
- [`$XDG_CONFIG_DIRS`](#xdg_config_dirs)
|
27
|
+
- [`$XDG_CONFIG_HOME`](#xdg_config_home)
|
28
|
+
- [Variable Priority](#variable-priority)
|
29
|
+
- [Tests](#tests)
|
30
|
+
- [Versioning](#versioning)
|
31
|
+
- [Code of Conduct](#code-of-conduct)
|
32
|
+
- [Contributions](#contributions)
|
33
|
+
- [License](#license)
|
34
|
+
- [History](#history)
|
35
|
+
- [Credits](#credits)
|
36
36
|
|
37
37
|
<!-- Tocer[finish]: Auto-generated, don't remove. -->
|
38
38
|
|
39
|
-
|
39
|
+
## Features
|
40
40
|
|
41
41
|
- Provides run command customization by loading a CLI-specific configuration from a
|
42
42
|
[YAML](http://yaml.org) file.
|
@@ -48,7 +48,7 @@ Read on for further details.
|
|
48
48
|
- Supports loading and merging of nested/complex configurations.
|
49
49
|
- Supports hash representation of configuration.
|
50
50
|
|
51
|
-
|
51
|
+
## Requirements
|
52
52
|
|
53
53
|
0. [Ruby 2.4.x](https://www.ruby-lang.org)
|
54
54
|
|
@@ -71,9 +71,12 @@ Add the following to your Gemfile:
|
|
71
71
|
|
72
72
|
gem "runcom"
|
73
73
|
|
74
|
-
|
74
|
+
## Usage
|
75
75
|
|
76
|
-
|
76
|
+
### `Runcom::Configuration`
|
77
|
+
|
78
|
+
This object provides support for loading custom CLI configurations directly from the command line or
|
79
|
+
from custom locations. It is meant to be used within your CLI program(s).
|
77
80
|
|
78
81
|
An object can be initialized as follows:
|
79
82
|
|
@@ -103,14 +106,14 @@ The computed path of the configuration can be asked for as well:
|
|
103
106
|
For further details, study the public interface as provided by the
|
104
107
|
[`Runcom::Configuration`](lib/runcom/configuration.rb) object.
|
105
108
|
|
106
|
-
|
109
|
+
### XDG
|
107
110
|
|
108
111
|
This gem leverages the XDG `$XDG_CONFIG_DIRS` and `$XDG_CONFIG_HOME` environment variables which are
|
109
112
|
used to compute the configuration path (as mentioned above). The following details how to take
|
110
113
|
advantage of the XDG variables (additional details can be found by reading the
|
111
114
|
[XDG Specification](https://standards.freedesktop.org/basedir-spec/basedir-spec-latest.html)).
|
112
115
|
|
113
|
-
|
116
|
+
#### `$XDG_CONFIG_DIRS`
|
114
117
|
|
115
118
|
This variable is used to define a colon delimited list of configuration directories. The order is
|
116
119
|
important as the first directory defined will take precedent over the following directory and so
|
@@ -130,30 +133,30 @@ defined first.
|
|
130
133
|
|
131
134
|
When the `$XDG_CONFIG_DIRS` is not defined, it will default to the following array: `["/etc/xdg"]`.
|
132
135
|
|
133
|
-
|
136
|
+
#### `$XDG_CONFIG_HOME`
|
134
137
|
|
135
138
|
This is the environment variable you'll want to use the most as it takes precidence over
|
136
139
|
`$XDG_CONFIG_DIRS` environment variable. It is not required to be defined as it defaults to
|
137
140
|
`$HOME/.config` which is generally want you want.
|
138
141
|
|
139
|
-
|
142
|
+
#### Variable Priority
|
140
143
|
|
141
144
|
Configuration path precedence is determined in the following order (with the first taking highest
|
142
145
|
priority):
|
143
146
|
|
144
|
-
0. `$XDG_CONFIG_HOME` - Will be used if defined *and*
|
147
|
+
0. `$XDG_CONFIG_HOME` - Will be used if defined *and* exists on the local file system. Otherwise,
|
145
148
|
falls back to the `$XDG_CONFIG_DIRS` array.
|
146
149
|
0. `$XDG_CONFIG_DIRS` - Iterates through defined directories starting with the first one defined
|
147
150
|
(highest priority). It will choose the first directory, in priority, that exists on the file
|
148
|
-
system while skipping
|
151
|
+
system while skipping any that don't exist.
|
149
152
|
|
150
|
-
|
153
|
+
## Tests
|
151
154
|
|
152
155
|
To test, run:
|
153
156
|
|
154
157
|
bundle exec rake
|
155
158
|
|
156
|
-
|
159
|
+
## Versioning
|
157
160
|
|
158
161
|
Read [Semantic Versioning](http://semver.org) for details. Briefly, it means:
|
159
162
|
|
@@ -161,26 +164,26 @@ Read [Semantic Versioning](http://semver.org) for details. Briefly, it means:
|
|
161
164
|
- Minor (x.Y.z) - Incremented for new, backwards compatible, public API enhancements/fixes.
|
162
165
|
- Patch (x.y.Z) - Incremented for small, backwards compatible, bug fixes.
|
163
166
|
|
164
|
-
|
167
|
+
## Code of Conduct
|
165
168
|
|
166
169
|
Please note that this project is released with a [CODE OF CONDUCT](CODE_OF_CONDUCT.md). By
|
167
170
|
participating in this project you agree to abide by its terms.
|
168
171
|
|
169
|
-
|
172
|
+
## Contributions
|
170
173
|
|
171
174
|
Read [CONTRIBUTING](CONTRIBUTING.md) for details.
|
172
175
|
|
173
|
-
|
176
|
+
## License
|
174
177
|
|
175
178
|
Copyright (c) 2016 [Alchemists](https://www.alchemists.io).
|
176
179
|
Read [LICENSE](LICENSE.md) for details.
|
177
180
|
|
178
|
-
|
181
|
+
## History
|
179
182
|
|
180
183
|
Read [CHANGES](CHANGES.md) for details.
|
181
184
|
Built with [Gemsmith](https://github.com/bkuhlmann/gemsmith).
|
182
185
|
|
183
|
-
|
186
|
+
## Credits
|
184
187
|
|
185
188
|
Developed by [Brooke Kuhlmann](https://www.alchemists.io) at
|
186
189
|
[Alchemists](https://www.alchemists.io).
|
data/lib/runcom/identity.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: runcom
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: 1.2.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Brooke Kuhlmann
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2017-
|
11
|
+
date: 2017-07-17 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: refinements
|
@@ -16,14 +16,14 @@ dependencies:
|
|
16
16
|
requirements:
|
17
17
|
- - "~>"
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version: '4.
|
19
|
+
version: '4.2'
|
20
20
|
type: :runtime
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
24
|
- - "~>"
|
25
25
|
- !ruby/object:Gem::Version
|
26
|
-
version: '4.
|
26
|
+
version: '4.2'
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: rake
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
@@ -44,14 +44,14 @@ dependencies:
|
|
44
44
|
requirements:
|
45
45
|
- - "~>"
|
46
46
|
- !ruby/object:Gem::Version
|
47
|
-
version: '
|
47
|
+
version: '10.0'
|
48
48
|
type: :development
|
49
49
|
prerelease: false
|
50
50
|
version_requirements: !ruby/object:Gem::Requirement
|
51
51
|
requirements:
|
52
52
|
- - "~>"
|
53
53
|
- !ruby/object:Gem::Version
|
54
|
-
version: '
|
54
|
+
version: '10.0'
|
55
55
|
- !ruby/object:Gem::Dependency
|
56
56
|
name: pry
|
57
57
|
requirement: !ruby/object:Gem::Requirement
|
@@ -136,6 +136,20 @@ dependencies:
|
|
136
136
|
- - "~>"
|
137
137
|
- !ruby/object:Gem::Version
|
138
138
|
version: '0.1'
|
139
|
+
- !ruby/object:Gem::Dependency
|
140
|
+
name: git-cop
|
141
|
+
requirement: !ruby/object:Gem::Requirement
|
142
|
+
requirements:
|
143
|
+
- - "~>"
|
144
|
+
- !ruby/object:Gem::Version
|
145
|
+
version: '1.3'
|
146
|
+
type: :development
|
147
|
+
prerelease: false
|
148
|
+
version_requirements: !ruby/object:Gem::Requirement
|
149
|
+
requirements:
|
150
|
+
- - "~>"
|
151
|
+
- !ruby/object:Gem::Version
|
152
|
+
version: '1.3'
|
139
153
|
- !ruby/object:Gem::Dependency
|
140
154
|
name: reek
|
141
155
|
requirement: !ruby/object:Gem::Requirement
|