sem 0.7.0 → 0.8.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -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