netzke-basepack 0.9.0 → 0.10.0.rc2

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: 7efff735638e53b2d16a815c6d2c34e7e0cb12ae
4
- data.tar.gz: 4472d0094ce1ab7692814140edcba271fedee812
3
+ metadata.gz: 05ea131f48d4e9160ab59013eab24339cf2a02ee
4
+ data.tar.gz: 4427f9834bed24c2bec295f3c544161bd6652946
5
5
  SHA512:
6
- metadata.gz: b02239f65587e5c3ea3209ba9d17f4f0072048e4009d613c7d49f2282383dbc6df793f6f812c80ac9a4408c1c6dd4e66fb65ea384bfdc456eef8cb259221a93a
7
- data.tar.gz: f46a8460b5e5fa9dd86fb3c04a4cc4f5dbcd07dfcad77d7184e1f76ea240d7f00b92e2b022535734c41471844bf0de4dbfd738cc56bb979dd8e14c9d2dac6829
6
+ metadata.gz: 6778f91db1e4b96735be0bd362fd3c9a11cabab98e9b903ff0cd1813102bb4dd3ef995dbcbf0e85e2d4c8bf021e9a46eb916b82ae7c569ef982241a520249659
7
+ data.tar.gz: f90e509fd7744280fa280ac75283d7762919617575bb3b927bf36eb0a779f8c468015ea9a04d4c5e034d28a64bc382837da828d904a99d619ea6afb68681d925
data/CHANGELOG.md CHANGED
@@ -1,4 +1,4 @@
1
- # 0.9.0 - 2014-02-08
1
+ # 0.9.0 - WIP
2
2
  * new
3
3
  * GridLiveSearch plugin - implements flexible "live" search on any grid
4
4
  * Implement multi-sorting support in grids
data/Gemfile CHANGED
@@ -9,6 +9,9 @@ gemspec
9
9
 
10
10
  gem 'carrierwave'
11
11
 
12
+ gem 'protected_attributes'
13
+
14
+ # This partial duplication of gemspec is required for rails_app to run
12
15
  group :test do
13
16
  gem 'rspec'
14
17
  gem 'factory_girl'
@@ -17,9 +20,9 @@ group :test do
17
20
  gem 'cucumber-rails', require: false
18
21
  gem 'database_cleaner'
19
22
  gem 'rspec-rails'
23
+ gem 'netzke-testing', '0.10.0.rc1'
20
24
  end
21
25
 
22
26
  group :test, :development do
23
27
  gem 'pry-rails'
24
- gem 'netzke-testing'
25
28
  end
data/README.md CHANGED
@@ -1,9 +1,14 @@
1
- # Netzke Basepack [![Gem Version](https://badge.fury.io/rb/netzke-basepack.png)](http://badge.fury.io/rb/netzke-basepack) [![Build Status](https://travis-ci.org/netzke/netzke-basepack.png?branch=0-9)](https://travis-ci.org/netzke/netzke-basepack) [![Code Climate](https://codeclimate.com/github/netzke/netzke-basepack.png)](https://codeclimate.com/github/netzke/netzke-basepack)
1
+ # Netzke Basepack [![Build Status](https://travis-ci.org/netzke/netzke-basepack.png?branch=master)](https://travis-ci.org/netzke/netzke-basepack) [![Code Climate](https://codeclimate.com/github/netzke/netzke-basepack.png)](https://codeclimate.com/github/netzke/netzke-basepack)
2
2
 
3
3
  [RDocs](http://rdoc.info/github/netzke/netzke-basepack)
4
4
 
5
5
  A pack of pre-built [Netzke](http://netzke.org) components that can be used as building blocks for your webapps.
6
6
 
7
+ *Notes on versioning:*
8
+ * [![Gem Version](https://badge.fury.io/rb/netzke-basepack.png)](http://badge.fury.io/rb/netzke-basepack) is the latest *released* version
9
+ * for the version under development (master), check [version.rb](https://github.com/netzke/netzke-core/blob/master/lib/netzke/core/version.rb)
10
+ * for other versions, check corresponding [branches](https://github.com/netzke/netzke-core/branches)
11
+
7
12
  ## Included components
8
13
 
9
14
  Basepack includes the following components:
@@ -23,8 +28,8 @@ enhancing any grid with live search functionality
23
28
 
24
29
  ## Requirements
25
30
 
26
- * Ruby >= 1.9.3
27
- * Rails ~> 3.2.0
31
+ * Ruby ~> 1.9.2
32
+ * Rails ~> 4.0.0
28
33
  * Ext JS ~> 4.2.0
29
34
 
30
35
  ## Installation
@@ -50,7 +50,7 @@ module Netzke::Basepack::DataAdapters
50
50
  # addressing the n+1 query problem
51
51
  columns.each do |c|
52
52
  assoc, method = c[:name].split('__')
53
- relation = relation.includes(assoc.to_sym) if method
53
+ relation = relation.includes(assoc.to_sym).references(assoc.to_sym) if method
54
54
  end
55
55
 
56
56
  # apply sorting if needed
@@ -84,7 +84,7 @@ module Netzke::Basepack::DataAdapters
84
84
  relation.order("#{@model_class.table_name}.#{assoc} #{dir}")
85
85
  else
86
86
  assoc = @model_class.reflect_on_association(assoc.to_sym)
87
- relation.includes(assoc.name).order("#{assoc.klass.table_name}.#{method} #{dir}")
87
+ relation.includes(assoc.name).references(assoc.klass.table_name.to_sym).order("#{assoc.klass.table_name}.#{method} #{dir}")
88
88
  end
89
89
  end
90
90
 
@@ -98,7 +98,7 @@ module Netzke::Basepack::DataAdapters
98
98
  # addressing the n+1 query problem
99
99
  columns.each do |c|
100
100
  assoc, method = c[:name].split('__')
101
- relation = relation.includes(assoc.to_sym) if method
101
+ relation = relation.includes(assoc.to_sym).references(assoc.to_sym) if method
102
102
  end
103
103
 
104
104
  relation.count
@@ -128,7 +128,7 @@ module Netzke::Basepack::DataAdapters
128
128
  if assoc
129
129
  # Options for an asssociation attribute
130
130
 
131
- relation = assoc.klass.scoped
131
+ relation = assoc.klass.all
132
132
  relation = relation.extend_with(attr[:scope]) if attr[:scope]
133
133
 
134
134
  if assoc.klass.column_names.include?(assoc_method)
@@ -140,7 +140,7 @@ module Netzke::Basepack::DataAdapters
140
140
  else
141
141
  query.downcase!
142
142
  # an expensive search!
143
- relation.all.map{ |r| [r.id, r.send(assoc_method)] }.select{ |id,value| value.to_s.downcase.include?(query) }
143
+ relation.to_a.map{ |r| [r.id, r.send(assoc_method)] }.select{ |id,value| value.to_s.downcase.include?(query) }
144
144
  end
145
145
 
146
146
  else
@@ -304,7 +304,7 @@ module Netzke::Basepack::DataAdapters
304
304
 
305
305
  # An ActiveRecord::Relation instance encapsulating all the necessary conditions.
306
306
  def get_relation(params = {})
307
- relation = @model_class.scoped
307
+ relation = @model_class.all
308
308
 
309
309
  query = params[:query]
310
310
 
@@ -402,7 +402,7 @@ module Netzke
402
402
  if f[:value].is_a?(Hash)
403
403
  val = {}
404
404
  f[:value].each do |k,v|
405
- val[k] = (v.is_a?(Time) || v.is_a?(Date) || v.is_a?(ActiveSupport::TimeWithZone)) ? ActiveSupport::JSON::Variable.new("new Date('#{v.strftime("%m/%d/%Y")}')") : v
405
+ val[k] = (v.is_a?(Time) || v.is_a?(Date) || v.is_a?(ActiveSupport::TimeWithZone)) ? Netzke::Core::JsonLiteral.new("new Date('#{v.strftime("%m/%d/%Y")}')") : v
406
406
  end
407
407
  else
408
408
  val = f[:value]
@@ -1,5 +1,5 @@
1
1
  module Netzke
2
2
  module Basepack
3
- VERSION = "0.9.0"
3
+ VERSION = "0.10.0.rc2"
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: netzke-basepack
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.9.0
4
+ version: 0.10.0.rc2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Max Gorin
@@ -14,30 +14,30 @@ dependencies:
14
14
  name: netzke-core
15
15
  requirement: !ruby/object:Gem::Requirement
16
16
  requirements:
17
- - - ~>
17
+ - - '='
18
18
  - !ruby/object:Gem::Version
19
- version: 0.9.0
19
+ version: 0.10.0.rc2
20
20
  type: :runtime
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
- - - ~>
24
+ - - '='
25
25
  - !ruby/object:Gem::Version
26
- version: 0.9.0
26
+ version: 0.10.0.rc2
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: rails
29
29
  requirement: !ruby/object:Gem::Requirement
30
30
  requirements:
31
31
  - - ~>
32
32
  - !ruby/object:Gem::Version
33
- version: 3.2.0
33
+ version: 4.0.0
34
34
  type: :development
35
35
  prerelease: false
36
36
  version_requirements: !ruby/object:Gem::Requirement
37
37
  requirements:
38
38
  - - ~>
39
39
  - !ruby/object:Gem::Version
40
- version: 3.2.0
40
+ version: 4.0.0
41
41
  - !ruby/object:Gem::Dependency
42
42
  name: sqlite3
43
43
  requirement: !ruby/object:Gem::Requirement
@@ -84,16 +84,16 @@ dependencies:
84
84
  name: netzke-testing
85
85
  requirement: !ruby/object:Gem::Requirement
86
86
  requirements:
87
- - - '>='
87
+ - - '='
88
88
  - !ruby/object:Gem::Version
89
- version: '0'
89
+ version: 0.10.0.rc1
90
90
  type: :development
91
91
  prerelease: false
92
92
  version_requirements: !ruby/object:Gem::Requirement
93
93
  requirements:
94
- - - '>='
94
+ - - '='
95
95
  - !ruby/object:Gem::Version
96
- version: '0'
96
+ version: 0.10.0.rc1
97
97
  - !ruby/object:Gem::Dependency
98
98
  name: rspec-rails
99
99
  requirement: !ruby/object:Gem::Requirement
@@ -203,7 +203,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
203
203
  - !ruby/object:Gem::Version
204
204
  version: 1.3.4
205
205
  requirements: []
206
- rubyforge_project: netzke-basepack
206
+ rubyforge_project:
207
207
  rubygems_version: 2.1.10
208
208
  signing_key:
209
209
  specification_version: 4