poeditor-cli 0.3.2 → 0.4.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +1 -0
- data/bin/poeditor +0 -0
- data/lib/poeditor/core.rb +4 -5
- data/lib/poeditor/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: 8ee1927889b4c714f7313075230adfaa6ce7cd54
|
4
|
+
data.tar.gz: 8b158c8988922742b74cddfcdcca7d2b5219ae23
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e8cd516091a9800a822dbd5fd8170f278d79d76df34ca93e0b96993bb9496225bc66682807df7e802e37d30a3fdc2a49e69806e189a7151b34e6dc99973207ca
|
7
|
+
data.tar.gz: dd10b82fa15fec9dd24faf15b17a307d7df3ccb4687b0feda672e83f94b55e3ecc3435b672ea913e38ffdcc28847441738a9026f11644c10647c60c77a7cbc69
|
data/README.md
CHANGED
@@ -2,6 +2,7 @@
|
|
2
2
|
|
3
3
|
[![Gem](https://img.shields.io/gem/v/poeditor-cli.svg)](https://rubygems.org/gems/poeditor-cli)
|
4
4
|
[![Build Status](https://travis-ci.org/StyleShare/poeditor-cli.svg?branch=master)](https://travis-ci.org/StyleShare/poeditor-cli)
|
5
|
+
[![Codecov](https://img.shields.io/codecov/c/github/StyleShare/poeditor-cli.svg)](https://codecov.io/gh/StyleShare/poeditor-cli)
|
5
6
|
|
6
7
|
Command line application for [POEditor](https://poeditor.com).
|
7
8
|
|
data/bin/poeditor
CHANGED
File without changes
|
data/lib/poeditor/core.rb
CHANGED
@@ -22,11 +22,10 @@ module POEditor
|
|
22
22
|
# @param options [Hash{Sting => Object}]
|
23
23
|
#
|
24
24
|
# @return [Net::HTTPResponse] The response object of API request
|
25
|
-
#
|
25
|
+
#
|
26
26
|
# @see https://poeditor.com/api_reference/ POEditor API Reference
|
27
27
|
def api(action, api_token, options={})
|
28
|
-
uri = URI("https://poeditor.com/
|
29
|
-
options["action"] = action
|
28
|
+
uri = URI("https://api.poeditor.com/v2/#{action}")
|
30
29
|
options["api_token"] = api_token
|
31
30
|
return Net::HTTP.post_form(uri, options)
|
32
31
|
end
|
@@ -67,7 +66,7 @@ module POEditor
|
|
67
66
|
"type" => type,
|
68
67
|
"tags" => (tags || []).join(","),
|
69
68
|
}
|
70
|
-
response = self.api("export", api_key, options)
|
69
|
+
response = self.api("projects/export", api_key, options)
|
71
70
|
data = JSON(response.body)
|
72
71
|
unless data["response"]["status"] == "success"
|
73
72
|
code = data["response"]["code"]
|
@@ -75,7 +74,7 @@ module POEditor
|
|
75
74
|
raise POEditor::Exception.new "#{message} (#{code})"
|
76
75
|
end
|
77
76
|
|
78
|
-
download_uri = URI(data["
|
77
|
+
download_uri = URI(data["result"]["url"])
|
79
78
|
content = Net::HTTP.get(download_uri)
|
80
79
|
|
81
80
|
case type
|
data/lib/poeditor/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: poeditor-cli
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.4.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Suyeol Jeon
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2018-10-25 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: colorize
|