sewell 0.1.4 → 1.0.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
  SHA1:
3
- metadata.gz: 2cc476d2880d7559adf93942296f4d7f9d7876d7
4
- data.tar.gz: 139437f77317f4aec2020db1362366d92cad36d4
3
+ metadata.gz: 9c700b7d47666b475114f8e92250db63d5cc16f8
4
+ data.tar.gz: f3305c43f4175eabe4e16c7f4466426498ecfc1c
5
5
  SHA512:
6
- metadata.gz: 10e5e4421b9735d41dccbd510e129129cd1d997b76064f2b78c0fe6cde4db6c58fc4171ed6a3ce8cb50fefef8ed615d0bd60c0d0d8185236e997ce8cade8c9ea
7
- data.tar.gz: 6176fce7f2dd4401f816d6049b76623c626e88a59594a6c6a9232136d5ce24e5b5f7fc44ce56b0da2a7815c510d2b5632b6ed2d2b374a72d8fdd85ec61be4c56
6
+ metadata.gz: 996c144f8b53ec9c5a0b6aa65d52735adfc0b29dbc1098fcbdc704e915e12196cefe742e1421f081069555c798a8a5b12acff8103eb98b46fff9c675c3f4eef5
7
+ data.tar.gz: 1fdb89067b6da83d11cbfbd4fcd33cad1f2239ee2a4055207428f87b0785927052eaec4ad9cfd2ba276019e3d76122ef8192b462fdf1064fb98fba79850de3ed
data/lib/sewell.rb CHANGED
@@ -40,7 +40,12 @@ module Sewell
40
40
  end
41
41
 
42
42
  def self.escape_groonga str
43
- str.gsub(/(\"|\'|\(|\)|\\)/, "\\#{$1}")
43
+ s = str.dup
44
+ s.gsub!(/\"|\'|\\/, '\\&')
45
+ s.gsub!("(", '\(')
46
+ s.gsub!(")", '\)')
47
+ puts s
48
+ s
44
49
  end
45
50
 
46
51
  def self.from_str str, tables
@@ -107,6 +112,6 @@ module Sewell
107
112
  if ex.first
108
113
  query.gsub!(ex.first, '')
109
114
  end
110
- query.gsub(/(:|<|>|\[|\]|\(|\))/, '')
115
+ query.gsub(/(:|<|>|\[|\])/, '')
111
116
  end
112
117
  end
@@ -1,3 +1,3 @@
1
1
  module Sewell
2
- VERSION = "0.1.4"
2
+ VERSION = "1.0.0"
3
3
  end
data/sewell.gemspec CHANGED
@@ -18,4 +18,5 @@ Gem::Specification.new do |gem|
18
18
  gem.licenses = ["MIT"]
19
19
 
20
20
  gem.add_development_dependency "rspec"
21
+ gem.add_development_dependency "rake"
21
22
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: sewell
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.4
4
+ version: 1.0.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - ssig33
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2013-12-26 00:00:00.000000000 Z
11
+ date: 2014-03-01 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rspec
@@ -24,6 +24,20 @@ dependencies:
24
24
  - - '>='
25
25
  - !ruby/object:Gem::Version
26
26
  version: '0'
27
+ - !ruby/object:Gem::Dependency
28
+ name: rake
29
+ requirement: !ruby/object:Gem::Requirement
30
+ requirements:
31
+ - - '>='
32
+ - !ruby/object:Gem::Version
33
+ version: '0'
34
+ type: :development
35
+ prerelease: false
36
+ version_requirements: !ruby/object:Gem::Requirement
37
+ requirements:
38
+ - - '>='
39
+ - !ruby/object:Gem::Version
40
+ version: '0'
27
41
  description: Generator for Groonga's query
28
42
  email:
29
43
  - mail@ssig33.com