netzke-core 1.0.0.0.pre4 → 1.0.0.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: c416391cef65576a5c36f064f79f64a91c0b4993
4
- data.tar.gz: 1c3a58a7b46c736d829aa9f041349fb5c5a60c08
3
+ metadata.gz: a30d44ea57bebd319158780498fdb886e9286052
4
+ data.tar.gz: 0a0c59a054c5aa70f343dfd91ba15c2484aa7370
5
5
  SHA512:
6
- metadata.gz: 2175ca63de1a604840348f297dd98ea972d73529d1077c679008a000a9ae6f3f3488f9bf01ab0d99262617067b48069856ea492371cb10a9cb22507ebd5e36d3
7
- data.tar.gz: e5f55ae2d2192b49f01381bb77bfcecf6bfd26313ea375db1e7ecad5724356481614fa0c9cde1420305496ab79fcb1e513b8118b1b1ae8949f5b117046428cd6
6
+ metadata.gz: 9fb4de64f99e93c3141f33b574c707d756d9d82821b11b81a594135e0eb538398288d378aa556c2c1aab9fe488e4cca62b160b3b6b110759f30db280fa5a726e
7
+ data.tar.gz: 0ed2b42ee41182db0a51040d3ab136cf87a1f7ddcbd3d565b22d9d51e8bef66f1a3d160cbcbd40dc28c2ad34f76be20134149bcee77e15361596256690da6fc4
@@ -1,16 +1,25 @@
1
- ### New stuff
1
+ # v1.0.0.0 - 2016-01-04
2
+
3
+ ## New and improved
2
4
 
3
5
  * Routing (see README)
4
6
 
5
- * `Base::Plugin` won't set `this.cmp` for you any longer, but rather receive it as a parameter for `init()`
7
+ * Introduce `Base#f` method that defines an inline wrapper for the client-side function that gets called in the scope of the component. This simplifies, for example, specifying handlers for buttons and tools, but also can be used in a few other occasions, where an Ext JS configuration option requires a function. See `spec/rails_app/app/components/actions.rb` for an example.
8
+
9
+ * Introduce `Base#l` method that converts the passed string to JSON literal; useful for asigning JS functions inline
10
+ (see below).
11
+
12
+ * There's no longer need to call `netzke` in routes.rb unless you want to modify routing defaults.
6
13
 
7
14
  * The `action` DSL method now also accepts a list of endpoints, e.g.:
8
15
 
9
16
  action :do_something, :do_something_else
10
17
 
11
- * `netzkeNotify` (former `netzkeFeedback`) may now accept the `title` option
18
+ * `netzkeNotify` (former `netzkeFeedback`) now accepts the `title` option
19
+
20
+ * Calling `callParent` in JS functions from the "mixins" will now properly call the previous override if that was defined; see `spec/rails_app/app/components/js_mixins.rb` for an example.
12
21
 
13
- ### Breaking changes
22
+ ## Breaking changes
14
23
 
15
24
  * A component's subfolders for client-class scripts and stylesheets have been consolidated from `javascripts`/`stylesheets` into `client`
16
25
 
@@ -20,11 +29,11 @@
20
29
 
21
30
  * `Base.js_configure` has been renamed to `Base.client_class`. There's also no longer need to call it just for the purpose of including the default mixin (which is now `<component_name>/client/<component_name>.js`).
22
31
 
23
- * Assigning inline JS functions inside the `client_class` (former `js_configure`) block no longer makes a JSON literal
24
- of them; instead, wrap it with the `l` method accessible for all components:
32
+ * Assigning inline JS functions inside the `client_class` (former `js_configure`) block no longer automatically makes a JSON literal
33
+ of them; instead, you need to wrap it with the `l` method accessible for all components:
25
34
 
26
35
  client_class do |c|
27
- c.on_refresh = l(<<-JS)
36
+ c.netzke_on_refresh = l(<<-JS)
28
37
  function(){
29
38
  this.setTitle("Refresh tool clicked");
30
39
  }
@@ -94,7 +103,7 @@
94
103
 
95
104
  Unless a component is declared as eagerly loaded, its config is no longer accessible on the client side (which means component is meant to be dynamically loadable).
96
105
 
97
- * Specifying `bbar` and other toolbars in `configure_client` (former `js_configure`) no longer works. Move them to the main `configure` method.
106
+ * Specifying `bbar` and other toolbars in `configure_client` (former `js_configure`) no longer works. They must now be in the main `configure` method.
98
107
 
99
108
  * Default handler name for actions is now prefixed with `netzkeOn` instead of `on`. E.g., for `action :do_something`, the handler
100
109
  must be called `netzkeOnDoSomething`.
@@ -109,12 +118,7 @@
109
118
 
110
119
  * Drop possibility to list panel tools merely as symbols, as this was too limiting (e.g. Netzke was overriding the handler signature). As of now, use the `Base#f` method to specify the handler (will no longer be automatically set for you); see `spec/rails_app/app/components/tools.rb` for an example.
111
120
 
112
- ### Other changes
113
-
114
- * Introduce `Base#f` method that defines an inline wrapper for the client-side function that gets called in the scope of the component. This simplifies, for example, specifying handlers for buttons and tools, but also can be used in a few other occasions, where an Ext JS configuration option requires a function. See `spec/rails_app/app/components/actions.rb` for an example.
115
-
116
- * Calling `callParent` in JS functions from the "mixins" will now properly call the previous override if that was defined; see `spec/rails_app/app/components/js_mixins.rb` for an example.
117
-
118
- * There's no longer need to call `netzke` in routes.rb unless you want to modify routing defaults.
121
+ * `Base::Plugin` won't set `this.cmp` for you any longer, but rather receive it as a parameter for `init()`
119
122
 
123
+ ---
120
124
  Please check [0-12](https://github.com/netzke/netzke-core/blob/0-12/CHANGELOG.md) for previous changes.
data/LICENSE CHANGED
@@ -1,3 +1,3 @@
1
1
  Copyright (c) 2009-2015 Good Bit Labs Limited
2
2
 
3
- GPLv3 License: http://www.gnu.org/licenses/gpl-3.0.en.html
3
+ The same license as Ext JS: https://www.sencha.com/legal/#Sencha_Ext_JS
data/README.md CHANGED
@@ -257,11 +257,16 @@ hash on the client class, similarly to how Ext JS handles routes in its controll
257
257
  If a component gets loaded dynamically and it figures out that one of its routes is currently active, it'll trigger the
258
258
  corresponding handler after being rendered.
259
259
 
260
+ ## Authentication and authorization
261
+
262
+ You can access the instance of the Netzke controller via `Netzke::Base.controller`. As it inherits from
263
+ `ApplicationController`, it also has the access to the `current_user` if that is defined.
264
+
260
265
  ## Requirements
261
266
 
262
- * Ruby >= 2.0.0
267
+ * Ruby >= 1.9.3
263
268
  * Rails ~> 4.2.0
264
- * Ext JS = 5.1.0
269
+ * Ext JS = 5.1.1
265
270
 
266
271
  ## Installation
267
272
 
@@ -312,4 +317,4 @@ If you feel particularily generous, you can support the author by donating a cou
312
317
  * [Twitter](http://twitter.com/netzke) - latest news about the framework
313
318
 
314
319
  ---
315
- Copyright (c) 2009-2015 [Good Bit Labs](http://goodbitlabs.com/), released under the GPLv3 license
320
+ Copyright (c) 2009-2016 [Good Bit Labs](http://goodbitlabs.com/), released under the same license as [Ext JS](https://www.sencha.com/legal/#Sencha_Ext_JS)
@@ -83,7 +83,7 @@ module Netzke
83
83
  @item_id = conf[:item_id] || @name
84
84
 
85
85
  # Make +client_config+ accessible in +configure+ before calling +super+
86
- config.client_config = (conf.delete(:client_config) || {}).symbolize_keys
86
+ config.client_config = HashWithIndifferentAccess.new(conf.delete(:client_config))
87
87
 
88
88
  # Build complete component configuration
89
89
  configure(config)
@@ -16,7 +16,6 @@ module Netzke::Core
16
16
 
17
17
  build_localized_attributes
18
18
 
19
- self.name = @name
20
19
  self.text = @text.presence || @name.humanize
21
20
  self.tooltip = @tooltip.presence || @name.humanize
22
21
  self.icon = @icon.to_sym if @icon.present?
@@ -1,10 +1,5 @@
1
1
  module Netzke::Core
2
2
  class ComponentConfig < DslConfigBase
3
- def initialize(name, component)
4
- self.name = name.to_s
5
- self.client_config = {}
6
- end
7
-
8
3
  def set_defaults!
9
4
  self.item_id ||= name
10
5
  self.klass ||= self.class_name.try(:constantize) || name.camelize.constantize
@@ -156,7 +156,7 @@ module Netzke::Core
156
156
  component_name = component_name.to_sym
157
157
 
158
158
  ComponentConfig.new(component_name, self).tap do |cfg|
159
- cfg.client_config = overrides[:client_config] || {}
159
+ cfg.client_config = HashWithIndifferentAccess.new(overrides[:client_config])
160
160
  cfg.item_id = overrides[:item_id]
161
161
 
162
162
  if respond_to?(:"#{component_name}_component")
@@ -95,7 +95,7 @@ module Netzke::Core
95
95
  # c.scope = { author_id: client_config.author_id }
96
96
  # end
97
97
  def client_config
98
- ActiveSupport::OrderedOptions.new.merge!(config.client_config)
98
+ @client_config ||= HashWithIndifferentAccess.new(config.client_config)
99
99
  end
100
100
 
101
101
  protected
@@ -3,7 +3,7 @@ module Netzke::Core
3
3
  class DslConfigBase < ActiveSupport::OrderedOptions
4
4
  def initialize(name, component)
5
5
  @component = component
6
- @name = name.to_s
6
+ @name = self.name = name.to_s
7
7
  end
8
8
  end
9
9
  end
@@ -33,7 +33,7 @@ module Netzke
33
33
 
34
34
  # raw arguments from the client
35
35
  def remoting_args
36
- @_remoting_args ||= @params[:data]
36
+ @_remoting_args ||= HashWithIndifferentAccess.new(@params.to_hash)[:data]
37
37
  end
38
38
  end
39
39
 
@@ -58,6 +58,7 @@ class Hash
58
58
  else
59
59
  to_enum(:netzke_update_keys)
60
60
  end
61
+ self
61
62
  end
62
63
 
63
64
  def netzke_literalize_keys
@@ -1,5 +1,5 @@
1
1
  module Netzke
2
2
  module Core
3
- VERSION = "1.0.0.0.pre4"
3
+ VERSION = "1.0.0.0"
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: netzke-core
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.0.0.pre4
4
+ version: 1.0.0.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Max Gorin
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-12-29 00:00:00.000000000 Z
11
+ date: 2016-01-04 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: uglifier
@@ -38,7 +38,7 @@ dependencies:
38
38
  - - ">="
39
39
  - !ruby/object:Gem::Version
40
40
  version: '0'
41
- description: Build complex web GUI in a modular way
41
+ description: Netzke helps you build complex web UI in a modular way
42
42
  email: max@goodbitlabs.com
43
43
  executables: []
44
44
  extensions: []
@@ -120,6 +120,6 @@ rubyforge_project:
120
120
  rubygems_version: 2.5.1
121
121
  signing_key:
122
122
  specification_version: 4
123
- summary: Client-server GUI components with Sencha Ext JS and Ruby on Rails
123
+ summary: Client-server UI components with Sencha Ext JS and Ruby on Rails
124
124
  test_files: []
125
125
  has_rdoc: