sem 0.2.1 → 0.2.3

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: 3eeb3a9f126f5d82ed4e4a1a3e54da5ca2590ac7
4
- data.tar.gz: 28b206296ea7493c44cf41c49e08128460fd8612
3
+ metadata.gz: 5d9b08c9b6f0e386eea1f0d6dd58d47d0b6fae07
4
+ data.tar.gz: 0f3cc15c62d9f5463f1b491e242cbdf02b6caffa
5
5
  SHA512:
6
- metadata.gz: df3b9185d00b4d927d49ab544ac46d3d925eb40ec059a90e6749d095f5110a48597541d4cfc13b56fd8cd6cdc8cfa318acf00dc8b19491804cb2a9457ac92015
7
- data.tar.gz: 608da6ff4754ff3be6e8ef4b4036163956cdcac65d139da2a1d0a395ca528dadcf7952b913a32169eb656f7c86fb04f3864de2cc44557bb7bcfeaee0b300b836
6
+ metadata.gz: 22c21e733489290870522a64a7797654aeffcda6ab8c423e1be7ef9571b291b14a637a61823377559e51d481f941473d6d3ebf9c743191fcb0b4feadf71b6eac
7
+ data.tar.gz: 6ca6ecdeff6b0083e39f390ca09853391f5ccaef084a915ac2fd9a8aafa3eb814bc22a340a11bc43ef5a2888002f738238b7b1a777ee4ddf241b5124bf7c73c0
data/README.md CHANGED
@@ -39,6 +39,6 @@ For other issues, [submit a support ticket](https://semaphoreci.com/support).
39
39
 
40
40
  Developing the CLI locally requires Ruby.
41
41
 
42
- While developing please follow the [CLI development guide](guide.md).
42
+ While developing please follow the [CLI development guide](guides.md).
43
43
 
44
44
  To run the CLI locally, use the `bundle exec sem`.
data/guides.md CHANGED
@@ -26,7 +26,7 @@ We want to support Ruby versions >= 2.0, and set up continuous integration for
26
26
  every significant Ruby version (2.0, 2.1., 2.2, 2.3, 2.4).
27
27
 
28
28
  The choice of the language dictates the preferable installation method of `gem
29
- install semaphore-cli`.
29
+ install sem`.
30
30
 
31
31
  ## Simple setup
32
32
 
@@ -43,7 +43,7 @@ make the installation step simple and intuitive.
43
43
 
44
44
  Installation methods for SemaphoreCli:
45
45
 
46
- - `gem install semaphore-cli`
46
+ - `gem install sem`
47
47
  - (optional) `wget -qO- https://cli.semaphoreci.com | sh`
48
48
  - (optional) `sudo apt-get install semaphore-cli`
49
49
 
data/lib/sem/api/orgs.rb CHANGED
@@ -5,7 +5,7 @@ module Sem
5
5
  def list
6
6
  orgs = api.list
7
7
 
8
- orgs.map { |org| to_hash(org) }
8
+ orgs.to_a.map { |org| to_hash(org) }
9
9
  end
10
10
 
11
11
  def info(name)
@@ -12,7 +12,7 @@ module Sem
12
12
  def list
13
13
  org_names = Orgs.list.map { |org| org[:username] }
14
14
 
15
- org_names.pmap { |name| list_for_org(name) }.flatten
15
+ org_names.to_a.pmap { |name| list_for_org(name) }.flatten
16
16
  end
17
17
 
18
18
  def info(org_name, project_name)
@@ -13,7 +13,7 @@ module Sem
13
13
  def list
14
14
  org_names = Orgs.list.map { |org| org[:username] }
15
15
 
16
- org_names.pmap { |name| list_for_org(name) }.flatten
16
+ org_names.to_a.pmap { |name| list_for_org(name) }.flatten
17
17
  end
18
18
 
19
19
  def info(org_name, shared_config_name)
data/lib/sem/api/teams.rb CHANGED
@@ -11,7 +11,7 @@ module Sem
11
11
  def list
12
12
  org_names = Sem::API::Orgs.list.map { |org| org[:username] }
13
13
 
14
- org_names.pmap { |name| list_for_org(name) }.flatten
14
+ org_names.to_a.pmap { |name| list_for_org(name) }.flatten
15
15
  end
16
16
 
17
17
  def info(org_name, team_name)
data/lib/sem/api/users.rb CHANGED
@@ -12,7 +12,7 @@ module Sem
12
12
  def list
13
13
  org_names = Orgs.list.map { |org| org[:username] }
14
14
 
15
- org_names.pmap { |name| list_for_org(name) }.flatten
15
+ org_names.to_a.pmap { |name| list_for_org(name) }.flatten
16
16
  end
17
17
 
18
18
  def info(*args)
data/lib/sem/cli.rb CHANGED
@@ -7,6 +7,11 @@ module Sem
7
7
  require_relative "cli/teams"
8
8
  require_relative "cli/shared_configs"
9
9
 
10
+ desc "version", "Check CLI version"
11
+ def version
12
+ puts Sem::VERSION
13
+ end
14
+
10
15
  desc "login", "Log in to semaphore from the command line"
11
16
  option :auth_token, :required => true
12
17
  long_desc <<-DESC
data/lib/sem/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module Sem
2
- VERSION = "0.2.1".freeze
2
+ VERSION = "0.2.3".freeze
3
3
  end
@@ -15,7 +15,7 @@ class Sem::Views::SharedConfigs < Sem::Views::Base
15
15
  header = ["ID", "NAME", "CONFIG FILES", "ENV VARS"]
16
16
 
17
17
  body = configs.map do |config|
18
- [config[:id], config[:name], config[:config_files], config[:env_vars]]
18
+ [config[:id], srn_name(config), config[:config_files], config[:env_vars]]
19
19
  end
20
20
 
21
21
  print_table [header, *body]
@@ -24,7 +24,7 @@ class Sem::Views::SharedConfigs < Sem::Views::Base
24
24
  def self.info(config)
25
25
  print_table [
26
26
  ["ID", config[:id]],
27
- ["Name", config[:name]],
27
+ ["Name", srn_name(config)],
28
28
  ["Config Files", config[:config_files].to_s],
29
29
  ["Environment Variables", config[:env_vars].to_s],
30
30
  ["Created", config[:created_at]],
@@ -32,4 +32,8 @@ class Sem::Views::SharedConfigs < Sem::Views::Base
32
32
  ]
33
33
  end
34
34
 
35
+ def self.srn_name(config)
36
+ "#{config[:org]}/#{config[:name]}"
37
+ end
38
+
35
39
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: sem
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.1
4
+ version: 0.2.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Igor Šarčević
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2017-08-28 00:00:00.000000000 Z
11
+ date: 2017-09-21 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: semaphore_client