gbip 0.8.1 → 0.8.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (4) hide show
  1. data/CHANGELOG +3 -0
  2. data/Rakefile +1 -1
  3. data/lib/gbip/title.rb +25 -20
  4. metadata +3 -3
data/CHANGELOG CHANGED
@@ -1,3 +1,6 @@
1
+ v0.8.2 (25th July 2009)
2
+ - Add GBIP::Title#to_hash()
3
+
1
4
  v0.8.1 (11th June 2009)
2
5
  - Fix parsing of API responses that contain multiple results
3
6
  - small update to specs
data/Rakefile CHANGED
@@ -5,7 +5,7 @@ require 'rake/testtask'
5
5
  require "rake/gempackagetask"
6
6
  require 'spec/rake/spectask'
7
7
 
8
- PKG_VERSION = "0.8.1"
8
+ PKG_VERSION = "0.8.2"
9
9
  PKG_NAME = "gbip"
10
10
  PKG_FILE_NAME = "#{PKG_NAME}-#{PKG_VERSION}"
11
11
  RUBYFORGE_PROJECT = 'rbook'
@@ -41,27 +41,32 @@ module GBIP
41
41
  @warehouses = []
42
42
  end
43
43
 
44
+ def to_hash
45
+ {
46
+ :status => self.status,
47
+ :pubdate => self.publication_date,
48
+ :binding => self.binding,
49
+ :publisher => self.publisher,
50
+ :contributor => self.contributor,
51
+ :isbn => self.isbn,
52
+ :edition => self.edition,
53
+ :market => self.market,
54
+ :rrp => self.rrp.to_s("F"),
55
+ :title => self.title,
56
+ :country => self.country,
57
+ :pubcode => self.pubcode,
58
+ :currency => self.currency,
59
+ :bowker_subject => self.bowker_subject,
60
+ :bisac_subject => self.bisac_subject,
61
+ :child_subject => self.child_subject,
62
+ :bic_subject => self.bic_subject,
63
+ :supplier => self.supplier,
64
+ :suppliers_with_stock => self.suppliers_with_stock
65
+ }
66
+ end
67
+
44
68
  def to_yaml
45
- YAML.dump(:status => self.status,
46
- :pubdate => self.publication_date,
47
- :binding => self.binding,
48
- :publisher => self.publisher,
49
- :contributor => self.contributor,
50
- :isbn => self.isbn,
51
- :edition => self.edition,
52
- :market => self.market,
53
- :rrp => self.rrp.to_s("F"),
54
- :title => self.title,
55
- :country => self.country,
56
- :pubcode => self.pubcode,
57
- :currency => self.currency,
58
- :bowker_subject => self.bowker_subject,
59
- :bisac_subject => self.bisac_subject,
60
- :child_subject => self.child_subject,
61
- :bic_subject => self.bic_subject,
62
- :supplier => self.supplier,
63
- :suppliers_with_stock => self.suppliers_with_stock
64
- )
69
+ YAML.dump(to_hash)
65
70
  end
66
71
  end
67
72
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: gbip
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.8.1
4
+ version: 0.8.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - James Healy
@@ -9,7 +9,7 @@ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
11
 
12
- date: 2009-06-11 00:00:00 +10:00
12
+ date: 2009-07-25 00:00:00 +10:00
13
13
  default_executable:
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
@@ -84,7 +84,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
84
84
  requirements: []
85
85
 
86
86
  rubyforge_project: rbook
87
- rubygems_version: 1.3.3
87
+ rubygems_version: 1.3.4
88
88
  signing_key:
89
89
  specification_version: 3
90
90
  summary: A library for access the globalbooksinprint.com API