bmc-daemon-lib 0.5.1 → 0.5.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +2 -2
- data/bmc-daemon-lib.gemspec +1 -1
- data/lib/bmc-daemon-lib/conf.rb +11 -5
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 2ddcc817ee80f36f44c6f1d09ce65f22b62ad098
|
4
|
+
data.tar.gz: 738b5f166e3c1427af3146ef2af8bcb37f33a4eb
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 6b18a234dcfb0dca1f8c5e9b99cd31245b009aa9bdc8131431d92b1f29448b5dbe7951214145d43198c41680a5a1d1627429bef03a02fb26daf1bcc41e2f4ea9
|
7
|
+
data.tar.gz: de31a6793da38fb8b5113acf80aca05663922398befde420a4e2909a3a83109bcf6d617b895523bef2a209c666292979836bf695f04e2a9d9c64a8739ff19b71
|
data/Gemfile.lock
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
bmc-daemon-lib (0.5.
|
4
|
+
bmc-daemon-lib (0.5.2)
|
5
5
|
chamber (~> 2.9.1)
|
6
6
|
|
7
7
|
GEM
|
@@ -26,7 +26,7 @@ GEM
|
|
26
26
|
diff-lcs (>= 1.2.0, < 2.0)
|
27
27
|
rspec-support (~> 3.5.0)
|
28
28
|
rspec-support (3.5.0)
|
29
|
-
thor (0.19.
|
29
|
+
thor (0.19.4)
|
30
30
|
|
31
31
|
PLATFORMS
|
32
32
|
ruby
|
data/bmc-daemon-lib.gemspec
CHANGED
data/lib/bmc-daemon-lib/conf.rb
CHANGED
@@ -5,8 +5,10 @@ module BmcDaemonLib
|
|
5
5
|
class ConfigMissingParameter < StandardError; end
|
6
6
|
class ConfigOtherError < StandardError; end
|
7
7
|
class ConfigParseError < StandardError; end
|
8
|
-
|
9
|
-
class
|
8
|
+
|
9
|
+
class ConfigGemspecNotUnique < StandardError; end
|
10
|
+
class ConfigGemspecMissing < StandardError; end
|
11
|
+
class ConfigGemspecInvalid < StandardError; end
|
10
12
|
|
11
13
|
class Conf
|
12
14
|
extend Chamber
|
@@ -37,14 +39,18 @@ module BmcDaemonLib
|
|
37
39
|
|
38
40
|
# Store and clean app_root
|
39
41
|
@app_root = File.expand_path(app_root)
|
42
|
+
gemspec_path = "#{@app_root}/*.gemspec"
|
40
43
|
|
41
44
|
# Try to find any gemspec file
|
42
|
-
matches = Dir[
|
43
|
-
fail
|
44
|
-
fail
|
45
|
+
matches = Dir[gemspec_path]
|
46
|
+
fail ConfigGemspecMissing, "gemspec file not found: #{gemspec_path}" if matches.size < 1
|
47
|
+
fail ConfigGemspecNotUnique, "gemspec file not found: #{gemspec_path}" if matches.size > 1
|
45
48
|
|
46
49
|
# Load Gemspec (just the only match)
|
47
50
|
@spec = Gem::Specification::load(matches.first)
|
51
|
+
fail ConfigGemspecInvalid, "gemspec not readable: #{gemspec_path}" unless @spec
|
52
|
+
|
53
|
+
# Extract useful information from gemspec
|
48
54
|
@app_name = @spec.name
|
49
55
|
@app_ver = @spec.version
|
50
56
|
fail ConfigMissingParameter, "gemspec: missing name" unless @app_name
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: bmc-daemon-lib
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.5.
|
4
|
+
version: 0.5.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Bruno MEDICI
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-11-
|
11
|
+
date: 2016-11-29 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|