jets 3.0.14 → 3.0.15

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: 571efa758f33bf44042d6e8be73c933011680217cd4e87b0324f85b5fc7c37dc
4
- data.tar.gz: fac7b4ceae0b9d7e0fe8f494f57cf409d71a08d26dbd259424800d3a9feb268b
3
+ metadata.gz: 58e203dbd0ee79c9e7287badab576597b08f0b3f5fd3f1b5309bfa910cbf2858
4
+ data.tar.gz: 1a29ba9a72f042b156312d47acdeebee565f6dc4a5c3d3ee109931723e59b583
5
5
  SHA512:
6
- metadata.gz: 3ee364750aaa8c1f74a92ec9da2363e77cd7af84db97977b54a40cb087a32bbbec4e413b5cac5117018468c84b23ed18646f5416b9aaf3d425e668dabfb21b6c
7
- data.tar.gz: 446e82b01a2d07679d1f51f8dd7e461d7ddfd67a46759fc22fa59c740fe8f6011a711a7acdc80ea1d4e62786f8e79eec7596c283f3758fd9734546d2bb555953
6
+ metadata.gz: 6c6f2d06e54b0837f30c9a064e48252330a72a770b1b0f51e1884ab4820291220565b696f505cfe5645a3de2d428a3c380bc2c7f8d8873ae8819f2f5f0c0a6ef
7
+ data.tar.gz: 95a8262ad30c8a593a2c23fed954528e4d0801cd8260ae81e7c974f89d1e8c05c34c3778a7422f356de30c410bae9a9313ebf677e440d7b06d379aa7580421f8
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/).
5
5
 
6
+ ## [3.0.15] - 2021-09-05
7
+ - [#587](https://github.com/boltops-tools/jets/pull/587) Fix private method names
8
+ - [#588](https://github.com/boltops-tools/jets/pull/588) custom domain: adjust rate limit for base mapping
9
+ - [#589](https://github.com/boltops-tools/jets/pull/589) Ujs
10
+
6
11
  ## [3.0.14] - 2021-09-01
7
12
  - [#583](https://github.com/boltops-tools/jets/pull/583) Don't overwrite content_type when rendering json or xml with content_type specified
8
13
  - [#584](https://github.com/boltops-tools/jets/pull/584) Adds an override flag to change behaviour when Jets is behind an ELB running Jets Server
@@ -114,7 +114,14 @@ JS
114
114
  after = "const { environment } = require('@rails/webpacker')\n"
115
115
  insert_into_file("config/webpack/environment.js", jquery, after: after)
116
116
 
117
- run("yarn add bootstrap jquery popper.js postcss-cssnext @rails/ujs")
117
+ jets_ujs =<<-JS
118
+ import Jets from "@rubyonjets/ujs-compat"
119
+ Jets.start()
120
+ JS
121
+ after = "Rails.start()\n"
122
+ insert_into_file("app/javascript/packs/application.js", jets_ujs, after: after)
123
+
124
+ run("yarn add bootstrap jquery popper.js postcss-cssnext @rails/ujs @rubyonjets/ujs-compat")
118
125
  end
119
126
 
120
127
  def git_init
@@ -5,17 +5,17 @@ class Jets::Controller::Middleware::Local
5
5
  end
6
6
 
7
7
  def find_route
8
- Jets::Router::Finder.new(method, path).run
8
+ Jets::Router::Finder.new(path, method).run
9
9
  end
10
10
 
11
11
  private
12
12
  attr_reader :env
13
13
 
14
- def path
14
+ def method
15
15
  env["REQUEST_METHOD"] || "GET"
16
16
  end
17
17
 
18
- def method
18
+ def path
19
19
  env["PATH_INFO"].sub(/^\//,'')
20
20
  end
21
21
  end
@@ -56,7 +56,7 @@ class <%= controller_class_name %>Controller < ApplicationController
56
56
  def delete
57
57
  @<%= orm_instance.destroy %>
58
58
  if request.xhr?
59
- render json: {success: true}
59
+ render json: {success: true, location: <%= table_name %>_path}
60
60
  else
61
61
  redirect_to <%= table_name %>_path
62
62
  end
@@ -4,6 +4,25 @@ require 'aws-sdk-cloudformation'
4
4
  class BasePathMapping
5
5
  def initialize(event, stage_name)
6
6
  @event, @stage_name = event, stage_name
7
+ aws_config_update!
8
+ end
9
+
10
+ # Override the AWS retry settings. The aws-sdk-core has expondential backup with this formula:
11
+ #
12
+ # 2 ** c.retries * c.config.retry_base_delay
13
+ #
14
+ # So the max delay will be 2 ** 7 * 0.6 = 76.8s
15
+ #
16
+ # Useful links:
17
+ #
18
+ # https://github.com/aws/aws-sdk-ruby/blob/master/gems/aws-sdk-core/lib/aws-sdk-core/plugins/retry_errors.rb
19
+ # https://docs.aws.amazon.com/apigateway/latest/developerguide/limits.html
20
+ #
21
+ def aws_config_update!
22
+ Aws.config.update(
23
+ retry_limit: 7, # default: 3
24
+ retry_base_delay: 0.6, # default: 0.3
25
+ )
7
26
  end
8
27
 
9
28
  # Cannot use update_base_path_mapping to update the base_mapping because it doesnt
data/lib/jets/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module Jets
2
- VERSION = "3.0.14"
2
+ VERSION = "3.0.15"
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: 3.0.14
4
+ version: 3.0.15
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-09-01 00:00:00.000000000 Z
11
+ date: 2021-09-05 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: actionmailer