runcom 5.0.2 → 5.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- checksums.yaml.gz.sig +1 -3
- data.tar.gz.sig +0 -0
- data/lib/runcom/cache.rb +10 -1
- data/lib/runcom/config.rb +12 -5
- data/lib/runcom/data.rb +10 -3
- data/lib/runcom/identity.rb +1 -1
- data/lib/runcom/paths/friendly.rb +4 -0
- metadata +4 -18
- metadata.gz.sig +0 -0
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 17c7986ba58baa811d2d3d679cf76f4593e423ea473ca1a2e73e87f52e0f65f5
|
4
|
+
data.tar.gz: 6b46d51115e6ec117c9b824e2aa5aba5c048f84291a40e5f90a5dc7a6d025e84
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 5feb51c506a5a9d8e2685d5486baf36695c09b1ed6db364bac36194b3acc72ab8d69a90f853b5e79e205df63aed86a57ac9e7baab42c67b6557a4de829d54a58
|
7
|
+
data.tar.gz: 349661bf5d6752b8096201e6bb6cc68a5eebf6eca8b6b27e426ec2bfc394e3f606e02c0b26f3275e34ca3170ee617c427e09dce3c25db3f283ab1950fc63f70b
|
checksums.yaml.gz.sig
CHANGED
@@ -1,3 +1 @@
|
|
1
|
-
|
2
|
-
�M-���x��uŇ��3�l�K��HE��:��4��$��X������n�ϖC�Tn�%^��
|
3
|
-
��Q�}?���Ɣ�\l�+HZ���I�I_`���Y�(4s�V5�X�X��!�P�_R� ���g"o��X�-+=\PԬ��P�
|
1
|
+
�!�r��HsMp����q��?.oL���'Dm�)M�I�"�S_�ӶP!�oRX��W��frÎd�A��4�G�.A�zSJ`3�}`�h�c&�bG�m6�y�a��^cð�5"�A�u�P��W�ht�;Z��E��xB� 2B"�&cR,+�
|
data.tar.gz.sig
CHANGED
Binary file
|
data/lib/runcom/cache.rb
CHANGED
@@ -3,11 +3,16 @@
|
|
3
3
|
module Runcom
|
4
4
|
# A developer friendly wrapper of XDG cache.
|
5
5
|
Cache = Struct.new :name, :home, :environment, keyword_init: true do
|
6
|
+
extend Forwardable
|
7
|
+
|
8
|
+
delegate %i[inspect] => :cache
|
9
|
+
|
6
10
|
def initialize *arguments
|
7
11
|
super
|
8
12
|
|
9
13
|
self[:home] ||= Runcom::Paths::Friendly
|
10
14
|
self[:environment] ||= ENV
|
15
|
+
@cache = XDG::Cache.new home: home, environment: environment
|
11
16
|
freeze
|
12
17
|
end
|
13
18
|
|
@@ -16,7 +21,11 @@ module Runcom
|
|
16
21
|
end
|
17
22
|
|
18
23
|
def paths
|
19
|
-
|
24
|
+
cache.all
|
20
25
|
end
|
26
|
+
|
27
|
+
private
|
28
|
+
|
29
|
+
attr_reader :cache
|
21
30
|
end
|
22
31
|
end
|
data/lib/runcom/config.rb
CHANGED
@@ -4,28 +4,35 @@ require "pathname"
|
|
4
4
|
require "yaml"
|
5
5
|
require "refinements/hashes"
|
6
6
|
|
7
|
+
# :reek:TooManyInstanceVariables
|
7
8
|
module Runcom
|
8
9
|
# A developer friendly wrapper of XDG config.
|
9
10
|
class Config
|
11
|
+
extend Forwardable
|
10
12
|
using Refinements::Hashes
|
11
13
|
|
12
14
|
DEFAULT_FILE_NAME = "configuration.yml"
|
13
15
|
|
14
|
-
|
16
|
+
delegate %i[inspect] => :config
|
17
|
+
|
18
|
+
# rubocop:disable Metrics/ParameterLists
|
19
|
+
def initialize name, environment: ENV, file_name: DEFAULT_FILE_NAME, defaults: {}
|
15
20
|
@name = name
|
21
|
+
@environment = environment
|
16
22
|
@file_name = file_name
|
17
23
|
@defaults = defaults
|
24
|
+
@config = XDG::Config.new home: Runcom::Paths::Friendly, environment: environment
|
18
25
|
@settings = defaults.deep_merge process_settings
|
26
|
+
freeze
|
19
27
|
end
|
28
|
+
# rubocop:enable Metrics/ParameterLists
|
20
29
|
|
21
30
|
def path
|
22
31
|
paths.find(&:exist?)
|
23
32
|
end
|
24
33
|
|
25
34
|
def paths
|
26
|
-
|
27
|
-
Pathname "#{root}/#{name}/#{file_name}"
|
28
|
-
end
|
35
|
+
config.all.map { |root| Pathname "#{root}/#{name}/#{file_name}" }
|
29
36
|
end
|
30
37
|
|
31
38
|
def merge other
|
@@ -49,7 +56,7 @@ module Runcom
|
|
49
56
|
|
50
57
|
private
|
51
58
|
|
52
|
-
attr_reader :name, :file_name, :defaults, :settings
|
59
|
+
attr_reader :name, :environment, :file_name, :defaults, :settings, :config
|
53
60
|
|
54
61
|
def process_settings
|
55
62
|
load_settings
|
data/lib/runcom/data.rb
CHANGED
@@ -5,11 +5,16 @@ require "pathname"
|
|
5
5
|
module Runcom
|
6
6
|
# A developer friendly wrapper of XDG data.
|
7
7
|
Data = Struct.new :name, :home, :environment, keyword_init: true do
|
8
|
+
extend Forwardable
|
9
|
+
|
10
|
+
delegate %i[inspect] => :data
|
11
|
+
|
8
12
|
def initialize *arguments
|
9
13
|
super
|
10
14
|
|
11
15
|
self[:home] ||= Runcom::Paths::Friendly
|
12
16
|
self[:environment] ||= ENV
|
17
|
+
@data = XDG::Data.new home: home, environment: environment
|
13
18
|
freeze
|
14
19
|
end
|
15
20
|
|
@@ -18,9 +23,11 @@ module Runcom
|
|
18
23
|
end
|
19
24
|
|
20
25
|
def paths
|
21
|
-
|
22
|
-
Pathname "#{root}/#{name}"
|
23
|
-
end
|
26
|
+
data.all.map { |root| Pathname "#{root}/#{name}" }
|
24
27
|
end
|
28
|
+
|
29
|
+
private
|
30
|
+
|
31
|
+
attr_reader :data
|
25
32
|
end
|
26
33
|
end
|
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: 5.0
|
4
|
+
version: 5.1.0
|
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: 2019-
|
31
|
+
date: 2019-10-01 00:00:00.000000000 Z
|
32
32
|
dependencies:
|
33
33
|
- !ruby/object:Gem::Dependency
|
34
34
|
name: refinements
|
@@ -50,14 +50,14 @@ dependencies:
|
|
50
50
|
requirements:
|
51
51
|
- - "~>"
|
52
52
|
- !ruby/object:Gem::Version
|
53
|
-
version: '3.
|
53
|
+
version: '3.1'
|
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: '3.
|
60
|
+
version: '3.1'
|
61
61
|
- !ruby/object:Gem::Dependency
|
62
62
|
name: bundler-audit
|
63
63
|
requirement: !ruby/object:Gem::Requirement
|
@@ -72,20 +72,6 @@ dependencies:
|
|
72
72
|
- - "~>"
|
73
73
|
- !ruby/object:Gem::Version
|
74
74
|
version: '0.6'
|
75
|
-
- !ruby/object:Gem::Dependency
|
76
|
-
name: climate_control
|
77
|
-
requirement: !ruby/object:Gem::Requirement
|
78
|
-
requirements:
|
79
|
-
- - "~>"
|
80
|
-
- !ruby/object:Gem::Version
|
81
|
-
version: '0.1'
|
82
|
-
type: :development
|
83
|
-
prerelease: false
|
84
|
-
version_requirements: !ruby/object:Gem::Requirement
|
85
|
-
requirements:
|
86
|
-
- - "~>"
|
87
|
-
- !ruby/object:Gem::Version
|
88
|
-
version: '0.1'
|
89
75
|
- !ruby/object:Gem::Dependency
|
90
76
|
name: gemsmith
|
91
77
|
requirement: !ruby/object:Gem::Requirement
|
metadata.gz.sig
CHANGED
Binary file
|