fastlane-plugin-farol 0.4.5 → 0.5.0
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
|
-
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: 9536cf215bcb8412fa5258d2a0b3c19063ce543af8fa06bf06d8839c5d67f460
|
4
|
+
data.tar.gz: 35e7c09636ab9d957eb24545830ae520ae14a1b105bace7d1ee2d66107212ef4
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 8ac0c7f5cd0fa1401ffce138f97c9fe2cbc269c40c2c1b93f19e9d8d6895ec3d71048dc19f7653ebe59a865a708756af84aa5369fb6dc460ae147b54882460db
|
7
|
+
data.tar.gz: 564d18d7408bffbda989a4ca134d4ecd327d15fb5ecaed9bdbac1f40ea0f4b379c887e3c391b9298b3b46847f1fc9f5a6e8bdf3e2d61a8bcadeca46589da184c
|
@@ -5,7 +5,7 @@ module Fastlane
|
|
5
5
|
api = Farol::Api.new
|
6
6
|
token = params[:token]
|
7
7
|
verb = 'post'
|
8
|
-
method = '
|
8
|
+
method = 'project/version/' + params[:platform]
|
9
9
|
form_data = { "version" => params[:version], "build" => params[:build] }
|
10
10
|
api.request(token, verb, method, form_data)
|
11
11
|
end
|
@@ -9,7 +9,7 @@ module Fastlane
|
|
9
9
|
|
10
10
|
# Create the URL to be called
|
11
11
|
url = URI(farol_url + '/' + method)
|
12
|
-
Net::HTTP.start(url.host, url.port,
|
12
|
+
response = Net::HTTP.start(url.host, url.port,
|
13
13
|
use_ssl: url.scheme == 'https') do |http|
|
14
14
|
|
15
15
|
if verb == 'post'
|
@@ -27,23 +27,23 @@ module Fastlane
|
|
27
27
|
end
|
28
28
|
|
29
29
|
request['authorization'] = token
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
return true
|
37
|
-
end
|
38
|
-
when Net::HTTPUnauthorized
|
39
|
-
UI.error("Farol: #{response.message} - is your authorization token correct?")
|
40
|
-
when Net::HTTPServerError
|
41
|
-
UI.error("Farol: #{response.message} - try again later?")
|
30
|
+
http.request(request) # Net::HTTPResponse object
|
31
|
+
end
|
32
|
+
case response
|
33
|
+
when Net::HTTPSuccess
|
34
|
+
if valid_json(response.read_body)
|
35
|
+
return JSON.parse response.read_body
|
42
36
|
else
|
43
|
-
|
37
|
+
return true
|
44
38
|
end
|
45
|
-
|
39
|
+
when Net::HTTPUnauthorized
|
40
|
+
UI.error("Farol: #{response.message} - is your authorization token correct?")
|
41
|
+
when Net::HTTPServerError
|
42
|
+
UI.error("Farol: #{response.message} - try again later?")
|
43
|
+
else
|
44
|
+
UI.error("Farol: #{response.message}")
|
46
45
|
end
|
46
|
+
return false
|
47
47
|
end
|
48
48
|
|
49
49
|
# Check if the parameter is a valid JSON string
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: fastlane-plugin-farol
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.5.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Felipe Plets
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2018-09-14 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: pry
|
@@ -86,14 +86,14 @@ dependencies:
|
|
86
86
|
requirements:
|
87
87
|
- - ">="
|
88
88
|
- !ruby/object:Gem::Version
|
89
|
-
version: 2.
|
89
|
+
version: 2.104.0
|
90
90
|
type: :development
|
91
91
|
prerelease: false
|
92
92
|
version_requirements: !ruby/object:Gem::Requirement
|
93
93
|
requirements:
|
94
94
|
- - ">="
|
95
95
|
- !ruby/object:Gem::Version
|
96
|
-
version: 2.
|
96
|
+
version: 2.104.0
|
97
97
|
description:
|
98
98
|
email: felipe.plets@menvia.com
|
99
99
|
executables: []
|
@@ -130,7 +130,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
130
130
|
version: '0'
|
131
131
|
requirements: []
|
132
132
|
rubyforge_project:
|
133
|
-
rubygems_version: 2.
|
133
|
+
rubygems_version: 2.7.7
|
134
134
|
signing_key:
|
135
135
|
specification_version: 4
|
136
136
|
summary: Enable your app to use Farol Platform services
|