envirobly 0.3.1 → 0.4.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/envirobly/cli/main.rb +8 -4
- data/lib/envirobly/git/commit.rb +3 -3
- data/lib/envirobly/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 8521bb77bbc2267680443ade9607012f3a4af41a372fe164773337ba950d348b
|
4
|
+
data.tar.gz: 4488b8c5b290a1d33d70937d079de96763c9e38214678181947b5b3521e1610d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 9cc2a09ab7ee07c3a00ca3efb5991e5f012defb1c5292f477132ccb05d8683f1b2120b9104c9f0dfeaa29b0ebbc82ed886da2aaf0412aeb92ab0739d6ae9c0aa
|
7
|
+
data.tar.gz: 55b4a08c6efddb24b5c7365955becb485e58bde5faba1e7e4c3407496dca7f2b286c0187601682aeb085aff879c4b9f65d24a0af42d7c564f2dc88ec239382f1
|
data/lib/envirobly/cli/main.rb
CHANGED
@@ -1,5 +1,3 @@
|
|
1
|
-
# require "debug"
|
2
|
-
|
3
1
|
class Envirobly::Cli::Main < Envirobly::Base
|
4
2
|
desc "version", "Show Envirobly CLI version"
|
5
3
|
def version
|
@@ -14,13 +12,19 @@ class Envirobly::Cli::Main < Envirobly::Base
|
|
14
12
|
end
|
15
13
|
|
16
14
|
desc "set_access_token TOKEN", "Save and use an access token generated at Envirobly"
|
17
|
-
def set_access_token
|
15
|
+
def set_access_token
|
16
|
+
token = ask("Access Token:", echo: false).strip
|
17
|
+
if token == ""
|
18
|
+
$stderr.puts "Token can't be empty."
|
19
|
+
exit 1
|
20
|
+
end
|
21
|
+
|
18
22
|
Envirobly::AccessToken.new(token).save
|
19
23
|
end
|
20
24
|
|
21
25
|
private
|
22
26
|
def abort_if_aws_cli_is_missing
|
23
|
-
`
|
27
|
+
`which aws`
|
24
28
|
unless $?.success?
|
25
29
|
$stderr.puts "AWS CLI is missing. Please install it first: https://docs.aws.amazon.com/cli/latest/userguide/getting-started-install.html"
|
26
30
|
exit 1
|
data/lib/envirobly/git/commit.rb
CHANGED
@@ -6,15 +6,15 @@ class Envirobly::Git::Commit
|
|
6
6
|
end
|
7
7
|
|
8
8
|
def exists?
|
9
|
-
`git cat-file -t #{@ref}`.
|
9
|
+
`git cat-file -t #{@ref}`.strip == "commit"
|
10
10
|
end
|
11
11
|
|
12
12
|
def ref
|
13
|
-
@normalized_ref ||= `git rev-parse #{@ref}`.
|
13
|
+
@normalized_ref ||= `git rev-parse #{@ref}`.strip
|
14
14
|
end
|
15
15
|
|
16
16
|
def message
|
17
|
-
`git log #{@ref} -n1 --pretty=%B`.
|
17
|
+
`git log #{@ref} -n1 --pretty=%B`.strip
|
18
18
|
end
|
19
19
|
|
20
20
|
def time
|
data/lib/envirobly/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: envirobly
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.4.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Robert Starsi
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2024-09-
|
11
|
+
date: 2024-09-09 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: thor
|