summon 2.0.2 → 2.0.5

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.
@@ -1,3 +1,9 @@
1
+ ### 2.0.5
2
+ * 1 minor enhancement
3
+ * made document database_title field multi-value
4
+ * 1 major enhancement
5
+ * added source field to document
6
+
1
7
  ### 2.0.1
2
8
  * 1 major enhancement
3
9
  * added availability_path field
data/README.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # summon
2
2
 
3
- * http://summon.rubyforge.org
3
+ * http://github.com/summon/summon.rb
4
4
  * http://www.serialssolutions.com/summon
5
5
  * http://api.summon.serialssolutions.com
6
6
 
@@ -18,10 +18,10 @@ Ruby language bindings for Serials Solutions Summon Unified Discovery Service
18
18
 
19
19
  #help
20
20
  summon --help
21
-
21
+
22
22
  #simple text query
23
23
  summon "Will Shakespeare"
24
-
24
+
25
25
  #books only please!
26
26
  summon "Will Shakespeare" --s.cmd="addFacetValueFilters(ContentType, Book)"
27
27
 
@@ -49,13 +49,13 @@ Ruby language bindings for Serials Solutions Summon Unified Discovery Service
49
49
 
50
50
  ## INSTALL:
51
51
 
52
- sudo gem install summon
52
+ gem install summon
53
53
 
54
54
  ## LICENSE:
55
55
 
56
56
  (The MIT License)
57
57
 
58
- Copyright (c) 2009-2010 Serials Solutions LLC
58
+ Copyright (c) 2009-2012 Serials Solutions LLC
59
59
 
60
60
  Permission is hereby granted, free of charge, to any person obtaining
61
61
  a copy of this software and associated documentation files (the
@@ -1,7 +1,3 @@
1
- $:.unshift(File.dirname(__FILE__)) unless
2
- $:.include?(File.dirname(__FILE__)) || $:.include?(File.expand_path(File.dirname(__FILE__)))
3
-
4
- require 'rubygems'
5
1
  require 'cgi'
6
2
  require 'json'
7
3
 
@@ -20,6 +20,9 @@ class Summon::Document < Summon::Schema
20
20
  attr :publication_place
21
21
  attr :meeting_name, :single => false
22
22
 
23
+ attr :database_title, :single => false
24
+ attr :source, :single => false
25
+
23
26
  attr :isi_cited_references_count, :json_name => "ISICitedReferencesCount"
24
27
  attr :isi_cited_references_uri, :json_name => "ISICitedReferencesURI"
25
28
 
@@ -69,6 +72,7 @@ class Summon::Document < Summon::Schema
69
72
  attr :spotlight_children, :single => false, :transform => :Document
70
73
  attr :fulltext_hit, :json_name => "isFullTextHit"
71
74
  attr :peer_documents, :single => false, :json_name => "peerDocuments", :transform => :Document
75
+ attr :related_records, :json_name => "relatedRecords"
72
76
 
73
77
  def content_type
74
78
  @content_types.first
@@ -5,7 +5,7 @@ module Summon
5
5
  attr_reader :transport, :url, :access_id, :client_key
6
6
 
7
7
  def initialize(options = {})
8
- @url = options[:url] || "http://api.summon.serialssolutions.com"
8
+ @url = options[:url] || "http://api.summon.serialssolutions.com/2.0.0"
9
9
  @access_id = options[:access_id]
10
10
  @secret_key = options[:secret_key]
11
11
  @client_key = options[:client_key]
@@ -1,4 +1,4 @@
1
1
 
2
2
  module Summon
3
- VERSION = "2.0.2"
3
+ VERSION = "2.0.5"
4
4
  end
@@ -12,7 +12,7 @@ describe Summon::Service do
12
12
  end
13
13
 
14
14
  it "has a default url which is the public production summon url" do
15
- Summon::Service.new.url.should == "http://api.summon.serialssolutions.com"
15
+ Summon::Service.new.url.should == "http://api.summon.serialssolutions.com/2.0.0"
16
16
  end
17
17
 
18
18
  it "allows cloning a service with overridden settings" do
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: summon
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.0.2
4
+ version: 2.0.5
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -10,11 +10,11 @@ authors:
10
10
  autorequire:
11
11
  bindir: bin
12
12
  cert_chain: []
13
- date: 2011-11-17 00:00:00.000000000Z
13
+ date: 2012-03-30 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: json
17
- requirement: &2154273420 !ruby/object:Gem::Requirement
17
+ requirement: &70095380784980 !ruby/object:Gem::Requirement
18
18
  none: false
19
19
  requirements:
20
20
  - - ! '>='
@@ -22,10 +22,10 @@ dependencies:
22
22
  version: '0'
23
23
  type: :runtime
24
24
  prerelease: false
25
- version_requirements: *2154273420
25
+ version_requirements: *70095380784980
26
26
  - !ruby/object:Gem::Dependency
27
27
  name: rspec
28
- requirement: &2154272460 !ruby/object:Gem::Requirement
28
+ requirement: &70095380783860 !ruby/object:Gem::Requirement
29
29
  none: false
30
30
  requirements:
31
31
  - - ~>
@@ -33,10 +33,10 @@ dependencies:
33
33
  version: '2.0'
34
34
  type: :development
35
35
  prerelease: false
36
- version_requirements: *2154272460
36
+ version_requirements: *70095380783860
37
37
  - !ruby/object:Gem::Dependency
38
38
  name: rake
39
- requirement: &2154271680 !ruby/object:Gem::Requirement
39
+ requirement: &70095380781980 !ruby/object:Gem::Requirement
40
40
  none: false
41
41
  requirements:
42
42
  - - ! '>='
@@ -44,7 +44,7 @@ dependencies:
44
44
  version: '0'
45
45
  type: :development
46
46
  prerelease: false
47
- version_requirements: *2154271680
47
+ version_requirements: *70095380781980
48
48
  description: Ruby language bindings for Serials Solutions Summon Unified Discovery
49
49
  Service
50
50
  email:
@@ -64,7 +64,6 @@ files:
64
64
  - Rakefile
65
65
  - bin/summon
66
66
  - bin/summonh
67
- - ispec/integration_spec.rb
68
67
  - lib/summon.rb
69
68
  - lib/summon/benchmark.rb
70
69
  - lib/summon/cli.rb
@@ -136,7 +135,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
136
135
  version: '0'
137
136
  segments:
138
137
  - 0
139
- hash: 940696890272720682
138
+ hash: -1469931790644738836
140
139
  required_rubygems_version: !ruby/object:Gem::Requirement
141
140
  none: false
142
141
  requirements:
@@ -1,61 +0,0 @@
1
- require File.dirname(__FILE__) + '/../spec/spec_helper'
2
- require 'cgi'
3
- require 'summon/cli'
4
-
5
- describe "summon" do
6
- attr_reader :summon
7
-
8
- before :all do
9
- @config = Summon::CLI::Config.load
10
- @summon = Summon::Service.new(@config.options)
11
- end
12
-
13
- describe "search" do
14
- it "should do an empty query" do
15
- search = summon.search
16
-
17
- search.record_count.should > 0
18
- search.should_not be_empty
19
- end
20
-
21
- it "should do a text query" do
22
- search = summon.search "s.q" => "Probability models of recidivism\\\\\\: an exploration"
23
- search.should_not be_empty
24
- query(search).should == "s.q=Probability models of recidivism\\\\\\: an exploration"
25
- end
26
-
27
- it "should do one command" do
28
- search = summon.search "s.cmd" => "addTextFilter(Author\\:\\(Linster\\, Richard L\\))"
29
- query(search).should == "s.fq=Author:(Linster, Richard L)"
30
- search.should_not be_empty
31
- end
32
-
33
- it "should do an interesting search by pieces" do
34
- text_query = "Probability models of recidivism\\: an exploration"
35
- command = "addTextFilter(Author_t\\:\\(Linster\\, Richard L\\))"
36
-
37
- search = summon.search "s.q" => text_query, "s.cmd" => command
38
-
39
- query(search).should == "s.fq=Author:(Linster, Richard L)&" +
40
- "s.q=Probability models of recidivism\\: an exploration"
41
- end
42
-
43
- it "should modify a search" do
44
- search = summon.search "s.q" => "Probability models of recidivism\\: an exploration"
45
- search = summon.modify_search search, "addTextFilter(Author\\:\\(Linster\\, Richard L\\))"
46
-
47
- query(search).should == "s.fq=Author:(Linster, Richard L)&" +
48
- "s.q=Probability models of recidivism\\: an exploration"
49
- end
50
- end
51
-
52
- def find(list, search_by, value)
53
- item = list.find{|i| i.send(search_by) == value}
54
- item.should_not be_nil
55
- item
56
- end
57
-
58
- def query(search)
59
- CGI::unescape(search.query.query_string)
60
- end
61
- end