jets 3.0.6 → 3.0.10
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 +17 -0
- data/lib/jets/builders/tidy.rb +3 -2
- data/lib/jets/cfn/upload.rb +12 -10
- data/lib/jets/commands/dbconsole.rb +10 -7
- data/lib/jets/commands/templates/skeleton/Gemfile.tt +2 -2
- data/lib/jets/controller/callbacks.rb +6 -18
- data/lib/jets/core.rb +1 -1
- data/lib/jets/resource/api_gateway/base_path/function.rb +3 -1
- 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: 0b2e85111e507304b3bd11375499c70f4ba880e1f2523e5f7b2ff627e6558b76
|
4
|
+
data.tar.gz: 5e7bbb320f5e580726ab4d66e11cc47feca970edc61d6d01f1ed25fea2693bad
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 7dbf8891880be71e8b40da911ebb13e5ad39365158efa9bd62426b17e94d8b264a9832f14e32f10a8b402daf34cecda8f5986bcfcc70cb9278a7793b398b61d0
|
7
|
+
data.tar.gz: 6397148e88442a557552397ab01c7b7697f3642593f0aaedcbddd15f01c824e47b64922d21208bf99e01dd2929b547fcc3ef07a0c91afb6e49a58fe46185667f
|
data/CHANGELOG.md
CHANGED
@@ -3,6 +3,23 @@
|
|
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
|
+
## [3.0.10] - 2021-07-14
|
7
|
+
- [#575](https://github.com/boltops-tools/jets/pull/575) fix missing webpacker helpers
|
8
|
+
- [#576](https://github.com/boltops-tools/jets/pull/576) Fixes API Gateway base path Lambda not respecting various config opts
|
9
|
+
- [#577](https://github.com/boltops-tools/jets/pull/577) Adjust .jetskeep handling and add .jetsignore docs
|
10
|
+
- fix dbconsole (#568)
|
11
|
+
|
12
|
+
## [3.0.9] - 2021-06-14
|
13
|
+
- fix content type s3 metadata (#564)
|
14
|
+
|
15
|
+
## [3.0.8] - 2021-06-03
|
16
|
+
- Update cli.md (#560)
|
17
|
+
- respect .jetsignore also (#562)
|
18
|
+
|
19
|
+
## [3.0.7] - 2021-05-27
|
20
|
+
- Dont bypass class_attribute setters (#559)
|
21
|
+
- update pg version in jets new Gemfile to latest (#558)
|
22
|
+
|
6
23
|
## [3.0.6] - 2021-05-27
|
7
24
|
- Handle Errors::InvalidClientTokenId when `get_caller_identity` fails (#543)
|
8
25
|
- Use description specifed in function properties (#545)
|
data/lib/jets/builders/tidy.rb
CHANGED
@@ -35,9 +35,10 @@ module Jets::Builders
|
|
35
35
|
removals = always_removals
|
36
36
|
removals += get_removals("#{@project_root}/.gitignore")
|
37
37
|
removals += get_removals("#{@project_root}/.dockerignore")
|
38
|
+
removals += get_removals("#{@project_root}/.jetsignore")
|
38
39
|
removals = removals.reject do |p|
|
39
40
|
jetskeep.find do |keep|
|
40
|
-
p
|
41
|
+
p == keep
|
41
42
|
end
|
42
43
|
end
|
43
44
|
removals.uniq
|
@@ -55,7 +56,7 @@ module Jets::Builders
|
|
55
56
|
# We clean out ignored files pretty aggressively. So provide
|
56
57
|
# a way for users to keep files from being cleaned out.
|
57
58
|
def jetskeep
|
58
|
-
always = %w[.bundle packs vendor]
|
59
|
+
always = %w[.bundle /public/packs /public/packs-test vendor]
|
59
60
|
path = "#{@project_root}/.jetskeep"
|
60
61
|
return always unless File.exist?(path)
|
61
62
|
|
data/lib/jets/cfn/upload.rb
CHANGED
@@ -1,5 +1,6 @@
|
|
1
1
|
require 'action_view'
|
2
2
|
require 'digest'
|
3
|
+
require 'rack/mime'
|
3
4
|
|
4
5
|
module Jets::Cfn
|
5
6
|
class Upload
|
@@ -8,12 +9,6 @@ module Jets::Cfn
|
|
8
9
|
|
9
10
|
attr_reader :bucket_name
|
10
11
|
|
11
|
-
CONTENT_TYPES_BY_EXTENSION = {
|
12
|
-
'.css' => 'text/css',
|
13
|
-
'.js' => 'application/javascript',
|
14
|
-
'.html' => 'text/html'
|
15
|
-
}
|
16
|
-
|
17
12
|
def initialize(bucket_name)
|
18
13
|
@bucket_name = bucket_name
|
19
14
|
end
|
@@ -93,16 +88,23 @@ module Jets::Cfn
|
|
93
88
|
end
|
94
89
|
|
95
90
|
def upload_to_s3(full_path)
|
96
|
-
return if identical_on_s3?(full_path)
|
91
|
+
return if identical_on_s3?(full_path) && !ENV['JETS_ASSET_UPLOAD_FORCE']
|
97
92
|
|
98
93
|
key = s3_key(full_path)
|
99
94
|
obj = s3_resource.bucket(bucket_name).object(key)
|
100
|
-
|
101
|
-
|
95
|
+
content_type = content_type_headers(full_path)
|
96
|
+
puts "Uploading and setting content type for s3://#{bucket_name}/#{key} content_type #{content_type[:content_type].inspect}"
|
97
|
+
obj.upload_file(full_path, { acl: "public-read", cache_control: cache_control }.merge(content_type))
|
102
98
|
end
|
103
99
|
|
100
|
+
CONTENT_TYPES_BY_EXTENSION = {
|
101
|
+
'.css' => 'text/css',
|
102
|
+
'.html' => 'text/html',
|
103
|
+
'.js' => 'application/javascript',
|
104
|
+
}
|
104
105
|
def content_type_headers(full_path)
|
105
|
-
|
106
|
+
ext = File.extname(full_path)
|
107
|
+
content_type = CONTENT_TYPES_BY_EXTENSION[ext] || Rack::Mime.mime_type(ext)
|
106
108
|
if content_type
|
107
109
|
{ content_type: content_type }
|
108
110
|
else
|
@@ -1,12 +1,15 @@
|
|
1
1
|
# Thanks: Rails dbconsole_command.rb
|
2
2
|
module Jets::Commands
|
3
3
|
class Dbconsole
|
4
|
+
extend Memoist
|
5
|
+
|
4
6
|
def self.start(*args)
|
5
7
|
new(*args).start
|
6
8
|
end
|
7
9
|
|
8
10
|
def initialize(options = {})
|
9
|
-
|
11
|
+
defaults = {"include_password" => true}
|
12
|
+
@options = defaults.merge(options)
|
10
13
|
end
|
11
14
|
|
12
15
|
def start
|
@@ -85,14 +88,14 @@ module Jets::Commands
|
|
85
88
|
end
|
86
89
|
|
87
90
|
def config
|
88
|
-
|
89
|
-
|
90
|
-
|
91
|
-
|
92
|
-
|
93
|
-
end
|
91
|
+
configs = configurations.configs_for(env_name: environment)
|
92
|
+
if configs.blank?
|
93
|
+
raise ActiveRecord::AdapterNotSpecified, "'#{environment}' database is not configured. Available configuration: #{configurations.inspect}"
|
94
|
+
else
|
95
|
+
configs.first.configuration_hash.dup.stringify_keys!
|
94
96
|
end
|
95
97
|
end
|
98
|
+
memoize :config
|
96
99
|
|
97
100
|
def environment
|
98
101
|
Jets.env.to_s
|
@@ -9,11 +9,11 @@ gem "jetpacker"
|
|
9
9
|
<% if @database == 'postgresql' %>
|
10
10
|
# Include pg gem if you are using ActiveRecord, remove next line
|
11
11
|
# and config/database.yml file if you are not
|
12
|
-
gem "pg", "~> 1.
|
12
|
+
gem "pg", "~> 1.2.3"
|
13
13
|
<% elsif @database == 'mysql' %>
|
14
14
|
# Include mysql2 gem if you are using ActiveRecord, remove next line
|
15
15
|
# and config/database.yml file if you are not
|
16
|
-
gem "mysql2", "~> 0.5.
|
16
|
+
gem "mysql2", "~> 0.5.3"
|
17
17
|
<% end %>
|
18
18
|
<% unless options[:mode] == 'job' -%>
|
19
19
|
gem "dynomite"
|
@@ -17,10 +17,12 @@ class Jets::Controller
|
|
17
17
|
end
|
18
18
|
|
19
19
|
def skip_before_action(meth, options = {})
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
20
|
+
self.before_actions = before_actions
|
21
|
+
.reject { |act| act.first.to_s == meth.to_s }
|
22
|
+
|
23
|
+
# If options include the `only` option,
|
24
|
+
# re-add the action using the setter with the `except` option
|
25
|
+
before_action(meth, { except: options[:only] }) if options[:only].present?
|
24
26
|
end
|
25
27
|
|
26
28
|
alias_method :append_before_action, :before_action
|
@@ -38,20 +40,6 @@ class Jets::Controller
|
|
38
40
|
end
|
39
41
|
|
40
42
|
alias_method :append_after_action, :after_action
|
41
|
-
|
42
|
-
private
|
43
|
-
|
44
|
-
def append_except_to_callbacks(callback_methods, meth, excepted_methods)
|
45
|
-
callback_methods.map! do |callback_method|
|
46
|
-
if callback_method.first.to_s == meth.to_s
|
47
|
-
exceptions = callback_method.second[:except] || []
|
48
|
-
exceptions.concat(Array.wrap(excepted_methods))
|
49
|
-
callback_method.second[:except] = exceptions
|
50
|
-
end
|
51
|
-
|
52
|
-
callback_method
|
53
|
-
end
|
54
|
-
end
|
55
43
|
end
|
56
44
|
end # included
|
57
45
|
|
data/lib/jets/core.rb
CHANGED
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: 3.0.
|
4
|
+
version: 3.0.10
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Tung Nguyen
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2021-
|
11
|
+
date: 2021-07-14 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: actionmailer
|