jets 4.0.4 → 4.0.5

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: a04cac354e7cc219602bd9a156eb26be7517025997ebfd4965e2d0678ddaee56
4
- data.tar.gz: 1e4d52b85a38f8058dc38538f32f6e0c551aacde7cd2ee444368f787486c7779
3
+ metadata.gz: 9573f84496ce6067ec6fd2ab846a9387c65755aea56eba1ab24ed35cf2a9cb04
4
+ data.tar.gz: bc403254b13de9d7db49a146d254b3269b9b02b748e504c98f88ebcd293c20be
5
5
  SHA512:
6
- metadata.gz: 9e8216af98538a02cfd1baed256f0b452daa5d626c6e7bde0093bbe37007e207dccd736122903351eba55615af1750ea1272134c6e8fc32c504f53d252e58fdc
7
- data.tar.gz: 7968a375e5a80deafc70b1c8261095b9ff9237471c73fb616c63531ed6080483d83745243d08f5ca33a9b92871ea9b1280c6f0e5beb64b26ee57fa9f2621bd75
6
+ metadata.gz: e81ee110ee967638949b27431392dda0717497d85ff5bb58613373088695be8b4aaaff706a9fbf7fedcf38fffe33d9bcb8842d1068cf9077637c3616d93fb822
7
+ data.tar.gz: fa499faf963ecdadbd9cfe0372dd9f02b1378550800a72496fac32b3e8438e05aa0763e9a473e7cfc02545fcaa5e945f7487735be754ee09eeb3950ed5f3d40d
data/CHANGELOG.md CHANGED
@@ -3,6 +3,10 @@
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
+ ## [4.0.5] - 2023-10-19
7
+ - [#665](https://github.com/boltops-tools/jets/pull/665) only add add_stage_name when request is present
8
+ - [#669](https://github.com/boltops-tools/jets/pull/669) Add optional command args to the jets runner command.
9
+
6
10
  ## [4.0.4] - 2023-09-07
7
11
  - [#662](https://github.com/boltops-tools/jets/pull/662) fix vpc iam permissions
8
12
 
@@ -14,4 +14,27 @@ puts "hello world: #{Jets.env}"
14
14
  ```
15
15
 
16
16
  $ jets runner file://script.rb
17
- hello world: development
17
+ hello world: development
18
+
19
+
20
+ Optionally pass in an argument on the command line:
21
+
22
+ Usage: jets runner file|Ruby code [args]
23
+
24
+ The argument will be assigned to the `args` variable.
25
+
26
+ Example:
27
+
28
+ $ jets runner 'puts "hello world with args: #{args}"' 123
29
+ hello world with args: 123
30
+
31
+
32
+ Example with script.rb:
33
+
34
+ ```ruby
35
+ puts "hello world with args: #{args}"
36
+ ```
37
+
38
+ $ jets runner file://script.rb 123
39
+ hello world with args: 123
40
+
@@ -72,8 +72,8 @@ module Jets::Commands
72
72
 
73
73
  desc "runner", "Run Ruby code in the context of Jets app non-interactively"
74
74
  long_desc Help.text(:runner)
75
- def runner(code)
76
- Runner.run(code)
75
+ def runner(code, args=nil)
76
+ Runner.run(code, args)
77
77
  end
78
78
 
79
79
  desc "dbconsole", "Starts DB REPL console"
@@ -1,5 +1,5 @@
1
1
  class Jets::Commands::Runner
2
- def self.run(code)
2
+ def self.run(code, args=nil)
3
3
  if code =~ %r{^file://}
4
4
  path = code.sub('file://', '')
5
5
  full_path = "#{Jets.root}/#{path}"
@@ -2,7 +2,7 @@ module Jets::CommonMethods
2
2
  extend Memoist
3
3
  # Add API Gateway Stage Name
4
4
  def add_stage_name(url)
5
- Jets::Controller::Stage.add(request.host, url)
5
+ Jets::Controller::Stage.add(request.host, url) if request.present?
6
6
  end
7
7
 
8
8
  def on_aws?
data/lib/jets/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module Jets
2
- VERSION = "4.0.4"
2
+ VERSION = "4.0.5"
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: 4.0.4
4
+ version: 4.0.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Tung Nguyen
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2023-09-07 00:00:00.000000000 Z
11
+ date: 2023-10-19 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: actionmailer
@@ -1101,7 +1101,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
1101
1101
  - !ruby/object:Gem::Version
1102
1102
  version: '0'
1103
1103
  requirements: []
1104
- rubygems_version: 3.4.17
1104
+ rubygems_version: 3.4.20
1105
1105
  signing_key:
1106
1106
  specification_version: 4
1107
1107
  summary: Ruby Serverless Framework