auto_sql_formatter 0.1.1 → 0.1.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +2 -0
- data/Gemfile.lock +2 -1
- data/README.md +22 -18
- data/auto_sql_formatter.gemspec +2 -0
- data/lib/auto_sql_formatter.rb +1 -0
- data/lib/auto_sql_formatter/cli.rb +10 -0
- data/lib/auto_sql_formatter/formatter.rb +0 -1
- data/lib/auto_sql_formatter/runner.rb +1 -1
- data/lib/auto_sql_formatter/version.rb +1 -1
- metadata +16 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: e1ea4694b7ff164331937fae76acee83461f0e25c2e13913e9c56db53d9b54b8
|
4
|
+
data.tar.gz: cb70a8d2147a5310e803bcd8a9ff0ec144d75f402ca1327e8390d0c748f771cc
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 998f96ea871c3da30a93a86315e3b695ec683e2b42c56aeea01fcd12ccc1fd1fa8e596748beb442a83f4d6e242bd224f92655e1ac5902643e9b8538dcd4564c1
|
7
|
+
data.tar.gz: a751262365900abd524e1fea531e69c1f5b24b1272b891ca45c086e745dacc8e0ecf6b176bf2bebf13c054601276bb711341b8298b8a055de81b7916c7a5c2a9
|
data/CHANGELOG.md
CHANGED
data/Gemfile.lock
CHANGED
data/README.md
CHANGED
@@ -1,11 +1,4 @@
|
|
1
|
-
# AutoSqlFormatter
|
2
|
-
- In development
|
3
|
-
- Release schedule after July
|
4
|
-
|
5
|
-
<!-- Welcome to your new gem! In this directory, you'll find the files you need to be able to package up your Ruby library into a gem. Put your Ruby code in the file `lib/auto_sql_formatter`. To experiment with that code, run `bin/console` for an interactive prompt.
|
6
|
-
|
7
|
-
TODO: Delete this and the text above, and describe your gem
|
8
|
-
|
1
|
+
# AutoSqlFormatter ※ In development
|
9
2
|
## Installation
|
10
3
|
|
11
4
|
Add this line to your application's Gemfile:
|
@@ -16,7 +9,7 @@ gem 'auto_sql_formatter'
|
|
16
9
|
|
17
10
|
And then execute:
|
18
11
|
|
19
|
-
$ bundle
|
12
|
+
$ bundle install
|
20
13
|
|
21
14
|
Or install it yourself as:
|
22
15
|
|
@@ -24,22 +17,33 @@ Or install it yourself as:
|
|
24
17
|
|
25
18
|
## Usage
|
26
19
|
|
27
|
-
|
20
|
+
```rb
|
21
|
+
require 'auto_sql_formatter'
|
22
|
+
|
23
|
+
# In your irb concole
|
24
|
+
|
25
|
+
AutoSqlFormatter.execute dir_path # default = app
|
26
|
+
# ========Start to format sql=========
|
28
27
|
|
29
|
-
|
28
|
+
# SSS..
|
30
29
|
|
31
|
-
|
30
|
+
# example/example2.rb success
|
31
|
+
# example/example3.rb success
|
32
|
+
# example/example.rb success
|
33
|
+
# example/example4.rb none
|
34
|
+
# example/example5.rb none
|
32
35
|
|
33
|
-
|
36
|
+
# ===========Completed!!!============
|
37
|
+
|
38
|
+
# Or bundle exec auto_sql_formatter dir
|
39
|
+
bundle exec sql_format
|
40
|
+
|
41
|
+
```
|
34
42
|
|
35
43
|
## Contributing
|
36
44
|
|
37
|
-
Bug reports and pull requests are welcome on GitHub at https://github.com/
|
45
|
+
Bug reports and pull requests are welcome on GitHub at https://github.com/tashirosota/ruby-export_strings. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the [Contributor Covenant](http://contributor-covenant.org) code of conduct.
|
38
46
|
|
39
47
|
## License
|
40
48
|
|
41
49
|
The gem is available as open source under the terms of the [MIT License](https://opensource.org/licenses/MIT).
|
42
|
-
|
43
|
-
## Code of Conduct
|
44
|
-
|
45
|
-
Everyone interacting in the AutoSqlFormatter project’s codebases, issue trackers, chat rooms and mailing lists is expected to follow the [code of conduct](https://github.com/[USERNAME]/auto_sql_formatter/blob/master/CODE_OF_CONDUCT.md). -->
|
data/auto_sql_formatter.gemspec
CHANGED
@@ -34,6 +34,8 @@ Gem::Specification.new do |spec|
|
|
34
34
|
spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
|
35
35
|
spec.require_paths = ["lib"]
|
36
36
|
|
37
|
+
spec.add_dependency "export_strings", "~> 0.2"
|
38
|
+
# spec.add_dependency "thor"
|
37
39
|
spec.add_development_dependency "bundler", "~> 1.17"
|
38
40
|
spec.add_development_dependency "rake", "~> 10.0"
|
39
41
|
spec.add_development_dependency "rspec", "~> 3.0"
|
data/lib/auto_sql_formatter.rb
CHANGED
@@ -16,7 +16,7 @@ module AutoSqlFormatter
|
|
16
16
|
# }
|
17
17
|
# ]
|
18
18
|
results = Formatter.do sqls
|
19
|
-
results.each { |result| file_text.gsub!
|
19
|
+
results.each { |result| file_text.gsub! result[:from], result[:to] }
|
20
20
|
return 'success' if File.open(path, 'w') { |f| f.write file_text }
|
21
21
|
end
|
22
22
|
class Error < StandardError; end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: auto_sql_formatter
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Tashiro
|
@@ -10,6 +10,20 @@ bindir: exe
|
|
10
10
|
cert_chain: []
|
11
11
|
date: 2019-06-08 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
|
+
- !ruby/object:Gem::Dependency
|
14
|
+
name: export_strings
|
15
|
+
requirement: !ruby/object:Gem::Requirement
|
16
|
+
requirements:
|
17
|
+
- - "~>"
|
18
|
+
- !ruby/object:Gem::Version
|
19
|
+
version: '0.2'
|
20
|
+
type: :runtime
|
21
|
+
prerelease: false
|
22
|
+
version_requirements: !ruby/object:Gem::Requirement
|
23
|
+
requirements:
|
24
|
+
- - "~>"
|
25
|
+
- !ruby/object:Gem::Version
|
26
|
+
version: '0.2'
|
13
27
|
- !ruby/object:Gem::Dependency
|
14
28
|
name: bundler
|
15
29
|
requirement: !ruby/object:Gem::Requirement
|
@@ -79,6 +93,7 @@ files:
|
|
79
93
|
- example/example5.rb
|
80
94
|
- lib/.DS_Store
|
81
95
|
- lib/auto_sql_formatter.rb
|
96
|
+
- lib/auto_sql_formatter/cli.rb
|
82
97
|
- lib/auto_sql_formatter/core.rb
|
83
98
|
- lib/auto_sql_formatter/formatter.rb
|
84
99
|
- lib/auto_sql_formatter/runner.rb
|