netzke-core 0.7.4 → 0.7.5

Sign up to get free protection for your applications and to get access to all the features.
data/CHANGELOG.rdoc CHANGED
@@ -1,3 +1,10 @@
1
+ = v0.7.5 - 2012-03-05
2
+ * API changes
3
+ * The :class_name option must *always* include the full class name now. So, "Basepack::GridPanel" won't work, instead do "Netzke::Basepack::GridPanel"
4
+
5
+ * enhancements
6
+ * Set default Ext.Direct retry attempts to 0, as more than 0 may only be needed in special cases.
7
+
1
8
  = v0.7.4 - 2011-10-20
2
9
  * enhancements
3
10
  * Less aggressive rescuing at constantizing a string, to let more descriptive exceptions get through.
data/README.md CHANGED
@@ -43,3 +43,4 @@ With Rails 2 (and Ext 3 only), use versions 0.5.x (*not maintained*)
43
43
 
44
44
  ---
45
45
  Copyright (c) 2008-2011 NomadCoder, released under the MIT license
46
+ Note, that Ext JS itself is licensed [differently](http://www.sencha.com/products/extjs/license/)
data/TODO.md CHANGED
@@ -9,6 +9,8 @@ Caching for netzke_controller-provided JS and CSS.
9
9
 
10
10
  Caching - investigate reusing (fragment?) caching of Rails.
11
11
 
12
+ Move JS classes out of the main page to a cachable includes (moffff)
13
+
12
14
 
13
15
  ## Roadmap
14
16
 
data/lib/netzke/base.rb CHANGED
@@ -69,9 +69,7 @@ module Netzke
69
69
  # Component's class, given its name.
70
70
  # Note: this method will be memoized if Rails.configuration.cache_classes is true.
71
71
  def constantize_class_name(class_name)
72
- "#{class_name}".constantize
73
- rescue NameError
74
- "Netzke::#{class_name}".constantize
72
+ class_name.constantize # used to be more complex than this, but appeared to be difficult to debug
75
73
  end
76
74
 
77
75
  # Instance of component by config
@@ -206,7 +206,7 @@ module Netzke
206
206
  @component_index ||= 0
207
207
  @items_with_normalized_components = items.each_with_index.map do |item, i|
208
208
  if is_component_config?(item)
209
- component_name = item[:name] || :"#{item[:class_name].underscore.split("/").last}#{@component_index}"
209
+ component_name = item[:name] || :"netzke_#{@component_index}" # default name/item_id for child components
210
210
  @component_index += 1
211
211
  self.class.component(component_name.to_sym, item)
212
212
  component_name.to_sym.component # replace current item with a reference to component
@@ -3,7 +3,7 @@ module Netzke
3
3
  module Version
4
4
  MAJOR = 0
5
5
  MINOR = 7
6
- PATCH = 4
6
+ PATCH = 5
7
7
 
8
8
  STRING = [MAJOR, MINOR, PATCH].compact.join('.')
9
9
  end
data/lib/netzke/core.rb CHANGED
@@ -67,7 +67,7 @@ module Netzke
67
67
 
68
68
  # The amount of retries that the direct remoting provider will attempt in case of failure
69
69
  mattr_accessor :js_direct_max_retries
70
- @@js_direct_max_retries = 2
70
+ @@js_direct_max_retries = 0
71
71
 
72
72
  mattr_accessor :with_icons
73
73
 
data/netzke-core.gemspec CHANGED
@@ -4,14 +4,14 @@
4
4
  # -*- encoding: utf-8 -*-
5
5
 
6
6
  Gem::Specification.new do |s|
7
- s.name = %q{netzke-core}
8
- s.version = "0.7.4"
7
+ s.name = "netzke-core"
8
+ s.version = "0.7.5"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
- s.authors = [%q{NomadCoder}]
12
- s.date = %q{2011-10-20}
13
- s.description = %q{Allows building DRY ExtJS/Rails applications by enabling modular development}
14
- s.email = %q{nmcoder@gmail.com}
11
+ s.authors = ["NomadCoder"]
12
+ s.date = "2012-03-05"
13
+ s.description = "Allows building DRY ExtJS/Rails applications by enabling modular development"
14
+ s.email = "nmcoder@gmail.com"
15
15
  s.extra_rdoc_files = [
16
16
  "LICENSE",
17
17
  "README.md"
@@ -105,6 +105,7 @@ Gem::Specification.new do |s|
105
105
  "test/core_test_app/app/components/extended_server_caller.rb",
106
106
  "test/core_test_app/app/components/hello_world_component.rb",
107
107
  "test/core_test_app/app/components/included.js",
108
+ "test/core_test_app/app/components/inline_composite.rb",
108
109
  "test/core_test_app/app/components/kinda_complex_component.rb",
109
110
  "test/core_test_app/app/components/kinda_complex_component/basic_stuff.rb",
110
111
  "test/core_test_app/app/components/kinda_complex_component/extra_stuff.rb",
@@ -198,7 +199,6 @@ Gem::Specification.new do |s|
198
199
  "test/core_test_app/public/favicon.ico",
199
200
  "test/core_test_app/public/images/rails.png",
200
201
  "test/core_test_app/public/robots.txt",
201
- "test/core_test_app/public/stylesheets/all.css",
202
202
  "test/core_test_app/script/rails",
203
203
  "test/core_test_app/spec/component/actions_spec.rb",
204
204
  "test/core_test_app/spec/component/base_spec.rb",
@@ -220,23 +220,11 @@ Gem::Specification.new do |s|
220
220
  "test/unit/netzke_preference_test.rb",
221
221
  "uninstall.rb"
222
222
  ]
223
- s.homepage = %q{http://netzke.org}
224
- s.post_install_message = %q{
225
- ==========================================================
226
-
227
- Thanks for installing netzke-core!
228
-
229
- Home page: http://netzke.org
230
- Google Groups: http://groups.google.com/group/netzke
231
- News: http://twitter.com/netzke
232
- Tutorials: http://blog.writelesscode.com
233
-
234
- ==========================================================
235
-
236
- }
237
- s.require_paths = [%q{lib}]
238
- s.rubygems_version = %q{1.8.6}
239
- s.summary = %q{Build ExtJS/Rails components with minimum effort}
223
+ s.homepage = "http://netzke.org"
224
+ s.post_install_message = "\n==========================================================\n\n Thanks for installing netzke-core!\n\n Home page: http://netzke.org\n Google Groups: http://groups.google.com/group/netzke\n News: http://twitter.com/netzke\n Tutorials: http://blog.writelesscode.com\n\n==========================================================\n\n"
225
+ s.require_paths = ["lib"]
226
+ s.rubygems_version = "1.8.10"
227
+ s.summary = "Build ExtJS/Rails components with minimum effort"
240
228
 
241
229
  if s.respond_to? :specification_version then
242
230
  s.specification_version = 3
@@ -0,0 +1,13 @@
1
+ # A composite component which has its child components defined inline (as opposed to a using the "component" DSL method explicitely)
2
+ class InlineComposite < Netzke::Base
3
+ js_property :layout, :vbox
4
+
5
+ # Set width for all
6
+ js_property :defaults, {:width => "100%", :flex => 1}
7
+
8
+ items [{
9
+ :class_name => "ServerCaller"
10
+ },{
11
+ :class_name => "ExtendedServerCaller"
12
+ }]
13
+ end
@@ -6,7 +6,7 @@ class ServerCaller < Netzke::Base
6
6
  js_properties(
7
7
  :title => "Server Caller",
8
8
  :html => "Wow",
9
- :bbar => [:bug_server.action] # TODO: used to be bbar, but Ext 4.0.2 has problems with rendering it!
9
+ :tbar => [:bug_server.action] # NOTE: used to be bbar, but Ext >= 4.0.2 has problems with rendering it!
10
10
  )
11
11
 
12
12
  js_method :on_bug_server, <<-JS
@@ -1,4 +1,4 @@
1
1
  Netzke::Core.setup do |config|
2
- # config.js_direct_max_retries = 3
2
+ config.js_direct_max_retries = 2
3
3
  # config.ext_uri = "/extjs4"
4
4
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: netzke-core
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.7.4
4
+ version: 0.7.5
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-10-20 00:00:00.000000000Z
12
+ date: 2012-03-05 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: activesupport
16
- requirement: &70252618149160 !ruby/object:Gem::Requirement
16
+ requirement: &70348689758660 !ruby/object:Gem::Requirement
17
17
  none: false
18
18
  requirements:
19
19
  - - ! '>='
@@ -21,7 +21,7 @@ dependencies:
21
21
  version: 3.0.0
22
22
  type: :runtime
23
23
  prerelease: false
24
- version_requirements: *70252618149160
24
+ version_requirements: *70348689758660
25
25
  description: Allows building DRY ExtJS/Rails applications by enabling modular development
26
26
  email: nmcoder@gmail.com
27
27
  executables: []
@@ -118,6 +118,7 @@ files:
118
118
  - test/core_test_app/app/components/extended_server_caller.rb
119
119
  - test/core_test_app/app/components/hello_world_component.rb
120
120
  - test/core_test_app/app/components/included.js
121
+ - test/core_test_app/app/components/inline_composite.rb
121
122
  - test/core_test_app/app/components/kinda_complex_component.rb
122
123
  - test/core_test_app/app/components/kinda_complex_component/basic_stuff.rb
123
124
  - test/core_test_app/app/components/kinda_complex_component/extra_stuff.rb
@@ -211,7 +212,6 @@ files:
211
212
  - test/core_test_app/public/favicon.ico
212
213
  - test/core_test_app/public/images/rails.png
213
214
  - test/core_test_app/public/robots.txt
214
- - test/core_test_app/public/stylesheets/all.css
215
215
  - test/core_test_app/script/rails
216
216
  - test/core_test_app/spec/component/actions_spec.rb
217
217
  - test/core_test_app/spec/component/base_spec.rb
@@ -255,7 +255,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
255
255
  version: '0'
256
256
  requirements: []
257
257
  rubyforge_project:
258
- rubygems_version: 1.8.6
258
+ rubygems_version: 1.8.10
259
259
  signing_key:
260
260
  specification_version: 3
261
261
  summary: Build ExtJS/Rails components with minimum effort