sct 0.1.17 → 0.1.22
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/bin/sct +3 -4
- data/{.DS_Store → cluster/lib/.DS_Store} +0 -0
- data/cluster/lib/cluster.rb +6 -0
- data/cluster/lib/cluster/commands_generator.rb +109 -0
- data/cluster/lib/cluster/module.rb +7 -0
- data/{lib/sct → cluster/lib/cluster/resources}/.DS_Store +0 -0
- data/{resources → cluster/lib/cluster/resources}/corefile.yml +0 -0
- data/{lib/sct/commands/cluster.rb → cluster/lib/cluster/runner.rb} +160 -145
- data/{lib → sct/lib}/.DS_Store +0 -0
- data/sct/lib/sct.rb +17 -0
- data/sct/lib/sct/.DS_Store +0 -0
- data/sct/lib/sct/cli_tools_distributor.rb +50 -0
- data/{lib → sct/lib}/sct/command.rb +0 -0
- data/{lib → sct/lib}/sct/commands/hostfile.rb +7 -23
- data/sct/lib/sct/commands/init.rb +37 -0
- data/sct/lib/sct/commands/mysqlproxy.rb +20 -0
- data/sct/lib/sct/commands_generator.rb +56 -0
- data/sct/lib/sct/tools.rb +12 -0
- data/sct/lib/sct/version.rb +3 -0
- data/sct_core/lib/.DS_Store +0 -0
- data/sct_core/lib/sct_core.rb +14 -0
- data/sct_core/lib/sct_core/.DS_Store +0 -0
- data/sct_core/lib/sct_core/command_executor.rb +104 -0
- data/{lib/sct → sct_core/lib/sct_core}/config.rb +3 -3
- data/sct_core/lib/sct_core/core_ext/string.rb +9 -0
- data/{lib/sct/setup/helpers.rb → sct_core/lib/sct_core/helper.rb} +2 -2
- data/sct_core/lib/sct_core/module.rb +0 -0
- data/sct_core/lib/sct_core/sct_pty.rb +53 -0
- data/sct_core/lib/sct_core/ui/implementations/shell.rb +129 -0
- data/sct_core/lib/sct_core/ui/interface.rb +120 -0
- data/sct_core/lib/sct_core/ui/ui.rb +26 -0
- data/sct_core/lib/sct_core/update_checker/update_checker.rb +76 -0
- data/shell/README.md +0 -0
- data/shell/lib/shell.rb +3 -0
- data/{lib/sct → shell/lib/shell}/ClassLevelInheritableAttributes.rb +0 -0
- data/shell/lib/shell/commands_generator.rb +14 -0
- data/{lib/sct → shell/lib/shell}/docker/composer.rb +4 -3
- data/{lib/sct → shell/lib/shell}/docker/docker.rb +7 -10
- data/{lib/sct → shell/lib/shell}/docker/php.rb +3 -2
- data/{lib/sct → shell/lib/shell}/docker/yarn.rb +4 -3
- data/shell/lib/shell/module.rb +9 -0
- data/shell/lib/shell/runner.rb +34 -0
- data/shell/lib/shell/tools.rb +7 -0
- metadata +126 -53
- data/.gitignore +0 -12
- data/.gitlab/merge_request_templates/DefinitionOfDone.md +0 -14
- data/.rspec +0 -3
- data/.travis.yml +0 -7
- data/CODE_OF_CONDUCT.md +0 -74
- data/Gemfile +0 -4
- data/Gemfile.lock +0 -44
- data/LICENSE.txt +0 -21
- data/README.md +0 -134
- data/Rakefile +0 -6
- data/lib/sct.rb +0 -61
- data/lib/sct/command_interface.rb +0 -18
- data/lib/sct/command_option.rb +0 -14
- data/lib/sct/commands/composer.rb +0 -29
- data/lib/sct/commands/init.rb +0 -51
- data/lib/sct/commands/mysqlproxy.rb +0 -38
- data/lib/sct/commands/php.rb +0 -37
- data/lib/sct/commands/yarn.rb +0 -26
- data/lib/sct/version.rb +0 -3
- data/sct.gemspec +0 -40
@@ -1,13 +1,14 @@
|
|
1
|
-
require "
|
1
|
+
require "sct_core"
|
2
|
+
require_relative "docker"
|
2
3
|
|
3
|
-
module
|
4
|
+
module Shell
|
4
5
|
class Yarn < Docker
|
5
6
|
|
6
7
|
# Configure the Yarn command
|
7
8
|
def self.config
|
8
9
|
self.setImage("eu.gcr.io/dev-pasc-vcdm/helpers-yarn:latest", true)
|
9
10
|
self.setPwdAsVolume("/app")
|
10
|
-
self.addVolume(
|
11
|
+
self.addVolume(SctCore::Helper.convertWSLToWindowsPath("#{SctCore::Helper.windowsHomePath || SctCore::Helper.homePath}/.cache") , "/.cache")
|
11
12
|
self.mapPort(8081, 8080)
|
12
13
|
self.mapPort(9001)
|
13
14
|
self.setCurrentUserAndGroup()
|
@@ -0,0 +1,34 @@
|
|
1
|
+
module Shell
|
2
|
+
class Runner
|
3
|
+
# define launch work
|
4
|
+
def launch
|
5
|
+
|
6
|
+
tool_name = ARGV.first ? ARGV.first.downcase : nil
|
7
|
+
|
8
|
+
if tool_name && Shell::TOOLS.include?(tool_name.to_sym)
|
9
|
+
|
10
|
+
require_relative "docker/#{tool_name}"
|
11
|
+
command = "#{ARGV[1..(ARGV.length+1)].join(" ")}"
|
12
|
+
|
13
|
+
case ARGV.first
|
14
|
+
when 'php'
|
15
|
+
Shell::Php.exec(command)
|
16
|
+
when 'composer'
|
17
|
+
Shell::Composer.exec(command)
|
18
|
+
when 'yarn'
|
19
|
+
Shell::Yarn.exec(command)
|
20
|
+
else
|
21
|
+
show_error
|
22
|
+
end
|
23
|
+
|
24
|
+
else
|
25
|
+
show_error
|
26
|
+
end
|
27
|
+
end
|
28
|
+
|
29
|
+
def show_error
|
30
|
+
tools = Shell::TOOLS.map { |tool| tool.to_s }.join(", ")
|
31
|
+
UI.error("Tool not found. Try one of these: #{tools}")
|
32
|
+
end
|
33
|
+
end
|
34
|
+
end
|
metadata
CHANGED
@@ -1,29 +1,15 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: sct
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.22
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Reshad Farid
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2020-
|
11
|
+
date: 2020-06-12 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
|
-
- !ruby/object:Gem::Dependency
|
14
|
-
name: class_interface
|
15
|
-
requirement: !ruby/object:Gem::Requirement
|
16
|
-
requirements:
|
17
|
-
- - "~>"
|
18
|
-
- !ruby/object:Gem::Version
|
19
|
-
version: 0.1.1
|
20
|
-
type: :runtime
|
21
|
-
prerelease: false
|
22
|
-
version_requirements: !ruby/object:Gem::Requirement
|
23
|
-
requirements:
|
24
|
-
- - "~>"
|
25
|
-
- !ruby/object:Gem::Version
|
26
|
-
version: 0.1.1
|
27
13
|
- !ruby/object:Gem::Dependency
|
28
14
|
name: colored
|
29
15
|
requirement: !ruby/object:Gem::Requirement
|
@@ -80,6 +66,80 @@ dependencies:
|
|
80
66
|
- - "~>"
|
81
67
|
- !ruby/object:Gem::Version
|
82
68
|
version: '1.8'
|
69
|
+
- !ruby/object:Gem::Dependency
|
70
|
+
name: excon
|
71
|
+
requirement: !ruby/object:Gem::Requirement
|
72
|
+
requirements:
|
73
|
+
- - ">="
|
74
|
+
- !ruby/object:Gem::Version
|
75
|
+
version: 0.71.0
|
76
|
+
- - "<"
|
77
|
+
- !ruby/object:Gem::Version
|
78
|
+
version: 1.0.0
|
79
|
+
type: :runtime
|
80
|
+
prerelease: false
|
81
|
+
version_requirements: !ruby/object:Gem::Requirement
|
82
|
+
requirements:
|
83
|
+
- - ">="
|
84
|
+
- !ruby/object:Gem::Version
|
85
|
+
version: 0.71.0
|
86
|
+
- - "<"
|
87
|
+
- !ruby/object:Gem::Version
|
88
|
+
version: 1.0.0
|
89
|
+
- !ruby/object:Gem::Dependency
|
90
|
+
name: json
|
91
|
+
requirement: !ruby/object:Gem::Requirement
|
92
|
+
requirements:
|
93
|
+
- - "<"
|
94
|
+
- !ruby/object:Gem::Version
|
95
|
+
version: 3.0.0
|
96
|
+
type: :runtime
|
97
|
+
prerelease: false
|
98
|
+
version_requirements: !ruby/object:Gem::Requirement
|
99
|
+
requirements:
|
100
|
+
- - "<"
|
101
|
+
- !ruby/object:Gem::Version
|
102
|
+
version: 3.0.0
|
103
|
+
- !ruby/object:Gem::Dependency
|
104
|
+
name: tty-screen
|
105
|
+
requirement: !ruby/object:Gem::Requirement
|
106
|
+
requirements:
|
107
|
+
- - ">="
|
108
|
+
- !ruby/object:Gem::Version
|
109
|
+
version: 0.6.3
|
110
|
+
- - "<"
|
111
|
+
- !ruby/object:Gem::Version
|
112
|
+
version: 1.0.0
|
113
|
+
type: :runtime
|
114
|
+
prerelease: false
|
115
|
+
version_requirements: !ruby/object:Gem::Requirement
|
116
|
+
requirements:
|
117
|
+
- - ">="
|
118
|
+
- !ruby/object:Gem::Version
|
119
|
+
version: 0.6.3
|
120
|
+
- - "<"
|
121
|
+
- !ruby/object:Gem::Version
|
122
|
+
version: 1.0.0
|
123
|
+
- !ruby/object:Gem::Dependency
|
124
|
+
name: tty-spinner
|
125
|
+
requirement: !ruby/object:Gem::Requirement
|
126
|
+
requirements:
|
127
|
+
- - ">="
|
128
|
+
- !ruby/object:Gem::Version
|
129
|
+
version: 0.8.0
|
130
|
+
- - "<"
|
131
|
+
- !ruby/object:Gem::Version
|
132
|
+
version: 1.0.0
|
133
|
+
type: :runtime
|
134
|
+
prerelease: false
|
135
|
+
version_requirements: !ruby/object:Gem::Requirement
|
136
|
+
requirements:
|
137
|
+
- - ">="
|
138
|
+
- !ruby/object:Gem::Version
|
139
|
+
version: 0.8.0
|
140
|
+
- - "<"
|
141
|
+
- !ruby/object:Gem::Version
|
142
|
+
version: 1.0.0
|
83
143
|
- !ruby/object:Gem::Dependency
|
84
144
|
name: bundler
|
85
145
|
requirement: !ruby/object:Gem::Requirement
|
@@ -127,47 +187,57 @@ description: Spend Cloud Tool enables to setup a local development environment f
|
|
127
187
|
email:
|
128
188
|
- reshad.farid@visma.com
|
129
189
|
executables:
|
190
|
+
- console
|
130
191
|
- sct
|
192
|
+
- setup
|
131
193
|
extensions: []
|
132
194
|
extra_rdoc_files: []
|
133
195
|
files:
|
134
|
-
- ".DS_Store"
|
135
|
-
- ".gitignore"
|
136
|
-
- ".gitlab/merge_request_templates/DefinitionOfDone.md"
|
137
|
-
- ".rspec"
|
138
|
-
- ".travis.yml"
|
139
|
-
- CODE_OF_CONDUCT.md
|
140
|
-
- Gemfile
|
141
|
-
- Gemfile.lock
|
142
|
-
- LICENSE.txt
|
143
|
-
- README.md
|
144
|
-
- Rakefile
|
145
196
|
- bin/console
|
146
197
|
- bin/sct
|
147
198
|
- bin/setup
|
148
|
-
- lib/.DS_Store
|
149
|
-
- lib/
|
150
|
-
- lib/
|
151
|
-
- lib/
|
152
|
-
- lib/
|
153
|
-
- lib/
|
154
|
-
- lib/
|
155
|
-
-
|
156
|
-
- lib/sct
|
157
|
-
- lib/sct
|
158
|
-
- lib/sct/
|
159
|
-
- lib/sct/
|
160
|
-
- lib/sct/commands/
|
161
|
-
- lib/sct/commands/
|
162
|
-
- lib/sct/
|
163
|
-
- lib/sct/
|
164
|
-
- lib/sct/
|
165
|
-
- lib/sct/
|
166
|
-
- lib
|
167
|
-
- lib/
|
168
|
-
- lib/
|
169
|
-
-
|
170
|
-
-
|
199
|
+
- cluster/lib/.DS_Store
|
200
|
+
- cluster/lib/cluster.rb
|
201
|
+
- cluster/lib/cluster/commands_generator.rb
|
202
|
+
- cluster/lib/cluster/module.rb
|
203
|
+
- cluster/lib/cluster/resources/.DS_Store
|
204
|
+
- cluster/lib/cluster/resources/corefile.yml
|
205
|
+
- cluster/lib/cluster/runner.rb
|
206
|
+
- sct/lib/.DS_Store
|
207
|
+
- sct/lib/sct.rb
|
208
|
+
- sct/lib/sct/.DS_Store
|
209
|
+
- sct/lib/sct/cli_tools_distributor.rb
|
210
|
+
- sct/lib/sct/command.rb
|
211
|
+
- sct/lib/sct/commands/hostfile.rb
|
212
|
+
- sct/lib/sct/commands/init.rb
|
213
|
+
- sct/lib/sct/commands/mysqlproxy.rb
|
214
|
+
- sct/lib/sct/commands_generator.rb
|
215
|
+
- sct/lib/sct/tools.rb
|
216
|
+
- sct/lib/sct/version.rb
|
217
|
+
- sct_core/lib/.DS_Store
|
218
|
+
- sct_core/lib/sct_core.rb
|
219
|
+
- sct_core/lib/sct_core/.DS_Store
|
220
|
+
- sct_core/lib/sct_core/command_executor.rb
|
221
|
+
- sct_core/lib/sct_core/config.rb
|
222
|
+
- sct_core/lib/sct_core/core_ext/string.rb
|
223
|
+
- sct_core/lib/sct_core/helper.rb
|
224
|
+
- sct_core/lib/sct_core/module.rb
|
225
|
+
- sct_core/lib/sct_core/sct_pty.rb
|
226
|
+
- sct_core/lib/sct_core/ui/implementations/shell.rb
|
227
|
+
- sct_core/lib/sct_core/ui/interface.rb
|
228
|
+
- sct_core/lib/sct_core/ui/ui.rb
|
229
|
+
- sct_core/lib/sct_core/update_checker/update_checker.rb
|
230
|
+
- shell/README.md
|
231
|
+
- shell/lib/shell.rb
|
232
|
+
- shell/lib/shell/ClassLevelInheritableAttributes.rb
|
233
|
+
- shell/lib/shell/commands_generator.rb
|
234
|
+
- shell/lib/shell/docker/composer.rb
|
235
|
+
- shell/lib/shell/docker/docker.rb
|
236
|
+
- shell/lib/shell/docker/php.rb
|
237
|
+
- shell/lib/shell/docker/yarn.rb
|
238
|
+
- shell/lib/shell/module.rb
|
239
|
+
- shell/lib/shell/runner.rb
|
240
|
+
- shell/lib/shell/tools.rb
|
171
241
|
homepage: https://gitlab.com/proactive-software/packages/sct
|
172
242
|
licenses:
|
173
243
|
- MIT
|
@@ -178,19 +248,22 @@ metadata:
|
|
178
248
|
post_install_message:
|
179
249
|
rdoc_options: []
|
180
250
|
require_paths:
|
181
|
-
- lib
|
251
|
+
- cluster/lib
|
252
|
+
- shell/lib
|
253
|
+
- sct/lib
|
254
|
+
- sct_core/lib
|
182
255
|
required_ruby_version: !ruby/object:Gem::Requirement
|
183
256
|
requirements:
|
184
257
|
- - ">="
|
185
258
|
- !ruby/object:Gem::Version
|
186
|
-
version:
|
259
|
+
version: 2.0.0
|
187
260
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
188
261
|
requirements:
|
189
262
|
- - ">="
|
190
263
|
- !ruby/object:Gem::Version
|
191
264
|
version: '0'
|
192
265
|
requirements: []
|
193
|
-
rubygems_version: 3.0.
|
266
|
+
rubygems_version: 3.0.8
|
194
267
|
signing_key:
|
195
268
|
specification_version: 4
|
196
269
|
summary: Spend Cloud Tool.
|
data/.gitignore
DELETED
@@ -1,14 +0,0 @@
|
|
1
|
-
The Definition of a Done Code Review
|
2
|
-
====================================
|
3
|
-
| by _The Team_ |
|
4
|
-
|---------------------------------:|
|
5
|
-
|
6
|
-
- [ ] Verified if it worked on all operating systems.
|
7
|
-
- [ ] Windows
|
8
|
-
- [ ] Ubuntu
|
9
|
-
- [ ] MacOs
|
10
|
-
- [ ] Verified if it solved the problem.
|
11
|
-
- [ ] Verified if the help section is updated.
|
12
|
-
- [ ] Verified if it complied with Ruby code standards.
|
13
|
-
- [ ] Documentation is updated, 100% complete.
|
14
|
-
- [ ] SCT documentation.
|
data/.rspec
DELETED
data/.travis.yml
DELETED
data/CODE_OF_CONDUCT.md
DELETED
@@ -1,74 +0,0 @@
|
|
1
|
-
# Contributor Covenant Code of Conduct
|
2
|
-
|
3
|
-
## Our Pledge
|
4
|
-
|
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.
|
11
|
-
|
12
|
-
## Our Standards
|
13
|
-
|
14
|
-
Examples of behavior that contributes to creating a positive environment
|
15
|
-
include:
|
16
|
-
|
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
|
22
|
-
|
23
|
-
Examples of unacceptable behavior by participants include:
|
24
|
-
|
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
|
28
|
-
* Public or private harassment
|
29
|
-
* Publishing others' private information, such as a physical or electronic
|
30
|
-
address, without explicit permission
|
31
|
-
* Other conduct which could reasonably be considered inappropriate in a
|
32
|
-
professional setting
|
33
|
-
|
34
|
-
## Our Responsibilities
|
35
|
-
|
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.
|
39
|
-
|
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.
|
45
|
-
|
46
|
-
## Scope
|
47
|
-
|
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
|
-
|
55
|
-
## Enforcement
|
56
|
-
|
57
|
-
Instances of abusive, harassing, or otherwise unacceptable behavior may be
|
58
|
-
reported by contacting the project team at reshad@proactive.nl. 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
|
-
|
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.
|
67
|
-
|
68
|
-
## Attribution
|
69
|
-
|
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]
|
72
|
-
|
73
|
-
[homepage]: http://contributor-covenant.org
|
74
|
-
[version]: http://contributor-covenant.org/version/1/4/
|
data/Gemfile
DELETED
data/Gemfile.lock
DELETED
@@ -1,44 +0,0 @@
|
|
1
|
-
PATH
|
2
|
-
remote: .
|
3
|
-
specs:
|
4
|
-
sct (0.1.15)
|
5
|
-
class_interface (~> 0.1.1)
|
6
|
-
colored (~> 1.2)
|
7
|
-
commander (~> 4.4.7)
|
8
|
-
highline (>= 1.7.2)
|
9
|
-
|
10
|
-
GEM
|
11
|
-
remote: https://rubygems.org/
|
12
|
-
specs:
|
13
|
-
class_interface (0.1.2)
|
14
|
-
colored (1.2)
|
15
|
-
commander (4.4.7)
|
16
|
-
highline (~> 2.0.0)
|
17
|
-
diff-lcs (1.3)
|
18
|
-
highline (2.0.3)
|
19
|
-
rake (10.5.0)
|
20
|
-
rspec (3.9.0)
|
21
|
-
rspec-core (~> 3.9.0)
|
22
|
-
rspec-expectations (~> 3.9.0)
|
23
|
-
rspec-mocks (~> 3.9.0)
|
24
|
-
rspec-core (3.9.1)
|
25
|
-
rspec-support (~> 3.9.1)
|
26
|
-
rspec-expectations (3.9.0)
|
27
|
-
diff-lcs (>= 1.2.0, < 2.0)
|
28
|
-
rspec-support (~> 3.9.0)
|
29
|
-
rspec-mocks (3.9.1)
|
30
|
-
diff-lcs (>= 1.2.0, < 2.0)
|
31
|
-
rspec-support (~> 3.9.0)
|
32
|
-
rspec-support (3.9.2)
|
33
|
-
|
34
|
-
PLATFORMS
|
35
|
-
ruby
|
36
|
-
|
37
|
-
DEPENDENCIES
|
38
|
-
bundler (~> 2.0)
|
39
|
-
rake (~> 10.0)
|
40
|
-
rspec (~> 3.0)
|
41
|
-
sct!
|
42
|
-
|
43
|
-
BUNDLED WITH
|
44
|
-
2.1.4
|