tx-ruby 0.0.1 → 0.0.2

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: 18f07b6bd2dfc69b7fc6213ec216240db1ff0bb6
4
- data.tar.gz: 4c5f38bd6d53afb1e4626849be4b9dde333d9fa3
3
+ metadata.gz: 364697065d50a583669ea0510cfe8deb99254c67
4
+ data.tar.gz: 13dd0ab8180be9ec772813d457a24f5dd21cfd9a
5
5
  SHA512:
6
- metadata.gz: 9f51c76bddc0c558e64dee14b3b716654fd4ff3bf14f68d140f59c078e75fe8dd627ea92ca53840d04b6ea7fd26dbbe7bfdfc34b52951bdf5a50184cf8b4192c
7
- data.tar.gz: 30f81faa52f9ac3810f26e71a7ed9cebeda62fad554ebfe753f9f459f1d9b671635ac7d2d49f2f172a3bc41b751e704f84c08061998dc0a8f6e31ea31d4660a4
6
+ metadata.gz: 677da7da53555f59517e1de1d348f8de387f30fcce3d3442473cdbf0d735262ee9488ce7402bad83d54601983e1f133867fd7c402df83343291bb724b108d01c
7
+ data.tar.gz: 4cf0882e5a3f781e2a2117b44bd517c038160aadbe35f9086e2f625dc50aa65e79475b2a69f398cc1a9d235c5eaf1e494aed3e253a32403e3c51e970f2bfe9a7
@@ -59,7 +59,12 @@ module Transifex
59
59
  res = Net::HTTP.start(uri.host, 80) do |http|
60
60
  req = Net::HTTP::const_get(method.capitalize).new(uri.request_uri, request_headers)
61
61
  req.basic_auth self.configuration.client_login, self.configuration.client_secret
62
- req.body = Transifex::JSON.dump(params)
62
+ begin
63
+ req.body = Transifex::JSON.dump(params)
64
+ rescue Encoding::UndefinedConversionError
65
+ params[:content] = params[:content].force_encoding("utf-8")
66
+ req.body = Transifex::JSON.dump(params)
67
+ end
63
68
  http.request req
64
69
  end
65
70
 
@@ -1,3 +1,3 @@
1
1
  module Transifex
2
- VERSION = "0.0.1"
2
+ VERSION = "0.0.2"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: tx-ruby
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.1
4
+ version: 0.0.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ian Florentino, Fred-grais
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2017-04-26 00:00:00.000000000 Z
11
+ date: 2017-05-05 00:00:00.000000000 Z
12
12
  dependencies: []
13
13
  description: A Transifex API interface written in Ruby
14
14
  email: