ldp 0.0.9 → 0.0.10

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: e9fff3eeeb00aa2238f94ece780c316f278afe7e
4
- data.tar.gz: 64b98dd94fe94d5543effc81f2a91effcbc0a39c
3
+ metadata.gz: 0802cd6ebaab85c7e810463324f747ce03a5ae27
4
+ data.tar.gz: bbabd5c9cfde8fa68fcadd3667409b41bfb87349
5
5
  SHA512:
6
- metadata.gz: 77c0d192ad0494b4c4c0eeec7d9a453305965d4a241186fcae6157aabd8ec2150ede530cc54528d635d7eecbb0b4062436a64890a42b243688acb8a5545d1863
7
- data.tar.gz: da2fee235e20c876ab531e340abd00c9c754f16fe6825b32989f7ecdc4a317d0a15fc3b22363c8f0d37424f823151bb1db91cad7f9128e3e6857d21f68faee01
6
+ metadata.gz: aa876432ca779c28ac1cd3ed7f9d4faaa44016a6a6473e8d8f40b576a89ff2ac100f23e9fb1058344b5fff4fc298710462f9d68b4ae127ed1a630c54e752d8c2
7
+ data.tar.gz: fc40000df0e48451ff712ae1b523c495135045556da61ca41fdc2664f2960b88e68b2c15900c2beefdce353865efb53dc389318c01f5248e68b213e17a945ec5
data/lib/ldp/resource.rb CHANGED
@@ -83,6 +83,7 @@ module Ldp
83
83
  new_content ||= content
84
84
  resp = client.put subject, new_content do |req|
85
85
  req.headers['If-Match'] = get.etag if retrieved_content?
86
+ yield req if block_given?
86
87
  end
87
88
  update_cached_get(resp) if retrieved_content?
88
89
  resp
data/lib/ldp/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module Ldp
2
- VERSION = "0.0.9"
2
+ VERSION = "0.0.10"
3
3
  end
@@ -106,4 +106,19 @@ describe Ldp::Resource do
106
106
 
107
107
  end
108
108
  end
109
+
110
+ describe "#update" do
111
+ let(:path) { '/a_new_resource' }
112
+ let(:conn_stubs) do
113
+ Faraday::Adapter::Test::Stubs.new do |stub|
114
+ stub.put(path, nil, {'Content-Type' => 'application/xml', "Content-Length"=>"0" }) { [200] }
115
+ end
116
+ end
117
+
118
+ it "should pass headers" do
119
+ subject.update do |req|
120
+ req.headers = {'Content-Type' => 'application/xml' }
121
+ end
122
+ end
123
+ end
109
124
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ldp
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.9
4
+ version: 0.0.10
5
5
  platform: ruby
6
6
  authors:
7
7
  - Chris Beer
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-10-31 00:00:00.000000000 Z
11
+ date: 2014-11-06 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: faraday