purview 1.0.0.beta1 → 1.0.0.beta2

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: 48f684f51dd0c4ff6b947959f5c1a3c2eb9489d9
4
- data.tar.gz: 832f24cb3904d7fb527b5cabc36d75f488b494ac
3
+ metadata.gz: 3e3e1cc20d1c3e7ff4a68a03010621b55dafa340
4
+ data.tar.gz: 38e6f5c2ac6013c38cab51cad3594079ef6aaba4
5
5
  SHA512:
6
- metadata.gz: f5d78891cc67a18657720290c7bf5cfb8c41259b7a574eb23b0e6160c987a43cfbe513948ca0d35b3df8c4372fce790c9cb64986a83596ba1ecfad825998eb17
7
- data.tar.gz: 9e4004abc1d287912deaabb8634589db52ea15fbaf6c561609e7f058a8966cbc6fdc778e48abd3780b00a17451683b8f13a471b9818cfbddf54a263d6f3b4d9d
6
+ metadata.gz: a9596c0fbcb897ae45964dcddc151f49da6bb0153e33c8f55d0fc9e199d4f838a7dd716f6b76abf6133a883c6521c50500941ce082d583c48562268bc1e946cd
7
+ data.tar.gz: ba8989022708f2c1fddf49d77cd3dac2ca3570f710b2b14207c10fa1a6ca1408857948de1e1e8319e0958a2f06928c99ad3dd0dbcfb379bb579010d6c04e0243
File without changes
@@ -1,4 +1,4 @@
1
- if defined?(JRUBY_VERSION) && (require 'jdbc/mysql' rescue nil)
1
+ if jruby? && safe_require('jdbc/mysql')
2
2
  Jdbc::MySQL.load_driver
3
3
 
4
4
  module Purview
@@ -1,4 +1,4 @@
1
- if defined?(JRUBY_VERSION) && (require 'jdbc/postgres' rescue nil)
1
+ if jruby? && safe_require('jdbc/postgres')
2
2
  Jdbc::Postgres.load_driver
3
3
 
4
4
  module Purview
@@ -1,4 +1,4 @@
1
- if !defined?(JRUBY_VERSION) && (require 'mysql2' rescue nil)
1
+ if !jruby? && safe_require('mysql2')
2
2
  module Purview
3
3
  module RawConnections
4
4
  class Mysql2 < Base
@@ -1,4 +1,4 @@
1
- if !defined?(JRUBY_VERSION) && (require 'pg' rescue nil)
1
+ if !jruby? && safe_require('pg')
2
2
  module Purview
3
3
  module RawConnections
4
4
  class PG < Base
@@ -1,3 +1,3 @@
1
1
  module Purview
2
- VERSION = '1.0.0.beta1'
2
+ VERSION = '1.0.0.beta2'
3
3
  end
data/lib/purview.rb CHANGED
@@ -1,3 +1,13 @@
1
+ def jruby?
2
+ defined?(JRUBY_VERSION)
3
+ end
4
+
5
+ def safe_require(name)
6
+ require name
7
+ rescue LoadError
8
+ nil
9
+ end
10
+
1
11
  require 'csv'
2
12
  require 'date'
3
13
  require 'etc'
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: purview
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.0.beta1
4
+ version: 1.0.0.beta2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jonathan W. Zaleski
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-05-08 00:00:00.000000000 Z
11
+ date: 2015-05-19 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -116,6 +116,7 @@ files:
116
116
  - lib/purview/exceptions/no_table.rb
117
117
  - lib/purview/exceptions/no_window.rb
118
118
  - lib/purview/exceptions/rows_outside_window.rb
119
+ - lib/purview/helpers.rub
119
120
  - lib/purview/loaders.rb
120
121
  - lib/purview/loaders/base.rb
121
122
  - lib/purview/loaders/mysql.rb
@@ -195,7 +196,7 @@ requirements:
195
196
  - "`jdbc-mysql` or `mysql2` gem"
196
197
  - "`jdbc-postgres` or `pg` gem"
197
198
  rubyforge_project:
198
- rubygems_version: 2.4.3
199
+ rubygems_version: 2.4.6
199
200
  signing_key:
200
201
  specification_version: 4
201
202
  summary: A framework designed to simplify data warehousing