serverlessgems 0.2.0 → 0.3.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +7 -0
- data/lib/jets/gems/check.rb +2 -0
- data/lib/jets/gems/extract/base.rb +3 -3
- data/lib/jets/gems/extract/gem.rb +18 -3
- data/lib/jets/gems/version.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 85ccd616399d9f335e5aadff26a38a4f1e5584a6f7ceefb433e4772ea2d4e0e9
|
4
|
+
data.tar.gz: 01c5f24ee034758ef85b109a584c63c738dd765a1eada4be8498986bc8be7a7d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 0cd02b6cecda18ab6bc4650470269247618a849aa7159348d759294bf64b4756f2095142e051f7713faca586185f4d4dccb3da5e20750c5273f127b366ca1ed0
|
7
|
+
data.tar.gz: 204e73b60d8fadcf7c12ba441ca858d981ee75d5a084c64b4d54469bef701c79acc24b6d2d9dd7fdf8b88791e7a97d7f119c9243e2b0a274f4bb751b59ef8dd1
|
data/CHANGELOG.md
CHANGED
@@ -3,6 +3,13 @@
|
|
3
3
|
All notable changes to this project will be documented in this file.
|
4
4
|
This project *loosely tries* to adhere to [Semantic Versioning](http://semver.org/).
|
5
5
|
|
6
|
+
## [0.3.0] - 2023-06-04
|
7
|
+
- download gems to different ruby folder: avoid conflicts when switching ruby version
|
8
|
+
- update missing gems messaging
|
9
|
+
|
10
|
+
## [0.2.1] - 2023-02-07
|
11
|
+
- [#7](https://github.com/boltops-tools/serverlessgems/pull/7) download retry for 403 forbidden
|
12
|
+
|
6
13
|
## [0.2.0] - 2022-07-02
|
7
14
|
- provide gems available info
|
8
15
|
|
data/lib/jets/gems/check.rb
CHANGED
@@ -63,6 +63,8 @@ Jets is unable to build a deployment package that will work on AWS Lambda withou
|
|
63
63
|
* Create your own custom layer with the gem: http://rubyonjets.com/docs/extras/custom-lambda-layers/
|
64
64
|
<% if agree.yes? -%>
|
65
65
|
* No need to report this to us, as we've already been notified.
|
66
|
+
* Usually, missing gems can be built within a few minutes.
|
67
|
+
* Some gems may take days or even longer.
|
66
68
|
<% elsif agree.no? -%>
|
67
69
|
* You have choosen not to report data to serverlessgems so we will not be notified about these missing gems.
|
68
70
|
* You can edit ~/.jets/agree to change this.
|
@@ -8,8 +8,8 @@ module Jets::Gems::Extract
|
|
8
8
|
def initialize(name, options={})
|
9
9
|
@name = name
|
10
10
|
@options = options
|
11
|
-
|
12
|
-
@downloads_root = options[:downloads_root] || "/tmp/jets/#{Jets.config.project_name}/serverlessgems"
|
11
|
+
ruby_folder = Jets::Gems.ruby_folder
|
12
|
+
@downloads_root = options[:downloads_root] || "/tmp/jets/#{Jets.config.project_name}/serverlessgems/#{ruby_folder}"
|
13
13
|
end
|
14
14
|
|
15
15
|
def clean_downloads(folder)
|
@@ -35,7 +35,7 @@ module Jets::Gems::Extract
|
|
35
35
|
|
36
36
|
# Returns the dest path
|
37
37
|
def download_file(url, dest)
|
38
|
-
if File.exist?(dest)
|
38
|
+
if File.exist?(dest) && ENV['SG_FORCE_DOWNLOAD'].blank?
|
39
39
|
say "File already downloaded #{dest}"
|
40
40
|
return dest
|
41
41
|
end
|
@@ -50,9 +50,24 @@ module Jets::Gems::Extract
|
|
50
50
|
#
|
51
51
|
def download_gem
|
52
52
|
# download - also move to /tmp/jets/demo/compiled_gems folder
|
53
|
-
|
54
|
-
|
55
|
-
|
53
|
+
begin
|
54
|
+
@retries ||= 0
|
55
|
+
url = gem_url
|
56
|
+
basename = File.basename(url).gsub(/\?.*/,'') # remove query string info
|
57
|
+
tarball_dest = download_file(url, download_path(basename))
|
58
|
+
rescue OpenURI::HTTPError => e
|
59
|
+
url_without_query = url.gsub(/\?.*/,'')
|
60
|
+
puts "Error downloading #{url_without_query}"
|
61
|
+
@retries += 1
|
62
|
+
if @retries < 3
|
63
|
+
sleep 1
|
64
|
+
puts "Retrying download. Retry attempt: #{@retries}"
|
65
|
+
retry
|
66
|
+
else
|
67
|
+
raise e
|
68
|
+
end
|
69
|
+
end
|
70
|
+
|
56
71
|
unless tarball_dest
|
57
72
|
message = "Url: #{url} not found"
|
58
73
|
if @options[:exit_on_error]
|
data/lib/jets/gems/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: serverlessgems
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.3.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Tung Nguyen
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2023-06-04 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: gems
|
@@ -146,7 +146,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
146
146
|
- !ruby/object:Gem::Version
|
147
147
|
version: '0'
|
148
148
|
requirements: []
|
149
|
-
rubygems_version: 3.
|
149
|
+
rubygems_version: 3.4.10
|
150
150
|
signing_key:
|
151
151
|
specification_version: 4
|
152
152
|
summary: Client Library works with Serverless Gems API for Jets Ruby Serverless Framework
|