minidusen 0.10.1 → 0.11.0

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
  SHA256:
3
- metadata.gz: '063886746bb04d49c8cf41f5e65df18f73fcea17cab398c6cadcdef622633a8d'
4
- data.tar.gz: 7f2a39216e26a2277e2f4a7c2b21abad3b14897392925d5d0b867307f6020e1b
3
+ metadata.gz: 7c888e2567eb8487761a7966fe365baf26f60103cb5379af56c23db46237640e
4
+ data.tar.gz: ab2c7590f65aba3be23549da8b47838d6ed02246a9d09be71949af4cf4fc727a
5
5
  SHA512:
6
- metadata.gz: a5b8c0e3aea84a32368b1e22e6d635448e21cb0fdaf4d9038fa4d13e8623c3da25a7b4b01b9568ce93cf0ce09c0332d1bd26e1d87d5648cdfed72a9c84d7eed4
7
- data.tar.gz: 4e4fcb3aa6c151abeacf087fda49edbe37fc8580f4cb65fb5a294a825ed377f40a168f7d0b34cca6f0dcd93bb88f0086e5bec6f2b081bf3777686f71baa0bffc
6
+ metadata.gz: 46d8ae84cad4f3d50845a681fd39ea23e547028cabfe6d2f0d61fafadb3186f303780deca527a5c09eab223cc945cec06fd71bd1ff491ebde5fdddcc817e4faa
7
+ data.tar.gz: f6e80a041d612e8145ec2e5c5ecd489171a73152b7b04bc6074f85000d489b6e625ed632d580ae36ff5dbfe0c00dcfa67ea12c51c5983fae2607d633dfe2a21d
@@ -31,9 +31,9 @@ jobs:
31
31
  gemfile: Gemfile.6.0.mysql2
32
32
  - ruby: 2.5.8
33
33
  gemfile: Gemfile.6.1.mysql2
34
- - ruby: 3.0.0
34
+ - ruby: 3.2.0
35
35
  gemfile: Gemfile.6.1.mysql2
36
- - ruby: 3.0.0
36
+ - ruby: 3.2.0
37
37
  gemfile: Gemfile.7.0.mysql2
38
38
  env:
39
39
  BUNDLE_GEMFILE: "${{ matrix.gemfile }}"
@@ -45,7 +45,6 @@ jobs:
45
45
  ruby-version: "${{ matrix.ruby }}"
46
46
  - name: Setup database
47
47
  run: |
48
- sudo apt-get install -y mariadb-client libmariadbclient-dev
49
48
  mysql -e 'create database IF NOT EXISTS test;' -u root --password=password -P 3306 -h 127.0.0.1
50
49
  - name: Bundle
51
50
  run: |
@@ -76,9 +75,9 @@ jobs:
76
75
  gemfile: Gemfile.6.0.pg
77
76
  - ruby: 2.5.8
78
77
  gemfile: Gemfile.6.1.pg
79
- - ruby: 3.0.0
78
+ - ruby: 3.2.0
80
79
  gemfile: Gemfile.6.1.pg
81
- - ruby: 3.0.0
80
+ - ruby: 3.2.0
82
81
  gemfile: Gemfile.7.0.pg
83
82
  env:
84
83
  BUNDLE_GEMFILE: "${{ matrix.gemfile }}"
@@ -90,6 +89,7 @@ jobs:
90
89
  ruby-version: "${{ matrix.ruby }}"
91
90
  - name: Setup database
92
91
  run: |
92
+ sudo apt-get update
93
93
  sudo apt-get install -y postgresql-client
94
94
  PGPASSWORD=postgres psql -c 'create database test;' -U postgres -p 5432 -h localhost
95
95
  - name: Bundle
data/CHANGELOG.md CHANGED
@@ -10,6 +10,11 @@ This project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html
10
10
 
11
11
  ### Compatible changes
12
12
 
13
+ ## 0.11.0 2024-03-18
14
+
15
+ ### Breaking changes
16
+
17
+ - only parse strings with single colons as fields
13
18
 
14
19
  ## 0.10.1 2022-03-16
15
20
 
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- minidusen (0.10.1)
4
+ minidusen (0.11.0)
5
5
  activerecord (>= 3.2)
6
6
  activesupport (>= 3.2)
7
7
  edge_rider (>= 0.2.5)
@@ -29,7 +29,7 @@ GEM
29
29
  diff-lcs (1.2.5)
30
30
  edge_rider (2.1.1)
31
31
  activerecord (>= 3.2)
32
- gemika (0.5.0)
32
+ gemika (0.8.1)
33
33
  i18n (0.7.0)
34
34
  json (1.8.6)
35
35
  minitest (5.9.0)
@@ -48,7 +48,7 @@ GEM
48
48
  diff-lcs (>= 1.2.0, < 2.0)
49
49
  rspec-support (~> 3.5.0)
50
50
  rspec-support (3.5.0)
51
- thread_safe (0.3.5)
51
+ thread_safe (0.3.6)
52
52
  tzinfo (1.2.2)
53
53
  thread_safe (~> 0.1)
54
54
 
data/Gemfile.4.2.pg.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- minidusen (0.10.1)
4
+ minidusen (0.11.0)
5
5
  activerecord (>= 3.2)
6
6
  activesupport (>= 3.2)
7
7
  edge_rider (>= 0.2.5)
@@ -29,7 +29,7 @@ GEM
29
29
  diff-lcs (1.2.5)
30
30
  edge_rider (2.1.1)
31
31
  activerecord (>= 3.2)
32
- gemika (0.5.0)
32
+ gemika (0.8.1)
33
33
  i18n (0.7.0)
34
34
  json (1.8.6)
35
35
  minitest (5.9.0)
@@ -48,7 +48,7 @@ GEM
48
48
  diff-lcs (>= 1.2.0, < 2.0)
49
49
  rspec-support (~> 3.5.0)
50
50
  rspec-support (3.5.0)
51
- thread_safe (0.3.5)
51
+ thread_safe (0.3.6)
52
52
  tzinfo (1.2.2)
53
53
  thread_safe (~> 0.1)
54
54
 
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- minidusen (0.10.1)
4
+ minidusen (0.11.0)
5
5
  activerecord (>= 3.2)
6
6
  activesupport (>= 3.2)
7
7
  edge_rider (>= 0.2.5)
@@ -27,7 +27,7 @@ GEM
27
27
  diff-lcs (1.2.5)
28
28
  edge_rider (2.1.1)
29
29
  activerecord (>= 3.2)
30
- gemika (0.5.0)
30
+ gemika (0.8.1)
31
31
  i18n (1.5.1)
32
32
  concurrent-ruby (~> 1.0)
33
33
  minitest (5.11.3)
data/Gemfile.5.2.pg CHANGED
@@ -5,7 +5,7 @@ gem 'activerecord', '~>5.2.3'
5
5
  gem 'pg', '~>0.18.4'
6
6
  gem 'i18n', '<=1.5.1' # Required to support tests for Ruby 2.2.x
7
7
 
8
- # Development dependendcies
8
+ # Development dependencies
9
9
  gem 'rake'
10
10
  gem 'database_cleaner'
11
11
  gem 'rspec', '~>3.5'
data/Gemfile.5.2.pg.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- minidusen (0.10.1)
4
+ minidusen (0.11.0)
5
5
  activerecord (>= 3.2)
6
6
  activesupport (>= 3.2)
7
7
  edge_rider (>= 0.2.5)
@@ -25,14 +25,14 @@ GEM
25
25
  concurrent-ruby (1.1.5)
26
26
  database_cleaner (1.7.0)
27
27
  diff-lcs (1.2.5)
28
- edge_rider (2.0.0)
28
+ edge_rider (2.1.1)
29
29
  activerecord (>= 3.2)
30
- gemika (0.5.0)
30
+ gemika (0.8.1)
31
31
  i18n (1.5.1)
32
32
  concurrent-ruby (~> 1.0)
33
33
  minitest (5.11.3)
34
34
  pg (0.18.4)
35
- rake (11.3.0)
35
+ rake (13.0.6)
36
36
  rspec (3.5.0)
37
37
  rspec-core (~> 3.5.0)
38
38
  rspec-expectations (~> 3.5.0)
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- minidusen (0.10.1)
4
+ minidusen (0.11.0)
5
5
  activerecord (>= 3.2)
6
6
  activesupport (>= 3.2)
7
7
  edge_rider (>= 0.2.5)
@@ -26,7 +26,7 @@ GEM
26
26
  diff-lcs (1.3)
27
27
  edge_rider (2.1.1)
28
28
  activerecord (>= 3.2)
29
- gemika (0.5.0)
29
+ gemika (0.8.1)
30
30
  i18n (1.8.5)
31
31
  concurrent-ruby (~> 1.0)
32
32
  minitest (5.14.2)
data/Gemfile.6.0.pg CHANGED
@@ -4,7 +4,7 @@ source 'https://rubygems.org'
4
4
  gem 'activerecord', '~>6.0.0'
5
5
  gem 'pg', '~>0.18.4'
6
6
 
7
- # Development dependendcies
7
+ # Development dependencies
8
8
  gem 'rake'
9
9
  gem 'database_cleaner'
10
10
  gem 'rspec', '~>3.5'
data/Gemfile.6.0.pg.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- minidusen (0.10.1)
4
+ minidusen (0.11.0)
5
5
  activerecord (>= 3.2)
6
6
  activesupport (>= 3.2)
7
7
  edge_rider (>= 0.2.5)
@@ -26,7 +26,7 @@ GEM
26
26
  diff-lcs (1.3)
27
27
  edge_rider (2.1.1)
28
28
  activerecord (>= 3.2)
29
- gemika (0.5.0)
29
+ gemika (0.8.1)
30
30
  i18n (1.8.5)
31
31
  concurrent-ruby (~> 1.0)
32
32
  minitest (5.14.2)
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- minidusen (0.10.1)
4
+ minidusen (0.11.0)
5
5
  activerecord (>= 3.2)
6
6
  activesupport (>= 3.2)
7
7
  edge_rider (>= 0.2.5)
@@ -9,12 +9,12 @@ PATH
9
9
  GEM
10
10
  remote: https://rubygems.org/
11
11
  specs:
12
- activemodel (6.1.3)
13
- activesupport (= 6.1.3)
14
- activerecord (6.1.3)
15
- activemodel (= 6.1.3)
16
- activesupport (= 6.1.3)
17
- activesupport (6.1.3)
12
+ activemodel (6.1.7.2)
13
+ activesupport (= 6.1.7.2)
14
+ activerecord (6.1.7.2)
15
+ activemodel (= 6.1.7.2)
16
+ activesupport (= 6.1.7.2)
17
+ activesupport (6.1.7.2)
18
18
  concurrent-ruby (~> 1.0, >= 1.0.2)
19
19
  i18n (>= 1.6, < 2)
20
20
  minitest (>= 5.1)
@@ -31,12 +31,12 @@ GEM
31
31
  diff-lcs (1.4.4)
32
32
  edge_rider (2.1.1)
33
33
  activerecord (>= 3.2)
34
- gemika (0.5.0)
34
+ gemika (0.8.1)
35
35
  i18n (1.8.9)
36
36
  concurrent-ruby (~> 1.0)
37
37
  minitest (5.14.4)
38
- mysql2 (0.5.3)
39
- rake (13.0.3)
38
+ mysql2 (0.5.5)
39
+ rake (13.0.6)
40
40
  rspec (3.10.0)
41
41
  rspec-core (~> 3.10.0)
42
42
  rspec-expectations (~> 3.10.0)
data/Gemfile.6.1.pg CHANGED
@@ -2,9 +2,9 @@ source 'https://rubygems.org'
2
2
 
3
3
  # Runtime dependencies
4
4
  gem 'activerecord', '~>6.1.0'
5
- gem 'pg', '~>1.1'
5
+ gem 'pg', '~> 1.4.0'
6
6
 
7
- # Development dependendcies
7
+ # Development dependencies
8
8
  gem 'rake'
9
9
  gem 'database_cleaner'
10
10
  gem 'rspec', '~>3.5'
data/Gemfile.6.1.pg.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- minidusen (0.10.1)
4
+ minidusen (0.11.0)
5
5
  activerecord (>= 3.2)
6
6
  activesupport (>= 3.2)
7
7
  edge_rider (>= 0.2.5)
@@ -9,12 +9,12 @@ PATH
9
9
  GEM
10
10
  remote: https://rubygems.org/
11
11
  specs:
12
- activemodel (6.1.3)
13
- activesupport (= 6.1.3)
14
- activerecord (6.1.3)
15
- activemodel (= 6.1.3)
16
- activesupport (= 6.1.3)
17
- activesupport (6.1.3)
12
+ activemodel (6.1.7.2)
13
+ activesupport (= 6.1.7.2)
14
+ activerecord (6.1.7.2)
15
+ activemodel (= 6.1.7.2)
16
+ activesupport (= 6.1.7.2)
17
+ activesupport (6.1.7.2)
18
18
  concurrent-ruby (~> 1.0, >= 1.0.2)
19
19
  i18n (>= 1.6, < 2)
20
20
  minitest (>= 5.1)
@@ -31,12 +31,12 @@ GEM
31
31
  diff-lcs (1.4.4)
32
32
  edge_rider (2.1.1)
33
33
  activerecord (>= 3.2)
34
- gemika (0.5.0)
34
+ gemika (0.8.1)
35
35
  i18n (1.8.9)
36
36
  concurrent-ruby (~> 1.0)
37
37
  minitest (5.14.4)
38
- pg (1.2.3)
39
- rake (13.0.3)
38
+ pg (1.4.5)
39
+ rake (13.0.6)
40
40
  rspec (3.10.0)
41
41
  rspec-core (~> 3.10.0)
42
42
  rspec-expectations (~> 3.10.0)
@@ -63,7 +63,7 @@ DEPENDENCIES
63
63
  database_cleaner
64
64
  gemika
65
65
  minidusen!
66
- pg (~> 1.1)
66
+ pg (~> 1.4.0)
67
67
  rake
68
68
  rspec (~> 3.5)
69
69
 
data/Gemfile.7.0.mysql2 CHANGED
@@ -1,7 +1,7 @@
1
1
  source 'https://rubygems.org'
2
2
 
3
3
  # Runtime dependencies
4
- gem 'activerecord', '~>7.0.0'
4
+ gem 'activerecord', '~>7.0.4.2'
5
5
  gem 'mysql2', '~>0.5'
6
6
 
7
7
  # Development dependencies
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- minidusen (0.10.1)
4
+ minidusen (0.11.0)
5
5
  activerecord (>= 3.2)
6
6
  activesupport (>= 3.2)
7
7
  edge_rider (>= 0.2.5)
@@ -9,12 +9,12 @@ PATH
9
9
  GEM
10
10
  remote: https://rubygems.org/
11
11
  specs:
12
- activemodel (7.0.0)
13
- activesupport (= 7.0.0)
14
- activerecord (7.0.0)
15
- activemodel (= 7.0.0)
16
- activesupport (= 7.0.0)
17
- activesupport (7.0.0)
12
+ activemodel (7.0.4.2)
13
+ activesupport (= 7.0.4.2)
14
+ activerecord (7.0.4.2)
15
+ activemodel (= 7.0.4.2)
16
+ activesupport (= 7.0.4.2)
17
+ activesupport (7.0.4.2)
18
18
  concurrent-ruby (~> 1.0, >= 1.0.2)
19
19
  i18n (>= 1.6, < 2)
20
20
  minitest (>= 5.1)
@@ -30,11 +30,11 @@ GEM
30
30
  diff-lcs (1.5.0)
31
31
  edge_rider (2.1.1)
32
32
  activerecord (>= 3.2)
33
- gemika (0.6.1)
33
+ gemika (0.8.1)
34
34
  i18n (1.8.11)
35
35
  concurrent-ruby (~> 1.0)
36
36
  minitest (5.15.0)
37
- mysql2 (0.5.3)
37
+ mysql2 (0.5.5)
38
38
  rake (13.0.6)
39
39
  rspec (3.10.0)
40
40
  rspec-core (~> 3.10.0)
@@ -56,7 +56,7 @@ PLATFORMS
56
56
  x86_64-linux
57
57
 
58
58
  DEPENDENCIES
59
- activerecord (~> 7.0.0)
59
+ activerecord (~> 7.0.4.2)
60
60
  byebug
61
61
  database_cleaner
62
62
  gemika
data/Gemfile.7.0.pg CHANGED
@@ -1,10 +1,10 @@
1
1
  source 'https://rubygems.org'
2
2
 
3
3
  # Runtime dependencies
4
- gem 'activerecord', '~>7.0.0'
5
- gem 'pg', '~>1.1'
4
+ gem 'activerecord', '~>7.0.4.2'
5
+ gem 'pg', '~> 1.4.0'
6
6
 
7
- # Development dependendcies
7
+ # Development dependencies
8
8
  gem 'rake'
9
9
  gem 'database_cleaner'
10
10
  gem 'rspec', '~>3.5'
data/Gemfile.7.0.pg.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- minidusen (0.10.1)
4
+ minidusen (0.11.0)
5
5
  activerecord (>= 3.2)
6
6
  activesupport (>= 3.2)
7
7
  edge_rider (>= 0.2.5)
@@ -9,12 +9,12 @@ PATH
9
9
  GEM
10
10
  remote: https://rubygems.org/
11
11
  specs:
12
- activemodel (7.0.0)
13
- activesupport (= 7.0.0)
14
- activerecord (7.0.0)
15
- activemodel (= 7.0.0)
16
- activesupport (= 7.0.0)
17
- activesupport (7.0.0)
12
+ activemodel (7.0.4.2)
13
+ activesupport (= 7.0.4.2)
14
+ activerecord (7.0.4.2)
15
+ activemodel (= 7.0.4.2)
16
+ activesupport (= 7.0.4.2)
17
+ activesupport (7.0.4.2)
18
18
  concurrent-ruby (~> 1.0, >= 1.0.2)
19
19
  i18n (>= 1.6, < 2)
20
20
  minitest (>= 5.1)
@@ -30,11 +30,11 @@ GEM
30
30
  diff-lcs (1.5.0)
31
31
  edge_rider (2.1.1)
32
32
  activerecord (>= 3.2)
33
- gemika (0.6.1)
33
+ gemika (0.8.1)
34
34
  i18n (1.8.11)
35
35
  concurrent-ruby (~> 1.0)
36
36
  minitest (5.15.0)
37
- pg (1.2.3)
37
+ pg (1.4.5)
38
38
  rake (13.0.6)
39
39
  rspec (3.10.0)
40
40
  rspec-core (~> 3.10.0)
@@ -56,12 +56,12 @@ PLATFORMS
56
56
  x86_64-linux
57
57
 
58
58
  DEPENDENCIES
59
- activerecord (~> 7.0.0)
59
+ activerecord (~> 7.0.4.2)
60
60
  byebug
61
61
  database_cleaner
62
62
  gemika
63
63
  minidusen!
64
- pg (~> 1.1)
64
+ pg (~> 1.4.0)
65
65
  rake
66
66
  rspec (~> 3.5)
67
67
 
@@ -3,8 +3,8 @@ module Minidusen
3
3
 
4
4
  class CannotParse < StandardError; end
5
5
 
6
- TEXT_QUERY = /(?:(\-)?"([^"]+)"|(\-)?([\S]+))/
7
- FIELD_QUERY = /(?:\s|^|(\-))(\w+)\:#{TEXT_QUERY}/
6
+ TEXT_QUERY = /(?:(-)?"([^"]+)"|(-)?(\S+))/
7
+ FIELD_QUERY = /(?:\s|^|(-))(\w+):(?!:)#{TEXT_QUERY}/
8
8
 
9
9
  class << self
10
10
 
@@ -1,3 +1,3 @@
1
1
  module Minidusen
2
- VERSION = '0.10.1'
2
+ VERSION = '0.11.0'
3
3
  end
@@ -63,6 +63,15 @@ describe Minidusen::Parser do
63
63
  query[0].exclude.should == true
64
64
  end
65
65
 
66
+ it 'only parses single colons as fields' do
67
+ query = Minidusen::Parser.parse('filetype:docx Namespaced::Klass')
68
+ expect(query.size).to eq(2)
69
+ expect(query[0].field).to eq('filetype')
70
+ expect(query[0].value).to eq('docx')
71
+ expect(query[1].field).to eq('text')
72
+ expect(query[1].value).to eq('Namespaced::Klass')
73
+ end
74
+
66
75
  it 'should ignore invalid utf-8 byte sequences' do
67
76
  term_with_invalid_byte_sequence = "word\255".force_encoding('UTF-8')
68
77
 
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: minidusen
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.10.1
4
+ version: 0.11.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Henning Koch
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2022-03-16 00:00:00.000000000 Z
11
+ date: 2024-03-18 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activesupport
@@ -127,7 +127,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
127
127
  - !ruby/object:Gem::Version
128
128
  version: '0'
129
129
  requirements: []
130
- rubygems_version: 3.2.28
130
+ rubygems_version: 3.2.21
131
131
  signing_key:
132
132
  specification_version: 4
133
133
  summary: Low-tech search for ActiveRecord with MySQL or PostgreSQL