ddbcli 0.2.4 → 0.2.5

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.
@@ -13,6 +13,14 @@ rule
13
13
  {
14
14
  [val[0], :shell, val[1]]
15
15
  }
16
+ | query GT STRING_VALUE
17
+ {
18
+ [val[0], :overwrite, val[2]]
19
+ }
20
+ | query GTGT STRING_VALUE
21
+ {
22
+ [val[0], :append, val[2]]
23
+ }
16
24
  | RUBY_SCRIPT
17
25
  {
18
26
  [struct(:NULL), :ruby, val[0]]
@@ -572,8 +580,9 @@ def scan
572
580
  until @ss.eos?
573
581
  if (tok = @ss.scan /\s+/)
574
582
  # nothing to do
575
- elsif (tok = @ss.scan /(?:<>|!=|>=|<=|>|<|=)/)
583
+ elsif (tok = @ss.scan /(?:>>|<>|!=|>=|<=|>|<|=)/)
576
584
  sym = {
585
+ '>>' => :GTGT,
577
586
  '<>' => :NE,
578
587
  '!=' => :NE,
579
588
  '>=' => :GE,
@@ -628,7 +637,7 @@ def raise_error(error_value, prev_tokens, scanner)
628
637
  if prev_tokens and not prev_tokens.empty?
629
638
  toks = prev_tokens.reverse[0, 5].reverse
630
639
  toks.unshift('...') if prev_tokens.length > toks.length
631
- errmsg.unshift(toks.join.strip) unless toks.empty?
640
+ errmsg.unshift(toks.join.strip)
632
641
  end
633
642
 
634
643
  if scanner and not (rest = (scanner.rest || '').strip).empty?
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ddbcli
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.4
4
+ version: 0.2.5
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-09-14 00:00:00.000000000 Z
12
+ date: 2013-09-16 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: json