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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 770c6119784cefa5118bbb7d485b2f6d1c91d269
4
- data.tar.gz: f6c6fa74f647141cfa7251f57abf8a7f9c10df96
3
+ metadata.gz: 1bee9fb0009dc9c51051cde4d8b8d2202ddd3442
4
+ data.tar.gz: 723c0fd019e05a250f9fa183d5bde9028294e3a3
5
5
  SHA512:
6
- metadata.gz: 45702fe229939bb6b62f9627388f0a96c160128fd49ecf80264073b036683cc49a5c3ec879138c02dd123b2752555d9f86089e2aa58ff346284379a4232d8038
7
- data.tar.gz: 43519cb09706f9db247d2b5205a5973bc8bc4ee4824e1e2d78e5f2eccb58e713a0f4e58fbe4615b15b1352bb7a410e07522dd4e5390b26cefc010e837cdf174d
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}', 'zipball')
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}', 'zipball')
213
+ .sub('{archive_format}', archive_format)
212
214
  .sub('{/ref}', "/#{branch}")
213
215
  download_ref_uri = URI(uri_string)
214
216
  rescue => ex
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: factor-connector-github
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.3
4
+ version: 0.0.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Maciej Skierkowski