jets 0.10.0 → 0.10.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: e4eba3758c709669dde525de421e7ed5241c0b2e1b4c0488fe928744501f94ca
4
- data.tar.gz: 37565466a6f5f8382424a110893bf7237012dba8e25eed7cd16ca133fdfd648d
3
+ metadata.gz: 3831bca90084f7a67e71a09765d320e8be408b50a6dbc16daba01ffc0cfadf2a
4
+ data.tar.gz: 98c96cac69d5c85ae965609e18294d270be098362b8911e84f936d33f31b230a
5
5
  SHA512:
6
- metadata.gz: 5cf83a19ca5a635226316bee54bec5c0ab3b74b9dcf25850f0b55ce32798943dc7b280ee25e1b1ef7cf3f9862f1e287b63e38de13f5771378293f2f3be20cea1
7
- data.tar.gz: aeb7657e68051f368fc97c7aa888e03aae1c001ed17e11b34d9cfa0f18c40a9a3987775d7a5b5eea378ab23af0beb03c55b17c3a8877756876d4864ee8cf1c78
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.0)
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.104.0)
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)
@@ -1,7 +1,7 @@
1
1
  module Jets::Commands
2
2
  class New < Sequence
3
3
  VALID_MODES = %w[html api job]
4
- argument :project_name
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 set_api_mode
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}/#{project_name}"
46
+ destination_root = "#{Dir.pwd}/#{project_folder}"
45
47
  self.destination_root = destination_root
46
- FileUtils.cd("#{Dir.pwd}/#{project_name}")
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 #{project_name}
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?(project_name)
21
- abort "The folder #{project_name} already exists."
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]} #{project_name}"
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?("#{project_name}/config/application.rb")
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 ".", project_name, copy_options
37
+ puts "Creating new project called #{@project_name}."
38
+ directory ".", project_folder, copy_options
39
39
  end
40
40
 
41
41
  def copy_options
@@ -1,3 +1,3 @@
1
1
  # Example .env.development, meant to be updated.
2
2
  ENV_DEVELOPMENT_KEY=example1
3
- # DATABASE_URL=postgresql://dbuser:dbpass@localhost/<%= project_name %>_dev?pool=5
3
+ # DATABASE_URL=postgresql://dbuser:dbpass@localhost/<%= @project_name %>_dev?pool=5
@@ -1,5 +1,5 @@
1
1
  Jets.application.configure do
2
- config.project_name = "<%= project_name %>"
2
+ config.project_name = "<%= @project_name %>"
3
3
  config.api_mode = <%= @options[:mode] == 'api' %>
4
4
 
5
5
  # config.prewarm.enable = true # default is true
@@ -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
- # TODO: binary support doesn't quite work yet.
22
- # We have to add '*/*' as a binary media type to the API Gateway RestApi
23
- # to enable binary support without having to send a Accept header.
24
- # But doing so breaks regular form submission. Figure out how to workaround this.
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
@@ -253,6 +253,7 @@ module Jets::Lambda::Dsl
253
253
  @iam_policy = nil
254
254
  @managed_iam_policy = nil
255
255
  @associated_resources = nil
256
+ @associated_properties = nil
256
257
  end
257
258
 
258
259
  # Returns the all tasks for this class with their method names as keys.
data/lib/jets/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module Jets
2
- VERSION = "0.10.0"
2
+ VERSION = "0.10.1"
3
3
  end
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.0
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-26 00:00:00.000000000 Z
11
+ date: 2018-09-27 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: actionpack