snoo 0.0.5 → 0.0.6

Sign up to get free protection for your applications and to get access to all the features.
@@ -77,10 +77,11 @@ module Snoo
77
77
  raise ArgumentError, "syntax needs to be one of cloudsearch, lucene; is #{opts[:syntax]}" if %w{cloudsearch lucene}.include?(opts[:syntax])
78
78
 
79
79
  # This supports searches with and without a subreddit
80
- url = "%s/search.json" % (opts[:subreddit] if opts[:subreddit])
80
+ url = "%s/search.json" % ('/r/' + opts[:subreddit] if opts[:subreddit])
81
81
 
82
82
  # Construct the query
83
83
  httpquery = {q: query}
84
+ opts.delete :subreddit
84
85
  httpquery.merge! opts
85
86
 
86
87
  get(url, query: httpquery)
@@ -1,4 +1,4 @@
1
1
  module Snoo
2
2
  # The version string (duh)
3
- VERSION = "0.0.5"
3
+ VERSION = "0.0.6"
4
4
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: snoo
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.5
4
+ version: 0.0.6
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2012-08-09 00:00:00.000000000 Z
12
+ date: 2012-08-11 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: httparty