bigcartel 1.0.4 → 1.0.5

Sign up to get free protection for your applications and to get access to all the features.
data/.rvmrc ADDED
@@ -0,0 +1 @@
1
+ rvm --create 1.9.3@bigcartel
data/README.mkd CHANGED
@@ -4,7 +4,7 @@ A Ruby wrapper for the Big Cartel External REST API.
4
4
 
5
5
  [![Build Status](https://secure.travis-ci.org/tonkapark/bigcartel.png)](http://travis-ci.org/tonkapark/bigcartel)
6
6
 
7
- Version 1.0.2
7
+ Version 1.0.5
8
8
  -----------
9
9
 
10
10
  With the release of 1.0 I changed some of the design of the gem and should be considered a breaking change if you were using the 0.* versions of the gem. I hope this new design of the gem will be faster and also more useful in your applications.
@@ -58,6 +58,10 @@ Supported Rubies
58
58
 
59
59
  Change Log
60
60
  ==========
61
+ 1.0.5 - January 12, 2003
62
+ --------------
63
+ * Big Cartel changed url for their images again.
64
+
61
65
  1.0.4 - January 12, 2003
62
66
  --------------
63
67
  * fixed bug in regexp that broke images call when Big Cartel changed url for their images.
@@ -68,11 +68,12 @@ module BigCartel
68
68
  def images_helper(images)
69
69
  output = Array.new
70
70
  images.each do |img|
71
- url_parts = img.url.scan(/(https?:\/\/.*\/product_images\/\d*\/)(.*).(jpg|png|gif|jpeg)/i)
71
+ filename = File.basename(img.url)
72
+ picture_id = img.url.match(/\/(\d+)\//)[1]
72
73
 
73
- img.thumb = "#{url_parts[0][0]}75.#{url_parts[0][2]}"
74
- img.medium = "#{url_parts[0][0]}175.#{url_parts[0][2]}"
75
- img.large = "#{url_parts[0][0]}300.#{url_parts[0][2]}"
74
+ img.thumb = "http://images.cdn.bigcartel.com/bigcartel/product_images/#{picture_id}/max_h-75+max_w-75/#{filename}"
75
+ img.medium = "http://images.cdn.bigcartel.com/bigcartel/product_images/#{picture_id}/max_h-155+max_w-150/#{filename}"
76
+ img.large = "http://images.cdn.bigcartel.com/bigcartel/product_images/#{picture_id}/max_h-300+max_w-300/#{filename}"
76
77
  end
77
78
  images
78
79
  end
@@ -1,3 +1,3 @@
1
1
  module BigCartel
2
- VERSION = "1.0.4"
2
+ VERSION = "1.0.5"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: bigcartel
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.4
4
+ version: 1.0.5
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,12 +9,11 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2013-01-12 00:00:00.000000000 -06:00
13
- default_executable:
12
+ date: 2013-07-29 00:00:00.000000000 Z
14
13
  dependencies:
15
14
  - !ruby/object:Gem::Dependency
16
15
  name: httparty
17
- requirement: &2161373500 !ruby/object:Gem::Requirement
16
+ requirement: !ruby/object:Gem::Requirement
18
17
  none: false
19
18
  requirements:
20
19
  - - ~>
@@ -22,10 +21,15 @@ dependencies:
22
21
  version: 0.8.1
23
22
  type: :runtime
24
23
  prerelease: false
25
- version_requirements: *2161373500
24
+ version_requirements: !ruby/object:Gem::Requirement
25
+ none: false
26
+ requirements:
27
+ - - ~>
28
+ - !ruby/object:Gem::Version
29
+ version: 0.8.1
26
30
  - !ruby/object:Gem::Dependency
27
31
  name: hashie
28
- requirement: &2161372960 !ruby/object:Gem::Requirement
32
+ requirement: !ruby/object:Gem::Requirement
29
33
  none: false
30
34
  requirements:
31
35
  - - ~>
@@ -33,10 +37,15 @@ dependencies:
33
37
  version: 1.2.0
34
38
  type: :runtime
35
39
  prerelease: false
36
- version_requirements: *2161372960
40
+ version_requirements: !ruby/object:Gem::Requirement
41
+ none: false
42
+ requirements:
43
+ - - ~>
44
+ - !ruby/object:Gem::Version
45
+ version: 1.2.0
37
46
  - !ruby/object:Gem::Dependency
38
47
  name: rspec
39
- requirement: &2161372500 !ruby/object:Gem::Requirement
48
+ requirement: !ruby/object:Gem::Requirement
40
49
  none: false
41
50
  requirements:
42
51
  - - ! '>='
@@ -44,10 +53,15 @@ dependencies:
44
53
  version: '0'
45
54
  type: :development
46
55
  prerelease: false
47
- version_requirements: *2161372500
56
+ version_requirements: !ruby/object:Gem::Requirement
57
+ none: false
58
+ requirements:
59
+ - - ! '>='
60
+ - !ruby/object:Gem::Version
61
+ version: '0'
48
62
  - !ruby/object:Gem::Dependency
49
63
  name: webmock
50
- requirement: &2161371800 !ruby/object:Gem::Requirement
64
+ requirement: !ruby/object:Gem::Requirement
51
65
  none: false
52
66
  requirements:
53
67
  - - ! '>='
@@ -55,7 +69,12 @@ dependencies:
55
69
  version: '0'
56
70
  type: :development
57
71
  prerelease: false
58
- version_requirements: *2161371800
72
+ version_requirements: !ruby/object:Gem::Requirement
73
+ none: false
74
+ requirements:
75
+ - - ! '>='
76
+ - !ruby/object:Gem::Version
77
+ version: '0'
59
78
  description: A Ruby wrapper for the Big Cartel External REST API
60
79
  email:
61
80
  - matt@tonkapark.com
@@ -64,6 +83,7 @@ extensions: []
64
83
  extra_rdoc_files: []
65
84
  files:
66
85
  - .gitignore
86
+ - .rvmrc
67
87
  - .travis.yml
68
88
  - Gemfile
69
89
  - README.mkd
@@ -77,7 +97,6 @@ files:
77
97
  - spec/fixtures/products.json
78
98
  - spec/fixtures/store.json
79
99
  - spec/helper.rb
80
- has_rdoc: true
81
100
  homepage: http://tonkapark.com
82
101
  licenses: []
83
102
  post_install_message:
@@ -98,7 +117,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
98
117
  version: '0'
99
118
  requirements: []
100
119
  rubyforge_project: bigcartel
101
- rubygems_version: 1.6.2
120
+ rubygems_version: 1.8.25
102
121
  signing_key:
103
122
  specification_version: 3
104
123
  summary: Ruby wrapper for the Big Cartel API