jets 0.10.0 → 0.10.1
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 +5 -0
- data/Gemfile.lock +2 -2
- data/lib/jets/commands/new.rb +7 -5
- data/lib/jets/commands/sequence.rb +6 -6
- data/lib/jets/commands/templates/skeleton/.env.development.tt +1 -1
- data/lib/jets/commands/templates/skeleton/config/application.rb.tt +1 -1
- data/lib/jets/commands/templates/skeleton/config/database.yml.tt +4 -4
- data/lib/jets/internal/app/controllers/jets/public_controller.rb +4 -4
- data/lib/jets/lambda/dsl.rb +1 -0
- 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: 3831bca90084f7a67e71a09765d320e8be408b50a6dbc16daba01ffc0cfadf2a
|
4
|
+
data.tar.gz: 98c96cac69d5c85ae965609e18294d270be098362b8911e84f936d33f31b230a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c7e5c6646d2253b6d497562ee823544b21eb067ecdcce6e3791ad16c98aec23055c24e805020dbd3660e360000d54920c7c42025c7a7521c81cd1ebc24ae0647
|
7
|
+
data.tar.gz: 76429beaecd48a4786c97de85518148b271ea29cd97f97a752ba3e5fa603de439f0642f0e959664f22d3cb76703f25d528303bf69adba477138440e606f25b59
|
data/CHANGELOG.md
CHANGED
@@ -3,6 +3,11 @@
|
|
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.10.1]
|
7
|
+
- clear @associated_properties bug
|
8
|
+
- fix jets new . , Merge pull request #46 from tongueroo/jets-new-dot
|
9
|
+
- update upgrade notes
|
10
|
+
|
6
11
|
## [0.10.0]
|
7
12
|
- Merge pull request #45 from tongueroo/remove-internal-welcome
|
8
13
|
- Fix routing: Allow multiple paths to point to same controller action
|
data/Gemfile.lock
CHANGED
@@ -11,7 +11,7 @@ GIT
|
|
11
11
|
PATH
|
12
12
|
remote: .
|
13
13
|
specs:
|
14
|
-
jets (0.10.
|
14
|
+
jets (0.10.1)
|
15
15
|
actionpack (>= 5.2.1)
|
16
16
|
actionview (>= 5.2.1)
|
17
17
|
activerecord (>= 5.2.1)
|
@@ -65,7 +65,7 @@ GEM
|
|
65
65
|
tzinfo (~> 1.1)
|
66
66
|
arel (9.0.0)
|
67
67
|
aws-eventstream (1.0.1)
|
68
|
-
aws-partitions (1.
|
68
|
+
aws-partitions (1.105.0)
|
69
69
|
aws-sdk-cloudformation (1.8.0)
|
70
70
|
aws-sdk-core (~> 3, >= 3.26.0)
|
71
71
|
aws-sigv4 (~> 1.0)
|
data/lib/jets/commands/new.rb
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
module Jets::Commands
|
2
2
|
class New < Sequence
|
3
3
|
VALID_MODES = %w[html api job]
|
4
|
-
argument :
|
4
|
+
argument :project_folder
|
5
5
|
|
6
6
|
# Ugly, but when the class_option is only defined in the Thor::Group class
|
7
7
|
# it doesnt show up with jets new help :(
|
@@ -22,7 +22,9 @@ module Jets::Commands
|
|
22
22
|
class_option(*args)
|
23
23
|
end
|
24
24
|
|
25
|
-
def
|
25
|
+
def set_initial_variables
|
26
|
+
@project_name = project_folder == '.' ? File.basename(Dir.pwd) : project_folder
|
27
|
+
|
26
28
|
# options is a frozen hash by Thor so cannot modify it.
|
27
29
|
# Also had trouble unfreezing it with .dup. So using instance variables instead
|
28
30
|
case options[:mode]
|
@@ -41,9 +43,9 @@ module Jets::Commands
|
|
41
43
|
def create_project
|
42
44
|
options[:repo] ? clone_project : copy_project
|
43
45
|
|
44
|
-
destination_root = "#{Dir.pwd}/#{
|
46
|
+
destination_root = "#{Dir.pwd}/#{project_folder}"
|
45
47
|
self.destination_root = destination_root
|
46
|
-
FileUtils.cd("#{Dir.pwd}/#{
|
48
|
+
FileUtils.cd("#{Dir.pwd}/#{project_folder}")
|
47
49
|
end
|
48
50
|
|
49
51
|
def make_bin_executable
|
@@ -122,7 +124,7 @@ JS
|
|
122
124
|
Congrats 🎉 You have successfully created a Jets project.
|
123
125
|
|
124
126
|
Cd into the project directory:
|
125
|
-
cd #{
|
127
|
+
cd #{project_folder}
|
126
128
|
|
127
129
|
#{more_info}
|
128
130
|
EOL
|
@@ -17,16 +17,16 @@ private
|
|
17
17
|
abort "Unable to detect git installation on your system. Git needs to be installed in order to use the --repo option."
|
18
18
|
end
|
19
19
|
|
20
|
-
if File.exist?(
|
21
|
-
abort "The folder #{
|
20
|
+
if File.exist?(project_folder)
|
21
|
+
abort "The folder #{project_folder} already exists."
|
22
22
|
else
|
23
|
-
run "git clone https://github.com/#{options[:repo]} #{
|
23
|
+
run "git clone https://github.com/#{options[:repo]} #{project_folder}"
|
24
24
|
end
|
25
25
|
confirm_jets_project
|
26
26
|
end
|
27
27
|
|
28
28
|
def confirm_jets_project
|
29
|
-
jets_project = File.exist?("#{
|
29
|
+
jets_project = File.exist?("#{project_folder}/config/application.rb")
|
30
30
|
unless jets_project
|
31
31
|
puts "It does not look like the repo #{options[:repo]} is a jets project. Maybe double check that it is? Exited.".colorize(:red)
|
32
32
|
exit 1
|
@@ -34,8 +34,8 @@ private
|
|
34
34
|
end
|
35
35
|
|
36
36
|
def copy_project
|
37
|
-
puts "Creating new project called #{project_name}."
|
38
|
-
directory ".",
|
37
|
+
puts "Creating new project called #{@project_name}."
|
38
|
+
directory ".", project_folder, copy_options
|
39
39
|
end
|
40
40
|
|
41
41
|
def copy_options
|
@@ -2,7 +2,7 @@ default: &default
|
|
2
2
|
adapter: postgresql
|
3
3
|
encoding: utf8
|
4
4
|
pool: <%%= ENV["DB_POOL"] || 5 %>
|
5
|
-
database: <%%= ENV['DB_NAME'] || '<%= project_name %>_dev' %>
|
5
|
+
database: <%%= ENV['DB_NAME'] || '<%= @project_name %>_dev' %>
|
6
6
|
username: <%%= ENV['DB_USER'] || ENV['USER'] %>
|
7
7
|
password: <%%= ENV['DB_PASS'] %>
|
8
8
|
host: <%%= ENV["DB_HOST"] %>
|
@@ -10,13 +10,13 @@ default: &default
|
|
10
10
|
|
11
11
|
development:
|
12
12
|
<<: *default
|
13
|
-
database: <%%= ENV['DB_NAME'] || '<%= project_name %>_dev' %>
|
13
|
+
database: <%%= ENV['DB_NAME'] || '<%= @project_name %>_dev' %>
|
14
14
|
|
15
15
|
test:
|
16
16
|
<<: *default
|
17
|
-
database: <%= project_name %>_test
|
17
|
+
database: <%= @project_name %>_test
|
18
18
|
|
19
19
|
production:
|
20
20
|
<<: *default
|
21
|
-
database: <%= project_name %>_prod
|
21
|
+
database: <%= @project_name %>_prod
|
22
22
|
url: <%%= ENV['DATABASE_URL'] %>
|
@@ -18,10 +18,10 @@ class Jets::PublicController < Jets::Controller::Base
|
|
18
18
|
content_type = Rack::Mime.mime_type(File.extname(catchall_path))
|
19
19
|
binary = !MimeMagic.by_path(catchall_path).text?
|
20
20
|
|
21
|
-
#
|
22
|
-
#
|
23
|
-
#
|
24
|
-
#
|
21
|
+
# For binary support to work, the client also has to send the right Accept header.
|
22
|
+
# And the media type has been to added to api gateway.
|
23
|
+
# Cavaet: adding * to as the media type breaks regular form submission.
|
24
|
+
# All form submission gets treated as binary.
|
25
25
|
if binary
|
26
26
|
encoded_content = Base64.encode64(IO.read(catchall_path))
|
27
27
|
render plain: encoded_content, content_type: content_type, base64: true
|
data/lib/jets/lambda/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: 0.10.
|
4
|
+
version: 0.10.1
|
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-27 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: actionpack
|