foreman 0.33.0 → 0.33.1

Sign up to get free protection for your applications and to get access to all the features.
@@ -26,7 +26,7 @@ private ######################################################################
26
26
  def export_template(exporter, file, template_root)
27
27
  if template_root && File.exist?(file_path = File.join(template_root, file))
28
28
  File.read(file_path)
29
- elsif File.exist?(file_path = File.join("~/.foreman/templates", file))
29
+ elsif File.exist?(file_path = File.expand_path(File.join("~/.foreman/templates", file)))
30
30
  File.read(file_path)
31
31
  else
32
32
  File.read(File.expand_path("../../../../data/export/#{exporter}/#{file}", __FILE__))
@@ -1,5 +1,5 @@
1
1
  module Foreman
2
2
 
3
- VERSION = "0.33.0"
3
+ VERSION = "0.33.1"
4
4
 
5
5
  end
@@ -38,13 +38,19 @@ describe Foreman::Export::Upstart do
38
38
  end
39
39
 
40
40
  context "with alternate templates from home dir" do
41
- let(:default_template_root) {File.expand_path("~/.foreman/templates")}
41
+ let(:default_template_root) {File.expand_path("#{ENV['HOME']}/.foreman/templates")}
42
42
 
43
43
  before do
44
+ ENV['_FOREMAN_SPEC_HOME'] = ENV['HOME']
45
+ ENV['HOME'] = "/home/appuser"
44
46
  FileUtils.mkdir_p default_template_root
45
47
  File.open("#{default_template_root}/master.conf.erb", "w") { |f| f.puts "default_alternate_template" }
46
48
  end
47
49
 
50
+ after do
51
+ ENV['HOME'] = ENV.delete('_FOREMAN_SPEC_HOME')
52
+ end
53
+
48
54
  it "can export with alternate template files" do
49
55
  upstart.export("/tmp/init")
50
56
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: foreman
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.33.0
4
+ version: 0.33.1
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,11 +9,11 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2012-01-15 00:00:00.000000000Z
12
+ date: 2012-01-16 00:00:00.000000000Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: term-ansicolor
16
- requirement: &70101276882040 !ruby/object:Gem::Requirement
16
+ requirement: &70338325254740 !ruby/object:Gem::Requirement
17
17
  none: false
18
18
  requirements:
19
19
  - - ~>
@@ -21,10 +21,10 @@ dependencies:
21
21
  version: 1.0.5
22
22
  type: :runtime
23
23
  prerelease: false
24
- version_requirements: *70101276882040
24
+ version_requirements: *70338325254740
25
25
  - !ruby/object:Gem::Dependency
26
26
  name: thor
27
- requirement: &70101276881540 !ruby/object:Gem::Requirement
27
+ requirement: &70338325254240 !ruby/object:Gem::Requirement
28
28
  none: false
29
29
  requirements:
30
30
  - - ! '>='
@@ -32,7 +32,7 @@ dependencies:
32
32
  version: 0.13.6
33
33
  type: :runtime
34
34
  prerelease: false
35
- version_requirements: *70101276881540
35
+ version_requirements: *70338325254240
36
36
  description: Process manager for applications with multiple components
37
37
  email: ddollar@gmail.com
38
38
  executables:
@@ -107,7 +107,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
107
107
  version: '0'
108
108
  segments:
109
109
  - 0
110
- hash: -2609304573827538658
110
+ hash: -3163485577620200285
111
111
  required_rubygems_version: !ruby/object:Gem::Requirement
112
112
  none: false
113
113
  requirements:
@@ -116,7 +116,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
116
116
  version: '0'
117
117
  segments:
118
118
  - 0
119
- hash: -2609304573827538658
119
+ hash: -3163485577620200285
120
120
  requirements: []
121
121
  rubyforge_project:
122
122
  rubygems_version: 1.8.10