anbt-sql-formatter 0.0.1 → 0.0.2
Sign up to get free protection for your applications and to get access to all the features.
- data/bin/anbt-sql-formatter +0 -3
- data/lib/anbt-sql-formatter/coarse-tokenizer.rb +1 -3
- data/lib/anbt-sql-formatter/exception.rb +0 -2
- data/lib/anbt-sql-formatter/formatter.rb +50 -57
- data/lib/anbt-sql-formatter/helper.rb +42 -56
- data/lib/anbt-sql-formatter/parser.rb +40 -52
- data/lib/anbt-sql-formatter/rule.rb +5 -2
- data/lib/anbt-sql-formatter/token.rb +1 -10
- data/lib/anbt-sql-formatter/version.rb +1 -1
- data/test/helper.rb +7 -1
- data/test/test_coarse-tokenizer.rb +327 -228
- data/test/test_formatter.rb +363 -276
- data/test/test_helper.rb +2 -2
- data/test/test_parser.rb +302 -213
- data/test/test_rule.rb +10 -8
- metadata +21 -31
data/test/test_rule.rb
CHANGED
@@ -16,15 +16,17 @@ class TestAnbtSqlRule < Test::Unit::TestCase
|
|
16
16
|
|
17
17
|
func_name = "TEST_FUNCTION"
|
18
18
|
@rule.function_names << func_name
|
19
|
-
assert_equals(
|
20
|
-
|
21
|
-
|
22
|
-
|
19
|
+
assert_equals(
|
20
|
+
msg,
|
21
|
+
true,
|
22
|
+
@rule.function?(func_name)
|
23
|
+
)
|
23
24
|
|
24
25
|
@rule.function_names.delete(func_name)
|
25
|
-
assert_equals(
|
26
|
-
|
27
|
-
|
28
|
-
|
26
|
+
assert_equals(
|
27
|
+
msg,
|
28
|
+
false,
|
29
|
+
@rule.function?(func_name)
|
30
|
+
)
|
29
31
|
end
|
30
32
|
end
|
metadata
CHANGED
@@ -1,29 +1,24 @@
|
|
1
|
-
--- !ruby/object:Gem::Specification
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
2
|
name: anbt-sql-formatter
|
3
|
-
version: !ruby/object:Gem::Version
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.0.2
|
4
5
|
prerelease:
|
5
|
-
version: 0.0.1
|
6
6
|
platform: ruby
|
7
|
-
authors:
|
7
|
+
authors:
|
8
8
|
- sonota
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
|
13
|
-
date: 2012-09-17 00:00:00 +09:00
|
14
|
-
default_executable:
|
12
|
+
date: 2014-01-06 00:00:00.000000000 Z
|
15
13
|
dependencies: []
|
16
|
-
|
17
14
|
description: A tool for SQL formatting written in Ruby. Ruby port of Blanco SQL Formatter.
|
18
|
-
email:
|
15
|
+
email:
|
19
16
|
- yosiot8753@gmail.com
|
20
|
-
executables:
|
17
|
+
executables:
|
21
18
|
- anbt-sql-formatter
|
22
19
|
extensions: []
|
23
|
-
|
24
20
|
extra_rdoc_files: []
|
25
|
-
|
26
|
-
files:
|
21
|
+
files:
|
27
22
|
- .gitignore
|
28
23
|
- Gemfile
|
29
24
|
- Rakefile
|
@@ -52,33 +47,28 @@ files:
|
|
52
47
|
- test/test_parser.rb
|
53
48
|
- test/test_rule.rb
|
54
49
|
- uninstall.rb
|
55
|
-
|
56
|
-
homepage: ""
|
50
|
+
homepage: ''
|
57
51
|
licenses: []
|
58
|
-
|
59
52
|
post_install_message:
|
60
53
|
rdoc_options: []
|
61
|
-
|
62
|
-
require_paths:
|
54
|
+
require_paths:
|
63
55
|
- lib
|
64
|
-
required_ruby_version: !ruby/object:Gem::Requirement
|
56
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
65
57
|
none: false
|
66
|
-
requirements:
|
67
|
-
- -
|
68
|
-
- !ruby/object:Gem::Version
|
69
|
-
version:
|
70
|
-
required_rubygems_version: !ruby/object:Gem::Requirement
|
58
|
+
requirements:
|
59
|
+
- - ! '>='
|
60
|
+
- !ruby/object:Gem::Version
|
61
|
+
version: '0'
|
62
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
71
63
|
none: false
|
72
|
-
requirements:
|
73
|
-
- -
|
74
|
-
- !ruby/object:Gem::Version
|
75
|
-
version:
|
64
|
+
requirements:
|
65
|
+
- - ! '>='
|
66
|
+
- !ruby/object:Gem::Version
|
67
|
+
version: '0'
|
76
68
|
requirements: []
|
77
|
-
|
78
69
|
rubyforge_project: anbt-sql-formatter
|
79
|
-
rubygems_version: 1.
|
70
|
+
rubygems_version: 1.8.23
|
80
71
|
signing_key:
|
81
72
|
specification_version: 3
|
82
73
|
summary: A tool for SQL formatting written in Ruby.
|
83
74
|
test_files: []
|
84
|
-
|