cul-fedora 0.2.1 → 0.2.2

Sign up to get free protection for your applications and to get access to all the features.
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.2.1
1
+ 0.2.2
data/cul-fedora.gemspec CHANGED
@@ -5,11 +5,11 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = %q{cul-fedora}
8
- s.version = "0.2.1"
8
+ s.version = "0.2.2"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["James Stuart"]
12
- s.date = %q{2010-09-23}
12
+ s.date = %q{2010-09-24}
13
13
  s.description = %q{Columbia-specific Fedora libraries}
14
14
  s.email = %q{tastyhat@jamesstuart.org}
15
15
  s.extra_rdoc_files = [
@@ -5,8 +5,8 @@ module Cul
5
5
 
6
6
  def initialize(*args)
7
7
  options = args.extract_options!
8
- @riurl = options["riurl"] || raise(ArgumentError, "Must provide riurl argument")
9
- @riquery = options["riquery"] || raise(ArgumentError, "Must provide riquery argument")
8
+ @riurl = options[:riurl] || raise(ArgumentError, "Must provide riurl argument")
9
+ @riquery = options[:riquery] || raise(ArgumentError, "Must provide riquery argument")
10
10
  @hc = options[:http_client]
11
11
  end
12
12
 
@@ -3,7 +3,7 @@ module Cul
3
3
  class Solr
4
4
  attr_reader :url
5
5
  def initialize(config = {})
6
- @url = config["url"] || raise(ArgumentError, "must provide url")
6
+ @url = config[:url] || raise(ArgumentError, "must provide url")
7
7
 
8
8
  end
9
9
 
@@ -4,9 +4,9 @@ class TestFedoraItem < Test::Unit::TestCase
4
4
  context "given a server" do
5
5
  setup do
6
6
  @config = YAML.load_file("private/config.yml")
7
- @riurl = @config["fedora"]["riurl"]
7
+ @riurl = @config[:fedora][:riurl]
8
8
  @hc = HTTPClient.new()
9
- @server = Server.new(@config["fedora"].merge(:http_client => @hc))
9
+ @server = Server.new(@config[:fedora].merge(:http_client => @hc))
10
10
  @item = Item.new(:server => @server, :uri => "info:fedora/ac:3")
11
11
  end
12
12
 
@@ -16,7 +16,7 @@ class TestFedoraItem < Test::Unit::TestCase
16
16
  end
17
17
 
18
18
  should "initialize properly with a server config and pid" do
19
- assert Item.new(:server_config => @config["fedora"], :uri => "info:fedora/ac:3")
19
+ assert Item.new(:server_config => @config[:fedora], :uri => "info:fedora/ac:3")
20
20
  end
21
21
 
22
22
  should "require a server and pid" do
@@ -35,7 +35,7 @@ class TestFedoraItem < Test::Unit::TestCase
35
35
 
36
36
  assert_equal @item, Item.new(:server => @server, :pid => "ac:3")
37
37
  assert_equal @item, Item.new(:server => @server, :uri => "info:fedora/ac:3")
38
- assert_equal @item, Item.new(:server_config => @config["fedora"], :pid => "ac:3")
38
+ assert_equal @item, Item.new(:server_config => @config[:fedora], :pid => "ac:3")
39
39
  end
40
40
 
41
41
 
@@ -7,8 +7,8 @@ class TestFedoraServer < Test::Unit::TestCase
7
7
  setup do
8
8
  @config = YAML.load_file("private/config.yml")
9
9
  @examples = YAML.load_file("test/data/example_server_requests.yml")
10
- @riurl = @config["fedora"]["riurl"]
11
- @server = Server.new(@config["fedora"])
10
+ @riurl = @config[:fedora][:riurl]
11
+ @server = Server.new(@config[:fedora])
12
12
  end
13
13
 
14
14
  should "require a riurl" do
@@ -38,7 +38,7 @@ class TestFedoraServer < Test::Unit::TestCase
38
38
 
39
39
  should "be able to make httpclient calls from sample requests" do
40
40
  mock_hc = mock()
41
- server_with_hc = Server.new(@config["fedora"].merge(:http_client => mock_hc))
41
+ server_with_hc = Server.new(@config[:fedora].merge(:http_client => mock_hc))
42
42
 
43
43
 
44
44
  @examples.each do |test|
@@ -6,7 +6,7 @@ class TestFedoraSolr < Test::Unit::TestCase
6
6
 
7
7
  setup do
8
8
  @config = YAML.load_file("private/config.yml")
9
- @solr = Solr.new(@config["solr"])
9
+ @solr = Solr.new(@config[:solr])
10
10
  end
11
11
 
12
12
  should "require a url" do
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: cul-fedora
3
3
  version: !ruby/object:Gem::Version
4
- hash: 21
4
+ hash: 19
5
5
  prerelease: false
6
6
  segments:
7
7
  - 0
8
8
  - 2
9
- - 1
10
- version: 0.2.1
9
+ - 2
10
+ version: 0.2.2
11
11
  platform: ruby
12
12
  authors:
13
13
  - James Stuart
@@ -15,7 +15,7 @@ autorequire:
15
15
  bindir: bin
16
16
  cert_chain: []
17
17
 
18
- date: 2010-09-23 00:00:00 -04:00
18
+ date: 2010-09-24 00:00:00 -04:00
19
19
  default_executable:
20
20
  dependencies:
21
21
  - !ruby/object:Gem::Dependency