webs 0.1.39 → 0.1.40
Sign up to get free protection for your applications and to get access to all the features.
- data/Rakefile +1 -1
- data/lib/cache/cache.rb +1 -0
- data/lib/controller/webs_controller.rb +3 -2
- data/lib/helper/tags.rb +10 -6
- data/lib/webs.rb +1 -1
- data/webs.gemspec +2 -2
- metadata +14 -2
data/Rakefile
CHANGED
data/lib/cache/cache.rb
CHANGED
@@ -8,14 +8,15 @@ module Webs
|
|
8
8
|
end
|
9
9
|
|
10
10
|
module ClassMethods
|
11
|
+
mattr_accessor :disable_cache
|
11
12
|
def webs_helpers
|
12
13
|
helper Webs::Helper::Application
|
13
14
|
helper Webs::Helper::Params
|
14
15
|
helper Webs::Helper::Tags
|
15
|
-
helper Webs::Cache
|
16
|
+
helper Webs::Cache unless disable_cache
|
16
17
|
include Webs::Helper::Params
|
17
18
|
include Webs::Helper::Tags
|
18
|
-
include Webs::Cache
|
19
|
+
include Webs::Cache unless disable_cache
|
19
20
|
helper_method :webs_site
|
20
21
|
helper_method :webs_app_name
|
21
22
|
helper_method :webs_permapath
|
data/lib/helper/tags.rb
CHANGED
@@ -51,7 +51,7 @@ module Webs
|
|
51
51
|
|
52
52
|
html_safe_check( tag )
|
53
53
|
end
|
54
|
-
|
54
|
+
|
55
55
|
private
|
56
56
|
def html_safe_check s
|
57
57
|
return s if s.blank?
|
@@ -64,14 +64,18 @@ module Webs
|
|
64
64
|
|
65
65
|
def parse_fwml_options tagname, options
|
66
66
|
s = ''
|
67
|
-
|
68
|
-
|
67
|
+
intl_attrs = {}
|
68
|
+
options.keys.each do |k|
|
69
|
+
if k.to_s.ends_with?( '_intl' )
|
70
|
+
option_name = k.to_s.gsub( /_intl$/, '' )
|
71
|
+
intl_attrs[option_name] = options.delete( k )
|
72
|
+
end
|
69
73
|
end
|
70
|
-
if
|
71
|
-
s +=
|
74
|
+
if intl_attrs
|
75
|
+
s += intl_attrs.keys.collect{ |k| %[<fw:fwml-attribute name="#{k}"><fw:intl>#{intl_attrs[k]}</fw:intl></fw:fwml-attribute>] }.join( "\n" )
|
72
76
|
end
|
73
77
|
if tagname == 'intl' && ( tokens = options.delete( :tokens ) )
|
74
|
-
s +=
|
78
|
+
s += tokens.keys.collect{ |k| %[<fw:intl-token name="#{k}">#{tokens[k]}</fw:intl-token>] }.join( "\n" )
|
75
79
|
end
|
76
80
|
s
|
77
81
|
end
|
data/lib/webs.rb
CHANGED
data/webs.gemspec
CHANGED
@@ -2,11 +2,11 @@
|
|
2
2
|
|
3
3
|
Gem::Specification.new do |s|
|
4
4
|
s.name = %q{webs}
|
5
|
-
s.version = "0.1.
|
5
|
+
s.version = "0.1.40"
|
6
6
|
|
7
7
|
s.required_rubygems_version = Gem::Requirement.new(">= 1.2") if s.respond_to? :required_rubygems_version=
|
8
8
|
s.authors = ["Chuck Olczak"]
|
9
|
-
s.date = %q{2011-06-
|
9
|
+
s.date = %q{2011-06-08}
|
10
10
|
s.description = %q{Reusable webs stuff.}
|
11
11
|
s.email = %q{chuck@webs.com}
|
12
12
|
gemfiles = [
|
metadata
CHANGED
@@ -1,8 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: webs
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
+
hash: 75
|
4
5
|
prerelease:
|
5
|
-
|
6
|
+
segments:
|
7
|
+
- 0
|
8
|
+
- 1
|
9
|
+
- 40
|
10
|
+
version: 0.1.40
|
6
11
|
platform: ruby
|
7
12
|
authors:
|
8
13
|
- Chuck Olczak
|
@@ -10,7 +15,7 @@ autorequire:
|
|
10
15
|
bindir: bin
|
11
16
|
cert_chain: []
|
12
17
|
|
13
|
-
date: 2011-06-
|
18
|
+
date: 2011-06-08 00:00:00 -04:00
|
14
19
|
default_executable:
|
15
20
|
dependencies: []
|
16
21
|
|
@@ -81,12 +86,19 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
81
86
|
requirements:
|
82
87
|
- - ">="
|
83
88
|
- !ruby/object:Gem::Version
|
89
|
+
hash: 3
|
90
|
+
segments:
|
91
|
+
- 0
|
84
92
|
version: "0"
|
85
93
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
86
94
|
none: false
|
87
95
|
requirements:
|
88
96
|
- - ">="
|
89
97
|
- !ruby/object:Gem::Version
|
98
|
+
hash: 11
|
99
|
+
segments:
|
100
|
+
- 1
|
101
|
+
- 2
|
90
102
|
version: "1.2"
|
91
103
|
requirements: []
|
92
104
|
|