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.
@@ -20,11 +20,7 @@ require 'dugway/extensions/time'
20
20
  module Dugway
21
21
  class << self
22
22
  def application(options={})
23
- @logger = Logger.new if options[:log]
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
@@ -41,7 +41,7 @@ module Dugway
41
41
  private
42
42
 
43
43
  def theme
44
- @theme ||= Theme.new(self.class.source_root)
44
+ @theme ||= Dugway.theme
45
45
  end
46
46
 
47
47
  def build_name
@@ -1,3 +1,3 @@
1
1
  module Dugway
2
- VERSION = "0.5.0"
2
+ VERSION = "0.5.1"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: dugway
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.5.0
4
+ version: 0.5.1
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors: