souls 1.19.7 → 1.20.1

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: 7397cc9eb56f0420edff1764b05af2411bc28df50fcaacf53e1babc6af2531d1
4
- data.tar.gz: fb3283fb3e09e06e1e37f00870f9d9f577fac509cd2564d2f97cf9be0d614f37
3
+ metadata.gz: 7abfda2bb67e15978fb6af67078942a8bb2eb568dfed04fe36fd5f3d6d88933f
4
+ data.tar.gz: 48e6d07e1a981f009e24b199a3ec03d512f8e94c620181cbf4c2791e8f8fe348
5
5
  SHA512:
6
- metadata.gz: 9c164ae100be15a59717e16d991f8fb4ce3520eca314a16d3e82dfd6f54b87eed01ea99efd56a86e8d6a68cedc9999b103713696ae06f395f8898597ccd2b34f
7
- data.tar.gz: ecbb2177e6ba224cea34fba5b8f7af6951c8dbfdc49a45e60f33d3df7e60fb7c9c6b3051733cba703c784e6af4fcc43d5f173c60afd56350c4b3b653cb8d4f50
6
+ metadata.gz: b4f961e6e69b3d6ac029f4c78e6bb4d85669770e330a82fd281df5f879fcdf968272ba5dbfe131249bd1a6300bfe44a7866b7156528efb36b0115095d72cde27
7
+ data.tar.gz: 3e220bf805647ceed5e20cb7c80a979d0d8a76e82dd012fc3aca93ebf5602e46cb3ca20a868461b3192409e31a6037b17a37d5228eff31c5b0ab6bde69c98dbb
@@ -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
  )
@@ -36,7 +36,7 @@ module SOULs
36
36
  souls_topics = topic_names.select { |n| n.include?("souls-#{worker_name}") }
37
37
 
38
38
  souls_topics.each do |name|
39
- file_name = name.gsub("-", "_")
39
+ file_name = name.underscore
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
@@ -108,7 +108,7 @@ module SOULs
108
108
  end
109
109
  workers.delete("base_query")
110
110
  workers.each do |file|
111
- response[:"souls_#{worker_name}_#{file}"] = 1
111
+ response["souls_#{worker_name.underscore}_#{file}".to_sym] = 1
112
112
  end
113
113
  response
114
114
  end
data/lib/souls/version.rb CHANGED
@@ -1,4 +1,4 @@
1
1
  module SOULs
2
- VERSION = "1.19.7".freeze
2
+ VERSION = "1.20.1".freeze
3
3
  public_constant :VERSION
4
4
  end
@@ -1 +1 @@
1
- 1.19.7
1
+ 1.20.1
@@ -1 +1 @@
1
- 1.19.7
1
+ 1.20.1
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.7
4
+ version: 1.20.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - POPPIN-FUMI
@@ -10,7 +10,7 @@ authors:
10
10
  autorequire:
11
11
  bindir: exe
12
12
  cert_chain: []
13
- date: 2022-01-06 00:00:00.000000000 Z
13
+ date: 2022-01-07 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: activesupport
@@ -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