search_cop 1.0.6 → 1.2.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/.github/workflows/test.yml +42 -0
- data/.rubocop.yml +128 -0
- data/CHANGELOG.md +36 -5
- data/CONTRIBUTING.md +18 -0
- data/Gemfile +4 -17
- data/README.md +143 -35
- data/Rakefile +0 -1
- data/docker-compose.yml +18 -0
- data/gemfiles/rails5.gemfile +13 -0
- data/gemfiles/rails6.gemfile +13 -0
- data/lib/search_cop.rb +15 -13
- data/lib/search_cop/grammar_parser.rb +3 -4
- data/lib/search_cop/hash_parser.rb +23 -17
- data/lib/search_cop/helpers.rb +15 -0
- data/lib/search_cop/query_builder.rb +2 -4
- data/lib/search_cop/query_info.rb +0 -2
- data/lib/search_cop/search_scope.rb +8 -5
- data/lib/search_cop/version.rb +1 -1
- data/lib/search_cop/visitors.rb +0 -2
- data/lib/search_cop/visitors/mysql.rb +9 -7
- data/lib/search_cop/visitors/postgres.rb +18 -8
- data/lib/search_cop/visitors/visitor.rb +13 -6
- data/lib/search_cop_grammar.rb +18 -9
- data/lib/search_cop_grammar.treetop +6 -4
- data/lib/search_cop_grammar/attributes.rb +77 -34
- data/lib/search_cop_grammar/nodes.rb +7 -2
- data/search_cop.gemspec +9 -10
- data/test/and_test.rb +6 -8
- data/test/boolean_test.rb +7 -9
- data/test/database.yml +4 -1
- data/test/date_test.rb +38 -12
- data/test/datetime_test.rb +45 -12
- data/test/default_operator_test.rb +51 -0
- data/test/error_test.rb +2 -4
- data/test/float_test.rb +16 -11
- data/test/fulltext_test.rb +8 -10
- data/test/hash_test.rb +39 -31
- data/test/integer_test.rb +9 -11
- data/test/not_test.rb +6 -8
- data/test/or_test.rb +8 -10
- data/test/scope_test.rb +11 -13
- data/test/search_cop_test.rb +36 -34
- data/test/string_test.rb +67 -19
- data/test/test_helper.rb +24 -18
- data/test/visitor_test.rb +15 -8
- metadata +41 -55
- data/.travis.yml +0 -34
- data/Appraisals +0 -20
- data/gemfiles/3.2.gemfile +0 -26
- data/gemfiles/4.0.gemfile +0 -26
- data/gemfiles/4.1.gemfile +0 -26
- data/gemfiles/4.2.gemfile +0 -26
data/gemfiles/4.0.gemfile
DELETED
@@ -1,26 +0,0 @@
|
|
1
|
-
# This file was generated by Appraisal
|
2
|
-
|
3
|
-
source "https://rubygems.org"
|
4
|
-
|
5
|
-
gem "activerecord", "~> 4.0.0"
|
6
|
-
gem "search_cop", :path => "../"
|
7
|
-
|
8
|
-
platforms :jruby do
|
9
|
-
gem "activerecord-jdbcmysql-adapter"
|
10
|
-
gem "activerecord-jdbcsqlite3-adapter"
|
11
|
-
gem "activerecord-jdbcpostgresql-adapter"
|
12
|
-
end
|
13
|
-
|
14
|
-
platforms :ruby do
|
15
|
-
gem "sqlite3"
|
16
|
-
gem "mysql2"
|
17
|
-
gem "pg"
|
18
|
-
end
|
19
|
-
|
20
|
-
platforms :rbx do
|
21
|
-
gem "racc"
|
22
|
-
gem "rubysl", "~> 2.0"
|
23
|
-
gem "psych"
|
24
|
-
end
|
25
|
-
|
26
|
-
gemspec :path => "../"
|
data/gemfiles/4.1.gemfile
DELETED
@@ -1,26 +0,0 @@
|
|
1
|
-
# This file was generated by Appraisal
|
2
|
-
|
3
|
-
source "https://rubygems.org"
|
4
|
-
|
5
|
-
gem "activerecord", "~> 4.1.0.beta"
|
6
|
-
gem "search_cop", :path => "../"
|
7
|
-
|
8
|
-
platforms :jruby do
|
9
|
-
gem "activerecord-jdbcmysql-adapter"
|
10
|
-
gem "activerecord-jdbcsqlite3-adapter"
|
11
|
-
gem "activerecord-jdbcpostgresql-adapter"
|
12
|
-
end
|
13
|
-
|
14
|
-
platforms :ruby do
|
15
|
-
gem "sqlite3"
|
16
|
-
gem "mysql2"
|
17
|
-
gem "pg"
|
18
|
-
end
|
19
|
-
|
20
|
-
platforms :rbx do
|
21
|
-
gem "racc"
|
22
|
-
gem "rubysl", "~> 2.0"
|
23
|
-
gem "psych"
|
24
|
-
end
|
25
|
-
|
26
|
-
gemspec :path => "../"
|
data/gemfiles/4.2.gemfile
DELETED
@@ -1,26 +0,0 @@
|
|
1
|
-
# This file was generated by Appraisal
|
2
|
-
|
3
|
-
source "https://rubygems.org"
|
4
|
-
|
5
|
-
gem "activerecord", "~> 4.2.0.beta"
|
6
|
-
gem "search_cop", :path => "../"
|
7
|
-
|
8
|
-
platforms :jruby do
|
9
|
-
gem "activerecord-jdbcmysql-adapter"
|
10
|
-
gem "activerecord-jdbcsqlite3-adapter"
|
11
|
-
gem "activerecord-jdbcpostgresql-adapter"
|
12
|
-
end
|
13
|
-
|
14
|
-
platforms :ruby do
|
15
|
-
gem "sqlite3"
|
16
|
-
gem "mysql2"
|
17
|
-
gem "pg"
|
18
|
-
end
|
19
|
-
|
20
|
-
platforms :rbx do
|
21
|
-
gem "racc"
|
22
|
-
gem "rubysl", "~> 2.0"
|
23
|
-
gem "psych"
|
24
|
-
end
|
25
|
-
|
26
|
-
gemspec :path => "../"
|