themeable 1.1.0 → 1.1.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +2 -2
- data/lib/themeable/railtie.rb +0 -2
- data/lib/themeable/version.rb +1 -1
- data/lib/themeable.rb +0 -8
- 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: 047a8b70729935675b042912708e0c1c1b6c129c
|
4
|
+
data.tar.gz: a8f2e63a44b86249a84b78d37999de24f68eb203
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 92cd60ac882aa135fc00de4930da7cc70a782bc10e179b4364d496f43e019ec00f1fd9766a812f99e67f0bf1bbe9c225862bdc71330182d9ffef831b7b2d0b86
|
7
|
+
data.tar.gz: 21c7d3f0ca5842f8bee3103be68419f41c48eac11ed32e6050a77ce71acc1a842a30a6cd0e2d8783e2cd2874db62d6490c056ed07e01f7c3deae2ecc5704478b
|
data/README.md
CHANGED
@@ -158,14 +158,14 @@ In your Rails project, if you feel `theme_my_theme` is not perfect, and want to
|
|
158
158
|
|
159
159
|
If you feel each time to generate scaffold controller has to provide `--theme=my_theme` is annoying, now you can set a default value like this:
|
160
160
|
|
161
|
-
in config/application.rb, add `
|
161
|
+
in config/application.rb, add `config.generators.theme = :my_theme`
|
162
162
|
|
163
163
|
module TestTheme
|
164
164
|
class Application < Rails::Application
|
165
165
|
|
166
166
|
....
|
167
167
|
|
168
|
-
|
168
|
+
config.generators.theme = :my_theme
|
169
169
|
|
170
170
|
...
|
171
171
|
|
data/lib/themeable/railtie.rb
CHANGED
@@ -7,9 +7,7 @@ module Themeable
|
|
7
7
|
end
|
8
8
|
|
9
9
|
initializer :themeable do
|
10
|
-
config.app_generators.theme = Themeable.default_theme if Themeable.default_theme
|
11
10
|
Themeable.themes.each do |theme|
|
12
|
-
|
13
11
|
config.assets.paths << File.join(theme.root_path, theme.theme_path, 'assets')
|
14
12
|
config.assets.paths << File.join(theme.root_path, 'vendor')
|
15
13
|
config.assets.precompile << /\A#{Regexp.escape(theme.theme_name)}\/[^\/]+\.(js|css)\z/
|
data/lib/themeable/version.rb
CHANGED
data/lib/themeable.rb
CHANGED
@@ -20,12 +20,4 @@ module Themeable
|
|
20
20
|
themes.find{|t| t.theme_name == theme_name.to_sym } || raise("Theme #{theme_name} not found")
|
21
21
|
end
|
22
22
|
|
23
|
-
def default_theme(theme_name)
|
24
|
-
@default_theme = "theme_#{theme(theme_name).theme_name}"
|
25
|
-
end
|
26
|
-
|
27
|
-
def default_theme
|
28
|
-
@default_theme
|
29
|
-
end
|
30
|
-
|
31
23
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: themeable
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.1.
|
4
|
+
version: 1.1.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- xiaohui
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-10-
|
11
|
+
date: 2016-10-12 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|