amazon-search 1.1.1 → 1.1.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (3) hide show
  1. checksums.yaml +4 -4
  2. data/lib/amazon-search.rb +2 -16
  3. metadata +1 -1
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 1d9464f71fde7ee69a0859f396294c5314751886
4
- data.tar.gz: c5bc777baa5e07f64abea86e4cf450384e1e2c30
3
+ metadata.gz: 312a257aab5e778a235e740b5dd61016223fdc88
4
+ data.tar.gz: 5480564be609f2ed9eca9ae85c8a94e4ed620fa4
5
5
  SHA512:
6
- metadata.gz: 1193508bd1dca50f242cf88da56cc9aeb1e159917a800f91dd403ff92a421588b7ac67bf3f35c2d12fb3aca0ef178027c4719067aa1c24d9e5fd549f1380687d
7
- data.tar.gz: 407a8b0fecee06bbe4b71bbf39cd6a484e75c266c4e5595bf738733439c0aef2a6086769e79cea10fb6612bf782666dbcfd90a3873a2a8daaa26bc517deb1f53
6
+ metadata.gz: ef7b9e076bf03c36cff8726a74fd69808e3f980f78d226dd26ef76e150987f363cf87f444705d8a066ce2c4f1e6b68b1161fe032bdda13f07eabd16feaee4543
7
+ data.tar.gz: 703586f1341fa9d06f32d1cdb7c7a758a6e174e3125d4f28e0dfa60bd3c0c93ae19c60f8a08af5683dc1dbac812d22382265b69c23ccf5cc1e9879d63dc0beef
data/lib/amazon-search.rb CHANGED
@@ -3,21 +3,9 @@
3
3
  require 'mechanize'
4
4
  require 'thor'
5
5
 
6
- def search(keywords)
7
-
8
-
9
- if keywords.nil? # did user forget to enter in search keywords?
10
- STDOUT.puts """
11
- Please provide search keywords
12
-
13
- Example Usage:
14
- search watches
15
- search books
16
- search games
17
-
18
- """
19
- else
6
+ puts "Example usage is 'search \"books\"' "
20
7
 
8
+ def search(keywords)
21
9
  agent = Mechanize.new
22
10
  main_page = agent.get("http://amazon.com")
23
11
  search_form = main_page.form_with :name => "site-search" # find the search form in Amazon
@@ -102,6 +90,4 @@ else
102
90
  end # ends pagination loop
103
91
 
104
92
  puts "\n\n(end of search results)"
105
-
106
- end # ends ARGV if statement
107
93
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: amazon-search
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.1.1
4
+ version: 1.1.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - John Mason