Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Loading…

Removed scope_source_options method and added TODO #2

Closed
wants to merge 8 commits into from

2 participants

@KellyMahan

removed scope_source_options - not needed for azure api and just gets in the way.
Added TODO to define future development for the option of web results only or the full bing search api.

KellyMahan added some commits
@KellyMahan KellyMahan added rvmrc file to gitignore f6dd51e
@KellyMahan KellyMahan big commit heres the details:
base_uri is different
added reserved options for skip and top
made error handling info more useful
instead of converting query to a string to send to httparty, I'm now sending a has to let it deal with it.
password is no longer hard coded and will accept direct input when calling new, or read it from your .rbing_app_id file in the $HOME directory
5d64f8f
@KellyMahan KellyMahan full 2.0.0 version bunmp 5dfd79a
@KellyMahan KellyMahan version needs to be 2.0.1 to be greater than 2.0.0.pre f9132fa
@KellyMahan KellyMahan Merge branch 'azure' of https://github.com/koppen/rbing into azure
Conflicts:
	lib/rbing.rb
e50adbe
@KellyMahan KellyMahan removed scope_source_options - not needed for azure api and just gets…
… in the way
b48187c
@KellyMahan KellyMahan added TODO item 5faf156
@KellyMahan KellyMahan matching source up with koppen/rbing/azure be1d4a3
@koppen
Owner

Thanks! It looks like commit b48187c is the only commit that needs to be in this pull request, though. Please create a new pull request containing only the necessary commit.

In the future, I'd appreciate if you could create feature branches based on the working branch (currently azure) and submit pull requests from those feature branches. It makes merging your contributions way easier.

@KellyMahan

Not sure why but git thinks it needs all those commits for a successful merge. It may have to do with the original merge. And your right that a different branch would probably solve that issue in the future.

@KellyMahan

Can you manually add b48187c in your own commit. I'll blow away my project and refork to get things back in sync. From then on i'll make commits in other branches.

@koppen
Owner

Done.

@koppen koppen closed this
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Aug 20, 2012
  1. @KellyMahan
  2. @KellyMahan

    big commit heres the details:

    KellyMahan authored
    base_uri is different
    added reserved options for skip and top
    made error handling info more useful
    instead of converting query to a string to send to httparty, I'm now sending a has to let it deal with it.
    password is no longer hard coded and will accept direct input when calling new, or read it from your .rbing_app_id file in the $HOME directory
  3. @KellyMahan

    full 2.0.0 version bunmp

    KellyMahan authored
  4. @KellyMahan
  5. @KellyMahan

    Merge branch 'azure' of https://github.com/koppen/rbing into azure

    KellyMahan authored
    Conflicts:
    	lib/rbing.rb
Commits on Aug 21, 2012
  1. @KellyMahan
  2. @KellyMahan

    added TODO item

    KellyMahan authored
  3. @KellyMahan
This page is out of date. Refresh to see the latest.
Showing with 1 addition and 9 deletions.
  1. +1 −0  TODO
  2. +0 −9 lib/rbing.rb
View
1  TODO
@@ -0,0 +1 @@
+Right now rbing/azure is using the web results only api. It's cheaper but we need to include an option to use the regular api as well for those that need the extra features.
View
9 lib/rbing.rb
@@ -162,12 +162,10 @@ def options_for(type, query, options={})
opts.merge!(build_query(query, options))
source_options = filter_hash(options, [:http] + BASE_OPTIONS + QUERY_KEYWORDS)
- opts.merge!(scope_source_options(type, source_options))
RESERVED_OPTIONS.each do |reserved_option|
next unless options[reserved_option]
opts.merge!("$#{reserved_option}" => options[reserved_option])
opts.delete(reserved_option)
- opts.delete('Web.' + "#{reserved_option}") # Why is this needed? What is causing it to set this?
end
opts.merge!('$format' => 'JSON')
@@ -180,13 +178,6 @@ def options_for(type, query, options={})
http_options.merge(:query => opts)
end
- # returns a Hash containing the data in +options+
- # with the keys prefixed with +type+ and '.'
- #
- def scope_source_options(type, options={})
- options.inject({}) {|h,kv| h["#{type}.#{kv[0]}"] = kv[1]; h }
- end
-
# returns the user's default app id, if one has been
# defined in ~/.rbing_app_id
#
Something went wrong with that request. Please try again.