niceql 0.1.12 → 0.1.14

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: fb3174c95215e20c862b83ac0ac99b93088b2383
4
- data.tar.gz: b7e83170aceb2776d501175a8a25e9a89317767e
3
+ metadata.gz: 646d8fcc2c3fa42bacdef1e4de6a86dd63c3aea9
4
+ data.tar.gz: 1ca41e47438ed32b4085e3bb4c7e7e2364ec0c39
5
5
  SHA512:
6
- metadata.gz: c0b960909a6ff0db248ccf934ed158185d94d332c7716a1f49c4f64394fc15196c4d83f53f09570f8bbd58899f303fd0b1b59d4b86c64f1da707b3a7833326db
7
- data.tar.gz: 5b2fccafcd22476fa6e767738a4524b0f56f758f19b46cd4e38a6f715bc69fa116c6fc04882e9443340a0fc6a743c84144dd3cbf5ee9eb25b45c0dd2616ea17a
6
+ metadata.gz: df6a132d674f8afc0d95d2596043b93c87a01e38ef1ffadea72fd80a02318f20bb6bc1657334b1f3b63e7458a61ae906940c7892e23f2023e8a86882acc1e2f9
7
+ data.tar.gz: 1e5039d4c982d4aa3fa00f816dab4b181edcfdcc13ddd0599287671038b7b40a9fe7f4aabf1f15120358578e1b53d9304f539ee19697f62a3c9d4747e2e028d7
data/README.md CHANGED
@@ -29,6 +29,8 @@ gem 'niceql'
29
29
  And then execute:
30
30
 
31
31
  $ bundle
32
+ # if you are using rails, you may want to install niceql config:
33
+ rails g niceql:install
32
34
 
33
35
  Or install it yourself as:
34
36
 
@@ -1,3 +1,3 @@
1
1
  module Niceql
2
- VERSION = "0.1.12"
2
+ VERSION = "0.1.14"
3
3
  end
data/lib/niceql.rb CHANGED
@@ -103,7 +103,7 @@ module Niceql
103
103
  sql.gsub( /(#{VERBS}|#{BRACKETS})/).with_index do |verb, index|
104
104
  add_new_line = false
105
105
  if 'SELECT' == verb
106
- indent += config.indentation_base if parentness.last.nil? || parentness.last[:nested]
106
+ indent += config.indentation_base if !config.open_bracket_is_newliner || parentness.last.nil? || parentness.last[:nested]
107
107
  parentness.last[:nested] = true if parentness.last
108
108
  add_new_line = !first_verb
109
109
  elsif verb == '('
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: niceql
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.12
4
+ version: 0.1.14
5
5
  platform: ruby
6
6
  authors:
7
7
  - alekseyl
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2017-09-12 00:00:00.000000000 Z
11
+ date: 2017-09-14 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler