anvil-cli 0.11.0 → 0.12.0
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/anvil/engine.rb +4 -8
- data/lib/anvil/helpers.rb +6 -0
- data/lib/anvil/version.rb +1 -1
- metadata +7 -7
data/lib/anvil/engine.rb
CHANGED
@@ -20,7 +20,7 @@ class Anvil::Engine
|
|
20
20
|
source ||= "."
|
21
21
|
|
22
22
|
build_options = {
|
23
|
-
:buildpack => prepare_buildpack(options[:buildpack]
|
23
|
+
:buildpack => prepare_buildpack(options[:buildpack] || read_anvil_metadata(source, "buildpack"))
|
24
24
|
}
|
25
25
|
|
26
26
|
builder = if is_url?(source)
|
@@ -37,9 +37,8 @@ class Anvil::Engine
|
|
37
37
|
print chunk
|
38
38
|
end
|
39
39
|
|
40
|
-
|
41
|
-
|
42
|
-
end
|
40
|
+
write_anvil_metadata source, "buildpack", options[:buildpack].to_s
|
41
|
+
write_anvil_metadata source, "cache", manifest.cache_url
|
43
42
|
|
44
43
|
old_stdout.puts slug_url if options[:pipeline]
|
45
44
|
|
@@ -50,11 +49,8 @@ class Anvil::Engine
|
|
50
49
|
puts Anvil::VERSION
|
51
50
|
end
|
52
51
|
|
53
|
-
def self.is_url?(string)
|
54
|
-
URI.parse(string).scheme rescue nil
|
55
|
-
end
|
56
|
-
|
57
52
|
def self.prepare_buildpack(buildpack)
|
53
|
+
buildpack = buildpack.to_s
|
58
54
|
if buildpack == ""
|
59
55
|
buildpack
|
60
56
|
elsif is_url?(buildpack)
|
data/lib/anvil/helpers.rb
CHANGED
@@ -17,11 +17,17 @@ module Anvil::Helpers
|
|
17
17
|
dir
|
18
18
|
end
|
19
19
|
|
20
|
+
def is_url?(string)
|
21
|
+
URI.parse(string).scheme rescue nil
|
22
|
+
end
|
23
|
+
|
20
24
|
def read_anvil_metadata(root, name)
|
25
|
+
return nil if is_url?(root)
|
21
26
|
File.open(File.join(anvil_metadata_dir(root), name)).read.chomp rescue nil
|
22
27
|
end
|
23
28
|
|
24
29
|
def write_anvil_metadata(root, name, data)
|
30
|
+
return if is_url?(root)
|
25
31
|
File.open(File.join(anvil_metadata_dir(root), name), "w") do |file|
|
26
32
|
file.puts data
|
27
33
|
end
|
data/lib/anvil/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: anvil-cli
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.12.0
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -13,7 +13,7 @@ date: 2012-09-18 00:00:00.000000000 Z
|
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: progress
|
16
|
-
requirement: &
|
16
|
+
requirement: &70121889750420 !ruby/object:Gem::Requirement
|
17
17
|
none: false
|
18
18
|
requirements:
|
19
19
|
- - ~>
|
@@ -21,10 +21,10 @@ dependencies:
|
|
21
21
|
version: 2.4.0
|
22
22
|
type: :runtime
|
23
23
|
prerelease: false
|
24
|
-
version_requirements: *
|
24
|
+
version_requirements: *70121889750420
|
25
25
|
- !ruby/object:Gem::Dependency
|
26
26
|
name: rest-client
|
27
|
-
requirement: &
|
27
|
+
requirement: &70121889749840 !ruby/object:Gem::Requirement
|
28
28
|
none: false
|
29
29
|
requirements:
|
30
30
|
- - ~>
|
@@ -32,10 +32,10 @@ dependencies:
|
|
32
32
|
version: 1.6.7
|
33
33
|
type: :runtime
|
34
34
|
prerelease: false
|
35
|
-
version_requirements: *
|
35
|
+
version_requirements: *70121889749840
|
36
36
|
- !ruby/object:Gem::Dependency
|
37
37
|
name: thor
|
38
|
-
requirement: &
|
38
|
+
requirement: &70121889749300 !ruby/object:Gem::Requirement
|
39
39
|
none: false
|
40
40
|
requirements:
|
41
41
|
- - ~>
|
@@ -43,7 +43,7 @@ dependencies:
|
|
43
43
|
version: 0.15.2
|
44
44
|
type: :runtime
|
45
45
|
prerelease: false
|
46
|
-
version_requirements: *
|
46
|
+
version_requirements: *70121889749300
|
47
47
|
description: Alternate Heroku build workflow
|
48
48
|
email: david@dollar.io
|
49
49
|
executables:
|