databound 3.1.1 → 3.1.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +2 -2
- data/lib/databound/manager.rb +13 -2
- data/lib/databound/version.rb +1 -1
- data/spec/controllers/permit_controller_spec.rb +1 -1
- data/spec/internal/db/combustion_test.sqlite +0 -0
- data/spec/internal/db/schema.rb +1 -0
- data/spec/support/rails_test_app/Gemfile +1 -2
- data/spec/support/rails_test_app/Gemfile.lock +84 -59
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 045bfebd7dbcfd1235c613b720a00734ea7f7db6
|
4
|
+
data.tar.gz: 82a32802692b1a40059cd541e3c80d217394de67
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 37887b99be8b2b5fb91d4248bdabacad1ab0b6053c0967fd54bfdd9c35e7411a49c5ff701bb47e86fe879811df1e7f461f3d93da06d87bea180138c3ff29ddd9
|
7
|
+
data.tar.gz: 373c67bbfb09bcb578281cbe5c2bff7de53c2e6de57d6d501726f3fd6e4a7cc32d7dd3f850d67d1ee64e7f27f9c69c8cad3427b55b85dc97f90c60edcda541fc
|
data/README.md
CHANGED
@@ -1,8 +1,8 @@
|
|
1
1
|
[![Gem](https://img.shields.io/gem/v/databound.svg?style=flat-square)](https://rubygems.org/gems/databound)
|
2
2
|
[![Bower](https://img.shields.io/bower/v/databound.svg?style=flat-square)](http://bower.io/search/?q=databound)
|
3
3
|
[![npm](https://img.shields.io/npm/v/databound.svg?style=flat-square)](https://www.npmjs.com/package/databound)
|
4
|
-
[![Code Climate](http://img.shields.io/codeclimate/github/Nedomas/databound-rails.svg?style=flat-square)](https://codeclimate.com/github/Nedomas/databound)
|
5
|
-
[![Build Status](http://img.shields.io/travis/Nedomas/databound-rails.svg?style=flat-square)](https://travis-ci.org/Nedomas/databound)
|
4
|
+
[![Code Climate](http://img.shields.io/codeclimate/github/Nedomas/databound-rails.svg?style=flat-square)](https://codeclimate.com/github/Nedomas/databound-rails)
|
5
|
+
[![Build Status](http://img.shields.io/travis/Nedomas/databound-rails.svg?style=flat-square)](https://travis-ci.org/Nedomas/databound-rails)
|
6
6
|
|
7
7
|
![Databound](https://cloud.githubusercontent.com/assets/1877286/4743542/df89dcec-5a28-11e4-9114-6f383fe269cb.png)
|
8
8
|
|
data/lib/databound/manager.rb
CHANGED
@@ -67,7 +67,18 @@ module Databound
|
|
67
67
|
model.where(scope.to_h).where_values.reduce(:and)
|
68
68
|
end
|
69
69
|
|
70
|
-
nodes.reduce(:or)
|
70
|
+
left_query = nodes.reduce(:or)
|
71
|
+
return unless left_query
|
72
|
+
|
73
|
+
[left_query.to_sql, *bound_values(scopes)]
|
74
|
+
end
|
75
|
+
|
76
|
+
def bound_values(scopes)
|
77
|
+
values = scopes.flat_map do |scope|
|
78
|
+
model.where(scope.to_h).bind_values
|
79
|
+
end
|
80
|
+
|
81
|
+
values.map(&:last)
|
71
82
|
end
|
72
83
|
|
73
84
|
def check_params!(action)
|
@@ -124,7 +135,7 @@ module Databound
|
|
124
135
|
end
|
125
136
|
|
126
137
|
def mongoid?
|
127
|
-
defined?(
|
138
|
+
defined?(Mongoid) and model.ancestors.include?(Mongoid::Document)
|
128
139
|
end
|
129
140
|
|
130
141
|
def activerecord?
|
data/lib/databound/version.rb
CHANGED
Binary file
|
data/spec/internal/db/schema.rb
CHANGED
@@ -2,7 +2,7 @@ source 'https://rubygems.org'
|
|
2
2
|
|
3
3
|
|
4
4
|
# Bundle edge Rails instead: gem 'rails', github: 'rails/rails'
|
5
|
-
gem 'rails', '4.
|
5
|
+
gem 'rails', '4.2'
|
6
6
|
# Use sqlite3 as the database for Active Record
|
7
7
|
gem 'sqlite3'
|
8
8
|
# Use SCSS for stylesheets
|
@@ -37,4 +37,3 @@ gem 'spring', group: :development
|
|
37
37
|
|
38
38
|
# Use debugger
|
39
39
|
# gem 'debugger', group: [:development, :test]
|
40
|
-
|
@@ -1,106 +1,131 @@
|
|
1
1
|
GEM
|
2
2
|
remote: https://rubygems.org/
|
3
3
|
specs:
|
4
|
-
actionmailer (4.
|
5
|
-
actionpack (= 4.
|
6
|
-
actionview (= 4.
|
4
|
+
actionmailer (4.2.0)
|
5
|
+
actionpack (= 4.2.0)
|
6
|
+
actionview (= 4.2.0)
|
7
|
+
activejob (= 4.2.0)
|
7
8
|
mail (~> 2.5, >= 2.5.4)
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
9
|
+
rails-dom-testing (~> 1.0, >= 1.0.5)
|
10
|
+
actionpack (4.2.0)
|
11
|
+
actionview (= 4.2.0)
|
12
|
+
activesupport (= 4.2.0)
|
13
|
+
rack (~> 1.6.0)
|
12
14
|
rack-test (~> 0.6.2)
|
13
|
-
|
14
|
-
|
15
|
+
rails-dom-testing (~> 1.0, >= 1.0.5)
|
16
|
+
rails-html-sanitizer (~> 1.0, >= 1.0.1)
|
17
|
+
actionview (4.2.0)
|
18
|
+
activesupport (= 4.2.0)
|
15
19
|
builder (~> 3.1)
|
16
20
|
erubis (~> 2.7.0)
|
17
|
-
|
18
|
-
|
21
|
+
rails-dom-testing (~> 1.0, >= 1.0.5)
|
22
|
+
rails-html-sanitizer (~> 1.0, >= 1.0.1)
|
23
|
+
activejob (4.2.0)
|
24
|
+
activesupport (= 4.2.0)
|
25
|
+
globalid (>= 0.3.0)
|
26
|
+
activemodel (4.2.0)
|
27
|
+
activesupport (= 4.2.0)
|
19
28
|
builder (~> 3.1)
|
20
|
-
activerecord (4.
|
21
|
-
activemodel (= 4.
|
22
|
-
activesupport (= 4.
|
23
|
-
arel (~>
|
24
|
-
activesupport (4.
|
25
|
-
i18n (~> 0.
|
29
|
+
activerecord (4.2.0)
|
30
|
+
activemodel (= 4.2.0)
|
31
|
+
activesupport (= 4.2.0)
|
32
|
+
arel (~> 6.0)
|
33
|
+
activesupport (4.2.0)
|
34
|
+
i18n (~> 0.7)
|
26
35
|
json (~> 1.7, >= 1.7.7)
|
27
36
|
minitest (~> 5.1)
|
28
|
-
thread_safe (~> 0.
|
37
|
+
thread_safe (~> 0.3, >= 0.3.4)
|
29
38
|
tzinfo (~> 1.1)
|
30
|
-
arel (
|
39
|
+
arel (6.0.0)
|
31
40
|
builder (3.2.2)
|
32
41
|
coffee-rails (4.0.1)
|
33
42
|
coffee-script (>= 2.2.0)
|
34
43
|
railties (>= 4.0.0, < 5.0)
|
35
|
-
coffee-script (2.
|
44
|
+
coffee-script (2.4.1)
|
36
45
|
coffee-script-source
|
37
46
|
execjs
|
38
|
-
coffee-script-source (1.
|
47
|
+
coffee-script-source (1.9.1)
|
39
48
|
erubis (2.7.0)
|
40
|
-
execjs (2.
|
49
|
+
execjs (2.5.2)
|
50
|
+
globalid (0.3.5)
|
51
|
+
activesupport (>= 4.1.0)
|
41
52
|
hike (1.2.3)
|
42
|
-
i18n (0.
|
43
|
-
jbuilder (2.2.
|
53
|
+
i18n (0.7.0)
|
54
|
+
jbuilder (2.2.12)
|
44
55
|
activesupport (>= 3.0.0, < 5)
|
45
56
|
multi_json (~> 1.2)
|
46
|
-
jquery-rails (
|
47
|
-
|
57
|
+
jquery-rails (4.0.3)
|
58
|
+
rails-dom-testing (~> 1.0)
|
59
|
+
railties (>= 4.2.0)
|
48
60
|
thor (>= 0.14, < 2.0)
|
49
|
-
json (1.8.
|
50
|
-
|
61
|
+
json (1.8.2)
|
62
|
+
loofah (2.0.1)
|
63
|
+
nokogiri (>= 1.5.9)
|
64
|
+
mail (2.6.3)
|
51
65
|
mime-types (>= 1.16, < 3)
|
52
|
-
mime-types (2.4.
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
66
|
+
mime-types (2.4.3)
|
67
|
+
mini_portile (0.6.2)
|
68
|
+
minitest (5.5.1)
|
69
|
+
multi_json (1.11.0)
|
70
|
+
nokogiri (1.6.6.2)
|
71
|
+
mini_portile (~> 0.6.0)
|
72
|
+
rack (1.6.0)
|
73
|
+
rack-test (0.6.3)
|
57
74
|
rack (>= 1.0)
|
58
|
-
rails (4.
|
59
|
-
actionmailer (= 4.
|
60
|
-
actionpack (= 4.
|
61
|
-
actionview (= 4.
|
62
|
-
|
63
|
-
|
64
|
-
|
75
|
+
rails (4.2.0)
|
76
|
+
actionmailer (= 4.2.0)
|
77
|
+
actionpack (= 4.2.0)
|
78
|
+
actionview (= 4.2.0)
|
79
|
+
activejob (= 4.2.0)
|
80
|
+
activemodel (= 4.2.0)
|
81
|
+
activerecord (= 4.2.0)
|
82
|
+
activesupport (= 4.2.0)
|
65
83
|
bundler (>= 1.3.0, < 2.0)
|
66
|
-
railties (= 4.
|
67
|
-
sprockets-rails
|
68
|
-
|
69
|
-
|
70
|
-
|
84
|
+
railties (= 4.2.0)
|
85
|
+
sprockets-rails
|
86
|
+
rails-deprecated_sanitizer (1.0.3)
|
87
|
+
activesupport (>= 4.2.0.alpha)
|
88
|
+
rails-dom-testing (1.0.6)
|
89
|
+
activesupport (>= 4.2.0.beta, < 5.0)
|
90
|
+
nokogiri (~> 1.6.0)
|
91
|
+
rails-deprecated_sanitizer (>= 1.0.1)
|
92
|
+
rails-html-sanitizer (1.0.2)
|
93
|
+
loofah (~> 2.0)
|
94
|
+
railties (4.2.0)
|
95
|
+
actionpack (= 4.2.0)
|
96
|
+
activesupport (= 4.2.0)
|
71
97
|
rake (>= 0.8.7)
|
72
98
|
thor (>= 0.18.1, < 2.0)
|
73
|
-
rake (10.
|
74
|
-
rdoc (4.
|
75
|
-
json (~> 1.4)
|
99
|
+
rake (10.4.2)
|
100
|
+
rdoc (4.2.0)
|
76
101
|
sass (3.2.19)
|
77
|
-
sass-rails (4.0.
|
102
|
+
sass-rails (4.0.5)
|
78
103
|
railties (>= 4.0.0, < 5.0)
|
79
|
-
sass (~> 3.2.
|
80
|
-
sprockets (~> 2.8,
|
104
|
+
sass (~> 3.2.2)
|
105
|
+
sprockets (~> 2.8, < 3.0)
|
81
106
|
sprockets-rails (~> 2.0)
|
82
107
|
sdoc (0.4.1)
|
83
108
|
json (~> 1.7, >= 1.7.7)
|
84
109
|
rdoc (~> 4.0)
|
85
|
-
spring (1.
|
86
|
-
sprockets (2.
|
110
|
+
spring (1.3.4)
|
111
|
+
sprockets (2.12.3)
|
87
112
|
hike (~> 1.2)
|
88
113
|
multi_json (~> 1.0)
|
89
114
|
rack (~> 1.0)
|
90
115
|
tilt (~> 1.1, != 1.3.0)
|
91
|
-
sprockets-rails (2.2.
|
116
|
+
sprockets-rails (2.2.4)
|
92
117
|
actionpack (>= 3.0)
|
93
118
|
activesupport (>= 3.0)
|
94
119
|
sprockets (>= 2.8, < 4.0)
|
95
|
-
sqlite3 (1.3.
|
120
|
+
sqlite3 (1.3.10)
|
96
121
|
thor (0.19.1)
|
97
|
-
thread_safe (0.3.
|
122
|
+
thread_safe (0.3.5)
|
98
123
|
tilt (1.4.1)
|
99
|
-
turbolinks (2.
|
124
|
+
turbolinks (2.5.3)
|
100
125
|
coffee-rails
|
101
126
|
tzinfo (1.2.2)
|
102
127
|
thread_safe (~> 0.1)
|
103
|
-
uglifier (2.
|
128
|
+
uglifier (2.7.1)
|
104
129
|
execjs (>= 0.3.0)
|
105
130
|
json (>= 1.8.0)
|
106
131
|
|
@@ -111,7 +136,7 @@ DEPENDENCIES
|
|
111
136
|
coffee-rails (~> 4.0.0)
|
112
137
|
jbuilder (~> 2.0)
|
113
138
|
jquery-rails
|
114
|
-
rails (= 4.
|
139
|
+
rails (= 4.2)
|
115
140
|
sass-rails (~> 4.0.3)
|
116
141
|
sdoc (~> 0.4.0)
|
117
142
|
spring
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: databound
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 3.1.
|
4
|
+
version: 3.1.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Domas Bitvinskas
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-
|
11
|
+
date: 2015-04-10 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rspec-rails
|
@@ -246,7 +246,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
246
246
|
version: '0'
|
247
247
|
requirements: []
|
248
248
|
rubyforge_project:
|
249
|
-
rubygems_version: 2.
|
249
|
+
rubygems_version: 2.4.5
|
250
250
|
signing_key:
|
251
251
|
specification_version: 4
|
252
252
|
summary: Provides Javascript a simple API to the Ruby on Rails CRUD
|