theme 0.2.1 → 0.2.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
  SHA1:
3
- metadata.gz: 8a470c7d6cf09d23fb9d8e77d03057e488a6137c
4
- data.tar.gz: 21967f188873fff1b8c62cd29f038cc4e08c941e
3
+ metadata.gz: 65e814ce4cf0e4f13e837df06427eae320041851
4
+ data.tar.gz: 63b1f45ff3d5d28f8cd8d71ff1ad54aa2c262690
5
5
  SHA512:
6
- metadata.gz: f9273f7fb916292828a84cda65c49bad99f0316202de8be5b1e8f768519741678db642fe401dfda27fe18ad20305b6a9f8f005b869b2bbd4e86bd086543dd559
7
- data.tar.gz: 70bbd4ca3937888d76d10b84541184d59423c0e30c9367f18171b773fbae34a97aa37a01e9ce9362a313dc620ae44f430c84c5af89b2fee1fbc9b6dc168d20f0
6
+ metadata.gz: b20e6a94f3c40bf6eb2a8d418c1545d74f805e5c03b2411cd0ef14e903478c5799b383ea318b2163ef09bfc539d46a988cf7d9a4624f8f6cdea50d80df44a793
7
+ data.tar.gz: b170492f4baeac91535cbff1eea46b93253850160491014a53dfdc55adfb45fd16c3e3930d856a63fa539ac46aaba036fdc8c8800e22c004d7ef9b3ef2c06ab5
data/lib/theme/assets.rb CHANGED
@@ -1,5 +1,3 @@
1
- require 'theme/mab'
2
-
3
1
  module Theme
4
2
  module Assets
5
3
  autoload :Middleware, 'theme/assets/middleware'
@@ -9,6 +7,7 @@ module Theme
9
7
  def setup app
10
8
  app.plugin Render
11
9
  app.use Middleware
10
+ Tilt.register Theme::MabTemplate, 'mab'
12
11
  end
13
12
 
14
13
  def css_assets options = {}
@@ -27,7 +26,7 @@ module Theme
27
26
  options[:href] = "#{url}/css/all.css"
28
27
  end
29
28
 
30
- mab { link options }
29
+ Theme.mab { link options }
31
30
  end
32
31
 
33
32
  def js_assets options = {}
@@ -43,7 +42,7 @@ module Theme
43
42
  options[:src] = "#{url}/js/all.js"
44
43
  end
45
44
 
46
- mab { script options }
45
+ Theme.mab { script options }
47
46
  end
48
47
 
49
48
  def compile
data/lib/theme/mab.rb CHANGED
@@ -1,10 +1,10 @@
1
1
  require 'mab'
2
2
 
3
- def mab(&blk)
4
- Mab::Builder.new({}, self, &blk).to_s
5
- end
6
-
7
3
  module Theme
4
+ def self.mab(&blk)
5
+ Mab::Builder.new({}, self, &blk).to_s
6
+ end
7
+
8
8
  class MabTemplate < Tilt::Template
9
9
  def self.builder_class
10
10
  @builder_class ||= Class.new(Mab::Builder) do
@@ -46,5 +46,3 @@ module Theme
46
46
  end
47
47
  end
48
48
  end
49
-
50
- Tilt.register Theme::MabTemplate, 'mab'
data/lib/theme/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module Theme
2
- VERSION = "0.2.1"
2
+ VERSION = "0.2.2"
3
3
  end
data/lib/theme.rb CHANGED
@@ -3,12 +3,13 @@ require 'nokogiri-styles'
3
3
  require 'tilt'
4
4
 
5
5
  module Theme
6
- autoload :Version, 'theme/version'
7
- autoload :Component, 'theme/component'
8
- autoload :Assets, 'theme/assets'
9
- autoload :Middleware, 'theme/middleware'
10
- autoload :Render, 'theme/render'
11
- autoload :Events, 'theme/events'
6
+ autoload :Version, 'theme/version'
7
+ autoload :Component, 'theme/component'
8
+ autoload :Assets, 'theme/assets'
9
+ autoload :Middleware, 'theme/middleware'
10
+ autoload :Render, 'theme/render'
11
+ autoload :Events, 'theme/events'
12
+ autoload :MabTemplate, 'theme/mab'
12
13
 
13
14
  IMAGE_TYPES = %w(png gif jpg jpeg)
14
15
  FONT_TYPES = %w(eot woff ttf svg)
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: theme
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.1
4
+ version: 0.2.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - cj
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-08-03 00:00:00.000000000 Z
11
+ date: 2014-08-06 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: tilt