fuel-cli 0.0.2 → 0.0.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +8 -8
- data/lib/fuel/cli.rb +2 -1
- data/lib/fuel/cli/base.rb +3 -1
- data/lib/fuel/cli/gerrit.rb +1 -1
- data/lib/fuel/cli/jenkins.rb +2 -2
- data/lib/fuel/cli/jira.rb +1 -1
- data/lib/fuel/cli/main.rb +1 -1
- data/lib/fuel/cli/version.rb +1 -1
- data/lib/fuel/util/config.rb +9 -0
- data/lib/fuel/util/jenkins_client.rb +12 -0
- data/lib/fuel/{cli → util}/patches.rb +0 -0
- metadata +3 -2
checksums.yaml
CHANGED
@@ -1,15 +1,15 @@
|
|
1
1
|
---
|
2
2
|
!binary "U0hBMQ==":
|
3
3
|
metadata.gz: !binary |-
|
4
|
-
|
4
|
+
NjlhODk3OGRiMzZiNjMwMjg0N2ZmYjU5YmQxNWU1YTY4ODNhYTFhNQ==
|
5
5
|
data.tar.gz: !binary |-
|
6
|
-
|
6
|
+
NGNmNTA0YWFmY2NmMzYxYTk1YmU5MTJjM2ZhZDMyZDQ2OTJmYmM5Mg==
|
7
7
|
SHA512:
|
8
8
|
metadata.gz: !binary |-
|
9
|
-
|
10
|
-
|
11
|
-
|
9
|
+
OTYxMzEyMDJiNWIzYjc0ZmI2YmYxMDFkNzg0MzZjYTZlNDg0YjNlMDg2YzIw
|
10
|
+
Mjc4M2RmN2EyZDA5Y2Q0MmQyYjdhMGFlOThjYTFmZWFmOWFiZWVlZjE0NTBh
|
11
|
+
NWY4N2FiYzBjZTNhZjZhY2FmNTg5MjJiNWQ4ZjkwZDgyNzJiNDk=
|
12
12
|
data.tar.gz: !binary |-
|
13
|
-
|
14
|
-
|
15
|
-
|
13
|
+
YjRjNjczMzAyODIwMmE2NGZkMjY0ZmViMTZkYzE3MzI2NjlkZTZmZTJhNjg4
|
14
|
+
NzQwZmRmNDA1YTU5ZGFjMTY4ZjliMmRhZDIyMjNiNzdiNTNkYjU5ZGNiYmQ3
|
15
|
+
NmRmM2EwN2JhMDcxYTkxZDJjYzI2YWIxYjRkMDFkYzFlNTk2Y2E=
|
data/lib/fuel/cli.rb
CHANGED
@@ -5,7 +5,8 @@ require 'fuel/cli/version'
|
|
5
5
|
require 'fuel/util/config'
|
6
6
|
require 'fuel/util/json_parser'
|
7
7
|
require 'fuel/cli/gerrit_common'
|
8
|
-
require 'fuel/
|
8
|
+
require 'fuel/util/jenkins_client'
|
9
|
+
require 'fuel/util/patches'
|
9
10
|
require 'fuel/cli/base'
|
10
11
|
require 'fuel/cli/gerrit'
|
11
12
|
require 'fuel/cli/jira'
|
data/lib/fuel/cli/base.rb
CHANGED
@@ -1,3 +1,5 @@
|
|
1
|
+
require 'base64'
|
2
|
+
|
1
3
|
module Fuel
|
2
4
|
module CLI
|
3
5
|
class Base < Thor
|
@@ -19,7 +21,7 @@ module Fuel
|
|
19
21
|
def set_credentials(user, user_keys, password_keys)
|
20
22
|
password = ask("Password:", echo: false)
|
21
23
|
Config.set(*user_keys, user)
|
22
|
-
Config.
|
24
|
+
Config.set64(*password_keys, password)
|
23
25
|
puts
|
24
26
|
end
|
25
27
|
end
|
data/lib/fuel/cli/gerrit.rb
CHANGED
@@ -11,7 +11,7 @@ module Fuel
|
|
11
11
|
package_name "gerrit"
|
12
12
|
|
13
13
|
headers "Content-Type" => "application/json"
|
14
|
-
digest_auth Config.get('gerrit', 'user'), Config.
|
14
|
+
digest_auth Config.get('gerrit', 'user'), Config.get64('gerrit', 'password')
|
15
15
|
parser GerritJsonParser
|
16
16
|
|
17
17
|
desc "status", "Show a brief overview of the current gerrit status"
|
data/lib/fuel/cli/jenkins.rb
CHANGED
@@ -4,7 +4,7 @@ module Fuel
|
|
4
4
|
include GerritCommon
|
5
5
|
|
6
6
|
headers "Content-Type" => "application/json"
|
7
|
-
digest_auth Config.get('gerrit', 'user'), Config.
|
7
|
+
digest_auth Config.get('gerrit', 'user'), Config.get64('gerrit', 'password')
|
8
8
|
parser GerritJsonParser
|
9
9
|
|
10
10
|
package_name "jenkins"
|
@@ -72,7 +72,7 @@ module Fuel
|
|
72
72
|
end
|
73
73
|
|
74
74
|
def create_client
|
75
|
-
@client ||=
|
75
|
+
@client ||= Fuel::Util::JenkinsClient.new(Config.get('jenkins'))
|
76
76
|
end
|
77
77
|
|
78
78
|
def build_link_or_fail
|
data/lib/fuel/cli/jira.rb
CHANGED
@@ -4,7 +4,7 @@ module Fuel
|
|
4
4
|
package_name "jira"
|
5
5
|
|
6
6
|
headers "Content-Type" => "application/json"
|
7
|
-
basic_auth Config.get('jira', 'user'), Config.
|
7
|
+
basic_auth Config.get('jira', 'user'), Config.get64('jira', 'password')
|
8
8
|
|
9
9
|
desc "status [JIRA]", "View a brief summary of the jira"
|
10
10
|
def status(jira = nil)
|
data/lib/fuel/cli/main.rb
CHANGED
data/lib/fuel/cli/version.rb
CHANGED
data/lib/fuel/util/config.rb
CHANGED
@@ -17,6 +17,10 @@ module Fuel
|
|
17
17
|
save(config)
|
18
18
|
end
|
19
19
|
|
20
|
+
def self.set64(*keys, value)
|
21
|
+
self.set(*keys, Base64::encode64(value))
|
22
|
+
end
|
23
|
+
|
20
24
|
def self.get(*keys)
|
21
25
|
ensure_config_exists
|
22
26
|
|
@@ -26,6 +30,11 @@ module Fuel
|
|
26
30
|
nil
|
27
31
|
end
|
28
32
|
|
33
|
+
def self.get64(*keys)
|
34
|
+
value = self.get(*keys)
|
35
|
+
value && Base64::decode64(value)
|
36
|
+
end
|
37
|
+
|
29
38
|
def self.add(key, value)
|
30
39
|
ensure_config_exists
|
31
40
|
|
File without changes
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: fuel-cli
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Alex Zherdev
|
@@ -122,10 +122,11 @@ files:
|
|
122
122
|
- lib/fuel/cli/jenkins.rb
|
123
123
|
- lib/fuel/cli/jira.rb
|
124
124
|
- lib/fuel/cli/main.rb
|
125
|
-
- lib/fuel/cli/patches.rb
|
126
125
|
- lib/fuel/cli/version.rb
|
127
126
|
- lib/fuel/util/config.rb
|
127
|
+
- lib/fuel/util/jenkins_client.rb
|
128
128
|
- lib/fuel/util/json_parser.rb
|
129
|
+
- lib/fuel/util/patches.rb
|
129
130
|
homepage: ''
|
130
131
|
licenses:
|
131
132
|
- MIT
|