engineyard-serverside 1.4.11 → 1.4.12
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.
- data/lib/engineyard-serverside.rb +27 -10
- data/lib/engineyard-serverside/version.rb +1 -1
- data/spec/fixtures/gitrepo/bar +0 -0
- data/spec/fixtures/gitrepo/foo +0 -0
- data/spec/real_deploy_spec.rb +1 -1
- data/spec/spec_helper.rb +1 -2
- metadata +19 -13
@@ -1,3 +1,12 @@
|
|
1
|
+
if String.instance_methods.include?(:force_encoding)
|
2
|
+
$string_encodings = true
|
3
|
+
else
|
4
|
+
# KCODE is gone in 1.9-like implementations, but we
|
5
|
+
# still need to set it for 1.8.
|
6
|
+
$KCODE = 'U'
|
7
|
+
$string_encodings = false
|
8
|
+
end
|
9
|
+
|
1
10
|
$LOAD_PATH.unshift File.expand_path('vendor/thor/lib', File.dirname(__FILE__))
|
2
11
|
$LOAD_PATH.unshift File.expand_path('vendor/open4/lib', File.dirname(__FILE__))
|
3
12
|
$LOAD_PATH.unshift File.expand_path('vendor/escape/lib', File.dirname(__FILE__))
|
@@ -22,22 +31,17 @@ require 'engineyard-serverside/deprecation'
|
|
22
31
|
|
23
32
|
module EY
|
24
33
|
module Serverside
|
25
|
-
|
34
|
+
RemoteFailure = Class.new StandardError
|
35
|
+
|
26
36
|
def self.node
|
27
37
|
@node ||= deep_indifferentize(JSON.parse(dna_json))
|
28
38
|
end
|
29
39
|
|
30
40
|
def self.dna_json
|
31
|
-
@dna_json ||=
|
32
|
-
`sudo cat /etc/chef/dna.json`
|
33
|
-
else
|
34
|
-
{}.to_json
|
35
|
-
end
|
41
|
+
@dna_json ||= read_encoded_dna
|
36
42
|
end
|
37
43
|
|
38
|
-
|
39
|
-
|
40
|
-
private
|
44
|
+
private # doesn't work how people think, but hey..
|
41
45
|
def self.deep_indifferentize(thing)
|
42
46
|
if thing.kind_of?(Hash)
|
43
47
|
indifferent_hash = Thor::CoreExt::HashWithIndifferentAccess.new
|
@@ -51,6 +55,19 @@ module EY
|
|
51
55
|
thing
|
52
56
|
end
|
53
57
|
end
|
54
|
-
|
58
|
+
|
59
|
+
def self.dna_path
|
60
|
+
'/etc/chef/dna.json'
|
61
|
+
end
|
62
|
+
|
63
|
+
def self.read_encoded_dna
|
64
|
+
json = if File.exist?(dna_path)
|
65
|
+
`sudo cat #{dna_path}`
|
66
|
+
else
|
67
|
+
'{}'
|
68
|
+
end
|
69
|
+
json.force_encoding('UTF-8') if $string_encodings
|
70
|
+
json
|
71
|
+
end
|
55
72
|
end
|
56
73
|
end
|
File without changes
|
File without changes
|
data/spec/real_deploy_spec.rb
CHANGED
@@ -151,7 +151,7 @@ describe "deploying an application" do
|
|
151
151
|
|
152
152
|
# pretend there is a shared bundled_gems directory
|
153
153
|
FileUtils.mkdir_p(File.join(@deploy_dir, 'shared', 'bundled_gems'))
|
154
|
-
%w(RUBY_VERSION SYSTEM_VERSION).each do |name|
|
154
|
+
%w(RUBY_VERSION SYSTEM_VERSION).each do |name|
|
155
155
|
File.open(File.join(@deploy_dir, 'shared', 'bundled_gems', name), "w") { |f| f.write("old\n") }
|
156
156
|
end
|
157
157
|
|
data/spec/spec_helper.rb
CHANGED
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: engineyard-serverside
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 31
|
5
5
|
prerelease:
|
6
6
|
segments:
|
7
7
|
- 1
|
8
8
|
- 4
|
9
|
-
-
|
10
|
-
version: 1.4.
|
9
|
+
- 12
|
10
|
+
version: 1.4.12
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- EY Cloud Team
|
@@ -15,12 +15,11 @@ autorequire:
|
|
15
15
|
bindir: bin
|
16
16
|
cert_chain: []
|
17
17
|
|
18
|
-
date: 2011-09-
|
18
|
+
date: 2011-09-19 00:00:00 -07:00
|
19
|
+
default_executable: engineyard-serverside
|
19
20
|
dependencies:
|
20
21
|
- !ruby/object:Gem::Dependency
|
21
|
-
|
22
|
-
prerelease: false
|
23
|
-
requirement: &id001 !ruby/object:Gem::Requirement
|
22
|
+
version_requirements: &id001 !ruby/object:Gem::Requirement
|
24
23
|
none: false
|
25
24
|
requirements:
|
26
25
|
- - "="
|
@@ -31,12 +30,12 @@ dependencies:
|
|
31
30
|
- 3
|
32
31
|
- 2
|
33
32
|
version: 1.3.2
|
34
|
-
version_requirements: *id001
|
35
33
|
name: rspec
|
36
|
-
- !ruby/object:Gem::Dependency
|
37
|
-
type: :development
|
38
34
|
prerelease: false
|
39
|
-
|
35
|
+
type: :development
|
36
|
+
requirement: *id001
|
37
|
+
- !ruby/object:Gem::Dependency
|
38
|
+
version_requirements: &id002 !ruby/object:Gem::Requirement
|
40
39
|
none: false
|
41
40
|
requirements:
|
42
41
|
- - ">="
|
@@ -45,8 +44,10 @@ dependencies:
|
|
45
44
|
segments:
|
46
45
|
- 0
|
47
46
|
version: "0"
|
48
|
-
version_requirements: *id002
|
49
47
|
name: rake
|
48
|
+
prerelease: false
|
49
|
+
type: :development
|
50
|
+
requirement: *id002
|
50
51
|
description:
|
51
52
|
email: cloud@engineyard.com
|
52
53
|
executables:
|
@@ -265,6 +266,8 @@ files:
|
|
265
266
|
- spec/custom_deploy_spec.rb
|
266
267
|
- spec/deploy_hook_spec.rb
|
267
268
|
- spec/deprecation_spec.rb
|
269
|
+
- spec/fixtures/gitrepo/bar
|
270
|
+
- spec/fixtures/gitrepo/foo
|
268
271
|
- spec/fixtures/gitrepo.tar.gz
|
269
272
|
- spec/fixtures/invalid_hook.rb
|
270
273
|
- spec/fixtures/valid_hook.rb
|
@@ -283,6 +286,7 @@ files:
|
|
283
286
|
- spec/support/lockfiles/1.0.6-with-bundler
|
284
287
|
- spec/support/lockfiles/evil-yaml
|
285
288
|
- spec/support/lockfiles/not-a-lockfile
|
289
|
+
has_rdoc: true
|
286
290
|
homepage: http://github.com/engineyard/engineyard-serverside
|
287
291
|
licenses: []
|
288
292
|
|
@@ -312,7 +316,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
312
316
|
requirements: []
|
313
317
|
|
314
318
|
rubyforge_project:
|
315
|
-
rubygems_version: 1.
|
319
|
+
rubygems_version: 1.6.2
|
316
320
|
signing_key:
|
317
321
|
specification_version: 3
|
318
322
|
summary: A gem that deploys ruby applications on EY Cloud instances
|
@@ -320,6 +324,8 @@ test_files:
|
|
320
324
|
- spec/custom_deploy_spec.rb
|
321
325
|
- spec/deploy_hook_spec.rb
|
322
326
|
- spec/deprecation_spec.rb
|
327
|
+
- spec/fixtures/gitrepo/bar
|
328
|
+
- spec/fixtures/gitrepo/foo
|
323
329
|
- spec/fixtures/gitrepo.tar.gz
|
324
330
|
- spec/fixtures/invalid_hook.rb
|
325
331
|
- spec/fixtures/valid_hook.rb
|