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 +4 -4
- data/lib/theme/assets.rb +3 -4
- data/lib/theme/mab.rb +4 -6
- data/lib/theme/version.rb +1 -1
- data/lib/theme.rb +7 -6
- 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: 65e814ce4cf0e4f13e837df06427eae320041851
|
4
|
+
data.tar.gz: 63b1f45ff3d5d28f8cd8d71ff1ad54aa2c262690
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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
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,
|
7
|
-
autoload :Component,
|
8
|
-
autoload :Assets,
|
9
|
-
autoload :Middleware,
|
10
|
-
autoload :Render,
|
11
|
-
autoload :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.
|
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-
|
11
|
+
date: 2014-08-06 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: tilt
|