sem 0.4.0 → 0.4.1

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
  SHA1:
3
- metadata.gz: 0d6cad3568c4070fd455a3b3a847eb9cdbfa4b01
4
- data.tar.gz: 19741e275c1a27637594542589cc61e535bb7445
3
+ metadata.gz: 298acba8f8d2ddd6e926cdc7ca1c497ffea512b9
4
+ data.tar.gz: 0305c21b336f783cc0726a3d028442beed789898
5
5
  SHA512:
6
- metadata.gz: 7ae5e86225473f3cb5c53c99377d36a7caf7b64b1656fc58821f3684c2966d4e37ddb223bd54baa2c70ebf10dbce0e60165532686adf4b6219b9e38f95ecf0c8
7
- data.tar.gz: a1c05d01cbe0da43c1af69b6de53cbebb0a2916d1e112e3d73b6f7ecf0220c782c1284b12cf44f8018668a73aa85c13ee1e4a35cb79abc293b2461f7916dc11e
6
+ metadata.gz: e02ec409e893ca38e37aae8d23779b76a9dfbe1601f6d898df8df58f2fe7c0e6edaf06eee3873a0e9c67230c4f5c097623ccf47148776884d96828ae50cec90a
7
+ data.tar.gz: 5024e6f26a9d567ad4db95a31adfafd60e9f228b16d1227be6570d416c9e61d2f88888405f894140fd96763d8b391ca9f4193ca6e9aae6321875cbf39848cac5
data/README.md CHANGED
@@ -1,10 +1,10 @@
1
1
  # Semaphore CLI
2
2
 
3
+ ![Semaphore logo](https://d1dkupr86d302v.cloudfront.net/assets/application_bootstrap/layout/semaphore-logo-a6d954e176b6975b511f314a0cc808dc94a8030210077e3a6e904fbe69dc5354.svg)
4
+
3
5
  [![Build Status](https://semaphoreci.com/api/v1/renderedtext/cli/branches/master/badge.svg)](https://semaphoreci.com/renderedtext/cli)
4
6
  [![Gem Version](https://badge.fury.io/rb/sem.svg)](https://badge.fury.io/rb/sem)
5
7
 
6
- ![Semaphore logo](https://d1dkupr86d302v.cloudfront.net/assets/application_bootstrap/layout/semaphore-logo-a6d954e176b6975b511f314a0cc808dc94a8030210077e3a6e904fbe69dc5354.svg)
7
-
8
8
  __Note: The Semaphore CLI gem is still an alpha release.__
9
9
 
10
10
  The Semaphore CLI is used to manage Semaphore projects from the command line.
@@ -13,10 +13,36 @@ For more info about Semaphore see <https://semaphoreci.com>
13
13
 
14
14
  ## Usage
15
15
 
16
- Install the gem with:
16
+ First, install the gem on your local machine:
17
+
18
+ ``` bash
19
+ $ gem install sem
20
+ ```
21
+
22
+ Login to Semaphore:
23
+
24
+ ``` bash
25
+ $ sem login --auth-token <your-auth-token>
26
+ ```
27
+
28
+ Display the help screen:
29
+
30
+ ``` txt
31
+ $ sem help
32
+
33
+ Usage: sem [command]
34
+
35
+ Command list, type sem help [command] for more details:
36
+
37
+ version Check cli version
38
+ login Log in to semaphore from the command line
39
+ logout Log out from semaphore
40
+
41
+ orgs Manage organizations
42
+ teams Manage teams and team membership
43
+ shared-configs Manage shared configurations
44
+ projects Manage projects
17
45
 
18
- ``` ruby
19
- gem install sem
20
46
  ```
21
47
 
22
48
  ## Issues
@@ -27,11 +53,10 @@ For other issues, [submit a support ticket](https://semaphoreci.com/support).
27
53
 
28
54
  [Contributors](https://github.com/renderedtext/cli/contributors).
29
55
 
30
- ## Developing
31
-
32
- Developing the CLI locally requires Ruby.
56
+ ## Development
33
57
 
34
- While developing please follow the [CLI development guide](guides.md).
58
+ Developing the CLI locally requires Ruby >= 2.0. While developing please follow
59
+ the [CLI development guide](guides.md).
35
60
 
36
61
  To run the CLI locally, use the `bundle exec sem`.
37
62
 
@@ -63,6 +63,7 @@ class Sem::CLI::SharedConfigs < Dracula
63
63
  desc "add", "add a file to the shared configuration"
64
64
  option "path-on-semaphore", :aliases => "p", :desc => "Path of the file in builds", :required => true
65
65
  option "local-path", :aliases => "l", :desc => "Location of the file on the local machine", :required => true
66
+ option "encrypted", :desc => "Encrypt the file", :default => true, :type => :boolean
66
67
  def add(shared_config_name)
67
68
  shared_config = Sem::API::SharedConfig.find!(shared_config_name)
68
69
 
@@ -73,7 +74,7 @@ class Sem::CLI::SharedConfigs < Dracula
73
74
  path = options["path-on-semaphore"]
74
75
  content = File.read(local_path)
75
76
 
76
- shared_config.add_config_file(:path => path, :content => content)
77
+ shared_config.add_config_file(:path => path, :content => content, :encrypted => options["encrypted"])
77
78
 
78
79
  puts "Added #{path} to #{shared_config_name}"
79
80
  end
@@ -107,10 +108,11 @@ class Sem::CLI::SharedConfigs < Dracula
107
108
  desc "add", "add an environment variable to the shared configuration"
108
109
  option :name, :aliases => "n", :desc => "Name of the variable", :required => true
109
110
  option :content, :aliases => "c", :desc => "Content of the variable", :required => true
111
+ option :encrypted, :desc => "Encrypt the environment variable", :default => true, :type => :boolean
110
112
  def add(shared_config_name)
111
113
  shared_config = Sem::API::SharedConfig.find!(shared_config_name)
112
114
 
113
- shared_config.add_env_var(:name => options[:name], :content => options[:content])
115
+ shared_config.add_env_var(:name => options[:name], :content => options[:content], :encrypted => options[:encrypted])
114
116
 
115
117
  puts "Added #{options[:name]} to #{shared_config_name}"
116
118
  end
@@ -1,3 +1,3 @@
1
1
  module Sem
2
- VERSION = "0.4.0".freeze
2
+ VERSION = "0.4.1".freeze
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: sem
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.0
4
+ version: 0.4.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Igor Šarčević