faraday_middleware-jsons 0.2.1 → 0.2.2

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: 7ecadb28c1a1ab45afd4ee8a47482e1a4cc42bf5
4
- data.tar.gz: 73422fc24d3bcd21b23e31af334b7227ff9fe126
3
+ metadata.gz: ba8bf27e2279311e73f0d78413b5b8576fd39c8f
4
+ data.tar.gz: c452dbef750f84b401016dcb32db81fa597d71ad
5
5
  SHA512:
6
- metadata.gz: fd4b1f28843acfa500a4e3e05880291955a8562ab31fc30a7d07b0cd7a7cd63fed33f6f1f85b280b4dbaf594795f3c0311229221c72853e755f745824a5c68e7
7
- data.tar.gz: 6c721d2906147a54c18b5536646387c36d1bde0837512af07e565979e9aad0be0efbe902f37a974142268d471a1af2f5818c57d951df080017887a551c9a8794
6
+ metadata.gz: 010d776a8bbbaf2787a6fedbb15377eead37d29c9d7fbb7c92df3a26bdc35e2cb5223e3414b9be07123be18fcbf303b4cb67de03f66d47801eeac5f1a5ee42f3
7
+ data.tar.gz: f135216c6ff7d956e21e6ac41e3346c8aeb25682e3480658f654f90c2c1232b6f634248938dea58f5a0351b49a6effda4d0b0a036a0f78b2c902ba75cad01255
data/CHANGELOG.md CHANGED
@@ -1,3 +1,7 @@
1
+ # 0.2.2
2
+
3
+ * Do not encode String again
4
+
1
5
  # 0.2.1
2
6
 
3
7
  * keep remained options to pass it to dump, then some adapter accepts (e.g. json_gems accepts ascii_only)
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.2.1
1
+ 0.2.2
@@ -10,7 +10,9 @@ module FaradayMiddleware::Jsons
10
10
 
11
11
  def call(env)
12
12
  if has_body?(env) && match_content_type?(env)
13
- env[:body] = MultiJson.dump(env[:body], @options.merge(pretty: @pretty))
13
+ # do not encode multiple times when the same middleware is decrared
14
+ # unicode string is valid for json (but escaping is also skipped...)
15
+ env[:body] = MultiJson.dump(env[:body], @options.merge(pretty: @pretty)) unless env[:body].is_a?(String)
14
16
  end
15
17
 
16
18
  @app.call(env)
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: faraday_middleware-jsons
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.1
4
+ version: 0.2.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - okitan
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2015-06-25 00:00:00.000000000 Z
11
+ date: 2015-06-26 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: faraday