sequel-rake-tasks 0.0.1 → 0.0.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (3) hide show
  1. checksums.yaml +4 -4
  2. data/lib/sequel_rake_tasks.rb +14 -10
  3. metadata +7 -20
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 167d9d544d500f354ccd463d7686859aa1b4d134
4
- data.tar.gz: 80580c372d55a3d7d7f45b24011c28c8e6e43701
3
+ metadata.gz: 12302dd984f309882693cdf772cff407b9708fef
4
+ data.tar.gz: 42e52440a9b1354c64fe9bf3e100c11f91e2a7bb
5
5
  SHA512:
6
- metadata.gz: a3b2ea9946151cc93a714de72084190159c6d73b083fec1b30b835dad536783935ae139e2ca874e215edeeae2106c8e8fed2f7a2fc939a4766421c2ba24d04a8
7
- data.tar.gz: 6f7894c9da1dd92b7bd19a99e1745fb3d3ac0b848603f1317e738a2bca650c059586b0ce15832e373bcdf66e167d24c828fbf88405681c07852236a8e105a481
6
+ metadata.gz: 1ba8a8a6deeb86884a334ea15ac94145db5bd271ace7f655df75eeca58c91311db82fe51d804d95d057c3e4bc3a820c7421b431fc7a4dbbcfaead8d728b7f4fe
7
+ data.tar.gz: 5e4e2d33f8575c51b266660a56d0ea1d6e8c0f63903fdebbf382af501970e7e6314f7262e326c824ddad5326cfdc0a178da386b500f94572e249b1d49fad5103
@@ -118,34 +118,34 @@ module Sequel
118
118
  attr_reader :connection_config
119
119
 
120
120
  def database_name
121
- connection_config['database']
121
+ connection_config[:database]
122
122
  end
123
123
 
124
124
  def username
125
- connection_config['username']
125
+ connection_config[:username]
126
126
  end
127
127
 
128
128
  def password
129
- connection_config['password']
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['host']
136
+ connection_config[:host]
137
137
  end
138
138
 
139
139
  def port
140
- connection_config['port']
140
+ connection_config[:port]
141
141
  end
142
142
 
143
143
  def charset
144
- connection_config['charset'] || 'utf8'
144
+ connection_config[:charset] || 'utf8'
145
145
  end
146
146
 
147
147
  def collation
148
- connection_config['collation'] || 'utf8_unicode_ci'
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 username.blank?
160
- commands << "--password=#{Shellwords.escape(password)}" unless password.blank?
161
- commands << "--host=#{host}" unless host.blank?
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.1
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: 2013-10-14 00:00:00.000000000 Z
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
- - !ruby/object:Gem::Dependency
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.3
70
+ rubygems_version: 2.0.14
85
71
  signing_key:
86
72
  specification_version: 4
87
- summary: Rake tasks for Sequel
73
+ summary: A library of Sequel rake tasks
88
74
  test_files: []
75
+ has_rdoc: