renuo-cli 1.7.2 → 1.7.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.semaphore/semaphore.yml +5 -0
- data/lib/renuo/cli/app/fetch_emails.rb +23 -5
- data/lib/renuo/cli/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 577c679e818462872dd5489f96493b109af10e72
|
4
|
+
data.tar.gz: 6d3b7b14afe1fe44c114994d033b9eb8993d7f75
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 552508988e60a07668c338010680213c1f016be6fd8b2170cf129ce7e8937b895bc3b3895bb511c2777daed3958a863c1bb0dce75df937252e6bec0b581c53d4
|
7
|
+
data.tar.gz: edc406e3f95a25a38651c6b06b4a950076bff3c25a429da050030b85455838c0e9cdb89ccaec296fd3134985e86e6e25df920af28be6828ab686a3765b3046c0
|
data/.semaphore/semaphore.yml
CHANGED
@@ -29,6 +29,11 @@ blocks:
|
|
29
29
|
- name: tests
|
30
30
|
commands:
|
31
31
|
- bin/check
|
32
|
+
epilogue:
|
33
|
+
on_fail:
|
34
|
+
commands:
|
35
|
+
- artifact push job --expire-in 2w log/test.log
|
36
|
+
- artifact push job --expire-in 2w tmp/screenshots
|
32
37
|
promotions:
|
33
38
|
- name: master
|
34
39
|
pipeline_file: master-deploy.yml
|
@@ -2,16 +2,34 @@ require 'net/http'
|
|
2
2
|
require 'uri'
|
3
3
|
|
4
4
|
class FetchEmails
|
5
|
-
def initialize
|
5
|
+
def initialize
|
6
|
+
@email_list_url = 'https://docs.google.com/spreadsheets/d/e/2PACX-1vSqPiedBeGk0N75cxZApEohj5LrIWlHWUxTjfhkmK9aOsUltcqCn24sD1haIasUjVfd8UT8VdUKUc4h/pub?gid=703649940&single=true&output=csv'
|
7
|
+
end
|
6
8
|
|
7
9
|
def fetch_emails
|
8
|
-
|
9
|
-
response = Net::
|
10
|
-
response
|
10
|
+
response = get_emails(@email_list_url)
|
11
|
+
response = handle_redirection(response) if response.is_a?(Net::HTTPRedirection)
|
12
|
+
format_response(response)
|
11
13
|
end
|
12
14
|
|
13
15
|
def run(_args)
|
14
|
-
say '# Here is a complete
|
16
|
+
say '# Here is a complete list of Renuo email addresses'.colorize :green
|
15
17
|
say fetch_emails.join("\n")
|
16
18
|
end
|
19
|
+
|
20
|
+
private
|
21
|
+
|
22
|
+
def get_emails(url)
|
23
|
+
uri = URI.parse(url)
|
24
|
+
Net::HTTP.get_response(uri)
|
25
|
+
end
|
26
|
+
|
27
|
+
def handle_redirection(response)
|
28
|
+
location = response['location']
|
29
|
+
get_emails(location)
|
30
|
+
end
|
31
|
+
|
32
|
+
def format_response(response)
|
33
|
+
response.body.gsub(/\r\n/, "\n").split("\n").reject { |add| add == 'n/a' }
|
34
|
+
end
|
17
35
|
end
|
data/lib/renuo/cli/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: renuo-cli
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.7.
|
4
|
+
version: 1.7.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Renuo AG
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2020-
|
11
|
+
date: 2020-07-07 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activeresource
|