jets 0.8.17 → 0.8.18
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/CHANGELOG.md +3 -0
- data/Gemfile.lock +3 -3
- data/README.md +0 -1
- data/lib/jets/aws_info.rb +7 -3
- data/lib/jets/commands/base.rb +5 -2
- data/lib/jets/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 23fe5d6d20d288bc4f2b791da60476662930ab3047a55d9e1904d168a875743c
|
4
|
+
data.tar.gz: 0f1c04626989dbb8bb9393f3c67e94aedc7da3605102715df25b2ad282bcba35
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: dd410110fe51ea01517dbe324b274f4ec883ab99640603c340f000ca5a6d2b1e6e2c7dedfd0710ebc9a10611398d21d4072634a16a627dd6fa4cdb1aede4f2fc
|
7
|
+
data.tar.gz: 3c5e482eff4de95d39ac0bd70a6aab3316b938d4b2f0c62e9ee695d5b899c4d18d0df7505bc544367092ae98899234d0e904b88ca79069dc9bd9af2587301b35
|
data/CHANGELOG.md
CHANGED
@@ -3,6 +3,9 @@
|
|
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/), even before v1.0.
|
5
5
|
|
6
|
+
## [0.8.18]
|
7
|
+
- improve performance of Jets.aws.region
|
8
|
+
|
6
9
|
## [0.8.17]
|
7
10
|
- fix Jets.eager_load
|
8
11
|
|
data/Gemfile.lock
CHANGED
@@ -11,7 +11,7 @@ GIT
|
|
11
11
|
PATH
|
12
12
|
remote: .
|
13
13
|
specs:
|
14
|
-
jets (0.8.
|
14
|
+
jets (0.8.18)
|
15
15
|
actionpack (>= 5.2.1)
|
16
16
|
actionview (>= 5.2.1)
|
17
17
|
activerecord (>= 5.2.1)
|
@@ -71,7 +71,7 @@ GEM
|
|
71
71
|
aws-sdk-cloudwatchlogs (1.8.0)
|
72
72
|
aws-sdk-core (~> 3, >= 3.26.0)
|
73
73
|
aws-sigv4 (~> 1.0)
|
74
|
-
aws-sdk-core (3.27.
|
74
|
+
aws-sdk-core (3.27.1)
|
75
75
|
aws-eventstream (~> 1.0)
|
76
76
|
aws-partitions (~> 1.0)
|
77
77
|
aws-sigv4 (~> 1.0)
|
@@ -85,7 +85,7 @@ GEM
|
|
85
85
|
aws-sdk-lambda (1.10.0)
|
86
86
|
aws-sdk-core (~> 3, >= 3.26.0)
|
87
87
|
aws-sigv4 (~> 1.0)
|
88
|
-
aws-sdk-s3 (1.
|
88
|
+
aws-sdk-s3 (1.20.0)
|
89
89
|
aws-sdk-core (~> 3, >= 3.26.0)
|
90
90
|
aws-sdk-kms (~> 1)
|
91
91
|
aws-sigv4 (~> 1.0)
|
data/README.md
CHANGED
@@ -126,7 +126,6 @@ For more documentation, check out the official docs: [Ruby on Jets](http://rubyo
|
|
126
126
|
* [Database Support](http://rubyonjets.com/docs/database-support/)
|
127
127
|
* [Polymorphic Support](http://rubyonjets.com/docs/polymorphic-support/)
|
128
128
|
* [Tutorials](http://rubyonjets.com/docs/tutorials/)
|
129
|
-
* [How Jets Works](http://rubyonjets.com/docs/how-jets-works/)
|
130
129
|
* [Prewarming](http://rubyonjets.com/docs/prewarming/)
|
131
130
|
* [Installation](http://rubyonjets.com/docs/install/)
|
132
131
|
* [CLI Reference](http://rubyonjets.com/reference/)
|
data/lib/jets/aws_info.rb
CHANGED
@@ -7,6 +7,9 @@ module Jets
|
|
7
7
|
def region
|
8
8
|
return 'us-east-1' if test?
|
9
9
|
|
10
|
+
return ENV['JETS_AWS_REGION'] if ENV['JETS_AWS_REGION'] # highest precedence
|
11
|
+
return ENV['AWS_REGION'] if ENV['AWS_REGION']
|
12
|
+
|
10
13
|
region = nil
|
11
14
|
|
12
15
|
# First try to get it from the ~/.aws/config
|
@@ -16,13 +19,14 @@ module Jets
|
|
16
19
|
# Second try the metadata endpoint, should be available on AWS Lambda environment
|
17
20
|
# https://stackoverflow.com/questions/4249488/find-region-from-within-an-ec2-instance
|
18
21
|
begin
|
19
|
-
az = `curl -s http://169.254.169.254/latest/meta-data/placement/availability-zone`
|
22
|
+
az = `curl -s --max-time 5 --connect-timeout 5 http://169.254.169.254/latest/meta-data/placement/availability-zone`
|
20
23
|
region = az.strip.chop # remove last char
|
24
|
+
region = nil if region == ''
|
21
25
|
rescue
|
22
26
|
end
|
23
27
|
return region if region
|
24
28
|
|
25
|
-
|
29
|
+
'us-east-1' # default if all else fails
|
26
30
|
end
|
27
31
|
memoize :region
|
28
32
|
|
@@ -37,4 +41,4 @@ module Jets
|
|
37
41
|
ENV['TEST'] || ENV['CIRCLECI']
|
38
42
|
end
|
39
43
|
end
|
40
|
-
end
|
44
|
+
end
|
data/lib/jets/commands/base.rb
CHANGED
@@ -15,6 +15,8 @@ end
|
|
15
15
|
|
16
16
|
class Jets::Commands::Base < Thor
|
17
17
|
class << self
|
18
|
+
extend Memoist
|
19
|
+
|
18
20
|
# thor_args is an array of commands. Examples:
|
19
21
|
# ["help"]
|
20
22
|
# ["dynamodb:migrate"]
|
@@ -53,8 +55,8 @@ class Jets::Commands::Base < Thor
|
|
53
55
|
# Using constantize instead of require so we dont care about
|
54
56
|
# order. The eager load actually uses autoloading.
|
55
57
|
def eager_load!
|
56
|
-
|
57
|
-
Dir.glob("#{
|
58
|
+
base_path = File.expand_path("../../", __FILE__)
|
59
|
+
Dir.glob("#{base_path}/commands/**/*.rb").select do |path|
|
58
60
|
next if !File.file?(path) or path =~ /templates/ or path =~ %r{/markdown/}
|
59
61
|
|
60
62
|
class_name = path
|
@@ -68,6 +70,7 @@ class Jets::Commands::Base < Thor
|
|
68
70
|
class_name.constantize # dont have to worry about order.
|
69
71
|
end
|
70
72
|
end
|
73
|
+
memoize :eager_load!
|
71
74
|
|
72
75
|
# Fully qualifed task names. Examples:
|
73
76
|
# build
|
data/lib/jets/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: jets
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.8.
|
4
|
+
version: 0.8.18
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Tung Nguyen
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2018-09-
|
11
|
+
date: 2018-09-24 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: actionpack
|