lcbo 0.9.0 → 0.9.1

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,3 +1,8 @@
1
+ Version 0.9.1
2
+
3
+ * Removed dependency on Addressable.
4
+ * Refactored tests to use MiniTest::Spec instead of RSpec, removing another dependency.
5
+
1
6
  Version 0.9.0
2
7
 
3
8
  * Initial public release
data/Gemfile CHANGED
@@ -1,6 +1,4 @@
1
1
  source 'http://rubygems.org'
2
2
 
3
- gem 'rspec', '1.3.0'
4
- gem 'typhoeus', '0.1.29'
5
- gem 'addressable', '2.1.2'
6
- gem 'nokogiri', '1.4.3.1'
3
+ gem 'typhoeus'
4
+ gem 'nokogiri'
@@ -1,18 +1,14 @@
1
1
  GEM
2
2
  remote: http://rubygems.org/
3
3
  specs:
4
- addressable (2.1.2)
5
4
  nokogiri (1.4.3.1)
6
5
  rack (1.2.1)
7
- rspec (1.3.0)
8
- typhoeus (0.1.29)
6
+ typhoeus (0.1.31)
9
7
  rack
10
8
 
11
9
  PLATFORMS
12
10
  ruby
13
11
 
14
12
  DEPENDENCIES
15
- addressable (= 2.1.2)
16
- nokogiri (= 1.4.3.1)
17
- rspec (= 1.3.0)
18
- typhoeus (= 0.1.29)
13
+ nokogiri
14
+ typhoeus
data/README.md CHANGED
@@ -22,6 +22,12 @@ This library is used to gather data for [LCBO API](http://lcboapi.com). It allow
22
22
 
23
23
  Use Ruby Gems: `gem install lcbo`
24
24
 
25
+ ## Notes
26
+
27
+ * Works with Ruby 1.9.2, not tested with 1.8.X or 1.9.1.
28
+ * Don't be evil, be nice.
29
+ * Lots of room to improve — fork your face off!
30
+
25
31
  ## Links
26
32
 
27
33
  * [Issue tracker](http://github.com/heycarsten/lcbo/issues)
data/Rakefile CHANGED
@@ -1,9 +1,6 @@
1
- gem 'rspec', '1.3.0'
2
1
  require 'rubygems/specification' unless defined?(Gem::Specification)
3
- require 'spec/rake/spectask'
4
2
  require 'rake/gempackagetask'
5
-
6
- task :default => :spec
3
+ require 'rake/testtask'
7
4
 
8
5
  def gemspec
9
6
  @gemspec ||= begin
@@ -11,6 +8,8 @@ def gemspec
11
8
  end
12
9
  end
13
10
 
11
+ task :default => :spec
12
+
14
13
  desc 'Start an irb console'
15
14
  task :console do
16
15
  system 'irb -I lib -r lcbo'
@@ -42,10 +41,10 @@ end
42
41
  task :gem => :gemspec
43
42
  task :package => :gemspec
44
43
 
45
- desc 'Run the specs'
46
- Spec::Rake::SpecTask.new do |t|
47
- t.spec_files = FileList['spec/**/*_spec.rb']
48
- t.spec_opts = %w[-fs --color]
44
+ Rake::TestTask.new(:spec) do |t|
45
+ t.libs += %w[lcbo spec]
46
+ t.test_files = FileList['spec/**/*.rb']
47
+ t.verbose = true
49
48
  end
50
49
 
51
50
  desc 'Download all HTML indicated in YAML assertion files'
@@ -15,11 +15,8 @@ Gem::Specification.new do |s|
15
15
  s.rubyforge_project = 'lcbo'
16
16
 
17
17
  s.add_dependency 'typhoeus'
18
- s.add_dependency 'addressable'
19
18
  s.add_dependency 'nokogiri'
20
19
 
21
- s.add_development_dependency 'rspec', '1.3.0'
22
-
23
20
  s.files = `git ls-files`.split(?\n)
24
21
  s.test_files = `git ls-files -- {test,spec}/*`.split(?\n)
25
22
  s.require_paths = ['lib']
@@ -1,5 +1,3 @@
1
- require 'addressable/template'
2
- require 'addressable/uri'
3
1
  require 'nokogiri'
4
2
  require 'typhoeus'
5
3
  require 'uri'
@@ -126,7 +126,11 @@ module LCBO
126
126
 
127
127
  def as_hash
128
128
  @as_hash ||= begin
129
- fields.reduce({}) { |hsh, field| hsh.merge(field => send(field)) }
129
+ fields.reduce({}) do |hsh, field|
130
+ value = send(field)
131
+ hsh[field] = value.is_a?(String) ? value.encode('utf-8') : value
132
+ hsh
133
+ end
130
134
  end
131
135
  end
132
136
 
@@ -31,7 +31,10 @@ module LCBO
31
31
  end
32
32
 
33
33
  def uri
34
- request_prototype.uri_template.expand(query_params).to_s
34
+ template = request_prototype.uri_template.dup
35
+ query_params.reduce(template) do |mem, (key, value)|
36
+ mem.gsub("{#{key}}", value.to_s)
37
+ end
35
38
  end
36
39
 
37
40
  def run
@@ -15,7 +15,7 @@ module LCBO
15
15
  end
16
16
 
17
17
  def uri_template=(value)
18
- @uri_template = Addressable::Template.new(value) if value
18
+ @uri_template = value
19
19
  end
20
20
 
21
21
  def body_params=(value)
@@ -1,3 +1,3 @@
1
1
  module LCBO
2
- VERSION = '0.9.0'
2
+ VERSION = '0.9.1'
3
3
  end
@@ -1,22 +1,22 @@
1
1
  require 'spec_helper'
2
2
 
3
- describe LCBO::CrawlKit::Eventable, 'when mixed into a class' do
3
+ describe LCBO::CrawlKit::Eventable do
4
4
 
5
5
  it 'should have three callbacks' do
6
- SpecHelper::Evented.callbacks.size.should == 3
6
+ SpecHelper::Evented.callbacks.size.must_equal 3
7
7
  end
8
8
 
9
- context 'upon firing the events' do
10
- before :all do
9
+ describe 'upon firing the events' do
10
+ before do
11
11
  @evented = SpecHelper::Evented.new
12
12
  @evented.request!
13
13
  end
14
14
 
15
15
  it 'should run all events and fire all callbacks' do
16
- @evented.requested.should be_true
17
- @evented.test_1.should be_true
18
- @evented.test_2.should be_true
19
- @evented.test_3.should be_true
16
+ @evented.requested.must_equal true
17
+ @evented.test_1.must_equal true
18
+ @evented.test_2.must_equal true
19
+ @evented.test_3.must_equal true
20
20
  end
21
21
  end
22
22
 
@@ -12,7 +12,7 @@ describe LCBO::CrawlKit::FastDateHelper do
12
12
 
13
13
  @expectations.each_pair do |input, expectation|
14
14
  it "should translate: #{input.inspect} to: #{expectation.inspect}" do
15
- LCBO::CrawlKit::FastDateHelper[input].should == expectation
15
+ LCBO::CrawlKit::FastDateHelper[input].must_equal expectation
16
16
  end
17
17
  end
18
18
  end
@@ -3,110 +3,122 @@ require 'spec_helper'
3
3
  describe LCBO::CrawlKit::Page do
4
4
 
5
5
  it 'should have a collection of emittable fields' do
6
- SpecHelper::GetPage.fields.should include(:bro_no, :name, :desc)
7
- SpecHelper::PostPage.fields.should include(:q, :type, :names)
8
- SpecHelper::EventedPage.fields.should include(:message)
6
+ f = SpecHelper::GetPage.fields
7
+ f.must_include :bro_no
8
+ f.must_include :name
9
+ f.must_include :desc
10
+ f = SpecHelper::PostPage.fields
11
+ f.must_include :q
12
+ f.must_include :type
13
+ f.must_include :names
14
+ SpecHelper::EventedPage.fields.must_include :message
9
15
  end
10
16
 
11
17
  describe SpecHelper::GetPage do
12
18
  it 'should default to a GET request' do
13
- SpecHelper::GetPage.http_method.should == :get
19
+ SpecHelper::GetPage.http_method.must_equal :get
14
20
  end
15
21
 
16
- context 'when requested' do
17
- before :all do
22
+ describe 'when requested' do
23
+ before do
18
24
  @page = SpecHelper::GetPage.request(:bro_no => 1)
19
25
  end
20
26
 
21
27
  it 'should not be parsed' do
22
- @page.is_parsed?.should be_false
28
+ @page.is_parsed?.must_equal false
23
29
  end
24
30
 
25
31
  it 'should have a valid response object' do
26
- @page.response.should be_a(LCBO::CrawlKit::Response)
32
+ @page.response.must_be_instance_of LCBO::CrawlKit::Response
27
33
  end
28
34
 
29
- context 'the response' do
30
- before :all do
35
+ describe 'the response' do
36
+ before do
31
37
  @page.process
32
38
  end
33
39
 
34
40
  it 'should be directly parsable' do
35
41
  page = SpecHelper::GetPage.parse(@page.response)
36
- page.as_hash.values.should include(*@page.as_hash.values)
42
+ @page.as_hash.values.each do |value|
43
+ page.as_hash.values.must_include value
44
+ end
37
45
  end
38
46
 
39
47
  it 'should be parsable from a hash representation' do
40
48
  page = SpecHelper::GetPage.parse(@page.response.as_hash)
41
- page.as_hash.values.should include(*@page.as_hash.values)
49
+ @page.as_hash.values.each do |value|
50
+ page.as_hash.values.must_include value
51
+ end
42
52
  end
43
53
  end
44
54
  end
45
55
 
46
- context 'when processed' do
47
- before :all do
56
+ describe 'when processed' do
57
+ before do
48
58
  @page = SpecHelper::GetPage.process(:bro_no => 1)
49
59
  end
50
60
 
51
61
  it 'should expand the URI template' do
52
- @page.response.uri.should == 'http://bros.local/bros/1'
62
+ @page.response.uri.must_equal 'http://bros.local/bros/1'
53
63
  end
54
64
 
55
65
  it 'should emit expected values' do
56
- @page.bro_no.should == 1
57
- @page.name.should == 'Carsten'
58
- @page.desc.should == 'Carsten is a bro.'
66
+ @page.bro_no.must_equal 1
67
+ @page.name.must_equal 'Carsten'
68
+ @page.desc.must_equal 'Carsten is a bro.'
59
69
  end
60
70
 
61
71
  it 'should emit a hash of expected values' do
62
72
  hsh = @page.as_hash
63
- hsh[:bro_no].should == 1
64
- hsh[:name].should == 'Carsten'
65
- hsh[:desc].should == 'Carsten is a bro.'
73
+ hsh[:bro_no].must_equal 1
74
+ hsh[:name].must_equal 'Carsten'
75
+ hsh[:desc].must_equal 'Carsten is a bro.'
66
76
  end
67
77
  end
68
78
  end
69
79
 
70
80
  describe SpecHelper::PostPage do
71
81
  it 'should overide the default get http method with post' do
72
- SpecHelper::PostPage.http_method.should == :post
82
+ SpecHelper::PostPage.http_method.must_equal :post
73
83
  end
74
84
 
75
- context 'when processed' do
76
- before :all do
85
+ describe 'when processed' do
86
+ before do
77
87
  @page = SpecHelper::PostPage.process(nil, :q => 'test', :type => 'test')
78
88
  end
79
89
 
80
90
  it 'should overide default body params with provided params' do
81
- @page.body_params[:q].should == 'test'
82
- @page.body_params[:type].should == 'test'
91
+ @page.body_params[:q].must_equal 'test'
92
+ @page.body_params[:type].must_equal 'test'
83
93
  end
84
94
 
85
95
  it 'should have a valid uri template' do
86
- @page.response.uri.should == 'http://bros.local/search'
96
+ @page.response.uri.must_equal 'http://bros.local/search'
87
97
  end
88
98
 
89
99
  it 'should parse the page' do
90
- @page.as_hash[:names].should include('Carsten', 'Kieran', 'Kevin')
100
+ %w[Carsten Kieran Kevin].each do |name|
101
+ @page.as_hash[:names].must_include name
102
+ end
91
103
  end
92
104
  end
93
105
  end
94
106
 
95
107
  describe SpecHelper::EventedPage do
96
108
  it 'should override the default http method with PUT' do
97
- SpecHelper::EventedPage.http_method.should == :put
109
+ SpecHelper::EventedPage.http_method.must_equal :put
98
110
  end
99
111
 
100
- context '(instantiated)' do
101
- before :all do
112
+ describe '(instantiated)' do
113
+ before do
102
114
  @page = SpecHelper::EventedPage.process(:bro_no => 1)
103
115
  end
104
116
 
105
117
  it 'should fire the included events' do
106
- @page.before_request.should be_true
107
- @page.after_request.should be_true
108
- @page.before_parse.should be_true
109
- @page.after_parse.should be_true
118
+ @page.before_request.must_equal true
119
+ @page.after_request.must_equal true
120
+ @page.before_parse.must_equal true
121
+ @page.after_parse.must_equal true
110
122
  end
111
123
  end
112
124
  end
@@ -2,27 +2,27 @@ require 'spec_helper'
2
2
 
3
3
  describe LCBO::CrawlKit::Request do
4
4
 
5
- context 'GetRequest' do
6
- before :all do
5
+ describe 'GET request' do
6
+ before do
7
7
  pro = LCBO::CrawlKit::RequestPrototype.new('http://bros.local/bros/{bro_no}')
8
8
  @request = LCBO::CrawlKit::Request.new(pro, :bro_no => 1)
9
9
  end
10
10
 
11
11
  it 'should perform a get request' do
12
- @request.config[:method].should == :get
12
+ @request.config[:method].must_equal :get
13
13
  end
14
14
 
15
15
  it 'should build a uri based on the query param input' do
16
- @request.uri.should == 'http://bros.local/bros/1'
16
+ @request.uri.must_equal 'http://bros.local/bros/1'
17
17
  end
18
18
 
19
19
  it 'should perform the request' do
20
- @request.run.body.should == BRO_HTML
20
+ @request.run.body.must_equal SpecHelper::BRO_HTML
21
21
  end
22
22
  end
23
23
 
24
- context 'PostRequest' do
25
- before :all do
24
+ describe 'POST request' do
25
+ before do
26
26
  pro = LCBO::CrawlKit::RequestPrototype.new(
27
27
  'http://bros.local/search', :post,
28
28
  { :q => '', :type => 'all' })
@@ -31,11 +31,11 @@ describe LCBO::CrawlKit::Request do
31
31
  end
32
32
 
33
33
  it 'should build a uri appropriately' do
34
- @request.uri.should == 'http://bros.local/search'
34
+ @request.uri.must_equal 'http://bros.local/search'
35
35
  end
36
36
 
37
37
  it 'should perform the request' do
38
- @request.run.body.should == BRO_SEARCH_HTML
38
+ @request.run.body.must_equal SpecHelper::BRO_SEARCH_HTML
39
39
  end
40
40
  end
41
41
  end
@@ -17,14 +17,14 @@ describe LCBO::CrawlKit::TitleCaseHelper do
17
17
 
18
18
  @expectations.each_pair do |input, expectation|
19
19
  it "should convert: #{input.inspect} to: #{expectation.inspect}" do
20
- LCBO::CrawlKit::TitleCaseHelper[input].should == expectation
20
+ LCBO::CrawlKit::TitleCaseHelper[input].must_equal expectation
21
21
  end
22
22
  end
23
23
 
24
24
  it 'should translate lowercase characters to uppercase characters properly' do
25
25
  upper = LCBO::CrawlKit::TitleCaseHelper::UPPER_CHARS
26
26
  lower = LCBO::CrawlKit::TitleCaseHelper::LOWER_CHARS
27
- LCBO::CrawlKit::TitleCaseHelper.upcase(lower).should == upper
27
+ LCBO::CrawlKit::TitleCaseHelper.upcase(lower).must_equal upper
28
28
  end
29
29
 
30
30
  end
@@ -15,7 +15,7 @@ describe LCBO::CrawlKit::VolumeHelper do
15
15
 
16
16
  @expectations.each_pair do |input, expectation|
17
17
  it "should convert: #{input.inspect} to: #{expectation.inspect}" do
18
- LCBO::CrawlKit::VolumeHelper[input].should == expectation
18
+ LCBO::CrawlKit::VolumeHelper[input].must_equal expectation
19
19
  end
20
20
  end
21
21
  end
@@ -1,38 +1,38 @@
1
1
  require 'spec_helper'
2
2
 
3
3
  describe LCBO do
4
- context 'configuration' do
4
+ describe 'configuration' do
5
5
  it 'should be a hash' do
6
- LCBO.config.should be_a(Hash)
6
+ LCBO.config.must_be_instance_of Hash
7
7
  end
8
8
 
9
9
  it 'should be configurable' do
10
10
  LCBO.config[:user_agent] = 'Test'
11
- LCBO.config[:user_agent].should == 'Test'
11
+ LCBO.config[:user_agent].must_equal 'Test'
12
12
  LCBO.reset_config!
13
- LCBO.config[:user_agent].should be_nil
13
+ LCBO.config[:user_agent].must_be_nil
14
14
  end
15
15
  end
16
16
 
17
- context 'helper methods' do
17
+ describe 'helper methods' do
18
18
  it 'provides LCBO.parse' do
19
- LCBO.should respond_to(:parse)
19
+ LCBO.must_respond_to :parse
20
20
  end
21
21
 
22
22
  it 'provides LCBO.product' do
23
- LCBO.should respond_to(:product)
23
+ LCBO.must_respond_to :product
24
24
  end
25
25
 
26
26
  it 'provides LCBO.store' do
27
- LCBO.should respond_to(:store)
27
+ LCBO.must_respond_to :store
28
28
  end
29
29
 
30
30
  it 'provides LCBO.inventory' do
31
- LCBO.should respond_to(:inventory)
31
+ LCBO.must_respond_to :inventory
32
32
  end
33
33
 
34
34
  it 'provides LCBO.product_list' do
35
- LCBO.should respond_to(:product_list)
35
+ LCBO.must_respond_to :product_list
36
36
  end
37
37
  end
38
38
  end
@@ -17,14 +17,18 @@ require 'yaml'
17
17
  end
18
18
 
19
19
  requests.each do |req|
20
- context "given a #{req[:desc]}" do
21
- before :all do
20
+ describe "given a #{req[:desc]}" do
21
+ before do
22
22
  @page = page.process(req[:query_params], req[:body_params])
23
23
  end
24
24
 
25
25
  req[:expectation].each_pair do |key, value|
26
26
  it "should have the expected value for :#{key}" do
27
- @page[key].should == value
27
+ if (value.is_a?(String))
28
+ @page[key].must_equal value
29
+ else
30
+ @page[key].must_equal value
31
+ end
28
32
  end
29
33
  end
30
34
  end
@@ -1,77 +1,80 @@
1
- gem 'rspec', '1.3.0'
2
-
3
- require 'spec'
1
+ require 'minitest/spec'
4
2
  require 'lcbo'
5
3
 
6
- BRO_HTML = '<h1>Carsten</h1><p>Carsten is a bro.</p>'
7
- BRO_SEARCH_HTML = '<ul><li>Carsten</li><li>Kevin</li><li>Kieran</li></ul>'
8
- BRO_ICE_HTML = '<h1>Bro!</h1><p>Yall just icy yo fellow bros!</p>'
4
+ MiniTest::Unit.autorun
9
5
 
10
- module SpecHelper
6
+ unless defined? SpecHelper
7
+ module SpecHelper
8
+ BRO_HTML = '<h1>Carsten</h1><p>Carsten is a bro.</p>'
9
+ BRO_SEARCH_HTML = '<ul><li>Carsten</li><li>Kevin</li><li>Kieran</li></ul>'
10
+ BRO_ICE_HTML = '<h1>Bro!</h1><p>Yall just icy yo fellow bros!</p>'
11
11
 
12
- def self.hydrastub(method, uri, response_opts = {})
13
- response_params = {
14
- :code => 200,
15
- :headers => '',
16
- :body => '',
17
- :time => 0.3
18
- }.merge(response_opts)
19
- response = Typhoeus::Response.new(response_params)
20
- Typhoeus::Hydra.hydra.stub(method, uri).and_return(response)
21
- end
12
+ def self.hydrastub(method, uri, response_opts = {})
13
+ response_params = {
14
+ :code => 200,
15
+ :headers => '',
16
+ :body => '',
17
+ :time => 0.3
18
+ }.merge(response_opts)
19
+ response = Typhoeus::Response.new(response_params)
20
+ Typhoeus::Hydra.hydra.stub(method, uri).and_return(response)
21
+ end
22
22
 
23
- class Evented
24
- include LCBO::CrawlKit::Eventable
25
- on :before_request, :set_test_1
26
- on :before_request, :set_test_2
27
- on :after_request, :set_test_3
28
- attr_reader :test_1, :test_2, :test_3, :requested
29
- def set_test_1; @test_1 = true; end
30
- def set_test_2; @test_2 = true; end
31
- def set_test_3; @test_3 = true; end
32
- def request!
33
- fire(:before_request)
34
- @requested = true
35
- fire(:after_request)
23
+ class Evented
24
+ include LCBO::CrawlKit::Eventable
25
+ on :before_request, :set_test_1
26
+ on :before_request, :set_test_2
27
+ on :after_request, :set_test_3
28
+ attr_reader :test_1, :test_2, :test_3, :requested
29
+ def set_test_1; @test_1 = true; end
30
+ def set_test_2; @test_2 = true; end
31
+ def set_test_3; @test_3 = true; end
32
+ def request!
33
+ fire(:before_request)
34
+ @requested = true
35
+ fire(:after_request)
36
+ end
36
37
  end
37
- end
38
38
 
39
- class GetPage
40
- include LCBO::CrawlKit::Page
41
- uri 'http://bros.local/bros/{bro_no}'
42
- emits(:bro_no) { query_params[:bro_no].to_i }
43
- emits(:name) { doc.css('h1')[0].content }
44
- emits(:desc) { doc.css('p')[0].content }
45
- end
39
+ class GetPage
40
+ include LCBO::CrawlKit::Page
41
+ uri 'http://bros.local/bros/{bro_no}'
42
+ emits(:bro_no) { query_params[:bro_no].to_i }
43
+ emits(:name) { doc.css('h1')[0].content }
44
+ emits(:desc) { doc.css('p')[0].content }
45
+ end
46
46
 
47
- class PostPage
48
- include LCBO::CrawlKit::Page
49
- http_method :post
50
- uri 'http://bros.local/search'
51
- default_body_params :q => '', :type => 'all'
52
- emits(:q) { body_params[:q].to_s }
53
- emits(:type) { body_params[:type].to_s }
54
- emits(:names) { doc.css('li').map(&:content) }
55
- end
47
+ class PostPage
48
+ include LCBO::CrawlKit::Page
49
+ http_method :post
50
+ uri 'http://bros.local/search'
51
+ default_body_params :q => '', :type => 'all'
52
+ emits(:q) { body_params[:q].to_s }
53
+ emits(:type) { body_params[:type].to_s }
54
+ emits(:names) { doc.css('li').map(&:content) }
55
+ end
56
56
 
57
- class EventedPage
58
- include LCBO::CrawlKit::Page
59
- attr_reader :before_parse, :after_parse, :before_request, :after_request
60
- on :before_parse, :set_before_parse
61
- on :after_parse, :set_after_parse
62
- on :before_request, :set_before_request
63
- on :after_request, :set_after_request
64
- http_method :put
65
- uri 'http://bros.local/ice/{bro_no}'
66
- emits(:message) { doc.css('p')[0].content }
67
- def set_before_parse; @before_parse = true; end
68
- def set_after_parse; @after_parse = true; end
69
- def set_before_request; @before_request = true; end
70
- def set_after_request; @after_request = true; end
71
- end
57
+ class EventedPage
58
+ include LCBO::CrawlKit::Page
59
+ attr_reader :before_parse, :after_parse, :before_request, :after_request
60
+ on :before_parse, :set_before_parse
61
+ on :after_parse, :set_after_parse
62
+ on :before_request, :set_before_request
63
+ on :after_request, :set_after_request
64
+ http_method :put
65
+ uri 'http://bros.local/ice/{bro_no}'
66
+ emits(:message) { doc.css('p')[0].content }
67
+ def set_before_parse; @before_parse = true; end
68
+ def set_after_parse; @after_parse = true; end
69
+ def set_before_request; @before_request = true; end
70
+ def set_after_request; @after_request = true; end
71
+ end
72
72
 
73
+ SpecHelper.hydrastub :get, /http\:\/\/bros\.local\/bros\/.+/,
74
+ :body => BRO_HTML
75
+ SpecHelper.hydrastub :post, /http\:\/\/bros\.local\/search/,
76
+ :body => BRO_SEARCH_HTML
77
+ SpecHelper.hydrastub :put, /http\:\/\/bros\.local\/ice\/.+/,
78
+ :body => BRO_ICE_HTML
79
+ end
73
80
  end
74
-
75
- SpecHelper.hydrastub :get, /http\:\/\/bros\.local\/bros\/.+/, :body => BRO_HTML
76
- SpecHelper.hydrastub :post, /http\:\/\/bros\.local\/search/, :body => BRO_SEARCH_HTML
77
- SpecHelper.hydrastub :put, /http\:\/\/bros\.local\/ice\/.+/, :body => BRO_ICE_HTML
metadata CHANGED
@@ -5,8 +5,8 @@ version: !ruby/object:Gem::Version
5
5
  segments:
6
6
  - 0
7
7
  - 9
8
- - 0
9
- version: 0.9.0
8
+ - 1
9
+ version: 0.9.1
10
10
  platform: ruby
11
11
  authors:
12
12
  - Carsten Nielsen
@@ -14,7 +14,7 @@ autorequire:
14
14
  bindir: bin
15
15
  cert_chain: []
16
16
 
17
- date: 2010-09-23 00:00:00 -04:00
17
+ date: 2010-09-24 00:00:00 -04:00
18
18
  default_executable:
19
19
  dependencies:
20
20
  - !ruby/object:Gem::Dependency
@@ -31,7 +31,7 @@ dependencies:
31
31
  type: :runtime
32
32
  version_requirements: *id001
33
33
  - !ruby/object:Gem::Dependency
34
- name: addressable
34
+ name: nokogiri
35
35
  prerelease: false
36
36
  requirement: &id002 !ruby/object:Gem::Requirement
37
37
  none: false
@@ -43,34 +43,6 @@ dependencies:
43
43
  version: "0"
44
44
  type: :runtime
45
45
  version_requirements: *id002
46
- - !ruby/object:Gem::Dependency
47
- name: nokogiri
48
- prerelease: false
49
- requirement: &id003 !ruby/object:Gem::Requirement
50
- none: false
51
- requirements:
52
- - - ">="
53
- - !ruby/object:Gem::Version
54
- segments:
55
- - 0
56
- version: "0"
57
- type: :runtime
58
- version_requirements: *id003
59
- - !ruby/object:Gem::Dependency
60
- name: rspec
61
- prerelease: false
62
- requirement: &id004 !ruby/object:Gem::Requirement
63
- none: false
64
- requirements:
65
- - - "="
66
- - !ruby/object:Gem::Version
67
- segments:
68
- - 1
69
- - 3
70
- - 0
71
- version: 1.3.0
72
- type: :development
73
- version_requirements: *id004
74
46
  description: Request and parse product, store, inventory, and product search pages directly from the official LCBO website.
75
47
  email:
76
48
  - heycarsten@gmail.com