motion-http 1.0.2 → 1.0.3

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.
Files changed (3) hide show
  1. checksums.yaml +4 -4
  2. data/lib/cocoa/adapter.rb +6 -1
  3. metadata +2 -2
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 9a2a08f70352d4ca6c4a4b3a79ab5825e806787ab90088bcad88350360d5c11f
4
- data.tar.gz: 9bfc38b0f0138c7c4fb5ab98974ddb4ab852ed96e083d001ec683463d2e5f0ce
3
+ metadata.gz: 6fdd9853db4edb1720e95dac2ab15074cfe361e21a8c80b940854d22a8c1fe38
4
+ data.tar.gz: eb9b3042d28b232921fd1adda2ece8e17fd4397a63bf6a7bdeaba0fcd045929a
5
5
  SHA512:
6
- metadata.gz: 2a3d796b3c9654461fb66b42456e7f43bfd6d896e5d3f0165c5d00dcb184ca5867b55a089d2eb75d2508b76697bec120bc1047874bc02530cb5e0c93896aa2ec
7
- data.tar.gz: caf9553c2567c658ffd23c303dba63014a30fba3f5f4f111339753a8bab2c4b8bb9dbde0aa39d0d2e4dbac689bb826e75760123b502411687c4ea93dcee8c7cf
6
+ metadata.gz: 1c151143736e9dc4ca7e9b4ace845ffec8a6deb1316fcfd083c0ec9ce1577d3f32b41059f27fe228d3161076a3b63bda26f514c2c4f0573d464f9a43088da9f8
7
+ data.tar.gz: 7f5525e0c1f1f7155feda2ef235ad8a124a34da785d180aa211d5c04e2dc8d5b355eea3abb912fd7af8a192f132bb06a38fcf66b9302ff1da9236ec51324b66b
data/lib/cocoa/adapter.rb CHANGED
@@ -40,7 +40,12 @@ class Motion
40
40
  end
41
41
 
42
42
  if @request.body
43
- ns_url_request.HTTPBody = NSString.alloc.initWithString(@request.body).dataUsingEncoding(NSUTF8StringEncoding)
43
+ if @request.body.is_a?(NSData)
44
+ body_data = @request.body
45
+ else
46
+ body_data = NSString.alloc.initWithString(@request.body).dataUsingEncoding(NSUTF8StringEncoding)
47
+ end
48
+ ns_url_request.HTTPBody = body_data
44
49
  end
45
50
 
46
51
  # TODO: add other headers
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: motion-http
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.2
4
+ version: 1.0.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Andrew Havens
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2021-10-20 00:00:00.000000000 Z
11
+ date: 2021-10-22 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: motion-lager