bookcrawler 0.1.0 → 0.3.0

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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: d599e5d0be33f3bb0f0f6c1f8fbc01fcf682a3e6
4
- data.tar.gz: a24d09141afaa07e1f243528b442bd3186efffd8
3
+ metadata.gz: 8bd9096eda4b3be33dac09efa7f291254327265d
4
+ data.tar.gz: 3e3fafca613b43993638771b3efc4c3b09a5a884
5
5
  SHA512:
6
- metadata.gz: 73e59026328d672ae3ee5f46b8c08f795cb3facf85c485f204166e62579314541cddb28787f792d55c3886d1187bf9f19af09a6f6e1a385c0dec02ca17b15d31
7
- data.tar.gz: b418b4dae3f2d4e5a1bc4c2cfd8f8c12b37911b9f416b9652f846fa9c2db81137db4dcc4aad5bfeff11664c208bcfaf3ff258b8bfe8635350ef87489cec05897
6
+ metadata.gz: b0630f182788833e053cbfafe3f688d22c3f24306c51b46b7574460cea78cc204bc9ea49e532db283ce6ce82e88b198aa4d631fbda009dc0b767d8dea578e58a
7
+ data.tar.gz: 996f20892dbdc0a6c1d4e8f25faced70e95a7da1923db39341592d1f17d62ad69921797965620234a5eb360bd635de00def20d41e9aa3b5cb93c446b3de9f92a
data/.gitignore CHANGED
@@ -34,4 +34,5 @@ build/
34
34
  # unless supporting rvm < 1.11.0 or doing something fancy, ignore this:
35
35
  .rvmrc
36
36
  .idea/
37
+ fixtures/
37
38
 
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- bookcrawler (0.1.0)
4
+ bookcrawler (0.3.0)
5
5
  vacuum (~> 1.3.0)
6
6
  vcr (~> 2.9.3)
7
7
  webmock (~> 1.19.0)
data/README.md CHANGED
@@ -40,7 +40,7 @@ book = crawler.find_by_title('A Clash of Kings')
40
40
  # cover_url: "http://...">
41
41
  ```
42
42
 
43
- You can fetch the book cover from `cover_url`. Support for covers is not official in the [Amazon Product Advertising API](https://affiliate-program.amazon.com/gp/advertising/api/detail/main.html). The url is generated according to [this article](http://aaugh.com/imageabuse.html).
43
+ You can fetch the book cover at `cover_url`. Support for covers is not official in the [Amazon Product Advertising API](https://affiliate-program.amazon.com/gp/advertising/api/detail/main.html). The url is generated according to [this article](http://aaugh.com/imageabuse.html).
44
44
 
45
45
  This gem uses [Vacuum](https://github.com/hakanensari/vacuum) under the hood.
46
46
 
@@ -9,7 +9,7 @@ Gem::Specification.new do |spec|
9
9
  spec.authors = ["Jorge Manrubia"]
10
10
  spec.email = ["jorge.manrubia@gmail.com"]
11
11
 
12
- spec.summary = %q{Simple mechanism for fetching books metadata using Amazon Product Advertising API}
12
+ spec.summary = %q{Fetch books metadata using Amazon Product Advertising API}
13
13
  spec.description = %q{}
14
14
  spec.homepage = "https://github.com/jorgemanrubia/bookcrawler"
15
15
  spec.license = "MIT"
@@ -58,9 +58,12 @@ module Bookcrawler
58
58
  def create_book_from_vacuum_entry(target_entry)
59
59
  Book.new asin: target_entry['ASIN'],
60
60
  title: target_entry['Title'],
61
- author: target_entry['Author'],
61
+ author: process_author(target_entry['Author']),
62
62
  detail_page_url: target_entry['DetailPageURL']
63
63
  end
64
64
 
65
+ def process_author(author_or_authors)
66
+ [author_or_authors].flatten.join(', ')
67
+ end
65
68
  end
66
69
  end
@@ -1,3 +1,3 @@
1
1
  module Bookcrawler
2
- VERSION = "0.1.0"
2
+ VERSION = "0.3.0"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: bookcrawler
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.3.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jorge Manrubia
@@ -153,6 +153,5 @@ rubyforge_project:
153
153
  rubygems_version: 2.4.5
154
154
  signing_key:
155
155
  specification_version: 4
156
- summary: Simple mechanism for fetching books metadata using Amazon Product Advertising
157
- API
156
+ summary: Fetch books metadata using Amazon Product Advertising API
158
157
  test_files: []