squint 1.0.0 → 1.0.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.
@@ -1,57 +1,59 @@
1
1
  <?xml version="1.0" encoding="UTF-8"?>
2
- <testsuite time='0.331061' skipped='0' failures='0' errors='0' name="SquintTest" assertions='31' tests='27'>
3
- <testcase time='0.024645' file="test/squint_test.rb" name="test_detects_default_integer_storext_jsonb_attributes" assertions='1'>
2
+ <testsuite time='0.352930' skipped='0' failures='0' errors='0' name="SquintTest" assertions='31' tests='28'>
3
+ <testcase time='0.028566' file="test/squint_test.rb" name="test_finds_records_for_request_info_missing_element_that_doesn&#39;t_exist_with_nil" assertions='1'>
4
4
  </testcase>
5
- <testcase time='0.010476' file="test/squint_test.rb" name="test_detects_present_storext_jsonb_attributes" assertions='1'>
5
+ <testcase time='0.011271' file="test/squint_test.rb" name="test_generates_SQL_for_request_info" assertions='2'>
6
6
  </testcase>
7
- <testcase time='0.010010' file="test/squint_test.rb" name="test_detects_default_Falseclass_storext_jsonb_attributes" assertions='1'>
7
+ <testcase time='0.010728' file="test/squint_test.rb" name="test_detects_present_integer_storext_hstore_attributes" assertions='1'>
8
8
  </testcase>
9
- <testcase time='0.009655' file="test/squint_test.rb" name="test_finds_records_for_properties_populated" assertions='1'>
9
+ <testcase time='0.021516' file="test/squint_test.rb" name="test_handles_multiple_non-hash_parameters" assertions='1'>
10
10
  </testcase>
11
- <testcase time='0.012391' file="test/squint_test.rb" name="test_detects_default_integer_storext_hstore_attributes" assertions='1'>
11
+ <testcase time='0.011792' file="test/squint_test.rb" name="test_handles_string_parameters" assertions='1'>
12
12
  </testcase>
13
- <testcase time='0.015957' file="test/squint_test.rb" name="test_finds_records_for_request_info_populated_with_array" assertions='1'>
13
+ <testcase time='0.010496' file="test/squint_test.rb" name="test_finds_records_for_request_info_populated" assertions='1'>
14
14
  </testcase>
15
- <testcase time='0.012892' file="test/squint_test.rb" name="test_generates_SQL_for_properties" assertions='2'>
15
+ <testcase time='0.010163' file="test/squint_test.rb" name="test_finds_records_for_properties_missing_element_that_doesn&#39;t_exist_with_nil" assertions='1'>
16
16
  </testcase>
17
- <testcase time='0.010305' file="test/squint_test.rb" name="test_finds_records_for_properties_populated_with_array" assertions='1'>
17
+ <testcase time='0.009402' file="test/squint_test.rb" name="test_finds_records_for_properties_populated" assertions='1'>
18
18
  </testcase>
19
- <testcase time='0.012353' file="test/squint_test.rb" name="test_finds_records_for_properties_with_nil" assertions='1'>
19
+ <testcase time='0.014218' file="test/squint_test.rb" name="test_with_find_by_lotsa_things" assertions='0'>
20
20
  </testcase>
21
- <testcase time='0.019733' file="test/squint_test.rb" name="test_handles_multiple_non-hash_parameters" assertions='1'>
21
+ <testcase time='0.011102' file="test/squint_test.rb" name="test_finds_records_for_properties_populated_with_array_including_nil" assertions='1'>
22
22
  </testcase>
23
- <testcase time='0.011406' file="test/squint_test.rb" name="test_Doesn&#39;t_find_records_for_properties_missing_element_that_doesn&#39;t_exist_populated" assertions='1'>
23
+ <testcase time='0.010788' file="test/squint_test.rb" name="test_generates_SQL_for_properties" assertions='2'>
24
24
  </testcase>
25
- <testcase time='0.009941' file="test/squint_test.rb" name="test_detects_default_Falseclass_storext_hstore_attributes" assertions='1'>
25
+ <testcase time='0.009354' file="test/squint_test.rb" name="test_detects_present_storext_jsonb_attributes" assertions='1'>
26
26
  </testcase>
27
- <testcase time='0.009810' file="test/squint_test.rb" name="test_finds_records_for_request_info_populated" assertions='1'>
27
+ <testcase time='0.011362' file="test/squint_test.rb" name="test_finds_records_for_request_info_populated_with_array" assertions='1'>
28
28
  </testcase>
29
- <testcase time='0.015859' file="test/squint_test.rb" name="test_storext_jsonb_attributes_is_composeable_in_multiple_wheres" assertions='2'>
29
+ <testcase time='0.013916' file="test/squint_test.rb" name="test_detects_present_integer_storext_jsonb_attributes" assertions='1'>
30
30
  </testcase>
31
- <testcase time='0.010980' file="test/squint_test.rb" name="test_detects_default_storext_jsonb_attributes" assertions='1'>
31
+ <testcase time='0.011390' file="test/squint_test.rb" name="test_Doesn&#39;t_find_records_for_properties_missing_element_that_doesn&#39;t_exist_populated" assertions='1'>
32
32
  </testcase>
33
- <testcase time='0.010904' file="test/squint_test.rb" name="test_detects_present_integer_storext_hstore_attributes" assertions='1'>
33
+ <testcase time='0.011049' file="test/squint_test.rb" name="test_detects_default_integer_storext_hstore_attributes" assertions='1'>
34
34
  </testcase>
35
- <testcase time='0.010792' file="test/squint_test.rb" name="test_finds_records_for_properties_populated_with_array_including_nil" assertions='1'>
35
+ <testcase time='0.009786' file="test/squint_test.rb" name="test_Doesn&#39;t_find_records_for_request_info_missing_element_that_doesn&#39;t_exist_populated" assertions='1'>
36
36
  </testcase>
37
- <testcase time='0.009264' file="test/squint_test.rb" name="test_finds_records_for_request_info_populated_with_array_including_nil" assertions='1'>
37
+ <testcase time='0.010156' file="test/squint_test.rb" name="test_finds_records_for_properties_with_nil" assertions='1'>
38
38
  </testcase>
39
- <testcase time='0.015336' file="test/squint_test.rb" name="test_storext_jsonb_attributes_is_composeable_in_one_where" assertions='2'>
39
+ <testcase time='0.012279' file="test/squint_test.rb" name="test_finds_records_for_request_info_with_nil" assertions='1'>
40
40
  </testcase>
41
- <testcase time='0.010052' file="test/squint_test.rb" name="test_detects_present_integer_storext_jsonb_attributes" assertions='1'>
41
+ <testcase time='0.011525' file="test/squint_test.rb" name="test_storext_jsonb_attributes_is_composeable_in_one_where" assertions='2'>
42
42
  </testcase>
43
- <testcase time='0.011171' file="test/squint_test.rb" name="test_detects_default_storext_hstore_attributes" assertions='1'>
43
+ <testcase time='0.011909' file="test/squint_test.rb" name="test_detects_default_integer_storext_jsonb_attributes" assertions='1'>
44
44
  </testcase>
45
- <testcase time='0.010303' file="test/squint_test.rb" name="test_finds_records_for_request_info_missing_element_that_doesn&#39;t_exist_with_nil" assertions='1'>
45
+ <testcase time='0.011461' file="test/squint_test.rb" name="test_finds_records_for_properties_populated_with_array" assertions='1'>
46
46
  </testcase>
47
- <testcase time='0.009981' file="test/squint_test.rb" name="test_Doesn&#39;t_find_records_for_request_info_missing_element_that_doesn&#39;t_exist_populated" assertions='1'>
47
+ <testcase time='0.010520' file="test/squint_test.rb" name="test_detects_default_storext_hstore_attributes" assertions='1'>
48
48
  </testcase>
49
- <testcase time='0.011758' file="test/squint_test.rb" name="test_finds_records_for_properties_missing_element_that_doesn&#39;t_exist_with_nil" assertions='1'>
49
+ <testcase time='0.016903' file="test/squint_test.rb" name="test_detects_default_Falseclass_storext_hstore_attributes" assertions='1'>
50
50
  </testcase>
51
- <testcase time='0.011404' file="test/squint_test.rb" name="test_finds_records_for_request_info_with_nil" assertions='1'>
51
+ <testcase time='0.011545' file="test/squint_test.rb" name="test_detects_default_Falseclass_storext_jsonb_attributes" assertions='1'>
52
52
  </testcase>
53
- <testcase time='0.012454' file="test/squint_test.rb" name="test_generates_SQL_for_request_info" assertions='2'>
53
+ <testcase time='0.011194' file="test/squint_test.rb" name="test_finds_records_for_request_info_populated_with_array_including_nil" assertions='1'>
54
54
  </testcase>
55
- <testcase time='0.011229' file="test/squint_test.rb" name="test_handles_string_parameters" assertions='1'>
55
+ <testcase time='0.012636' file="test/squint_test.rb" name="test_detects_default_storext_jsonb_attributes" assertions='1'>
56
+ </testcase>
57
+ <testcase time='0.015901' file="test/squint_test.rb" name="test_storext_jsonb_attributes_is_composeable_in_multiple_wheres" assertions='2'>
56
58
  </testcase>
57
59
  </testsuite>
@@ -120,4 +120,16 @@ class SquintTest < ActiveSupport::TestCase
120
120
  assert_equal 1, reln.count
121
121
  end
122
122
  end
123
+
124
+ #
125
+ # Make sure that build_where isn't passed more than 2 parameters
126
+ # There was a bug...
127
+ #
128
+ test 'with find by lotsa things' do
129
+ assert_nothing_raised do
130
+ Post.find_by(id: 1, title: 'sumpthin',
131
+ body: 'sumpthin else',
132
+ created_at: '2015-01-01')
133
+ end
134
+ end
123
135
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: squint
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.0
4
+ version: 1.0.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - David H. Wilkins
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2017-07-11 00:00:00.000000000 Z
12
+ date: 2017-08-17 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: rails