boost-dnz-client 0.0.2

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.
data/History.txt ADDED
@@ -0,0 +1,4 @@
1
+ === 0.0.1 2009-07-14
2
+
3
+ * 1 major enhancement:
4
+ * Initial release
data/License.txt ADDED
@@ -0,0 +1,22 @@
1
+ Copyright (c) 2009 Boost New Media (http://www.boost.co.nz)
2
+
3
+ Permission is hereby granted, free of charge, to any person
4
+ obtaining a copy of this software and associated documentation
5
+ files (the "Software"), to deal in the Software without
6
+ restriction, including without limitation the rights to use,
7
+ copy, modify, merge, publish, distribute, sublicense, and/or sell
8
+ copies of the Software, and to permit persons to whom the
9
+ Software is furnished to do so, subject to the following
10
+ conditions:
11
+
12
+ The above copyright notice and this permission notice shall be
13
+ included in all copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
16
+ EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
17
+ OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
18
+ NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
19
+ HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
20
+ WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
21
+ FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
22
+ OTHER DEALINGS IN THE SOFTWARE.
data/Manifest.txt ADDED
@@ -0,0 +1,21 @@
1
+ History.txt
2
+ Manifest.txt
3
+ PostInstall.txt
4
+ README.rdoc
5
+ License.txt
6
+ Rakefile
7
+ lib/dnz.rb
8
+ lib/dnz/attributes.rb
9
+ lib/dnz/client.rb
10
+ lib/dnz/facet.rb
11
+ lib/dnz/result.rb
12
+ lib/dnz/search.rb
13
+ script/console
14
+ script/destroy
15
+ script/generate
16
+ spec/dnz/client_spec.rb
17
+ spec/dnz/result_spec.rb
18
+ spec/dnz/search_spec.rb
19
+ spec/spec.opts
20
+ spec/spec_helper.rb
21
+ tasks/rspec.rake
data/PostInstall.txt ADDED
@@ -0,0 +1,3 @@
1
+ For more information on DigitalNZ, see http://digitalnz.org
2
+
3
+
data/README.rdoc ADDED
@@ -0,0 +1,46 @@
1
+ = DigitalNZ Client Library
2
+
3
+ * http://github.com/boost/dnz-client
4
+
5
+ == SYNOPSIS:
6
+
7
+ require 'dnz/client'
8
+ client = DNZ::Client.new('abcdefg') # API KEY
9
+ search = client.search('otago')
10
+ search.results.each do |result|
11
+ puts result.title
12
+ end
13
+
14
+ == REQUIREMENTS:
15
+
16
+ * Nokogiri
17
+ * ActiveSupport
18
+
19
+ == INSTALL:
20
+
21
+ * sudo gem install dnz-client / sudo gem install boost-dnz-client
22
+
23
+ == LICENSE:
24
+
25
+ (The MIT License)
26
+
27
+ Copyright (c) 2009 Boost New Media (http:/www.boost.co.nz)
28
+
29
+ Permission is hereby granted, free of charge, to any person obtaining
30
+ a copy of this software and associated documentation files (the
31
+ 'Software'), to deal in the Software without restriction, including
32
+ without limitation the rights to use, copy, modify, merge, publish,
33
+ distribute, sublicense, and/or sell copies of the Software, and to
34
+ permit persons to whom the Software is furnished to do so, subject to
35
+ the following conditions:
36
+
37
+ The above copyright notice and this permission notice shall be
38
+ included in all copies or substantial portions of the Software.
39
+
40
+ THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND,
41
+ EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
42
+ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
43
+ IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
44
+ CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
45
+ TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
46
+ SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
data/Rakefile ADDED
@@ -0,0 +1,26 @@
1
+ require 'rubygems'
2
+ gem 'hoe', '>= 2.1.0'
3
+ require 'hoe'
4
+ require 'fileutils'
5
+ require './lib/dnz'
6
+
7
+ Hoe.plugin :newgem
8
+ # Hoe.plugin :website
9
+ # Hoe.plugin :cucumberfeatures
10
+
11
+ # Generate all the Rake tasks
12
+ # Run 'rake -T' to see list of generated tasks (from gem root directory)
13
+ $hoe = Hoe.spec 'dnz-client' do
14
+ self.developer 'Jeremy Wells', 'jeremy@boost.co.nz'
15
+ self.post_install_message = 'PostInstall.txt' # TODO remove if post-install message not required
16
+ self.description = "Ruby library for accessing Digital New Zealand's search API (digitalnz.org)"
17
+ #self.rubyforge_name = self.name # TODO this is default value
18
+ self.extra_deps = [['activesupport','>= 2.0.2'], ['nokogiri', '>= 1.2.3']]
19
+ end
20
+
21
+ require 'newgem/tasks'
22
+ Dir['tasks/**/*.rake'].each { |t| load t }
23
+
24
+ # TODO - want other tests/tasks run by default? Add them to the list
25
+ # remove_task :default
26
+ # task :default => [:spec, :features]
data/lib/dnz.rb ADDED
@@ -0,0 +1,8 @@
1
+ $:.unshift(File.dirname(__FILE__)) unless
2
+ $:.include?(File.dirname(__FILE__)) || $:.include?(File.expand_path(File.dirname(__FILE__)))
3
+
4
+ require 'dnz/client'
5
+
6
+ module Dnz
7
+ VERSION = '0.0.2'
8
+ end
@@ -0,0 +1,9 @@
1
+ module DNZ
2
+ module Attributes
3
+ def method_missing(symbol, *args)
4
+ if args.empty? && @attributes.has_key?(symbol.to_s)
5
+ @attributes[symbol.to_s]
6
+ end
7
+ end
8
+ end
9
+ end
data/lib/dnz/client.rb ADDED
@@ -0,0 +1,117 @@
1
+ require 'rubygems'
2
+ require 'open-uri'
3
+ require 'set'
4
+ require 'active_support'
5
+ require 'dnz/search'
6
+
7
+ module DNZ
8
+ # This is a simple client for accessing the digitalnz.org API
9
+ # for searching New Zealand's digital content. It provides
10
+ # access to search results and facet information.
11
+ #
12
+ # Author:: Jeremy Wells, Boost New Media (http://www.boost.co.nz)
13
+ # Copyright:: Copyright (c) 2009 Boost New Media
14
+ # License:: MIT
15
+ class Client
16
+ # The dnz API key
17
+ attr_reader :api_key
18
+ # The base URL (defaults to http://api.digitalnz.org)
19
+ attr_reader :base_url
20
+ # The version of the API to use (defaults to v1)
21
+ attr_reader :version
22
+
23
+ APIS = {
24
+ :search => 'records/${version}.xml/'
25
+ }
26
+
27
+ ARGS = {
28
+ :search => Set.new([
29
+ :search_text,
30
+ :api_key,
31
+ :num_results,
32
+ :start,
33
+ :sort,
34
+ :direction,
35
+ :facets,
36
+ :facet_num_results,
37
+ :facet_start
38
+ ])
39
+ }
40
+
41
+ # Constructor method for the Client class. An API key must be provided.
42
+ # The base url and version default to "http://api.digitalnz.org" and "v1".
43
+ #
44
+ # ==== Example
45
+ # client = DNZ::Client.new('abcdefghijklmnoq')
46
+ # search = client.search('some text')
47
+ # search.results.each do |result|
48
+ # puts result.title
49
+ # end
50
+ def initialize(api_key, base_url = 'http://api.digitalnz.org', version = 'v1')
51
+ @api_key = api_key
52
+ @base_url = base_url
53
+ @version = version
54
+ end
55
+
56
+ # Get a list of all categories using the 'category' facet.
57
+ #
58
+ # ==== Example
59
+ # categories = client.categories
60
+ # categories.each do |category|
61
+ # puts category.name
62
+ # end
63
+ def categories
64
+ search('*:*', :facets => 'category', :facet_num_results => 100).facets['category'].values
65
+ end
66
+
67
+ # Run a search using the digitalnz.org API.
68
+ #
69
+ # ==== Options
70
+ #
71
+ # * <tt>:num_results</tt> - The number of results to return in this call. Defaults to 20.
72
+ # * <tt>:start</tt> - The starting offset of the results.
73
+ # * <tt>:facets</tt> - The facets to return for this search.
74
+ #
75
+ # ==== Example
76
+ # search = client.search('rubgy', :num_results => 50)
77
+ # search.results.each_with_index do |result, index|
78
+ # puts "#{index+1}: #{result.title}"
79
+ # end
80
+ def search(text, options = {})
81
+ options.reverse_merge!(
82
+ :search_text => text,
83
+ :num_results => 20,
84
+ :start => 0
85
+ )
86
+
87
+ # Select the correct page
88
+ page = options.delete(:page)
89
+ options[:start] = (page-1) * options[:num_results] if page
90
+
91
+ DNZ::Search.new(self, options)
92
+ end
93
+
94
+ # Make a direct call to the digitalnz.org API.
95
+ #
96
+ # * <tt>api</tt> - The api call to make. This must be listed in the APIS constant.
97
+ # * <tt>options</tt> - A hash of options to pass to the API call. These options must be defined in the ARGS constant.
98
+ def fetch(api, options = {})
99
+ validate_options(api, options)
100
+
101
+ options = options.reverse_merge(:api_key => self.api_key)
102
+ qs = options.map{|k,v| '%s=%s' % [k,v] }.join('&')
103
+ url = self.base_url + '/' + APIS[api].gsub('${version}', self.version) + '?' + qs
104
+ open(url)
105
+ end
106
+
107
+ private
108
+
109
+ def validate_options(path, options = {})
110
+ options.symbolize_keys!
111
+
112
+ if ARGS.has_key?(path) && !Set.new(options.keys).subset?(ARGS[path])
113
+ raise ArgumentError.new("Valid options for #{path} are: #{ARGS[path].to_a.join(', ')}, provided: #{options.keys.join(', ')}")
114
+ end
115
+ end
116
+ end
117
+ end
data/lib/dnz/facet.rb ADDED
@@ -0,0 +1,59 @@
1
+ require 'dnz/attributes'
2
+
3
+ module DNZ
4
+ # @inheritDoc
5
+ class FacetArray < Array
6
+ def [](value)
7
+ if value.is_a?(String) || value.is_a?(Symbol)
8
+ self.detect{|f| f.name == value.to_s }
9
+ else
10
+ super
11
+ end
12
+ end
13
+ end
14
+
15
+ class Facet
16
+ attr_reader :name
17
+ attr_reader :values
18
+ attr_reader :search
19
+
20
+ def initialize(client, search, doc)
21
+ @name = doc.xpath('facet-field').text
22
+ @values = []
23
+ @search = search
24
+
25
+ doc.xpath('values').first.children.each do |value_doc|
26
+ value = DNZ::FacetValue.new(client, self, value_doc)
27
+ @values << value if value.valid?
28
+ end
29
+ end
30
+ end
31
+
32
+ class FacetValue
33
+ attr_reader :name, :count
34
+
35
+ def initialize(client, facet, doc)
36
+ @client = client
37
+ @facet = facet
38
+ @search_text = facet.search.text
39
+ @name = doc.xpath('name').text
40
+ @count = doc.xpath('num-results').text.to_i
41
+ end
42
+
43
+ def valid?
44
+ !self.name.blank?
45
+ end
46
+
47
+ def search(text = @search_text, options = {})
48
+ @client.search('%s:%s %s' % [@facet.name, self.name, text], options)
49
+ end
50
+
51
+ def inspect
52
+ {:name => self.name, :count => self.count}.inspect
53
+ end
54
+
55
+ def to_s
56
+ self.name
57
+ end
58
+ end
59
+ end
data/lib/dnz/result.rb ADDED
@@ -0,0 +1,16 @@
1
+ require 'dnz/attributes'
2
+
3
+ module DNZ
4
+ # A DNZ::Search result record
5
+ class Result
6
+ include DNZ::Attributes
7
+
8
+ def initialize(doc)
9
+ @attributes = {}
10
+
11
+ doc.children.each do |child|
12
+ @attributes[child.name.downcase.underscore] = child.text.to_s
13
+ end
14
+ end
15
+ end
16
+ end
data/lib/dnz/search.rb ADDED
@@ -0,0 +1,142 @@
1
+ require 'nokogiri'
2
+ require 'dnz/result'
3
+ require 'dnz/facet'
4
+
5
+ begin
6
+ gem 'mislav-will_paginate' rescue nil
7
+ require 'will_paginate/collection' rescue nil
8
+ rescue LoadError => e
9
+ end
10
+
11
+ module DNZ
12
+ # This class represents a digitalnz search API call. It should not be created directly. Instead
13
+ # use the <tt>Client.search</tt> method.
14
+ #
15
+ # === Example
16
+ # search = client.search('text')
17
+ # puts "%d results found on %d pages" % [search.result_count, search.pages]
18
+ class Search
19
+ attr_reader :result_count
20
+
21
+ # Constructor for Search class. Do not call this directly, instead use the <tt>Client.search</tt> method.
22
+ def initialize(client, search_options)
23
+ @client = client
24
+ @search_options = search_options
25
+
26
+ execute
27
+ end
28
+
29
+ # The text used for searching
30
+ def text
31
+ @search_options[:search_text]
32
+ end
33
+
34
+ # The search options passed to the digitalnz API
35
+ def options
36
+ @search_options
37
+ end
38
+
39
+ # An array of results. If the mislav-will_paginate gem is installed this will return a paginated array.
40
+ def results
41
+ if @results.nil?
42
+ parse_results
43
+ paginate_results if defined? WillPaginate::Collection
44
+ end
45
+
46
+ @results
47
+ end
48
+
49
+ # An array of facets.
50
+ #
51
+ # === Example
52
+ # search = client.search('text', :facets => 'category')
53
+ # categories = search.facets['category']
54
+ # categories.each do |category|
55
+ # puts '%d results in category %s' % [category.count, category.name]
56
+ # end
57
+ def facets
58
+ parse_facets if @facets.nil?
59
+ @facets
60
+ end
61
+
62
+ # The current page of results, based on the number of requested results and the start value
63
+ # (see <tt>Client.search</tt>).
64
+ def page
65
+ (((@start || 0) / num_results_requested) + 1) rescue 1
66
+ end
67
+
68
+ # Set the page. This will update the search :start option and call the API again. The results array
69
+ # will be replaced with the new page of results.
70
+ def page=(new_page)
71
+ @search_options['start'] = (new_page-1) * num_results_requested
72
+ execute
73
+ end
74
+
75
+ # The number of pages available for the current search.
76
+ def pages
77
+ num_results_requested < result_count ? (result_count.to_f / num_results_requested).ceil : 0
78
+ end
79
+
80
+ # The number of results requested via the :num_results option (see <tt>Client.search</tt>).
81
+ def num_results_requested
82
+ @num_results_requested || 20
83
+ end
84
+
85
+ def to_s
86
+ {
87
+ :results => self.results.length,
88
+ :facets => self.facets.length,
89
+ :page => self.page,
90
+ :pages => self.pages
91
+ }.inspect
92
+ end
93
+
94
+ private
95
+
96
+ def doc
97
+ @doc ||= Nokogiri::XML(@xml)
98
+ end
99
+
100
+ def execute
101
+ @doc = nil
102
+ @results = nil
103
+ @facets = nil
104
+ @xml = @client.send(:fetch, :search, @search_options)
105
+
106
+ parse_attributes
107
+
108
+ self
109
+ end
110
+
111
+ def paginate_results
112
+ @results = WillPaginate::Collection.create(self.page, num_results_requested, self.result_count) do |pager|
113
+ pager.replace @results
114
+ end
115
+ end
116
+
117
+ def parse_attributes
118
+ %w(num-results-requested result-count start).each do |node|
119
+ if child = doc.root.xpath(node).first
120
+ name = child.name.downcase.underscore
121
+ value = child['type'] == 'integer' ? child.text.to_i : child.text
122
+ instance_variable_set('@%s' % name, value)
123
+ end
124
+ end
125
+ end
126
+
127
+ def parse_results
128
+ @results = []
129
+ doc.xpath('//results/result').each do |result_xml|
130
+ @results << DNZ::Result.new(result_xml)
131
+ end
132
+ end
133
+
134
+ def parse_facets
135
+ @facets = FacetArray.new
136
+
137
+ doc.xpath('//facets/facet').each do |facet_xml|
138
+ @facets << DNZ::Facet.new(@client, self, facet_xml)
139
+ end
140
+ end
141
+ end
142
+ end
data/script/console ADDED
@@ -0,0 +1,11 @@
1
+ #!/usr/bin/env ruby
2
+ # File: script/console
3
+ irb = RUBY_PLATFORM =~ /(:?mswin|mingw)/ ? 'irb.bat' : 'irb'
4
+
5
+ libs = " -r irb/completion"
6
+ # Perhaps use a console_lib to store any extra methods I may want available in the cosole
7
+ # libs << " -r #{File.dirname(__FILE__) + '/../lib/console_lib/console_logger.rb'}"
8
+ libs << " -r #{File.dirname(__FILE__) + '/../lib/dnz.rb'}"
9
+
10
+ puts "Loading dnz gem"
11
+ exec "#{irb} #{libs} --simple-prompt"
data/script/destroy ADDED
@@ -0,0 +1,14 @@
1
+ #!/usr/bin/env ruby
2
+ APP_ROOT = File.expand_path(File.join(File.dirname(__FILE__), '..'))
3
+
4
+ begin
5
+ require 'rubigen'
6
+ rescue LoadError
7
+ require 'rubygems'
8
+ require 'rubigen'
9
+ end
10
+ require 'rubigen/scripts/destroy'
11
+
12
+ ARGV.shift if ['--help', '-h'].include?(ARGV[0])
13
+ RubiGen::Base.use_component_sources! [:rubygems, :newgem, :newgem_theme, :test_unit]
14
+ RubiGen::Scripts::Destroy.new.run(ARGV)
data/script/generate ADDED
@@ -0,0 +1,14 @@
1
+ #!/usr/bin/env ruby
2
+ APP_ROOT = File.expand_path(File.join(File.dirname(__FILE__), '..'))
3
+
4
+ begin
5
+ require 'rubigen'
6
+ rescue LoadError
7
+ require 'rubygems'
8
+ require 'rubigen'
9
+ end
10
+ require 'rubigen/scripts/generate'
11
+
12
+ ARGV.shift if ['--help', '-h'].include?(ARGV[0])
13
+ RubiGen::Base.use_component_sources! [:rubygems, :newgem, :newgem_theme, :test_unit]
14
+ RubiGen::Scripts::Generate.new.run(ARGV)
@@ -0,0 +1,32 @@
1
+ require File.dirname(__FILE__) + '/../spec_helper'
2
+ require 'dnz/client'
3
+
4
+ include DNZ
5
+
6
+ describe Client do
7
+ before(:each) do
8
+ @client = Client.new('abc')
9
+ @client.stub!(:open) # make sure open is never called
10
+ @search = mock(:search)
11
+ DNZ::Search.stub!(:new).and_return(@search)
12
+ end
13
+
14
+ describe '#search' do
15
+ it 'should create a new search object and return it' do
16
+ @client.search('*:*').should be(@search)
17
+ end
18
+ end
19
+
20
+ describe '#fetch' do
21
+ it 'should raise an error an invalid option is set' do
22
+ lambda do
23
+ @client.fetch(:search, :blahblah => 'dlfkgj')
24
+ end.should raise_error(ArgumentError)
25
+ end
26
+
27
+ it 'should call open with query string arguments' do
28
+ @client.should_receive(:open).with('http://api.digitalnz.org/records/v1.xml/?api_key=abc&search_text=*:*')
29
+ @client.fetch(:search, :search_text => '*:*')
30
+ end
31
+ end
32
+ end
@@ -0,0 +1,8 @@
1
+ require File.dirname(__FILE__) + '/../spec_helper'
2
+ require 'dnz/result'
3
+
4
+ include DNZ
5
+
6
+ describe Result do
7
+
8
+ end
@@ -0,0 +1,51 @@
1
+ require File.dirname(__FILE__) + '/../spec_helper'
2
+ require 'dnz/search'
3
+
4
+ include DNZ
5
+
6
+ describe Search do
7
+ before(:each) do
8
+ @xml = %Q{<?xml version="1.0"?>
9
+ <response>
10
+ <results>
11
+ <result>
12
+ <attribute>test</attribute>
13
+ </result>
14
+ </results>
15
+ <facets>
16
+ <facet>
17
+ <value>test</value>
18
+ </facet>
19
+ </facets>
20
+ </response>
21
+ }
22
+
23
+ @doc = Nokogiri::XML(@xml)
24
+ @client = mock(:client)
25
+ @result = mock(:result)
26
+ @facet = mock(:facet)
27
+ @options = {:search_text => 'test'}
28
+
29
+ Result.stub!(:new).and_return(@result)
30
+ Facet.stub!(:new).and_return(@facet)
31
+
32
+ @client.stub!(:fetch).and_return(@xml)
33
+ end
34
+
35
+ describe 'Search.new' do
36
+ it 'should call @client.fetch' do
37
+ @client.should_receive(:fetch).with(:search, :search_text => 'test').and_return(@xml)
38
+ Search.new(@client, @options)
39
+ end
40
+
41
+ it 'should create one result' do
42
+ Result.should_receive(:new).and_return(@result)
43
+ Search.new(@client, @options).results.should == [@result]
44
+ end
45
+
46
+ it 'should create one facet' do
47
+ Facet.should_receive(:new).and_return(@facet)
48
+ Search.new(@client, @options).facets.should == [@facet]
49
+ end
50
+ end
51
+ end
data/spec/spec.opts ADDED
@@ -0,0 +1,4 @@
1
+ --colour
2
+ --format progress
3
+ --loadby mtime
4
+ --reverse
@@ -0,0 +1,9 @@
1
+ require File.expand_path(File.dirname(__FILE__) + '/../lib/dnz')
2
+ require 'spec/matchers'
3
+ require 'rubygems'
4
+
5
+ include Spec::Matchers
6
+
7
+ Spec::Runner.configure do |config|
8
+
9
+ end
data/tasks/rspec.rake ADDED
@@ -0,0 +1,21 @@
1
+ begin
2
+ require 'spec'
3
+ rescue LoadError
4
+ require 'rubygems'
5
+ require 'spec'
6
+ end
7
+ begin
8
+ require 'spec/rake/spectask'
9
+ rescue LoadError
10
+ puts <<-EOS
11
+ To use rspec for testing you must install rspec gem:
12
+ gem install rspec
13
+ EOS
14
+ exit(0)
15
+ end
16
+
17
+ desc "Run the specs under spec"
18
+ Spec::Rake::SpecTask.new do |t|
19
+ t.spec_opts = ['--options', "spec/spec.opts"]
20
+ t.spec_files = FileList['spec/**/*_spec.rb']
21
+ end
metadata ADDED
@@ -0,0 +1,107 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: boost-dnz-client
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.0.2
5
+ platform: ruby
6
+ authors:
7
+ - Jeremy Wells
8
+ autorequire:
9
+ bindir: bin
10
+ cert_chain: []
11
+
12
+ date: 2009-07-22 00:00:00 -07:00
13
+ default_executable:
14
+ dependencies:
15
+ - !ruby/object:Gem::Dependency
16
+ name: activesupport
17
+ type: :runtime
18
+ version_requirement:
19
+ version_requirements: !ruby/object:Gem::Requirement
20
+ requirements:
21
+ - - ">="
22
+ - !ruby/object:Gem::Version
23
+ version: 2.0.2
24
+ version:
25
+ - !ruby/object:Gem::Dependency
26
+ name: nokogiri
27
+ type: :runtime
28
+ version_requirement:
29
+ version_requirements: !ruby/object:Gem::Requirement
30
+ requirements:
31
+ - - ">="
32
+ - !ruby/object:Gem::Version
33
+ version: 1.2.3
34
+ version:
35
+ - !ruby/object:Gem::Dependency
36
+ name: hoe
37
+ type: :development
38
+ version_requirement:
39
+ version_requirements: !ruby/object:Gem::Requirement
40
+ requirements:
41
+ - - ">="
42
+ - !ruby/object:Gem::Version
43
+ version: 2.3.2
44
+ version:
45
+ description: Ruby library for accessing Digital New Zealand's search API (digitalnz.org)
46
+ email:
47
+ - jeremy@boost.co.nz
48
+ executables: []
49
+
50
+ extensions: []
51
+
52
+ extra_rdoc_files:
53
+ - History.txt
54
+ - Manifest.txt
55
+ - PostInstall.txt
56
+ - License.txt
57
+ files:
58
+ - History.txt
59
+ - Manifest.txt
60
+ - PostInstall.txt
61
+ - README.rdoc
62
+ - License.txt
63
+ - Rakefile
64
+ - lib/dnz.rb
65
+ - lib/dnz/attributes.rb
66
+ - lib/dnz/client.rb
67
+ - lib/dnz/facet.rb
68
+ - lib/dnz/result.rb
69
+ - lib/dnz/search.rb
70
+ - script/console
71
+ - script/destroy
72
+ - script/generate
73
+ - spec/dnz/client_spec.rb
74
+ - spec/dnz/result_spec.rb
75
+ - spec/dnz/search_spec.rb
76
+ - spec/spec.opts
77
+ - spec/spec_helper.rb
78
+ - tasks/rspec.rake
79
+ has_rdoc: false
80
+ homepage: http://github.com/boost/dnz-client
81
+ post_install_message: PostInstall.txt
82
+ rdoc_options:
83
+ - --main
84
+ - README.rdoc
85
+ require_paths:
86
+ - lib
87
+ required_ruby_version: !ruby/object:Gem::Requirement
88
+ requirements:
89
+ - - ">="
90
+ - !ruby/object:Gem::Version
91
+ version: "0"
92
+ version:
93
+ required_rubygems_version: !ruby/object:Gem::Requirement
94
+ requirements:
95
+ - - ">="
96
+ - !ruby/object:Gem::Version
97
+ version: "0"
98
+ version:
99
+ requirements: []
100
+
101
+ rubyforge_project: dnz-client
102
+ rubygems_version: 1.2.0
103
+ signing_key:
104
+ specification_version: 3
105
+ summary: ""
106
+ test_files: []
107
+