souls 1.8.17 → 1.9.0

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: a08f3642096849fe5c48e6db57dbee722573b0b222829043dbb43f94c3720696
4
- data.tar.gz: cda60b0e448c4567904a9e4d4ad1a0b148cb105f7cc2622fcf0b9a190b6f3d48
3
+ metadata.gz: 1d42f8146bd0cb2caf649dfbf6d5c6bdbd9655f7c85c3463230c5359cde080e0
4
+ data.tar.gz: b516bb95ca96d96b0d8124322039430e304fa6f1bf4bd7af1190a731c4656ba0
5
5
  SHA512:
6
- metadata.gz: 3c7f93df1bbaca884fd667294eea99e635f525c8394e734c1a9af7018e71a6fd23f66ef75958aeee2d2bee932541470d29bb2bee07db150094894bf09af2900b
7
- data.tar.gz: 3e06e81a5e6197dc728bfa0b81a637ab76c0c7733ae6e1669d7559712cfd88b0656ce01367e55434a882f59ea972626c6c6895dc482edbbc648b182864b0b855
6
+ metadata.gz: 25e87253cae96e0e246ce1a27a50bb9e6dcdf77705249999fa94c618fc5724cd1c58b992d0085791157f49b9119fc5214960eb488952612e05249ed0f74cb840
7
+ data.tar.gz: 2722cc893a908b2b91165dd09817b7d90a700f635e86c5c44fb3f18d37a140216baa912585c81952aa16a7876823aa0218f560d3f3731db2e2cd5d8800b1f564
data/CODE_OF_CONDUCT.md CHANGED
@@ -1,74 +1,133 @@
1
+
1
2
  # Contributor Covenant Code of Conduct
2
3
 
3
4
  ## Our Pledge
4
5
 
5
- In the interest of fostering an open and welcoming environment, we as
6
- contributors and maintainers pledge to making participation in our project and
7
- our community a harassment-free experience for everyone, regardless of age, body
8
- size, disability, ethnicity, gender identity and expression, level of experience,
9
- nationality, personal appearance, race, religion, or sexual identity and
10
- orientation.
6
+ We as members, contributors, and leaders pledge to make participation in our
7
+ community a harassment-free experience for everyone, regardless of age, body
8
+ size, visible or invisible disability, ethnicity, sex characteristics, gender
9
+ identity and expression, level of experience, education, socio-economic status,
10
+ nationality, personal appearance, race, caste, color, religion, or sexual
11
+ identity and orientation.
12
+
13
+ We pledge to act and interact in ways that contribute to an open, welcoming,
14
+ diverse, inclusive, and healthy community.
11
15
 
12
16
  ## Our Standards
13
17
 
14
- Examples of behavior that contributes to creating a positive environment
15
- include:
18
+ Examples of behavior that contributes to a positive environment for our
19
+ community include:
16
20
 
17
- * Using welcoming and inclusive language
18
- * Being respectful of differing viewpoints and experiences
19
- * Gracefully accepting constructive criticism
20
- * Focusing on what is best for the community
21
- * Showing empathy towards other community members
21
+ * Demonstrating empathy and kindness toward other people
22
+ * Being respectful of differing opinions, viewpoints, and experiences
23
+ * Giving and gracefully accepting constructive feedback
24
+ * Accepting responsibility and apologizing to those affected by our mistakes,
25
+ and learning from the experience
26
+ * Focusing on what is best not just for us as individuals, but for the overall
27
+ community
22
28
 
23
- Examples of unacceptable behavior by participants include:
29
+ Examples of unacceptable behavior include:
24
30
 
25
- * The use of sexualized language or imagery and unwelcome sexual attention or
26
- advances
27
- * Trolling, insulting/derogatory comments, and personal or political attacks
31
+ * The use of sexualized language or imagery, and sexual attention or advances of
32
+ any kind
33
+ * Trolling, insulting or derogatory comments, and personal or political attacks
28
34
  * Public or private harassment
29
- * Publishing others' private information, such as a physical or electronic
30
- address, without explicit permission
35
+ * Publishing others' private information, such as a physical or email address,
36
+ without their explicit permission
31
37
  * Other conduct which could reasonably be considered inappropriate in a
32
38
  professional setting
33
39
 
34
- ## Our Responsibilities
40
+ ## Enforcement Responsibilities
35
41
 
36
- Project maintainers are responsible for clarifying the standards of acceptable
37
- behavior and are expected to take appropriate and fair corrective action in
38
- response to any instances of unacceptable behavior.
42
+ Community leaders are responsible for clarifying and enforcing our standards of
43
+ acceptable behavior and will take appropriate and fair corrective action in
44
+ response to any behavior that they deem inappropriate, threatening, offensive,
45
+ or harmful.
39
46
 
40
- Project maintainers have the right and responsibility to remove, edit, or
41
- reject comments, commits, code, wiki edits, issues, and other contributions
42
- that are not aligned to this Code of Conduct, or to ban temporarily or
43
- permanently any contributor for other behaviors that they deem inappropriate,
44
- threatening, offensive, or harmful.
47
+ Community leaders have the right and responsibility to remove, edit, or reject
48
+ comments, commits, code, wiki edits, issues, and other contributions that are
49
+ not aligned to this Code of Conduct, and will communicate reasons for moderation
50
+ decisions when appropriate.
45
51
 
46
52
  ## Scope
47
53
 
48
- This Code of Conduct applies both within project spaces and in public spaces
49
- when an individual is representing the project or its community. Examples of
50
- representing a project or community include using an official project e-mail
51
- address, posting via an official social media account, or acting as an appointed
52
- representative at an online or offline event. Representation of a project may be
53
- further defined and clarified by project maintainers.
54
+ This Code of Conduct applies within all community spaces, and also applies when
55
+ an individual is officially representing the community in public spaces.
56
+ Examples of representing our community include using an official e-mail address,
57
+ posting via an official social media account, or acting as an appointed
58
+ representative at an online or offline event.
54
59
 
55
60
  ## Enforcement
56
61
 
57
62
  Instances of abusive, harassing, or otherwise unacceptable behavior may be
58
- reported by contacting the project team at fumitake.kawasaki@el-soul.com. All
59
- complaints will be reviewed and investigated and will result in a response that
60
- is deemed necessary and appropriate to the circumstances. The project team is
61
- obligated to maintain confidentiality with regard to the reporter of an incident.
62
- Further details of specific enforcement policies may be posted separately.
63
+ reported to the community leaders responsible for enforcement at
64
+ [INSERT CONTACT METHOD].
65
+ All complaints will be reviewed and investigated promptly and fairly.
66
+
67
+ All community leaders are obligated to respect the privacy and security of the
68
+ reporter of any incident.
69
+
70
+ ## Enforcement Guidelines
71
+
72
+ Community leaders will follow these Community Impact Guidelines in determining
73
+ the consequences for any action they deem in violation of this Code of Conduct:
74
+
75
+ ### 1. Correction
76
+
77
+ **Community Impact**: Use of inappropriate language or other behavior deemed
78
+ unprofessional or unwelcome in the community.
79
+
80
+ **Consequence**: A private, written warning from community leaders, providing
81
+ clarity around the nature of the violation and an explanation of why the
82
+ behavior was inappropriate. A public apology may be requested.
83
+
84
+ ### 2. Warning
63
85
 
64
- Project maintainers who do not follow or enforce the Code of Conduct in good
65
- faith may face temporary or permanent repercussions as determined by other
66
- members of the project's leadership.
86
+ **Community Impact**: A violation through a single incident or series of
87
+ actions.
88
+
89
+ **Consequence**: A warning with consequences for continued behavior. No
90
+ interaction with the people involved, including unsolicited interaction with
91
+ those enforcing the Code of Conduct, for a specified period of time. This
92
+ includes avoiding interactions in community spaces as well as external channels
93
+ like social media. Violating these terms may lead to a temporary or permanent
94
+ ban.
95
+
96
+ ### 3. Temporary Ban
97
+
98
+ **Community Impact**: A serious violation of community standards, including
99
+ sustained inappropriate behavior.
100
+
101
+ **Consequence**: A temporary ban from any sort of interaction or public
102
+ communication with the community for a specified period of time. No public or
103
+ private interaction with the people involved, including unsolicited interaction
104
+ with those enforcing the Code of Conduct, is allowed during this period.
105
+ Violating these terms may lead to a permanent ban.
106
+
107
+ ### 4. Permanent Ban
108
+
109
+ **Community Impact**: Demonstrating a pattern of violation of community
110
+ standards, including sustained inappropriate behavior, harassment of an
111
+ individual, or aggression toward or disparagement of classes of individuals.
112
+
113
+ **Consequence**: A permanent ban from any sort of public interaction within the
114
+ community.
67
115
 
68
116
  ## Attribution
69
117
 
70
- This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4,
71
- available at [http://contributor-covenant.org/version/1/4][version]
118
+ This Code of Conduct is adapted from the [Contributor Covenant][homepage],
119
+ version 2.1, available at
120
+ [https://www.contributor-covenant.org/version/2/1/code_of_conduct.html][v2.1].
121
+
122
+ Community Impact Guidelines were inspired by
123
+ [Mozilla's code of conduct enforcement ladder][Mozilla CoC].
124
+
125
+ For answers to common questions about this code of conduct, see the FAQ at
126
+ [https://www.contributor-covenant.org/faq][FAQ]. Translations are available at
127
+ [https://www.contributor-covenant.org/translations][translations].
72
128
 
73
- [homepage]: http://contributor-covenant.org
74
- [version]: http://contributor-covenant.org/version/1/4/
129
+ [homepage]: https://www.contributor-covenant.org
130
+ [v2.1]: https://www.contributor-covenant.org/version/2/1/code_of_conduct.html
131
+ [Mozilla CoC]: https://github.com/mozilla/diversity
132
+ [FAQ]: https://www.contributor-covenant.org/faq
133
+ [translations]: https://www.contributor-covenant.org/translations
@@ -224,8 +224,6 @@ end
224
224
  end
225
225
  TEXT
226
226
  end
227
- rescue StandardError => e
228
- puts(e)
229
227
  end
230
228
 
231
229
  def souls_helper_rbs(worker_name: "mailer")
@@ -273,11 +271,12 @@ end
273
271
  version = Souls.get_latest_version_txt(service_name: "worker").join(".")
274
272
  file_name = "worker-v#{version}.tgz"
275
273
  url = "https://storage.googleapis.com/souls-bucket/boilerplates/workers/#{file_name}"
274
+ puts(url)
276
275
  system("curl -OL #{url}")
277
276
  system("tar -zxvf ./#{file_name}")
278
277
  system("mv ./worker apps/#{worker_name}")
279
278
  system("cp ./apps/api/config/database.yml ./apps/#{worker_name}/config/")
280
- FileUtils.rm(file_name)
279
+ FileUtils.rm_f(file_name)
281
280
  end
282
281
 
283
282
  def souls_worker_credit(worker_name: "mailer")
@@ -3,6 +3,7 @@ require_relative "./pubsub/index"
3
3
  require_relative "./run/index"
4
4
  require_relative "./sql/index"
5
5
  require_relative "./compute/index"
6
+ require_relative "./scheduler/index"
6
7
  require_relative "../cli_exception"
7
8
 
8
9
  module Souls
@@ -22,6 +23,9 @@ module Souls
22
23
  desc "run [COMMAND]", "souls gcloud run Commands"
23
24
  subcommand "cloud_run", CloudRun
24
25
 
26
+ desc "scheduler [COMMAND]", "souls gcloud schedluer Commands"
27
+ subcommand "scheduler", CloudScheduler
28
+
25
29
  map run: "cloud_run"
26
30
 
27
31
  desc "auth_login", "gcloud config set and gcloud auth login"
@@ -1,15 +1,5 @@
1
1
  module Souls
2
2
  class CloudRun < Thor
3
- desc "awake", "Set Ping Every 15min by Google Cloud Scheduler"
4
- method_option :url, default: "https://souls.souls.nl", aliases: "--url", desc: "Set URL"
5
- def awake
6
- app_name = Souls.configuration.app
7
- system(
8
- "gcloud scheduler jobs create http #{app_name}-awake
9
- --schedule '0,10,20,30,40,50 * * * *' --uri #{url} --http-method GET"
10
- )
11
- end
12
-
13
3
  desc "list", "Show Google Cloud Run List"
14
4
  def list
15
5
  system("gcloud run services list --platform managed")
@@ -0,0 +1,26 @@
1
+ module Souls
2
+ class CloudScheduler < Thor
3
+ desc "awake", "Set Ping Every 15min by Google Cloud Scheduler"
4
+ method_option :url, default: "https://souls.souls.nl", aliases: "--url", desc: "Set URL"
5
+ def awake
6
+ app_name = Souls.configuration.app
7
+ system(
8
+ "gcloud scheduler jobs create http #{app_name}-awake
9
+ --schedule '0,10,20,30,40,50 * * * *' --uri #{options[:url]} --http-method GET"
10
+ )
11
+ end
12
+
13
+ desc "sync_schedules", "Collect schedules from queries and sync with GCloud"
14
+ def sync_schedules
15
+ require("./app")
16
+ Queries::BaseQuery.all_schedules.each do |k, v|
17
+ job_name = k.to_s.underscore
18
+ system("gcloud scheduler jobs delete #{job_name} -q >/dev/null 2>&1")
19
+ system(
20
+ <<~COMMAND)
21
+ gcloud scheduler jobs create pubsub #{job_name} --schedule="#{v}" --topic="#{k}" --attributes="" --message-body="#{k}" --time-zone="#{ENV['SOULS_TZ']}"
22
+ COMMAND
23
+ end
24
+ end
25
+ end
26
+ end
data/lib/souls/version.rb CHANGED
@@ -1,4 +1,4 @@
1
1
  module Souls
2
- VERSION = "1.8.17".freeze
2
+ VERSION = "1.9.0".freeze
3
3
  public_constant :VERSION
4
4
  end
@@ -1 +1 @@
1
- 1.8.17
1
+ 1.9.0
@@ -1 +1 @@
1
- 1.8.17
1
+ 1.9.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.8.17
4
+ version: 1.9.0
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: 2021-11-23 00:00:00.000000000 Z
13
+ date: 2021-11-24 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: activesupport
@@ -168,6 +168,7 @@ files:
168
168
  - lib/souls/cli/gcloud/pubsub/subscriptions.rb
169
169
  - lib/souls/cli/gcloud/pubsub/topics.rb
170
170
  - lib/souls/cli/gcloud/run/index.rb
171
+ - lib/souls/cli/gcloud/scheduler/index.rb
171
172
  - lib/souls/cli/gcloud/sql/index.rb
172
173
  - lib/souls/cli/generate/application.rb
173
174
  - lib/souls/cli/generate/connection.rb