jets 5.0.11 → 5.0.12

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: e0f81036f4a6561d9a79f029ca1362a8f48ad234b5318d97126b4530aee2ea27
4
- data.tar.gz: 1051b3344523c20ed370a2602b65de25c71d1bce50a5c7cb67ef9dcbcd97e190
3
+ metadata.gz: e7a09da0f4d38d90cbf007185c92a6ac45382d21caa6da587bf5e8109f353ea9
4
+ data.tar.gz: 37ee931ef499eb48cb2f0f69884c799294b82ef0e16ecbe4222f9f6d76966acd
5
5
  SHA512:
6
- metadata.gz: f47b839cb9d3138c110d825a3936f0b823b7317e9f6559de1b199f64bad9820bd7716d04576f16ee27242a82e3090877967a6bc540dbe611afdd065e44deb8ff
7
- data.tar.gz: a3bca9d28b17ce9a133b1a35bb01154e35601233ce9630172c5be15fe063e341df8af12d6a534628f8c022ac93093276bb879921e8b69d39b9dcc167cc34195b
6
+ metadata.gz: 81148dc32dd42d5a1b0bdcbe1fd32350dde3370b53a1f7035d77f5dc08b2c991fc4913009c6792165b6d39199a2474d872dd124cbc71c27be10cbb454587b4f3
7
+ data.tar.gz: '09f4fe05d4104875d76148f12c76b85ba02cc65b5fd25f1801c628b62dd55d072362e1636922a9545513fd7c86eebc4afc6a9629c7d72b3ca244ce4ca948907e'
data/CHANGELOG.md CHANGED
@@ -3,6 +3,9 @@
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
+ ## [5.0.12] - 2024-04-15
7
+ - [#718](https://github.com/rubyonjets/jets/pull/718) fixes for dotenv 3.1
8
+
6
9
  ## [5.0.11] - 2024-03-20
7
10
  - [#711](https://github.com/rubyonjets/jets/pull/711) Fix controller testing in jets 5 - handling of params and query
8
11
  - [#715](https://github.com/rubyonjets/jets/pull/715) remove force_encoding that causes issues for international characters
data/jets.gemspec CHANGED
@@ -1,30 +1,28 @@
1
- # coding: utf-8
2
1
  lib = File.expand_path("../lib", __FILE__)
3
2
  $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
4
3
  require "jets/version"
5
4
  require "jets/rdoc"
6
5
 
7
6
  Gem::Specification.new do |spec|
8
- spec.name = "jets"
9
- spec.version = Jets::VERSION
10
- spec.author = "Tung Nguyen"
11
- spec.email = "tongueroo@gmail.com"
12
- spec.summary = "Ruby Serverless Framework"
13
- spec.description = "Jets is a framework that allows you to create serverless applications with a beautiful language: Ruby. It includes everything required to build and deploy an application. Jets leverages the power of Ruby to make serverless joyful for everyone."
14
- spec.homepage = "https://rubyonjets.com"
15
- spec.license = "MIT"
7
+ spec.name = "jets"
8
+ spec.version = Jets::VERSION
9
+ spec.author = "Tung Nguyen"
10
+ spec.email = "tongueroo@gmail.com"
11
+ spec.summary = "Ruby Serverless Framework"
12
+ spec.description = "Jets is a framework that allows you to create serverless applications with a beautiful language: Ruby. It includes everything required to build and deploy an application. Jets leverages the power of Ruby to make serverless joyful for everyone."
13
+ spec.homepage = "https://rubyonjets.com"
14
+ spec.license = "MIT"
16
15
 
17
- spec.required_ruby_version = ['>= 2.7.0']
16
+ spec.required_ruby_version = [">= 2.7.0"]
18
17
  spec.rdoc_options += Jets::Rdoc.options
19
18
 
20
- vendor_files = Dir.glob("vendor/**/*")
21
- gem_files = `git -C "#{File.dirname(__FILE__)}" ls-files -z`.split("\x0").reject do |f|
19
+ vendor_files = Dir.glob("vendor/**/*")
20
+ gem_files = `git -C "#{File.dirname(__FILE__)}" ls-files -z`.split("\x0").reject do |f|
22
21
  f.match(%r{^(test|spec|features|docs)/})
23
22
  end
24
- spec.files = gem_files + vendor_files
25
- spec.bindir = "exe"
26
- spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
27
- spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
23
+ spec.files = gem_files + vendor_files
24
+ spec.bindir = "exe"
25
+ spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
28
26
  spec.require_paths = ["lib"]
29
27
 
30
28
  spec.add_dependency "actionmailer", "~> 7.0.8"
@@ -50,7 +48,7 @@ Gem::Specification.new do |spec|
50
48
  spec.add_dependency "cfn_response"
51
49
  spec.add_dependency "cfn-status", ">= 0.5.0"
52
50
  spec.add_dependency "cli-format", ">= 0.4.0"
53
- spec.add_dependency "dotenv"
51
+ spec.add_dependency "dotenv", ">= 3.1"
54
52
  spec.add_dependency "dsl_evaluator", ">= 0.3.0" # for DslEvaluator.print_code
55
53
  spec.add_dependency "gems"
56
54
  spec.add_dependency "hashie"
data/lib/jets/dotenv.rb CHANGED
@@ -1,23 +1,29 @@
1
- require 'dotenv'
1
+ require "dotenv"
2
2
 
3
3
  class Jets::Dotenv
4
- def self.load!(remote=false)
4
+ def self.load!(remote = false)
5
5
  new(remote).load!
6
6
  end
7
7
 
8
- def initialize(remote=false)
9
- @remote = ENV['JETS_ENV_REMOTE'] || remote
8
+ def initialize(remote = false)
9
+ @remote = ENV["JETS_ENV_REMOTE"] || remote
10
10
  end
11
11
 
12
+ # @@vars cache to prevent multiple calls to Ssm
13
+ # Tricky note: The cache also prevents the second call to Dotenv.load from
14
+ # returning {} vars. Dotenv 3.0 will not return the vars if it has already been loaded
15
+ # in the ENV. We want this side-effect due to the new way Dotenv 3.0 works.
16
+ @@vars = nil
12
17
  def load!
18
+ return @@vars if @@vars
13
19
  return if on_aws? # this prevents ssm calls if used in dotenv files
14
20
  vars = ::Dotenv.load(*dotenv_files)
15
- Ssm.new(vars).interpolate!
21
+ @@vars = Ssm.new(vars).interpolate!
16
22
  end
17
23
 
18
24
  def on_aws?
19
- return true if ENV['ON_AWS']
20
- !!ENV['_HANDLER'] # https://docs.aws.amazon.com/lambda/latest/dg/lambda-environment-variables.html
25
+ return true if ENV["ON_AWS"]
26
+ !!ENV["_HANDLER"] # https://docs.aws.amazon.com/lambda/latest/dg/lambda-environment-variables.html
21
27
  end
22
28
 
23
29
  # dotenv files with the following precedence:
@@ -30,17 +36,16 @@ class Jets::Dotenv
30
36
  # - .env - The original (lowest)
31
37
  #
32
38
  def dotenv_files
33
- files = [
34
- root.join(".env"),
35
- (root.join(".env.local") unless (Jets.env.test? || @remote)),
36
- root.join(".env.#{Jets.env}"),
37
- (root.join(".env.#{Jets.env}.local") unless @remote),
38
- ]
39
+ files = []
40
+
41
+ files << files << root.join(".env.#{Jets.env}.#{Jets.extra}") if Jets.extra
39
42
  files << root.join(".env.#{Jets.env}.remote") if @remote
40
- if Jets.extra
41
- files << root.join(".env.#{Jets.env}.#{Jets.extra}")
42
- end
43
- files.compact
43
+ files << root.join(".env.#{Jets.env}.local") unless @remote
44
+ files << root.join(".env.#{Jets.env}")
45
+ files << root.join(".env.local") unless Jets.env.test? || @remote
46
+ files << root.join(".env")
47
+
48
+ files.compact.map(&:to_s)
44
49
  end
45
50
 
46
51
  def root
data/lib/jets/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module Jets
2
- VERSION = "5.0.11"
2
+ VERSION = "5.0.12"
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: 5.0.11
4
+ version: 5.0.12
5
5
  platform: ruby
6
6
  authors:
7
7
  - Tung Nguyen
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2024-03-20 00:00:00.000000000 Z
11
+ date: 2024-04-15 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: actionmailer
@@ -324,14 +324,14 @@ dependencies:
324
324
  requirements:
325
325
  - - ">="
326
326
  - !ruby/object:Gem::Version
327
- version: '0'
327
+ version: '3.1'
328
328
  type: :runtime
329
329
  prerelease: false
330
330
  version_requirements: !ruby/object:Gem::Requirement
331
331
  requirements:
332
332
  - - ">="
333
333
  - !ruby/object:Gem::Version
334
- version: '0'
334
+ version: '3.1'
335
335
  - !ruby/object:Gem::Dependency
336
336
  name: dsl_evaluator
337
337
  requirement: !ruby/object:Gem::Requirement