jackal-code-fetcher 0.1.4 → 0.1.6
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +5 -0
- data/README.md +7 -4
- data/jackal-code-fetcher.gemspec +5 -1
- data/lib/jackal-code-fetcher.rb +6 -0
- data/lib/jackal-code-fetcher/git_hub.rb +19 -2
- data/lib/jackal-code-fetcher/version.rb +1 -1
- metadata +32 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: a1bb51a9689d54910938234e74f56ad53c559092
|
4
|
+
data.tar.gz: 273f09238505bca17430c54a225b500d7a6e5b71
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 0521ace13c00fab37020200671e1605d20adef28a22192487aafb30abdbeedfffb2ec4264aa1291fdec61d9d969fcceeb3b88e02fcad8ac3a01ac89b89480c48
|
7
|
+
data.tar.gz: 3c1ca1fc8ad443a1a8ff56ab51bd42478adefe579e8d6961bd3d877db9fcb7cfc977e86cd2d6bf2e338abeef788e5dddc86926f6f834e8be392e1d58283d16cc
|
data/CHANGELOG.md
CHANGED
data/README.md
CHANGED
@@ -11,10 +11,13 @@ asset. Configure:
|
|
11
11
|
{
|
12
12
|
"jackal": {
|
13
13
|
"assets": {
|
14
|
-
"
|
15
|
-
|
16
|
-
|
17
|
-
|
14
|
+
"connection": {
|
15
|
+
"provider": PROVIDER,
|
16
|
+
"credentials": {
|
17
|
+
CREDENTIALS
|
18
|
+
}
|
19
|
+
},
|
20
|
+
"bucket": BUCKET_NAME
|
18
21
|
}
|
19
22
|
}
|
20
23
|
}
|
data/jackal-code-fetcher.gemspec
CHANGED
@@ -10,7 +10,11 @@ Gem::Specification.new do |s|
|
|
10
10
|
s.description = 'Code fetching helper'
|
11
11
|
s.require_path = 'lib'
|
12
12
|
s.license = 'Apache 2.0'
|
13
|
-
s.add_dependency 'jackal', '>= 0.3.
|
13
|
+
s.add_dependency 'jackal', '>= 0.3.10', '< 1.0.0'
|
14
14
|
s.add_dependency 'git'
|
15
|
+
|
16
|
+
s.add_development_dependency 'carnivore-actor'
|
17
|
+
s.add_development_dependency 'jackal-assets'
|
18
|
+
|
15
19
|
s.files = Dir['lib/**/*'] + %w(jackal-code-fetcher.gemspec README.md CHANGELOG.md CONTRIBUTING.md LICENSE)
|
16
20
|
end
|
data/lib/jackal-code-fetcher.rb
CHANGED
@@ -13,7 +13,13 @@ Jackal.service(
|
|
13
13
|
:description => 'Fetch code from remote source',
|
14
14
|
:configuration => {
|
15
15
|
:github__access_token => {
|
16
|
+
:type => :string,
|
16
17
|
:description => 'GitHub access token to use for repository access'
|
18
|
+
},
|
19
|
+
:working_directory => {
|
20
|
+
:type => :string,
|
21
|
+
:description => 'Host working directory',
|
22
|
+
:public => false
|
17
23
|
}
|
18
24
|
}
|
19
25
|
)
|
@@ -171,8 +171,25 @@ module Jackal
|
|
171
171
|
begin
|
172
172
|
tmp_path = File.join(_path, asset_key)
|
173
173
|
FileUtils.mkdir_p(tmp_path)
|
174
|
-
|
175
|
-
|
174
|
+
origin_path = repository_path(payload)
|
175
|
+
files_to_copy = Dir.glob(
|
176
|
+
File.join(
|
177
|
+
origin_path,
|
178
|
+
'{.[^.]*,**}',
|
179
|
+
'**',
|
180
|
+
'{*,*.*,.*}'
|
181
|
+
)
|
182
|
+
)
|
183
|
+
files_to_copy = files_to_copy.map do |file_path|
|
184
|
+
next unless File.file?(file_path)
|
185
|
+
relative_path = file_path.sub("#{origin_path}/", '')
|
186
|
+
relative_path unless File.fnmatch('.git*', relative_path)
|
187
|
+
end.compact
|
188
|
+
files_to_copy.each do |relative_path|
|
189
|
+
new_path = File.join(tmp_path, relative_path)
|
190
|
+
FileUtils.mkdir_p(File.dirname(new_path))
|
191
|
+
FileUtils.cp(File.join(origin_path, relative_path), new_path)
|
192
|
+
end
|
176
193
|
tarball = asset_store.pack(tmp_path)
|
177
194
|
asset_store.put(asset_key, tarball)
|
178
195
|
ensure
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: jackal-code-fetcher
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.6
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Chris Roberts
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-
|
11
|
+
date: 2015-06-10 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: jackal
|
@@ -16,7 +16,7 @@ dependencies:
|
|
16
16
|
requirements:
|
17
17
|
- - ">="
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version: 0.3.
|
19
|
+
version: 0.3.10
|
20
20
|
- - "<"
|
21
21
|
- !ruby/object:Gem::Version
|
22
22
|
version: 1.0.0
|
@@ -26,7 +26,7 @@ dependencies:
|
|
26
26
|
requirements:
|
27
27
|
- - ">="
|
28
28
|
- !ruby/object:Gem::Version
|
29
|
-
version: 0.3.
|
29
|
+
version: 0.3.10
|
30
30
|
- - "<"
|
31
31
|
- !ruby/object:Gem::Version
|
32
32
|
version: 1.0.0
|
@@ -44,6 +44,34 @@ dependencies:
|
|
44
44
|
- - ">="
|
45
45
|
- !ruby/object:Gem::Version
|
46
46
|
version: '0'
|
47
|
+
- !ruby/object:Gem::Dependency
|
48
|
+
name: carnivore-actor
|
49
|
+
requirement: !ruby/object:Gem::Requirement
|
50
|
+
requirements:
|
51
|
+
- - ">="
|
52
|
+
- !ruby/object:Gem::Version
|
53
|
+
version: '0'
|
54
|
+
type: :development
|
55
|
+
prerelease: false
|
56
|
+
version_requirements: !ruby/object:Gem::Requirement
|
57
|
+
requirements:
|
58
|
+
- - ">="
|
59
|
+
- !ruby/object:Gem::Version
|
60
|
+
version: '0'
|
61
|
+
- !ruby/object:Gem::Dependency
|
62
|
+
name: jackal-assets
|
63
|
+
requirement: !ruby/object:Gem::Requirement
|
64
|
+
requirements:
|
65
|
+
- - ">="
|
66
|
+
- !ruby/object:Gem::Version
|
67
|
+
version: '0'
|
68
|
+
type: :development
|
69
|
+
prerelease: false
|
70
|
+
version_requirements: !ruby/object:Gem::Requirement
|
71
|
+
requirements:
|
72
|
+
- - ">="
|
73
|
+
- !ruby/object:Gem::Version
|
74
|
+
version: '0'
|
47
75
|
description: Code fetching helper
|
48
76
|
email: code@chrisroberts.org
|
49
77
|
executables: []
|