Class: Sem::CLI::SharedConfigs
- Inherits:
-
Dracula
- Object
- Dracula
- Sem::CLI::SharedConfigs
- Defined in:
- lib/sem/cli/shared_configs.rb
Defined Under Namespace
Instance Method Summary collapse
- #create(path) ⇒ Object
- #delete(path) ⇒ Object
- #info(path) ⇒ Object
- #list ⇒ Object
- #rename(old_path, new_path) ⇒ Object
Instance Method Details
#create(path) ⇒ Object
18 19 20 21 22 23 24 |
# File 'lib/sem/cli/shared_configs.rb', line 18 def create(path) org_name, shared_config_name = path.split("/") shared_config = Sem::API::SharedConfigs.create(org_name, :name => shared_config_name) Sem::Views::SharedConfigs.info(shared_config) end |
#delete(path) ⇒ Object
36 37 38 39 40 |
# File 'lib/sem/cli/shared_configs.rb', line 36 def delete(path) Sem::API::SharedConfigs.delete(path) puts "Deleted shared configuration #{path}" end |
#info(path) ⇒ Object
11 12 13 14 15 |
# File 'lib/sem/cli/shared_configs.rb', line 11 def info(path) shared_config = Sem::API::SharedConfigs.info(path) Sem::Views::SharedConfigs.info(shared_config) end |
#list ⇒ Object
4 5 6 7 8 |
# File 'lib/sem/cli/shared_configs.rb', line 4 def list shared_configs = Sem::API::SharedConfigs.list Sem::Views::SharedConfigs.list(shared_configs) end |
#rename(old_path, new_path) ⇒ Object
27 28 29 30 31 32 33 |
# File 'lib/sem/cli/shared_configs.rb', line 27 def rename(old_path, new_path) _, name = new_path.split("/") shared_config = Sem::API::SharedConfigs.update(old_path, :name => name) Sem::Views::SharedConfigs.info(shared_config) end |