fastlane-plugin-gs_deliver 0.3.12 → 0.4

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: ff66bcb0b92d66e4805564f33e5124f4e8143653
4
- data.tar.gz: 717d822d6a5e624c160fdc3e241569a79e3223c7
3
+ metadata.gz: 5ea07987d0adb7b9197c51fe112b67af3f7a4d0e
4
+ data.tar.gz: e7c060e08064aa446608c25d776dc30d4c94568f
5
5
  SHA512:
6
- metadata.gz: e7a82ce4acc51a6147bb1d772b5ee212d83eda9a82d7e55c2576f8b54c33ed8bc3599472044c4964b6f7ca329bca2c04e5f97caedca1485ea0130a50803ccf00
7
- data.tar.gz: d5064d877a05b3039e36036a64023dd8cdbc99e47ad27b57f35c6642f170fe09cdedde8070d8977c89d036b537f4455f10236ff3512eb1314077c48a23de76b7
6
+ metadata.gz: 2e1535c8b8b28806d1aab64575d139b9d82716db75f3a186e0f1f2692bea245deb16520b41734faaa941d6dc45b2271c9d36b189433743dbf89f8b58c90189aa
7
+ data.tar.gz: 41f0929e7a6aea0ca4807d9b9cd7cbc4e5be10d5f377b4e9af769c55d5b7ead56d9dfaae798d54746eeb4b924aea82be96398ab5d751ffb02c0383173955d5a4
@@ -47,10 +47,20 @@ module Fastlane
47
47
  end
48
48
  UI.message(params.to_s)
49
49
  json_params = params.to_json
50
- response = ""
51
- UI.message("curl -k -H \"Content-Type: application/json\" -d \'#{json_params}\' http://mobile.geo4.io/bot/releaseBuilder/#{options[:request]}")
52
- response = `curl -k -H "Content-Type: application/json" -d '#{json_params}' http://mobile.geo4.io/bot/releaseBuilder/#{options[:request]}`
53
- response
50
+
51
+ client = Spaceship::GSBotClient.new
52
+ url = cmd
53
+ response = client.request(:get) do |req|
54
+ req.url url
55
+ req.body = json_params
56
+ req.headers['Content-Type'] = 'application/json'
57
+ end
58
+
59
+ if response.success?
60
+ return response
61
+ else
62
+ raise (client.class.hostname + url + ' ' + response.status.to_s + ' ' + response.body['message'])
63
+ end
54
64
  end
55
65
 
56
66
  def self.description
@@ -3,18 +3,33 @@ module Fastlane
3
3
  class GsGetReleaseNotesAction < Action
4
4
  def self.run(options)
5
5
  require 'json'
6
+ require 'spaceship'
6
7
  params = {}
7
8
  options.all_keys.each do |key|
8
9
  params[key] = options[key] if options[key] != nil && key != :lang
9
10
  end
10
11
  json_params = params.to_json
11
12
  UI.message("curl -k -H \"Content-Type: application/json\" -d \'#{json_params}\' http://mobile.geo4.io/bot/releaseBuilder/cmd")
12
- response = `curl -k -H "Content-Type: application/json" -d '#{json_params}' http://mobile.geo4.io/bot/releaseBuilder/cmd`
13
- UI.message("Saving notes to" + Dir.pwd + "/../../notes/" + options[:project] + "/" +
14
- options[:displayVersionName] + "_" + options[:lang] + ".txt")
15
- FileHelper.write(Dir.pwd + "/../../notes/" + options[:project] + "/" +
16
- options[:displayVersionName] + "_" + options[:lang] + ".txt", response)
17
- response
13
+
14
+ client = Spaceship::GSBotClient.new
15
+ url = 'cmd'
16
+ response = client.request(:get) do |req|
17
+ req.url url
18
+ req.body = json_params
19
+ req.headers['Content-Type'] = 'application/json'
20
+ end
21
+
22
+ if response.success?
23
+ # response = `curl -k -H "Content-Type: application/json" -d '#{json_params}' http://mobile.geo4.io/bot/releaseBuilder/cmd`
24
+ UI.message("Saving notes to" + Dir.pwd + "/../../notes/" + options[:project] + "/" +
25
+ options[:displayVersionName] + "_" + options[:lang] + ".txt")
26
+ FileHelper.write(Dir.pwd + "/../../notes/" + options[:project] + "/" +
27
+ options[:displayVersionName] + "_" + options[:lang] + ".txt", response)
28
+ return response
29
+ else
30
+ raise (client.class.hostname + url + ' ' + response.status.to_s + ' ' + response.body['message'])
31
+ end
32
+
18
33
  end
19
34
 
20
35
  def self.description
@@ -0,0 +1,7 @@
1
+ module Spaceship
2
+ class GSBotClient < Spaceship::Client
3
+ def self.hostname
4
+ 'http://mobile.geo4.io/bot/releaseBuilder/'
5
+ end
6
+ end
7
+ end
@@ -1,5 +1,5 @@
1
1
  module Fastlane
2
2
  module GsDeliver
3
- VERSION = "0.3.12"
3
+ VERSION = "0.4"
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: fastlane-plugin-gs_deliver
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.12
4
+ version: '0.4'
5
5
  platform: ruby
6
6
  authors:
7
7
  - Сергей Веселовский
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2017-03-21 00:00:00.000000000 Z
11
+ date: 2017-03-24 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: pry
@@ -100,7 +100,6 @@ executables: []
100
100
  extensions: []
101
101
  extra_rdoc_files: []
102
102
  files:
103
- - lib/fastlane/plugin/gs_deliver/actions/gs_deliver_action.rb
104
103
  - lib/fastlane/plugin/gs_deliver/actions/gs_execute_command.rb
105
104
  - lib/fastlane/plugin/gs_deliver/actions/gs_get_app_status.rb
106
105
  - lib/fastlane/plugin/gs_deliver/actions/gs_get_release_notes.rb
@@ -109,6 +108,7 @@ files:
109
108
  - lib/fastlane/plugin/gs_deliver/actions/gs_reject_latest_version.rb
110
109
  - lib/fastlane/plugin/gs_deliver/actions/gs_remove_from_testflight_review.rb
111
110
  - lib/fastlane/plugin/gs_deliver/actions/gs_start_external_testing.rb
111
+ - lib/fastlane/plugin/gs_deliver/helper/gs_bot_client.rb
112
112
  - lib/fastlane/plugin/gs_deliver/helper/gs_deliver_helper.rb
113
113
  - lib/fastlane/plugin/gs_deliver/version.rb
114
114
  - lib/fastlane/plugin/gs_deliver.rb
@@ -139,3 +139,4 @@ signing_key:
139
139
  specification_version: 4
140
140
  summary: Gradoservice plugin to rule apps releases
141
141
  test_files: []
142
+ has_rdoc:
@@ -1,44 +0,0 @@
1
- module Fastlane
2
- module Actions
3
- class GsDeliverAction < Action
4
- def self.run(params)
5
- UI.message("The gs_deliver plugin is working!")
6
- end
7
-
8
- def self.description
9
- "Gradoservice plugin to rule apps releases"
10
- end
11
-
12
- def self.authors
13
- ["Сергей Веселовский"]
14
- end
15
-
16
- def self.return_value
17
- # If your method provides a return value, you can describe here what it does
18
- end
19
-
20
- def self.details
21
- # Optional:
22
- "Gradoservice plugin to rule apps releases for our scheme"
23
- end
24
-
25
- def self.available_options
26
- [
27
- # FastlaneCore::ConfigItem.new(key: :your_option,
28
- # env_name: "GS_DELIVER_YOUR_OPTION",
29
- # description: "A description of your option",
30
- # optional: false,
31
- # type: String)
32
- ]
33
- end
34
-
35
- def self.is_supported?(platform)
36
- # Adjust this if your plugin only works for a particular platform (iOS vs. Android, for example)
37
- # See: https://github.com/fastlane/fastlane/blob/master/fastlane/docs/Platforms.md
38
- #
39
- # [:ios, :mac, :android].include?(platform)
40
- true
41
- end
42
- end
43
- end
44
- end