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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: fa8f123d07341d311a5500a5d17e16c671fdfbe4
4
- data.tar.gz: f7b8a5817ed1dcc13dd5ff35961340d2c1b16c91
3
+ metadata.gz: a1bb51a9689d54910938234e74f56ad53c559092
4
+ data.tar.gz: 273f09238505bca17430c54a225b500d7a6e5b71
5
5
  SHA512:
6
- metadata.gz: f9aa57dff992cd7d7e721b94b62a4e093234f5fa8e17b15c5a355767f153dd052a598f4816d4140220f9d8a9b469da90647c5f286457549ab504d23f4a2bcdfe
7
- data.tar.gz: e47a0016f89420154d0aa2c80598c17030fce0ce3965c29e2ea0e1b7997f03293b0a4aa0a213ba17e14f5d8f6f350db6fd53484e9ac3c51d6ed7dc09cdcecee7
6
+ metadata.gz: 0521ace13c00fab37020200671e1605d20adef28a22192487aafb30abdbeedfffb2ec4264aa1291fdec61d9d969fcceeb3b88e02fcad8ac3a01ac89b89480c48
7
+ data.tar.gz: 3c1ca1fc8ad443a1a8ff56ab51bd42478adefe579e8d6961bd3d877db9fcb7cfc977e86cd2d6bf2e338abeef788e5dddc86926f6f834e8be392e1d58283d16cc
@@ -1,3 +1,8 @@
1
+ # v0.1.6
2
+ * Update service registration
3
+ * Add test coverage
4
+ * Update asset creation to use glob and filter approach
5
+
1
6
  # v0.1.4
2
7
  * Add service registration
3
8
 
data/README.md CHANGED
@@ -11,10 +11,13 @@ asset. Configure:
11
11
  {
12
12
  "jackal": {
13
13
  "assets": {
14
- "provider": PROVIDER,
15
- "credentials": {
16
- CREDENTIALS
17
- }
14
+ "connection": {
15
+ "provider": PROVIDER,
16
+ "credentials": {
17
+ CREDENTIALS
18
+ }
19
+ },
20
+ "bucket": BUCKET_NAME
18
21
  }
19
22
  }
20
23
  }
@@ -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.4', '< 1.0.0'
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
@@ -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
- FileUtils.cp_r(File.join(repository_path(payload), '.'), tmp_path)
175
- FileUtils.rm_rf(File.join(tmp_path, '.git'))
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
@@ -1,6 +1,6 @@
1
1
  module Jackal
2
2
  module CodeFetcher
3
3
  # Current library version
4
- VERSION = Gem::Version.new('0.1.4')
4
+ VERSION = Gem::Version.new('0.1.6')
5
5
  end
6
6
  end
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
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-05-21 00:00:00.000000000 Z
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.4
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.4
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: []