factor-connector-github 0.0.3 → 0.0.4
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.
- checksums.yaml +4 -4
- data/lib/factor/connector/github_repo.rb +4 -2
- metadata +1 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA1:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 1bee9fb0009dc9c51051cde4d8b8d2202ddd3442
|
|
4
|
+
data.tar.gz: 723c0fd019e05a250f9fa183d5bde9028294e3a3
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 0790bebf5cc58a6f986134ab26279ccc74a8b55b1f807237161caabe2226b79a140b09cef21aff737b85ad05aa03d6aa2471fbf46793523986abb88a8f176c0e
|
|
7
|
+
data.tar.gz: 323153be8ac78ecbbc31207c6754a1ebd0e88e2c3b30db9f22b45bc2f2f82bd35e505e49c0a803a6a062a319f65e0531a9c5d6b095811603f33143fee9cf0fdc
|
|
@@ -30,6 +30,7 @@ Factor::Connector.service 'github_repo' do
|
|
|
30
30
|
username = params['username']
|
|
31
31
|
repo = params['repo']
|
|
32
32
|
branch = params['branch']
|
|
33
|
+
archive_format = params['archive_format'] || 'tarball'
|
|
33
34
|
|
|
34
35
|
if repo
|
|
35
36
|
username, repo = repo.split('/') if repo.include?('/') && !username
|
|
@@ -70,7 +71,7 @@ Factor::Connector.service 'github_repo' do
|
|
|
70
71
|
github_repo = github.repos.get(repo_reference)
|
|
71
72
|
archive_url_template = github_repo.archive_url
|
|
72
73
|
uri_string = archive_url_template
|
|
73
|
-
.sub('{archive_format}',
|
|
74
|
+
.sub('{archive_format}', archive_format)
|
|
74
75
|
.sub('{/ref}', "/#{branch}")
|
|
75
76
|
download_ref_uri = URI(uri_string)
|
|
76
77
|
rescue => ex
|
|
@@ -181,6 +182,7 @@ Factor::Connector.service 'github_repo' do
|
|
|
181
182
|
username = params['username']
|
|
182
183
|
repo = params['repo']
|
|
183
184
|
branch = params['branch']
|
|
185
|
+
archive_format = params['archive_format'] || 'tarball'
|
|
184
186
|
|
|
185
187
|
if repo
|
|
186
188
|
username, repo = repo.split('/') if repo.include?('/') && !username
|
|
@@ -208,7 +210,7 @@ Factor::Connector.service 'github_repo' do
|
|
|
208
210
|
github_repo = github.repos.get(repo_reference)
|
|
209
211
|
archive_url_template = github_repo.archive_url
|
|
210
212
|
uri_string = archive_url_template
|
|
211
|
-
.sub('{archive_format}',
|
|
213
|
+
.sub('{archive_format}', archive_format)
|
|
212
214
|
.sub('{/ref}', "/#{branch}")
|
|
213
215
|
download_ref_uri = URI(uri_string)
|
|
214
216
|
rescue => ex
|