gratan 0.3.1.beta → 0.3.1.beta2

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: 7ca40421121d00c6d6087897bb19f9ae256cfe1c
4
- data.tar.gz: b9d46d7d998cd85733f40af7e348d0bf5768b932
3
+ metadata.gz: 5425c0a9aa38492a759347509b0d2b85d2d1f2da
4
+ data.tar.gz: 11d798dab701b73a2d32ed932022df154b07e494
5
5
  SHA512:
6
- metadata.gz: c4a143638231edc72f93d998204470b49ae3044240c18040d7b7d4a357bcb5ea800537e6e48e33f51ceb78749cf21d96a95fe975634bbd0e3e8616c154eb13b9
7
- data.tar.gz: 0b45942f3d858620e8c3c3990c1e972d7018e89d6ba39d56b3684a551fc5294dd9f9c1da152f5f0b24794091390cc552073369a111707f4ab32472e80e21b33b
6
+ metadata.gz: 6d7eea32c84fc8679e390bc02a536b1218a617250c7e2b9359eaf70a9fc4c3aeeae31aab313833f4871619110a9e43812fedbf2fd5074df90e330e1d0d2e2747
7
+ data.tar.gz: 62bbd5a36c27d1d69ad0c80f6fdfb1283544338a2688c933a66b2ff1c1712ebbac45e742c01dd6a145a1579ad9b7b0bf36a92800966265dd05b75fd49a4cd111
@@ -8,7 +8,9 @@ script:
8
8
  - bundle install
9
9
  - bundle exec rake
10
10
  env:
11
- - MYSQL_VERSION=5.6.27
11
+ - MYSQL_VERSION=5.6.27
12
+ before_install:
13
+ - gem update bundler
12
14
  install:
13
15
  - "sudo apt-get -y remove mysql-common mysql-server-5.5 mysql-server-core-5.5 mysql-client-5.5 mysql-client-core-5.5"
14
16
  - "sudo apt-get -y autoremove"
data/README.md CHANGED
@@ -73,6 +73,14 @@ Usage: gratan [options]
73
73
  -h, --help
74
74
  ```
75
75
 
76
+ A default connection to a database can be established by setting the following environment variables:
77
+ - `GRATAN_DB_HOST`: database host
78
+ - `GRATAN_DB_PORT`: database port
79
+ - `GRATAN_DB_SOCKET`: database socket
80
+ - `GRATAN_DB_DATABASE`: database database name
81
+ - `GRATAN_DB_USER`: database user
82
+ - `GRATAN_DB_PASSWORD`: database password
83
+
76
84
  ## Grantfile example
77
85
 
78
86
  ```ruby
data/bin/gratan CHANGED
@@ -18,10 +18,15 @@ MAGIC_COMMENT = <<-EOS
18
18
  EOS
19
19
 
20
20
  mysql_options = {
21
- :host => 'localhost',
22
- :username => 'root',
21
+ host: ENV['GRATAN_DB_HOST'] || 'localhost',
22
+ username: ENV['GRATAN_DB_USERNAME'] || 'root',
23
+ port: ENV['GRATAN_DB_PORT'] || 3306
23
24
  }
24
25
 
26
+ mysql_options[:socket] = ENV['GRATAN_DB_SOCKET'] if ENV['GRATAN_DB_SOCKET']
27
+ mysql_options[:password] = ENV['GRATAN_DB_PASSWORD'] if ENV['GRATAN_DB_PASSWORD']
28
+ mysql_options[:database] = ENV['GRATAN_DB_DATABASE'] if ENV['GRATAN_DB_PASSWORD']
29
+
25
30
  options = {
26
31
  :dry_run => false,
27
32
  :color => true,
@@ -1,3 +1,3 @@
1
1
  module Gratan
2
- VERSION = '0.3.1.beta'
2
+ VERSION = '0.3.1.beta2'
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: gratan
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.1.beta
4
+ version: 0.3.1.beta2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Genki Sugawara
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-08-02 00:00:00.000000000 Z
11
+ date: 2016-12-11 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: mysql2
@@ -222,7 +222,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
222
222
  version: 1.3.1
223
223
  requirements: []
224
224
  rubyforge_project:
225
- rubygems_version: 2.4.5.1
225
+ rubygems_version: 2.5.2
226
226
  signing_key:
227
227
  specification_version: 4
228
228
  summary: Gratan is a tool to manage MySQL permissions using Ruby DSL.