gleis 0.3.1 → 0.3.2

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
  SHA256:
3
- metadata.gz: e8fc09f440241c3140e97287f6a470d806f5dbe185533156f7af783dc3336ea0
4
- data.tar.gz: 06d8a1ae386b38a1e2e6d0bfaaf8cc01e639f7e0c85460b82c81d5f9302f6fff
3
+ metadata.gz: 7b6a2a9fc4d3430d52a2d06173bb90376a9ac36610cea8c4b575e5842304e6e6
4
+ data.tar.gz: 0ed2b9286e7e55e15657724273fb7f03ef3c49e1b1c939aa7314967f7e225e06
5
5
  SHA512:
6
- metadata.gz: 19fdc3714967a09eda63cf01d667796f7a45bbd21280fa77d8861d5fd666eed3b26d5c2c8fe1fdcbdb8640679c18b55606d0f56daa964c8a85e6a8f8f0a9040f
7
- data.tar.gz: 94a5ac9e61670d43cf5a1f89e882aa4bea79e10ba27acfc9b0fbaeb11abbc06c53e65c889ca45d062baef9540bf56863d23f6656808a6be245edeef355d88faa
6
+ metadata.gz: 62ed6e20c3eae5fb1295676d3bef32c63622c4116193ed5a75b57810e3e46612565ef81f11f8c53ac70581fb241ccb73296ab97618d9af6704ddc8f5aa348b07
7
+ data.tar.gz: e0ad98a6a3933c3edf2d31fadb7172ae509252b7678b80bdbfd49c5e71effb8e0f39881eb39b418c44dcb561375a36faa5ce443a52d152c5802e68439c661c3f
data/CHANGELOG.md CHANGED
@@ -5,6 +5,12 @@ All notable changes to the Gleis CLI will be documented in this file.
5
5
  The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
6
6
  and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
7
7
 
8
+ ## 0.3.2 - 2018-12-15
9
+
10
+ ### Added
11
+
12
+ - Option to auth login command to skip generating SSH key-pair if user does not have a local SSH key-pair for Gleis
13
+
8
14
  ## 0.3.1 - 2018-12-12
9
15
 
10
16
  ### Added
@@ -1,7 +1,7 @@
1
1
  module Gleis
2
2
  # This class implements all authentication related commands of the CLI
3
3
  class Authentication
4
- def self.login(username, password = nil)
4
+ def self.login(username, password = nil, skip_keygen = false)
5
5
  puts 'Login to Gleis'
6
6
  username = username.downcase
7
7
  password ||= Utils.prompt_password
@@ -14,7 +14,8 @@ module Gleis
14
14
  puts "\nNEWS: #{body['data']}\n\n" unless body['data'].nil?
15
15
  # Generate SSH key pair if not found and upload pub key
16
16
  ssh_key_filename = Config::SSH_KEY_FILE_BASE + '_' + Utils.convert_username_to_filename(username)
17
- AuthKey.add("#{ssh_key_filename}.pub", nil, true) if SSH.generate_key(ssh_key_filename, username)
17
+ AuthKey.add("#{ssh_key_filename}.pub", nil, true) \
18
+ if skip_keygen == false && SSH.generate_key(ssh_key_filename, username)
18
19
  end
19
20
 
20
21
  def self.register(email)
@@ -6,8 +6,9 @@ module Gleis
6
6
  subcommand 'key', CLI::AuthKey
7
7
 
8
8
  desc 'login USERNAME [PASSWORD]', 'Login into Gleis'
9
+ option :skip_keygen, aliases: :s, type: :boolean, default: false
9
10
  def login(username, password = nil)
10
- Authentication.login(username, password)
11
+ Authentication.login(username, password, options[:skip_keygen])
11
12
  end
12
13
 
13
14
  desc 'logout', 'Logout of Gleis'
data/lib/gleis/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module Gleis
2
- VERSION = '0.3.1'
2
+ VERSION = '0.3.2'
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: gleis
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.1
4
+ version: 0.3.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Marc Bigler
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2018-12-12 00:00:00.000000000 Z
11
+ date: 2018-12-15 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler