lambom 0.2.0 → 0.2.1

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: c375eb59a2e1b3e2aa66691462d50f1bb86f211a
4
- data.tar.gz: dd8e2a46cbf1af121d43ea8e0eaf7b302c250aaa
3
+ metadata.gz: 3b02a1fe9df37c0656988197eb6be6c988a96b46
4
+ data.tar.gz: e2098057cdd281af5e151514c925ad5e6ba0b61d
5
5
  SHA512:
6
- metadata.gz: 4fc4d9e1dc9b82f1889fef4720cdb12022c13ce186da39a3cb98e3ae86c9dd5b5031b91146da33df969fd960eab430127e210c2f3a7bf4e872b0b254005a70a2
7
- data.tar.gz: 73d8d2f347336b24d39f8594c05894b2990f51ca7150817ca1449b80079b6311812400a6ceb4783cfc4abd3ab4997df68531b462daf426c033cf13d2299f85d6
6
+ metadata.gz: b84d6bda96d4cd85c6f2838a71ba4ab3c9d20a0d2b9fc845d3b04d7b49ee4a134f06c620f8d3160d0838eb7f7b5ae279af7c64006378e9fb59ae4dbc8489b28a
7
+ data.tar.gz: 1a01a15d9ef8ce3a1d3e230e0fa55cca927b7b1764d515249b91247024fe6e8dfde50c0207d182bec8fa6703bbd1e15fe9a06ee91cd60918a2a104987784d685
data/bin/lambom CHANGED
@@ -1,6 +1,7 @@
1
1
  #!/usr/bin/env ruby
2
2
 
3
3
  require 'lambom'
4
+ require 'lambom/version'
4
5
  require 'optparse'
5
6
 
6
7
  # -e environment
@@ -37,6 +38,11 @@ OptionParser.new do |opts|
37
38
  "Set loglevel") do |l|
38
39
  options[:loglevel] = l
39
40
  end
41
+
42
+ opts.on_tail("-v", "--version", "Show version") do
43
+ puts Lambom::VERSION
44
+ exit
45
+ end
40
46
 
41
47
  end.parse!
42
48
 
data/lambom.gemspec CHANGED
@@ -1,6 +1,11 @@
1
+ # -*- encoding: utf-8 -*-
2
+ lib = File.expand_path('../lib', __FILE__)
3
+ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
4
+ require "lambom/version"
5
+
1
6
  Gem::Specification.new do |s|
2
7
  s.name = 'lambom'
3
- s.version = '0.2.0'
8
+ s.version = Lambom::VERSION
4
9
  s.date = '2013-12-17'
5
10
  s.summary = "Tool to apply riyic configurations"
6
11
  s.description = "Riyic is a server configuration service based on chef (http://riyic.com). The lambom gem is a tool to apply, through chef-solo, your riyic configurations in your server"
data/lib/lambom/config.rb CHANGED
@@ -30,13 +30,16 @@ module Lambom
30
30
  raise "Error loading yaml config file #{FILE}, syntax error in line #{$1}"
31
31
  end
32
32
 
33
- puts h.inspect if $debug
33
+ puts "hash de opcions: #{h.inspect}" if $debug
34
34
 
35
- h.each do |k,v|
36
- if validate(k,v)
37
- instance_variable_set "@#{k}".to_sym, v
38
- else
39
- raise "Invalid value '#{v}' to parameter '#{k}'"
35
+ # evitamos cargar as opcions si non e un hash
36
+ if h.class == Hash
37
+ h.each do |k,v|
38
+ if validate(k,v)
39
+ instance_variable_set "@#{k}".to_sym, v
40
+ else
41
+ raise "Invalid value '#{v}' to parameter '#{k}'"
42
+ end
40
43
  end
41
44
  end
42
45
 
@@ -0,0 +1,3 @@
1
+ module Lambom
2
+ VERSION = "0.2.1"
3
+ end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: lambom
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.0
4
+ version: 0.2.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - J. Gomez
@@ -72,6 +72,7 @@ files:
72
72
  - lib/lambom/config_static.rb
73
73
  - lib/lambom/converger.rb
74
74
  - lib/lambom/shell_mixin.rb
75
+ - lib/lambom/version.rb
75
76
  - spec/api_client_spec.rb
76
77
  - spec/config_spec.rb
77
78
  - spec/converger_spec.rb