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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 63a3fbc4d6d7024b261eb8be41a9d2a6766a0f60
4
- data.tar.gz: 4804299164f31eae202321d7a4ea32a92a03f5fe
3
+ metadata.gz: 8ee1927889b4c714f7313075230adfaa6ce7cd54
4
+ data.tar.gz: 8b158c8988922742b74cddfcdcca7d2b5219ae23
5
5
  SHA512:
6
- metadata.gz: 6fc9f65d601a3ddecdf8543fd2a9c8d6ec1c567f612a30eedaa6fd2c9e450496437ca6d627aa96d9c11f4feada29ea6a9edde86288e03f1a7af7340ffe75dbb0
7
- data.tar.gz: 88b776dd9e573f109f9be74773589eee4b46625bbd2441bed6de900306e5ab23c7022fea981ad0a8175aa8d05d9fe1e16d53e17ad7f0b84d48bcbc77c353b34f
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
 
File without changes
@@ -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/api/")
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["item"])
77
+ download_uri = URI(data["result"]["url"])
79
78
  content = Net::HTTP.get(download_uri)
80
79
 
81
80
  case type
@@ -1,3 +1,3 @@
1
1
  module POEditor
2
- VERSION = "0.3.2"
2
+ VERSION = "0.4.0"
3
3
  end
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.3.2
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: 2017-11-15 00:00:00.000000000 Z
11
+ date: 2018-10-25 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: colorize