wiki_fetch 0.0.1 → 0.0.2

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: 8d92cbad1cb0199467a429b2787df48317d9d6da
4
- data.tar.gz: c81e1f7a3f81ae1fad4b242fcf3f15e1ef8cb544
3
+ metadata.gz: 6bef2789f93ff86bb7cfe5da814119cef4a317a6
4
+ data.tar.gz: 221c8808bf6441185a72937d7290b21f90cade6a
5
5
  SHA512:
6
- metadata.gz: 30f55fc6768046ad8dc7dda7dde6e2fbcb83124f93a886d77f56b02a7fedba781e78cc03625b3ee5110e0534f99ff47ea7b46c7796d6a770ed01bf7b018e8d3f
7
- data.tar.gz: d943ea44ce55df0d50ea8304f1fd94d8f8112f90178a0d714875bfb9f468a36af539acea754823db90650d9df42e21220db7d765808bfc0db1c6a5b1046726fc
6
+ metadata.gz: 772ca0d56f1840631220a6a820b48c7ca2765a3295d6272523b47602b7303da9fa0a38dc26321b6465723a318b170d7747e2d3f5f6962ca38d8acb63b7d71786
7
+ data.tar.gz: f14eb2b3fcc226557ea6c92f4cc340917969a636e193ec9d19bb1ae74e13575611a0dfac1e98e48baee4ca469721da167c6cc62b74a76dc5114fd59df06507f1
@@ -9,13 +9,11 @@ class Wiki
9
9
 
10
10
  def search_title(name, options = {})
11
11
  url = UrlFormatter.create_url({:name => name, :method => "search_title", :options => options})
12
- puts url
13
12
  fetch_url(url)
14
13
  end
15
14
 
16
15
  def search_suggestions(name, options = {})
17
16
  url = UrlFormatter.create_url({:name => name, :method => "search_suggestions", :options => options})
18
- puts url
19
17
  fetch_url(url)
20
18
  end
21
19
 
@@ -6,9 +6,9 @@ module UrlFormatter
6
6
  case options[:method]
7
7
  when "search_title"
8
8
  query = options[:options][:action] || "query"
9
- extracts = options[:options][:prop] || "extracts"
10
- exsentences = (options[:options][:exsentences] || 10).to_i
11
- return "#{$wiki_base_url}?format=#{format}&action=#{query}&prop=#{extracts}&exsentences=#{exsentences}&titles=#{options[:name]}"
9
+ prop = options[:options][:prop] || "revisions"
10
+ rvprop = options[:options][:rvprop] || "content"
11
+ return "#{$wiki_base_url}?format=#{format}&action=#{query}&titles=#{options[:name]}&prop=#{prop}&rvprop=#{rvprop}"
12
12
  when "search_suggestions"
13
13
  query = options[:options][:action] || "opensearch"
14
14
  limit = (options[:options][:limit] || 10).to_i
@@ -1,3 +1,3 @@
1
1
  module WikiFetch
2
- VERSION = "0.0.1"
2
+ VERSION = "0.0.2"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: wiki_fetch
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.1
4
+ version: 0.0.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - nileshpatil47