Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Tweak handling of measurement units

  • Loading branch information...
commit f04a53a01eb21e23ab2bccac6b65e7daafc575b0 1 parent 2f6a7eb
@yob authored
Showing with 68 additions and 5 deletions.
  1. +65 −0 data/extra_entities.xml
  2. +1 −1  lib/onix.rb
  3. +2 −4 lib/onix/apa_product.rb
View
65 data/extra_entities.xml
@@ -0,0 +1,65 @@
+ <Product>
+ <RecordReference>0470048948</RecordReference>
+ <NotificationType>03</NotificationType>
+ <ProductIdentifier>
+ <ProductIDType>02</ProductIDType>
+ <IDValue>0470048948</IDValue>
+ </ProductIdentifier>
+ <ProductIdentifier>
+ <ProductIDType>03</ProductIDType>
+ <IDValue>9780470048948</IDValue>
+ </ProductIdentifier>
+ <ProductForm>BC</ProductForm>
+ <ContainedItem>
+ <ProductForm>DH</ProductForm>
+ </ContainedItem>
+ <Title>
+ <TitleType>01</TitleType>
+ <TitleText>Ipod&reg; &amp; Itunes&reg; for Dummies&reg;, 4th Edition</TitleText>
+ </Title>
+ <Contributor>
+ <ContributorRole>A01</ContributorRole>
+ <PersonName>Bove</PersonName>
+ <PersonNameInverted>Bove</PersonNameInverted>
+ <KeyNames>Bove</KeyNames>
+ </Contributor>
+ <NumberOfPages>432</NumberOfPages>
+ <BICMainSubject>UH</BICMainSubject>
+ <Subject>
+ <SubjectSchemeIdentifier>12</SubjectSchemeIdentifier>
+ <SubjectCode>F</SubjectCode>
+ </Subject>
+ <Imprint>
+ <ImprintName>Wiley US</ImprintName>
+ </Imprint>
+ <Publisher>
+ <PublishingRole>01</PublishingRole>
+ <PublisherName>John Wiley &amp; Sons Inc (US)</PublisherName>
+ </Publisher>
+ <PublishingStatus>02</PublishingStatus>
+ <PublicationDate>20061101</PublicationDate>
+ <SupplyDetail>
+ <SupplierName>John Wiley &amp; Sons Australia</SupplierName>
+ <SupplierRole>01</SupplierRole>
+ <ProductAvailability>10</ProductAvailability>
+ <ExpectedShipDate>20061101</ExpectedShipDate>
+ <Price>
+ <PriceAmount>33.95</PriceAmount>
+ <CurrencyCode>AUD</CurrencyCode>
+ </Price>
+ <Price>
+ <PriceAmount>38.95</PriceAmount>
+ <CurrencyCode>NZD</CurrencyCode>
+ </Price>
+ </SupplyDetail>
+ <MarketRepresentation>
+ <AgentName>John Wiley &amp; Sons Australia</AgentName>
+ <AgentRole>05</AgentRole>
+ <MarketCountry>AU</MarketCountry>
+ <MarketPublishingStatus>02</MarketPublishingStatus>
+ <MarketDate>
+ <MarketDateRole>02</MarketDateRole>
+ <Date>20061101</Date>
+ </MarketDate>
+ </MarketRepresentation>
+ </Product>
View
2  lib/onix.rb
@@ -51,7 +51,7 @@ module ONIX
module Version #:nodoc:
Major = 0
Minor = 4
- Tiny = 0
+ Tiny = 1
String = [Major, Minor, Tiny].join('.')
end
View
6 lib/onix/apa_product.rb
@@ -11,10 +11,8 @@ class APAProduct < SimpleProduct
delegate :publishing_status, :publishing_status=
delegate :publication_date, :publication_date=
- attr_reader :measurement_system
-
- def initialize
- @measurement_system = :metric
+ def measurement_system
+ @measurement_system ||= :metric
end
def measurement_system=(value)
Please sign in to comment.
Something went wrong with that request. Please try again.