souls 1.19.9 → 1.20.0

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: 47404f43681adfd3c3ee24a1bcec31e7e538f944d4b55b6d43b2024888a9a169
4
- data.tar.gz: b883f0d9337e02c3ffc75ec982a156f393618b752991a256303975e80130f362
3
+ metadata.gz: 690c4e033ba2db83f5f7889ac33cd199dbd4cd6b9b69f83c9d55cdd97ff5d3b3
4
+ data.tar.gz: aaf41d5d0ffaf0610c1cf99f26eb67df7e8c1d59e0bf40dd4b2eb525e3839ae4
5
5
  SHA512:
6
- metadata.gz: 414619b49aa78b8e735705ee0e4b278d1159345a652d386bbe3cd19f80b6997584968110ce3fee19f6b135b289d0a5544cd1d774b83303dc5d1d0deab3d7e6aa
7
- data.tar.gz: 6c98c7ca8c8ac5ed740649dfecb5ab899571b2421d95c5840e68087b1c4fc24aa32b239fbad6989d51afe787b5424a5c6c6cb5d3c0fda98b795cb2a5b6d173d1
6
+ metadata.gz: f0a118b3bedfa8fdf60f6f7125b05dd05a9a49d2e818dad1bcfab50f98586fa173fdbbaa0417083dc0fa857c12461a18e54d628b365b40e57d693d6aa9323f96
7
+ data.tar.gz: ec064cf74ce3992b7169aca42b2f208eb3c81ce7dd2855df4b0c9f1a474028ca8d1b1631ac057d0864e81214fec48c71786bb8ebf6c6f1d358a48567d3d13818
@@ -1,6 +1,6 @@
1
- require_relative "./templates/functions_env_yaml"
1
+ require_relative "./templates/functions/functions_env_yaml"
2
2
 
3
- Dir["#{SOULs::SOULS_PATH}/lib/souls/cli/create/templates/*/*.rb"].map do |f|
3
+ Dir["#{SOULs::SOULS_PATH}/lib/souls/cli/create/templates/functions/*/*.rb"].map do |f|
4
4
  require f
5
5
  end
6
6
 
@@ -62,7 +62,7 @@ module SOULs
62
62
  end
63
63
 
64
64
  def get_runtime_create_method(runtime:)
65
- Dir["#{SOULs::SOULS_PATH}/lib/souls/cli/create/templates/#{runtime}/*"].map do |n|
65
+ Dir["#{SOULs::SOULS_PATH}/lib/souls/cli/create/templates/functions/#{runtime}/*"].map do |n|
66
66
  n.split("/").last.gsub(".rb", "")
67
67
  end
68
68
  end
@@ -11,9 +11,21 @@ module SOULs
11
11
  end
12
12
 
13
13
  runtime = current_dir.match(/cf-(\D+\d+)-/)[1]
14
+ runtime_lang = current_dir.match(/^cf-(\D+)\d+-/)
15
+ entry_point =
16
+ case runtime_lang
17
+ when "nodejs"
18
+ current_dir.underscore.camelize(:lower)
19
+ when "python"
20
+ current_dir.underscore
21
+ when "go"
22
+ current_dir.underscore.camelize
23
+ else
24
+ current_dir
25
+ end
14
26
  system(
15
27
  "
16
- gcloud functions deploy #{current_dir} --project=#{project_id} \
28
+ gcloud functions deploy #{current_dir} --entry-point=#{entry_point} --project=#{project_id} \
17
29
  --runtime #{runtime} --trigger-http --allow-unauthenticated --env-vars-file .env.yaml
18
30
  "
19
31
  )
@@ -40,7 +40,6 @@ module SOULs
40
40
  value = worker_file_names[file_name.to_sym] || 0
41
41
  worker_file_names[file_name.to_sym] = value - 1
42
42
  end
43
- puts(worker_file_names)
44
43
 
45
44
  if worker_file_names.blank?
46
45
  return if souls_topics.blank?
data/lib/souls/version.rb CHANGED
@@ -1,4 +1,4 @@
1
1
  module SOULs
2
- VERSION = "1.19.9".freeze
2
+ VERSION = "1.20.0".freeze
3
3
  public_constant :VERSION
4
4
  end
@@ -1 +1 @@
1
- 1.19.9
1
+ 1.20.0
@@ -1 +1 @@
1
- 1.19.9
1
+ 1.20.0
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: souls
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.19.9
4
+ version: 1.20.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - POPPIN-FUMI
@@ -190,15 +190,15 @@ files:
190
190
  - lib/souls/cli/console/index.rb
191
191
  - lib/souls/cli/create/functions.rb
192
192
  - lib/souls/cli/create/index.rb
193
- - lib/souls/cli/create/templates/functions_env_yaml.rb
194
- - lib/souls/cli/create/templates/go/function.rb
195
- - lib/souls/cli/create/templates/go/go.rb
196
- - lib/souls/cli/create/templates/nodejs/index.rb
197
- - lib/souls/cli/create/templates/nodejs/package.rb
198
- - lib/souls/cli/create/templates/python/main.rb
199
- - lib/souls/cli/create/templates/python/requirements.rb
200
- - lib/souls/cli/create/templates/ruby/app.rb
201
- - lib/souls/cli/create/templates/ruby/gemfile.rb
193
+ - lib/souls/cli/create/templates/functions/functions_env_yaml.rb
194
+ - lib/souls/cli/create/templates/functions/go/function.rb
195
+ - lib/souls/cli/create/templates/functions/go/go.rb
196
+ - lib/souls/cli/create/templates/functions/nodejs/index.rb
197
+ - lib/souls/cli/create/templates/functions/nodejs/package.rb
198
+ - lib/souls/cli/create/templates/functions/python/main.rb
199
+ - lib/souls/cli/create/templates/functions/python/requirements.rb
200
+ - lib/souls/cli/create/templates/functions/ruby/app.rb
201
+ - lib/souls/cli/create/templates/functions/ruby/gemfile.rb
202
202
  - lib/souls/cli/db/create_migration.rb
203
203
  - lib/souls/cli/db/create_migration_rbs.rb
204
204
  - lib/souls/cli/db/index.rb