fastlane 2.37.0.beta.20170601010043 → 2.37.0.beta.20170602010027
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/fastlane/lib/fastlane/helper/sh_helper.rb +9 -5
- data/fastlane/lib/fastlane/version.rb +1 -1
- data/fastlane_core/lib/fastlane_core/helper.rb +5 -0
- data/spaceship/lib/spaceship/tunes/app_ratings.rb +28 -74
- data/spaceship/lib/spaceship/tunes/application.rb +3 -3
- data/spaceship/lib/spaceship/tunes/tunes_client.rb +7 -2
- metadata +12 -12
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: a4b511987043d3ffedff763ec2e2e5fce1f7c457
|
4
|
+
data.tar.gz: 5700e2b138071d18dd80bff0789e935e111cf859
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c2d420b538d240e89ff01005cf15aeb02ceb982ab27d74a9a5fb25ab9c48ec4c76b714227038754f99cb7a16d7b5f49383fadc3851debf915e669d9f4b2b2f59
|
7
|
+
data.tar.gz: e12c6dce1ef0bc9b20014ac8b30d843e5c240b52ce4982a4e26beee40e911b509569fae6aa3386376c9519f9e3c45d47bcd1029fdab189d565d12f2731689792
|
@@ -29,9 +29,7 @@ module Fastlane
|
|
29
29
|
UI.command(command) if print_command
|
30
30
|
|
31
31
|
result = ''
|
32
|
-
if Helper.
|
33
|
-
result << command # only for the tests
|
34
|
-
else
|
32
|
+
if Helper.sh_enabled?
|
35
33
|
exit_status = nil
|
36
34
|
IO.popen(command, err: [:child, :out]) do |io|
|
37
35
|
io.sync = true
|
@@ -51,9 +49,15 @@ module Fastlane
|
|
51
49
|
end
|
52
50
|
message += "\n#{result}" if print_command_output
|
53
51
|
|
54
|
-
|
55
|
-
|
52
|
+
if error_callback
|
53
|
+
UI.error(message)
|
54
|
+
error_callback.call(result)
|
55
|
+
else
|
56
|
+
UI.shell_error!(message)
|
57
|
+
end
|
56
58
|
end
|
59
|
+
else
|
60
|
+
result << command # only for the tests
|
57
61
|
end
|
58
62
|
|
59
63
|
result
|
@@ -24,6 +24,11 @@ module FastlaneCore
|
|
24
24
|
defined? SpecHelper
|
25
25
|
end
|
26
26
|
|
27
|
+
# @return true if it is enabled to execute external commands
|
28
|
+
def self.sh_enabled?
|
29
|
+
!self.test?
|
30
|
+
end
|
31
|
+
|
27
32
|
# removes ANSI colors from string
|
28
33
|
def self.strip_ansi_colors(str)
|
29
34
|
str.gsub(/\e\[([;\d]+)?m/, '')
|
@@ -6,45 +6,41 @@ module Spaceship
|
|
6
6
|
# this version is for
|
7
7
|
attr_accessor :application
|
8
8
|
|
9
|
-
# @return (
|
10
|
-
attr_accessor :
|
11
|
-
|
12
|
-
# @return (Hash) mapping country codes to a (Spaceship::Tunes::AppRatingSummary) summary of ratings for that country
|
13
|
-
attr_reader :store_fronts
|
14
|
-
|
15
|
-
# @return (Hash) of iTunesConnect version id's to readable version numbers
|
16
|
-
attr_reader :versions
|
17
|
-
|
18
|
-
attr_mapping({
|
19
|
-
'versions' => :versions
|
20
|
-
})
|
9
|
+
# @return (Integer) total number of ratings recevied
|
10
|
+
attr_accessor :rating_count
|
21
11
|
|
22
|
-
|
23
|
-
|
24
|
-
# This is used to create a new object based on the server response.
|
25
|
-
def factory(attrs)
|
26
|
-
obj = self.new(attrs)
|
12
|
+
# @return (Integer) total number of one star ratings recevied
|
13
|
+
attr_accessor :one_star_rating_count
|
27
14
|
|
28
|
-
|
29
|
-
|
15
|
+
# @return (Integer) total number of two star ratings recevied
|
16
|
+
attr_accessor :two_star_rating_count
|
30
17
|
|
31
|
-
|
32
|
-
|
33
|
-
end
|
18
|
+
# @return (Integer) total number of three star ratings recevied
|
19
|
+
attr_accessor :three_star_rating_count
|
34
20
|
|
35
|
-
|
36
|
-
|
37
|
-
instance_variable_set(:@rating_summary, unfolded_rating_summary)
|
38
|
-
end
|
21
|
+
# @return (Integer) total number of four star ratings recevied
|
22
|
+
attr_accessor :four_star_rating_count
|
39
23
|
|
40
|
-
|
41
|
-
|
24
|
+
# @return (Integer) total number of five star ratings recevied
|
25
|
+
attr_accessor :five_star_rating_count
|
42
26
|
|
43
|
-
|
44
|
-
|
45
|
-
|
27
|
+
attr_mapping({
|
28
|
+
'reviewCount' => :review_count,
|
29
|
+
'ratingCount' => :rating_count,
|
30
|
+
'ratingOneCount' => :one_star_rating_count,
|
31
|
+
'ratingTwoCount' => :two_star_rating_count,
|
32
|
+
'ratingThreeCount' => :three_star_rating_count,
|
33
|
+
'ratingFourCount' => :four_star_rating_count,
|
34
|
+
'ratingFiveCount' => :five_star_rating_count
|
35
|
+
})
|
46
36
|
|
47
|
-
|
37
|
+
# @return (Float) the average rating for this summary (rounded to 2 decimal places)
|
38
|
+
def average_rating
|
39
|
+
((one_star_rating_count +
|
40
|
+
(two_star_rating_count * 2) +
|
41
|
+
(three_star_rating_count * 3) +
|
42
|
+
(four_star_rating_count * 4) +
|
43
|
+
(five_star_rating_count * 5)) / rating_count.to_f).round(2)
|
48
44
|
end
|
49
45
|
|
50
46
|
# @return (Array) of Review Objects
|
@@ -124,47 +120,5 @@ module Spaceship
|
|
124
120
|
false
|
125
121
|
end
|
126
122
|
end
|
127
|
-
|
128
|
-
class AppRatingSummary < TunesBase
|
129
|
-
# @return (Integer) total number of reviews recevied
|
130
|
-
attr_reader :review_count
|
131
|
-
|
132
|
-
# @return (Integer) total number of ratings recevied
|
133
|
-
attr_reader :rating_count
|
134
|
-
|
135
|
-
# @return (Integer) total number of one star ratings recevied
|
136
|
-
attr_reader :one_star_rating_count
|
137
|
-
|
138
|
-
# @return (Integer) total number of two star ratings recevied
|
139
|
-
attr_reader :two_star_rating_count
|
140
|
-
|
141
|
-
# @return (Integer) total number of three star ratings recevied
|
142
|
-
attr_reader :three_star_rating_count
|
143
|
-
|
144
|
-
# @return (Integer) total number of four star ratings recevied
|
145
|
-
attr_reader :four_star_rating_count
|
146
|
-
|
147
|
-
# @return (Integer) total number of five star ratings recevied
|
148
|
-
attr_reader :five_star_rating_count
|
149
|
-
|
150
|
-
attr_mapping({
|
151
|
-
'reviewCount' => :review_count,
|
152
|
-
'ratingCount' => :rating_count,
|
153
|
-
'ratingOneCount' => :one_star_rating_count,
|
154
|
-
'ratingTwoCount' => :two_star_rating_count,
|
155
|
-
'ratingThreeCount' => :three_star_rating_count,
|
156
|
-
'ratingFourCount' => :four_star_rating_count,
|
157
|
-
'ratingFiveCount' => :five_star_rating_count
|
158
|
-
})
|
159
|
-
|
160
|
-
# @return (Float) the average rating for this summary (rounded to 2 decimal places)
|
161
|
-
def average_rating
|
162
|
-
((self.one_star_rating_count +
|
163
|
-
(self.two_star_rating_count * 2) +
|
164
|
-
(self.three_star_rating_count * 3) +
|
165
|
-
(self.four_star_rating_count * 4) +
|
166
|
-
(self.five_star_rating_count * 5)) / self.rating_count.to_f).round(2)
|
167
|
-
end
|
168
|
-
end
|
169
123
|
end
|
170
124
|
end
|
@@ -129,10 +129,10 @@ module Spaceship
|
|
129
129
|
client.get_resolution_center(apple_id, platform)
|
130
130
|
end
|
131
131
|
|
132
|
-
def ratings
|
133
|
-
attrs = client.
|
132
|
+
def ratings(version_id: '', storefront: '')
|
133
|
+
attrs = client.get_ratings(apple_id, platform, version_id, storefront)
|
134
134
|
attrs[:application] = self
|
135
|
-
Tunes::AppRatings.
|
135
|
+
Tunes::AppRatings.new(attrs)
|
136
136
|
end
|
137
137
|
|
138
138
|
def platforms
|
@@ -258,8 +258,13 @@ module Spaceship
|
|
258
258
|
parse_response(r, 'data')
|
259
259
|
end
|
260
260
|
|
261
|
-
def
|
262
|
-
|
261
|
+
def get_ratings(app_id, platform, versionId = '', storefront = '')
|
262
|
+
# if storefront or versionId is empty api fails
|
263
|
+
rating_url = "ra/apps/#{app_id}/platforms/#{platform}/reviews/summary?"
|
264
|
+
rating_url << "storefront=#{storefront}" unless storefront.empty?
|
265
|
+
rating_url << "versionId=#{versionId}" unless versionId.empty?
|
266
|
+
|
267
|
+
r = request(:get, rating_url)
|
263
268
|
parse_response(r, 'data')
|
264
269
|
end
|
265
270
|
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: fastlane
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.37.0.beta.
|
4
|
+
version: 2.37.0.beta.20170602010027
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Felix Krause
|
@@ -15,7 +15,7 @@ authors:
|
|
15
15
|
autorequire:
|
16
16
|
bindir: bin
|
17
17
|
cert_chain: []
|
18
|
-
date: 2017-06-
|
18
|
+
date: 2017-06-02 00:00:00.000000000 Z
|
19
19
|
dependencies:
|
20
20
|
- !ruby/object:Gem::Dependency
|
21
21
|
name: slack-notifier
|
@@ -1368,22 +1368,22 @@ metadata:
|
|
1368
1368
|
post_install_message:
|
1369
1369
|
rdoc_options: []
|
1370
1370
|
require_paths:
|
1371
|
+
- frameit/lib
|
1371
1372
|
- spaceship/lib
|
1372
|
-
-
|
1373
|
-
-
|
1374
|
-
-
|
1373
|
+
- screengrab/lib
|
1374
|
+
- deliver/lib
|
1375
|
+
- credentials_manager/lib
|
1375
1376
|
- sigh/lib
|
1377
|
+
- supply/lib
|
1376
1378
|
- produce/lib
|
1377
|
-
-
|
1378
|
-
-
|
1379
|
+
- scan/lib
|
1380
|
+
- gym/lib
|
1379
1381
|
- pem/lib
|
1380
|
-
-
|
1381
|
-
-
|
1382
|
-
- frameit/lib
|
1383
|
-
- match/lib
|
1382
|
+
- cert/lib
|
1383
|
+
- fastlane/lib
|
1384
1384
|
- snapshot/lib
|
1385
|
-
- gym/lib
|
1386
1385
|
- fastlane_core/lib
|
1386
|
+
- match/lib
|
1387
1387
|
- pilot/lib
|
1388
1388
|
required_ruby_version: !ruby/object:Gem::Requirement
|
1389
1389
|
requirements:
|