sasquatch 0.0.3 → 0.0.4

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. data/VERSION +1 -1
  2. data/lib/sasquatch/store.rb +7 -6
  3. metadata +3 -3
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.0.3
1
+ 0.0.4
@@ -18,7 +18,7 @@ module Sasquatch
18
18
  end
19
19
 
20
20
  def describe(uri)
21
- options = {:query=>{:about=>uri, :output=>"ntriples"}}
21
+ options = {:query=>{:about=>uri, :output=>"ntriples"}, :digest_auth=>@auth}
22
22
  @last_response = get("/#{@store_name}/meta", options)
23
23
  graph = parse_ntriples(@last_response.body)
24
24
  graph.set_requested_resource(uri)
@@ -28,7 +28,7 @@ module Sasquatch
28
28
  def describe_multi(uris)
29
29
  sparql = "DESCRIBE "
30
30
  uris.each {|uri| sparql << "<#{uri}> "}
31
- options = {:query=>{:query=>sparql, :output=>"ntriples"}}
31
+ options = {:query=>{:query=>sparql, :output=>"ntriples"}, :digest_auth=>@auth}
32
32
  @last_response = get("/#{@store_name}/services/sparql", options)
33
33
  graph = parse_ntriples(@last_response.body)
34
34
  graph
@@ -50,7 +50,7 @@ module Sasquatch
50
50
  i += 1
51
51
  end
52
52
  sparql << "\nWHERE\n{ #{where.join(" UNION ")} }"
53
- options = {:body=>{:query=>sparql, :output=>"ntriples"}}
53
+ options = {:body=>{:query=>sparql, :output=>"ntriples"}, :digest_auth=>@auth}
54
54
  @last_response = post("/#{@store_name}/services/sparql", options)
55
55
  graph = parse_ntriples(@last_response.body)
56
56
  graph
@@ -82,6 +82,7 @@ module Sasquatch
82
82
  path = "/#{@store_name}/items"
83
83
  opts = {:query=>options}
84
84
  opts[:query][:query] = query
85
+ opts[:digest_auth] = @auth
85
86
  @last_response = get(path, opts)
86
87
  #graph = parse_rss10(@last_response.body)
87
88
  graph = parse_json(@last_response.body)
@@ -223,7 +224,7 @@ module Sasquatch
223
224
  unless graph == :default
224
225
  path << "/graphs/#{graph}"
225
226
  end
226
- options = {:query=>{:query=>query, :output=>'ntriples'}}
227
+ options = {:query=>{:query=>query, :output=>'ntriples'}, :digest_auth=>@auth}
227
228
  @last_response = get(path, options)
228
229
  graph = parse_ntriples(@last_response.body)
229
230
  graph
@@ -236,7 +237,7 @@ module Sasquatch
236
237
  unless graph == :default
237
238
  path << "/graphs/#{graph}"
238
239
  end
239
- options = {:query=>{:query=>query, :output=>'json'}}
240
+ options = {:query=>{:query=>query, :output=>'json'}, :digest_auth=>@auth}
240
241
  @last_response = get(path, options)
241
242
  SPARQL::Client.parse_json_bindings(@last_response.body) || false
242
243
  end
@@ -247,7 +248,7 @@ module Sasquatch
247
248
  accept = self.class.headers['Accept']
248
249
  self.class.headers 'Accept' => 'application/json'
249
250
  path = "/#{@store_name}/config/access-status"
250
- @last_response = get(path, {})
251
+ @last_response = get(path, {:digest_auth=>@auth})
251
252
  graph = parse_json(@last_response.body)
252
253
  self.class.headers 'Accept' => accept
253
254
  graph
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: sasquatch
3
3
  version: !ruby/object:Gem::Version
4
- hash: 25
4
+ hash: 23
5
5
  prerelease:
6
6
  segments:
7
7
  - 0
8
8
  - 0
9
- - 3
10
- version: 0.0.3
9
+ - 4
10
+ version: 0.0.4
11
11
  platform: ruby
12
12
  authors:
13
13
  - Ross Singer