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 +4 -4
- data/lib/tx-ruby.rb +6 -1
- data/lib/tx-ruby/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: 364697065d50a583669ea0510cfe8deb99254c67
|
|
4
|
+
data.tar.gz: 13dd0ab8180be9ec772813d457a24f5dd21cfd9a
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 677da7da53555f59517e1de1d348f8de387f30fcce3d3442473cdbf0d735262ee9488ce7402bad83d54601983e1f133867fd7c402df83343291bb724b108d01c
|
|
7
|
+
data.tar.gz: 4cf0882e5a3f781e2a2117b44bd517c038160aadbe35f9086e2f625dc50aa65e79475b2a69f398cc1a9d235c5eaf1e494aed3e253a32403e3c51e970f2bfe9a7
|
data/lib/tx-ruby.rb
CHANGED
|
@@ -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
|
-
|
|
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
|
|
data/lib/tx-ruby/version.rb
CHANGED
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.
|
|
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-
|
|
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:
|