dugway 1.0.1 → 1.0.2

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
  SHA256:
3
- metadata.gz: 164c11d13a392a70b8827996b897125e0669211fe85cb5463445d86d41d53a4d
4
- data.tar.gz: e4d2171b77593472fc50be05842b091d83c4c0c6fa28d2ebe9e7c54de9bc115a
3
+ metadata.gz: 3abee167dcd274b478a4e4b968547a267d43d02e61738e157dc15f90a8df7c78
4
+ data.tar.gz: 72c64774f1783f2c545570a44affe4a58592b92486b4c66d242d390239eee8ca
5
5
  SHA512:
6
- metadata.gz: 935b7f6c7af148e55df7a3f20e52a37d0aa317f3033f991a4c1f21a9d03b0c5fc6665658e4990c7d293b64203fde70e68e23dce3be750477da0802ab1848ef31
7
- data.tar.gz: 5f85b9baa1c340cead3ad92b503d90cb619f3b66e9a08bec983300df80a7ec057c3651b681c29e1cb4beacf569961322638a0ec52bce21add32aeed550567043
6
+ metadata.gz: 95c00a871fdb4e1d8c66b51a14378bdd93e03b28a92a610f26858116918168c53c0af1963228a5c8dae5de7bbe618f11136b6744da392020fc9e6cd5d1617790
7
+ data.tar.gz: 1f5081eb808765394c6e4e1dfd285adab2a966cee94554f1bddcb2495cdc5f5d1d639396aa314da122d8343475e061e5a36c63c8c7e509b61d8efd8823cb9d61
data/README.md CHANGED
@@ -182,7 +182,7 @@ Run your theme in any browser by starting the Dugway server:
182
182
  dugway server
183
183
  ```
184
184
 
185
- By default this will serve your theme at http://0.0.0.0:9292. You can then stop
185
+ By default this will serve your theme at http://127.0.0.1:9292/. You can then stop
186
186
  the server by hitting CTRL+C.
187
187
 
188
188
  ### Pow
@@ -36,7 +36,7 @@ Gem::Specification.new do |s|
36
36
  s.add_dependency('thor', '~> 0.20.3')
37
37
  s.add_dependency('rubyzip', '~> 0.9.9')
38
38
  s.add_dependency('uglifier', '~> 4.1')
39
- s.add_dependency('thin', '~> 1.7.2')
39
+ s.add_dependency('thin', '~> 1.8.0')
40
40
  s.add_dependency('bigcartel-theme-fonts')
41
41
  s.add_dependency('bigcartel-currency-locales')
42
42
 
@@ -31,7 +31,7 @@ module Dugway
31
31
  end
32
32
 
33
33
  def shipping
34
- {
34
+ {
35
35
  'enabled' => false,
36
36
  'amount' => 0.0,
37
37
  'strict' => false,
@@ -40,14 +40,14 @@ module Dugway
40
40
  end
41
41
 
42
42
  def tax
43
- {
43
+ {
44
44
  'enabled' => false,
45
45
  'amount' => 0.0
46
46
  }
47
47
  end
48
48
 
49
49
  def discount
50
- {
50
+ {
51
51
  'enabled' => false,
52
52
  'pending' => false,
53
53
  'amount' => 0.0
@@ -42,7 +42,7 @@ module Dugway
42
42
 
43
43
  nil
44
44
  end
45
-
45
+
46
46
  def method_missing(method, *args, &block)
47
47
  before_method(method.to_s)
48
48
  end
@@ -4,6 +4,10 @@ module Dugway
4
4
  def all
5
5
  @all ||= source.select { |page| page['category'] == 'custom' }
6
6
  end
7
+
8
+ def cart
9
+ @cart ||= source.find { |page| page['permalink'] == 'cart' }
10
+ end
7
11
  end
8
12
  end
9
13
  end
@@ -68,7 +68,7 @@ module Dugway
68
68
 
69
69
  def search_terms
70
70
  params[:search]
71
- end
71
+ end
72
72
 
73
73
  def page
74
74
  if @context['internal'].present? && @context['internal'].has_key?('page') # has_key? here because 'page' will be nil for get blocks
@@ -1,3 +1,3 @@
1
1
  module Dugway
2
- VERSION = "1.0.1"
2
+ VERSION = "1.0.2"
3
3
  end
@@ -1 +1 @@
1
- {"category":"custom","content":"<p>We're really cool!</p>","permalink":"about-us","name":"About Us","id":95821979,"url":"/about-us"}
1
+ {"category":"custom","content":"<p>We're really cool!</p>","permalink":"about-us","name":"About Us","id":95821979,"url":"/about-us"}
@@ -1,7 +1,18 @@
1
1
  require 'spec_helper'
2
2
 
3
3
  describe Dugway::Drops::PagesDrop do
4
- let(:pages) { Dugway::Drops::PagesDrop.new(Dugway.store.pages.map { |p| Dugway::Drops::PageDrop.new(p) }) }
4
+ let(:pages) do
5
+ Dugway::Drops::PagesDrop.new(
6
+ Dugway.store.pages.map do |p|
7
+ case p["permalink"]
8
+ when "cart"
9
+ Dugway::Drops::CartDrop.new(p)
10
+ else
11
+ Dugway::Drops::PageDrop.new(p)
12
+ end
13
+ end
14
+ )
15
+ end
5
16
 
6
17
  describe "#all" do
7
18
  it "should return an array of all pages" do
@@ -15,6 +26,14 @@ describe Dugway::Drops::PagesDrop do
15
26
  end
16
27
  end
17
28
 
29
+ describe "#cart" do
30
+ it "returns the cart drop instead of the cart class instance" do
31
+ cart = pages.cart
32
+ cart.should be_an_instance_of(Dugway::Drops::CartDrop)
33
+ cart.name.should == 'Cart'
34
+ end
35
+ end
36
+
18
37
  describe "#permalink" do
19
38
  it "should return the page by permalink" do
20
39
  page = pages.contact
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: 1.0.1
4
+ version: 1.0.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Big Cartel
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2020-10-08 00:00:00.000000000 Z
11
+ date: 2020-11-23 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -268,14 +268,14 @@ dependencies:
268
268
  requirements:
269
269
  - - "~>"
270
270
  - !ruby/object:Gem::Version
271
- version: 1.7.2
271
+ version: 1.8.0
272
272
  type: :runtime
273
273
  prerelease: false
274
274
  version_requirements: !ruby/object:Gem::Requirement
275
275
  requirements:
276
276
  - - "~>"
277
277
  - !ruby/object:Gem::Version
278
- version: 1.7.2
278
+ version: 1.8.0
279
279
  - !ruby/object:Gem::Dependency
280
280
  name: bigcartel-theme-fonts
281
281
  requirement: !ruby/object:Gem::Requirement