chef-solo-wrapper 0.0.16 → 0.0.17

Sign up to get free protection for your applications and to get access to all the features.
Files changed (2) hide show
  1. data/lib/config_helper.rb +9 -3
  2. metadata +5 -4
@@ -82,9 +82,10 @@ class ConfigHelper < ChefSoloWrapper
82
82
  install_chef_opscode_apt
83
83
  return
84
84
  when 'CentOS'
85
- puts 'Needs testing.'
86
- # on centos/el/redhat
87
- #system("sudo yum -y install libxml2 libxml2-devel libxslt-devel")
85
+ @l.log 'Installing native extensions build dependencies...'
86
+ system("sudo yum -y install libxml2 libxml2-devel libxslt-devel")
87
+ @l.log '[gem] Install Chef from RubyGem...'
88
+ system("sudo gem install chef --no-rdoc --no-ri")
88
89
  else
89
90
  puts " DEBUG: == RubyGems Sources ==\n#{`gem sources`}\n==\n" if @debug
90
91
  @l.log 'Installing Chef RubyGem...'
@@ -154,6 +155,7 @@ class ConfigHelper < ChefSoloWrapper
154
155
  $/ = "EOF"
155
156
  json = STDIN.gets
156
157
  end
158
+ Dir.mkdir('/etc/chef') unless File.exists?('/etc/chef')
157
159
  File.open(file, "w") {|f| f.write json.gsub('EOF', '')}
158
160
  end
159
161
 
@@ -169,6 +171,10 @@ class ConfigHelper < ChefSoloWrapper
169
171
  end
170
172
  if install_rc.downcase == 'y'
171
173
  @l.log 'Installing rest_connection RubyGem...'
174
+ # installing deps for native extensions building
175
+ # manual libiconv install
176
+
177
+ system("(type -P yum >/dev/null && sudo yum -y install libxml2 libxml2-devel libxslt-devel rubygem-nokogiri) || (type -P apt-get >/dev/null && sudo apt-get -y install libxml2 libxml2-dev libxslt-dev)")
172
178
  install_rubygem('rest_connection')
173
179
  end
174
180
  end
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: chef-solo-wrapper
3
3
  version: !ruby/object:Gem::Version
4
- hash: 63
4
+ hash: 61
5
5
  prerelease:
6
6
  segments:
7
7
  - 0
8
8
  - 0
9
- - 16
10
- version: 0.0.16
9
+ - 17
10
+ version: 0.0.17
11
11
  platform: ruby
12
12
  authors:
13
13
  - Chris Fordham
@@ -15,7 +15,7 @@ autorequire:
15
15
  bindir: bin
16
16
  cert_chain: []
17
17
 
18
- date: 2012-06-04 00:00:00 Z
18
+ date: 2012-10-12 00:00:00 Z
19
19
  dependencies:
20
20
  - !ruby/object:Gem::Dependency
21
21
  name: json
@@ -104,3 +104,4 @@ specification_version: 3
104
104
  summary: chef-solo-wrapper
105
105
  test_files: []
106
106
 
107
+ has_rdoc: