Module: Dugway
- Defined in:
- lib/dugway.rb,
lib/dugway/cli.rb,
lib/dugway/cart.rb,
lib/dugway/store.rb,
lib/dugway/theme.rb,
lib/dugway/logger.rb,
lib/dugway/request.rb,
lib/dugway/version.rb,
lib/dugway/template.rb,
lib/dugway/cli/build.rb,
lib/dugway/liquifier.rb,
lib/dugway/cli/create.rb,
lib/dugway/cli/server.rb,
lib/dugway/controller.rb,
lib/dugway/application.rb,
lib/dugway/cli/validate.rb,
lib/dugway/liquid/tags/get.rb,
lib/dugway/path_interpreter.rb,
lib/dugway/liquid/tags/paginate.rb,
lib/dugway/contact_form_validator.rb,
lib/dugway/liquid/drops/base_drop.rb,
lib/dugway/liquid/drops/cart_drop.rb,
lib/dugway/liquid/drops/page_drop.rb,
lib/dugway/liquid/drops/image_drop.rb,
lib/dugway/liquid/drops/pages_drop.rb,
lib/dugway/liquid/drops/theme_drop.rb,
lib/dugway/liquid/drops/artist_drop.rb,
lib/dugway/liquid/drops/account_drop.rb,
lib/dugway/liquid/drops/artists_drop.rb,
lib/dugway/liquid/drops/contact_drop.rb,
lib/dugway/liquid/drops/country_drop.rb,
lib/dugway/liquid/drops/product_drop.rb,
lib/dugway/liquid/drops/category_drop.rb,
lib/dugway/liquid/drops/currency_drop.rb,
lib/dugway/liquid/drops/products_drop.rb,
lib/dugway/liquid/filters/url_filters.rb,
lib/dugway/liquid/drops/cart_item_drop.rb,
lib/dugway/liquid/filters/core_filters.rb,
lib/dugway/liquid/filters/font_filters.rb,
lib/dugway/liquid/filters/util_filters.rb,
lib/dugway/liquid/drops/categories_drop.rb,
lib/dugway/liquid/drops/option_group_drop.rb,
lib/dugway/liquid/drops/theme_images_drop.rb,
lib/dugway/liquid/drops/product_option_drop.rb,
lib/dugway/liquid/drops/shipping_option_drop.rb,
lib/dugway/liquid/filters/comparison_filters.rb,
lib/dugway/liquid/filters/default_pagination.rb,
lib/dugway/liquid/drops/theme_image_sets_drop.rb,
lib/dugway/liquid/drops/option_group_value_drop.rb,
lib/dugway/liquid/filters/instant_checkout_filter.rb
Defined Under Namespace
Modules: Cli, Drops, Filters, Tags
Classes: Application, Cart, ContactFormValidator, Controller, Item, Liquifier, Logger, PathInterpreter, Request, Store, Template, Theme
Constant Summary
collapse
- VERSION =
"1.0.14"
Class Method Summary
collapse
Class Method Details
.application(options = {}) ⇒ Object
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
|
# File 'lib/dugway.rb', line 34
def application(options={})
@options = options
BigCartel::CurrencyLocales.insert
I18n.default_locale = 'en-US'
I18n.locale = Dugway.store.locale
Rack::Builder.app do
use Rack::Session::Cookie, :secret => 'stopwarningmeaboutnothavingasecret'
use BetterErrors::Middleware
if options[:log]
BetterErrors.logger = Dugway.logger
use Rack::CommonLogger, Dugway.logger
end
run Application.new
end
end
|
.cart ⇒ Object
62
63
64
|
# File 'lib/dugway.rb', line 62
def cart
@cart ||= Cart.new
end
|
.logger ⇒ Object
70
71
72
|
# File 'lib/dugway.rb', line 70
def logger
@logger ||= Logger.new
end
|
.options ⇒ Object
74
75
76
|
# File 'lib/dugway.rb', line 74
def options
@options
end
|
.source_dir ⇒ Object
66
67
68
|
# File 'lib/dugway.rb', line 66
def source_dir
@source_dir ||= File.join(Dir.pwd, 'source')
end
|
.store ⇒ Object
54
55
56
|
# File 'lib/dugway.rb', line 54
def store
@store ||= Store.new(options && options[:store] && options[:store][:subdomain] || 'dugway')
end
|
.theme ⇒ Object
58
59
60
|
# File 'lib/dugway.rb', line 58
def theme
@theme ||= Theme.new(options && options[:customization] || {})
end
|