dugway 0.5.7 → 0.5.8

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: c231b405dd8a4bf6580a5e7c09027feb22774b7a
4
- data.tar.gz: e55aa9df136334d78341b1ae45f029960ba83638
3
+ metadata.gz: 6f099f817529d66f6c897e1dbe324ba22504e6c2
4
+ data.tar.gz: 492282f622f2e037fedd35adb918ca0daf6a81fb
5
5
  SHA512:
6
- metadata.gz: be73796ce8b53718029ac4fdb24ddf52a638b1ab7864ebc96c1d2587c6a4e68842a58ae0b63b3eb58f3abb4850ac6a1a47f3c6a3cdc568d741701bddbc6c5788
7
- data.tar.gz: 31c14d6d11316c39eaaf88b3b20421b33f8d595ddd76c2afc6411d8cd327dd445b4984c071d68a0cf304a06980d4a341d993bee122f775b0cd9ebe0860bdc5d3
6
+ metadata.gz: 8e1fa93b84b030e97db5e17df116a684acad3b13a7b12c08c144b07da996006ae9e03023ea15e45581862a562126446e18e7e8547bd7f76d34032eea825115ff
7
+ data.tar.gz: 9e33c4385b035813b3a6a00e8f4909d77cf72de867dd255cdf6fbc7ff0d0a96af39361304b308c9ebedff7e49dfe80abc1b7925254868f93df903bdcb0e181da
data/.gitignore CHANGED
@@ -7,3 +7,5 @@ coverage
7
7
  *.gem
8
8
  *.tmproj
9
9
  *.sublime*
10
+
11
+ .sass-cache
data/README.md CHANGED
@@ -1,9 +1,11 @@
1
- # Dugway [![Build Status](https://travis-ci.org/bigcartel/dugway.png)](https://travis-ci.org/bigcartel/dugway) [![Gem Version](https://badge.fury.io/rb/dugway.png)](http://badge.fury.io/rb/dugway)
1
+ # Dugway [![Build Status](https://travis-ci.org/bigcartel/dugway.png?branch=master)](https://travis-ci.org/bigcartel/dugway) [![Gem Version](https://badge.fury.io/rb/dugway.png)](http://badge.fury.io/rb/dugway)
2
2
 
3
3
  **_The easy way to build Big Cartel themes._**
4
4
 
5
5
  Dugway allows you to run your Big Cartel theme on your computer, test it in any browser, write code in your favorite editor, and use fancy new tools like CoffeeScript, Sass, and LESS. It's awesome.
6
6
 
7
+ [![Walkthrough](http://cl.ly/image/101e1z3Y3B1w/Screen%20Shot%202013-04-01%20at%205.04.40%20PM.png)](https://vimeo.com/bigcartel/dugway)
8
+
7
9
  ## Disclaimer
8
10
 
9
11
  **Dugway is a very new project and likely has several bugs, rough edges, and missing features.** If you run into something weird or have a cool idea, see if it's a [known issue](https://github.com/bigcartel/dugway/issues), and otherwise [report it](https://github.com/bigcartel/dugway/issues/new) and we'll do our best to hook you up. Thanks.
@@ -28,6 +28,8 @@ Gem::Specification.new do |s|
28
28
  s.add_dependency('sass', '~> 3.2.5')
29
29
  s.add_dependency('less', '~> 2.2.2')
30
30
  s.add_dependency('sprockets', '~> 2.0')
31
+ s.add_dependency('sprockets-sass', '~> 0.9.1')
32
+ s.add_dependency('compass', '~> 0.12.2')
31
33
  s.add_dependency('httparty', '~> 0.10.0')
32
34
  s.add_dependency('better_errors', '~> 0.6.0')
33
35
  s.add_dependency('binding_of_caller', '~> 0.7.1')
@@ -29,12 +29,12 @@ module Dugway
29
29
  Rack::Builder.app do
30
30
  use Rack::Session::Cookie, :secret => 'stopwarningmeaboutnothavingasecret'
31
31
  use BetterErrors::Middleware
32
-
32
+
33
33
  if options[:log]
34
34
  BetterErrors.logger = Dugway.logger
35
35
  use Rack::CommonLogger, Dugway.logger
36
36
  end
37
-
37
+
38
38
  run Application.new
39
39
  end
40
40
  end
@@ -54,7 +54,7 @@ module Dugway
54
54
  def source_dir
55
55
  @source_dir ||= File.join(Dir.pwd, 'source')
56
56
  end
57
-
57
+
58
58
  def logger
59
59
  @logger ||= Logger.new
60
60
  end
@@ -1,7 +1,7 @@
1
1
  {% if cart.items != blank %}
2
2
 
3
3
  <form method="post" action="/cart">
4
- <ul>
4
+ <ul class="unstyled">
5
5
  {% for item in cart.items %}
6
6
  <li>
7
7
  <a href="{{ item.product.url }}">
@@ -1,11 +1,11 @@
1
1
  {% if contact.sent %}
2
2
 
3
- <p>Your message has been sent and we&#8217;ll get back to you soon.</p>
3
+ <p>Your message has been sent and we&#8217;ll get back to you soon.</p>
4
4
 
5
5
  {% else %}
6
6
 
7
7
  <form method="post" action="/contact">
8
- <ul>
8
+ <ul class="unstyled">
9
9
  <li>
10
10
  <label for="name">Name</label>
11
11
  {{ contact | contact_input: 'name' }}
@@ -24,9 +24,9 @@
24
24
  </li>
25
25
  <li>
26
26
  <label for="captcha">Spam check</label>
27
- <p>Please enter the characters from the image.</p>
28
- <div>{{ contact.captcha }}</div>
29
- {{ contact | contact_input: 'captcha' }}
27
+ <p>Please enter the characters from the image.</p>
28
+ <div>{{ contact.captcha }}</div>
29
+ {{ contact | contact_input: 'captcha' }}
30
30
  </li>
31
31
  <li>
32
32
  <button type="submit" name="submit" title="Send us an email">Send</button>
@@ -1,8 +1,8 @@
1
1
  {% paginate products from products.current by theme.products_per_page %}
2
2
 
3
3
  {% if products != blank %}
4
- <ul>
5
- {% for product in products %}
4
+ <ul class="unstyled">
5
+ {% for product in products %}
6
6
  <li class="{{ product.css_class }}">
7
7
  <a href="{{ product.url }}">
8
8
  <img alt="Image of {{ product.name | escape }}" src="{{ product.image | product_image_url size: theme.product_image_size }}">
@@ -1,19 +1,19 @@
1
1
  <!DOCTYPE html>
2
2
  <head>
3
3
  <title>{{ store.name }} &mdash; {{ page.name }}</title>
4
-
4
+
5
5
  <meta charset="utf-8">
6
6
  <meta name="description" content="{{ page.meta_description }}">
7
7
  <meta name="keywords" content="{{ page.meta_keywords }}">
8
-
8
+
9
9
  <link href="{{ theme | theme_css_url }}" media="screen" rel="stylesheet" type="text/css">
10
-
10
+
11
11
  <script src="//ajax.googleapis.com/ajax/libs/jquery/1.9.0/jquery.min.js" type="text/javascript"></script>
12
12
  <script src="{{ theme | theme_js_url }}" type="text/javascript"></script>
13
-
13
+
14
14
  {{ head_content }}
15
15
  </head>
16
-
16
+
17
17
  <body id="{{ page.permalink }}" class="{{ page.category }}">
18
18
  <header>
19
19
  <a href="/" title="{{ store.name | escape }}">
@@ -24,13 +24,13 @@
24
24
  {% endif %}
25
25
  </a>
26
26
  </header>
27
-
27
+
28
28
  <div class="wrap">
29
29
  <aside>
30
30
  <section>
31
31
  <a href="/cart">Cart ({{ cart.total | money_with_sign }})</a>
32
32
  </section>
33
-
33
+
34
34
  {% if theme.show_search %}
35
35
  <section>
36
36
  <form action="/products" method="get">
@@ -38,28 +38,28 @@
38
38
  </form>
39
39
  </section>
40
40
  {% endif %}
41
-
41
+
42
42
  <nav>
43
43
  <h3>Products</h3>
44
- <ul>
44
+ <ul class="unstyled">
45
45
  <li><a href="/products">All</a></li>
46
46
  {% for category in categories.active %}
47
47
  <li>{{ category | link_to }}</li>
48
48
  {% endfor %}
49
49
  </ul>
50
-
50
+
51
51
  {% if artists.active != blank %}
52
52
  <h3>Artists</h3>
53
- <ul>
53
+ <ul class="unstyled">
54
54
  <li><a href="/products">All</a></li>
55
55
  {% for artist in artists.active %}
56
56
  <li>{{ artist | link_to }}</li>
57
57
  {% endfor %}
58
58
  </ul>
59
59
  {% endif %}
60
-
60
+
61
61
  <h3>Info</h3>
62
- <ul>
62
+ <ul class="unstyled">
63
63
  {% for page in pages.all %}
64
64
  <li>{{ page | link_to }}</li>
65
65
  {% endfor %}
@@ -72,18 +72,18 @@
72
72
 
73
73
  <cite>{{ bigcartel_credit }}</cite>
74
74
  </aside>
75
-
75
+
76
76
  <section class="content">
77
77
  <h1>{{ page.name }}</h1>
78
78
 
79
79
  {% if errors != blank %}
80
- <ul class="errors">
80
+ <ul class="unstyled errors">
81
81
  {% for error in errors %}
82
82
  <li>{{ error }}</li>
83
83
  {% endfor %}
84
84
  </ul>
85
85
  {% endif %}
86
-
86
+
87
87
  {% if page.category == 'custom' %}
88
88
  {{ page_content | paragraphs }}
89
89
  {% else %}
@@ -91,11 +91,11 @@
91
91
  {% endif %}
92
92
  </section>
93
93
  </div>
94
-
94
+
95
95
  <footer>
96
96
  {% if theme.twitter_username != blank %}
97
97
  <p><a href="http://twitter/{{ theme.twitter_username }}">Follow @{{ theme.twitter_username }}</a></p>
98
- {% endif %}
98
+ {% endif %}
99
99
  </footer>
100
100
  </body>
101
101
  </html>
@@ -1,8 +1,8 @@
1
1
  <section class="product_images">
2
2
  <img src="{{ product.image | product_image_url }}" alt="Image of {{ product.name | escape }}" class="primary_image">
3
-
3
+
4
4
  {% if product.images.size > 1 %}
5
- <ul>
5
+ <ul class="unstyled">
6
6
  {% for image in product.images %}
7
7
  <li{% if forloop.first %} class="selected"{% endif %}><a href="{{ image | product_image_url }}"><img src="{{ image | product_image_url size:"thumb" }}" alt="Image of {{ product.name | escape }}"></a></li>
8
8
  {% endfor %}
@@ -13,18 +13,18 @@
13
13
  <section>
14
14
  <aside>
15
15
  {% case product.status %}
16
-
16
+
17
17
  {% when 'sold-out' %}
18
18
  <h5>{{ product.default_price | money_with_sign }} <em>Sold Out</em></h5>
19
19
 
20
20
  {% when 'coming-soon' %}
21
21
  <h5>{{ product.default_price | money_with_sign }} <em>Coming Soon</em></h5>
22
22
 
23
- {% when 'active' %}
23
+ {% when 'active' %}
24
24
  <h5>{{ product.default_price | money_with_sign }}{% if product.on_sale %} <em>On Sale{% endif %}</em></h5>
25
25
  <h5>Availability</h5>
26
-
27
- <ul class="availability">
26
+
27
+ <ul class="unstyled availability">
28
28
  {% for option in product.options %}
29
29
  <li>
30
30
  {% unless product.has_default_option %}<span>{{ option.name }}</span>{% endunless %}
@@ -35,16 +35,16 @@
35
35
  </li>
36
36
  {% endfor %}
37
37
  </ul>
38
-
38
+
39
39
  <form method="post" action="/cart">
40
- {% if product.has_default_option %}
40
+ {% if product.has_default_option %}
41
41
  {{ product.option | hidden_option_input }}
42
42
  {% else %}
43
43
  <div>
44
44
  {{ product.options_in_stock | options_select }}
45
- </div>
45
+ </div>
46
46
  {% endif %}
47
-
47
+
48
48
  <button name="submit" type="submit" title="Add to Cart">Add to Cart</button>
49
49
  </form>
50
50
  {% endcase %}
@@ -57,10 +57,10 @@
57
57
  {% elsif forloop.last %}
58
58
  <h5>and {{ artist.name }}</h5>
59
59
  {% else %}
60
- <h5>{{ artist.name }}</h5>,
60
+ <h5>{{ artist.name }}</h5>,
61
61
  {% endif %}
62
62
  {% endfor %}
63
-
63
+
64
64
  {% if product.description != blank %}
65
65
  {{ product.description | paragraphs }}
66
66
  {% endif %}
@@ -1,8 +1,8 @@
1
1
  {% paginate products from products.current by theme.products_per_page %}
2
2
 
3
3
  {% if products != blank %}
4
- <ul>
5
- {% for product in products %}
4
+ <ul class="unstyled">
5
+ {% for product in products %}
6
6
  <li class="{{ product.css_class }}">
7
7
  <a href="{{ product.url }}">
8
8
  <img alt="Image of {{ product.name | escape }}" src="{{ product.image | product_image_url size: theme.product_image_size }}">
@@ -22,4 +22,4 @@
22
22
  <p>No products found.</p>
23
23
  {% endif %}
24
24
 
25
- {% endpaginate %}
25
+ {% endpaginate %}
@@ -14,7 +14,7 @@
14
14
  * ------------------------------------------------------------------------------------------------
15
15
  */
16
16
 
17
- /*
17
+ /*
18
18
  * Here we're including a 3rd-party stylesheet we put in stylesheets/vendor written in normal CSS,
19
19
  * as well as a few custom Sass stylesheets we've written for different areas of the store
20
20
  *
@@ -0,0 +1,2 @@
1
+ $marginSize: 30px
2
+ $border: dashed 1px #ddd
@@ -1,5 +1,4 @@
1
- $marginSize: 30px
2
- $border: dashed 1px #ddd
1
+ @import 'config'
3
2
 
4
3
  body
5
4
  background: {{ theme.background_color }}
@@ -14,8 +13,19 @@ a
14
13
  &:hover
15
14
  color: #60AA85
16
15
 
16
+ ul
17
+ list-style-type: disc
18
+
19
+ ol
20
+ list-style-type: decimal
21
+
17
22
  ul, ol
18
- list-style: none
23
+ margin-left: $marginSize
24
+
25
+ ul.unstyled,
26
+ ol.unstyled
27
+ list-style-type: none
28
+ margin-left: 0
19
29
  padding: 0
20
30
 
21
31
  header
@@ -48,7 +58,7 @@ aside
48
58
  section
49
59
  margin-bottom: 1.5em
50
60
 
51
- ul
61
+ ul
52
62
  margin-bottom: 1.5em
53
63
  margin-top: 0
54
64
 
@@ -100,4 +110,4 @@ form
100
110
  background: #D97576
101
111
  border-bottom: 1px soldi #A65A5A
102
112
  color: #fff
103
- padding: 3px 10px
113
+ padding: 3px 10px
@@ -1,20 +1,25 @@
1
- $marginSize: 30px
2
- $border: dashed 1px #ddd
1
+ @import 'config'
3
2
 
4
3
  body#home, body#products
5
4
  section.content
6
5
  ul
6
+ list-style-type: none
7
7
  overflow: hidden
8
-
8
+
9
9
  li.product
10
+ box-sizing: border-box
10
11
  float: left
11
- margin-bottom: $marginSize
12
- margin-right: $marginSize
12
+ padding-bottom: $marginSize
13
+ padding-right: $marginSize
14
+ max-width: 30%
15
+
16
+ &:nth-child(3n+1)
17
+ clear: left
13
18
 
14
19
  img
15
20
  display: block
16
21
  margin-bottom: $marginSize / 2
22
+ max-width: 100%
17
23
 
18
24
  div.pagination
19
25
  clear: both
20
-
@@ -2,6 +2,8 @@ require 'coffee-script'
2
2
  require 'sass'
3
3
  require 'less'
4
4
  require 'sprockets'
5
+ require 'sprockets-sass'
6
+ require 'compass'
5
7
  require 'uglifier'
6
8
 
7
9
  module Dugway
@@ -99,6 +101,8 @@ module Dugway
99
101
  sprockets = Sprockets::Environment.new
100
102
  sprockets.append_path source_dir
101
103
 
104
+ Sprockets::Sass.options[:line_comments] = false
105
+
102
106
  # CSS engines like Sass and LESS choke on Liquid variables, so here we render the Liquid
103
107
  # if we're viewing the file, or escape and unescape it if we're building the file.
104
108
 
@@ -1,3 +1,3 @@
1
1
  module Dugway
2
- VERSION = "0.5.7"
2
+ VERSION = "0.5.8"
3
3
  end
@@ -0,0 +1 @@
1
+ $color: #0f0;
@@ -1,4 +1,7 @@
1
+ @import 'partial'
2
+
1
3
  $link_color: {{ theme.link_color }}
2
4
 
3
5
  a
6
+ background: $color
4
7
  color: $link_color
@@ -80,7 +80,7 @@ describe Dugway::Theme do
80
80
  end
81
81
 
82
82
  it "should sprocketize and liquify styles.css" do
83
- theme.file_content('styles.css').gsub(/\s+/, '').should == %{html,body{height:100%;}a{color:red;}/**/}
83
+ theme.file_content('styles.css').gsub(/\s+/, '').should == %{html,body{height:100%;}a{background:lime;color:red;}/**/}
84
84
  end
85
85
  end
86
86
 
@@ -96,7 +96,7 @@ describe Dugway::Theme do
96
96
  end
97
97
 
98
98
  it "should sprocketize and not liquify styles.css" do
99
- theme.build_file('styles.css').gsub(/\s+/, '').should == %{html,body{height:100%;}a{color:{{theme.link_color}};}/**/}
99
+ theme.build_file('styles.css').gsub(/\s+/, '').should == %{html,body{height:100%;}a{background:lime;color:{{theme.link_color}};}/**/}
100
100
  end
101
101
  end
102
102
 
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: dugway
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.5.7
4
+ version: 0.5.8
5
5
  platform: ruby
6
6
  authors:
7
7
  - Big Cartel
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2013-03-29 00:00:00.000000000 Z
11
+ date: 2013-04-05 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -150,6 +150,34 @@ dependencies:
150
150
  - - ~>
151
151
  - !ruby/object:Gem::Version
152
152
  version: '2.0'
153
+ - !ruby/object:Gem::Dependency
154
+ name: sprockets-sass
155
+ requirement: !ruby/object:Gem::Requirement
156
+ requirements:
157
+ - - ~>
158
+ - !ruby/object:Gem::Version
159
+ version: 0.9.1
160
+ type: :runtime
161
+ prerelease: false
162
+ version_requirements: !ruby/object:Gem::Requirement
163
+ requirements:
164
+ - - ~>
165
+ - !ruby/object:Gem::Version
166
+ version: 0.9.1
167
+ - !ruby/object:Gem::Dependency
168
+ name: compass
169
+ requirement: !ruby/object:Gem::Requirement
170
+ requirements:
171
+ - - ~>
172
+ - !ruby/object:Gem::Version
173
+ version: 0.12.2
174
+ type: :runtime
175
+ prerelease: false
176
+ version_requirements: !ruby/object:Gem::Requirement
177
+ requirements:
178
+ - - ~>
179
+ - !ruby/object:Gem::Version
180
+ version: 0.12.2
153
181
  - !ruby/object:Gem::Dependency
154
182
  name: httparty
155
183
  requirement: !ruby/object:Gem::Requirement
@@ -417,6 +445,7 @@ files:
417
445
  - lib/dugway/cli/templates/source/scripts.js
418
446
  - lib/dugway/cli/templates/source/settings.json
419
447
  - lib/dugway/cli/templates/source/styles.css
448
+ - lib/dugway/cli/templates/source/stylesheets/_config.css.sass
420
449
  - lib/dugway/cli/templates/source/stylesheets/cart.css.sass
421
450
  - lib/dugway/cli/templates/source/stylesheets/layout.css.sass
422
451
  - lib/dugway/cli/templates/source/stylesheets/product.css.sass
@@ -503,6 +532,7 @@ files:
503
532
  - spec/fixtures/theme/scripts.js
504
533
  - spec/fixtures/theme/settings.json
505
534
  - spec/fixtures/theme/styles.css
535
+ - spec/fixtures/theme/stylesheets/_partial.css
506
536
  - spec/fixtures/theme/stylesheets/one.css
507
537
  - spec/fixtures/theme/stylesheets/two.css.sass
508
538
  - spec/fixtures/theme/success.html
@@ -577,6 +607,7 @@ test_files:
577
607
  - spec/fixtures/theme/scripts.js
578
608
  - spec/fixtures/theme/settings.json
579
609
  - spec/fixtures/theme/styles.css
610
+ - spec/fixtures/theme/stylesheets/_partial.css
580
611
  - spec/fixtures/theme/stylesheets/one.css
581
612
  - spec/fixtures/theme/stylesheets/two.css.sass
582
613
  - spec/fixtures/theme/success.html