anvil-cli 0.13.0 → 0.14.0
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/anvil/manifest.rb +16 -13
- data/lib/anvil/version.rb +1 -1
- metadata +8 -8
data/lib/anvil/manifest.rb
CHANGED
@@ -4,6 +4,7 @@ require "net/http"
|
|
4
4
|
require "net/https"
|
5
5
|
require "pathname"
|
6
6
|
require "rest_client"
|
7
|
+
require "find"
|
7
8
|
|
8
9
|
class Anvil::Manifest
|
9
10
|
|
@@ -126,7 +127,7 @@ private
|
|
126
127
|
|
127
128
|
def directory_manifest(dir, options={})
|
128
129
|
root = Pathname.new(dir)
|
129
|
-
ignore = options[:ignore] || []
|
130
|
+
ignore = (options[:ignore] || []) + [".anvil", ".git"]
|
130
131
|
|
131
132
|
if File.exists?("#{dir}/.slugignore")
|
132
133
|
File.read("#{dir}/.slugignore").split("\n").each do |match|
|
@@ -136,19 +137,21 @@ private
|
|
136
137
|
end
|
137
138
|
end
|
138
139
|
|
139
|
-
|
140
|
-
|
141
|
-
|
142
|
-
|
143
|
-
|
144
|
-
|
145
|
-
|
146
|
-
next
|
147
|
-
next
|
148
|
-
next(
|
149
|
-
|
150
|
-
|
140
|
+
manifest = {}
|
141
|
+
Find.find(dir) do |path|
|
142
|
+
relative = Pathname.new(path).relative_path_from(root).to_s
|
143
|
+
if File.directory?(path)
|
144
|
+
Find.prune if ignore.include?(relative) || ignore.include?(relative + "/")
|
145
|
+
next
|
146
|
+
end
|
147
|
+
next if ignore.include?(relative)
|
148
|
+
next if %w( . .. ).include?(File.basename(path))
|
149
|
+
next if File.pipe?(path)
|
150
|
+
next if path =~ /\.swp$/
|
151
|
+
next unless path =~ /^[A-Za-z0-9\-\_\.\/]*$/
|
152
|
+
manifest[relative] = file_manifest(path)
|
151
153
|
end
|
154
|
+
manifest
|
152
155
|
end
|
153
156
|
|
154
157
|
def file_manifest(file)
|
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.14.0
|
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-10-
|
12
|
+
date: 2012-10-10 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: progress
|
16
|
-
requirement: &
|
16
|
+
requirement: &70222498148920 !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: *70222498148920
|
25
25
|
- !ruby/object:Gem::Dependency
|
26
26
|
name: rest-client
|
27
|
-
requirement: &
|
27
|
+
requirement: &70222498164760 !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: *70222498164760
|
36
36
|
- !ruby/object:Gem::Dependency
|
37
37
|
name: thor
|
38
|
-
requirement: &
|
38
|
+
requirement: &70222498164160 !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: *70222498164160
|
47
47
|
description: Alternate Heroku build workflow
|
48
48
|
email: david@dollar.io
|
49
49
|
executables:
|