dugway 0.5.0 → 0.5.1
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/lib/dugway.rb +10 -10
- data/lib/dugway/cli/build.rb +1 -1
- data/lib/dugway/version.rb +1 -1
- metadata +1 -1
data/lib/dugway.rb
CHANGED
|
@@ -20,11 +20,7 @@ require 'dugway/extensions/time'
|
|
|
20
20
|
module Dugway
|
|
21
21
|
class << self
|
|
22
22
|
def application(options={})
|
|
23
|
-
@
|
|
24
|
-
@source_dir = File.join(Dir.pwd, 'source')
|
|
25
|
-
@store = Store.new(options[:store] || 'dugway')
|
|
26
|
-
@theme = Theme.new(options[:customization] || {})
|
|
27
|
-
@cart = Cart.new
|
|
23
|
+
@options = options
|
|
28
24
|
|
|
29
25
|
I18n.load_path += Dir[File.join(File.dirname(__FILE__), 'data', 'locales', '*.yml').to_s]
|
|
30
26
|
I18n.default_locale = 'en-US'
|
|
@@ -44,23 +40,27 @@ module Dugway
|
|
|
44
40
|
end
|
|
45
41
|
|
|
46
42
|
def store
|
|
47
|
-
@store
|
|
43
|
+
@store ||= Store.new(options && options[:store] || 'dugway')
|
|
48
44
|
end
|
|
49
45
|
|
|
50
46
|
def theme
|
|
51
|
-
@theme
|
|
47
|
+
@theme ||= Theme.new(options && options[:customization] || {})
|
|
52
48
|
end
|
|
53
49
|
|
|
54
50
|
def cart
|
|
55
|
-
@cart
|
|
51
|
+
@cart ||= Cart.new
|
|
56
52
|
end
|
|
57
53
|
|
|
58
54
|
def source_dir
|
|
59
|
-
@source_dir
|
|
55
|
+
@source_dir ||= File.join(Dir.pwd, 'source')
|
|
60
56
|
end
|
|
61
57
|
|
|
62
58
|
def logger
|
|
63
|
-
@logger
|
|
59
|
+
@logger ||= Logger.new
|
|
60
|
+
end
|
|
61
|
+
|
|
62
|
+
def options
|
|
63
|
+
@options
|
|
64
64
|
end
|
|
65
65
|
end
|
|
66
66
|
end
|
data/lib/dugway/cli/build.rb
CHANGED
data/lib/dugway/version.rb
CHANGED