jets 1.8.14 → 1.9.0
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/.github/ISSUE_TEMPLATE/bug_report.md +5 -2
- data/CHANGELOG.md +6 -0
- data/jets.gemspec +1 -0
- data/lib/jets.rb +1 -0
- data/lib/jets/application.rb +11 -3
- data/lib/jets/commands/help/new.md +1 -1
- data/lib/jets/commands/main.rb +1 -4
- data/lib/jets/commands/sequence.rb +6 -6
- data/lib/jets/controller/base.rb +3 -1
- data/lib/jets/core.rb +5 -0
- data/lib/jets/lambda/dsl.rb +0 -4
- data/lib/jets/overrides/rails/common_methods.rb +7 -2
- data/lib/jets/stack.rb +0 -1
- data/lib/jets/stack/main/dsl.rb +0 -2
- data/lib/jets/version.rb +1 -1
- metadata +16 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 1e5eb71c2230e8be8a4ba872178be6c843c14792bbad449cea6f2d0a21578e46
|
4
|
+
data.tar.gz: 8602cef734ac3f5579163914341e484a6a95a5e8dd4a4256dfa44a3585663779
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 705d88b52c979388120c9a7d325b3e4616d1706b1e648f5a60971504eac7030995301f70b3ea7172098f4f11411797901366847b5c1179dc6ce8d34f9b458361
|
7
|
+
data.tar.gz: 227b1f84bac367c6acae699eebee9836695e4c9fe62178ee015df48bcf3f6aa708fca85abc60fa663f0524cb50e7b3e350e85b0c34cf800a247e97039c51c334
|
@@ -11,9 +11,12 @@ assignees: ''
|
|
11
11
|
Hi! Thanks for considering to file a bug with Jets. Please take the time to
|
12
12
|
answer the basic questions. Please try to be as detailed as possible.
|
13
13
|
To be sensitive to everyone's time, if not enough details are provided, the
|
14
|
-
issue may be closed without comment.
|
14
|
+
issue may be closed without comment. If you repeatedly fail to provide enough
|
15
|
+
details, you may be blocked from ever submitting issues to Jets again.
|
16
|
+
Please use your best judgment. 👍
|
15
17
|
|
16
|
-
If you are unsure this is a bug in Jets, please consider asking your question at
|
18
|
+
If you are unsure this is a bug in Jets, please consider asking your question at:
|
19
|
+
https://community.rubyonjets.com
|
17
20
|
|
18
21
|
Thanks!
|
19
22
|
-->
|
data/CHANGELOG.md
CHANGED
@@ -3,6 +3,12 @@
|
|
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
|
+
## [1.9.0]
|
7
|
+
- #249 docs grammar improvements
|
8
|
+
- #252 docs cli improvements
|
9
|
+
- #254 speed up development auto reloading
|
10
|
+
- #256 dont add /dev prefix if on_cloud9
|
11
|
+
|
6
12
|
## [1.8.14]
|
7
13
|
- update jets-gems
|
8
14
|
|
data/jets.gemspec
CHANGED
@@ -56,6 +56,7 @@ Gem::Specification.new do |spec|
|
|
56
56
|
spec.add_dependency "recursive-open-struct"
|
57
57
|
spec.add_dependency "text-table"
|
58
58
|
spec.add_dependency "thor"
|
59
|
+
spec.add_dependency "zeitwerk"
|
59
60
|
|
60
61
|
spec.add_development_dependency "byebug"
|
61
62
|
spec.add_development_dependency "bundler"
|
data/lib/jets.rb
CHANGED
data/lib/jets/application.rb
CHANGED
@@ -189,9 +189,13 @@ class Jets::Application
|
|
189
189
|
|
190
190
|
def setup_auto_load_paths
|
191
191
|
autoload_paths = config.autoload_paths + config.extra_autoload_paths
|
192
|
-
# internal_autoload_paths are last
|
193
|
-
autoload_paths
|
194
|
-
|
192
|
+
autoload_paths += internal_autoload_paths # internal_autoload_paths are last
|
193
|
+
autoload_paths.each do |path|
|
194
|
+
next unless File.exist?(path)
|
195
|
+
Jets.loader.push_dir(path)
|
196
|
+
end
|
197
|
+
Jets.loader.enable_reloading if Jets.env.development?
|
198
|
+
Jets.loader.setup
|
195
199
|
end
|
196
200
|
|
197
201
|
# Essentially folders under app folder will be the default_autoload_paths. Example:
|
@@ -216,6 +220,10 @@ class Jets::Application
|
|
216
220
|
p.sub!('./','')
|
217
221
|
paths << p unless exclude_autoload_path?(p)
|
218
222
|
end
|
223
|
+
|
224
|
+
paths << "#{Jets.root}/app/shared/resources"
|
225
|
+
paths << "#{Jets.root}/app/shared/extensions"
|
226
|
+
|
219
227
|
paths
|
220
228
|
end
|
221
229
|
|
data/lib/jets/commands/main.rb
CHANGED
@@ -36,12 +36,9 @@ module Jets::Commands
|
|
36
36
|
long_desc Help.text(:server)
|
37
37
|
option :port, default: "8888", desc: "use PORT"
|
38
38
|
option :host, default: "127.0.0.1", desc: "listen on HOST"
|
39
|
-
option :reload, type: :boolean, default: true, desc: "Enables hot-reloading for development"
|
40
39
|
def server
|
41
|
-
# shell out to shotgun for automatic reloading
|
42
40
|
o = options
|
43
|
-
|
44
|
-
command = "bundle exec #{server_command} --port #{o[:port]} --host #{o[:host]}"
|
41
|
+
command = "bundle exec rackup --port #{o[:port]} --host #{o[:host]}"
|
45
42
|
puts "=> #{command}".color(:green)
|
46
43
|
puts Jets::Booter.message
|
47
44
|
Jets::Booter.check_config_ru!
|
@@ -12,7 +12,7 @@ class Jets::Commands::Sequence < Thor::Group
|
|
12
12
|
private
|
13
13
|
def clone_project
|
14
14
|
unless git_installed?
|
15
|
-
abort "Unable to detect git installation on your system.
|
15
|
+
abort "Unable to detect git installation on your system. Git needs to be installed in order to use the --repo option."
|
16
16
|
end
|
17
17
|
|
18
18
|
if File.exist?(project_folder)
|
@@ -26,13 +26,13 @@ private
|
|
26
26
|
def confirm_jets_project
|
27
27
|
jets_project = File.exist?("#{project_folder}/config/application.rb")
|
28
28
|
unless jets_project
|
29
|
-
puts "
|
29
|
+
puts "#{options[:repo]} does not look like a Jets project. Double check your repo!".color(:red)
|
30
30
|
exit 1
|
31
31
|
end
|
32
32
|
end
|
33
33
|
|
34
34
|
def copy_project
|
35
|
-
puts "Creating new project called #{@project_name}."
|
35
|
+
puts "Creating a new Jets project called #{@project_name}."
|
36
36
|
directory ".", project_folder, copy_options
|
37
37
|
end
|
38
38
|
|
@@ -65,9 +65,9 @@ private
|
|
65
65
|
end
|
66
66
|
|
67
67
|
unless @database
|
68
|
-
# Do not even
|
69
|
-
#
|
70
|
-
# config/database.yml but
|
68
|
+
# Do not even generate the config/database.yml because
|
69
|
+
# Jets webpacker:install bombs and tries to load the db since it sees a
|
70
|
+
# config/database.yml but there's no database pg gem configured.
|
71
71
|
excludes += %w[
|
72
72
|
database.yml
|
73
73
|
models/application_record
|
data/lib/jets/controller/base.rb
CHANGED
@@ -35,6 +35,8 @@ class Jets::Controller
|
|
35
35
|
end
|
36
36
|
|
37
37
|
def dispatch!
|
38
|
+
Jets.loader.reload if Jets.env.development?
|
39
|
+
|
38
40
|
t1 = Time.now
|
39
41
|
log_info_start
|
40
42
|
|
@@ -45,7 +47,7 @@ class Jets::Controller
|
|
45
47
|
else
|
46
48
|
Jets.logger.info "Filter chain halted as #{@last_callback_name} rendered or redirected"
|
47
49
|
end
|
48
|
-
|
50
|
+
|
49
51
|
triplet = ensure_render
|
50
52
|
run_after_actions if action_completed
|
51
53
|
rescue Exception => exception
|
data/lib/jets/core.rb
CHANGED
data/lib/jets/lambda/dsl.rb
CHANGED
@@ -404,10 +404,6 @@ module Jets::Lambda::Dsl
|
|
404
404
|
|
405
405
|
def self.add_custom_resource_extensions(base)
|
406
406
|
base_path = "#{Jets.root}/app/extensions"
|
407
|
-
unless ActiveSupport::Dependencies.autoload_paths.include?(base_path)
|
408
|
-
ActiveSupport::Dependencies.autoload_paths += [base_path]
|
409
|
-
end
|
410
|
-
|
411
407
|
Dir.glob("#{base_path}/**/*.rb").each do |path|
|
412
408
|
next unless File.file?(path)
|
413
409
|
|
@@ -9,13 +9,18 @@ module Jets::CommonMethods
|
|
9
9
|
end
|
10
10
|
|
11
11
|
def add_stage?(url)
|
12
|
+
return false if on_cloud9?
|
12
13
|
request.host.include?("amazonaws.com") && url.starts_with?('/')
|
13
14
|
end
|
14
15
|
memoize :add_stage?
|
15
16
|
|
16
17
|
def on_aws?
|
17
|
-
|
18
|
-
!request.headers['HTTP_X_AMZN_TRACE_ID'].nil? && !on_cloud9
|
18
|
+
!request.headers['HTTP_X_AMZN_TRACE_ID'].nil? && !on_cloud9?
|
19
19
|
end
|
20
20
|
memoize :on_aws?
|
21
|
+
|
22
|
+
def on_cloud9?
|
23
|
+
!!(request.headers['HTTP_HOST'] =~ /cloud9\..*\.amazonaws\.com/)
|
24
|
+
end
|
25
|
+
memoize :on_cloud9?
|
21
26
|
end
|
data/lib/jets/stack.rb
CHANGED
@@ -88,7 +88,6 @@ module Jets
|
|
88
88
|
end
|
89
89
|
|
90
90
|
def eager_load_shared_resources!
|
91
|
-
ActiveSupport::Dependencies.autoload_paths += ["#{Jets.root}/app/shared/resources"]
|
92
91
|
Dir.glob("#{Jets.root}/app/shared/resources/**/*.rb").select do |path|
|
93
92
|
next if !File.file?(path) or path =~ %r{/javascript/} or path =~ %r{/views/}
|
94
93
|
|
data/lib/jets/stack/main/dsl.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: 1.
|
4
|
+
version: 1.9.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: 2019-05-
|
11
|
+
date: 2019-05-23 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: actionmailer
|
@@ -388,6 +388,20 @@ dependencies:
|
|
388
388
|
- - ">="
|
389
389
|
- !ruby/object:Gem::Version
|
390
390
|
version: '0'
|
391
|
+
- !ruby/object:Gem::Dependency
|
392
|
+
name: zeitwerk
|
393
|
+
requirement: !ruby/object:Gem::Requirement
|
394
|
+
requirements:
|
395
|
+
- - ">="
|
396
|
+
- !ruby/object:Gem::Version
|
397
|
+
version: '0'
|
398
|
+
type: :runtime
|
399
|
+
prerelease: false
|
400
|
+
version_requirements: !ruby/object:Gem::Requirement
|
401
|
+
requirements:
|
402
|
+
- - ">="
|
403
|
+
- !ruby/object:Gem::Version
|
404
|
+
version: '0'
|
391
405
|
- !ruby/object:Gem::Dependency
|
392
406
|
name: byebug
|
393
407
|
requirement: !ruby/object:Gem::Requirement
|