rubyyot-razsell 0.0.3 → 0.0.4

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/VERSION CHANGED
@@ -1 +1 @@
1
- 0.0.3
1
+ 0.0.4
@@ -0,0 +1,13 @@
1
+ Feature: Get Product Lines
2
+ In order to better organize my products
3
+ A user of razsell
4
+ Will ask for a list of product lines
5
+
6
+ Scenario: Getting all product lines for a user
7
+ Given the artist "KungFuTees" on Zazzle
8
+ When I ask for a list of the artists product lines
9
+ Then I should get 3 lines
10
+ And one should be named "Cheeze" with an id of "196854021783912655"
11
+ And one should be named "New Products" with an id of "196596454716712290"
12
+ And one should be named "Smim" with an id of "196983228798280961"
13
+
@@ -0,0 +1,28 @@
1
+
2
+ Given /^the artist "([^\"]*)" on Zazzle$/ do |artist|
3
+ @artist = artist
4
+ @sut = RazsellMixedIn.new
5
+ end
6
+
7
+ When /^I ask for a list of the artists product lines$/ do
8
+ http_service = Razsell::HttpService.new
9
+ http_service.expects(:get).once.returns(feed("productlines"))
10
+
11
+ @product_lines = @sut.product_lines_for(@artist, :http_service => http_service)
12
+ end
13
+
14
+ Then /^I should get 3 lines$/ do
15
+ assert_equal 3, @product_lines.length
16
+ end
17
+
18
+ Then /^one should be named "([^\"]*)" with an id of "([^\"]*)"$/ do |name, id|
19
+ @found = false
20
+
21
+ @product_lines.each do |line|
22
+ if line.id == id && line.name == name
23
+ @found = true
24
+ end
25
+ end
26
+
27
+ assert @found
28
+ end
data/lib/engine.rb CHANGED
@@ -1,4 +1,5 @@
1
1
  require 'http_service'
2
+ require 'product_line_parser'
2
3
 
3
4
  module Razsell
4
5
  class Engine
@@ -18,6 +19,15 @@ module Razsell
18
19
  results
19
20
  end
20
21
 
22
+ def product_lines_for artist
23
+ url = "http://www.zazzle.com/#{artist}?src=razsell"
24
+
25
+ document = @http_service.get url
26
+
27
+ parser = ProductLineParser.new
28
+ parser.parse document
29
+ end
30
+
21
31
  def get_http_service opts
22
32
  opts[:http_service] ? opts[:http_service] : Razsell::HttpService.new
23
33
  end
data/lib/http_service.rb CHANGED
@@ -3,7 +3,13 @@ require 'open-uri'
3
3
  module Razsell
4
4
  class HttpService
5
5
  def get query
6
- open(query.to_url)
6
+ if query.class == String
7
+ url = query
8
+ else
9
+ url = query.to_url
10
+ end
11
+
12
+ open(url)
7
13
  end
8
14
  end
9
15
  end
@@ -0,0 +1,14 @@
1
+ module Razsell
2
+ class ProductLine
3
+ attr_accessor :id, :name
4
+
5
+ def initialize href, name
6
+ @id = strip_id(href)
7
+ @name = name
8
+ end
9
+
10
+ def strip_id href
11
+ href.split("cg=")[1]
12
+ end
13
+ end
14
+ end
@@ -0,0 +1,19 @@
1
+ require 'hpricot'
2
+ require 'product_line'
3
+
4
+ module Razsell
5
+ class ProductLineParser
6
+ def parse document
7
+ return [] unless document
8
+
9
+ elements = get_elements document
10
+ elements.map { |e| Razsell::ProductLine.new(e.attributes['href'] , e.inner_html) }
11
+ end
12
+
13
+ def get_elements document
14
+ doc = Hpricot(document)
15
+
16
+ (doc/"#page_module8/ul/li/a")
17
+ end
18
+ end
19
+ end
data/lib/razsell.rb CHANGED
@@ -9,4 +9,9 @@ module Razsell
9
9
  engine = Razsell::Engine.new opts
10
10
  engine.request(query)
11
11
  end
12
+
13
+ def product_lines_for artist, opts={}
14
+ engine = Razsell::Engine.new opts
15
+ engine.product_lines_for artist
16
+ end
12
17
  end
data/razsell.gemspec CHANGED
@@ -2,11 +2,11 @@
2
2
 
3
3
  Gem::Specification.new do |s|
4
4
  s.name = %q{razsell}
5
- s.version = "0.0.3"
5
+ s.version = "0.0.4"
6
6
 
7
7
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
8
8
  s.authors = ["Jamal Hansen"]
9
- s.date = %q{2009-07-19}
9
+ s.date = %q{2009-08-04}
10
10
  s.email = %q{jamal.hansen@gmail.com}
11
11
  s.extra_rdoc_files = [
12
12
  "LICENSE",
@@ -20,7 +20,9 @@ Gem::Specification.new do |s|
20
20
  "Rakefile",
21
21
  "VERSION",
22
22
  "docs/RSSGuide1.02.pdf",
23
+ "features/product_lines.feature",
23
24
  "features/razsell.feature",
25
+ "features/step_definitions/product_line_steps.rb",
24
26
  "features/step_definitions/razsell_steps.rb",
25
27
  "features/support/env.rb",
26
28
  "features/support/razsell_mixed_in.rb",
@@ -32,6 +34,8 @@ Gem::Specification.new do |s|
32
34
  "lib/engine.rb",
33
35
  "lib/http_service.rb",
34
36
  "lib/item.rb",
37
+ "lib/product_line.rb",
38
+ "lib/product_line_parser.rb",
35
39
  "lib/query.rb",
36
40
  "lib/razsell.rb",
37
41
  "lib/results.rb",
@@ -40,7 +44,9 @@ Gem::Specification.new do |s|
40
44
  "test/fixtures.rb",
41
45
  "test/fixtures/page_1.rss",
42
46
  "test/fixtures/page_2.rss",
47
+ "test/fixtures/productlines.htm",
43
48
  "test/fixtures/rockstar.rss",
49
+ "test/product_line_parser_test.rb",
44
50
  "test/product_types_test.rb",
45
51
  "test/query_test.rb",
46
52
  "test/razsell_test.rb",
@@ -56,6 +62,7 @@ Gem::Specification.new do |s|
56
62
  s.test_files = [
57
63
  "test/engine_test.rb",
58
64
  "test/fixtures.rb",
65
+ "test/product_line_parser_test.rb",
59
66
  "test/results_test.rb",
60
67
  "test/test_helper.rb",
61
68
  "test/product_types_test.rb",
data/test/fixtures.rb CHANGED
@@ -1,6 +1,10 @@
1
1
  module Fixtures
2
2
  def feed name
3
- feed_file = File.open(File.join(File.dirname(__FILE__), 'fixtures', "#{name}.rss"), "r")
3
+ filename = File.join(File.dirname(__FILE__), 'fixtures', "#{name}.rss")
4
+
5
+ filename = File.join(File.dirname(__FILE__), 'fixtures', "#{name}.htm") unless File.exist? filename
6
+
7
+ feed_file = File.open(filename, "r")
4
8
  feed = feed_file.read
5
9
  feed_file.close
6
10
  feed
@@ -0,0 +1,960 @@
1
+
2
+ <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html><head><link rel="stylesheet" type="text/css" href="http://www.zazzle.com/css/default.zss/r-8efc10b5c040aaccebe96a91ecb681c1.css" /><link rel="stylesheet" type="text/css" href="http://www.zazzle.com/css/cn/contributor.zss/r-ac17349fa833e10cf5f465253e36d968.css" /><link rel="stylesheet" type="text/css" href="http://www.zazzle.com/gl/render?ch=kungfutees&amp;psn=css&amp;r=633760233666330000" /><meta content="text/html;charset=utf-8" />
3
+ <script type="text/javascript" src="http://www.zazzle.com/js/logging/omniture/s_code.zjs/r-51.71550/site-zazzle.js"></script>
4
+ <!-- Omniture Header -->
5
+ <script type="text/javascript">var time1=new Date().getTime(); </script>
6
+ <!-- End Omniture Header -->
7
+ <title>Kung Fu Tees: Home: Zazzle.com Store</title>
8
+ <meta name="keywords" content="unique, fresh, family" />
9
+ <meta name="description" content="" />
10
+ <link rel="alternate" type="application/rss+xml" title="Kung Fu Tees - RSS" href="http://feed.zazzle.com/kungfutees/rss" /><link rel="stylesheet" type="text/css" href="http://www.zazzle.com/css/skins/required.zss/r-53d5d3997d00750c2ecbc629f5b551eb.css" /></head><body class="page_home zeroFourOne fuBarred">
11
+
12
+ <script type="text/javascript">
13
+ window.$page_control = {
14
+ widgetClass:'Zazzle.GalleryControl',
15
+ cn:'238249980318654341'
16
+ };
17
+ </script>
18
+ <a class="skiplink" href="#main">Skip to content</a><div id="page" class="contributorPage">
19
+
20
+ <div id="zBar-zBarShell" class="zBarShell">
21
+ <div id="zBar-zBarHeader" class="zBar zBarHeader">
22
+
23
+ <div class="zBarContents">
24
+ <a href="http://www.zazzle.com/" class="zBarLogo">ZAZZLE</a>
25
+ <div id="page-consoleLinks" class="utilitiesShell">
26
+
27
+ <div id="utilityLinksLoggedIn"><strong>Welcome <a href="http://www.zazzle.com/kungfutees" alt="kungfutees' gallery">kungfutees</a>!</strong>
28
+ <span class="welcomeSignout">(<a href="http://www.zazzle.com/lgn/logout?ru=https%3a%2f%2fwww.zazzle.com%2flgn%2flogin&amp;rlru=1" id="page_logoutLink">Not you</a>?)</span> </div>
29
+
30
+ <a target="_top" href="http://www.zazzle.com/co/cart" rel="nofollow">Cart</a>
31
+ &nbsp;|&nbsp;
32
+ <a target="_top" href="http://www.zazzle.com/my/home" rel="nofollow">My Zazzle</a>
33
+ &nbsp;|&nbsp;
34
+ <a target="_top" href="javascript://" onclick="Zazzle.Page.launchPopup({url:'http://zazzle.custhelp.com/cgi-bin/zazzle.cfg/php/enduser/home.php', width:850, height:600, toolbar:true})">Help</a>
35
+
36
+ <a class="headerToggler" id="zBar-expand"></a>
37
+
38
+ </div>
39
+ </div>
40
+
41
+ </div>
42
+
43
+ <div id="zBar-fullHeader" class="fullHeader">
44
+
45
+ <div id="header" class="clearfix">
46
+ <div class="breadcrumb">
47
+
48
+ <!---->
49
+ </div>
50
+ <div id="headerContent" class="clearfix">
51
+
52
+ <a href="http://www.zazzle.com/" id="headerLogo">ZAZZLE</a>
53
+
54
+ <div id="page-consoleLinks" class="utilitiesShell">
55
+
56
+ <div id="utilityLinksLoggedIn"><strong>Welcome <a href="http://www.zazzle.com/kungfutees" alt="kungfutees' gallery">kungfutees</a>!</strong>
57
+ <span class="welcomeSignout">(<a href="http://www.zazzle.com/lgn/logout?ru=https%3a%2f%2fwww.zazzle.com%2flgn%2flogin&amp;rlru=1" id="page_logoutLink">Not you</a>?)</span> </div>
58
+
59
+ <a target="_top" href="http://www.zazzle.com/co/cart" rel="nofollow">Cart</a>
60
+ &nbsp;|&nbsp;
61
+ <a target="_top" href="http://www.zazzle.com/my/home" rel="nofollow">My Zazzle</a>
62
+ &nbsp;|&nbsp;
63
+ <a target="_top" href="javascript://" onclick="Zazzle.Page.launchPopup({url:'http://zazzle.custhelp.com/cgi-bin/zazzle.cfg/php/enduser/home.php', width:850, height:600, toolbar:true})">Help</a>
64
+
65
+ <a class="headerToggler" id="zBar-contract"></a>
66
+
67
+ </div>
68
+
69
+
70
+ <div class="navLinks">
71
+ <div class="navLinkShell">
72
+ <a href="http://www.zazzle.com/shop" class="navLink">SHOP</a>
73
+ <div class="navMenuShell" id="page_categoriesPalette-palette">
74
+ <a href="http://www.zazzle.com/shop" class="navLink">SHOP</a>
75
+ <div class="navMenu">
76
+
77
+ <!-- sub nav drop menu -->
78
+
79
+
80
+ <table>
81
+ <tr>
82
+ <td class="hrVert"><div class="h3">Great Products</div><ul>
83
+ <li><a href="http://www.zazzle.com/tshirts">T-Shirts</a></li>
84
+
85
+ <li><a href="http://www.zazzle.com/mugs">Mugs</a></li>
86
+
87
+ <li><a href="http://www.zazzle.com/posters">Posters</a></li>
88
+ </ul><div style="margin:9px 0;"><a href="http://www.zazzle.com/shop" class="strong">See More</a></div></td><td class="hrVert"><div class="h3">Brands</div><ul>
89
+ <li><a href="http://www.zazzle.com/disney">Disney</a></li>
90
+
91
+ <li><a href="http://www.zazzle.com/starwars">Star Wars</a></li>
92
+
93
+ <li><a href="http://www.zazzle.com/southpark">South Park</a></li>
94
+ </ul><div style="margin:9px 0;"><a href="http://www.zazzle.com/brands" class="strong">See More</a></div></td><td><div class="h3">What's Hot</div><ul>
95
+ <li><a href="http://www.zazzle.com/funny+tshirts">Funny T-shirts</a></li>
96
+
97
+ <li><a href="http://www.zazzle.com/vintage+tshirts">Vintage T-Shirts</a></li>
98
+
99
+ <li><a href="http://www.zazzle.com/wedding+stamps">Wedding Postage</a></li>
100
+ </ul><div style="margin:9px 0;"><a href="http://www.zazzle.com/gifts" class="strong">See More</a></div></td>
101
+ </tr>
102
+ </table>
103
+
104
+
105
+ <!-- end sub nav drop menu -->
106
+
107
+ <img src="http://asset.zcache.com/assets/graphics/s.gif" class="spacer" />
108
+ </div>
109
+ </div>
110
+ </div>
111
+ <a id="page_categoriesPalette_selector" class="dropLink"><img src="http://asset.zcache.com/assets/graphics/z2/skins/default/dropLink_v3.gif" /></a>
112
+
113
+ <div class="navLinkShell">
114
+ <a href="http://www.zazzle.com/create" class="navLink">CREATE</a>
115
+ <div class="navMenuShell" id="page_createPalette-palette">
116
+ <a href="http://www.zazzle.com/create" class="navLink">CREATE</a>
117
+ <div class="navMenu">
118
+
119
+ <!-- sub nav drop menu -->
120
+
121
+
122
+ <table>
123
+ <tr>
124
+ <td class="hrVert"><ol>
125
+ <li><a href="http://www.zazzle.com/custom/tshirts">Custom T-Shirts</a></li>
126
+
127
+ <li><a href="http://www.zazzle.com/custom/embroidery">Embroidery</a></li>
128
+
129
+ <li><a href="http://www.zazzle.com/custom/pet/clothing">Pet Clothing</a><span class="new"> - New!</span></li>
130
+
131
+ <li><a href="http://www.zazzle.com/custom/stamps">Zazzle Custom Stamps</a></li>
132
+
133
+ <li><a href="http://www.zazzle.com/custom/skateboards" rel="nofollow">Skateboards</a></li>
134
+
135
+ <li><a href="http://www.zazzle.com/custom/shoes">Custom Shoes</a></li>
136
+
137
+ <li><a href="http://www.zazzle.com/custom/profilecards">Profile Cards</a></li>
138
+
139
+ <li><a href="http://www.zazzle.com/businesscards">Business Cards</a></li>
140
+
141
+ <li><a href="http://www.zazzle.com/custom/posters">Prints &amp; Posters</a></li>
142
+
143
+ <li><a href="http://www.zazzle.com/custom/greetingcards">Greeting Cards</a></li>
144
+
145
+ <li><a href="http://www.zazzle.com/custom/mugs">Mugs</a></li>
146
+
147
+ <li><a href="http://www.zazzle.com/custom/calendars">Calendars</a></li>
148
+
149
+ <li><a href="http://www.zazzle.com/custom/mousepads">Mousepads</a></li>
150
+
151
+ <li><a href="http://www.zazzle.com/custom/buttons">Buttons</a></li>
152
+
153
+ <li><a href="http://www.zazzle.com/custom/magnets">Magnets</a></li>
154
+
155
+ <li><a href="http://www.zazzle.com/custom/bumperstickers">Bumper Stickers</a></li>
156
+
157
+ <li><a href="http://www.zazzle.com/custom/postcards">Postcards</a></li>
158
+ </ol><div style="margin:9px 0;"><a href="http://www.zazzle.com/create" class="strong">See More</a></div></td><td><ul>
159
+ <li><a href="http://www.zazzle.com/my/images" rel="nofollow">My Images</a></li>
160
+
161
+ <li><a href="http://www.zazzle.com/my/images?upload=true" rel="nofollow">Upload images</a></li>
162
+
163
+ <li><a href="http://www.zazzle.com/my/products/private" rel="nofollow">Saved products &amp; designs</a></li>
164
+
165
+ <li><a href="http://www.zazzle.com/cn/learnmore" rel="nofollow">Open your store</a></li>
166
+
167
+ <li><a href="http://www.zazzle.com/custom/guidefiles" rel="nofollow">Guide Files</a></li>
168
+
169
+ <li><a href="http://www.zazzle.com/custom/imageguidelines" rel="nofollow">Image Guidelines</a></li>
170
+ </ul></td>
171
+ </tr>
172
+ </table>
173
+
174
+
175
+ <!-- end sub nav drop menu -->
176
+
177
+ <img src="http://asset.zcache.com/assets/graphics/s.gif" class="spacer" />
178
+ </div>
179
+ </div>
180
+ </div>
181
+ <a id="page_createPalette_selector" class="dropLink"><img src="http://asset.zcache.com/assets/graphics/z2/skins/default/dropLink_v3.gif" /></a>
182
+ <div class="navLinkShell"><!--This empty div is needed for ie6 disappearing icon bug--></div>
183
+
184
+ <div class="navLinkShell">
185
+ <a rel="nofollow" href="http://www.zazzle.com/sell" class="navLink">SELL</a>
186
+ <div class="navMenuShell" id="page_whatsHotPalette-palette">
187
+ <a href="http://www.zazzle.com/sell" class="navLink">SELL</a>
188
+ <div class="navMenu">
189
+
190
+ <!-- sub nav drop menu -->
191
+
192
+
193
+ <table>
194
+ <tr>
195
+ <td><div class="h3">Make Money</div><ul>
196
+ <li><a href="http://www.zazzle.com/sell/link" rel="nofollow">Link and Get Paid</a></li>
197
+
198
+ <li><a href="http://www.zazzle.com/sell/incentive/overview" rel="nofollow">Seller Incentive Program</a></li>
199
+
200
+ <li><a href="http://www.zazzle.com/sell/products/postproductsforsale" rel="nofollow">Post a Product for Sale</a></li>
201
+
202
+ <li><a href="http://www.zazzle.com/sell/gallery/create" rel="nofollow">Create a Store</a></li>
203
+
204
+ <li><a href="http://www.zazzle.com/sell/gallery/merchandisingbasic" rel="nofollow">Merchandising</a></li>
205
+
206
+ <li><a href="http://www.zazzle.com/sell/promotion/promotionbasic" rel="nofollow">Promotion</a></li>
207
+
208
+ <li><a href="http://www.zazzle.com/sell/tools/seller" rel="nofollow">Tools</a></li>
209
+ </ul><div style="margin:9px 0;"><a href="http://www.zazzle.com/sell" class="strong">See More</a></div></td>
210
+ </tr>
211
+ </table>
212
+
213
+
214
+ <!-- end sub nav drop menu -->
215
+
216
+ <img src="http://asset.zcache.com/assets/graphics/s.gif" class="spacer" />
217
+ </div>
218
+ </div>
219
+ </div>
220
+ <a id="page_whatsHotPalette_selector" class="dropLink"><img src="http://asset.zcache.com/assets/graphics/z2/skins/default/dropLink_v3.gif" /></a>
221
+
222
+ <div class="navLinkShell">
223
+ <a href="http://www.zazzle.com/community" class="navLink">COMMUNITY</a>
224
+ <div class="navMenuShell" id="page_participatePalette-palette">
225
+ <a href="http://www.zazzle.com/community" class="navLink">COMMUNITY</a>
226
+ <div class="navMenu">
227
+
228
+ <!-- sub nav drop menu -->
229
+
230
+
231
+ <table>
232
+ <tr>
233
+ <td><ul>
234
+ <li><a href="http://blog.zazzle.com" rel="nofollow">Blog</a></li>
235
+
236
+ <li><a href="http://sellerblog.zazzle.com" rel="nofollow">Seller Blog</a></li>
237
+
238
+ <li><a href="http://university.zazzle.com" rel="nofollow">Zazzle University</a></li>
239
+
240
+ <li><a href="http://www.twitter.com/zazzle" rel="nofollow">Zazzle on Twitter</a></li>
241
+
242
+ <li><a href="http://www.facebook.com/zazzle" rel="nofollow">Zazzle on Facebook</a></li>
243
+
244
+ <li><a href="http://forum.zazzle.com" rel="nofollow">Forums</a></li>
245
+ </ul></td>
246
+ </tr>
247
+ </table>
248
+
249
+
250
+ <!-- end sub nav drop menu -->
251
+
252
+ <img src="http://asset.zcache.com/assets/graphics/s.gif" class="spacer" />
253
+ </div>
254
+ </div>
255
+ </div>
256
+ <a id="page_participatePalette_selector" class="dropLink"><img src="http://asset.zcache.com/assets/graphics/z2/skins/default/dropLink_v3.gif" /></a>
257
+
258
+ </div>
259
+
260
+ </div>
261
+ <div id="headerSearchBar">
262
+
263
+ <form name="headerGlobalSearchForm" id="page_globalSearch-form" accept-charset="UTF-8" onsubmit="return false;">
264
+ <div class="findConsole">
265
+
266
+ <input type="text" id="page_globalSearch-queryInput" class="" name="qs" value="" size="40" maxlength="255" />
267
+ <select name="pt" id="page_globalSearch-productTypes" class="productTypeDroplist">
268
+ <option value="0">All Products</option><option value="235">T-Shirts</option><option value="172">Postage</option><option value="137">Cards</option><option value="168">Mugs</option><option value="158">Calendars</option><option value="240">Profile Cards</option><option value="167">Keds Shoes</option><option value="155">Pet Clothing</option><option value="154">Aprons</option><option value="149">Bags</option><option value="128">Bumper Stickers</option><option value="145">Buttons</option><option value="232">Embroidered Bags</option><option value="233">Embroidered Hats</option><option value="231">Embroidered Shirts</option><option value="148">Hats</option><option value="146">Keychains</option><option value="147">Magnets</option><option value="144">Mousepads</option><option value="153">Photo Sculptures</option><option value="239">Postcards</option><option value="228">Posters</option><option value="186">Skateboards</option><option value="217">Stickers</option><option value="151">Ties</option></select>
269
+
270
+ <button id="page_globalSearch_searchButton" type="button" class="inline" title="" value="Search"><span class="buttonLeft"><span class="buttonRight">Search</span></span></button>
271
+
272
+ </div>
273
+ </form>
274
+ </div>
275
+ <script type="text/javascript">
276
+ window.$page_globalSearch = {
277
+ emptyLabel:'Search 18,506,633,275 customizable products'
278
+ };
279
+ </script>
280
+ <div id="headerPromoBar">
281
+ <style type="text/css">
282
+ #backgroundpromo {
283
+ background: #FFFB9C;
284
+ font-size:15px !important;
285
+ color:#000 !important;
286
+ position:relative;
287
+ font-weight:bold;
288
+ text-align:center;
289
+ }
290
+ .emph{
291
+ color:#d41a27;
292
+ font-size:16px;
293
+ }
294
+ #backgroundpromo a.details {
295
+ font-size:11px;
296
+ font-weight:normal;
297
+ }
298
+ .useCode{
299
+ font-size:12px;
300
+ }
301
+ #backgroundpromo a.smallLink {
302
+ font-size:12px;
303
+ }
304
+ #backgroundpromo a.largeLink {
305
+ font-size:14px;
306
+ }
307
+ </style>
308
+ <div id="backgroundpromo">
309
+ Back to School Sale - Week 1&nbsp;&nbsp;&nbsp;<span class="emph">40% off</span> <a href="http://www.zazzle.com/skateboards" rel="nofollow">skateboards</a>, <span class="emph">20% off</span> <a href="http://www.zazzle.com/bags" rel="nofollow">bags</a>, and <span class="emph">10% off</span> <a href="http://www.zazzle.com/mugs" rel="nofollow">mugs</a>! &nbsp;&nbsp;&nbsp;<span class="useCode">Use Code: BTS40OFFSALE </span> <a onclick="Zazzle.Page.launchPopup({url:'http://zazzle.custhelp.com/app/answers/detail/a_id/430#BTS40OFFSALE', width:850, height:600, toolbar:true})" href="javascript://" target="_top" rel="nofollow" class="details">(details)</a>
310
+ </div><!--This empty div is needed for ie6 disappearing icon bug--></div>
311
+
312
+ </div>
313
+
314
+ </div>
315
+
316
+ </div>
317
+
318
+ <style type="text/css">
319
+ .zBarShell .zBarHeader {
320
+ display:none;
321
+ }
322
+ .zBarShell .fullHeader {
323
+ display:block;
324
+ }
325
+ .zBarFooterShell .zBarFooter {
326
+ display:none;
327
+ }
328
+ .zBarFooterShell .fullFooter {
329
+ display:block;
330
+ }
331
+ .zBarFooterShell .legal{
332
+ padding-left:18px;
333
+ font-size:.8em;
334
+ width:400px;
335
+ float:left;
336
+ }
337
+ .zBarFooterShell .ppLegal {
338
+ padding-top:13px;
339
+ }
340
+ .zBarFooterShell .securityBadges {
341
+ width:460px;
342
+ float:right;
343
+ padding-top:9px;
344
+ }
345
+ .zBarFooterShell .securityBadges a {
346
+ margin-left:50px;
347
+ }
348
+ </style>
349
+
350
+
351
+ <script type="text/javascript">
352
+ window.$page_zBar = {
353
+ widgetClass:'Zazzle.ZBar',
354
+ idPrefix:'zBar'
355
+ }
356
+ </script><div id="mainShell"><div id="pageMantle"><a id="pageMantleLink" href="http://www.zazzle.com/kungfutees"><span class="pageMantleSpacer"></span></a></div><div id="pageHeader"></div><div id="main" class="clearfix"><div id="group_1"></div><div id="group_2" class="contentPane">
357
+ <h1>Kung Fu Tees<span class="categoryManageActions inlineActionLink"><a href="http://www.zazzle.com/my/gallery/settings">Manage my store</a></span></h1>
358
+
359
+
360
+ <table>
361
+ <tr>
362
+ <td valign="top">
363
+
364
+ </td>
365
+ <td valign="top">
366
+ <div class="description">
367
+
368
+ </div>
369
+ </td>
370
+ </tr>
371
+ </table>
372
+ <h2>Popular Products</h2>
373
+
374
+ <div class="gridControls">
375
+ <a href="http://www.zazzle.com/kungfutees/products">View all products</a>
376
+ </div>
377
+
378
+ <div id="page_module2-items" class="gridShell threeBy">
379
+
380
+ <div class="gridCell " id="page_module2_assetCell1">
381
+ <div style="position:relative" class="clearfix">
382
+ <a href="http://www.zazzle.com/rockstar_coder_tshirt-235670521587248636?gl=kungfutees" id="page_module2_assetCell1-imageLink" class="realviewLink"><img id="page_module2_assetCell1-preview" src="http://rlv.zcache.com/rockstar_coder_tshirt-p235670521587248636cxhe_210.jpg" alt="Rockstar Coder t-shirts" title="Rockstar Coder t-shirts by kungfutees" class="realviewImage" /></a>
383
+ <div id="page_module2_assetCell1-productTypeIcon" class="shirtIcon"></div>
384
+ <a href="javascript://" id="page_module2_assetCell1-nextviewLink" class="nextviewLink"></a>
385
+ </div>
386
+ <div class="gridCellInfo" id="page_module2_assetCell1-info">
387
+ <a href="http://www.zazzle.com/rockstar_coder_tshirt-235670521587248636?gl=kungfutees" id="page_module2_assetCell1-title" class="productTitle" title="Rockstar Coder">Rockstar Coder</a><br />
388
+ <span class="byLine">by <a href="http://www.zazzle.com/kungfutees" id="page_module2_assetCell1-contributorLink" rel="nofollow">kungfutees</a><br /></span>
389
+ <span class="extraInfo">
390
+ <br />
391
+
392
+ </span>
393
+ </div>
394
+ </div>
395
+ <div class="gridCell " id="page_module2_assetCell2">
396
+ <div style="position:relative" class="clearfix">
397
+ <a href="http://www.zazzle.com/rockstar_coder_mug-168427986526885635?gl=kungfutees" id="page_module2_assetCell2-imageLink" class="realviewLink"><img id="page_module2_assetCell2-preview" src="http://rlv.zcache.com/rockstar_coder_mug-p168427986526885635tda5_210.jpg" alt="Rockstar Coder Mug" title="Rockstar Coder Mug by kungfutees" class="realviewImage" /></a>
398
+ <div id="page_module2_assetCell2-productTypeIcon" class="mugIcon"></div>
399
+ <a href="javascript://" id="page_module2_assetCell2-nextviewLink" class="nextviewLink"></a>
400
+ </div>
401
+ <div class="gridCellInfo" id="page_module2_assetCell2-info">
402
+ <a href="http://www.zazzle.com/rockstar_coder_mug-168427986526885635?gl=kungfutees" id="page_module2_assetCell2-title" class="productTitle" title="Rockstar Coder Mug">Rockstar Coder Mug</a><br />
403
+ <span class="byLine">by <a href="http://www.zazzle.com/kungfutees" id="page_module2_assetCell2-contributorLink" rel="nofollow">kungfutees</a><br /></span>
404
+ <span class="extraInfo">
405
+ <br />
406
+
407
+ </span>
408
+ </div>
409
+ </div>
410
+ <div class="gridCell " id="page_module2_assetCell3">
411
+ <div style="position:relative" class="clearfix">
412
+ <a href="http://www.zazzle.com/ladies_rockstar_tshirt-235898004129790991?gl=kungfutees" id="page_module2_assetCell3-imageLink" class="realviewLink"><img id="page_module2_assetCell3-preview" src="http://rlv.zcache.com/ladies_rockstar_tshirt-p235898004129790991ojnq_210.jpg" alt="Ladies Rockstar TShirt" title="Ladies Rockstar TShirt by kungfutees" class="realviewImage" /></a>
413
+ <div id="page_module2_assetCell3-productTypeIcon" class="shirtIcon"></div>
414
+ <a href="javascript://" id="page_module2_assetCell3-nextviewLink" class="nextviewLink"></a>
415
+ </div>
416
+ <div class="gridCellInfo" id="page_module2_assetCell3-info">
417
+ <a href="http://www.zazzle.com/ladies_rockstar_tshirt-235898004129790991?gl=kungfutees" id="page_module2_assetCell3-title" class="productTitle" title="Ladies Rockstar TShirt">Ladies Rockstar TShirt</a><br />
418
+ <span class="byLine">by <a href="http://www.zazzle.com/kungfutees" id="page_module2_assetCell3-contributorLink" rel="nofollow">kungfutees</a><br /></span>
419
+ <span class="extraInfo">
420
+ <br />
421
+
422
+ </span>
423
+ </div>
424
+ </div>
425
+ </div>
426
+
427
+ <div class="gridControls">
428
+ <a href="http://www.zazzle.com/kungfutees/products">View all products</a>
429
+ </div>
430
+
431
+ <script type="text/javascript">
432
+ if( typeof $page == 'undefined') $page = {};
433
+ $page.title = "Popular Products";
434
+ $page.feedId = "popularity";
435
+ window.$page_module2 = {
436
+ widgetClass:'Zazzle.ProductsGrid',
437
+ items:[{pid:'235670521587248636',pdt:'shirt',id:'assetCell1'},{pid:'168427986526885635',pdt:'mug',id:'assetCell2',views:'90'},{pid:'235898004129790991',pdt:'shirt',id:'assetCell3'}],
438
+ dragToReorder:true,
439
+ localized:{
440
+ draggingToReorderSingular:"Moving one item.",
441
+ draggingToReorderPlural:"Moving {totalItems} items.",
442
+ removeItemConfirmation:"Are you sure you would like to remove this item from your Featured Products?",
443
+ removeItemsConfirmation:"Are you sure you would like to remove the {0} selected items from your Featured Products?",
444
+ seeStitch:"see the stitching animation",
445
+ clickToView:"Click to view ",
446
+ viewFront:"front",
447
+ viewBack:"back",
448
+ viewFrontRight:"front-right",
449
+ viewLeft:"left",
450
+ viewRight:"right",
451
+ viewFrontLeft:"front-left",
452
+ viewFrontLeft:"front-left",
453
+ viewCover:"cover",
454
+ viewMonth:"month {0} of {1}",
455
+ viewInsideTop:"inside top",
456
+ viewInsideBottom:"inside bottom",
457
+ viewInsideLeft:"inside left",
458
+ viewInsideRight:"inside right",
459
+ viewCenter:"center",
460
+ viewUpper:"upper",
461
+ viewOutsideQuarter:"outside quarter",
462
+ viewOutsideFront:"outside front",
463
+ viewTongue:"tongue",
464
+ viewInsideFront:"inside front",
465
+ viewInsideQuarter:"inside quarter",
466
+ viewHeel:"heel"
467
+ }
468
+ };
469
+ </script>
470
+ <div style="clear:both"></div>
471
+
472
+ <h3>
473
+ Comment Wall <span class="subText">(showing <span id="page_module3-numCommentsShown">0</span> of <span id="page_module3-numComments">0</span>)</span>
474
+
475
+
476
+ <span class="inlineActionLink">
477
+ (<a id="page_module3-addone" href="javascript://">Add a comment</a>
478
+ <span id="page_module3-seeAllComments" style="display:none">| <a href="javascript://">See all</a></span>)
479
+ </span>
480
+ </h3>
481
+
482
+
483
+ <div class="tabShell clearfix">
484
+ <div class="tabLinksShell">
485
+ <a href="javascript://" id="page_module3_tabs_option0" title="View store comments&#xD;&#xA;&#xD;&#xA;" class="Active">On Store Wall
486
+
487
+ </a>
488
+ <a href="javascript://" id="page_module3_tabs_option1" title="View comments on kungfutees's products&#xD;&#xA;&#xD;&#xA;">On Products
489
+
490
+ </a>
491
+ <a href="javascript://" id="page_module3_tabs_option2" title="View comments made by kungfutees&#xD;&#xA;&#xD;&#xA;">Made by kungfutees
492
+
493
+ </a>
494
+ </div>
495
+ </div>
496
+
497
+
498
+ <a id="page_module3-commentAnchor" href="#"></a>
499
+
500
+ <div class="allComments">
501
+ <div id="page_module3_tabs-option0TabBody" class="box">
502
+ <div id="page_module3_comments">
503
+ Be the first to comment on this store!
504
+
505
+ </div>
506
+ </div>
507
+ <div id="page_module3_tabs-option1TabBody" class="podTabInactive">
508
+ <div id="page_module3_onProducts">
509
+ Be the first to comment on this store!
510
+ </div>
511
+ </div>
512
+ <div id="page_module3_tabs-option2TabBody" class="podTabInactive">
513
+ <div id="page_module3_byMember">
514
+ Be the first to comment on this store!
515
+ </div>
516
+ </div>
517
+ <script id="page_module3-commentTemplate" type="text/jst">
518
+ <![CDATA[
519
+ [%
520
+ var comments = input.comments;
521
+
522
+ for (var commentNo = 0; commentNo < comments.length; commentNo++) {
523
+ var
524
+ comment = comments[commentNo],
525
+ commentIdPrefix = comment.idPrefix
526
+ ;
527
+ %]
528
+ <div id="[%= commentIdPrefix %]Shell" class="commentsShell">
529
+ [% if (comment.canDelete) { %]
530
+ <a id="[%= commentIdPrefix %]Remove" class="removeCommentButton" href="javascript://">(delete)</a>
531
+ [% } %]
532
+ <span class="byLine">
533
+ <a href='[%= comment.commenter.url %]' rel='nofollow'>[%= comment.commenter.handle %]</a> said [%= comment.created %]
534
+ [% if (comment.title) { %]
535
+ <span>about <a href='[%= comment.productUrl %]'>[%= comment.title %]</a></span>
536
+ [% } %]
537
+ </span>
538
+ <div style="height:5px;position:relative;overflow:hidden;">&nbsp;</div>
539
+
540
+ <a href="[%= comment.commenter.url %]" rel="nofollow"><img class="authorIcon" src="[%= comment.commenter.iconUrl %]"/></a>
541
+ <div class="commentContent">
542
+ <div><strong>[%= comment.commentSubject %]</strong></div>
543
+ [%= comment.commentContent %]
544
+ </div>
545
+ <div class="uploadedImage">
546
+ [%
547
+ for (var imageNo = 0; imageNo < comment.images.length; imageNo++) {
548
+ var
549
+ image = comment.images[imageNo],
550
+ imageUrlPrefix = Uize.Url.resolve(
551
+ 'http://www.zazzle.com/rlv/isapi/designall.dll?action=getimage&amp;bg=0xFFFFFF',
552
+ { id:image.imageId }
553
+ )
554
+ ;
555
+ %]
556
+ <a href="[%= imageUrlPrefix %]&amp;max_dim=900"><img id="[%= commentIdPrefix %]ImageThumb" src="[%= imageUrlPrefix %]&amp;max_dim=150" class="commentImageThumb"/></a>
557
+ [% if (comment.images.length) { %]<br /><br />[% } %]
558
+ [%
559
+ }
560
+ %]
561
+ </div>
562
+ <div class="hr"></div>
563
+ </div>
564
+ [%
565
+ }
566
+ %]
567
+ ]]>
568
+ </script>
569
+ </div>
570
+
571
+ <a id="page_module3-addCommentAnchor" href="#"></a>
572
+ <div class="box addCommentShell">
573
+ <table class="formTable">
574
+ <tr><td colspan="2"><h3>Add a comment</h3></td></tr>
575
+ <tr>
576
+ <td class="labelCell"><label for="page_module3-addCommentSubject">Subject:</label></td>
577
+ <td class="inputCell">
578
+ <input type="text" id="page_module3-addCommentSubject" class="" name="subject" value="" maxlength="100" /></td>
579
+ </tr>
580
+ <tr>
581
+ <td class="labelCell"><label for="page_module3-addCommentMessage">Message:</label></td>
582
+ <td class="inputCell">
583
+
584
+ <textarea id="page_module3-addCommentMessage" class="" name="message"></textarea>
585
+ <br />
586
+ <a rel="nofollow" href="http://zazzle.custhelp.com/app/answers/detail/a_id/413" onclick="Zazzle.Page.launchPopup({url:'http://zazzle.custhelp.com/app/answers/detail/a_id/413',width:825,height:600,scrollbars:true});return false;" class="inlineHelpLink">(What HTML is acceptable here?)</a>
587
+ </td>
588
+ </tr>
589
+ <tr><td colspan="2"><h3>
590
+ Add a picture of yourself with a product from this store (optional)
591
+
592
+ </h3>
593
+ <a id="page_module3-addCommentImages" href="javascript://">Add product images
594
+
595
+ </a>
596
+ <div id="page_module3-addedCommentImages" class="addedCommentImages"></div>
597
+ <script id="page_module3-addedCommentImageTemplate" type="text/jst">
598
+ <![CDATA[
599
+ <img src="[% .imageUrl %]" alt="[% .imageTitle.replace('"','&quot;') %] />
600
+ ]]>
601
+ </script>
602
+
603
+ </td></tr>
604
+ <tr><td colspan="2"><div class="addCommentButtonBar buttonDiv">
605
+ <button id="page_module3_addComment" type="button" class="" title="Post your comment" value="Post your comment"><span class="buttonLeft"><span id="page_module3_addComment-text" class="buttonRight">Post your comment</span></span></button>
606
+ </div>
607
+ </td></tr>
608
+ </table>
609
+ </div>
610
+ <script type="text/javascript">
611
+ <!--
612
+ window.$page_module3 = {widgetClass:'Zazzle.CommentWall',contributorId:'238249980318654341',defaultPageSize:20,imageBgColor:'0xFFFFFF',localized:{addError:'You must enter a subject, message or upload an image.',addError2:'Your comment was unable to be added.',removeMessage:'Are you sure you want to delete this comment? This cannot be undone.',removeError:'The comment was not deleted.'}};
613
+ //-->
614
+ </script></div><div id="group_3"><div class="sidePod">
615
+ <div id="page_module4" class="memberInfo">
616
+ <div class="contributorHandleShell clearfix">
617
+ <a href="http://www.zazzle.com/kungfutees"><img src="http://asset.zcache.com/assets/graphics/icons/contributor/genericUserIcon.gif" class="galleryIcon" alt="" /></a>
618
+ <div class="contributorHandle">
619
+ <h3><a href="http://www.zazzle.com/kungfutees">kungfutees</a></h3>
620
+
621
+ </div>
622
+ </div>
623
+ <div class="listBox clearfix">
624
+ <ul class="major"><li><a href="http://www.zazzle.com/kungfutees">Home</a></li><li><a href="http://www.zazzle.com/kungfutees/gifts">Products</a></li><li><a href="http://www.zazzle.com/kungfutees/about" rel="nofollow">About</a></li><li><a href="http://www.zazzle.com/kungfutees/myfanclub" rel="nofollow">Fan Club</a></li><li><a href="http://www.zazzle.com/kungfutees/fanclubs" rel="nofollow">Favorite Stores</a></li><li><a href="http://www.zazzle.com/kungfutees/promote" rel="nofollow">Promote This Store</a></li></ul>
625
+ </div>
626
+ <div class="hr"></div>
627
+ <div class="listBox clearfix">
628
+ <ul class="clearfix">
629
+ <li><a href="http://www.zazzle.com/pd/giftcertificates?mh=kungfutees" rel="nofollow">Buy Gift Certificate</a></li>
630
+
631
+ <li><a href="javascript://" id="page_control-EmailButton">Send to a Friend</a></li>
632
+
633
+ <li><a href="javascript://" id="page_control-ContactButton">Send Message</a></li>
634
+
635
+ <li><a href="javascript://" id="page_control-JoinButton">Join Fan Club!</a></li>
636
+
637
+ </ul>
638
+ </div>
639
+ </div>
640
+ <div>
641
+ <div class="hr"></div>
642
+ <h3>Store stats</h3>
643
+ <div class="listBox">
644
+ <ul>
645
+ <li>0 visits today</li>
646
+ <li>15 visits all time</li>
647
+ </ul>
648
+ </div>
649
+ </div>
650
+
651
+
652
+ <div id="page_module6">
653
+ <div class="hr"></div>
654
+ <h3>Products <a class="inlineActionLink" href="http://www.zazzle.com/kungfutees/gifts">(View all)</a></h3>
655
+ <div class="clearfix">
656
+ <form action="http://www.zazzle.com/kungfutees/gifts">
657
+ <div>
658
+ <input type="text" id="page_module6-queryInput" name="qs" value="" size="14" /><button type="submit" class="inline"><span class="buttonLeft"><span class="buttonRight">Go</span></span></button>
659
+ </div>
660
+ </form>
661
+ </div>
662
+ </div>
663
+ <script type="text/javascript">
664
+ window.$page_module6 = {
665
+ widgetClass:'Zazzle.SearchInput',
666
+ emptyLabel:""
667
+ }
668
+ </script>
669
+ <div>
670
+ <div class="hr"></div>
671
+ <h3>Product Lines</h3>
672
+ <div id="page_module8" class="listBox">
673
+
674
+ <ul><li><a href="http://www.zazzle.com/kungfutees/gifts?cg=196854021783912655">Cheeze</a></li><li><a href="http://www.zazzle.com/kungfutees/gifts?cg=196596454716712290">New Products</a></li><li><a href="http://www.zazzle.com/kungfutees/gifts?cg=196983228798280961">Smim</a></li></ul>
675
+
676
+ </div>
677
+ </div>
678
+
679
+ <div id="page_module9">
680
+ <div class="hr"></div>
681
+
682
+ <h3>Product Types</h3>
683
+
684
+ <div class="listBox clearfix">
685
+ <ul>
686
+ <li><a href="http://www.zazzle.com/kungfutees/gifts">All Products</a></li>
687
+
688
+ <li><a href="http://www.zazzle.com/kungfutees/tshirts">T-Shirts</a></li>
689
+
690
+ <li><a href="http://www.zazzle.com/kungfutees/mugs">Mugs</a></li>
691
+
692
+ </ul>
693
+ </div>
694
+ </div>
695
+
696
+ <script type="text/javascript">
697
+ window.$page_module9 = {
698
+ widgetClass:'Zazzle.ProductTypes'
699
+ };
700
+ </script>
701
+ <div id="page_module10">
702
+ <div class="hr"></div>
703
+ <h3>Tags</h3>
704
+ <div class="description">
705
+
706
+ <a href="http://www.zazzle.com/kungfutees/coder+gifts" style="font-size:14px;">coder</a>
707
+
708
+ <a href="http://www.zazzle.com/kungfutees/on+gifts" style="font-size:14px;">on</a>
709
+
710
+ <a href="http://www.zazzle.com/kungfutees/rails+gifts" style="font-size:14px;">rails</a>
711
+
712
+ <a href="http://www.zazzle.com/kungfutees/rockstar+gifts" style="font-size:14px;">rockstar</a>
713
+
714
+ <a href="http://www.zazzle.com/kungfutees/ror+gifts" style="font-size:11px;">ror</a>
715
+
716
+ <a href="http://www.zazzle.com/kungfutees/ruby+gifts" style="font-size:17px;">ruby</a>
717
+
718
+ </div>
719
+ </div></div></div></div><!-- end main --></div><!-- end mainShell --><div class="clearBoth"></div>
720
+ <div id="zBar-zBarFooterShell" class="zBarFooterShell">
721
+ <div class="zBarFooter" id="zBar-zBarFooter">
722
+
723
+ <div class="zBarContents">
724
+ <div class="legal">
725
+ Use of this Web site constitutes acceptance of the
726
+ <a target="_top" href="http://www.zazzle.com/mk/policy/user_agreement" rel="nofollow">User Agreement</a> and
727
+ <a target="_top" href="http://www.zazzle.com/mk/policy/privacy_policy" rel="nofollow">Privacy Policy</a><br />
728
+ Copyright &copy; 2000-2009, Zazzle.com, Inc. All rights reserved.
729
+ </div>
730
+
731
+ <div class="securityBadges">
732
+ <a target="_top" href="javascript://" onclick="Zazzle.Page.launchPopup({url:'http://www.etrust.org/cert/879309.html', width:800, height:600, toolbar:false})" style="margin-left:0;" rel="nofollow" class="securityetrust"></a>
733
+ <a target="_top" href="javascript://" onclick="Zazzle.Page.launchPopup({url:'https://www.bbb.org/online/consumer/cks.aspx?id=10403098302640409', width:825, height:510, toolbar:false})" rel="nofollow"><img src="http://asset.zcache.com/assets/graphics/z2/securityBadges/bbb.gif" alt="Click to verify BBB accreditation and to see a BBB report." /></a>
734
+ <a target="_top" href="javascript://" onclick="Zazzle.Page.launchPopup({url:'https://www.paypal.com/us/cgi-bin/webscr?cmd=xpt/cps/popup/OLCWhatIsPayPal-outside', width:600, height:400, toolbar:false})" rel="nofollow"><img src="http://asset.zcache.com/assets/graphics/z2/securityBadges/paypal.gif" /></a>
735
+ <a target="_top" href="javascript://" onclick="Zazzle.Page.launchPopup({url:'https://seal.verisign.com/splash?form_file=fdf/splash.fdf&amp;dn=www.zazzle.com&amp;lang=en', width:550, height:450, toolbar:false})" rel="nofollow" class="verisign"></a>
736
+ </div>
737
+
738
+ </div>
739
+
740
+ </div>
741
+
742
+ <div id="zBar-fullFooter" class="fullFooter">
743
+
744
+ <div id="footer">
745
+ <div id="footerContent">
746
+
747
+
748
+
749
+
750
+ <div class="footerMain">
751
+ <div class="h3">Zazzle - We make quality custom products designed by you. Learn <a target="_top" href="http://www.zazzle.com/mk/welcome/first/aboutus" rel="nofollow">how we do it</a></div>
752
+
753
+ <p>
754
+ <a target="_top" href="http://www.zazzle.com/sts/home" rel="nofollow">Track My Order</a> |
755
+ <a target="_top" href="http://www.zazzle.com/mk/welcome/first/contactus" rel="nofollow">Contact Us</a> |
756
+ <a target="_top" href="http://www.zazzle.com/shop">Browse categories</a> |
757
+ <a target="_top" href="http://www.zazzle.com/create">Create products</a> |
758
+ <a target="_top" href="http://blog.zazzle.com">Blog</a> |
759
+ <a target="_top" href="http://www.zazzle.com/mk/welcome/sitemap" rel="nofollow">Sitemap</a>, <a target="_top" href="http://www.zazzle.com/pd/tags">tags</a>, <a target="_top" href="http://www.zazzle.com/pd/new">products</a>
760
+ <br />
761
+ <a target="_top" href="http://www.zazzle.com/" style="text-decoration:none;"><img src="http://asset.zcache.com/assets/graphics/z2/icons/usa.gif" alt="United States" /></a> <a target="_top" href="http://www.zazzle.com/">United States</a>&nbsp; |&nbsp;
762
+ <a target="_top" href="http://www.zazzle.co.uk/" style="text-decoration:none;"><img src="http://asset.zcache.com/assets/graphics/z2/icons/uk.gif" alt="United Kingdom" /></a> <a target="_top" href="http://www.zazzle.co.uk/">United Kingdom</a>
763
+ &nbsp;|&nbsp;
764
+ <a target="_top" href="http://www.zazzle.ca/" style="text-decoration:none;"><img src="http://asset.zcache.com/assets/graphics/z2/icons/canada.gif" alt="Canada" /></a> <a target="_top" href="http://www.zazzle.ca/">Canada</a>&nbsp; |&nbsp;
765
+ <a target="_top" href="http://www.zazzle.com.au/" style="text-decoration:none;"><img src="http://asset.zcache.com/assets/graphics/z2/icons/australia.gif" alt="Australia" /></a> <a target="_top" href="http://www.zazzle.com.au/">Australia</a>
766
+ </p>
767
+ </div>
768
+ <div class="signupColumn">
769
+ <div class="h4">Sign up for our email newsletter</div>
770
+ Receive updates and exclusive offers<br />
771
+ <form id="page-emailSignup" name="emailSignup" action="http://www.zazzle.com/mk/welcome/home/emailsignup" method="post" target="emailSignupWindow">
772
+ <input id="page-emailSignupInput" style="" type="text" name="email_address" value="email address" />
773
+
774
+ <button id="" type="submit" class="inline" title="enter your email address to sign up for the Zazzle newsletter" value="Sign me up!"><span class="buttonLeft"><span class="buttonRight">Sign me up!</span></span></button>
775
+
776
+ </form>
777
+ </div>
778
+ <div>
779
+
780
+ <div class="legal ppLegal">
781
+ Use of this Web site constitutes acceptance of the
782
+ <a target="_top" href="http://www.zazzle.com/mk/policy/user_agreement" rel="nofollow">User Agreement</a> and
783
+ <a target="_top" href="http://www.zazzle.com/mk/policy/privacy_policy" rel="nofollow">Privacy Policy</a><br />
784
+ Copyright &copy; 2000-2009, Zazzle.com, Inc. All rights reserved.<br />
785
+
786
+ </div>
787
+ <div class="securityBadges">
788
+ <a target="_top" href="javascript://" onclick="Zazzle.Page.launchPopup({url:'http://www.etrust.org/cert/879309.html', width:800, height:600, toolbar:false})" style="margin-left:0;" rel="nofollow" class="securityetrust"></a>
789
+ <a target="_top" href="javascript://" onclick="Zazzle.Page.launchPopup({url:'https://www.bbb.org/online/consumer/cks.aspx?id=10403098302640409', width:825, height:510, toolbar:false})" rel="nofollow"><img src="http://asset.zcache.com/assets/graphics/z2/securityBadges/bbb.gif" alt="Click to verify BBB accreditation and to see a BBB report." /></a>
790
+ <a target="_top" href="javascript://" onclick="Zazzle.Page.launchPopup({url:'https://www.paypal.com/us/cgi-bin/webscr?cmd=xpt/cps/popup/OLCWhatIsPayPal-outside', width:600, height:400, toolbar:false})" rel="nofollow"><img src="http://asset.zcache.com/assets/graphics/z2/securityBadges/paypal.gif" /></a>
791
+ <a target="_top" href="javascript://" onclick="Zazzle.Page.launchPopup({url:'https://seal.verisign.com/splash?form_file=fdf/splash.fdf&amp;dn=www.zazzle.com&amp;lang=en', width:550, height:450, toolbar:false})" rel="nofollow" class="verisign"></a>
792
+ </div>
793
+ </div>
794
+ </div>
795
+ </div>
796
+ <img src="http://a.tribalfusion.com/i.cid?c=286543&amp;d=30" width="1" height="1" border="0" />
797
+
798
+ <!-- footer #51.71550 -->
799
+ </div>
800
+
801
+ </div></div><!-- end page --><script type="text/javascript" src="http://www.zazzle.com/bld/z.2/js/library/Zazzle.Minimal.library.js?r=51.71550"></script><script type="text/javascript">
802
+ Uize.pathToResources = 'http://asset.zcache.com/assets/graphics/js/'; Uize.moduleUrlTemplate = 'http://www.zazzle.com/bld/z.2/js/library/[#modulePath]?r=51.71550'; Uize.moduleLoader = null;
803
+ </script>
804
+ <script type="text/javascript" src="http://www.zazzle.com/bld/z.2/js/library/Zazzle.Gallery.library.js?r=51.71550"></script>
805
+ <script type="text/javascript">
806
+ var
807
+ zPage = new Zazzle.Page({
808
+
809
+ user:{
810
+ id:'0',
811
+ handle:'',
812
+ llid: '238249980318654341',
813
+ maturity:'G',
814
+ isAssociate:false,
815
+ isContributor:false,
816
+ isCollection:false,
817
+ isLoggedIn:false
818
+ },
819
+ env:{
820
+ www:'http://www.zazzle.com/',
821
+ realview:'http://www.zazzle.com/rlv/isapi/designall.dll',
822
+ imageRealview:'http://rlv.zcache.com/isapi/designall.dll',
823
+ service:'http://www.zazzle.com/svc/',
824
+ aspService:'http://www.zazzle.com/service/',
825
+ assets:'http://asset.zcache.com/assets/graphics/',
826
+ login:'https://www.zazzle.com/lgn/login',
827
+ inlineLogin:'https://www.zazzle.com/lgn/inline',
828
+ jsLogger:'http://www.zazzle.com/log/logjs',
829
+ path:'gl/render',
830
+ params:{ch:'kungfutees'},
831
+ partner:'',
832
+ consoleLinks:'skins/zazzle/consoleLinks',
833
+ showErrors:false,
834
+ build:'51.71550',
835
+ zoomTest:'',
836
+ ajaxDomain:window.document.domain,
837
+ iframeDomain:location.hostname.replace (/^[^.]+./,''),
838
+ clientStartTime:new Date()
839
+ }
840
+ ,
841
+ commObject:new Uize.Comm.Ajax,
842
+ urls:{
843
+ login:'https://www.zazzle.com/lgn/inline'
844
+ }
845
+ })
846
+ ;
847
+ zPage.wireUi();
848
+ </script>
849
+ <script type="text/javascript">
850
+ var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "http://www.");
851
+ document.write(unescape("%3Cscript src='" + gaJsHost + "google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E"));
852
+ </script>
853
+ <script type="text/javascript">
854
+ if (typeof(_gat) != "undefined")
855
+ {
856
+ var pageTracker = _gat._getTracker("UA-5919945-3");
857
+ pageTracker._setDomainName("none");
858
+ pageTracker._setAllowLinker(true);
859
+ pageTracker._setAllowHash(false);
860
+
861
+ pageTracker._trackPageview();
862
+ }
863
+ </script>
864
+ </body></html>
865
+ <script language="JavaScript">
866
+ <!--
867
+ if (typeof s == 'object') {
868
+ /* E-commerce Config */
869
+ s.currencyCode="USD";
870
+
871
+ /* Page Properties */
872
+ s.pageName="Store:kungfutees:";
873
+ s.server="www.zazzle.com";
874
+ s.channel="";
875
+ s.pageType="";
876
+ s.prop1="";
877
+ s.prop2="";
878
+ s.prop3="";
879
+ s.prop4="";
880
+ s.prop5="";
881
+ s.prop6="";
882
+ s.prop7="";
883
+ s.prop8="";
884
+ s.prop10="0-50ms";
885
+ s.prop11="";
886
+ s.prop12="";
887
+ s.prop13="";
888
+ s.prop14="";
889
+ s.prop15="";
890
+ s.prop17="";
891
+ s.prop18="";
892
+ s.prop19="";
893
+ s.prop20="";
894
+ s.prop21="";
895
+ s.prop22="";
896
+ s.prop23="";
897
+
898
+ /* E-commerce Variables (Think: success events)*/
899
+ s.campaign="";
900
+ s.state="";
901
+ s.zip="";
902
+ s.events=""; /* One of: cart open, cart view, cart add, checkout, purchase, etc. */
903
+ s.products=""; /* Must be set in conjunction with event. */
904
+ s.purchaseID="";
905
+ s.eVar1="";
906
+ s.eVar2="";
907
+ s.eVar3="";
908
+ s.eVar4="";
909
+ s.eVar5="";
910
+ s.eVar6="";
911
+ s.eVar7="";
912
+ s.eVar8="";
913
+ s.eVar9="";
914
+ s.eVar10="";
915
+ s.eVar11="";
916
+ s.eVar12="";
917
+ s.eVar13="";
918
+ s.eVar14="";
919
+ s.eVar15="";
920
+ s.eVar17="";
921
+ s.eVar18="";
922
+ s.eVar19="";
923
+ s.eVar20="";
924
+ /* productRootId is only used in product string. */
925
+ /* s.eVar21="###productRootId###"; */
926
+ s.eVar22="";
927
+ s.eVar23="";
928
+ s.eVar24="";
929
+ s.eVar25="";
930
+ /* eVar26 ShipMethod is only used in product string. */
931
+ /* eVar27 ShipCountry is only used in product string. */
932
+ s.eVar28="";
933
+ s.eVar29="";
934
+ s.eVar31="";
935
+ s.eVar32="";
936
+ s.eVar33="";
937
+
938
+
939
+ if (typeof time1 != 'undefined') {
940
+ var clientTime, clientBucket = '';
941
+ var time2 = new Date().getTime();
942
+ if (time1 && time2) { clientTime = (time2 - time1); }
943
+ if (clientTime < 500) { clientBucket = '0-500ms'; }
944
+ else if (clientTime < 1000) { clientBucket = '500-1000ms'; }
945
+ else if (clientTime < 5000) { clientBucket = '1000-5000ms'; }
946
+ else if (clientTime < 7500) { clientBucket = '5000-7500ms'; }
947
+ else if (clientTime < 10000) { clientBucket = '7500-10000ms'; }
948
+ else if (clientTime < 11000) { clientBucket = '10000-11000ms'; }
949
+ else if (clientTime >= 11000) { clientBucket = '> 11000ms'; }
950
+ s.prop9 = clientBucket; } else {
951
+ s.prop9 = 'undefined: ' + document.location.href; }
952
+
953
+ /************* DO NOT ALTER ANYTHING BELOW THIS LINE ! **************/
954
+ var s_code=s.t();if(s_code)document.write(s_code) } //--></script>
955
+ <script language="JavaScript"><!--
956
+ if(navigator.appVersion.indexOf('MSIE')>=0)document.write(unescape('%3C')+'\!-'+'-')
957
+ //--></script><noscript><a href="http://www.omniture.com" title="Web Analytics"><img
958
+ src="http://track.www.zazzle.com/b/ss/zazzlecom/1/H.8--NS/pp6227597pp?ns=zazzle&ce=UTF-8&cc=USD&cdp=3&g=http%3a%2f%2fwww.zazzle.com%2fz.2%2fgl%2frender.aspx%3fch%3dkungfutees%26ou%3d%252Fkungfutees&pageName=Store%3akungfutees%3a&server=www.zazzle.com&c10=0-50ms"
959
+ height="1" width="1" border="0" alt="" /></a></noscript><!--/DO NOT REMOVE/-->
960
+ <!-- End SiteCatalyst code version: H.8. -->
@@ -0,0 +1,33 @@
1
+ require 'product_line_parser'
2
+
3
+ class ProductLineParserTest < Test::Unit::TestCase
4
+ context "parsing the document" do
5
+ setup do
6
+ @parser = Razsell::ProductLineParser.new
7
+ end
8
+
9
+ should "return an empty array when passed nil" do
10
+ section = @parser.parse nil
11
+ assert_equal Array, section.class
12
+ assert_equal 0, section.length
13
+ end
14
+
15
+ should "get the relevent text from the document" do
16
+ section = @parser.get_elements feed("productlines")
17
+ assert_equal '<a href="http://www.zazzle.com/kungfutees/gifts?cg=196854021783912655">Cheeze</a>', section[0].to_html
18
+ assert_equal '<a href="http://www.zazzle.com/kungfutees/gifts?cg=196596454716712290">New Products</a>', section[1].to_html
19
+ assert_equal '<a href="http://www.zazzle.com/kungfutees/gifts?cg=196983228798280961">Smim</a>', section[2].to_html
20
+ end
21
+
22
+ should "populate the array with ProductLine objects" do
23
+ section = @parser.parse feed("productlines")
24
+ assert_equal '196854021783912655', section[0].id
25
+ assert_equal '196596454716712290', section[1].id
26
+ assert_equal '196983228798280961', section[2].id
27
+
28
+ assert_equal 'Cheeze', section[0].name
29
+ assert_equal 'New Products', section[1].name
30
+ assert_equal 'Smim', section[2].name
31
+ end
32
+ end
33
+ end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rubyyot-razsell
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.3
4
+ version: 0.0.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jamal Hansen
@@ -9,7 +9,7 @@ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
11
 
12
- date: 2009-07-19 00:00:00 -07:00
12
+ date: 2009-08-04 00:00:00 -07:00
13
13
  default_executable:
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
@@ -69,7 +69,9 @@ files:
69
69
  - Rakefile
70
70
  - VERSION
71
71
  - docs/RSSGuide1.02.pdf
72
+ - features/product_lines.feature
72
73
  - features/razsell.feature
74
+ - features/step_definitions/product_line_steps.rb
73
75
  - features/step_definitions/razsell_steps.rb
74
76
  - features/support/env.rb
75
77
  - features/support/razsell_mixed_in.rb
@@ -81,6 +83,8 @@ files:
81
83
  - lib/engine.rb
82
84
  - lib/http_service.rb
83
85
  - lib/item.rb
86
+ - lib/product_line.rb
87
+ - lib/product_line_parser.rb
84
88
  - lib/query.rb
85
89
  - lib/razsell.rb
86
90
  - lib/results.rb
@@ -89,7 +93,9 @@ files:
89
93
  - test/fixtures.rb
90
94
  - test/fixtures/page_1.rss
91
95
  - test/fixtures/page_2.rss
96
+ - test/fixtures/productlines.htm
92
97
  - test/fixtures/rockstar.rss
98
+ - test/product_line_parser_test.rb
93
99
  - test/product_types_test.rb
94
100
  - test/query_test.rb
95
101
  - test/razsell_test.rb
@@ -97,6 +103,7 @@ files:
97
103
  - test/test_helper.rb
98
104
  has_rdoc: true
99
105
  homepage: http://github.com/rubyyot/razsell
106
+ licenses:
100
107
  post_install_message:
101
108
  rdoc_options:
102
109
  - --charset=UTF-8
@@ -117,13 +124,14 @@ required_rubygems_version: !ruby/object:Gem::Requirement
117
124
  requirements: []
118
125
 
119
126
  rubyforge_project:
120
- rubygems_version: 1.2.0
127
+ rubygems_version: 1.3.5
121
128
  signing_key:
122
129
  specification_version: 2
123
130
  summary: A gem for getting info about products on a website that has a similar name
124
131
  test_files:
125
132
  - test/engine_test.rb
126
133
  - test/fixtures.rb
134
+ - test/product_line_parser_test.rb
127
135
  - test/results_test.rb
128
136
  - test/test_helper.rb
129
137
  - test/product_types_test.rb