lcbo 1.2.2 → 1.2.3

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,3 +1,8 @@
1
+ Version 1.2.3
2
+
3
+ * Updated `ProductPage` to return `RedirectedError` for gift cards which now
4
+ redirect to a special page.
5
+
1
6
  Version 1.2.2
2
7
 
3
8
  * Updated `ProductListPage` to deal with changes made on LCBO.com which were
@@ -15,6 +15,7 @@ module LCBO
15
15
 
16
16
  class MalformedError < StandardError; end
17
17
  class NotFoundError < StandardError; end
18
+ class RedirectedError < StandardError; end
18
19
  class RequestFailedError < StandardError; end
19
20
  class TimeoutError < StandardError; end
20
21
  end
@@ -39,6 +39,7 @@ module LCBO
39
39
 
40
40
  def ensure_success!
41
41
  return if @code == 200
42
+ raise RedirectedError, "<#{@uri}> returned status 302" if @code == 302
42
43
  raise RequestFailedError, "<#{@uri}> failed with status: #{@code}"
43
44
  end
44
45
 
@@ -1,3 +1,3 @@
1
1
  module LCBO
2
- VERSION = '1.2.2'
2
+ VERSION = '1.2.3'
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: lcbo
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.2.2
4
+ version: 1.2.3
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors: