jdbc-nuodb 1.0.0 → 1.0.1
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.
- data/README.rdoc +10 -6
- data/Rakefile +5 -5
- data/jdbc-nuodb.gemspec +1 -1
- data/lib/jdbc/nuodb.rb +7 -5
- data/lib/nuodb-jdbc-1.0.1.jar +0 -0
- data/spec/functional/connection_spec.rb +7 -7
- data/spec/spec_helper.rb +3 -3
- data/tasks/rspec.rb +5 -5
- data/tasks/stats.rb +3 -3
- metadata +3 -3
- data/lib/nuodb-jdbc-1.0.0.jar +0 -0
    
        data/README.rdoc
    CHANGED
    
    | @@ -28,26 +28,30 @@ which requires additional environment setup. | |
| 28 28 |  | 
| 29 29 | 
             
            For Mac, run the package installer available at:
         | 
| 30 30 |  | 
| 31 | 
            -
             | 
| 31 | 
            +
                http://jruby.org.s3.amazonaws.com/downloads/1.7.2/JRuby-1.7.2.dmg
         | 
| 32 32 |  | 
| 33 33 | 
             
            Then update your path so that the Gem from JRuby is first on your path ahead
         | 
| 34 34 | 
             
            of the system installed ruby:
         | 
| 35 35 |  | 
| 36 | 
            -
             | 
| 36 | 
            +
                export PATH=/Library/Frameworks/JRuby.framework/Versions/Current/bin:$PATH
         | 
| 37 | 
            +
             | 
| 38 | 
            +
            If you fail to do this you will see the following error:
         | 
| 39 | 
            +
             | 
| 40 | 
            +
                cannot load such file -- java
         | 
| 37 41 |  | 
| 38 42 | 
             
            == BUILDING THE GEM
         | 
| 39 43 |  | 
| 40 44 | 
             
            To compile and test run this command:
         | 
| 41 45 |  | 
| 42 | 
            -
                rake clean build spec
         | 
| 46 | 
            +
                jruby -S rake clean build spec
         | 
| 43 47 |  | 
| 44 48 | 
             
            == INSTALLING THE GEM
         | 
| 45 49 |  | 
| 46 | 
            -
                gem install jdbc-nuodb-1.0.0.gem
         | 
| 50 | 
            +
                jruby -S gem install jdbc-nuodb-1.0.0.gem
         | 
| 47 51 |  | 
| 48 52 | 
             
            Or from the source tree:
         | 
| 49 53 |  | 
| 50 | 
            -
                gem install pkg/jdbc-nuodb-1.0.0.gem
         | 
| 54 | 
            +
                jruby -S gem install pkg/jdbc-nuodb-1.0.0.gem
         | 
| 51 55 |  | 
| 52 56 | 
             
            == TESTING THE GEM
         | 
| 53 57 |  | 
| @@ -66,7 +70,7 @@ Create a user in the database: | |
| 66 70 |  | 
| 67 71 | 
             
            Run the tests:
         | 
| 68 72 |  | 
| 69 | 
            -
                rake spec
         | 
| 73 | 
            +
                jruby -S rake spec
         | 
| 70 74 |  | 
| 71 75 | 
             
            == PUBLISHING THE GEM
         | 
| 72 76 |  | 
    
        data/Rakefile
    CHANGED
    
    | @@ -35,8 +35,8 @@ require 'date' | |
| 35 35 | 
             
            require 'bundler'
         | 
| 36 36 | 
             
            require 'bundler/gem_tasks'
         | 
| 37 37 |  | 
| 38 | 
            -
            require File.expand_path(File.dirname(__FILE__)) +  | 
| 39 | 
            -
            require File.expand_path(File.dirname(__FILE__)) +  | 
| 38 | 
            +
            require File.expand_path(File.dirname(__FILE__)) + '/spec/support/config'
         | 
| 39 | 
            +
            require File.expand_path(File.dirname(__FILE__)) + '/tasks/rspec'
         | 
| 40 40 |  | 
| 41 41 | 
             
            Bundler::GemHelper.install_tasks
         | 
| 42 42 |  | 
| @@ -141,7 +141,7 @@ task :default => :spec | |
| 141 141 |  | 
| 142 142 | 
             
            desc "Build #{gem_file} into the pkg directory"
         | 
| 143 143 | 
             
            task :build do
         | 
| 144 | 
            -
              sh  | 
| 144 | 
            +
              sh 'mkdir -p pkg'
         | 
| 145 145 | 
             
              sh "gem build #{gemspec_file}"
         | 
| 146 146 | 
             
              sh "mv #{gem_file} pkg"
         | 
| 147 147 | 
             
            end
         | 
| @@ -154,12 +154,12 @@ task :uninstall do | |
| 154 154 | 
             
              sh %{gem uninstall #{name} -x -v #{version}}
         | 
| 155 155 | 
             
            end
         | 
| 156 156 |  | 
| 157 | 
            -
            desc  | 
| 157 | 
            +
            desc 'Tags git with the latest gem version'
         | 
| 158 158 | 
             
            task :tag do
         | 
| 159 159 | 
             
              sh %{git tag v#{version}}
         | 
| 160 160 | 
             
            end
         | 
| 161 161 |  | 
| 162 | 
            -
            desc  | 
| 162 | 
            +
            desc 'Push gem packages'
         | 
| 163 163 | 
             
            task :push => :build do
         | 
| 164 164 | 
             
              sh "gem push pkg/#{name}*.gem"
         | 
| 165 165 | 
             
            end
         | 
    
        data/jdbc-nuodb.gemspec
    CHANGED
    
    | @@ -23,5 +23,5 @@ Gem::Specification.new do |spec| | |
| 23 23 | 
             
              spec.add_development_dependency('rake', '~> 10.0.3')
         | 
| 24 24 |  | 
| 25 25 | 
             
              %w(rake).each { |gem| spec.add_development_dependency gem }
         | 
| 26 | 
            -
              %w(rspec rspec-core rspec-expectations rspec-mocks).each { |gem| spec.add_development_dependency gem,  | 
| 26 | 
            +
              %w(rspec rspec-core rspec-expectations rspec-mocks).each { |gem| spec.add_development_dependency gem, '~> 2.11.0' }
         | 
| 27 27 | 
             
            end
         | 
    
        data/lib/jdbc/nuodb.rb
    CHANGED
    
    | @@ -1,6 +1,8 @@ | |
| 1 | 
            +
            require 'java'
         | 
| 2 | 
            +
             | 
| 1 3 | 
             
            module Jdbc
         | 
| 2 4 | 
             
              module NuoDB
         | 
| 3 | 
            -
                VERSION =  | 
| 5 | 
            +
                VERSION = '1.0.1'
         | 
| 4 6 |  | 
| 5 7 | 
             
                def self.driver_jar
         | 
| 6 8 | 
             
                  "nuodb-jdbc-#{VERSION.split('.')[0..2].join('.')}.jar"
         | 
| @@ -17,10 +19,10 @@ module Jdbc | |
| 17 19 | 
             
            end
         | 
| 18 20 |  | 
| 19 21 | 
             
            if $VERBOSE && (JRUBY_VERSION.nil? rescue true)
         | 
| 20 | 
            -
              warn  | 
| 22 | 
            +
              warn 'Jdbc-NuoDB is only for use with JRuby'
         | 
| 21 23 | 
             
            end
         | 
| 22 24 |  | 
| 23 | 
            -
            unless Java::JavaLang::Boolean.get_boolean( | 
| 24 | 
            -
              warn  | 
| 25 | 
            +
            unless Java::JavaLang::Boolean.get_boolean('arjdbc.skip.autoload')
         | 
| 26 | 
            +
              warn 'Autoloading driver which is now deprecated. Set arjdbc.skip.autoload=true to disable autoload.'
         | 
| 25 27 | 
             
              Jdbc::NuoDB::load_driver :require
         | 
| 26 | 
            -
            end
         | 
| 28 | 
            +
            end
         | 
| Binary file | 
| @@ -7,7 +7,7 @@ describe Jdbc::NuoDB do | |
| 7 7 | 
             
              after do
         | 
| 8 8 | 
             
              end
         | 
| 9 9 |  | 
| 10 | 
            -
              context  | 
| 10 | 
            +
              context 'creating a connection' do
         | 
| 11 11 |  | 
| 12 12 | 
             
                before(:each) do
         | 
| 13 13 | 
             
                end
         | 
| @@ -15,19 +15,19 @@ describe Jdbc::NuoDB do | |
| 15 15 | 
             
                after(:each) do
         | 
| 16 16 | 
             
                end
         | 
| 17 17 |  | 
| 18 | 
            -
                it  | 
| 18 | 
            +
                it 'should raise an SQLException when provided a database that cannot be connected to' do
         | 
| 19 19 | 
             
                  lambda {
         | 
| 20 | 
            -
                    url =  | 
| 20 | 
            +
                    url = 'jdbc:com.nuodb://noexist:48004/test?schema=test'
         | 
| 21 21 | 
             
                    java.sql.DriverManager.getConnection(url)
         | 
| 22 22 | 
             
                  }.should raise_error(java.sql.SQLException)
         | 
| 23 23 | 
             
                end
         | 
| 24 24 |  | 
| 25 | 
            -
                it  | 
| 25 | 
            +
                it 'should not raise an SQLException when provided a database that can be connected to' do
         | 
| 26 26 | 
             
                  lambda {
         | 
| 27 27 | 
             
                    con_props = java.util.Properties.new
         | 
| 28 | 
            -
                    con_props.setProperty( | 
| 29 | 
            -
                    con_props.setProperty( | 
| 30 | 
            -
                    url =  | 
| 28 | 
            +
                    con_props.setProperty('user', 'cloud')
         | 
| 29 | 
            +
                    con_props.setProperty('password', 'user')
         | 
| 30 | 
            +
                    url = 'jdbc:com.nuodb://localhost:48004/test?schema=test'
         | 
| 31 31 | 
             
                    java.sql.DriverManager.getConnection(url, con_props)
         | 
| 32 32 | 
             
                  }.should_not raise_error(java.sql.SQLException)
         | 
| 33 33 | 
             
                end
         | 
    
        data/spec/spec_helper.rb
    CHANGED
    
    | @@ -1,10 +1,10 @@ | |
| 1 | 
            -
            $:.unshift File.expand_path( | 
| 1 | 
            +
            $:.unshift File.expand_path('../..', __FILE__)
         | 
| 2 2 |  | 
| 3 3 | 
             
            require 'rubygems'
         | 
| 4 4 | 
             
            require 'rspec/mocks'
         | 
| 5 5 |  | 
| 6 | 
            -
            $:.unshift(File.join(File.dirname(__FILE__),  | 
| 7 | 
            -
            $:.unshift(File.expand_path( | 
| 6 | 
            +
            $:.unshift(File.join(File.dirname(__FILE__), '..', 'lib'))
         | 
| 7 | 
            +
            $:.unshift(File.expand_path('../lib', __FILE__))
         | 
| 8 8 | 
             
            $:.unshift(File.dirname(__FILE__))
         | 
| 9 9 |  | 
| 10 10 | 
             
            require 'java'
         | 
    
        data/tasks/rspec.rb
    CHANGED
    
    | @@ -1,7 +1,7 @@ | |
| 1 1 | 
             
            require 'rubygems'
         | 
| 2 2 | 
             
            require 'rake'
         | 
| 3 3 |  | 
| 4 | 
            -
            GEM_ROOT ||= File.expand_path(File.join(File.dirname(__FILE__),  | 
| 4 | 
            +
            GEM_ROOT ||= File.expand_path(File.join(File.dirname(__FILE__), '..'))
         | 
| 5 5 |  | 
| 6 6 | 
             
            begin
         | 
| 7 7 |  | 
| @@ -9,26 +9,26 @@ begin | |
| 9 9 |  | 
| 10 10 | 
             
              task :default => :spec
         | 
| 11 11 |  | 
| 12 | 
            -
              desc  | 
| 12 | 
            +
              desc 'Run all specs in spec directory'
         | 
| 13 13 | 
             
              RSpec::Core::RakeTask.new(:spec) do |t|
         | 
| 14 14 | 
             
                t.rspec_opts = ['--options', "\"#{GEM_ROOT}/.rspec\""]
         | 
| 15 15 | 
             
                t.pattern = FileList['spec/**/*_spec.rb']
         | 
| 16 16 | 
             
              end
         | 
| 17 17 |  | 
| 18 | 
            -
              desc  | 
| 18 | 
            +
              desc 'Run all rspec functional tests (in functional/ directory)'
         | 
| 19 19 | 
             
              RSpec::Core::RakeTask.new(:functional) do |t|
         | 
| 20 20 | 
             
                t.rspec_opts = ['--options', "\"#{GEM_ROOT}/spec/spec.opts\""]
         | 
| 21 21 | 
             
                t.pattern = FileList['spec/functional/**/*_spec.rb']
         | 
| 22 22 | 
             
              end
         | 
| 23 23 |  | 
| 24 | 
            -
              desc  | 
| 24 | 
            +
              desc 'Run all rspec unit tests (in unit/ directory)'
         | 
| 25 25 | 
             
              RSpec::Core::RakeTask.new(:spec_unit) do |t|
         | 
| 26 26 | 
             
                t.rspec_opts = ['--options', "\"#{GEM_ROOT}/.rspec\""]
         | 
| 27 27 | 
             
                t.pattern = FileList['spec/unit/**/*_spec.rb']
         | 
| 28 28 | 
             
              end
         | 
| 29 29 |  | 
| 30 30 | 
             
              namespace :spec do
         | 
| 31 | 
            -
                desc  | 
| 31 | 
            +
                desc 'Print Specdoc for all specs'
         | 
| 32 32 | 
             
                RSpec::Core::RakeTask.new(:doc) do |t|
         | 
| 33 33 | 
             
                  t.rspec_opts = %w(--format specdoc --dry-run)
         | 
| 34 34 | 
             
                  t.pattern = FileList['spec/**/*_spec.rb']
         | 
    
        data/tasks/stats.rb
    CHANGED
    
    | @@ -1,8 +1,8 @@ | |
| 1 | 
            -
            desc  | 
| 1 | 
            +
            desc 'Prints lines of code metrics'
         | 
| 2 2 | 
             
            task :stats do
         | 
| 3 3 | 
             
              lines, codelines, total_lines, total_codelines = 0, 0, 0, 0
         | 
| 4 4 |  | 
| 5 | 
            -
              FileList[ | 
| 5 | 
            +
              FileList['lib/nuodb/**/*.rb', 'ext/nuodb/*.cpp'].each { |file_name|
         | 
| 6 6 | 
             
                next if file_name =~ /vendor/
         | 
| 7 7 | 
             
                f = File.open(file_name)
         | 
| 8 8 |  | 
| @@ -12,7 +12,7 @@ task :stats do | |
| 12 12 | 
             
                  next if line =~ /^\s*#/
         | 
| 13 13 | 
             
                  codelines += 1
         | 
| 14 14 | 
             
                end
         | 
| 15 | 
            -
                puts "L: #{sprintf( | 
| 15 | 
            +
                puts "L: #{sprintf('%4d', lines)}, LOC #{sprintf('%4d', codelines)} | #{file_name}"
         | 
| 16 16 |  | 
| 17 17 | 
             
                total_lines += lines
         | 
| 18 18 | 
             
                total_codelines += codelines
         | 
    
        metadata
    CHANGED
    
    | @@ -2,14 +2,14 @@ | |
| 2 2 | 
             
            name: jdbc-nuodb
         | 
| 3 3 | 
             
            version: !ruby/object:Gem::Version
         | 
| 4 4 | 
             
              prerelease:
         | 
| 5 | 
            -
              version: 1.0. | 
| 5 | 
            +
              version: 1.0.1
         | 
| 6 6 | 
             
            platform: ruby
         | 
| 7 7 | 
             
            authors:
         | 
| 8 8 | 
             
            - Robert Buck
         | 
| 9 9 | 
             
            autorequire:
         | 
| 10 10 | 
             
            bindir: bin
         | 
| 11 11 | 
             
            cert_chain: []
         | 
| 12 | 
            -
            date: 2013-02- | 
| 12 | 
            +
            date: 2013-02-23 00:00:00.000000000 Z
         | 
| 13 13 | 
             
            dependencies:
         | 
| 14 14 | 
             
            - !ruby/object:Gem::Dependency
         | 
| 15 15 | 
             
              name: rake
         | 
| @@ -127,7 +127,7 @@ files: | |
| 127 127 | 
             
            - Rakefile
         | 
| 128 128 | 
             
            - jdbc-nuodb.gemspec
         | 
| 129 129 | 
             
            - lib/jdbc/nuodb.rb
         | 
| 130 | 
            -
            - lib/nuodb-jdbc-1.0. | 
| 130 | 
            +
            - lib/nuodb-jdbc-1.0.1.jar
         | 
| 131 131 | 
             
            - spec/data/.gitignore
         | 
| 132 132 | 
             
            - spec/functional/connection_spec.rb
         | 
| 133 133 | 
             
            - spec/rcov.opts
         | 
    
        data/lib/nuodb-jdbc-1.0.0.jar
    DELETED
    
    | Binary file |