sequel-rake-tasks 0.0.1 → 0.0.2
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/sequel_rake_tasks.rb +14 -10
- metadata +7 -20
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 12302dd984f309882693cdf772cff407b9708fef
|
4
|
+
data.tar.gz: 42e52440a9b1354c64fe9bf3e100c11f91e2a7bb
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 1ba8a8a6deeb86884a334ea15ac94145db5bd271ace7f655df75eeca58c91311db82fe51d804d95d057c3e4bc3a820c7421b431fc7a4dbbcfaead8d728b7f4fe
|
7
|
+
data.tar.gz: 5e4e2d33f8575c51b266660a56d0ea1d6e8c0f63903fdebbf382af501970e7e6314f7262e326c824ddad5326cfdc0a178da386b500f94572e249b1d49fad5103
|
data/lib/sequel_rake_tasks.rb
CHANGED
@@ -118,34 +118,34 @@ module Sequel
|
|
118
118
|
attr_reader :connection_config
|
119
119
|
|
120
120
|
def database_name
|
121
|
-
connection_config[
|
121
|
+
connection_config[:database]
|
122
122
|
end
|
123
123
|
|
124
124
|
def username
|
125
|
-
connection_config[
|
125
|
+
connection_config[:username]
|
126
126
|
end
|
127
127
|
|
128
128
|
def password
|
129
|
-
connection_config[
|
129
|
+
connection_config[:password]
|
130
130
|
end
|
131
131
|
|
132
132
|
def host
|
133
133
|
end
|
134
134
|
|
135
135
|
def host
|
136
|
-
connection_config[
|
136
|
+
connection_config[:host]
|
137
137
|
end
|
138
138
|
|
139
139
|
def port
|
140
|
-
connection_config[
|
140
|
+
connection_config[:port]
|
141
141
|
end
|
142
142
|
|
143
143
|
def charset
|
144
|
-
connection_config[
|
144
|
+
connection_config[:charset] || 'utf8'
|
145
145
|
end
|
146
146
|
|
147
147
|
def collation
|
148
|
-
connection_config[
|
148
|
+
connection_config[:collation] || 'utf8_unicode_ci'
|
149
149
|
end
|
150
150
|
|
151
151
|
def execute(statement)
|
@@ -156,11 +156,15 @@ module Sequel
|
|
156
156
|
|
157
157
|
def base_commands
|
158
158
|
commands = %w(mysql)
|
159
|
-
commands << "--user=#{Shellwords.escape(username)}" unless
|
160
|
-
commands << "--password=#{Shellwords.escape(password)}" unless
|
161
|
-
commands << "--host=#{host}" unless
|
159
|
+
commands << "--user=#{Shellwords.escape(username)}" unless blank?(username)
|
160
|
+
commands << "--password=#{Shellwords.escape(password)}" unless blank?(password)
|
161
|
+
commands << "--host=#{host}" unless blank?(host)
|
162
162
|
commands
|
163
163
|
end
|
164
164
|
|
165
|
+
def blank?(str)
|
166
|
+
str.nil? || str.strip == ""
|
167
|
+
end
|
168
|
+
|
165
169
|
end
|
166
170
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: sequel-rake-tasks
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Myles Megyesi
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date:
|
12
|
+
date: 2014-05-23 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: rake
|
@@ -39,21 +39,7 @@ dependencies:
|
|
39
39
|
- - ~>
|
40
40
|
- !ruby/object:Gem::Version
|
41
41
|
version: '4.2'
|
42
|
-
|
43
|
-
name: rake
|
44
|
-
requirement: !ruby/object:Gem::Requirement
|
45
|
-
requirements:
|
46
|
-
- - ~>
|
47
|
-
- !ruby/object:Gem::Version
|
48
|
-
version: 10.1.0
|
49
|
-
type: :development
|
50
|
-
prerelease: false
|
51
|
-
version_requirements: !ruby/object:Gem::Requirement
|
52
|
-
requirements:
|
53
|
-
- - ~>
|
54
|
-
- !ruby/object:Gem::Version
|
55
|
-
version: 10.1.0
|
56
|
-
description: Rake tasks for Sequel
|
42
|
+
description: A helpful library of Sequel rake tasks
|
57
43
|
email:
|
58
44
|
- myles.megyesi@gmail.com
|
59
45
|
- skim.la@gmail.com
|
@@ -62,7 +48,7 @@ extensions: []
|
|
62
48
|
extra_rdoc_files: []
|
63
49
|
files:
|
64
50
|
- lib/sequel_rake_tasks.rb
|
65
|
-
homepage:
|
51
|
+
homepage: https://github.com/mylesmegyesi/sequel-rake-tasks
|
66
52
|
licenses: []
|
67
53
|
metadata: {}
|
68
54
|
post_install_message:
|
@@ -81,8 +67,9 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
81
67
|
version: '0'
|
82
68
|
requirements: []
|
83
69
|
rubyforge_project:
|
84
|
-
rubygems_version: 2.0.
|
70
|
+
rubygems_version: 2.0.14
|
85
71
|
signing_key:
|
86
72
|
specification_version: 4
|
87
|
-
summary:
|
73
|
+
summary: A library of Sequel rake tasks
|
88
74
|
test_files: []
|
75
|
+
has_rdoc:
|