elibri_onix 0.1.10 → 0.1.11
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/elibri_onix.gemspec
CHANGED
|
@@ -5,11 +5,11 @@
|
|
|
5
5
|
|
|
6
6
|
Gem::Specification.new do |s|
|
|
7
7
|
s.name = %q{elibri_onix}
|
|
8
|
-
s.version = "0.1.
|
|
8
|
+
s.version = "0.1.11"
|
|
9
9
|
|
|
10
10
|
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
|
11
11
|
s.authors = ["Marcin Urbanski"]
|
|
12
|
-
s.date = %q{2011-12-
|
|
12
|
+
s.date = %q{2011-12-19}
|
|
13
13
|
s.description = %q{EDItEUR ONIX format subset implementation used in Elibri publication system}
|
|
14
14
|
s.email = %q{marcin@urbanski.vdl.pl}
|
|
15
15
|
s.extra_rdoc_files = [
|
|
@@ -105,7 +105,7 @@ Gem::Specification.new do |s|
|
|
|
105
105
|
s.homepage = %q{http://github.com/elibri/elibri_onix}
|
|
106
106
|
s.licenses = ["MIT"]
|
|
107
107
|
s.require_paths = ["lib"]
|
|
108
|
-
s.rubygems_version = %q{1.
|
|
108
|
+
s.rubygems_version = %q{1.6.2}
|
|
109
109
|
s.summary = %q{EDItEUR ONIX format subset implementation used in Elibri publication system}
|
|
110
110
|
|
|
111
111
|
if s.respond_to? :specification_version then
|
|
@@ -14,12 +14,15 @@ module Elibri
|
|
|
14
14
|
xml_accessor :type, :from => 'TextType'
|
|
15
15
|
#xml_accessor :audience, :from => 'ContentAudience' - always unrestricted
|
|
16
16
|
xml_accessor :author, :from => 'TextAuthor'
|
|
17
|
+
xml_accessor :source_title, :from => 'SourceTitle'
|
|
17
18
|
|
|
18
19
|
xml_accessor :text, :from => 'Text', :cdata => true
|
|
20
|
+
xml_accessor :source_url, :from => '@sourcename', :in => 'Text'
|
|
19
21
|
|
|
20
22
|
def type_name
|
|
21
23
|
Elibri::ONIX::Dict::Release_3_0::OtherTextType.find_by_onix_code(type).const_name.downcase
|
|
22
24
|
end
|
|
25
|
+
|
|
23
26
|
|
|
24
27
|
def inspect_include_fields
|
|
25
28
|
[:type_name]
|
data/lib/elibri_onix/version.rb
CHANGED
data/test/elibri_texts_test.rb
CHANGED
|
@@ -15,6 +15,8 @@ describe Elibri::ONIX::Release_3_0::ONIXMessage do
|
|
|
15
15
|
review = product.reviews.first
|
|
16
16
|
assert_equal "Recenzja książki<br />[...]", review.text
|
|
17
17
|
assert_equal "Jan Kowalski", review.author
|
|
18
|
+
assert_equal "nakanapie.pl", review.source_title
|
|
19
|
+
assert_equal "http://nakanapie.pl/books/420469/reviews/2892.odnalezc-swa-droge", review.source_url
|
|
18
20
|
assert_equal Date.new(2011, 12, 4) + 12.hours + 18.minutes, review.datestamp
|
|
19
21
|
assert_equal 134, review.id
|
|
20
22
|
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
<?xml version="1.0" encoding="UTF-8"?>
|
|
2
|
-
<ONIXMessage
|
|
2
|
+
<ONIXMessage release="3.0" xmlns:elibri="http://elibri.com.pl/ns/extensions" xmlns="http://www.editeur.org/onix/3.0/reference">
|
|
3
3
|
<elibri:Dialect>3.0.1</elibri:Dialect>
|
|
4
4
|
<Header>
|
|
5
5
|
<Sender>
|
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
<ContactName>Tomasz Meka</ContactName>
|
|
8
8
|
<EmailAddress>kontakt@elibri.com.pl</EmailAddress>
|
|
9
9
|
</Sender>
|
|
10
|
-
<SentDateTime>
|
|
10
|
+
<SentDateTime>20111219</SentDateTime>
|
|
11
11
|
</Header>
|
|
12
12
|
<Product>
|
|
13
13
|
<RecordReference>fdb8fa072be774d97a97</RecordReference>
|
|
@@ -28,29 +28,30 @@
|
|
|
28
28
|
</TitleDetail>
|
|
29
29
|
</DescriptiveDetail>
|
|
30
30
|
<CollateralDetail>
|
|
31
|
-
<TextContent
|
|
31
|
+
<TextContent sourcename="textid:133" datestamp="20111204T1215">
|
|
32
32
|
<TextType>04</TextType>
|
|
33
33
|
<ContentAudience>00</ContentAudience>
|
|
34
34
|
<Text>
|
|
35
35
|
<![CDATA[1. Wprowadzenie<br />2. Rozdział pierwszy<br />[...]]]>
|
|
36
36
|
</Text>
|
|
37
37
|
</TextContent>
|
|
38
|
-
<TextContent
|
|
38
|
+
<TextContent sourcename="textid:134" datestamp="20111204T1218">
|
|
39
39
|
<TextType>07</TextType>
|
|
40
40
|
<ContentAudience>00</ContentAudience>
|
|
41
|
-
<Text>
|
|
41
|
+
<Text sourcename="http://nakanapie.pl/books/420469/reviews/2892.odnalezc-swa-droge">
|
|
42
42
|
<![CDATA[Recenzja książki<br />[...]]]>
|
|
43
43
|
</Text>
|
|
44
44
|
<TextAuthor>Jan Kowalski</TextAuthor>
|
|
45
|
+
<SourceTitle>nakanapie.pl</SourceTitle>
|
|
45
46
|
</TextContent>
|
|
46
|
-
<TextContent
|
|
47
|
+
<TextContent sourcename="textid:135" datestamp="20111204T1225">
|
|
47
48
|
<TextType>03</TextType>
|
|
48
49
|
<ContentAudience>00</ContentAudience>
|
|
49
50
|
<Text>
|
|
50
51
|
<![CDATA[Opis książki<br />[...]]]>
|
|
51
52
|
</Text>
|
|
52
53
|
</TextContent>
|
|
53
|
-
<TextContent
|
|
54
|
+
<TextContent sourcename="textid:136" datestamp="20111204T1235">
|
|
54
55
|
<TextType>14</TextType>
|
|
55
56
|
<ContentAudience>00</ContentAudience>
|
|
56
57
|
<Text>
|
metadata
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: elibri_onix
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
hash:
|
|
4
|
+
hash: 13
|
|
5
5
|
prerelease:
|
|
6
6
|
segments:
|
|
7
7
|
- 0
|
|
8
8
|
- 1
|
|
9
|
-
-
|
|
10
|
-
version: 0.1.
|
|
9
|
+
- 11
|
|
10
|
+
version: 0.1.11
|
|
11
11
|
platform: ruby
|
|
12
12
|
authors:
|
|
13
13
|
- Marcin Urbanski
|
|
@@ -15,7 +15,7 @@ autorequire:
|
|
|
15
15
|
bindir: bin
|
|
16
16
|
cert_chain: []
|
|
17
17
|
|
|
18
|
-
date: 2011-12-
|
|
18
|
+
date: 2011-12-19 00:00:00 +01:00
|
|
19
19
|
default_executable:
|
|
20
20
|
dependencies:
|
|
21
21
|
- !ruby/object:Gem::Dependency
|
|
@@ -292,7 +292,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
|
292
292
|
requirements: []
|
|
293
293
|
|
|
294
294
|
rubyforge_project:
|
|
295
|
-
rubygems_version: 1.
|
|
295
|
+
rubygems_version: 1.6.2
|
|
296
296
|
signing_key:
|
|
297
297
|
specification_version: 3
|
|
298
298
|
summary: EDItEUR ONIX format subset implementation used in Elibri publication system
|