jfb 0.1.0 → 0.1.1

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: 8831e9cc6ced624b27f61003588f2862602e0678
4
- data.tar.gz: 1550c785ffdbcf45ecdadd8c0c7fb662a35b762a
3
+ metadata.gz: 1e5d565f9c97e603fd5a4c07419e483eb8347f7a
4
+ data.tar.gz: 1a5b295e418c282b85cf461cfdccd4f9bbc33954
5
5
  SHA512:
6
- metadata.gz: 3fe25bfff497ce14faf1806ceb4593b7ff6ab73e59d1404640098a94f93550efb4d8402fe123cbf982574490d0ddd839637ed5cefb1c9f5f6b9c8472fb8a499e
7
- data.tar.gz: edb78a98a28c040d576eb0c64204b2088276b5b8434dffdb5513437112fcaaa28279c27ccac2626914ed2ede57520b2481d29e1554da73f3eb2d1a28fb230043
6
+ metadata.gz: 6966dde52ead171ea29dacc0c6e470bca2b99cec8d688ca71864f2802631048ac096097698cad51affcc190a452aafd725259bcb9f5dc65ae68a30d334560b65
7
+ data.tar.gz: fd5dc9a94fd3dc1e22e00ae427afbf3bd70c99586e890bad3463792a30727796e133108ec32ac382fcd4e61cd11d86072266cac733e5356acf775887d539b3d8
@@ -24,4 +24,5 @@ Gem::Specification.new do |spec|
24
24
  spec.add_development_dependency "bundler", "~> 1.13"
25
25
  spec.add_development_dependency "rake", "~> 10.0"
26
26
  spec.add_development_dependency "rspec", "~> 3.0"
27
+ spec.add_development_dependency "jdbc/firebird", "~>2.2"
27
28
  end
@@ -1,5 +1,7 @@
1
1
  require_relative 'rs'
2
2
  require 'jdbc/firebird'
3
+ java_import 'java.sql.DriverManager'
4
+ java_import 'java.sql.SQLRecoverableException'
3
5
 
4
6
  class JFB
5
7
  @con = nil
@@ -8,17 +10,16 @@ class JFB
8
10
  def initialize(db_url, usr, pwd)
9
11
  begin
10
12
  if Jdbc::Firebird.load_driver then
11
- @con = java.sql.DriverManager.getConnection(db_url, usr, pwd)
12
- puts 3
13
+ @con = DriverManager.getConnection(db_url, usr, pwd)
13
14
 
14
15
  @con.setAutoCommit false
15
- @con.setHoldability java.sql.ResultSet.HOLD_CURSORS_OVER_COMMIT
16
+ @con.setHoldability ResultSet.HOLD_CURSORS_OVER_COMMIT
16
17
  @closed = false
17
18
  else
18
19
  puts "Failure to load driver."
19
20
  end
20
21
 
21
- rescue java.lang.Exception => erro
22
+ rescue SQLRecoverableException => erro
22
23
  @con = nil
23
24
  @closed = true
24
25
  puts "Error connecting!\n#{erro}"
@@ -29,7 +30,7 @@ class JFB
29
30
  if not @closed then
30
31
  begin
31
32
  return RS.new(@con.createStatement().executeQuery(cmd))
32
- rescue java.lang.Exception => erro
33
+ rescue Error => erro
33
34
  puts "Error message:\n#{erro}"
34
35
  end
35
36
  end
@@ -41,7 +42,7 @@ class JFB
41
42
  if not @closed then
42
43
  begin
43
44
  @con.createStatement().executeUpdate(cmd)
44
- rescue java.lang.Exception => erro
45
+ rescue Error => erro
45
46
  puts "Error message:\n#{erro}"
46
47
  end
47
48
  else
@@ -1,7 +1,11 @@
1
1
  module Jfb
2
- VERSION = "0.1.0"
2
+ VERSION = "0.1.1"
3
+
3
4
  #Version 0.1.0
4
5
  # Creates proper interface with jdbc
5
6
  # creater interface for ResultSet Class
6
7
  # Handles exceptions and drivers
8
+
9
+ #Version 0.1.1
10
+ # Adds dependency which I had forgot.
7
11
  end
metadata CHANGED
@@ -1,58 +1,73 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: jfb
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - rCamposCruz
8
- autorequire:
8
+ autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
11
  date: 2016-12-20 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
15
- version_requirements: !ruby/object:Gem::Requirement
15
+ requirement: !ruby/object:Gem::Requirement
16
16
  requirements:
17
17
  - - "~>"
18
18
  - !ruby/object:Gem::Version
19
19
  version: '1.13'
20
- requirement: !ruby/object:Gem::Requirement
20
+ type: :development
21
+ prerelease: false
22
+ version_requirements: !ruby/object:Gem::Requirement
21
23
  requirements:
22
24
  - - "~>"
23
25
  - !ruby/object:Gem::Version
24
26
  version: '1.13'
25
- prerelease: false
26
- type: :development
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: rake
29
- version_requirements: !ruby/object:Gem::Requirement
29
+ requirement: !ruby/object:Gem::Requirement
30
30
  requirements:
31
31
  - - "~>"
32
32
  - !ruby/object:Gem::Version
33
33
  version: '10.0'
34
- requirement: !ruby/object:Gem::Requirement
34
+ type: :development
35
+ prerelease: false
36
+ version_requirements: !ruby/object:Gem::Requirement
35
37
  requirements:
36
38
  - - "~>"
37
39
  - !ruby/object:Gem::Version
38
40
  version: '10.0'
39
- prerelease: false
40
- type: :development
41
41
  - !ruby/object:Gem::Dependency
42
42
  name: rspec
43
+ requirement: !ruby/object:Gem::Requirement
44
+ requirements:
45
+ - - "~>"
46
+ - !ruby/object:Gem::Version
47
+ version: '3.0'
48
+ type: :development
49
+ prerelease: false
43
50
  version_requirements: !ruby/object:Gem::Requirement
44
51
  requirements:
45
52
  - - "~>"
46
53
  - !ruby/object:Gem::Version
47
54
  version: '3.0'
55
+ - !ruby/object:Gem::Dependency
56
+ name: jdbc/firebird
48
57
  requirement: !ruby/object:Gem::Requirement
49
58
  requirements:
50
59
  - - "~>"
51
60
  - !ruby/object:Gem::Version
52
- version: '3.0'
53
- prerelease: false
61
+ version: '2.2'
54
62
  type: :development
55
- description: A very simple gem which interfaces JDBC's connections and ResultSet, making easier for simple usage of it's resources.
63
+ prerelease: false
64
+ version_requirements: !ruby/object:Gem::Requirement
65
+ requirements:
66
+ - - "~>"
67
+ - !ruby/object:Gem::Version
68
+ version: '2.2'
69
+ description: A very simple gem which interfaces JDBC's connections and ResultSet,
70
+ making easier for simple usage of it's resources.
56
71
  email:
57
72
  - rafaelcpcruz@hotmail.com
58
73
  executables: []
@@ -80,7 +95,7 @@ homepage: https://github.com/rCamposCruz/jfb
80
95
  licenses:
81
96
  - MIT
82
97
  metadata: {}
83
- post_install_message:
98
+ post_install_message:
84
99
  rdoc_options: []
85
100
  require_paths:
86
101
  - lib
@@ -95,9 +110,9 @@ required_rubygems_version: !ruby/object:Gem::Requirement
95
110
  - !ruby/object:Gem::Version
96
111
  version: '0'
97
112
  requirements: []
98
- rubyforge_project:
99
- rubygems_version: 2.4.8
100
- signing_key:
113
+ rubyforge_project:
114
+ rubygems_version: 2.5.1
115
+ signing_key:
101
116
  specification_version: 4
102
117
  summary: Gem which interfaces ruby and JDBC.
103
118
  test_files: []