sem 0.7.0 → 0.8.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/sem/api/org.rb +2 -2
- data/lib/sem/api/project.rb +8 -8
- data/lib/sem/api/secret.rb +109 -0
- data/lib/sem/api/team.rb +8 -8
- data/lib/sem/api.rb +1 -1
- data/lib/sem/cli/projects.rb +22 -25
- data/lib/sem/cli/secrets.rb +220 -0
- data/lib/sem/cli/teams.rb +21 -21
- data/lib/sem/cli.rb +2 -2
- data/lib/sem/srn.rb +2 -2
- data/lib/sem/version.rb +1 -1
- data/lib/sem/views/projects.rb +4 -4
- data/lib/sem/views/secrets.rb +51 -0
- data/lib/sem/views/teams.rb +4 -4
- data/lib/sem/views.rb +1 -1
- data/sem.gemspec +1 -1
- metadata +33 -33
- data/lib/sem/api/shared_config.rb +0 -109
- data/lib/sem/cli/shared_configs.rb +0 -220
- data/lib/sem/views/shared_configs.rb +0 -51
@@ -1,51 +0,0 @@
|
|
1
|
-
class Sem::Views::SharedConfigs < Sem::Views::Base
|
2
|
-
|
3
|
-
def self.setup_first_shared_config
|
4
|
-
puts "You don't have any shared configurations on Semaphore."
|
5
|
-
puts ""
|
6
|
-
puts "Create your first shared configuration:"
|
7
|
-
puts ""
|
8
|
-
puts " sem shared-config:create SHARED_CONFIG_NAME"
|
9
|
-
puts ""
|
10
|
-
end
|
11
|
-
|
12
|
-
def self.list(configs)
|
13
|
-
header = ["ID", "NAME", "CONFIG FILES", "ENV VARS"]
|
14
|
-
|
15
|
-
body = configs.map do |config|
|
16
|
-
[config.id, config.full_name, config.files.count, config.env_vars.count]
|
17
|
-
end
|
18
|
-
|
19
|
-
print_table [header, *body]
|
20
|
-
end
|
21
|
-
|
22
|
-
def self.info(config)
|
23
|
-
print_table [
|
24
|
-
["ID", config.id],
|
25
|
-
["Name", config.full_name],
|
26
|
-
["Config Files", config.files.count.to_s],
|
27
|
-
["Environment Variables", config.env_vars.count.to_s],
|
28
|
-
["Created", config.created_at],
|
29
|
-
["Updated", config.updated_at]
|
30
|
-
]
|
31
|
-
end
|
32
|
-
|
33
|
-
def self.add_first_file(shared_config)
|
34
|
-
puts "You don't have any files in this shared configuration."
|
35
|
-
puts ""
|
36
|
-
puts "Add your first file:"
|
37
|
-
puts ""
|
38
|
-
puts " sem shared-config:files:add #{shared_config.full_name} --local-path <file> --path-on-semaphore <path>"
|
39
|
-
puts ""
|
40
|
-
end
|
41
|
-
|
42
|
-
def self.add_first_env_var(shared_config)
|
43
|
-
puts "You don't have any environment variable in this shared configuration."
|
44
|
-
puts ""
|
45
|
-
puts "Add your first environment variable:"
|
46
|
-
puts ""
|
47
|
-
puts " sem shared-config:env-vars:add #{shared_config.full_name} --local-path <file> --path-on-semaphore <path>"
|
48
|
-
puts ""
|
49
|
-
end
|
50
|
-
|
51
|
-
end
|