souls 1.19.0 → 1.19.1

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: 02be7d892a5a7f988aa1d288eff6b847276d9462308d202752efc05e67b3accb
4
- data.tar.gz: 8ada002457f6c26f80d6fca80b104f5f6c92916a4582d8a95ff8e24523b80f21
3
+ metadata.gz: 1d2f8b89ff6943b75ee7ed2865da9aea86619e56aeaaa75362de4df3787a102d
4
+ data.tar.gz: bf43499b06e203d0a56425b60fefc81a3b84a21c96e95a116acee05ae43732e0
5
5
  SHA512:
6
- metadata.gz: bab193ff10c201eacbdbdfc99bb986f090c82e07be29390bd95c36a4dee4a8f0ec07c970aff7721d5bebe67140ed68b79dc2a284614a5c233f568a077539ec1c
7
- data.tar.gz: 965f2d31ed0964ccfd2b6ebb00dc67de567ac17c13beb07c5452acf27b1d57119d4ea0b7dee1c5e0577a820affd59b8c2bdbf857cdcdaccd535c424682aeab3f
6
+ metadata.gz: 072b9e228d261980d705bcf0d14055c3fbaa6cc7176e1574dc1b9574a4e45a2038822d5850e8872766bed9f09dd4d221a341007223756b77e18fdde3675c759a
7
+ data.tar.gz: 6ace8abce64b7a8537a5d3b9676a1c94149989591ba63332b643aa4d63542d5a012887f32a84e3f8f83cbd62ba84ba325fc95db6bde8b6034548b986c2abe0f8
@@ -21,7 +21,7 @@ module SOULs
21
21
  version = prompt.select("Select Version?", supported_languages[runtime.downcase.to_sym].sort.reverse)
22
22
  version_string = "#{runtime_downcased}#{version.gsub('.', '')}"
23
23
  runtime_methods = get_runtime_create_method(runtime: runtime_downcased)
24
- file_dir = "./apps/cf_#{version_string}_#{function_name}"
24
+ file_dir = "./apps/cf-#{version_string}-#{function_name}"
25
25
  FileUtils.mkdir_p(file_dir) unless Dir.exist?(file_dir)
26
26
 
27
27
  runtime_methods.each do |method|
@@ -1,6 +1,7 @@
1
1
  module Template
2
2
  module Go
3
3
  def self.function(file_name)
4
+ file_name.underscore.camelize
4
5
  <<~APP
5
6
  // Package p contains an HTTP Cloud Function.
6
7
  package p
@@ -1,6 +1,7 @@
1
1
  module Template
2
2
  module Nodejs
3
3
  def self.index(file_name)
4
+ file_name.underscore.camelize(:lower)
4
5
  <<~APP
5
6
  const express = require('express');
6
7
  const bodyParser = require('body-parser');
@@ -1,6 +1,7 @@
1
1
  module Template
2
2
  module Python
3
3
  def self.main(file_name)
4
+ file_name.underscore
4
5
  <<~APP
5
6
  def #{file_name}(request):
6
7
  """Responds to any HTTP request.
@@ -5,12 +5,12 @@ module SOULs
5
5
  require(SOULs.get_mother_path.to_s + "/config/souls")
6
6
  project_id = SOULs.configuration.project_id
7
7
  current_dir = FileUtils.pwd.split("/").last
8
- unless current_dir.match?(/^cf_/)
8
+ unless current_dir.match?(/^cf-/)
9
9
  SOULs::Painter.error("You are at wrong dir!\nPlease go to `apps/functions` dir!")
10
10
  return false
11
11
  end
12
12
 
13
- runtime = current_dir.match(/cf_(\D+\d+)_/)[1]
13
+ runtime = current_dir.match(/cf-(\D+\d+)-/)[1]
14
14
  system(
15
15
  "
16
16
  gcloud functions deploy #{current_dir} --project=#{project_id} \
@@ -22,11 +22,12 @@ module SOULs
22
22
  desc "describe", "Describe SOULs Functions"
23
23
  def describe
24
24
  require(SOULs.get_mother_path.to_s + "/config/souls")
25
+ current_dir = FileUtils.pwd.split("/").last
25
26
  project_id = SOULs.configuration.project_id
26
- system("gcloud functions describe souls_functions --project=#{project_id}")
27
+ system("gcloud functions describe #{current_dir} --project=#{project_id}")
27
28
  end
28
29
 
29
- desc "delete", "Delete SOULs Functions"
30
+ desc "delete [name]", "Delete SOULs Functions"
30
31
  def delete(name)
31
32
  require(SOULs.get_mother_path.to_s + "/config/souls")
32
33
  project_id = SOULs.configuration.project_id
@@ -50,7 +51,7 @@ module SOULs
50
51
  require(SOULs.get_mother_path.to_s + "/config/souls")
51
52
  project_id = SOULs.configuration.project_id
52
53
  Dir.chdir(SOULs.get_mother_path.to_s) do
53
- souls_functions = Dir["apps/cf_*"]
54
+ souls_functions = Dir["apps/cf-*"]
54
55
  cf_dir = souls_functions.map { |n| n.split("/").last }
55
56
  cf_dir.each do |dir|
56
57
  SOULs::Painter.success(`gcloud functions describe #{dir} --project=#{project_id}| grep url`)
data/lib/souls/version.rb CHANGED
@@ -1,4 +1,4 @@
1
1
  module SOULs
2
- VERSION = "1.19.0".freeze
2
+ VERSION = "1.19.1".freeze
3
3
  public_constant :VERSION
4
4
  end
@@ -1 +1 @@
1
- 1.19.0
1
+ 1.19.1
@@ -1 +1 @@
1
- 1.19.0
1
+ 1.19.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.0
4
+ version: 1.19.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-05 00:00:00.000000000 Z
13
+ date: 2022-01-06 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: activesupport