wombat 0.5.0 → 1.0.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.
data/README.md CHANGED
@@ -62,7 +62,7 @@ end
62
62
  ```
63
63
 
64
64
  ### This is just a sneak peek of what Wombat can do. For the complete documentation, please check the [project Wiki](http://github.com/felipecsl/wombat/wiki).
65
- ### [API Documentation](http://rubydoc.info/gems/wombat/0.4.0/frames).
65
+ ### [API Documentation](http://rubydoc.info/gems/wombat/0.5.0/frames).
66
66
 
67
67
 
68
68
  ## Contributing to Wombat
@@ -85,6 +85,10 @@ end
85
85
 
86
86
  ### version 1.0.0
87
87
 
88
+ * Breaking change: Metadata#format renamed to Metadata#document_format due to method name clash with [Kernel#format](http://www.ruby-doc.org/core-1.9.3/Kernel.html#method-i-format)
89
+
90
+ ### version 0.5.0
91
+
88
92
  * [Fixed a bug on malformed selectors](https://github.com/felipecsl/wombat/commit/e0f4eec20e1e2bb07a1813a1edd019933edeceaa)
89
93
  * [Fixed a bug where multiple calls to #crawl would not clean up previously iterated array results and yield repeated results](https://github.com/felipecsl/wombat/commit/40b09a5bf8b9ba08aa51b6f41f706b7c3c4e4252)
90
94
 
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.5.0
1
+ 1.0.0
@@ -5,7 +5,7 @@ require 'wombat/iterator'
5
5
  module Wombat
6
6
  class Metadata < PropertyContainer
7
7
  def initialize
8
- self[:format] = :html
8
+ self[:document_format] = :html
9
9
  super
10
10
  end
11
11
 
@@ -17,8 +17,8 @@ module Wombat
17
17
  self[:list_page] = url
18
18
  end
19
19
 
20
- def format(format)
21
- self[:format] = format
20
+ def document_format(format)
21
+ self[:document_format] = format
22
22
  end
23
23
  end
24
24
  end
@@ -37,7 +37,7 @@ module Wombat
37
37
  page = nil
38
38
  parser = nil
39
39
  begin
40
- if metadata[:format] == :html
40
+ if metadata[:document_format] == :html
41
41
  page = @mechanize.get(url)
42
42
  parser = page.parser
43
43
  else
@@ -115,9 +115,9 @@ describe Wombat::Crawler do
115
115
 
116
116
  it 'should assign metadata format' do
117
117
  @crawler_instance.should_receive(:parse) do |arg|
118
- arg[:format].should == :xml
118
+ arg[:document_format].should == :xml
119
119
  end
120
- @crawler.format :xml
120
+ @crawler.document_format :xml
121
121
  @crawler_instance.crawl
122
122
  end
123
123
 
@@ -197,7 +197,7 @@ describe Wombat::Crawler do
197
197
  @crawler.list_page '/portal'
198
198
 
199
199
  @crawler.search "css=.btn-search"
200
- @crawler.format :xml
200
+ @crawler.document_format :xml
201
201
 
202
202
  @crawler_instance.crawl
203
203
  @crawler_instance.response_code.should be(200)
@@ -224,12 +224,11 @@ describe Wombat::Crawler do
224
224
  @crawler.list_page '/portal'
225
225
 
226
226
  @crawler.search "css=.btn-search"
227
- @crawler.format :xml
227
+ @crawler.document_format :xml
228
228
  lambda { @crawler_instance.crawl }.should raise_error(RestClient::ResourceNotFound)
229
229
  @crawler_instance.response_code.should be(404)
230
230
  end
231
231
  end
232
-
233
232
  end
234
233
  end
235
234
  end
@@ -154,7 +154,7 @@ describe 'basic crawler setup' do
154
154
  crawler = Class.new
155
155
  crawler.send(:include, Wombat::Crawler)
156
156
 
157
- crawler.format :xml
157
+ crawler.document_format :xml
158
158
  crawler.base_url "http://ws.audioscrobbler.com"
159
159
  crawler.list_page "/2.0/?method=geo.getevents&location=#{URI.escape('San Francisco')}&api_key=060decb474b73437d5bbec37f527ae7b"
160
160
 
@@ -113,7 +113,7 @@ describe Wombat::Parser do
113
113
  it 'should correctly parse xml documents' do
114
114
  fake_document = double :xml
115
115
  fake_parser = double :parser
116
- @metadata.format :xml
116
+ @metadata.document_format :xml
117
117
  @parser.mechanize.should_not_receive(:get)
118
118
  RestClient.should_receive(:get).and_return fake_document
119
119
  Nokogiri.should_receive(:XML).with(fake_document).and_return fake_parser
@@ -5,7 +5,7 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = "wombat"
8
- s.version = "0.5.0"
8
+ s.version = "1.0.0"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["Felipe Lima"]
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: wombat
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.5.0
4
+ version: 1.0.0
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors: