package_cloud 0.2.36 → 0.2.37

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: 175b5452674b9c7dcb9fa7bbf95199d56d9f494a
4
- data.tar.gz: 584cde339f46aab01a0eca5344df37452c9d329b
3
+ metadata.gz: 0626038049264352dd55411a6e39b6db28547382
4
+ data.tar.gz: fab3fbac02f8269bc70215427250569371b77cc3
5
5
  SHA512:
6
- metadata.gz: c58ff367b41a13ebc6f6798da6e25f4a8cca3f6e0061edc5f31ae0e3fa3df3daa6499f9345403562a249e99abccd4c1332ddbe7c2209aae8a8e2076cad5eddc1
7
- data.tar.gz: 48ebc9b7d5996cdbf616eb1b5cb5f8707951a865404f0f7000f74d4669f09a21dd323317e6b5ab22ac5ab02b22f1e21f31634234d3ac0720a4fb7a7d513f4096
6
+ metadata.gz: 6484fdd476d6a070193d745e63ef1df43aed3bb77a4d18622dfbee691c196a29eced50197e6aba29f0fc8aa45a17140d21c54100929663552a3ac19d2c9bab64
7
+ data.tar.gz: 83ab9216a08dc107d99b8ff55e78648e99b2294f4f54306aaa9d937a88cc02e92fab780f7784dd39a3c51c6514b410a50d63262ee0e7ab6f41e56522fce4286c
@@ -8,7 +8,7 @@ module PackageCloud
8
8
  attr_reader :token
9
9
 
10
10
  def initialize(filename = "~/.packagecloud", url = "https://packagecloud.io")
11
- abort_on_incorrect_locale
11
+ handle_locale
12
12
  @filename = File.expand_path(filename)
13
13
  @url = URI(url)
14
14
  end
@@ -48,6 +48,18 @@ module PackageCloud
48
48
  end
49
49
 
50
50
  private
51
+ def handle_locale
52
+ if Gem.win_platform?
53
+ # Force the external encoding to be UTF-8 on windows. This will fail
54
+ # because it seems the default encoding on windows is IBM 437 and it
55
+ # is very painful to change to UTF-8. The failure in this case will
56
+ # just be 1 "?" being printed per character that isn't
57
+ # representable.
58
+ Encoding.default_external = 'UTF-8'
59
+ else
60
+ abort_on_incorrect_locale
61
+ end
62
+ end
51
63
 
52
64
  def abort_on_incorrect_locale
53
65
  default_encoding = Encoding.default_external
@@ -1,7 +1,7 @@
1
1
  module PackageCloud
2
2
  MAJOR_VERSION = "0"
3
3
  MINOR_VERSION = "2"
4
- PATCH_VERSION = "36"
4
+ PATCH_VERSION = "37"
5
5
 
6
6
  VERSION = [MAJOR_VERSION, MINOR_VERSION, PATCH_VERSION].join(".")
7
7
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: package_cloud
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.36
4
+ version: 0.2.37
5
5
  platform: ruby
6
6
  authors:
7
7
  - Joe Damato
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-08-19 00:00:00.000000000 Z
11
+ date: 2016-10-11 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: thor
@@ -160,7 +160,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
160
160
  version: '0'
161
161
  requirements: []
162
162
  rubyforge_project:
163
- rubygems_version: 2.4.8
163
+ rubygems_version: 2.4.4
164
164
  signing_key:
165
165
  specification_version: 4
166
166
  summary: https://packagecloud.io