netzke-core 0.7.0 → 0.7.1

Sign up to get free protection for your applications and to get access to all the features.
data/CHANGELOG.rdoc CHANGED
@@ -1,3 +1,7 @@
1
+ = v0.7.1 - 2011-08-17
2
+ * bug fix
3
+ * Multiple compound Netzke components in the same Rails view were causing JS errors
4
+
1
5
  = v0.7.0 - 2011-08-09
2
6
  * Ext JS 4 compatibility
3
7
 
@@ -32,7 +36,7 @@
32
36
  * feedback in favor of netzkeFeedback
33
37
  * Ext.container.Container#instantiateChild should not be used
34
38
 
35
- = v0.6.7 - to be released
39
+ = v0.6.7 - 2011-08-16
36
40
  * enhancements
37
41
  * No more using +method_missing+ for invoking endpoints.
38
42
  * New "cache" option for `netzke_init` which gets passed to `javascript_include_tag` (no support for css caching of this type yet)
@@ -3,7 +3,7 @@ module Netzke
3
3
  module Version
4
4
  MAJOR = 0
5
5
  MINOR = 7
6
- PATCH = 0
6
+ PATCH = 1
7
7
 
8
8
  STRING = [MAJOR, MINOR, PATCH].compact.join('.')
9
9
  end
@@ -52,8 +52,8 @@ module Netzke
52
52
 
53
53
  content_for :netzke_on_ready, raw("#{cmp.js_component_instance}\n\n#{cmp.js_component_render}")
54
54
 
55
- # Now mark this component's class as rendered (by storing it's xtype), so that we only generate it once per view
56
- @rendered_classes << class_name.to_s.gsub("::", "").downcase unless @rendered_classes.include?(class_name)
55
+ # Now mark all this component's dependency classes (including self) as rendered (by storing their xtypes), so that we only generate a class once per view
56
+ @rendered_classes = (@rendered_classes + cmp.dependency_classes.map(&:js_xtype)).uniq
57
57
 
58
58
  # Return the html for this component
59
59
  raw(cmp.js_component_html)
data/netzke-core.gemspec CHANGED
@@ -5,11 +5,11 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = %q{netzke-core}
8
- s.version = "0.7.0"
8
+ s.version = "0.7.1"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["Sergei Kozlov"]
12
- s.date = %q{2011-08-09}
12
+ s.date = %q{2011-08-17}
13
13
  s.description = %q{Allows building ExtJS/Rails reusable code in a DRY way}
14
14
  s.email = %q{sergei@playcode.nl}
15
15
  s.extra_rdoc_files = [
@@ -132,7 +132,7 @@ Gem::Specification.new do |s|
132
132
  "test/rails_app/app/components/touch/simple_carousel.rb",
133
133
  "test/rails_app/app/controllers/application_controller.rb",
134
134
  "test/rails_app/app/controllers/components_controller.rb",
135
- "test/rails_app/app/controllers/multiple_components_controller.rb",
135
+ "test/rails_app/app/controllers/simple_rails_controller.rb",
136
136
  "test/rails_app/app/controllers/touch_controller.rb",
137
137
  "test/rails_app/app/controllers/welcome_controller.rb",
138
138
  "test/rails_app/app/helpers/application_helper.rb",
@@ -142,7 +142,9 @@ Gem::Specification.new do |s|
142
142
  "test/rails_app/app/views/layouts/application.html.erb",
143
143
  "test/rails_app/app/views/layouts/nested.html.erb",
144
144
  "test/rails_app/app/views/layouts/touch.html.erb",
145
- "test/rails_app/app/views/multiple_components/set_one.html.erb",
145
+ "test/rails_app/app/views/simple_rails/multiple_nested.html.erb",
146
+ "test/rails_app/app/views/simple_rails/multiple_of_different_class.html.erb",
147
+ "test/rails_app/app/views/simple_rails/multiple_of_same_class.html.erb",
146
148
  "test/rails_app/config.ru",
147
149
  "test/rails_app/config/application.rb",
148
150
  "test/rails_app/config/boot.rb",
@@ -180,6 +182,7 @@ Gem::Specification.new do |s|
180
182
  "test/rails_app/features/nested_views.feature",
181
183
  "test/rails_app/features/persistence.feature",
182
184
  "test/rails_app/features/plugin.feature",
185
+ "test/rails_app/features/rails_views.feature",
183
186
  "test/rails_app/features/scopes.feature",
184
187
  "test/rails_app/features/step_definitions/custom_css_steps.rb",
185
188
  "test/rails_app/features/step_definitions/generic_steps.rb",
@@ -229,93 +232,6 @@ Gem::Specification.new do |s|
229
232
  s.require_paths = ["lib"]
230
233
  s.rubygems_version = %q{1.6.2}
231
234
  s.summary = %q{Build ExtJS/Rails components with minimum effort}
232
- s.test_files = [
233
- "test/rails_app/app/components/border_layout_panel.rb",
234
- "test/rails_app/app/components/component_loader.rb",
235
- "test/rails_app/app/components/component_with_actions.rb",
236
- "test/rails_app/app/components/component_with_custom_css.rb",
237
- "test/rails_app/app/components/component_with_included_js.rb",
238
- "test/rails_app/app/components/component_with_js_mixin.rb",
239
- "test/rails_app/app/components/component_with_nested_through.rb",
240
- "test/rails_app/app/components/component_with_session_persistence.rb",
241
- "test/rails_app/app/components/deprecated/server_caller.rb",
242
- "test/rails_app/app/components/dynamic_tab_panel.rb",
243
- "test/rails_app/app/components/ext_direct/composite.rb",
244
- "test/rails_app/app/components/ext_direct/details.rb",
245
- "test/rails_app/app/components/ext_direct/selector.rb",
246
- "test/rails_app/app/components/ext_direct/statistics.rb",
247
- "test/rails_app/app/components/extended_component_with_actions.rb",
248
- "test/rails_app/app/components/extended_component_with_js_mixin.rb",
249
- "test/rails_app/app/components/extended_localized_panel.rb",
250
- "test/rails_app/app/components/extended_server_caller.rb",
251
- "test/rails_app/app/components/hello_world_component.rb",
252
- "test/rails_app/app/components/kinda_complex_component.rb",
253
- "test/rails_app/app/components/kinda_complex_component/basic_stuff.rb",
254
- "test/rails_app/app/components/kinda_complex_component/extra_stuff.rb",
255
- "test/rails_app/app/components/loader_of_component_with_custom_css.rb",
256
- "test/rails_app/app/components/localized_panel.rb",
257
- "test/rails_app/app/components/nested_component.rb",
258
- "test/rails_app/app/components/panel_with_plugin.rb",
259
- "test/rails_app/app/components/panel_with_tools.rb",
260
- "test/rails_app/app/components/plugin_with_components.rb",
261
- "test/rails_app/app/components/scoped_components/deep_scoped_components/some_deep_scoped_component.rb",
262
- "test/rails_app/app/components/scoped_components/extended_scoped_component.rb",
263
- "test/rails_app/app/components/scoped_components/some_scoped_component.rb",
264
- "test/rails_app/app/components/server_caller.rb",
265
- "test/rails_app/app/components/server_counter.rb",
266
- "test/rails_app/app/components/simple_component.rb",
267
- "test/rails_app/app/components/simple_panel.rb",
268
- "test/rails_app/app/components/simple_tab_panel.rb",
269
- "test/rails_app/app/components/simple_window.rb",
270
- "test/rails_app/app/components/some_composite.rb",
271
- "test/rails_app/app/components/some_ext_component.rb",
272
- "test/rails_app/app/components/some_plugin.rb",
273
- "test/rails_app/app/components/touch/hello_world_component.rb",
274
- "test/rails_app/app/components/touch/server_caller.rb",
275
- "test/rails_app/app/components/touch/simple_carousel.rb",
276
- "test/rails_app/app/controllers/application_controller.rb",
277
- "test/rails_app/app/controllers/components_controller.rb",
278
- "test/rails_app/app/controllers/multiple_components_controller.rb",
279
- "test/rails_app/app/controllers/touch_controller.rb",
280
- "test/rails_app/app/controllers/welcome_controller.rb",
281
- "test/rails_app/app/helpers/application_helper.rb",
282
- "test/rails_app/app/helpers/touch_helper.rb",
283
- "test/rails_app/config/application.rb",
284
- "test/rails_app/config/boot.rb",
285
- "test/rails_app/config/environment.rb",
286
- "test/rails_app/config/environments/development.rb",
287
- "test/rails_app/config/environments/production.rb",
288
- "test/rails_app/config/environments/test.rb",
289
- "test/rails_app/config/initializers/backtrace_silencers.rb",
290
- "test/rails_app/config/initializers/inflections.rb",
291
- "test/rails_app/config/initializers/mime_types.rb",
292
- "test/rails_app/config/initializers/netzke.rb",
293
- "test/rails_app/config/initializers/secret_token.rb",
294
- "test/rails_app/config/initializers/session_store.rb",
295
- "test/rails_app/config/routes.rb",
296
- "test/rails_app/db/migrate/20110110132720_create_netzke_component_states.rb",
297
- "test/rails_app/db/schema.rb",
298
- "test/rails_app/db/seeds.rb",
299
- "test/rails_app/features/step_definitions/custom_css_steps.rb",
300
- "test/rails_app/features/step_definitions/generic_steps.rb",
301
- "test/rails_app/features/step_definitions/touch_steps.rb",
302
- "test/rails_app/features/step_definitions/web_steps.rb",
303
- "test/rails_app/features/support/env.rb",
304
- "test/rails_app/features/support/paths.rb",
305
- "test/rails_app/spec/component/actions_spec.rb",
306
- "test/rails_app/spec/component/base_spec.rb",
307
- "test/rails_app/spec/component/component_spec.rb",
308
- "test/rails_app/spec/component/composition_spec.rb",
309
- "test/rails_app/spec/component/configuration_spec.rb",
310
- "test/rails_app/spec/component/javascript_spec.rb",
311
- "test/rails_app/spec/component/state_spec.rb",
312
- "test/rails_app/spec/core_ext_spec.rb",
313
- "test/rails_app/spec/spec_helper.rb",
314
- "test/test_helper.rb",
315
- "test/unit/core_ext_test.rb",
316
- "test/unit/netzke_core_test.rb",
317
- "test/unit/netzke_preference_test.rb"
318
- ]
319
235
 
320
236
  if s.respond_to? :specification_version then
321
237
  s.specification_version = 3
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: vendor/gems/netzke-persistence
3
3
  specs:
4
- netzke-persistence (0.1.1)
4
+ netzke-persistence (0.2.0)
5
5
 
6
6
  GEM
7
7
  remote: http://rubygems.org/
@@ -1,27 +1,4 @@
1
1
  class SimpleTabPanel < Netzke::Base
2
2
  js_base_class "Ext.TabPanel"
3
-
4
3
  js_property :active_tab, 0
5
-
6
- # config :items => [{
7
- # # Loading a primitive BorderLayoutPanel here
8
- # :class_name => "BorderLayoutPanel",
9
- # :title => "A border layout panel",
10
- # :items => [{
11
- # :region => :north,
12
- # :height => 100,
13
- # :title => "I'm NOT a Netzke component",
14
- # :html => "I'm a simple panel"
15
- # },{
16
- # :region => :center,
17
- # :class_name => "ServerCaller"
18
- # },{
19
- # :region => :west,
20
- # :width => 300,
21
- # :split => true,
22
- # :class_name => "ExtendedServerCaller"
23
- # }]
24
- # },{
25
- # :class_name => "ExtendedServerCaller"
26
- # }]
27
4
  end
@@ -0,0 +1,2 @@
1
+ class SimpleRailsController < ApplicationController
2
+ end
@@ -1,5 +1,5 @@
1
1
  class WelcomeController < ApplicationController
2
2
  def index
3
- render :text => "This is a test app build into netzke_core"
3
+ render :text => "This is a test app built into netzke_core"
4
4
  end
5
5
  end
@@ -0,0 +1,23 @@
1
+ <%= netzke :tab_panel_one, {
2
+ :height => 300,
3
+ :class_name => "SimpleTabPanel",
4
+ :items => [{
5
+ :class_name => "ServerCaller",
6
+ :title => "Server Caller One"
7
+ },{
8
+ :class_name => "ServerCaller",
9
+ :title => "Server Caller Two"
10
+ }]
11
+ } %>
12
+
13
+ <%= netzke :tab_panel_two, {
14
+ :height => 300,
15
+ :class_name => "SimpleTabPanel",
16
+ :items => [{
17
+ :class_name => "ExtendedServerCaller",
18
+ :title => "Server Caller One"
19
+ },{
20
+ :class_name => "ExtendedServerCaller",
21
+ :title => "Server Caller Two"
22
+ }]
23
+ } %>
@@ -0,0 +1,2 @@
1
+ <%= netzke :server_caller_one, :class_name => "ServerCaller", :height => 200 %>
2
+ <%= netzke :server_caller_two, :class_name => "ServerCaller", :height => 200 %>
@@ -1,4 +1,4 @@
1
1
  Netzke::Core.setup do |config|
2
2
  # config.js_direct_max_retries = 3
3
- config.ext_uri = "/extjs4"
3
+ # config.ext_uri = "/extjs4"
4
4
  end
@@ -59,7 +59,7 @@ RailsApp::Application.routes.draw do
59
59
  match 'components/:component' => 'components#index', :as => "components"
60
60
 
61
61
  # Components configured in Rails views
62
- match 'components/embedded/:action' => 'components', :as => "embedded_components"
62
+ match 'simple_rails/:action' => 'simple_rails', :as => 'simple_rails_views'
63
63
 
64
64
  # Touch components
65
65
  match 'components/touch/:component' => 'touch#index', :as => "touch_components"
@@ -0,0 +1,16 @@
1
+ Feature: Rendering components in the Rails views
2
+ In order to value
3
+ As a role
4
+ I want feature
5
+
6
+ @javascript
7
+ Scenario: Rendering multiple complex components in a view
8
+ Given I am on the "multiple_nested" view
9
+
10
+ When I press "Call server"
11
+ And I wait for response from server
12
+ Then I should see "All quiet here on the server"
13
+
14
+ When I press "Call server extensively"
15
+ And I wait for response from server
16
+ Then I should see "All quiet here on the server, shiny weather"
@@ -5,10 +5,6 @@
5
5
  # files.
6
6
 
7
7
  ENV["RAILS_ENV"] ||= "test"
8
- # require File.expand_path(File.dirname(__FILE__) + '/../../config/environment')
9
- # require File.expand_path(File.dirname(__FILE__) + '/../../test/rails_app/config/environment')
10
- # require File.expand_path(File.dirname(__FILE__) + '/../../lib/netzke-core')
11
-
12
8
 
13
9
  require 'cucumber/rails'
14
10
 
@@ -17,17 +17,8 @@ module NavigationHelpers
17
17
  # when /^(.*)'s profile page$/i
18
18
  # user_profile_path(User.find_by_login($1))
19
19
 
20
- when /the simple panel page/
21
- '/panel/simple'
22
-
23
- when /the server caller page/
24
- '/panel/server_caller'
25
-
26
- when /the component loader page/
27
- '/panel/component_loader'
28
-
29
20
  when /the "(.*)" view/
30
- embedded_components_path(:action => $1.gsub(" ", "_"))
21
+ simple_rails_views_path(:action => $1.gsub(" ", "_"))
31
22
 
32
23
  when /the (.*) test page/
33
24
  components_path(:component => $1)
metadata CHANGED
@@ -2,7 +2,7 @@
2
2
  name: netzke-core
3
3
  version: !ruby/object:Gem::Version
4
4
  prerelease:
5
- version: 0.7.0
5
+ version: 0.7.1
6
6
  platform: ruby
7
7
  authors:
8
8
  - Sergei Kozlov
@@ -10,7 +10,7 @@ autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
12
 
13
- date: 2011-08-09 00:00:00 +02:00
13
+ date: 2011-08-17 00:00:00 +02:00
14
14
  default_executable:
15
15
  dependencies:
16
16
  - !ruby/object:Gem::Dependency
@@ -149,7 +149,7 @@ files:
149
149
  - test/rails_app/app/components/touch/simple_carousel.rb
150
150
  - test/rails_app/app/controllers/application_controller.rb
151
151
  - test/rails_app/app/controllers/components_controller.rb
152
- - test/rails_app/app/controllers/multiple_components_controller.rb
152
+ - test/rails_app/app/controllers/simple_rails_controller.rb
153
153
  - test/rails_app/app/controllers/touch_controller.rb
154
154
  - test/rails_app/app/controllers/welcome_controller.rb
155
155
  - test/rails_app/app/helpers/application_helper.rb
@@ -159,7 +159,9 @@ files:
159
159
  - test/rails_app/app/views/layouts/application.html.erb
160
160
  - test/rails_app/app/views/layouts/nested.html.erb
161
161
  - test/rails_app/app/views/layouts/touch.html.erb
162
- - test/rails_app/app/views/multiple_components/set_one.html.erb
162
+ - test/rails_app/app/views/simple_rails/multiple_nested.html.erb
163
+ - test/rails_app/app/views/simple_rails/multiple_of_different_class.html.erb
164
+ - test/rails_app/app/views/simple_rails/multiple_of_same_class.html.erb
163
165
  - test/rails_app/config.ru
164
166
  - test/rails_app/config/application.rb
165
167
  - test/rails_app/config/boot.rb
@@ -197,6 +199,7 @@ files:
197
199
  - test/rails_app/features/nested_views.feature
198
200
  - test/rails_app/features/persistence.feature
199
201
  - test/rails_app/features/plugin.feature
202
+ - test/rails_app/features/rails_views.feature
200
203
  - test/rails_app/features/scopes.feature
201
204
  - test/rails_app/features/step_definitions/custom_css_steps.rb
202
205
  - test/rails_app/features/step_definitions/generic_steps.rb
@@ -259,89 +262,5 @@ rubygems_version: 1.6.2
259
262
  signing_key:
260
263
  specification_version: 3
261
264
  summary: Build ExtJS/Rails components with minimum effort
262
- test_files:
263
- - test/rails_app/app/components/border_layout_panel.rb
264
- - test/rails_app/app/components/component_loader.rb
265
- - test/rails_app/app/components/component_with_actions.rb
266
- - test/rails_app/app/components/component_with_custom_css.rb
267
- - test/rails_app/app/components/component_with_included_js.rb
268
- - test/rails_app/app/components/component_with_js_mixin.rb
269
- - test/rails_app/app/components/component_with_nested_through.rb
270
- - test/rails_app/app/components/component_with_session_persistence.rb
271
- - test/rails_app/app/components/deprecated/server_caller.rb
272
- - test/rails_app/app/components/dynamic_tab_panel.rb
273
- - test/rails_app/app/components/ext_direct/composite.rb
274
- - test/rails_app/app/components/ext_direct/details.rb
275
- - test/rails_app/app/components/ext_direct/selector.rb
276
- - test/rails_app/app/components/ext_direct/statistics.rb
277
- - test/rails_app/app/components/extended_component_with_actions.rb
278
- - test/rails_app/app/components/extended_component_with_js_mixin.rb
279
- - test/rails_app/app/components/extended_localized_panel.rb
280
- - test/rails_app/app/components/extended_server_caller.rb
281
- - test/rails_app/app/components/hello_world_component.rb
282
- - test/rails_app/app/components/kinda_complex_component.rb
283
- - test/rails_app/app/components/kinda_complex_component/basic_stuff.rb
284
- - test/rails_app/app/components/kinda_complex_component/extra_stuff.rb
285
- - test/rails_app/app/components/loader_of_component_with_custom_css.rb
286
- - test/rails_app/app/components/localized_panel.rb
287
- - test/rails_app/app/components/nested_component.rb
288
- - test/rails_app/app/components/panel_with_plugin.rb
289
- - test/rails_app/app/components/panel_with_tools.rb
290
- - test/rails_app/app/components/plugin_with_components.rb
291
- - test/rails_app/app/components/scoped_components/deep_scoped_components/some_deep_scoped_component.rb
292
- - test/rails_app/app/components/scoped_components/extended_scoped_component.rb
293
- - test/rails_app/app/components/scoped_components/some_scoped_component.rb
294
- - test/rails_app/app/components/server_caller.rb
295
- - test/rails_app/app/components/server_counter.rb
296
- - test/rails_app/app/components/simple_component.rb
297
- - test/rails_app/app/components/simple_panel.rb
298
- - test/rails_app/app/components/simple_tab_panel.rb
299
- - test/rails_app/app/components/simple_window.rb
300
- - test/rails_app/app/components/some_composite.rb
301
- - test/rails_app/app/components/some_ext_component.rb
302
- - test/rails_app/app/components/some_plugin.rb
303
- - test/rails_app/app/components/touch/hello_world_component.rb
304
- - test/rails_app/app/components/touch/server_caller.rb
305
- - test/rails_app/app/components/touch/simple_carousel.rb
306
- - test/rails_app/app/controllers/application_controller.rb
307
- - test/rails_app/app/controllers/components_controller.rb
308
- - test/rails_app/app/controllers/multiple_components_controller.rb
309
- - test/rails_app/app/controllers/touch_controller.rb
310
- - test/rails_app/app/controllers/welcome_controller.rb
311
- - test/rails_app/app/helpers/application_helper.rb
312
- - test/rails_app/app/helpers/touch_helper.rb
313
- - test/rails_app/config/application.rb
314
- - test/rails_app/config/boot.rb
315
- - test/rails_app/config/environment.rb
316
- - test/rails_app/config/environments/development.rb
317
- - test/rails_app/config/environments/production.rb
318
- - test/rails_app/config/environments/test.rb
319
- - test/rails_app/config/initializers/backtrace_silencers.rb
320
- - test/rails_app/config/initializers/inflections.rb
321
- - test/rails_app/config/initializers/mime_types.rb
322
- - test/rails_app/config/initializers/netzke.rb
323
- - test/rails_app/config/initializers/secret_token.rb
324
- - test/rails_app/config/initializers/session_store.rb
325
- - test/rails_app/config/routes.rb
326
- - test/rails_app/db/migrate/20110110132720_create_netzke_component_states.rb
327
- - test/rails_app/db/schema.rb
328
- - test/rails_app/db/seeds.rb
329
- - test/rails_app/features/step_definitions/custom_css_steps.rb
330
- - test/rails_app/features/step_definitions/generic_steps.rb
331
- - test/rails_app/features/step_definitions/touch_steps.rb
332
- - test/rails_app/features/step_definitions/web_steps.rb
333
- - test/rails_app/features/support/env.rb
334
- - test/rails_app/features/support/paths.rb
335
- - test/rails_app/spec/component/actions_spec.rb
336
- - test/rails_app/spec/component/base_spec.rb
337
- - test/rails_app/spec/component/component_spec.rb
338
- - test/rails_app/spec/component/composition_spec.rb
339
- - test/rails_app/spec/component/configuration_spec.rb
340
- - test/rails_app/spec/component/javascript_spec.rb
341
- - test/rails_app/spec/component/state_spec.rb
342
- - test/rails_app/spec/core_ext_spec.rb
343
- - test/rails_app/spec/spec_helper.rb
344
- - test/test_helper.rb
345
- - test/unit/core_ext_test.rb
346
- - test/unit/netzke_core_test.rb
347
- - test/unit/netzke_preference_test.rb
265
+ test_files: []
266
+
@@ -1,2 +0,0 @@
1
- class MultipleComponentsController < ApplicationController
2
- end