eader 0.0.1 → 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/.gitignore CHANGED
@@ -1,4 +1,3 @@
1
- *.gem
2
1
  *.rbc
3
2
  .bundle
4
3
  .config
data/.rspec CHANGED
@@ -1,2 +1,2 @@
1
- --format specdoc
1
+ --format documentation
2
2
  --color
@@ -5,5 +5,4 @@ require "eader/item"
5
5
  require 'nokogiri'
6
6
 
7
7
  module Eader
8
- # Your code goes here...
9
8
  end
@@ -1,16 +1,12 @@
1
+ require 'open-uri'
2
+
1
3
  module Eader
2
4
  class Document
3
- attr_reader :path, :file, :doc
5
+ attr_reader :doc
4
6
 
5
7
  def initialize(path)
6
- @path = path
7
- @file = File.open(path)
8
- @doc = xml_doc_class.parse(file)
9
- end
10
-
11
- def content
12
- file.rewind
13
- file.read
8
+ file = open(path)
9
+ @doc = xml_doc_class.parse(file)
14
10
  end
15
11
 
16
12
  def items
@@ -1,3 +1,3 @@
1
1
  module Eader
2
- VERSION = "0.0.1"
2
+ VERSION = "0.0.2"
3
3
  end
@@ -2,14 +2,18 @@ require "spec_helper"
2
2
 
3
3
  describe Eader do
4
4
  let!(:e) { Eader::Document.new('./spec/support/test.xml') }
5
+ let(:i) { Eader::Document.new(ENV['REMOTE_URL']) }
5
6
  let(:item) { e.items.first }
6
7
 
7
- it "opens the xml" do
8
- e.content.should include('<ead>')
9
- end
10
-
11
8
  it "returns dsc levels" do
12
9
  e.should have(1).dsc_levels
10
+
11
+ # checking that remote url works
12
+ i.should have(4434).dsc_levels
13
+ end
14
+
15
+ it "returns the items" do
16
+ e.should have(1).items
13
17
  end
14
18
 
15
19
  it "returns item unitids" do
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: eader
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.1
4
+ version: 0.0.2
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2013-01-17 00:00:00.000000000 Z
12
+ date: 2013-01-22 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: nokogiri