ruby-lokalise-api 2.0.0 → 2.0.1

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
  SHA256:
3
- metadata.gz: 3917d088f403329a2daf516f1c7ae13ceb58c4afb598f77c7ce5fe71e8b80361
4
- data.tar.gz: dd8a1a57656a0826841576c27a0b7d343dbab5b41ff87440f49ec1cc77816df3
3
+ metadata.gz: 3b5ad1966377b3613a7914324f5462329ff4f41b2367700d3614279a6214f45d
4
+ data.tar.gz: 75855fa5e62fe199ea027afb0c6d8fd0a8efa6c08b7d6099a08963ccde631b75
5
5
  SHA512:
6
- metadata.gz: cb7a76b7c937254b86cd6f5ec3398fe8623c44712cb465fc313eaedf1539e28d850e6e71d28282a8dc7131901918c06911fe72437e5aa053b98c7f7d6086f297
7
- data.tar.gz: 22905df5254cd09103f79743cdb19bd6f6b2db8c081ffe528ae00f7f35cc4cafab9b3003cb8c04c6fe5ab11403722e228231c1636262921f531ffe342ada3525
6
+ metadata.gz: 7908537fe4e3f3fc750fcdac3ad3eadbd95e80a0a418c0dbc719990081d16c346a4ee428bebea4936ea6d1ae5219a2fd08dbae0b832002ee8b6bbb69f2914ce4
7
+ data.tar.gz: 541a64ee224a4d86191e63968b78599da995e71443ac31cd076242ae2c5639365900a2a78adc741e2a74add6656443765e8f63e79746a3c89fcc177aec4ad1a5
data/CHANGELOG.md CHANGED
@@ -1,5 +1,10 @@
1
1
  # Changelog
2
2
 
3
+ ## 2.0.1 (21-Feb-19)
4
+
5
+ * Bump dependencies
6
+ * Use more direct approach to sending `DELETE` requests with bodies. It seems like Faraday team [decided to abandon the idea of writing delete request one-liners](https://github.com/lostisland/faraday/issues/693#issuecomment-466086832), so we'll stick with another approach
7
+
3
8
  ## 2.0.0 (14-Dec-18)
4
9
 
5
10
  * Major re-write of internal stuff
@@ -88,7 +88,7 @@ module Lokalise
88
88
 
89
89
  # Fetch collection data and instantiate an individual resource for each object
90
90
  # We also preserve the `client` to be able to chain API methods later
91
- @collection = response['content'][data_key_plural].collect do |raw_model|
91
+ @collection = response['content'][data_key_plural].map do |raw_model|
92
92
  Module.const_get("Lokalise::Resources::#{model_class}").new 'content' => raw_model,
93
93
  'client' => response['client'],
94
94
  'base_path' => response['path']
@@ -4,7 +4,7 @@ module Lokalise
4
4
  # Destroys all keys in the collection
5
5
  # @return [Hash]
6
6
  def destroy_all
7
- keys = collection.collect(&:key_id)
7
+ keys = collection.map(&:key_id)
8
8
  Lokalise::Resources::Key.destroy @client, @path, keys: keys
9
9
  end
10
10
 
@@ -27,13 +27,11 @@ module Lokalise
27
27
 
28
28
  def delete(path, client, params = {})
29
29
  respond_with(
30
- connection(client.token).run_request(:delete, prepare(path), MultiJson.dump(params), {}),
30
+ connection(client.token).delete(prepare(path)) do |req|
31
+ req.body = MultiJson.dump(params)
32
+ end,
31
33
  client
32
34
  )
33
- # TODO: current version of Faraday does not allow to pass DELETE body request
34
- # As soon as this PR https://github.com/lostisland/faraday/issues/693 is merged,
35
- # replace above with:
36
- # delete(path, MultiJson.dump(params))
37
35
  end
38
36
 
39
37
  private
@@ -1,3 +1,3 @@
1
1
  module Lokalise
2
- VERSION = '2.0.0'.freeze
2
+ VERSION = '2.0.1'.freeze
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ruby-lokalise-api
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.0.0
4
+ version: 2.0.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ilya Bodrov
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2018-12-14 00:00:00.000000000 Z
11
+ date: 2019-02-21 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: addressable
@@ -244,8 +244,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
244
244
  - !ruby/object:Gem::Version
245
245
  version: '0'
246
246
  requirements: []
247
- rubyforge_project:
248
- rubygems_version: 2.7.8
247
+ rubygems_version: 3.0.2
249
248
  signing_key:
250
249
  specification_version: 4
251
250
  summary: Ruby interface to the Lokalise API