dugway 0.11.0 → 0.11.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +3 -14
- data/lib/dugway/liquid/filters/core_filters.rb +7 -2
- data/lib/dugway/version.rb +1 -1
- data/spec/units/dugway/liquid/filters/core_filters_spec.rb +12 -0
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 53facb1d71a392d772e0573fb90f1c70cd19fbdb
|
4
|
+
data.tar.gz: 87cee87c858183414daa73f591ae30c7034eb559
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 72cbbc5a4d3c3a704ca4dbdeffe9142adcf928e346bf19caea2bb9d4b5f3f908336e726644c1ff1e10c0b1c2fdd86acb03249bd24472396f7446bea60ea9c940
|
7
|
+
data.tar.gz: 990df07f4e0a45f1a6fba652b5622cded96466b1ad3efe2097a6127c20fe32f89d59484d40d8f16f6bb35ca60d9b270329087f04c4208728e0fc6e6a61ff8823
|
data/README.md
CHANGED
@@ -223,10 +223,10 @@ default we use **dugway** for
|
|
223
223
|
### Store customization
|
224
224
|
|
225
225
|
Another important thing to consider is how store owners will customize your
|
226
|
-
theme. You establish what can be customized in your
|
227
|
-
|
226
|
+
theme. You establish what can be customized in your settings.json file, and
|
227
|
+
Dugway allows you to simulate potential values people could choose by
|
228
228
|
setting them in the **customization** variable in **.dugway.json**. By default
|
229
|
-
we use the **default** values from your **
|
229
|
+
we use the **default** values from your **settings.json** file.
|
230
230
|
|
231
231
|
```json
|
232
232
|
"customization": {
|
@@ -240,14 +240,3 @@ we use the **default** values from your **[settings.json](#settings)** file.
|
|
240
240
|
"twitter_username": "bigcartel"
|
241
241
|
}
|
242
242
|
```
|
243
|
-
|
244
|
-
## Building your theme
|
245
|
-
|
246
|
-
When you're finished with a new version of your theme, it's time to build it.
|
247
|
-
|
248
|
-
```
|
249
|
-
dugway build
|
250
|
-
```
|
251
|
-
|
252
|
-
This will create a zip file for the current version in your **build** directory
|
253
|
-
containing all HTML, images, fonts, and packaged JS and CSS.
|
@@ -35,8 +35,13 @@ module Dugway
|
|
35
35
|
|
36
36
|
# Money Filters
|
37
37
|
|
38
|
-
def money(amount)
|
39
|
-
|
38
|
+
def money(amount, format = nil)
|
39
|
+
case format
|
40
|
+
when 'sign' then money_with_sign(amount)
|
41
|
+
when 'code' then money_with_code(amount)
|
42
|
+
when 'sign_and_code' then money_with_sign_and_code(amount)
|
43
|
+
else number_to_currency(amount, :unit => '').strip
|
44
|
+
end
|
40
45
|
end
|
41
46
|
|
42
47
|
def money_with_sign(amount)
|
data/lib/dugway/version.rb
CHANGED
@@ -28,6 +28,18 @@ describe Dugway::Filters::CoreFilters do
|
|
28
28
|
it "should convert a number to currency format" do
|
29
29
|
rendered_template("{{ 1234.56 | money }}").should == '1,234.56'
|
30
30
|
end
|
31
|
+
|
32
|
+
it "should support the 'sign' format argument" do
|
33
|
+
rendered_template("{{ 1234.56 | money: 'sign' }}").should == '<span class="currency_sign">$</span>1,234.56'
|
34
|
+
end
|
35
|
+
|
36
|
+
it "should support the 'code' format argument" do
|
37
|
+
rendered_template("{{ 1234.56 | money: 'code' }}").should == '1,234.56 <span class="currency_code">USD</span>'
|
38
|
+
end
|
39
|
+
|
40
|
+
it "should support the 'sign_and_code' format argument" do
|
41
|
+
rendered_template("{{ 1234.56 | money: 'sign_and_code' }}").should == '<span class="currency_sign">$</span>1,234.56 <span class="currency_code">USD</span>'
|
42
|
+
end
|
31
43
|
end
|
32
44
|
|
33
45
|
describe "#money_with_sign" do
|
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.11.
|
4
|
+
version: 0.11.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Big Cartel
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2018-02-14 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|