netzke-basepack 0.5.7 → 0.5.8
Sign up to get free protection for your applications and to get access to all the features.
- data/CHANGELOG.rdoc +4 -0
- data/Rakefile +2 -1
- data/lib/netzke/active_record/basepack.rb +13 -11
- metadata +50 -17
data/CHANGELOG.rdoc
CHANGED
@@ -1,3 +1,7 @@
|
|
1
|
+
= v0.5.8 - 2010-03-12
|
2
|
+
* Fix: GertThiel's method_missing-related fix enabling better compatibility with other Ruby libs
|
3
|
+
* Fix: acts_as_list runtime dependency
|
4
|
+
|
1
5
|
= v0.5.7 - 2010-02-26
|
2
6
|
* Regression: column config for GridPanel again accepts a renderer along with its parameters (as array, where the first element is the renderers name, the second - the parameters passed to the renderer, e.g.: :renderer => ["date", "y-m-d"])
|
3
7
|
* Fix: Window resize/move now works correctly
|
data/Rakefile
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
begin
|
2
2
|
require 'jeweler'
|
3
3
|
Jeweler::Tasks.new do |gemspec|
|
4
|
-
gemspec.version = "0.5.
|
4
|
+
gemspec.version = "0.5.8"
|
5
5
|
gemspec.name = "netzke-basepack"
|
6
6
|
gemspec.summary = "Pre-built Rails + ExtJS widgets for your RIA"
|
7
7
|
gemspec.description = "A set of full-featured extendible Netzke widgets (such as FormPanel, GridPanel, Window, BorderLayoutPanel, etc) which can be used as building block for your RIA"
|
@@ -12,6 +12,7 @@ begin
|
|
12
12
|
gemspec.add_dependency("netzke-core", ">=0.5.1")
|
13
13
|
gemspec.add_dependency("searchlogic", ">=2.0.0")
|
14
14
|
gemspec.add_dependency("will_paginate", ">=2.0.0")
|
15
|
+
gemspec.add_dependency("acts_as_list", ">=0.1.2")
|
15
16
|
end
|
16
17
|
Jeweler::GemcutterTasks.new
|
17
18
|
rescue LoadError
|
@@ -4,6 +4,8 @@ module Netzke::ActiveRecord
|
|
4
4
|
# Provides extensions to all ActiveRecord-based classes
|
5
5
|
module Basepack
|
6
6
|
def self.included(base)
|
7
|
+
base.alias_method_chain :method_missing, :basepack
|
8
|
+
base.alias_method_chain :respond_to?, :basepack
|
7
9
|
base.extend ClassMethods
|
8
10
|
end
|
9
11
|
|
@@ -17,9 +19,9 @@ module Netzke::ActiveRecord
|
|
17
19
|
# Book.first.genre = Genre.find_by_name('Fantasy')
|
18
20
|
#
|
19
21
|
# The result - easier forms and grids that handle nested models: simply specify column/field name as "genre__name".
|
20
|
-
def
|
22
|
+
def method_missing_with_basepack(method, *args, &block)
|
21
23
|
# if refering to a column, just pass it to the original method_missing
|
22
|
-
return
|
24
|
+
return method_missing_without_basepack(method, *args, &block) if self.class.column_names.include?(method.to_s)
|
23
25
|
|
24
26
|
split = method.to_s.split(/\.|__/)
|
25
27
|
if split.size > 1
|
@@ -41,10 +43,10 @@ module Netzke::ActiveRecord
|
|
41
43
|
logger.debug "!!! Couldn't find association #{split.first} by #{assoc_method} '#{args.first}'"
|
42
44
|
end
|
43
45
|
else
|
44
|
-
|
46
|
+
method_missing_without_basepack(method, *args, &block)
|
45
47
|
end
|
46
48
|
else
|
47
|
-
|
49
|
+
method_missing_without_basepack(method, *args, &block)
|
48
50
|
end
|
49
51
|
else
|
50
52
|
res = self
|
@@ -52,18 +54,18 @@ module Netzke::ActiveRecord
|
|
52
54
|
if res.respond_to?(m)
|
53
55
|
res = res.send(m) unless res.nil?
|
54
56
|
else
|
55
|
-
res.nil? ? nil :
|
57
|
+
res.nil? ? nil : method_missing_without_basepack(method, *args, &block)
|
56
58
|
end
|
57
59
|
end
|
58
60
|
res
|
59
61
|
end
|
60
62
|
else
|
61
|
-
|
63
|
+
method_missing_without_basepack(method, *args, &block)
|
62
64
|
end
|
63
65
|
end
|
64
66
|
|
65
67
|
# Make respond_to? return true for association assignment method, like "genre__name="
|
66
|
-
def
|
68
|
+
def respond_to_with_basepack?(method, include_private = false)
|
67
69
|
split = method.to_s.split(/__/)
|
68
70
|
if split.size > 1
|
69
71
|
if split.last =~ /=$/
|
@@ -74,17 +76,17 @@ module Netzke::ActiveRecord
|
|
74
76
|
if assoc
|
75
77
|
assoc.klass.respond_to?("find_by_#{assoc_method}")
|
76
78
|
else
|
77
|
-
|
79
|
+
respond_to_without_basepack?(method, include_private)
|
78
80
|
end
|
79
81
|
else
|
80
|
-
|
82
|
+
respond_to_without_basepack?(method, include_private)
|
81
83
|
end
|
82
84
|
else
|
83
85
|
# self.respond_to?(split.first) ? self.send(split.first).respond_to?(split[1..-1].join("__")) : false
|
84
|
-
|
86
|
+
respond_to_without_basepack?(method, include_private)
|
85
87
|
end
|
86
88
|
else
|
87
|
-
|
89
|
+
respond_to_without_basepack?(method, include_private)
|
88
90
|
end
|
89
91
|
end
|
90
92
|
|
metadata
CHANGED
@@ -1,7 +1,12 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: netzke-basepack
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
|
4
|
+
prerelease: false
|
5
|
+
segments:
|
6
|
+
- 0
|
7
|
+
- 5
|
8
|
+
- 8
|
9
|
+
version: 0.5.8
|
5
10
|
platform: ruby
|
6
11
|
authors:
|
7
12
|
- Sergei Kozlov
|
@@ -9,39 +14,65 @@ autorequire:
|
|
9
14
|
bindir: bin
|
10
15
|
cert_chain: []
|
11
16
|
|
12
|
-
date: 2010-
|
17
|
+
date: 2010-03-12 00:00:00 -03:00
|
13
18
|
default_executable:
|
14
19
|
dependencies:
|
15
20
|
- !ruby/object:Gem::Dependency
|
16
21
|
name: netzke-core
|
17
|
-
|
18
|
-
|
19
|
-
version_requirements: !ruby/object:Gem::Requirement
|
22
|
+
prerelease: false
|
23
|
+
requirement: &id001 !ruby/object:Gem::Requirement
|
20
24
|
requirements:
|
21
25
|
- - ">="
|
22
26
|
- !ruby/object:Gem::Version
|
27
|
+
segments:
|
28
|
+
- 0
|
29
|
+
- 5
|
30
|
+
- 1
|
23
31
|
version: 0.5.1
|
24
|
-
|
32
|
+
type: :runtime
|
33
|
+
version_requirements: *id001
|
25
34
|
- !ruby/object:Gem::Dependency
|
26
35
|
name: searchlogic
|
27
|
-
|
28
|
-
|
29
|
-
version_requirements: !ruby/object:Gem::Requirement
|
36
|
+
prerelease: false
|
37
|
+
requirement: &id002 !ruby/object:Gem::Requirement
|
30
38
|
requirements:
|
31
39
|
- - ">="
|
32
40
|
- !ruby/object:Gem::Version
|
41
|
+
segments:
|
42
|
+
- 2
|
43
|
+
- 0
|
44
|
+
- 0
|
33
45
|
version: 2.0.0
|
34
|
-
|
46
|
+
type: :runtime
|
47
|
+
version_requirements: *id002
|
35
48
|
- !ruby/object:Gem::Dependency
|
36
49
|
name: will_paginate
|
37
|
-
|
38
|
-
|
39
|
-
version_requirements: !ruby/object:Gem::Requirement
|
50
|
+
prerelease: false
|
51
|
+
requirement: &id003 !ruby/object:Gem::Requirement
|
40
52
|
requirements:
|
41
53
|
- - ">="
|
42
54
|
- !ruby/object:Gem::Version
|
55
|
+
segments:
|
56
|
+
- 2
|
57
|
+
- 0
|
58
|
+
- 0
|
43
59
|
version: 2.0.0
|
44
|
-
|
60
|
+
type: :runtime
|
61
|
+
version_requirements: *id003
|
62
|
+
- !ruby/object:Gem::Dependency
|
63
|
+
name: acts_as_list
|
64
|
+
prerelease: false
|
65
|
+
requirement: &id004 !ruby/object:Gem::Requirement
|
66
|
+
requirements:
|
67
|
+
- - ">="
|
68
|
+
- !ruby/object:Gem::Version
|
69
|
+
segments:
|
70
|
+
- 0
|
71
|
+
- 1
|
72
|
+
- 2
|
73
|
+
version: 0.1.2
|
74
|
+
type: :runtime
|
75
|
+
version_requirements: *id004
|
45
76
|
description: A set of full-featured extendible Netzke widgets (such as FormPanel, GridPanel, Window, BorderLayoutPanel, etc) which can be used as building block for your RIA
|
46
77
|
email: sergei@playcode.nl
|
47
78
|
executables: []
|
@@ -158,18 +189,20 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
158
189
|
requirements:
|
159
190
|
- - ">="
|
160
191
|
- !ruby/object:Gem::Version
|
192
|
+
segments:
|
193
|
+
- 0
|
161
194
|
version: "0"
|
162
|
-
version:
|
163
195
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
164
196
|
requirements:
|
165
197
|
- - ">="
|
166
198
|
- !ruby/object:Gem::Version
|
199
|
+
segments:
|
200
|
+
- 0
|
167
201
|
version: "0"
|
168
|
-
version:
|
169
202
|
requirements: []
|
170
203
|
|
171
204
|
rubyforge_project: netzke-basepack
|
172
|
-
rubygems_version: 1.3.
|
205
|
+
rubygems_version: 1.3.6
|
173
206
|
signing_key:
|
174
207
|
specification_version: 3
|
175
208
|
summary: Pre-built Rails + ExtJS widgets for your RIA
|