merb_laszlo 0.5.0 → 0.9.5
Sign up to get free protection for your applications and to get access to all the features.
- data/Rakefile +2 -2
- data/lib/merb-laszlo/helpers.rb +30 -4
- metadata +3 -3
data/Rakefile
CHANGED
@@ -19,7 +19,7 @@ GEM_EMAIL = "ykatz@engineyard.com"
|
|
19
19
|
|
20
20
|
GEM_NAME = "merb_laszlo"
|
21
21
|
PKG_BUILD = ENV['PKG_BUILD'] ? '.' + ENV['PKG_BUILD'] : ''
|
22
|
-
GEM_VERSION = "0.5
|
22
|
+
GEM_VERSION = "0.9.5" + PKG_BUILD
|
23
23
|
|
24
24
|
RELEASE_NAME = "REL #{GEM_VERSION}"
|
25
25
|
|
@@ -37,7 +37,7 @@ spec = Gem::Specification.new do |s|
|
|
37
37
|
s.author = GEM_AUTHOR
|
38
38
|
s.email = GEM_EMAIL
|
39
39
|
s.homepage = PROJECT_URL
|
40
|
-
s.add_dependency('merb-core', '>= 0.9.
|
40
|
+
s.add_dependency('merb-core', '>= 0.9.5')
|
41
41
|
s.require_path = 'lib'
|
42
42
|
s.files = %w(LICENSE README Rakefile) + Dir.glob("{lib,specs}/**/*")
|
43
43
|
end
|
data/lib/merb-laszlo/helpers.rb
CHANGED
@@ -23,14 +23,21 @@ module Merb
|
|
23
23
|
self_closing_tag(:text, {:text => text}.merge(opts))
|
24
24
|
end
|
25
25
|
|
26
|
-
def lz_window(width, height, opts = {}, &blk)
|
27
|
-
|
26
|
+
def lz_window(width = nil, height = nil, opts = {}, &blk)
|
27
|
+
mrg = {:resizable => true}
|
28
|
+
mrg.merge!(:width => width) if width
|
29
|
+
mrg.merge!(:height => height) if height
|
30
|
+
opts = mrg.merge(opts)
|
28
31
|
tag(:window, nil, opts, &blk)
|
29
32
|
end
|
30
33
|
|
31
|
-
def
|
34
|
+
def add_lz_resource(src)
|
32
35
|
@lz_resources ||= []
|
33
|
-
@lz_resources << src
|
36
|
+
@lz_resources << src unless URI.parse(src).scheme
|
37
|
+
end
|
38
|
+
|
39
|
+
def lz_resource(name, src, opts = {})
|
40
|
+
add_lz_resource(src)
|
34
41
|
opts.merge!(:name => name, :src => src)
|
35
42
|
self_closing_tag(:resource, opts)
|
36
43
|
end
|
@@ -40,6 +47,25 @@ module Merb
|
|
40
47
|
options.merge!(:args => args.map {|x| x.to_s}.join(", ")) unless args.empty?
|
41
48
|
tag(:handler, capture(&blk), options)
|
42
49
|
end
|
50
|
+
|
51
|
+
def lz_attr(name, value, type = nil)
|
52
|
+
mrg = {:name => name, :value => value}
|
53
|
+
mrg.merge!(:type => type) if type
|
54
|
+
self_closing_tag(:attribute, mrg)
|
55
|
+
end
|
56
|
+
|
57
|
+
def lz_def(name, *args, &blk)
|
58
|
+
tag(:method, blk ? capture(&blk) : "", :name => name, :args => args.map {|x| x.to_s}.join(","))
|
59
|
+
end
|
60
|
+
|
61
|
+
def lz_view(width, height, bgcolor, options = {}, &blk)
|
62
|
+
tag(:view, blk ? capture(&blk) : "", {:width => width, :height => height, :bgcolor => bgcolor}.merge(options))
|
63
|
+
end
|
64
|
+
|
65
|
+
def lz_resource_view(src, options = {}, &blk)
|
66
|
+
add_lz_resource(src)
|
67
|
+
tag(:view, blk ? capture(&blk) : "", {:resource => src}.merge(options))
|
68
|
+
end
|
43
69
|
|
44
70
|
end
|
45
71
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: merb_laszlo
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.5
|
4
|
+
version: 0.9.5
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Yehuda Katz
|
@@ -9,7 +9,7 @@ autorequire:
|
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
11
|
|
12
|
-
date: 2008-08-
|
12
|
+
date: 2008-08-26 00:00:00 +03:00
|
13
13
|
default_executable:
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
@@ -20,7 +20,7 @@ dependencies:
|
|
20
20
|
requirements:
|
21
21
|
- - ">="
|
22
22
|
- !ruby/object:Gem::Version
|
23
|
-
version: 0.9.
|
23
|
+
version: 0.9.5
|
24
24
|
version:
|
25
25
|
description: Merb plugin that provides support for Laszlo.
|
26
26
|
email: ykatz@engineyard.com
|