supply 0.5.0 → 0.5.1

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
2
  SHA1:
3
- metadata.gz: c35292abbffd6e72b05753b44d20421d64277a77
4
- data.tar.gz: 3d01830e5a7b445fbf3fa6048faa1140400e1b87
3
+ metadata.gz: b75ac0c5badf35baf3296de72d1d7049e0a88565
4
+ data.tar.gz: aea69a47629a371bda1967809d3d9cab6f0403af
5
5
  SHA512:
6
- metadata.gz: 45213fa053b29bbcd62b51e1148017596e9111c4f4b7b774aab7579fba3c762f432e1b58be579f5d8373c81ec17bfd16d28fc2784c38137cc54c252d4145af47
7
- data.tar.gz: 041a7d12da918735ea8873c1a8f1222b6e4371302f3de33fb6d871017a50e8d88a8ad7d1be8881c06231da0ede07b928c00073b1e1757873c216874e4e918e6c
6
+ metadata.gz: e02970c101c9a85289c8c00bb381a1dd362e082d2e42896e5ae5728ebfa385b75af9571bf7fa18e36303cd624fc1a3dd1f5e259801b10eef6d0f27f19b1dda90
7
+ data.tar.gz: bd9029fcb78e9199973cf543ccafc52c50169feb417abdd36711cc103822b8a4c0a8af586bd756aa2488c0bdcaf65ee51fe7a8be62eaa8ec8c5e7f4a54f42242
data/lib/supply/client.rb CHANGED
@@ -56,8 +56,14 @@ module Supply
56
56
 
57
57
  auth_client.fetch_access_token!
58
58
 
59
+ if ENV["DEBUG"]
60
+ Google::Apis.logger.level = Logger::DEBUG
61
+ end
62
+
59
63
  Google::Apis::ClientOptions.default.application_name = "fastlane - supply"
60
64
  Google::Apis::ClientOptions.default.application_version = Supply::VERSION
65
+ Google::Apis::RequestOptions.default.timeout_sec = 300
66
+ Google::Apis::RequestOptions.default.retries = 5
61
67
 
62
68
  self.android_publisher = Androidpublisher::AndroidPublisherService.new
63
69
  self.android_publisher.authorization = auth_client
@@ -10,8 +10,9 @@ module Supply
10
10
  if metadata_path
11
11
  UI.user_error!("Could not find folder #{metadata_path}") unless File.directory? metadata_path
12
12
 
13
- Dir.foreach(metadata_path) do |language|
13
+ all_languages.each do |language|
14
14
  next if language.start_with?('.') # e.g. . or .. or hidden folders
15
+ Helper.log.info "Preparing to upload for language '#{language}'..."
15
16
 
16
17
  listing = client.listing_for_language(language)
17
18
 
@@ -45,8 +46,6 @@ module Supply
45
46
  end
46
47
 
47
48
  def upload_metadata(language, listing)
48
- Helper.log.info "Loading metadata for language '#{language}'..."
49
-
50
49
  Supply::AVAILABLE_METADATA_FIELDS.each do |key|
51
50
  path = File.join(metadata_path, language, "#{key}.txt")
52
51
  listing.send("#{key}=".to_sym, File.read(path)) if File.exist?(path)
@@ -101,7 +100,7 @@ module Supply
101
100
  upload_obbs(apk_path, apk_version_code)
102
101
 
103
102
  if metadata_path
104
- Dir.foreach(metadata_path) do |language|
103
+ all_languages.each do |language|
105
104
  next if language.start_with?('.') # e.g. . or .. or hidden folders
106
105
  upload_changelog(language, apk_version_code)
107
106
  end
@@ -114,6 +113,10 @@ module Supply
114
113
 
115
114
  private
116
115
 
116
+ def all_languages
117
+ Dir.foreach(metadata_path).sort { |x, y| x <=> y }
118
+ end
119
+
117
120
  def client
118
121
  @client ||= Client.make_from_config
119
122
  end
@@ -1,4 +1,4 @@
1
1
  module Supply
2
- VERSION = "0.5.0".freeze
2
+ VERSION = "0.5.1".freeze
3
3
  DESCRIPTION = "Command line tool for updating Android apps and their metadata on the Google Play Store"
4
4
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: supply
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.5.0
4
+ version: 0.5.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Felix Krause
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-02-29 00:00:00.000000000 Z
11
+ date: 2016-03-01 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: google-api-client