anbt-sql-formatter 0.0.3 → 0.0.4

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,15 @@
1
+ ---
2
+ !binary "U0hBMQ==":
3
+ metadata.gz: !binary |-
4
+ ZDY4ZTE3M2Y1ZGE4Y2FlNDk0OWRjNGNkZTk0MDM0ZjcwNWVlNjhhNg==
5
+ data.tar.gz: !binary |-
6
+ NzA1YmE4NjQxZGYxMmYwMWFmNzkzYmQzOGJjOGJiMmIzOThiZjEwZA==
7
+ SHA512:
8
+ metadata.gz: !binary |-
9
+ ZGM3NTFkZjNhZTg0NDBkMzk2ZjE1YjJkZWU5NjU1MTU0MTJjNmU2MGE3ZDU1
10
+ ZDI4NjUxNDEzZjhiYTU2YTk5OTQxMTc2ZGY2M2JhMjVmZTJlNGNjNTE1YmUz
11
+ YmUwZjM4ODNlOTE0ZTliZDMwOTJiZTAwN2FjMGQwYmRiZjgxNjQ=
12
+ data.tar.gz: !binary |-
13
+ NTczY2NlMDk4YTRkNzMxY2ZiYWI1NWI1YTI1NTNhMzUxMTFlNjAyYWY1MmRk
14
+ OWJhMjRlNWYzNDhjYTU1MDlmMzc2YmJlNjE1ZTZkOWY2OTZkMjljYzViNzYy
15
+ NzhjOTgzYWIyZTQyYTNlM2YyNGE1ZDE0NjQxZGQwMDYwYWY2Mjc=
@@ -0,0 +1,13 @@
1
+ # 0.0.4 (2016-06-24)
2
+
3
+ ## Bug Fixes
4
+
5
+ - Wrong matching when a string literal or a comment includes a multiwords
6
+ keyword.
7
+
8
+
9
+ # 0.0.3 (2015-02-14)
10
+
11
+ ## Improvements
12
+
13
+ - Use `/usr/bin/env` for shebang.
@@ -259,7 +259,7 @@ class AnbtSql
259
259
  x.string.sub(/\s+/, " ")
260
260
  }
261
261
 
262
- if /#{kw.join(" ")}/i =~ temp_tokens.join
262
+ if equals_ignore_case(kw.join(" "), temp_tokens.join)
263
263
  tokens[index].string = temp_tokens.join
264
264
  (target_tokens_size-1).downto(1).each{|c|
265
265
  tokens.delete_at(index + c)
@@ -1,7 +1,7 @@
1
1
  module Anbt
2
2
  module Sql
3
3
  module Formatter
4
- VERSION = "0.0.3"
4
+ VERSION = "0.0.4"
5
5
  end
6
6
  end
7
7
  end
@@ -455,5 +455,39 @@ class TestAnbtSqlParser < Test::Unit::TestCase
455
455
  )))
456
456
  )
457
457
 
458
+ ########
459
+ assert_equals(
460
+ msg + "multiwords keyword 3",
461
+ strip_indent(
462
+ <<-EOB
463
+ keyword (select)
464
+ space ( )
465
+ value ('group by')
466
+ EOB
467
+ ),
468
+ _format( @parser.parse(strip_indent(
469
+ <<-EOB
470
+ select 'group by'
471
+ EOB
472
+ )))
473
+ )
474
+
475
+ ########
476
+ assert_equals(
477
+ msg + "multiwords keyword 4",
478
+ strip_indent(
479
+ <<-EOB
480
+ keyword (select)
481
+ space ( )
482
+ comment (/*group by*/)
483
+ EOB
484
+ ),
485
+ _format( @parser.parse(strip_indent(
486
+ <<-EOB
487
+ select /*group by*/
488
+ EOB
489
+ )))
490
+ )
491
+
458
492
  end
459
493
  end
metadata CHANGED
@@ -1,15 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: anbt-sql-formatter
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.3
5
- prerelease:
4
+ version: 0.0.4
6
5
  platform: ruby
7
6
  authors:
8
7
  - sonota88
9
8
  autorequire:
10
9
  bindir: bin
11
10
  cert_chain: []
12
- date: 2015-02-14 00:00:00.000000000 Z
11
+ date: 2016-06-23 00:00:00.000000000 Z
13
12
  dependencies: []
14
13
  description: A tool for SQL formatting written in Ruby. Ruby port of Blanco SQL Formatter.
15
14
  email:
@@ -20,6 +19,7 @@ extensions: []
20
19
  extra_rdoc_files: []
21
20
  files:
22
21
  - .gitignore
22
+ - CHANGELOG.md
23
23
  - Gemfile
24
24
  - Rakefile
25
25
  - anbt-sql-formatter.gemspec
@@ -49,26 +49,25 @@ files:
49
49
  - uninstall.rb
50
50
  homepage: ''
51
51
  licenses: []
52
+ metadata: {}
52
53
  post_install_message:
53
54
  rdoc_options: []
54
55
  require_paths:
55
56
  - lib
56
57
  required_ruby_version: !ruby/object:Gem::Requirement
57
- none: false
58
58
  requirements:
59
59
  - - ! '>='
60
60
  - !ruby/object:Gem::Version
61
61
  version: '0'
62
62
  required_rubygems_version: !ruby/object:Gem::Requirement
63
- none: false
64
63
  requirements:
65
64
  - - ! '>='
66
65
  - !ruby/object:Gem::Version
67
66
  version: '0'
68
67
  requirements: []
69
68
  rubyforge_project: anbt-sql-formatter
70
- rubygems_version: 1.8.23
69
+ rubygems_version: 2.4.8
71
70
  signing_key:
72
- specification_version: 3
71
+ specification_version: 4
73
72
  summary: A tool for SQL formatting written in Ruby.
74
73
  test_files: []