eadsax 0.0.0
Sign up to get free protection for your applications and to get access to all the features.
- data/.document +5 -0
- data/.rspec +1 -0
- data/.rvmrc +2 -0
- data/Gemfile +17 -0
- data/Gemfile.lock +34 -0
- data/LICENSE.txt +20 -0
- data/README.rdoc +14 -0
- data/Rakefile +50 -0
- data/VERSION +1 -0
- data/bin/eadsax +48 -0
- data/lib/eadsax.rb +75 -0
- data/lib/eadsax/accessrestrict.rb +15 -0
- data/lib/eadsax/accruals.rb +14 -0
- data/lib/eadsax/acqinfo.rb +14 -0
- data/lib/eadsax/address.rb +7 -0
- data/lib/eadsax/altformavail.rb +15 -0
- data/lib/eadsax/appraisal.rb +15 -0
- data/lib/eadsax/archdesc.rb +37 -0
- data/lib/eadsax/arrangement.rb +14 -0
- data/lib/eadsax/bibliography.rb +21 -0
- data/lib/eadsax/bioghist.rb +17 -0
- data/lib/eadsax/blockquote.rb +12 -0
- data/lib/eadsax/change.rb +8 -0
- data/lib/eadsax/chronitem.rb +9 -0
- data/lib/eadsax/chronlist.rb +9 -0
- data/lib/eadsax/components.rb +59 -0
- data/lib/eadsax/container.rb +8 -0
- data/lib/eadsax/controlaccess.rb +25 -0
- data/lib/eadsax/custodhist.rb +16 -0
- data/lib/eadsax/dao.rb +7 -0
- data/lib/eadsax/daodesc.rb +14 -0
- data/lib/eadsax/defitem.rb +8 -0
- data/lib/eadsax/did.rb +23 -0
- data/lib/eadsax/div.rb +15 -0
- data/lib/eadsax/dsc.rb +19 -0
- data/lib/eadsax/ead.rb +9 -0
- data/lib/eadsax/eadheader.rb +10 -0
- data/lib/eadsax/editionstmt.rb +8 -0
- data/lib/eadsax/filedesc.rb +11 -0
- data/lib/eadsax/fileplan.rb +15 -0
- data/lib/eadsax/frontmatter.rb +8 -0
- data/lib/eadsax/index.rb +17 -0
- data/lib/eadsax/indexentry.rb +21 -0
- data/lib/eadsax/list.rb +10 -0
- data/lib/eadsax/listhead.rb +8 -0
- data/lib/eadsax/namegrp.rb +17 -0
- data/lib/eadsax/note.rb +13 -0
- data/lib/eadsax/notestmt.rb +7 -0
- data/lib/eadsax/odd.rb +17 -0
- data/lib/eadsax/originalsloc.rb +15 -0
- data/lib/eadsax/origination.rb +22 -0
- data/lib/eadsax/otherfindaid.rb +21 -0
- data/lib/eadsax/phystech.rb +15 -0
- data/lib/eadsax/prefercite.rb +15 -0
- data/lib/eadsax/processinfo.rb +15 -0
- data/lib/eadsax/profiledesc.rb +9 -0
- data/lib/eadsax/publicationstmt.rb +11 -0
- data/lib/eadsax/relatedmaterial.rb +21 -0
- data/lib/eadsax/revisiondesc.rb +8 -0
- data/lib/eadsax/row.rb +7 -0
- data/lib/eadsax/scopecontent.rb +8 -0
- data/lib/eadsax/separatedmaterial.rb +21 -0
- data/lib/eadsax/seriesstmt.rb +9 -0
- data/lib/eadsax/table.rb +8 -0
- data/lib/eadsax/tbody.rb +7 -0
- data/lib/eadsax/tgroup.rb +9 -0
- data/lib/eadsax/thead.rb +7 -0
- data/lib/eadsax/titlepage.rb +22 -0
- data/lib/eadsax/titleproper.rb +8 -0
- data/lib/eadsax/titlestmt.rb +10 -0
- data/lib/eadsax/userestrict.rb +15 -0
- data/spec/accessrestrict_spec.rb +9 -0
- data/spec/acqinfo_spec.rb +8 -0
- data/spec/archdesc_spec.rb +9 -0
- data/spec/arrangement_spec.rb +11 -0
- data/spec/bioghist_spec.rb +23 -0
- data/spec/chronitem_spec.rb +11 -0
- data/spec/chronlist_spec.rb +11 -0
- data/spec/components_spec.rb +11 -0
- data/spec/controlaccess_spec.rb +11 -0
- data/spec/did_spec.rb +14 -0
- data/spec/dsc_spec.rb +11 -0
- data/spec/ead_spec.rb +9 -0
- data/spec/eadheader_spec.rb +9 -0
- data/spec/eads/example.xml +315 -0
- data/spec/eadsax_spec.rb +8 -0
- data/spec/filedesc_spec.rb +11 -0
- data/spec/prefercite_spec.rb +11 -0
- data/spec/profiledesc_spec.rb +11 -0
- data/spec/publicationstmt_spec.rb +11 -0
- data/spec/scopecontent_spec.rb +13 -0
- data/spec/spec_helper.rb +16 -0
- data/spec/titleproper_spec.rb +11 -0
- data/spec/titlestmt_spec.rb +11 -0
- data/spec/userestrict_spec.rb +11 -0
- data/watchr.rb +34 -0
- metadata +274 -0
data/spec/spec_helper.rb
ADDED
@@ -0,0 +1,16 @@
|
|
1
|
+
$LOAD_PATH.unshift(File.join(File.dirname(__FILE__), '..', 'lib'))
|
2
|
+
$LOAD_PATH.unshift()
|
3
|
+
require 'rspec'
|
4
|
+
require 'eadsax'
|
5
|
+
|
6
|
+
# Requires supporting files with custom matchers and macros, etc,
|
7
|
+
# in ./support/ and its subdirectories.
|
8
|
+
Dir["#{File.dirname(__FILE__)}/support/**/*.rb"].each {|f| require f}
|
9
|
+
|
10
|
+
RSpec.configure do |config|
|
11
|
+
config.before(:all) do
|
12
|
+
file = File.join( File.expand_path(File.dirname(__FILE__)) , 'eads', 'example.xml')
|
13
|
+
@ead = Eadsax::Ead.parse(File.read(file))
|
14
|
+
end
|
15
|
+
end
|
16
|
+
|
@@ -0,0 +1,11 @@
|
|
1
|
+
require File.expand_path(File.dirname(__FILE__) + '/spec_helper')
|
2
|
+
|
3
|
+
describe "Titleproper" do
|
4
|
+
before(:all) do
|
5
|
+
@titleproper = @ead.eadheader.filedesc.titlestmt.titleproper
|
6
|
+
end
|
7
|
+
it "should be present" do
|
8
|
+
@titleproper.should be_a_kind_of(Eadsax::Titleproper)
|
9
|
+
end
|
10
|
+
end
|
11
|
+
|
@@ -0,0 +1,11 @@
|
|
1
|
+
require File.expand_path(File.dirname(__FILE__) + '/spec_helper')
|
2
|
+
|
3
|
+
describe "Titlestmt" do
|
4
|
+
before(:all) do
|
5
|
+
@titlestmt = @ead.eadheader.filedesc.titlestmt
|
6
|
+
end
|
7
|
+
it "should be present" do
|
8
|
+
@titlestmt.should be_a_kind_of(Eadsax::Titlestmt)
|
9
|
+
end
|
10
|
+
end
|
11
|
+
|
@@ -0,0 +1,11 @@
|
|
1
|
+
require File.expand_path(File.dirname(__FILE__) + '/spec_helper')
|
2
|
+
|
3
|
+
describe "Userestrict" do
|
4
|
+
before(:all) do
|
5
|
+
@userestrict = @ead.archdesc.userestrict
|
6
|
+
end
|
7
|
+
it "should be present" do
|
8
|
+
@userestrict.should be_a_kind_of(Eadsax::Userestrict)
|
9
|
+
end
|
10
|
+
end
|
11
|
+
|
data/watchr.rb
ADDED
@@ -0,0 +1,34 @@
|
|
1
|
+
def notify(message)
|
2
|
+
notify_send = `which notify-send`.chomp
|
3
|
+
title = "Watchr Test Results"
|
4
|
+
image = message.include?('0 failures') ? '~/.autotest_images/pass.png' : '~/.autotest_images/fail.png'
|
5
|
+
msg = message.slice(/(\d+)\stests,\s(\d+)\sassertions,\s(\d+)\sfailures,\s(\d+)\serrors/)
|
6
|
+
system %Q{#{notify_send} '#{title}' '#{msg}' -i #{image} -t 20 &}
|
7
|
+
end
|
8
|
+
|
9
|
+
def run_all_tests
|
10
|
+
system('clear')
|
11
|
+
result = `rspec spec`
|
12
|
+
notify result.split("\n").last rescue nil
|
13
|
+
puts result
|
14
|
+
end
|
15
|
+
|
16
|
+
|
17
|
+
# Ctrl-C
|
18
|
+
Signal.trap 'INT' do
|
19
|
+
if @interrupted then
|
20
|
+
@wants_to_quit = true
|
21
|
+
abort("\n")
|
22
|
+
else
|
23
|
+
puts "Interrupt a second time to quit"
|
24
|
+
@interrupted = true
|
25
|
+
Kernel.sleep 1.5
|
26
|
+
# raise Interrupt, nil # let the run loop catch it
|
27
|
+
run_all_tests
|
28
|
+
end
|
29
|
+
end
|
30
|
+
|
31
|
+
watch( 'lib/(.*)\.rb' ) {run_all_tests }
|
32
|
+
watch( 'lib/eadsax/(.*)\.rb' ) {run_all_tests }
|
33
|
+
watch( 'spec/(.*)\.rb' ) {run_all_tests }
|
34
|
+
|
metadata
ADDED
@@ -0,0 +1,274 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: eadsax
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
hash: 31
|
5
|
+
prerelease: false
|
6
|
+
segments:
|
7
|
+
- 0
|
8
|
+
- 0
|
9
|
+
- 0
|
10
|
+
version: 0.0.0
|
11
|
+
platform: ruby
|
12
|
+
authors:
|
13
|
+
- Jason Ronallo
|
14
|
+
autorequire:
|
15
|
+
bindir: bin
|
16
|
+
cert_chain: []
|
17
|
+
|
18
|
+
date: 2011-02-09 00:00:00 -05:00
|
19
|
+
default_executable: eadsax
|
20
|
+
dependencies:
|
21
|
+
- !ruby/object:Gem::Dependency
|
22
|
+
version_requirements: &id001 !ruby/object:Gem::Requirement
|
23
|
+
none: false
|
24
|
+
requirements:
|
25
|
+
- - ">="
|
26
|
+
- !ruby/object:Gem::Version
|
27
|
+
hash: 3
|
28
|
+
segments:
|
29
|
+
- 0
|
30
|
+
version: "0"
|
31
|
+
requirement: *id001
|
32
|
+
prerelease: false
|
33
|
+
type: :runtime
|
34
|
+
name: sax-machine
|
35
|
+
- !ruby/object:Gem::Dependency
|
36
|
+
version_requirements: &id002 !ruby/object:Gem::Requirement
|
37
|
+
none: false
|
38
|
+
requirements:
|
39
|
+
- - ">="
|
40
|
+
- !ruby/object:Gem::Version
|
41
|
+
hash: 3
|
42
|
+
segments:
|
43
|
+
- 0
|
44
|
+
version: "0"
|
45
|
+
requirement: *id002
|
46
|
+
prerelease: false
|
47
|
+
type: :runtime
|
48
|
+
name: trollop
|
49
|
+
- !ruby/object:Gem::Dependency
|
50
|
+
version_requirements: &id003 !ruby/object:Gem::Requirement
|
51
|
+
none: false
|
52
|
+
requirements:
|
53
|
+
- - ~>
|
54
|
+
- !ruby/object:Gem::Version
|
55
|
+
hash: 11
|
56
|
+
segments:
|
57
|
+
- 2
|
58
|
+
- 1
|
59
|
+
- 0
|
60
|
+
version: 2.1.0
|
61
|
+
requirement: *id003
|
62
|
+
prerelease: false
|
63
|
+
type: :development
|
64
|
+
name: rspec
|
65
|
+
- !ruby/object:Gem::Dependency
|
66
|
+
version_requirements: &id004 !ruby/object:Gem::Requirement
|
67
|
+
none: false
|
68
|
+
requirements:
|
69
|
+
- - ~>
|
70
|
+
- !ruby/object:Gem::Version
|
71
|
+
hash: 23
|
72
|
+
segments:
|
73
|
+
- 1
|
74
|
+
- 0
|
75
|
+
- 0
|
76
|
+
version: 1.0.0
|
77
|
+
requirement: *id004
|
78
|
+
prerelease: false
|
79
|
+
type: :development
|
80
|
+
name: bundler
|
81
|
+
- !ruby/object:Gem::Dependency
|
82
|
+
version_requirements: &id005 !ruby/object:Gem::Requirement
|
83
|
+
none: false
|
84
|
+
requirements:
|
85
|
+
- - ~>
|
86
|
+
- !ruby/object:Gem::Version
|
87
|
+
hash: 1
|
88
|
+
segments:
|
89
|
+
- 1
|
90
|
+
- 5
|
91
|
+
- 1
|
92
|
+
version: 1.5.1
|
93
|
+
requirement: *id005
|
94
|
+
prerelease: false
|
95
|
+
type: :development
|
96
|
+
name: jeweler
|
97
|
+
- !ruby/object:Gem::Dependency
|
98
|
+
version_requirements: &id006 !ruby/object:Gem::Requirement
|
99
|
+
none: false
|
100
|
+
requirements:
|
101
|
+
- - ">="
|
102
|
+
- !ruby/object:Gem::Version
|
103
|
+
hash: 3
|
104
|
+
segments:
|
105
|
+
- 0
|
106
|
+
version: "0"
|
107
|
+
requirement: *id006
|
108
|
+
prerelease: false
|
109
|
+
type: :development
|
110
|
+
name: rcov
|
111
|
+
description: Parse EAD XML using sax-machine.
|
112
|
+
email: jronallo@gmail.com
|
113
|
+
executables:
|
114
|
+
- eadsax
|
115
|
+
extensions: []
|
116
|
+
|
117
|
+
extra_rdoc_files:
|
118
|
+
- LICENSE.txt
|
119
|
+
- README.rdoc
|
120
|
+
files:
|
121
|
+
- .document
|
122
|
+
- .rspec
|
123
|
+
- .rvmrc
|
124
|
+
- Gemfile
|
125
|
+
- Gemfile.lock
|
126
|
+
- LICENSE.txt
|
127
|
+
- README.rdoc
|
128
|
+
- Rakefile
|
129
|
+
- VERSION
|
130
|
+
- bin/eadsax
|
131
|
+
- lib/eadsax.rb
|
132
|
+
- lib/eadsax/accessrestrict.rb
|
133
|
+
- lib/eadsax/accruals.rb
|
134
|
+
- lib/eadsax/acqinfo.rb
|
135
|
+
- lib/eadsax/address.rb
|
136
|
+
- lib/eadsax/altformavail.rb
|
137
|
+
- lib/eadsax/appraisal.rb
|
138
|
+
- lib/eadsax/archdesc.rb
|
139
|
+
- lib/eadsax/arrangement.rb
|
140
|
+
- lib/eadsax/bibliography.rb
|
141
|
+
- lib/eadsax/bioghist.rb
|
142
|
+
- lib/eadsax/blockquote.rb
|
143
|
+
- lib/eadsax/change.rb
|
144
|
+
- lib/eadsax/chronitem.rb
|
145
|
+
- lib/eadsax/chronlist.rb
|
146
|
+
- lib/eadsax/components.rb
|
147
|
+
- lib/eadsax/container.rb
|
148
|
+
- lib/eadsax/controlaccess.rb
|
149
|
+
- lib/eadsax/custodhist.rb
|
150
|
+
- lib/eadsax/dao.rb
|
151
|
+
- lib/eadsax/daodesc.rb
|
152
|
+
- lib/eadsax/defitem.rb
|
153
|
+
- lib/eadsax/did.rb
|
154
|
+
- lib/eadsax/div.rb
|
155
|
+
- lib/eadsax/dsc.rb
|
156
|
+
- lib/eadsax/ead.rb
|
157
|
+
- lib/eadsax/eadheader.rb
|
158
|
+
- lib/eadsax/editionstmt.rb
|
159
|
+
- lib/eadsax/filedesc.rb
|
160
|
+
- lib/eadsax/fileplan.rb
|
161
|
+
- lib/eadsax/frontmatter.rb
|
162
|
+
- lib/eadsax/index.rb
|
163
|
+
- lib/eadsax/indexentry.rb
|
164
|
+
- lib/eadsax/list.rb
|
165
|
+
- lib/eadsax/listhead.rb
|
166
|
+
- lib/eadsax/namegrp.rb
|
167
|
+
- lib/eadsax/note.rb
|
168
|
+
- lib/eadsax/notestmt.rb
|
169
|
+
- lib/eadsax/odd.rb
|
170
|
+
- lib/eadsax/originalsloc.rb
|
171
|
+
- lib/eadsax/origination.rb
|
172
|
+
- lib/eadsax/otherfindaid.rb
|
173
|
+
- lib/eadsax/phystech.rb
|
174
|
+
- lib/eadsax/prefercite.rb
|
175
|
+
- lib/eadsax/processinfo.rb
|
176
|
+
- lib/eadsax/profiledesc.rb
|
177
|
+
- lib/eadsax/publicationstmt.rb
|
178
|
+
- lib/eadsax/relatedmaterial.rb
|
179
|
+
- lib/eadsax/revisiondesc.rb
|
180
|
+
- lib/eadsax/row.rb
|
181
|
+
- lib/eadsax/scopecontent.rb
|
182
|
+
- lib/eadsax/separatedmaterial.rb
|
183
|
+
- lib/eadsax/seriesstmt.rb
|
184
|
+
- lib/eadsax/table.rb
|
185
|
+
- lib/eadsax/tbody.rb
|
186
|
+
- lib/eadsax/tgroup.rb
|
187
|
+
- lib/eadsax/thead.rb
|
188
|
+
- lib/eadsax/titlepage.rb
|
189
|
+
- lib/eadsax/titleproper.rb
|
190
|
+
- lib/eadsax/titlestmt.rb
|
191
|
+
- lib/eadsax/userestrict.rb
|
192
|
+
- spec/accessrestrict_spec.rb
|
193
|
+
- spec/acqinfo_spec.rb
|
194
|
+
- spec/archdesc_spec.rb
|
195
|
+
- spec/arrangement_spec.rb
|
196
|
+
- spec/bioghist_spec.rb
|
197
|
+
- spec/chronitem_spec.rb
|
198
|
+
- spec/chronlist_spec.rb
|
199
|
+
- spec/components_spec.rb
|
200
|
+
- spec/controlaccess_spec.rb
|
201
|
+
- spec/did_spec.rb
|
202
|
+
- spec/dsc_spec.rb
|
203
|
+
- spec/ead_spec.rb
|
204
|
+
- spec/eadheader_spec.rb
|
205
|
+
- spec/eads/example.xml
|
206
|
+
- spec/eadsax_spec.rb
|
207
|
+
- spec/filedesc_spec.rb
|
208
|
+
- spec/prefercite_spec.rb
|
209
|
+
- spec/profiledesc_spec.rb
|
210
|
+
- spec/publicationstmt_spec.rb
|
211
|
+
- spec/scopecontent_spec.rb
|
212
|
+
- spec/spec_helper.rb
|
213
|
+
- spec/titleproper_spec.rb
|
214
|
+
- spec/titlestmt_spec.rb
|
215
|
+
- spec/userestrict_spec.rb
|
216
|
+
- watchr.rb
|
217
|
+
has_rdoc: true
|
218
|
+
homepage: http://github.com/jronallo/eadsax
|
219
|
+
licenses:
|
220
|
+
- MIT
|
221
|
+
post_install_message:
|
222
|
+
rdoc_options: []
|
223
|
+
|
224
|
+
require_paths:
|
225
|
+
- lib
|
226
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
227
|
+
none: false
|
228
|
+
requirements:
|
229
|
+
- - ">="
|
230
|
+
- !ruby/object:Gem::Version
|
231
|
+
hash: 3
|
232
|
+
segments:
|
233
|
+
- 0
|
234
|
+
version: "0"
|
235
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
236
|
+
none: false
|
237
|
+
requirements:
|
238
|
+
- - ">="
|
239
|
+
- !ruby/object:Gem::Version
|
240
|
+
hash: 3
|
241
|
+
segments:
|
242
|
+
- 0
|
243
|
+
version: "0"
|
244
|
+
requirements: []
|
245
|
+
|
246
|
+
rubyforge_project:
|
247
|
+
rubygems_version: 1.3.7
|
248
|
+
signing_key:
|
249
|
+
specification_version: 3
|
250
|
+
summary: Parse EAD XML
|
251
|
+
test_files:
|
252
|
+
- spec/accessrestrict_spec.rb
|
253
|
+
- spec/acqinfo_spec.rb
|
254
|
+
- spec/archdesc_spec.rb
|
255
|
+
- spec/arrangement_spec.rb
|
256
|
+
- spec/bioghist_spec.rb
|
257
|
+
- spec/chronitem_spec.rb
|
258
|
+
- spec/chronlist_spec.rb
|
259
|
+
- spec/components_spec.rb
|
260
|
+
- spec/controlaccess_spec.rb
|
261
|
+
- spec/did_spec.rb
|
262
|
+
- spec/dsc_spec.rb
|
263
|
+
- spec/ead_spec.rb
|
264
|
+
- spec/eadheader_spec.rb
|
265
|
+
- spec/eadsax_spec.rb
|
266
|
+
- spec/filedesc_spec.rb
|
267
|
+
- spec/prefercite_spec.rb
|
268
|
+
- spec/profiledesc_spec.rb
|
269
|
+
- spec/publicationstmt_spec.rb
|
270
|
+
- spec/scopecontent_spec.rb
|
271
|
+
- spec/spec_helper.rb
|
272
|
+
- spec/titleproper_spec.rb
|
273
|
+
- spec/titlestmt_spec.rb
|
274
|
+
- spec/userestrict_spec.rb
|