renuo-cli 1.7.2 → 1.7.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: e4c4aa2edb020c6ac6c4c454d5e6f7818547d747
4
- data.tar.gz: 5b7d8a34f2e3319a7e51e467eabaafb9cf39fbd8
3
+ metadata.gz: 577c679e818462872dd5489f96493b109af10e72
4
+ data.tar.gz: 6d3b7b14afe1fe44c114994d033b9eb8993d7f75
5
5
  SHA512:
6
- metadata.gz: 8ead9a79d1de88514dba17d43e95e1adcc2e28f59959cd04314966e47770d8a105b6b8b32db6e0dfcd0c79c763ea17a12f0a9a29c874c4a4ccde355f8859c4b3
7
- data.tar.gz: b1634389fe6c29a4c7e21e8ffa928cc29980fc5fb5eb53bf5b9190b70cf741b2ba95871d3fef75c4c5e839a606131b11fd6b2fdec9c5efaaf4876c917c60ad4c
6
+ metadata.gz: 552508988e60a07668c338010680213c1f016be6fd8b2170cf129ce7e8937b895bc3b3895bb511c2777daed3958a863c1bb0dce75df937252e6bec0b581c53d4
7
+ data.tar.gz: edc406e3f95a25a38651c6b06b4a950076bff3c25a429da050030b85455838c0e9cdb89ccaec296fd3134985e86e6e25df920af28be6828ab686a3765b3046c0
@@ -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; end
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
- uri = URI.parse('https://docs.google.com/spreadsheets/d/1rJFJQCgpz6GajMlGf0anKwVl5AY6TrYjMnJ4W-_0MK4/pub?gid=703649940&single=true&output=csv')
9
- response = Net::HTTP.get_response(uri)
10
- response.body.gsub(/\r\n/, "\n").split("\n").reject { |add| add == 'n/a' }
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 lit of Renuo email addresses'.colorize :green
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
@@ -1,6 +1,6 @@
1
1
  module Renuo
2
2
  module Cli
3
- VERSION = '1.7.2'.freeze
3
+ VERSION = '1.7.3'.freeze
4
4
  NAME = 'renuo-cli'.freeze
5
5
  end
6
6
  end
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.2
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-05-15 00:00:00.000000000 Z
11
+ date: 2020-07-07 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activeresource