jrubysql 0.1.3 → 0.1.4

Sign up to get free protection for your applications and to get access to all the features.
data/CHANGELOG.md CHANGED
@@ -1,6 +1,10 @@
1
1
  JRubySQL Changelog
2
2
  ==================
3
3
 
4
+ 0.1.4
5
+ -----
6
+ * Invalid error message on Oracle connection
7
+
4
8
  0.1.3
5
9
  -----
6
10
  * SQLite type support
@@ -9,7 +9,7 @@ invalid connection:
9
9
  unsupported database:
10
10
  $$ is not supported yet. Try with -c and -j options instead.
11
11
  oracle service name required:
12
- Oracle service name must be included in the hostname: e.g. localhost:1521/orcl
12
+ "Oracle service name must be included in the hostname: e.g. localhost:1521/orcl"
13
13
  invalid output:
14
14
  Invalid output type.
15
15
  file not found:
@@ -1,3 +1,3 @@
1
1
  module JRubySQL
2
- VERSION = "0.1.3"
2
+ VERSION = "0.1.4"
3
3
  end
@@ -0,0 +1,10 @@
1
+ #!/usr/bin/env ruby
2
+ # encoding: utf-8
3
+ # junegunn.c@gmail.com
4
+
5
+ # DISCLAIMER:
6
+ # Not a real test!
7
+ # Just a helper script for running scripts with local source
8
+
9
+ $LOAD_PATH.unshift File.join(File.dirname(__FILE__), '../lib')
10
+ load File.join(File.dirname(__FILE__), '../bin/', File.basename(ARGV.shift))
@@ -5,15 +5,15 @@ class TestOptionParser < Test::Unit::TestCase
5
5
 
6
6
  def test_dbms_type
7
7
  # No host
8
- assert_error /Invalid connection/, parse(%w[-t mysql])
9
- assert_error /Invalid connection/, parse(%w[--type mysql])
8
+ assert_error /Invalid connection/, %w[-t mysql]
9
+ assert_error /Invalid connection/, %w[--type mysql]
10
10
 
11
11
  # No type
12
- assert_error /Invalid connection/, parse(%w[-h localhost])
13
- assert_error /Invalid connection/, parse(%w[--host localhost])
12
+ assert_error /Invalid connection/, %w[-h localhost]
13
+ assert_error /Invalid connection/, %w[--host localhost]
14
14
 
15
15
  # Invalid type
16
- assert_error /not supported/, parse(%w[-t yoursql -h localhost])
16
+ assert_error /not supported/, %w[-t yoursql -h localhost]
17
17
 
18
18
  # Optional options
19
19
  opts = parse(%w[-t MySQL -h localhost])
@@ -47,12 +47,12 @@ class TestOptionParser < Test::Unit::TestCase
47
47
 
48
48
  def test_class_name
49
49
  # No JDBC URL
50
- assert_error /Invalid connection/, parse(%w[-c com.mysql.jdbc.Driver])
51
- assert_error /Invalid connection/, parse(%w[--class-name com.mysql.jdbc.Driver])
50
+ assert_error /Invalid connection/, %w[-c com.mysql.jdbc.Driver]
51
+ assert_error /Invalid connection/, %w[--class-name com.mysql.jdbc.Driver]
52
52
 
53
53
  # No class name
54
- assert_error /Invalid connection/, parse(%w[-j jdbc:mysql://localhost/test])
55
- assert_error /Invalid connection/, parse(%w[--jdbc-url jdbc:mysql://localhost/test])
54
+ assert_error /Invalid connection/, %w[-j jdbc:mysql://localhost/test]
55
+ assert_error /Invalid connection/, %w[--jdbc-url jdbc:mysql://localhost/test]
56
56
 
57
57
  [
58
58
  %w[-c com.mysql.jdbc.Driver -j jdbc:mysql://localhost -u username -p password -d database -o cterm],
@@ -70,18 +70,18 @@ class TestOptionParser < Test::Unit::TestCase
70
70
  end
71
71
 
72
72
  def test_invalid_output
73
- assert_error /Invalid output/, parse(%w[-t mysql -h localhost -o xml])
73
+ assert_error /Invalid output/, %w[-t mysql -h localhost -o xml]
74
74
  end
75
75
 
76
76
  def test_invalid_combination
77
- assert_error /Invalid connection/, parse(%w[-t mysql -j jdbc:mysql://localhost])
78
- assert_error /Invalid connection/, parse(%w[-c com.mysql.jdbc.Driver -h localhost])
77
+ assert_error /Invalid connection/, %w[-t mysql -j jdbc:mysql://localhost]
78
+ assert_error /Invalid connection/, %w[-c com.mysql.jdbc.Driver -h localhost]
79
79
 
80
- assert_error /both filename and script/, parse(%w[-f aaa -e bbb])
80
+ assert_error /both filename and script/, %w[-f aaa -e bbb]
81
81
  end
82
82
 
83
83
  def test_filename
84
- assert_error /File not found/, parse(%w[-t mysql -h localhost -f no-such-file.sql])
84
+ assert_error /File not found/, %w[-t mysql -h localhost -f no-such-file.sql]
85
85
 
86
86
  opts = parse(%w[-t mysql -h localhost -f] + [__FILE__])
87
87
  assert_equal __FILE__, opts[:filename]
@@ -116,7 +116,7 @@ class TestOptionParser < Test::Unit::TestCase
116
116
  def assert_error msg, argv
117
117
  ret = parse_with_output argv
118
118
  assert_equal 1, ret[:return]
119
- assert msg, ret[:stdout] =~ msg
119
+ assert ret[:stdout] =~ msg, "Expected: #{msg.source}"
120
120
  end
121
121
  end
122
122
 
metadata CHANGED
@@ -1,204 +1,256 @@
1
- --- !ruby/object:Gem::Specification
1
+ --- !ruby/object:Gem::Specification
2
2
  name: jrubysql
3
- version: !ruby/object:Gem::Version
4
- prerelease:
5
- version: 0.1.3
3
+ version: !ruby/object:Gem::Version
4
+ prerelease:
5
+ version: 0.1.4
6
6
  platform: ruby
7
- authors:
8
- - Junegunn Choi
9
- autorequire:
7
+ authors:
8
+ - Junegunn Choi
9
+ autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
-
13
- date: 2012-03-28 00:00:00 Z
14
- dependencies:
15
- - !ruby/object:Gem::Dependency
16
- name: test-unit
17
- prerelease: false
18
- requirement: &id001 !ruby/object:Gem::Requirement
19
- none: false
20
- requirements:
21
- - - ">="
22
- - !ruby/object:Gem::Version
23
- version: "0"
24
- type: :development
25
- version_requirements: *id001
26
- - !ruby/object:Gem::Dependency
27
- name: mocha
28
- prerelease: false
29
- requirement: &id002 !ruby/object:Gem::Requirement
30
- none: false
31
- requirements:
32
- - - ">="
33
- - !ruby/object:Gem::Version
34
- version: "0"
35
- type: :development
36
- version_requirements: *id002
37
- - !ruby/object:Gem::Dependency
38
- name: guard
39
- prerelease: false
40
- requirement: &id003 !ruby/object:Gem::Requirement
41
- none: false
42
- requirements:
43
- - - ">="
44
- - !ruby/object:Gem::Version
45
- version: "0"
46
- type: :development
47
- version_requirements: *id003
48
- - !ruby/object:Gem::Dependency
49
- name: guard-test
50
- prerelease: false
51
- requirement: &id004 !ruby/object:Gem::Requirement
52
- none: false
53
- requirements:
54
- - - ">="
55
- - !ruby/object:Gem::Version
56
- version: "0"
57
- type: :development
58
- version_requirements: *id004
59
- - !ruby/object:Gem::Dependency
60
- name: jdbc-helper
61
- prerelease: false
62
- requirement: &id005 !ruby/object:Gem::Requirement
63
- none: false
64
- requirements:
65
- - - ~>
66
- - !ruby/object:Gem::Version
67
- version: 0.7.2
68
- type: :runtime
69
- version_requirements: *id005
70
- - !ruby/object:Gem::Dependency
71
- name: insensitive_hash
72
- prerelease: false
73
- requirement: &id006 !ruby/object:Gem::Requirement
74
- none: false
75
- requirements:
76
- - - ~>
77
- - !ruby/object:Gem::Version
78
- version: 0.2.3
79
- type: :runtime
80
- version_requirements: *id006
81
- - !ruby/object:Gem::Dependency
82
- name: tabularize
83
- prerelease: false
84
- requirement: &id007 !ruby/object:Gem::Requirement
85
- none: false
86
- requirements:
87
- - - ~>
88
- - !ruby/object:Gem::Version
89
- version: 0.1.1
90
- type: :runtime
91
- version_requirements: *id007
92
- - !ruby/object:Gem::Dependency
93
- name: each_sql
94
- prerelease: false
95
- requirement: &id008 !ruby/object:Gem::Requirement
96
- none: false
97
- requirements:
98
- - - ~>
99
- - !ruby/object:Gem::Version
100
- version: 0.3.1
101
- type: :runtime
102
- version_requirements: *id008
103
- - !ruby/object:Gem::Dependency
104
- name: highline
105
- prerelease: false
106
- requirement: &id009 !ruby/object:Gem::Requirement
107
- none: false
108
- requirements:
109
- - - ~>
110
- - !ruby/object:Gem::Version
111
- version: 1.6.11
112
- type: :runtime
113
- version_requirements: *id009
114
- - !ruby/object:Gem::Dependency
115
- name: ansi
116
- prerelease: false
117
- requirement: &id010 !ruby/object:Gem::Requirement
118
- none: false
119
- requirements:
120
- - - ~>
121
- - !ruby/object:Gem::Version
122
- version: 1.4.2
123
- type: :runtime
124
- version_requirements: *id010
125
- - !ruby/object:Gem::Dependency
126
- name: erubis
127
- prerelease: false
128
- requirement: &id011 !ruby/object:Gem::Requirement
129
- none: false
130
- requirements:
131
- - - ~>
132
- - !ruby/object:Gem::Version
133
- version: 2.7.0
134
- type: :runtime
135
- version_requirements: *id011
12
+ date: 2012-04-23 00:00:00.000000000 Z
13
+ dependencies:
14
+ - !ruby/object:Gem::Dependency
15
+ name: test-unit
16
+ version_requirements: !ruby/object:Gem::Requirement
17
+ requirements:
18
+ - - ! '>='
19
+ - !ruby/object:Gem::Version
20
+ version: '0'
21
+ none: false
22
+ requirement: !ruby/object:Gem::Requirement
23
+ requirements:
24
+ - - ! '>='
25
+ - !ruby/object:Gem::Version
26
+ version: '0'
27
+ none: false
28
+ prerelease: false
29
+ type: :development
30
+ - !ruby/object:Gem::Dependency
31
+ name: mocha
32
+ version_requirements: !ruby/object:Gem::Requirement
33
+ requirements:
34
+ - - ! '>='
35
+ - !ruby/object:Gem::Version
36
+ version: '0'
37
+ none: false
38
+ requirement: !ruby/object:Gem::Requirement
39
+ requirements:
40
+ - - ! '>='
41
+ - !ruby/object:Gem::Version
42
+ version: '0'
43
+ none: false
44
+ prerelease: false
45
+ type: :development
46
+ - !ruby/object:Gem::Dependency
47
+ name: guard
48
+ version_requirements: !ruby/object:Gem::Requirement
49
+ requirements:
50
+ - - ! '>='
51
+ - !ruby/object:Gem::Version
52
+ version: '0'
53
+ none: false
54
+ requirement: !ruby/object:Gem::Requirement
55
+ requirements:
56
+ - - ! '>='
57
+ - !ruby/object:Gem::Version
58
+ version: '0'
59
+ none: false
60
+ prerelease: false
61
+ type: :development
62
+ - !ruby/object:Gem::Dependency
63
+ name: guard-test
64
+ version_requirements: !ruby/object:Gem::Requirement
65
+ requirements:
66
+ - - ! '>='
67
+ - !ruby/object:Gem::Version
68
+ version: '0'
69
+ none: false
70
+ requirement: !ruby/object:Gem::Requirement
71
+ requirements:
72
+ - - ! '>='
73
+ - !ruby/object:Gem::Version
74
+ version: '0'
75
+ none: false
76
+ prerelease: false
77
+ type: :development
78
+ - !ruby/object:Gem::Dependency
79
+ name: jdbc-helper
80
+ version_requirements: !ruby/object:Gem::Requirement
81
+ requirements:
82
+ - - ~>
83
+ - !ruby/object:Gem::Version
84
+ version: 0.7.2
85
+ none: false
86
+ requirement: !ruby/object:Gem::Requirement
87
+ requirements:
88
+ - - ~>
89
+ - !ruby/object:Gem::Version
90
+ version: 0.7.2
91
+ none: false
92
+ prerelease: false
93
+ type: :runtime
94
+ - !ruby/object:Gem::Dependency
95
+ name: insensitive_hash
96
+ version_requirements: !ruby/object:Gem::Requirement
97
+ requirements:
98
+ - - ~>
99
+ - !ruby/object:Gem::Version
100
+ version: 0.2.3
101
+ none: false
102
+ requirement: !ruby/object:Gem::Requirement
103
+ requirements:
104
+ - - ~>
105
+ - !ruby/object:Gem::Version
106
+ version: 0.2.3
107
+ none: false
108
+ prerelease: false
109
+ type: :runtime
110
+ - !ruby/object:Gem::Dependency
111
+ name: tabularize
112
+ version_requirements: !ruby/object:Gem::Requirement
113
+ requirements:
114
+ - - ~>
115
+ - !ruby/object:Gem::Version
116
+ version: 0.1.1
117
+ none: false
118
+ requirement: !ruby/object:Gem::Requirement
119
+ requirements:
120
+ - - ~>
121
+ - !ruby/object:Gem::Version
122
+ version: 0.1.1
123
+ none: false
124
+ prerelease: false
125
+ type: :runtime
126
+ - !ruby/object:Gem::Dependency
127
+ name: each_sql
128
+ version_requirements: !ruby/object:Gem::Requirement
129
+ requirements:
130
+ - - ~>
131
+ - !ruby/object:Gem::Version
132
+ version: 0.3.1
133
+ none: false
134
+ requirement: !ruby/object:Gem::Requirement
135
+ requirements:
136
+ - - ~>
137
+ - !ruby/object:Gem::Version
138
+ version: 0.3.1
139
+ none: false
140
+ prerelease: false
141
+ type: :runtime
142
+ - !ruby/object:Gem::Dependency
143
+ name: highline
144
+ version_requirements: !ruby/object:Gem::Requirement
145
+ requirements:
146
+ - - ~>
147
+ - !ruby/object:Gem::Version
148
+ version: 1.6.11
149
+ none: false
150
+ requirement: !ruby/object:Gem::Requirement
151
+ requirements:
152
+ - - ~>
153
+ - !ruby/object:Gem::Version
154
+ version: 1.6.11
155
+ none: false
156
+ prerelease: false
157
+ type: :runtime
158
+ - !ruby/object:Gem::Dependency
159
+ name: ansi
160
+ version_requirements: !ruby/object:Gem::Requirement
161
+ requirements:
162
+ - - ~>
163
+ - !ruby/object:Gem::Version
164
+ version: 1.4.2
165
+ none: false
166
+ requirement: !ruby/object:Gem::Requirement
167
+ requirements:
168
+ - - ~>
169
+ - !ruby/object:Gem::Version
170
+ version: 1.4.2
171
+ none: false
172
+ prerelease: false
173
+ type: :runtime
174
+ - !ruby/object:Gem::Dependency
175
+ name: erubis
176
+ version_requirements: !ruby/object:Gem::Requirement
177
+ requirements:
178
+ - - ~>
179
+ - !ruby/object:Gem::Version
180
+ version: 2.7.0
181
+ none: false
182
+ requirement: !ruby/object:Gem::Requirement
183
+ requirements:
184
+ - - ~>
185
+ - !ruby/object:Gem::Version
186
+ version: 2.7.0
187
+ none: false
188
+ prerelease: false
189
+ type: :runtime
136
190
  description: An SQL client for any JDBC-compliant database. Written in JRuby.
137
- email:
138
- - junegunn.c@gmail.com
139
- executables:
140
- - jrubysql
191
+ email:
192
+ - junegunn.c@gmail.com
193
+ executables:
194
+ - jrubysql
141
195
  extensions: []
142
-
143
196
  extra_rdoc_files: []
144
-
145
- files:
146
- - .gitignore
147
- - CHANGELOG.md
148
- - Gemfile
149
- - Guardfile
150
- - LICENSE.txt
151
- - README.md
152
- - Rakefile
153
- - bin/jrubysql
154
- - jrubysql.gemspec
155
- - lib/jrubysql.rb
156
- - lib/jrubysql/config.rb
157
- - lib/jrubysql/constants.rb
158
- - lib/jrubysql/controller.rb
159
- - lib/jrubysql/doc/help.txt.erb
160
- - lib/jrubysql/input/console.rb
161
- - lib/jrubysql/input/input.rb
162
- - lib/jrubysql/input/script.rb
163
- - lib/jrubysql/messages.rb
164
- - lib/jrubysql/messages.yml
165
- - lib/jrubysql/option_parser.rb
166
- - lib/jrubysql/output/csv.rb
167
- - lib/jrubysql/output/cterm.rb
168
- - lib/jrubysql/output/term.rb
169
- - lib/jrubysql/rdbms.rb
170
- - lib/jrubysql/version.rb
171
- - test/helper.rb
172
- - test/test_jrubysql.rb
173
- - test/test_option_parser.rb
197
+ files:
198
+ - .gitignore
199
+ - CHANGELOG.md
200
+ - Gemfile
201
+ - Guardfile
202
+ - LICENSE.txt
203
+ - README.md
204
+ - Rakefile
205
+ - bin/jrubysql
206
+ - jrubysql.gemspec
207
+ - lib/jrubysql.rb
208
+ - lib/jrubysql/config.rb
209
+ - lib/jrubysql/constants.rb
210
+ - lib/jrubysql/controller.rb
211
+ - lib/jrubysql/doc/help.txt.erb
212
+ - lib/jrubysql/input/console.rb
213
+ - lib/jrubysql/input/input.rb
214
+ - lib/jrubysql/input/script.rb
215
+ - lib/jrubysql/messages.rb
216
+ - lib/jrubysql/messages.yml
217
+ - lib/jrubysql/option_parser.rb
218
+ - lib/jrubysql/output/csv.rb
219
+ - lib/jrubysql/output/cterm.rb
220
+ - lib/jrubysql/output/term.rb
221
+ - lib/jrubysql/rdbms.rb
222
+ - lib/jrubysql/version.rb
223
+ - test/bin_helper.rb
224
+ - test/helper.rb
225
+ - test/test_jrubysql.rb
226
+ - test/test_option_parser.rb
174
227
  homepage: https://github.com/junegunn/jrubysql
175
228
  licenses: []
176
-
177
- post_install_message:
229
+ post_install_message:
178
230
  rdoc_options: []
179
-
180
- require_paths:
181
- - lib
182
- required_ruby_version: !ruby/object:Gem::Requirement
231
+ require_paths:
232
+ - lib
233
+ required_ruby_version: !ruby/object:Gem::Requirement
234
+ requirements:
235
+ - - ! '>='
236
+ - !ruby/object:Gem::Version
237
+ version: '0'
183
238
  none: false
184
- requirements:
185
- - - ">="
186
- - !ruby/object:Gem::Version
187
- version: "0"
188
- required_rubygems_version: !ruby/object:Gem::Requirement
239
+ required_rubygems_version: !ruby/object:Gem::Requirement
240
+ requirements:
241
+ - - ! '>='
242
+ - !ruby/object:Gem::Version
243
+ version: '0'
189
244
  none: false
190
- requirements:
191
- - - ">="
192
- - !ruby/object:Gem::Version
193
- version: "0"
194
245
  requirements: []
195
-
196
246
  rubyforge_project: jrubysql
197
247
  rubygems_version: 1.8.21
198
- signing_key:
248
+ signing_key:
199
249
  specification_version: 3
200
250
  summary: An SQL client for any JDBC-compliant database.
201
- test_files:
202
- - test/helper.rb
203
- - test/test_jrubysql.rb
204
- - test/test_option_parser.rb
251
+ test_files:
252
+ - test/bin_helper.rb
253
+ - test/helper.rb
254
+ - test/test_jrubysql.rb
255
+ - test/test_option_parser.rb
256
+ ...