lambom 0.3.1 → 0.3.5

Sign up to get free protection for your applications and to get access to all the features.
data/lambom.gemspec CHANGED
@@ -6,7 +6,7 @@ require "lambom/version"
6
6
  Gem::Specification.new do |s|
7
7
  s.name = 'lambom'
8
8
  s.version = Lambom::VERSION
9
- s.date = '2013-12-17'
9
+ s.date = '2013-12-23'
10
10
  s.summary = "Tool to apply riyic configurations"
11
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"
12
12
  s.authors = ["J. Gomez"]
@@ -56,8 +56,9 @@ EOF
56
56
  private
57
57
 
58
58
  def ejecutar_converger
59
+ name = conf.server || String.random(8)
59
60
 
60
- filename = "#{CACHE_PATH}/#{conf.server}.json"
61
+ filename = "#{CACHE_PATH}/#{name}.json"
61
62
  file = File.new(filename,"w")
62
63
  file.write(attributes_json)
63
64
  file.close
@@ -1,14 +1,19 @@
1
1
  require 'mixlib/shellout'
2
+ require 'securerandom'
2
3
 
3
4
  module Lambom
4
5
  module ShellMixin
6
+
7
+ DEFAULT_TIMEOUT = 12000
8
+
5
9
  def run_cmd(*cmd)
10
+ # Seteamos a 200min o timeout por defecto
6
11
 
7
- opts = {}
12
+ opts = {:timeout => DEFAULT_TIMEOUT}
8
13
 
9
14
  if $debug
10
15
  puts "RUN_CMD: #{cmd}"
11
- opts = {:live_stream => STDOUT}
16
+ opts[:live_stream] = STDOUT
12
17
  end
13
18
 
14
19
  com = Mixlib::ShellOut.new(cmd, opts)
@@ -19,5 +24,11 @@ module Lambom
19
24
  puts "output: #{com.stdout}" if $debug
20
25
  com.stdout
21
26
  end
27
+
28
+ class String
29
+ def self.random(n)
30
+ SecureRandom.hex(n)
31
+ end
32
+ end
22
33
  end
23
34
  end
@@ -1,3 +1,3 @@
1
1
  module Lambom
2
- VERSION = "0.3.1"
2
+ VERSION = "0.3.5"
3
3
  end
metadata CHANGED
@@ -1,18 +1,20 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: lambom
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.1
4
+ version: 0.3.5
5
+ prerelease:
5
6
  platform: ruby
6
7
  authors:
7
8
  - J. Gomez
8
9
  autorequire:
9
10
  bindir: bin
10
11
  cert_chain: []
11
- date: 2013-12-17 00:00:00.000000000 Z
12
+ date: 2013-12-23 00:00:00.000000000 Z
12
13
  dependencies:
13
14
  - !ruby/object:Gem::Dependency
14
15
  name: oj
15
16
  requirement: !ruby/object:Gem::Requirement
17
+ none: false
16
18
  requirements:
17
19
  - - ~>
18
20
  - !ruby/object:Gem::Version
@@ -20,6 +22,7 @@ dependencies:
20
22
  type: :runtime
21
23
  prerelease: false
22
24
  version_requirements: !ruby/object:Gem::Requirement
25
+ none: false
23
26
  requirements:
24
27
  - - ~>
25
28
  - !ruby/object:Gem::Version
@@ -27,6 +30,7 @@ dependencies:
27
30
  - !ruby/object:Gem::Dependency
28
31
  name: mixlib-authentication
29
32
  requirement: !ruby/object:Gem::Requirement
33
+ none: false
30
34
  requirements:
31
35
  - - ~>
32
36
  - !ruby/object:Gem::Version
@@ -34,6 +38,7 @@ dependencies:
34
38
  type: :runtime
35
39
  prerelease: false
36
40
  version_requirements: !ruby/object:Gem::Requirement
41
+ none: false
37
42
  requirements:
38
43
  - - ~>
39
44
  - !ruby/object:Gem::Version
@@ -41,6 +46,7 @@ dependencies:
41
46
  - !ruby/object:Gem::Dependency
42
47
  name: mixlib-shellout
43
48
  requirement: !ruby/object:Gem::Requirement
49
+ none: false
44
50
  requirements:
45
51
  - - ~>
46
52
  - !ruby/object:Gem::Version
@@ -48,6 +54,7 @@ dependencies:
48
54
  type: :runtime
49
55
  prerelease: false
50
56
  version_requirements: !ruby/object:Gem::Requirement
57
+ none: false
51
58
  requirements:
52
59
  - - ~>
53
60
  - !ruby/object:Gem::Version
@@ -55,6 +62,7 @@ dependencies:
55
62
  - !ruby/object:Gem::Dependency
56
63
  name: rspec
57
64
  requirement: !ruby/object:Gem::Requirement
65
+ none: false
58
66
  requirements:
59
67
  - - ~>
60
68
  - !ruby/object:Gem::Version
@@ -62,6 +70,7 @@ dependencies:
62
70
  type: :development
63
71
  prerelease: false
64
72
  version_requirements: !ruby/object:Gem::Requirement
73
+ none: false
65
74
  requirements:
66
75
  - - ~>
67
76
  - !ruby/object:Gem::Version
@@ -97,25 +106,26 @@ files:
97
106
  homepage: https://github.com/RIYIC/lambom
98
107
  licenses:
99
108
  - Apache-2.0
100
- metadata: {}
101
109
  post_install_message:
102
110
  rdoc_options: []
103
111
  require_paths:
104
112
  - lib
105
113
  required_ruby_version: !ruby/object:Gem::Requirement
114
+ none: false
106
115
  requirements:
107
- - - '>='
116
+ - - ! '>='
108
117
  - !ruby/object:Gem::Version
109
118
  version: '0'
110
119
  required_rubygems_version: !ruby/object:Gem::Requirement
120
+ none: false
111
121
  requirements:
112
- - - '>='
122
+ - - ! '>='
113
123
  - !ruby/object:Gem::Version
114
124
  version: '0'
115
125
  requirements: []
116
126
  rubyforge_project:
117
- rubygems_version: 2.1.11
127
+ rubygems_version: 1.8.24
118
128
  signing_key:
119
- specification_version: 4
129
+ specification_version: 3
120
130
  summary: Tool to apply riyic configurations
121
131
  test_files: []
checksums.yaml DELETED
@@ -1,7 +0,0 @@
1
- ---
2
- SHA1:
3
- metadata.gz: 350b4921477a12962e8c693f9205550d427fc3af
4
- data.tar.gz: 0f1a47f164fab67970f8b10fb005eb13a9b99a30
5
- SHA512:
6
- metadata.gz: 3f82923d56585ecb9d3d8337be224a84ce1f31d6874d95769a22bf70c56710a828b100e2cf89719ef890638465e6042185b5d04a59660d0ac37c051d48655af2
7
- data.tar.gz: 7bf448f675c69a365a316cb96268b90e10ba404426da7c0ce05f9a46fc727fd02cea167bf57148f0f0ac5eb1fee0cad7c01829b41399feccd980f86efcb7f62f