semi 0.8.3 → 0.8.4

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: 580eb8d376ba4101f2e2c84662ccf5869565ff85
4
- data.tar.gz: 1a83723ef50b5e35b8618df4082fd46cd6c4b8fe
3
+ metadata.gz: 5bc21f6ccccb763a2d3ffc99cf625d05d766e511
4
+ data.tar.gz: c2fea7c8160eb82fdcc506993c4960d4819eaeb2
5
5
  SHA512:
6
- metadata.gz: 8cebb91f0dc58ef4f1e51f46265b53b25f6100dd831c1df7969251bbfea83bd3a5a1a5b11beabc034996d79efa9402ff34b93720a0d47441933496bb0befc73e
7
- data.tar.gz: 71f9fa49b0a91815b61b0dd5fa2bfa897e2dba917e367c507104e0a10154f2da99ce0db09ae9f3de59e7335ee03884f604b206aef8aa163d038c0928f9fc115c
6
+ metadata.gz: 990ce480611215d92c1985c022a71365d295abbd7462612342719f278977381224a8df03ee1934884e5153f0635e69edd0cf91e4cc3e1c14bd83efd10b02c5fa
7
+ data.tar.gz: 4c1bc66743db93d4b4ce51479427bc1c981c2bbeba096aba7420e440d2656c0f84ee370120c5d3ac5a320d8d3c0fb11b98ca3a2e7535bfa1bf506e1131633376
data/bin/semi CHANGED
@@ -7,4 +7,4 @@ config_file = ENV['SEMI_CONF'] || '/etc/semi.conf'
7
7
 
8
8
  s = Semi::Driver.new(config_file)
9
9
 
10
- s.start
10
+ s.start(ARGV)
data/lib/semi/config.rb CHANGED
@@ -20,7 +20,13 @@ module Semi
20
20
  end
21
21
 
22
22
  def load(path)
23
- data = YAML.load_file(path)
23
+ begin
24
+ data = YAML.load_file(path)
25
+ rescue Errno::ENOENT
26
+ $stderr.puts "Unable to read #{path}"
27
+ exit(1)
28
+ end
29
+
24
30
  if data.key? 'defaults'
25
31
  @defaults = data['defaults']
26
32
  end
data/lib/semi/driver.rb CHANGED
@@ -8,7 +8,7 @@ module Semi
8
8
  @config = Semi::Config.new(path)
9
9
  end
10
10
 
11
- def start
11
+ def start(args)
12
12
  # Initialize the dictionary with the defaults
13
13
  @dictionary = {}
14
14
  @config.defaults.each_pair do |name,val|
@@ -59,7 +59,9 @@ module Semi
59
59
  @dictionary.each_pair {|k,v| ENV[k.to_s] = v.to_s}
60
60
 
61
61
  # Check for pre-defined commands
62
- args = ARGV
62
+ if ENV['SEMI_DEBUG']
63
+ puts "Semi debug:: args = #{args.inspect}"
64
+ end
63
65
  if args.count == 0 and @config.commands.include? 'default'
64
66
  args = @config.commands['default']
65
67
  elsif args.count == 1 and args[0] == 'help'
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: semi
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.8.3
4
+ version: 0.8.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Gerard Hickey
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2017-06-26 00:00:00.000000000 Z
11
+ date: 2019-01-12 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rake
@@ -115,7 +115,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
115
115
  version: '0'
116
116
  requirements: []
117
117
  rubyforge_project:
118
- rubygems_version: 2.4.8
118
+ rubygems_version: 2.5.2.3
119
119
  signing_key:
120
120
  specification_version: 4
121
121
  summary: Versatile Docker entrypoint script allowing the creation of configuration