sdbcli 1.4.8 → 1.4.9

Sign up to get free protection for your applications and to get access to all the features.
data/bin/sdbcli CHANGED
@@ -1,7 +1,7 @@
1
1
  #!/usr/bin/env ruby
2
2
  $LOAD_PATH << File.join(File.dirname(__FILE__), '..', 'lib')
3
3
 
4
- Version = '1.4.8'
4
+ Version = '1.4.9'
5
5
  HISTORY_FILE = File.join((ENV['HOME'] || ENV['USERPROFILE'] || '.'), '.sdbcli_history')
6
6
  HISTSIZE = 500
7
7
  SELECT_LIMIT = 2500
@@ -77,7 +77,7 @@ def execute(src, show_rows = false)
77
77
  buf = ''
78
78
 
79
79
  until ss.eos?
80
- if (tok = ss.scan %r{[^-`'";\\/#]+}) #'
80
+ if (tok = ss.scan %r{[^-.`'";\\/#]+}) #'
81
81
  buf << tok
82
82
  elsif (tok = ss.scan /`(?:[^`]|``)*`/)
83
83
  buf << tok
@@ -171,6 +171,11 @@ def execute(src, show_rows = false)
171
171
  str << "\n"
172
172
  puts str
173
173
  end
174
+ elsif (tok = ss.scan /[-.]/)
175
+ output_error 'You must quote attributes and domain names that contain characters other than letters, numbers, underscores (_), or dollar symbols ($) with the backtick (`)'
176
+ ss.scan_until(/(?:;|\\G|\Z)/)
177
+ src.replace(ss.rest)
178
+ buf = ''
174
179
  elsif (tok = ss.scan /./)
175
180
  buf << tok
176
181
  end
@@ -110,7 +110,7 @@ def scan
110
110
  yield [:NUMBER, tok]
111
111
  elsif (tok = @ss.scan /[,\(\)\*]/)
112
112
  yield [tok, tok]
113
- elsif (tok = @ss.scan /[a-z_$][-0-9a-z_$.]*\b/i)
113
+ elsif (tok = @ss.scan /[a-z_$][0-9a-z_$]*\b/i)
114
114
  yield [:IDENTIFIER, tok]
115
115
  elsif (tok = @ss.scan /\|/i)
116
116
  yield [:RUBY, @ss.scan(/.*/)]
@@ -465,7 +465,7 @@ def scan
465
465
  yield [:NUMBER, tok]
466
466
  elsif (tok = @ss.scan /[,\(\)\*]/)
467
467
  yield [tok, tok]
468
- elsif (tok = @ss.scan /[a-z_$][-0-9a-z_$.]*\b/i)
468
+ elsif (tok = @ss.scan /[a-z_$][0-9a-z_$]*\b/i)
469
469
  yield [:IDENTIFIER, tok]
470
470
  elsif (tok = @ss.scan /\|/i)
471
471
  yield [:RUBY, @ss.scan(/.*/)]
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: sdbcli
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.4.8
4
+ version: 1.4.9
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2013-02-09 00:00:00.000000000 Z
12
+ date: 2013-02-11 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: nokogiri