android-publisher 0.0.13 → 0.0.14
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/android/publisher.rb +4 -0
- data/lib/android/publisher/edit.rb +4 -0
- data/lib/android/publisher/track.rb +5 -1
- data/lib/android/publisher/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: 0d0af6b6f16b0109528999fff41d3cb32fed8625
|
4
|
+
data.tar.gz: cb1a73ea0a3fb56481e09ff4f4e9885634c08474
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 52f49e12b80675589bd10c9301d205698038639b88e21852322537a733b72a949b2668d8a3db9a96bd4027e2f614445d25c86d093bd3129bc4def1e7acea8c21
|
7
|
+
data.tar.gz: 06754d4134735babf53a601973c60341fd1a3a7df9ad3169e4594bbd5d9114b920b4b64f882ec67f5a97d035df2b9e11e1604a35430d29913f0b354b3d10c2a1
|
data/lib/android/publisher.rb
CHANGED
@@ -19,12 +19,16 @@ module Android
|
|
19
19
|
def rollout(user_fraction = 0.01)
|
20
20
|
edit.insert
|
21
21
|
edit.upload_apk(@apk_path) unless @apk_path.nil?
|
22
|
+
current_user_fraction = edit.rollout_fraction
|
23
|
+
user_fraction = current_user_fraction if user_fraction < current_user_fraction
|
22
24
|
edit.assign_to_staged_rollout_track(user_fraction)
|
23
25
|
edit.commit
|
24
26
|
end
|
25
27
|
|
26
28
|
def update_rollout(user_fraction)
|
27
29
|
edit.insert
|
30
|
+
current_user_fraction = edit.rollout_fraction
|
31
|
+
user_fraction = current_user_fraction if user_fraction < current_user_fraction
|
28
32
|
edit.update_rollout(user_fraction)
|
29
33
|
edit.commit
|
30
34
|
end
|
@@ -11,6 +11,10 @@ module Android
|
|
11
11
|
list['versionCodes'].size > 0
|
12
12
|
end
|
13
13
|
|
14
|
+
def rollout_fraction
|
15
|
+
list['userFraction']
|
16
|
+
end
|
17
|
+
|
14
18
|
def update(version_code, user_fraction=nil)
|
15
19
|
params = {
|
16
20
|
:headers => { "Content-Type" => 'application/json' },
|
@@ -36,7 +40,7 @@ module Android
|
|
36
40
|
begin
|
37
41
|
Response.parse(@client.get())
|
38
42
|
rescue OAuth2::Error
|
39
|
-
{'versionCodes' => []}
|
43
|
+
{'versionCodes' => [], 'userFraction' => -1}
|
40
44
|
end
|
41
45
|
end
|
42
46
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: android-publisher
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.14
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Slawomir Smiechura
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-11-
|
11
|
+
date: 2015-11-27 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|