lolita 3.1.15 → 3.1.16

Sign up to get free protection for your applications and to get access to all the features.
data/History.rdoc CHANGED
@@ -1,3 +1,8 @@
1
+ === Version 3.1.16 / 2011-08-30
2
+ * Bug fixes
3
+ * Component helper name detection fixed
4
+ * Nested forms normal style fixed
5
+
1
6
  === Version 3.1.15 / 2011-08-29
2
7
  * Enhancements
3
8
  * By default content tab excludes technical columns, like created_at, updated_at etc.
data/README.rdoc CHANGED
@@ -84,7 +84,7 @@ call component, like
84
84
  render_component :"lolita/configuration/list", :display
85
85
  and this name is used to add callback for component. As components is not related to specific class, then there
86
86
  are only one way to define callback for them.
87
- Lolita::Hooks.component(:"lolita/configuration/list/display").before do
87
+ Lolita::Hooks.component(:"/lolita/configuration/list/display").before do
88
88
  "<div>My Custom text</div>"
89
89
  end
90
90
  That what are inside of blocks depends on place where you define callback if it is in <i>.rb</i> file, than you
@@ -92,7 +92,7 @@ should put HTML in quotes, if in <i>.erb</i> and similar files then there is no
92
92
  Ruby code only return last line, so you should probably define HTML as shown in previous example.
93
93
  For <b>around</b> callback if you pass block, then original content will be replaced with that, but if you want
94
94
  to let original content inside of your block content than it is done like this with #let_content method.
95
- Lolita::Hooks.component(:"lolita/configuration/list/display").around do
95
+ Lolita::Hooks.component(:"/lolita/configuration/list/display").around do
96
96
  "<div style='color:red'>#{let_content}</div>"
97
97
  end
98
98
  ==License
data/VERSION CHANGED
@@ -1 +1 @@
1
- 3.1.15
1
+ 3.1.16
@@ -1,4 +1,4 @@
1
- <div class = "fields" >
1
+ <div class = "<%=nested_form.field_style == :normal ? "" : "fields"%>" >
2
2
  <% nested_form.fields.each do |field| %>
3
3
  <% if nested_form.field_style == :normal %>
4
4
  <%= render_component "lolita/configuration/field", :display, :field => field %>
@@ -94,22 +94,29 @@ module Lolita
94
94
  # will_use_component :"lolita/configuration/list"
95
95
  def will_use_component component_name
96
96
  helpers_for_component(component_name) do |possible_component_name|
97
- @used_component_helpers||=[]
97
+ @used_component_helpers||={}
98
98
  unless @used_component_helpers.include?(possible_component_name)
99
99
  if path=component_helper_path(possible_component_name)
100
100
  self.class.class_eval do
101
101
  require path
102
102
  end
103
103
  class_name=possible_component_name.to_s.camelize
104
- self.extend("Components::#{class_name}Component".constantize) rescue nil #FIXME too slow
104
+ helper_module = "Components::#{class_name}Component".constantize rescue nil
105
+ if helper_module
106
+ self.extend(helper_module)
107
+ end
108
+ end
109
+ @used_component_helpers[possible_component_name] = helper_module
110
+ else
111
+ if helper_module = @used_component_helpers[possible_component_name]
112
+ self.extend(helper_module)
105
113
  end
106
- @used_component_helpers<<possible_component_name
107
114
  end
108
115
  end
109
116
  end
110
117
 
111
118
  def helpers_for_component component_name
112
- names=component_name.to_s.split("/")
119
+ names=component_name.to_s.gsub(/^\//,"").split("/")
113
120
  start_index=1 # first is lolita
114
121
  start_index.upto(names.size) do |index|
115
122
  yield names.slice(0..index).join("/")
data/lolita.gemspec CHANGED
@@ -5,11 +5,11 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = %q{lolita}
8
- s.version = "3.1.15"
8
+ s.version = "3.1.16"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = [%q{ITHouse (Latvia) and Arturs Meisters}]
12
- s.date = %q{2011-08-29}
12
+ s.date = %q{2011-08-30}
13
13
  s.description = %q{Great Rails CMS, that turns your business logic into good-looking, fully functional workspace. }
14
14
  s.email = %q{support@ithouse.lv}
15
15
  s.extra_rdoc_files = [
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: lolita
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.1.15
4
+ version: 3.1.16
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,11 +9,11 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2011-08-29 00:00:00.000000000Z
12
+ date: 2011-08-30 00:00:00.000000000Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: rails
16
- requirement: &73616060 !ruby/object:Gem::Requirement
16
+ requirement: &69808170 !ruby/object:Gem::Requirement
17
17
  none: false
18
18
  requirements:
19
19
  - - ~>
@@ -21,10 +21,10 @@ dependencies:
21
21
  version: 3.0.10
22
22
  type: :runtime
23
23
  prerelease: false
24
- version_requirements: *73616060
24
+ version_requirements: *69808170
25
25
  - !ruby/object:Gem::Dependency
26
26
  name: kaminari
27
- requirement: &73615600 !ruby/object:Gem::Requirement
27
+ requirement: &69807300 !ruby/object:Gem::Requirement
28
28
  none: false
29
29
  requirements:
30
30
  - - ~>
@@ -32,10 +32,10 @@ dependencies:
32
32
  version: 0.12.4
33
33
  type: :runtime
34
34
  prerelease: false
35
- version_requirements: *73615600
35
+ version_requirements: *69807300
36
36
  - !ruby/object:Gem::Dependency
37
37
  name: abstract
38
- requirement: &73615120 !ruby/object:Gem::Requirement
38
+ requirement: &69806460 !ruby/object:Gem::Requirement
39
39
  none: false
40
40
  requirements:
41
41
  - - ! '>='
@@ -43,10 +43,10 @@ dependencies:
43
43
  version: '0'
44
44
  type: :runtime
45
45
  prerelease: false
46
- version_requirements: *73615120
46
+ version_requirements: *69806460
47
47
  - !ruby/object:Gem::Dependency
48
48
  name: builder
49
- requirement: &73614730 !ruby/object:Gem::Requirement
49
+ requirement: &69805420 !ruby/object:Gem::Requirement
50
50
  none: false
51
51
  requirements:
52
52
  - - ~>
@@ -54,10 +54,10 @@ dependencies:
54
54
  version: 2.1.2
55
55
  type: :runtime
56
56
  prerelease: false
57
- version_requirements: *73614730
57
+ version_requirements: *69805420
58
58
  - !ruby/object:Gem::Dependency
59
59
  name: jeweler
60
- requirement: &73614340 !ruby/object:Gem::Requirement
60
+ requirement: &69804570 !ruby/object:Gem::Requirement
61
61
  none: false
62
62
  requirements:
63
63
  - - ~>
@@ -65,10 +65,10 @@ dependencies:
65
65
  version: 1.5.2
66
66
  type: :development
67
67
  prerelease: false
68
- version_requirements: *73614340
68
+ version_requirements: *69804570
69
69
  - !ruby/object:Gem::Dependency
70
70
  name: rspec
71
- requirement: &73613780 !ruby/object:Gem::Requirement
71
+ requirement: &69803630 !ruby/object:Gem::Requirement
72
72
  none: false
73
73
  requirements:
74
74
  - - ~>
@@ -76,10 +76,10 @@ dependencies:
76
76
  version: 2.6.0
77
77
  type: :development
78
78
  prerelease: false
79
- version_requirements: *73613780
79
+ version_requirements: *69803630
80
80
  - !ruby/object:Gem::Dependency
81
81
  name: rspec-rails
82
- requirement: &73613080 !ruby/object:Gem::Requirement
82
+ requirement: &69801110 !ruby/object:Gem::Requirement
83
83
  none: false
84
84
  requirements:
85
85
  - - ~>
@@ -87,10 +87,10 @@ dependencies:
87
87
  version: 2.6.0
88
88
  type: :development
89
89
  prerelease: false
90
- version_requirements: *73613080
90
+ version_requirements: *69801110
91
91
  - !ruby/object:Gem::Dependency
92
92
  name: factory_girl
93
- requirement: &73600600 !ruby/object:Gem::Requirement
93
+ requirement: &69798870 !ruby/object:Gem::Requirement
94
94
  none: false
95
95
  requirements:
96
96
  - - ! '>='
@@ -98,10 +98,10 @@ dependencies:
98
98
  version: '0'
99
99
  type: :development
100
100
  prerelease: false
101
- version_requirements: *73600600
101
+ version_requirements: *69798870
102
102
  - !ruby/object:Gem::Dependency
103
103
  name: ffaker
104
- requirement: &73599670 !ruby/object:Gem::Requirement
104
+ requirement: &69796060 !ruby/object:Gem::Requirement
105
105
  none: false
106
106
  requirements:
107
107
  - - ! '>='
@@ -109,10 +109,10 @@ dependencies:
109
109
  version: '0'
110
110
  type: :development
111
111
  prerelease: false
112
- version_requirements: *73599670
112
+ version_requirements: *69796060
113
113
  - !ruby/object:Gem::Dependency
114
114
  name: ruby-debug19
115
- requirement: &73597230 !ruby/object:Gem::Requirement
115
+ requirement: &69792800 !ruby/object:Gem::Requirement
116
116
  none: false
117
117
  requirements:
118
118
  - - ! '>='
@@ -120,10 +120,10 @@ dependencies:
120
120
  version: '0'
121
121
  type: :development
122
122
  prerelease: false
123
- version_requirements: *73597230
123
+ version_requirements: *69792800
124
124
  - !ruby/object:Gem::Dependency
125
125
  name: cucumber-rails
126
- requirement: &73596840 !ruby/object:Gem::Requirement
126
+ requirement: &69789790 !ruby/object:Gem::Requirement
127
127
  none: false
128
128
  requirements:
129
129
  - - ! '>='
@@ -131,10 +131,10 @@ dependencies:
131
131
  version: '0'
132
132
  type: :development
133
133
  prerelease: false
134
- version_requirements: *73596840
134
+ version_requirements: *69789790
135
135
  - !ruby/object:Gem::Dependency
136
136
  name: capybara
137
- requirement: &73596270 !ruby/object:Gem::Requirement
137
+ requirement: &69787330 !ruby/object:Gem::Requirement
138
138
  none: false
139
139
  requirements:
140
140
  - - ! '>='
@@ -142,10 +142,10 @@ dependencies:
142
142
  version: '0'
143
143
  type: :development
144
144
  prerelease: false
145
- version_requirements: *73596270
145
+ version_requirements: *69787330
146
146
  - !ruby/object:Gem::Dependency
147
147
  name: database_cleaner
148
- requirement: &73595610 !ruby/object:Gem::Requirement
148
+ requirement: &69785560 !ruby/object:Gem::Requirement
149
149
  none: false
150
150
  requirements:
151
151
  - - ! '>='
@@ -153,10 +153,10 @@ dependencies:
153
153
  version: '0'
154
154
  type: :development
155
155
  prerelease: false
156
- version_requirements: *73595610
156
+ version_requirements: *69785560
157
157
  - !ruby/object:Gem::Dependency
158
158
  name: akephalos
159
- requirement: &73594910 !ruby/object:Gem::Requirement
159
+ requirement: &69784660 !ruby/object:Gem::Requirement
160
160
  none: false
161
161
  requirements:
162
162
  - - ! '>='
@@ -164,7 +164,7 @@ dependencies:
164
164
  version: '0'
165
165
  type: :development
166
166
  prerelease: false
167
- version_requirements: *73594910
167
+ version_requirements: *69784660
168
168
  description: ! 'Great Rails CMS, that turns your business logic into good-looking,
169
169
  fully functional workspace. '
170
170
  email: support@ithouse.lv
@@ -507,7 +507,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
507
507
  version: '0'
508
508
  segments:
509
509
  - 0
510
- hash: 91287757
510
+ hash: 833067379
511
511
  required_rubygems_version: !ruby/object:Gem::Requirement
512
512
  none: false
513
513
  requirements: