refinerycms-theming 0.9.8 → 0.9.8.1
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/gemspec.rb +2 -2
- data/lib/refinerycms-theming.rb +34 -1
- data/refinerycms-theming.gemspec +3 -5
- metadata +4 -4
- data/app/helpers/themes_helper.rb +0 -34
data/lib/gemspec.rb
CHANGED
@@ -1,5 +1,5 @@
|
|
1
1
|
#!/usr/bin/env ruby
|
2
|
-
version = '0.9.8'
|
2
|
+
version = '0.9.8.1'
|
3
3
|
raise "Could not get version so gemspec can not be built" if version.nil?
|
4
4
|
files = Dir[%q{**/*}].flatten.reject{|f| f =~ /\.gem$/}
|
5
5
|
|
@@ -21,7 +21,7 @@ Gem::Specification.new do |s|
|
|
21
21
|
#{"s.test_files = [
|
22
22
|
'#{Dir.glob("test/**/*.rb").join("',\n '")}'
|
23
23
|
]" if File.directory?("test")}
|
24
|
-
|
24
|
+
|
25
25
|
s.add_dependency('refinerycms', '>= 0.9.8')
|
26
26
|
end
|
27
27
|
EOF
|
data/lib/refinerycms-theming.rb
CHANGED
@@ -36,7 +36,40 @@ module Refinery
|
|
36
36
|
|
37
37
|
end
|
38
38
|
|
39
|
-
::ApplicationHelper.
|
39
|
+
::ApplicationHelper.module_eval do
|
40
|
+
def image_tag(source, options={})
|
41
|
+
theme = (options.delete(:theme) == true)
|
42
|
+
tag = super
|
43
|
+
# inject /theme/ into the image tag src if this is themed.
|
44
|
+
tag.gsub!(/src=[\"|\']/) { |m| "#{m}/theme/" }.gsub!("//", "/") if theme
|
45
|
+
tag.gsub(/theme=(.+?)\ /, '') # we need to remove any addition of theme='false' etc.
|
46
|
+
end
|
47
|
+
|
48
|
+
def javascript_include_tag(*sources)
|
49
|
+
theme = (arguments = sources.dup).extract_options![:theme] == true # don't ruin the current sources object
|
50
|
+
tag = super
|
51
|
+
# inject /theme/ into the javascript include tag src if this is themed.
|
52
|
+
tag.gsub!(/\/javascripts\//, "/theme/javascripts/") if theme
|
53
|
+
tag.gsub(/theme=(.+?)\ /, '') # we need to remove any addition of theme='false' etc.
|
54
|
+
end
|
55
|
+
|
56
|
+
def stylesheet_link_tag(*sources)
|
57
|
+
theme = (arguments = sources.dup).extract_options![:theme] == true # don't ruin the current sources object
|
58
|
+
tag = super
|
59
|
+
# inject /theme/ into the stylesheet link tag href if this is themed.
|
60
|
+
tag.gsub!(/\/stylesheets\//, "/theme/stylesheets/") if theme
|
61
|
+
tag.gsub(/theme=(.+?)\ /, '') # we need to remove any addition of theme='false' etc.
|
62
|
+
end
|
63
|
+
|
64
|
+
def image_submit_tag(source, options = {})
|
65
|
+
theme = (options.delete(:theme) == true)
|
66
|
+
|
67
|
+
tag = super
|
68
|
+
# inject /theme/ into the image tag src if this is themed.
|
69
|
+
tag.gsub!(/src=[\"|\']/) { |m| "#{m}/theme/" }.gsub!("//", "/") if theme
|
70
|
+
tag.gsub(/theme=(.+?)\ /, '') # we need to remove any addition of theme='false' etc.
|
71
|
+
end
|
72
|
+
end
|
40
73
|
end
|
41
74
|
|
42
75
|
initializer 'themes.middleware' do |app|
|
data/refinerycms-theming.gemspec
CHANGED
@@ -1,8 +1,8 @@
|
|
1
1
|
Gem::Specification.new do |s|
|
2
2
|
s.name = %q{refinerycms-theming}
|
3
|
-
s.version = %q{0.9.8}
|
3
|
+
s.version = %q{0.9.8.1}
|
4
4
|
s.description = %q{Theming functionality for the Refinery CMS project, extracted from Refinery CMS core.}
|
5
|
-
s.date = %q{2010-09-
|
5
|
+
s.date = %q{2010-09-28}
|
6
6
|
s.summary = %q{Theming functionality for the Refinery CMS project.}
|
7
7
|
s.email = %q{info@refinerycms.com}
|
8
8
|
s.homepage = %q{http://refinerycms.com}
|
@@ -11,8 +11,6 @@ Gem::Specification.new do |s|
|
|
11
11
|
|
12
12
|
s.files = [
|
13
13
|
'app',
|
14
|
-
'app/helpers',
|
15
|
-
'app/helpers/themes_helper.rb',
|
16
14
|
'app/models',
|
17
15
|
'app/models/theme.rb',
|
18
16
|
'features',
|
@@ -83,6 +81,6 @@ Gem::Specification.new do |s|
|
|
83
81
|
'themes/hemingway/views/layouts/application.html.erb'
|
84
82
|
]
|
85
83
|
|
86
|
-
|
84
|
+
|
87
85
|
s.add_dependency('refinerycms', '>= 0.9.8')
|
88
86
|
end
|
metadata
CHANGED
@@ -1,13 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: refinerycms-theming
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 37
|
5
5
|
prerelease: false
|
6
6
|
segments:
|
7
7
|
- 0
|
8
8
|
- 9
|
9
9
|
- 8
|
10
|
-
|
10
|
+
- 1
|
11
|
+
version: 0.9.8.1
|
11
12
|
platform: ruby
|
12
13
|
authors:
|
13
14
|
- Resolve Digital
|
@@ -15,7 +16,7 @@ autorequire:
|
|
15
16
|
bindir: bin
|
16
17
|
cert_chain: []
|
17
18
|
|
18
|
-
date: 2010-09-
|
19
|
+
date: 2010-09-28 00:00:00 +13:00
|
19
20
|
default_executable:
|
20
21
|
dependencies:
|
21
22
|
- !ruby/object:Gem::Dependency
|
@@ -43,7 +44,6 @@ extensions: []
|
|
43
44
|
extra_rdoc_files: []
|
44
45
|
|
45
46
|
files:
|
46
|
-
- app/helpers/themes_helper.rb
|
47
47
|
- app/models/theme.rb
|
48
48
|
- features/step_definitions/theme_generator_steps.rb
|
49
49
|
- features/theme_generator.feature
|
@@ -1,34 +0,0 @@
|
|
1
|
-
module ThemesHelper
|
2
|
-
def image_tag(source, options={})
|
3
|
-
theme = (options.delete(:theme) == true)
|
4
|
-
tag = super
|
5
|
-
# inject /theme/ into the image tag src if this is themed.
|
6
|
-
tag.gsub!(/src=[\"|\']/) { |m| "#{m}/theme/" }.gsub!("//", "/") if theme
|
7
|
-
tag.gsub(/theme=(.+?)\ /, '') # we need to remove any addition of theme='false' etc.
|
8
|
-
end
|
9
|
-
|
10
|
-
def javascript_include_tag(*sources)
|
11
|
-
theme = (arguments = sources.dup).extract_options![:theme] == true # don't ruin the current sources object
|
12
|
-
tag = super
|
13
|
-
# inject /theme/ into the javascript include tag src if this is themed.
|
14
|
-
tag.gsub!(/\/javascripts\//, "/theme/javascripts/") if theme
|
15
|
-
tag.gsub(/theme=(.+?)\ /, '') # we need to remove any addition of theme='false' etc.
|
16
|
-
end
|
17
|
-
|
18
|
-
def stylesheet_link_tag(*sources)
|
19
|
-
theme = (arguments = sources.dup).extract_options![:theme] == true # don't ruin the current sources object
|
20
|
-
tag = super
|
21
|
-
# inject /theme/ into the stylesheet link tag href if this is themed.
|
22
|
-
tag.gsub!(/\/stylesheets\//, "/theme/stylesheets/") if theme
|
23
|
-
tag.gsub(/theme=(.+?)\ /, '') # we need to remove any addition of theme='false' etc.
|
24
|
-
end
|
25
|
-
|
26
|
-
def image_submit_tag(source, options = {})
|
27
|
-
theme = (options.delete(:theme) == true)
|
28
|
-
|
29
|
-
tag = super
|
30
|
-
# inject /theme/ into the image tag src if this is themed.
|
31
|
-
tag.gsub!(/src=[\"|\']/) { |m| "#{m}/theme/" }.gsub!("//", "/") if theme
|
32
|
-
tag.gsub(/theme=(.+?)\ /, '') # we need to remove any addition of theme='false' etc.
|
33
|
-
end
|
34
|
-
end
|