sql_search_n_sort 2.1.0 → 2.1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/lib/sql_search_n_sort/sql_searchable_sortable.rb +5 -3
- data/lib/sql_search_n_sort/version.rb +1 -1
- data/test/dummy/db/test.sqlite3 +0 -0
- data/test/dummy/log/development.log +353 -0
- data/test/dummy/log/test.log +49648 -0
- data/test/dummy/spec/requests/members_spec.rb +2 -0
- data/test/dummy/spec/requests/people_spec.rb +8 -0
- data/test/dummy/tmp/pids/server.pid +1 -0
- metadata +4 -2
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
require 'spec_helper'
|
|
2
2
|
|
|
3
|
+
#Them main reason for this spec is to test the functionality of allowing a class to be explicitly
|
|
4
|
+
# passed to 'setup_sql_sort()' in the controller when the model to be sorted is namespaced
|
|
3
5
|
describe "Members" do
|
|
4
6
|
before(:all) do
|
|
5
7
|
run_generator
|
|
@@ -178,5 +178,13 @@ describe "People" do
|
|
|
178
178
|
current_url.should match("aged=43")
|
|
179
179
|
end
|
|
180
180
|
end
|
|
181
|
+
|
|
182
|
+
describe "handles SQL injection issue" do
|
|
183
|
+
it "sanitizes values passed in the search_for parameter" do
|
|
184
|
+
|
|
185
|
+
expect{ visit(people_path(search_for: "'")) }.not_to raise_error
|
|
186
|
+
# page.should have_selector("input#search_for")
|
|
187
|
+
end
|
|
188
|
+
end
|
|
181
189
|
end
|
|
182
190
|
end
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
5455
|
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: sql_search_n_sort
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 2.1.
|
|
4
|
+
version: 2.1.1
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- John O'Malley
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2015-03-
|
|
11
|
+
date: 2015-03-12 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: nokogiri
|
|
@@ -309,6 +309,7 @@ files:
|
|
|
309
309
|
- test/dummy/tmp/cache/assets/test/sprockets/d771ace226fc8215a3572e0aa35bb0d6
|
|
310
310
|
- test/dummy/tmp/cache/assets/test/sprockets/e8b18160729bab32f8368174bf32a9ce
|
|
311
311
|
- test/dummy/tmp/cache/assets/test/sprockets/f7cbd26ba1d28d48de824f0e94586655
|
|
312
|
+
- test/dummy/tmp/pids/server.pid
|
|
312
313
|
- test/generators/sql_search_n_sort/dummy_test_files/app/assets/javascripts/application.js
|
|
313
314
|
- test/generators/sql_search_n_sort/dummy_test_files/app/controllers/application_controller.rb
|
|
314
315
|
- test/generators/sql_search_n_sort/install_test.rb
|
|
@@ -450,6 +451,7 @@ test_files:
|
|
|
450
451
|
- test/dummy/tmp/cache/assets/test/sprockets/d771ace226fc8215a3572e0aa35bb0d6
|
|
451
452
|
- test/dummy/tmp/cache/assets/test/sprockets/e8b18160729bab32f8368174bf32a9ce
|
|
452
453
|
- test/dummy/tmp/cache/assets/test/sprockets/f7cbd26ba1d28d48de824f0e94586655
|
|
454
|
+
- test/dummy/tmp/pids/server.pid
|
|
453
455
|
- test/generators/sql_search_n_sort/dummy_test_files/app/assets/javascripts/application.js
|
|
454
456
|
- test/generators/sql_search_n_sort/dummy_test_files/app/controllers/application_controller.rb
|
|
455
457
|
- test/generators/sql_search_n_sort/install_test.rb
|