bin_install 0.0.17 → 0.0.18
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/lib/bin_install/mysql.rb +4 -0
- data/lib/bin_install/postgres.rb +4 -0
- data/lib/bin_install/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: e70c8c565cb91c55cbb37a2309a61e50dbb1322806387e8dd92ce8b7d6a4da62
|
4
|
+
data.tar.gz: 75cd84fa2594a70ca8ab80bce616447c35bb9e7c0c50273fe23a11de38508280
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 837e7c5a4e19fac173ae250a902168a9baacce3ef313a01c91c5d6ba645e9c9b34b5ec39fd820cf304d4bb2752c5c81ac6fa91c70e9d578eb27adf044ae9bc8c
|
7
|
+
data.tar.gz: 326380bd002ad1ce25eb6cfac03904bb92744282d39cc3cb22f8b9b5c70996e09bc72af611f92de109a3936d5fd206124746d730c2aa418445a56c0e0ddc6d55
|
data/lib/bin_install/mysql.rb
CHANGED
@@ -13,19 +13,23 @@ module BinInstall
|
|
13
13
|
end
|
14
14
|
|
15
15
|
def self.create_root
|
16
|
+
puts 'Creating root user for MySQL....'.white
|
16
17
|
system("mysqladmin --user=root password ''")
|
17
18
|
end
|
18
19
|
|
19
20
|
def self.create_root!
|
21
|
+
puts 'Creating root user for MySQL....'.white
|
20
22
|
BinInstall.system!("mysqladmin --user=root password ''")
|
21
23
|
end
|
22
24
|
|
23
25
|
def self.create_user(username, password = nil)
|
26
|
+
puts "Creating user #{username} for MySQL...".white
|
24
27
|
system(%(mysql --user=root --execute="CREATE USER '#{username}'@'localhost' IDENTIFIED BY '#{password}';"))
|
25
28
|
system(%(mysql --user=root --execute="GRANT ALL PRIVILEGES ON *.* TO '#{username}'@'localhost' WITH GRANT OPTION;"))
|
26
29
|
end
|
27
30
|
|
28
31
|
def self.create_user!(username, password = nil)
|
32
|
+
puts "Creating user #{username} for MySQL...".white
|
29
33
|
BinInstall.system!(%(mysql --user=root --execute="CREATE USER '#{username}'@'localhost' IDENTIFIED BY '#{password}';"))
|
30
34
|
BinInstall.system!(%(mysql --user=root --execute="GRANT ALL PRIVILEGES ON *.* TO '#{username}'@'localhost' WITH GRANT OPTION;"))
|
31
35
|
end
|
data/lib/bin_install/postgres.rb
CHANGED
@@ -11,18 +11,22 @@ module BinInstall
|
|
11
11
|
end
|
12
12
|
|
13
13
|
def self.create_superuser(username = 'postgres')
|
14
|
+
puts 'Creating superuser postgres for postgresqlSQL...'.whtie
|
14
15
|
system("createuser --superuser #{username}")
|
15
16
|
end
|
16
17
|
|
17
18
|
def self.create_superuser!(username = 'postgres')
|
19
|
+
puts 'Creating superuser postgres for PostgreSQL...'.white
|
18
20
|
BinInstall.system!("createuser --superuser #{username}")
|
19
21
|
end
|
20
22
|
|
21
23
|
def self.create_user(username = 'postgres')
|
24
|
+
puts "Creating user #{username} for PostgreSQL".white
|
22
25
|
system("createuser #{username}")
|
23
26
|
end
|
24
27
|
|
25
28
|
def self.create_user!(username = 'postgres')
|
29
|
+
puts "Creating user #{username} for PostgreSQL".white
|
26
30
|
BinInstall.system!("createuser #{username}")
|
27
31
|
end
|
28
32
|
|
data/lib/bin_install/version.rb
CHANGED