runcom 1.2.0 → 1.3.0

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 95605d459868a8f22b027950497882bf06a5503e
4
- data.tar.gz: 6cfb7d798e5a9477082cb6056a3deb3b500110fc
3
+ metadata.gz: b2ccaa8201b2c6c84be1ea946a8b9a8f48b36e63
4
+ data.tar.gz: 26ea067749cd928073024f1e57341fcb4bc3649c
5
5
  SHA512:
6
- metadata.gz: 8f1db1b1db39582a76ff9f00e8b49858f29f8eaff0a72ccbfb40fc76da002d5949434e7b116831709c3e07a2c797819049a5d964dc28f274b1780f66396738fa
7
- data.tar.gz: 52582c7528ba3f2ca35e19e27fcd5da9303e605a568abda48895195075c9c8e5e4fd00c955c23be11a4e2e8071d288541d9067787bb53c004397b4775b36d81a
6
+ metadata.gz: c33c2cdac04ed12327ae5bdd4849a622ed641fb21026c3db891ac1b7649ec3146c171aa58f22e2e1273213a1d23b5f640e33943f6fce55ceda8c9076b5aa4fa3
7
+ data.tar.gz: bf190721b4720e93f64da69ef2838d07ca3113165290e6369e8bd6358e795518d6f6f7f4423669715e66179301301319b81f8cb0fe261eea1c56c2524fda02fe
checksums.yaml.gz.sig ADDED
Binary file
@@ -14,7 +14,7 @@ module Runcom
14
14
  def initialize project_name:, file_name: "configuration.yml", defaults: {}
15
15
  @path = load_path project_name, file_name
16
16
  @defaults = defaults
17
- @settings = defaults.deep_merge load_settings
17
+ @settings = defaults.deep_merge process_settings
18
18
  end
19
19
 
20
20
  def merge custom_settings
@@ -37,6 +37,12 @@ module Runcom
37
37
  def load_settings
38
38
  yaml = YAML.load_file path
39
39
  yaml.is_a?(Hash) ? yaml : {}
40
+ end
41
+
42
+ def process_settings
43
+ load_settings
44
+ rescue Psych::SyntaxError => error
45
+ raise Errors::Syntax, error.message
40
46
  rescue
41
47
  defaults
42
48
  end
@@ -0,0 +1,9 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Runcom
4
+ module Errors
5
+ # The default class for all gem related errors.
6
+ class Base < StandardError
7
+ end
8
+ end
9
+ end
@@ -0,0 +1,12 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Runcom
4
+ module Errors
5
+ # The error class for YAML-related exceptions.
6
+ class Syntax < Base
7
+ def message
8
+ "Invalid configuration #{super}."
9
+ end
10
+ end
11
+ end
12
+ end
@@ -12,7 +12,7 @@ module Runcom
12
12
  end
13
13
 
14
14
  def self.version
15
- "1.2.0"
15
+ "1.3.0"
16
16
  end
17
17
 
18
18
  def self.version_label
data/lib/runcom.rb CHANGED
@@ -1,5 +1,7 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  require "runcom/identity"
4
+ require "runcom/errors/base"
5
+ require "runcom/errors/syntax"
4
6
  require "runcom/xdg/configuration"
5
7
  require "runcom/configuration"
data.tar.gz.sig ADDED
Binary file
metadata CHANGED
@@ -1,14 +1,36 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: runcom
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.2.0
4
+ version: 1.3.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Brooke Kuhlmann
8
8
  autorequire:
9
9
  bindir: bin
10
- cert_chain: []
11
- date: 2017-07-17 00:00:00.000000000 Z
10
+ cert_chain:
11
+ - |
12
+ -----BEGIN CERTIFICATE-----
13
+ MIIDeDCCAmCgAwIBAgIBATANBgkqhkiG9w0BAQUFADBBMQ8wDQYDVQQDDAZicm9v
14
+ a2UxGjAYBgoJkiaJk/IsZAEZFgphbGNoZW1pc3RzMRIwEAYKCZImiZPyLGQBGRYC
15
+ aW8wHhcNMTYxMDE5MTY0NDEzWhcNMTcxMDE5MTY0NDEzWjBBMQ8wDQYDVQQDDAZi
16
+ cm9va2UxGjAYBgoJkiaJk/IsZAEZFgphbGNoZW1pc3RzMRIwEAYKCZImiZPyLGQB
17
+ GRYCaW8wggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQCgryPL4/IbWDcL
18
+ fnqpnoJALqj+ega7hSsvvD8sac57HPNLeKcOmSafFiQLAnTmmE132ZlFc8kyZRVn
19
+ zmqSESowO5jd+ggFuy1ySqQJXhwgik04KedKRUjpIDZePrjw+M5UJT1qzKCKL2xI
20
+ nx5cOKP1fSWJ1RRu8JhaDeSloGtYMdw2c28wnKPNIsWDood4xhbLcY9IqeISft2e
21
+ oTAHTHandHbvt24X3/n67ceNjLBbsVZPXCC1C8C8ccjHjA4Tm2uiFoDwThMcPggg
22
+ 90H6fh0vLFcNAobdPEchbge8tWtfmMPz2+C4yklANn81GA+ANsBS1uwx6mxJoMQU
23
+ BNVp0aLvAgMBAAGjezB5MAkGA1UdEwQCMAAwCwYDVR0PBAQDAgSwMB0GA1UdDgQW
24
+ BBRS85Rn1BaqeIONByw4t46DMDMzHDAfBgNVHREEGDAWgRRicm9va2VAYWxjaGVt
25
+ aXN0cy5pbzAfBgNVHRIEGDAWgRRicm9va2VAYWxjaGVtaXN0cy5pbzANBgkqhkiG
26
+ 9w0BAQUFAAOCAQEAZMb57Y4wdpbX8XxTukEO7VC1pndccUsxdbziGsAOiuHET3Aq
27
+ ygLvrfdYrN88/w+qxncW5bxbO3a6UGkuhIFUPM8zRSE/rh6bCcJljTJrExVt42eV
28
+ aYCb7WJNsx3eNXHn3uQodq3tD+lmNJzz2bFeT3smGSKEnALBjqorO/2mpDh4FJ3S
29
+ 4CcDYsJ1ywep8LDJDBBGdKz9moL+axryzpeTpgTT/fFYFzRzWrURPyDvPOikh9TX
30
+ n/LUZ1dKhIHzfKx1B4+TEIefArObGfkLIDM8+Dq1RX7TF1k81Men7iu4MgE9bYBn
31
+ 3dE+xI3FdB5gWcdWxdtgRCmWjtXeYYyb4z6NQQ==
32
+ -----END CERTIFICATE-----
33
+ date: 2017-08-20 00:00:00.000000000 Z
12
34
  dependencies:
13
35
  - !ruby/object:Gem::Dependency
14
36
  name: refinements
@@ -44,14 +66,14 @@ dependencies:
44
66
  requirements:
45
67
  - - "~>"
46
68
  - !ruby/object:Gem::Version
47
- version: '10.0'
69
+ version: '10.2'
48
70
  type: :development
49
71
  prerelease: false
50
72
  version_requirements: !ruby/object:Gem::Requirement
51
73
  requirements:
52
74
  - - "~>"
53
75
  - !ruby/object:Gem::Version
54
- version: '10.0'
76
+ version: '10.2'
55
77
  - !ruby/object:Gem::Dependency
56
78
  name: pry
57
79
  requirement: !ruby/object:Gem::Requirement
@@ -142,14 +164,14 @@ dependencies:
142
164
  requirements:
143
165
  - - "~>"
144
166
  - !ruby/object:Gem::Version
145
- version: '1.3'
167
+ version: '1.5'
146
168
  type: :development
147
169
  prerelease: false
148
170
  version_requirements: !ruby/object:Gem::Requirement
149
171
  requirements:
150
172
  - - "~>"
151
173
  - !ruby/object:Gem::Version
152
- version: '1.3'
174
+ version: '1.5'
153
175
  - !ruby/object:Gem::Dependency
154
176
  name: reek
155
177
  requirement: !ruby/object:Gem::Requirement
@@ -205,6 +227,8 @@ files:
205
227
  - README.md
206
228
  - lib/runcom.rb
207
229
  - lib/runcom/configuration.rb
230
+ - lib/runcom/errors/base.rb
231
+ - lib/runcom/errors/syntax.rb
208
232
  - lib/runcom/identity.rb
209
233
  - lib/runcom/xdg/configuration.rb
210
234
  homepage: https://github.com/bkuhlmann/runcom
metadata.gz.sig ADDED
Binary file