ruby-plsql 0.6.0 → 0.7.0

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.
Files changed (50) hide show
  1. checksums.yaml +5 -5
  2. data/.codeclimate.yml +30 -0
  3. data/.github/stale.yml +37 -0
  4. data/.rubocop.yml +153 -0
  5. data/.travis.yml +20 -6
  6. data/.travis/oracle/download.sh +9 -10
  7. data/.travis/oracle/install.sh +6 -6
  8. data/Gemfile +13 -9
  9. data/History.txt +26 -0
  10. data/README.md +9 -5
  11. data/Rakefile +31 -26
  12. data/VERSION +1 -1
  13. data/Vagrantfile +2 -2
  14. data/gemfiles/Gemfile.activerecord-5.0 +21 -0
  15. data/gemfiles/Gemfile.activerecord-5.1 +21 -0
  16. data/gemfiles/Gemfile.activerecord-5.2 +21 -0
  17. data/lib/plsql/connection.rb +16 -18
  18. data/lib/plsql/helpers.rb +1 -3
  19. data/lib/plsql/jdbc_connection.rb +66 -61
  20. data/lib/plsql/oci8_patches.rb +2 -2
  21. data/lib/plsql/oci_connection.rb +51 -69
  22. data/lib/plsql/package.rb +5 -8
  23. data/lib/plsql/procedure.rb +75 -78
  24. data/lib/plsql/procedure_call.rb +498 -501
  25. data/lib/plsql/schema.rb +95 -100
  26. data/lib/plsql/sequence.rb +10 -13
  27. data/lib/plsql/sql_statements.rb +9 -11
  28. data/lib/plsql/table.rb +59 -63
  29. data/lib/plsql/type.rb +71 -76
  30. data/lib/plsql/variable.rb +89 -94
  31. data/lib/plsql/version.rb +1 -1
  32. data/lib/plsql/view.rb +16 -19
  33. data/ruby-plsql.gemspec +41 -37
  34. data/spec/plsql/connection_spec.rb +67 -67
  35. data/spec/plsql/package_spec.rb +15 -15
  36. data/spec/plsql/procedure_spec.rb +286 -233
  37. data/spec/plsql/schema_spec.rb +22 -23
  38. data/spec/plsql/sequence_spec.rb +2 -2
  39. data/spec/plsql/sql_statements_spec.rb +5 -5
  40. data/spec/plsql/table_spec.rb +77 -77
  41. data/spec/plsql/type_spec.rb +23 -29
  42. data/spec/plsql/variable_spec.rb +59 -59
  43. data/spec/plsql/version_spec.rb +4 -4
  44. data/spec/plsql/view_spec.rb +42 -42
  45. data/spec/spec_helper.rb +37 -29
  46. data/spec/support/test_db.rb +12 -13
  47. metadata +44 -26
  48. data/.travis/oracle/LICENSE +0 -5
  49. data/.travis/oracle/README.md +0 -64
  50. data/.travis/oracle/download.js +0 -100
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
- SHA1:
3
- metadata.gz: 64f0c78d939483e1b18a87b6bb7919188a839fca
4
- data.tar.gz: f4f86c8a37db7eb0307fcb973b9d761a02e0b26d
2
+ SHA256:
3
+ metadata.gz: b174fe3a8e87e627e00e0686919948672e1d825297cd4ba08da51ffaf14adf2f
4
+ data.tar.gz: 2393ec2d7bb267f27b31303253d8bed0ea0f9d756e2e58a679cbe660c5027bc0
5
5
  SHA512:
6
- metadata.gz: 97a210ced8901fd700c14a28afea5290208595117aa0de360f4f304522f1ae3f9df5bba65d2d84e7b93b6c579241ee0f9366489a9408b6747cf3327db711d658
7
- data.tar.gz: f62cfdb31b08c59605af04c1b704443344a968469a748ad9d1c95e285c39c9c6eca263693778ba3da9843c3537273ab95bba982001bcfc92d04004dbd81e15b6
6
+ metadata.gz: 9ebfffeba8dd70188d82bf165d14addea0032ad48c5deb21a4b9b0416a2ce5d55f25af88a3ecfa2551cd7114ea9d5b05700942b9a800704363b2ed0f2e388cd7
7
+ data.tar.gz: ec8c86020d3633c76d7dd071be82ffc653dff93c4a79f357395534dc86947a5ed1174961aaf16ad5963c6021f4e2302bad5d1ac684a570fbf52c8b48187981e4
@@ -0,0 +1,30 @@
1
+ checks:
2
+ argument-count:
3
+ enabled: false
4
+ complex-logic:
5
+ enabled: false
6
+ file-lines:
7
+ enabled: false
8
+ method-complexity:
9
+ enabled: false
10
+ method-count:
11
+ enabled: false
12
+ method-lines:
13
+ enabled: false
14
+ nested-control-flow:
15
+ enabled: false
16
+ return-statements:
17
+ enabled: false
18
+ similar-code:
19
+ enabled: false
20
+ identical-code:
21
+ enabled: false
22
+
23
+ engines:
24
+ rubocop:
25
+ enabled: true
26
+ channel: rubocop-0-58
27
+
28
+ ratings:
29
+ paths:
30
+ - "**.rb"
@@ -0,0 +1,37 @@
1
+ # Configuration for probot-stale - https://github.com/probot/stale
2
+
3
+ # Number of days of inactivity before an Issue or Pull Request becomes stale
4
+ daysUntilStale: 60
5
+ # Number of days of inactivity before a stale Issue or Pull Request is closed
6
+ daysUntilClose: 7
7
+ # Issues or Pull Requests with these labels will never be considered stale. Set to `[]` to disable
8
+ exemptLabels:
9
+ - pinned
10
+ - security
11
+ - "[Status] Maybe Later"
12
+ # Label to use when marking as stale
13
+ staleLabel: wontfix
14
+ # Comment to post when marking as stale. Set to `false` to disable
15
+ markComment: >
16
+ This issue has been automatically marked as stale because it has not had
17
+ recent activity. It will be closed if no further activity occurs. Thank you
18
+ for your contributions.
19
+ # Comment to post when removing the stale label. Set to `false` to disable
20
+ unmarkComment: false
21
+ # Comment to post when closing a stale Issue or Pull Request. Set to `false` to disable
22
+ closeComment: false
23
+ # Limit the number of actions per hour, from 1-30. Default is 30
24
+ limitPerRun: 30
25
+ # Limit to only `issues` or `pulls`
26
+ # only: issues
27
+ #
28
+ # Optionally, specify configuration settings that are specific to just 'issues' or 'pulls':
29
+ # pulls:
30
+ # daysUntilStale: 30
31
+ # markComment: >
32
+ # This pull request has been automatically marked as stale because it has not had
33
+ # recent activity. It will be closed if no further activity occurs. Thank you
34
+ # for your contributions.
35
+ # issues:
36
+ # exemptLabels:
37
+ # - confirmed
@@ -0,0 +1,153 @@
1
+ # rubocop 0.51.0 requires Ruby 2.1
2
+ # We should not use cops only available for Ruby 2.1 or later
3
+ # since ruby-plsql itself supports Ruby 1.9.3
4
+ AllCops:
5
+ TargetRubyVersion: 2.2
6
+ DisabledByDefault: true
7
+
8
+ # Prefer &&/|| over and/or.
9
+ Style/AndOr:
10
+ Enabled: true
11
+
12
+ # Do not use braces for hash literals when they are the last argument of a
13
+ # method call.
14
+ Style/BracesAroundHashParameters:
15
+ Enabled: true
16
+ EnforcedStyle: context_dependent
17
+
18
+ # Align `when` with `case`.
19
+ Layout/CaseIndentation:
20
+ Enabled: true
21
+
22
+ # Align comments with method definitions.
23
+ Layout/CommentIndentation:
24
+ Enabled: true
25
+
26
+ Layout/ElseAlignment:
27
+ Enabled: true
28
+
29
+ Layout/EmptyLineAfterMagicComment:
30
+ Enabled: true
31
+
32
+ # No extra empty lines.
33
+ Layout/EmptyLines:
34
+ Enabled: true
35
+
36
+ # In a regular class definition, no empty lines around the body.
37
+ Layout/EmptyLinesAroundClassBody:
38
+ Enabled: true
39
+
40
+ # In a regular method definition, no empty lines around the body.
41
+ Layout/EmptyLinesAroundMethodBody:
42
+ Enabled: true
43
+
44
+ # In a regular module definition, no empty lines around the body.
45
+ Layout/EmptyLinesAroundModuleBody:
46
+ Enabled: true
47
+
48
+ Layout/FirstParameterIndentation:
49
+ Enabled: true
50
+
51
+ # Use Ruby >= 1.9 syntax for hashes. Prefer { a: :b } over { :a => :b }.
52
+ Style/HashSyntax:
53
+ Enabled: true
54
+
55
+ # Method definitions after `private` or `protected` isolated calls need one
56
+ # extra level of indentation.
57
+ Layout/IndentationConsistency:
58
+ Enabled: true
59
+ EnforcedStyle: rails
60
+
61
+ # Two spaces, no tabs (for indentation).
62
+ Layout/IndentationWidth:
63
+ Enabled: true
64
+
65
+ Layout/LeadingCommentSpace:
66
+ Enabled: true
67
+
68
+ Layout/SpaceAfterColon:
69
+ Enabled: true
70
+
71
+ Layout/SpaceAfterComma:
72
+ Enabled: true
73
+
74
+ Layout/SpaceAroundEqualsInParameterDefault:
75
+ Enabled: true
76
+
77
+ Layout/SpaceAroundKeyword:
78
+ Enabled: true
79
+
80
+ Layout/SpaceAroundOperators:
81
+ Enabled: true
82
+
83
+ Layout/SpaceBeforeComma:
84
+ Enabled: true
85
+
86
+ Layout/SpaceBeforeFirstArg:
87
+ Enabled: true
88
+
89
+ Style/DefWithParentheses:
90
+ Enabled: true
91
+
92
+ # Defining a method with parameters needs parentheses.
93
+ Style/MethodDefParentheses:
94
+ Enabled: true
95
+
96
+ Style/FrozenStringLiteralComment:
97
+ Enabled: false
98
+ EnforcedStyle: always
99
+
100
+ # Use `foo {}` not `foo{}`.
101
+ Layout/SpaceBeforeBlockBraces:
102
+ Enabled: true
103
+
104
+ # Use `foo { bar }` not `foo {bar}`.
105
+ Layout/SpaceInsideBlockBraces:
106
+ Enabled: true
107
+
108
+ # Use `{ a: 1 }` not `{a:1}`.
109
+ Layout/SpaceInsideHashLiteralBraces:
110
+ Enabled: true
111
+
112
+ Layout/SpaceInsideParens:
113
+ Enabled: true
114
+
115
+ # Check quotes usage according to lint rule below.
116
+ Style/StringLiterals:
117
+ Enabled: true
118
+ EnforcedStyle: double_quotes
119
+
120
+ # Detect hard tabs, no hard tabs.
121
+ Layout/Tab:
122
+ Enabled: true
123
+
124
+ # Blank lines should not have any spaces.
125
+ Layout/TrailingBlankLines:
126
+ Enabled: true
127
+
128
+ # No trailing whitespace.
129
+ Layout/TrailingWhitespace:
130
+ Enabled: true
131
+
132
+ # Use quotes for string literals when they are enough.
133
+ Style/UnneededPercentQ:
134
+ Enabled: true
135
+
136
+ # Align `end` with the matching keyword or starting expression except for
137
+ # assignments, where it should be aligned with the LHS.
138
+ Layout/EndAlignment:
139
+ Enabled: true
140
+ EnforcedStyleAlignWith: variable
141
+ AutoCorrect: true
142
+
143
+ # Use my_method(my_arg) not my_method( my_arg ) or my_method my_arg.
144
+ Lint/RequireParentheses:
145
+ Enabled: true
146
+
147
+ Style/RedundantReturn:
148
+ Enabled: true
149
+ AllowMultipleReturnValues: true
150
+
151
+ Style/Semicolon:
152
+ Enabled: true
153
+ AllowAsExpressionSeparator: true
@@ -19,17 +19,31 @@ before_install:
19
19
  - chmod +x .travis/oracle/download.sh
20
20
  - chmod +x .travis/oracle/install.sh
21
21
  - chmod +x .travis/setup_accounts.sh
22
+ - gem install bundler
22
23
 
23
24
  install:
24
25
  - .travis/oracle/download.sh
25
26
  - .travis/oracle/install.sh
26
27
  - .travis/setup_accounts.sh
27
- - bundle install
28
+ - bundle install --without=development
28
29
 
29
30
  language: ruby
30
31
  rvm:
31
- - 2.3.0
32
- - 2.2.4
33
- - 1.9.3
34
- - jruby-1.7.9
35
- - jruby-9.0.5.0
32
+ - 2.5.1
33
+ - 2.4.4
34
+ - 2.3.7
35
+ - 2.2.10
36
+ - jruby-9.2.0.0
37
+ - ruby-head
38
+ - jruby-head
39
+
40
+ gemfile:
41
+ - Gemfile
42
+ - gemfiles/Gemfile.activerecord-5.0
43
+ - gemfiles/Gemfile.activerecord-5.1
44
+ - gemfiles/Gemfile.activerecord-5.2
45
+
46
+ matrix:
47
+ allow_failures:
48
+ - rvm: ruby-head
49
+ - rvm: jruby-head
@@ -1,16 +1,15 @@
1
- #!/bin/sh -e
2
-
3
- [ -n "$ORACLE_COOKIE" ] || { echo "Missing ORACLE_COOKIE environment variable!"; exit 1; }
4
- [ -n "$ORACLE_FILE" ] || { echo "Missing ORACLE_FILE environment variable!"; exit 1; }
1
+ #!/usr/bin/env bash
5
2
 
6
3
  cd "$(dirname "$(readlink -f "$0")")"
7
4
 
8
- npm install bluebird node-phantom-simple
5
+ deb_file=oracle-xe_11.2.0-1.0_amd64.deb
6
+
7
+ git clone https://github.com/wnameless/docker-oracle-xe-11g.git
8
+
9
+ cd docker-oracle-xe-11g/assets &&
10
+ cat "${deb_file}aa" "${deb_file}ab" "${deb_file}ac" > "${deb_file}"
9
11
 
10
- export COOKIES='cookies.txt'
11
- export USER_AGENT='Mozilla/5.0'
12
+ pwd
12
13
 
13
- echo > "$COOKIES"
14
- chmod 600 "$COOKIES"
14
+ ls -lAh "${deb_file}"
15
15
 
16
- exec node download.js
@@ -1,14 +1,14 @@
1
- #!/bin/sh -e
1
+ #!/usr/bin/env bash
2
2
 
3
3
  [ -n "$ORACLE_FILE" ] || { echo "Missing ORACLE_FILE environment variable!"; exit 1; }
4
4
  [ -n "$ORACLE_HOME" ] || { echo "Missing ORACLE_HOME environment variable!"; exit 1; }
5
5
 
6
- ORACLE_RPM="$(basename $ORACLE_FILE .zip)"
7
-
8
6
  cd "$(dirname "$(readlink -f "$0")")"
9
7
 
8
+ ORACLE_DEB=docker-oracle-xe-11g/assets/oracle-xe_11.2.0-1.0_amd64.deb
9
+
10
10
  sudo apt-get -qq update
11
- sudo apt-get --no-install-recommends -qq install bc libaio1 rpm unzip
11
+ sudo apt-get --no-install-recommends -qq install bc libaio1
12
12
 
13
13
  df -B1 /dev/shm | awk 'END { if ($1 != "shmfs" && $1 != "tmpfs" || $2 < 2147483648) exit 1 }' ||
14
14
  ( sudo rm -r /dev/shm && sudo mkdir /dev/shm && sudo mount -t tmpfs shmfs -o size=2G /dev/shm )
@@ -18,10 +18,10 @@ test -f /sbin/chkconfig ||
18
18
 
19
19
  test -d /var/lock/subsys || sudo mkdir /var/lock/subsys
20
20
 
21
- unzip -j "$(basename $ORACLE_FILE)" "*/$ORACLE_RPM"
22
- sudo rpm --install --nodeps --nopre "$ORACLE_RPM"
21
+ sudo dpkg -i "${ORACLE_DEB}"
23
22
 
24
23
  echo 'OS_AUTHENT_PREFIX=""' | sudo tee -a "$ORACLE_HOME/config/scripts/init.ora" > /dev/null
24
+ echo 'disk_asynch_io=false' | sudo tee -a "$ORACLE_HOME/config/scripts/init.ora" > /dev/null
25
25
  sudo usermod -aG dba $USER
26
26
 
27
27
  ( echo ; echo ; echo travis ; echo travis ; echo n ) | sudo AWK='/usr/bin/awk' /etc/init.d/oracle-xe configure
data/Gemfile CHANGED
@@ -1,17 +1,21 @@
1
- source 'http://rubygems.org'
1
+ source "http://rubygems.org"
2
2
 
3
3
  group :development do
4
- gem 'jeweler', '~> 2.0.1'
5
- gem 'rspec', '~> 3.1'
6
- gem 'rspec_junit_formatter'
4
+ gem "juwelier", "~> 2.0"
5
+ gem "rspec_junit_formatter"
6
+ end
7
+
8
+ group :test, :development do
9
+ gem "rake", ">= 10.0"
10
+ gem "rspec", "~> 3.1"
7
11
 
8
- unless ENV['NO_ACTIVERECORD']
9
- gem 'activerecord', '>= 3.2.3', '< 4.3.0'
10
- gem 'activerecord-oracle_enhanced-adapter', '>= 1.4.1', '< 1.7.0'
11
- gem 'simplecov', '>= 0'
12
+ unless ENV["NO_ACTIVERECORD"]
13
+ gem "activerecord", ">= 3.2.3", "< 5.2.0"
14
+ gem "activerecord-oracle_enhanced-adapter", ">= 1.4.1", "< 1.9.0"
15
+ gem "simplecov", ">= 0"
12
16
  end
13
17
 
14
18
  platforms :ruby, :mswin, :mingw do
15
- gem 'ruby-oci8', '~> 2.1'
19
+ gem "ruby-oci8", "~> 2.1"
16
20
  end
17
21
  end
@@ -1,3 +1,29 @@
1
+ == 0.7.0 2018-09-03
2
+ * Improvements and fixes
3
+
4
+ * Support Rails 5.0, 5.1 and 5.2
5
+ * Drop Rails 4.1 and 4.2 support
6
+ * Drop JRuby 1.7 support
7
+ * Drop JRuby 9.0 support
8
+ * Drop CRuby 2.1 or lower support
9
+ * Allow calling procedures in INVALID status
10
+ * Bignum, Fixnum, Integer fixes for Ruby 2.4
11
+ * Replace deprecated BigDecimal.new() with BigDecimal()
12
+ * Suppress warning `BigDecimal.new` is deprecated
13
+ * Avoid using `OCI8#describe_synonym`
14
+ * Allow ojdbc7.jar when Java version is 1.7 or higher
15
+ * Fix unguarded OCIError (breaks on JRuby)
16
+ * Suppress `warning: instance variable @dbms_output_stream not initialized`
17
+ * Suppress `warning: assigned but unused variable`
18
+ * Suppress `warning: shadowing outer local variable - column`
19
+ * Add license to gemspec
20
+ * Migrate from jeweler to juwelier
21
+ * CI against JRuby 9.1.8 and CRuby 2.4 and 2.5
22
+ * CI against jruby-head and ruby-head
23
+ * Enable RuboCop
24
+ * Set `disk_asynch_io` to `false`
25
+ * Skip XMLType specs if Oracle Database version is 12c or higher
26
+
1
27
  == 0.6.0 2016-03-13
2
28
  * Improvements
3
29
  * Add support for records with boolean attributes - as input and output parameters and as return values of stored procedures
data/README.md CHANGED
@@ -12,7 +12,7 @@ ruby-plsql gem provides simple Ruby API for calling Oracle PL/SQL procedures. It
12
12
 
13
13
  NUMBER, BINARY_INTEGER, PLS_INTEGER, NATURAL, NATURALN, POSITIVE, POSITIVEN, SIGNTYPE, SIMPLE_INTEGER, VARCHAR, VARCHAR2, NVARCHAR2, CHAR, NCHAR, DATE, TIMESTAMP, CLOB, BLOB, BOOLEAN, PL/SQL RECORD, TABLE, VARRAY, OBJECT and CURSOR types are supported for input and output parameters and return values of PL/SQL procedures and functions.
14
14
 
15
- ruby-plsql supports Ruby 1.8.7, 1.9.3, 2.1.3 and JRuby 1.6.7, 1.7.16 implementations.
15
+ ruby-plsql supports Ruby 2.2, 2.3, 2.4, 2.5 (ruby-oci8 2.2.3+ is needed for Ruby 2.4) and JRuby 9.1 implementations.
16
16
 
17
17
  USAGE
18
18
  -----
@@ -135,15 +135,19 @@ or include gem in Gemfile if using bundler.
135
135
 
136
136
  In addition install either ruby-oci8 (for MRI/YARV) or copy Oracle JDBC driver to $JRUBY_HOME/lib (for JRuby).
137
137
 
138
- If you are using MRI 1.8, 1.9 or 2.x Ruby implementation then you need to install ruby-oci8 gem (version 2.0.x or 2.1.x)
138
+ If you are using MRI Ruby implementation then you need to install ruby-oci8 gem (version 2.0.x or 2.1.x)
139
139
  as well as Oracle client, e.g. [Oracle Instant Client](http://www.oracle.com/technetwork/database/features/instant-client/index-097480.html).
140
140
 
141
- If you are using JRuby then you need to download latest [Oracle JDBC driver](http://www.oracle.com/technetwork/database/enterprise-edition/jdbc-112010-090769.html) - either ojdbc6.jar for Java 6, 7, 8 or ojdbc5.jar for Java 5. And copy this file to one of these locations:
141
+ If you are using JRuby then you need to download latest [Oracle JDBC driver](http://www.oracle.com/technetwork/database/enterprise-edition/jdbc-112010-090769.html) - either ojdbc7.jar for Java 8 and 7, ojdbc6.jar for Java 6, 7, 8 or ojdbc5.jar for Java 5. You can refer [the support matrix](http://www.oracle.com/technetwork/database/enterprise-edition/jdbc-faq-090281.html#01_03) for details.
142
+
143
+ And copy this file to one of these locations. JDBC driver will be searched in this order:
142
144
 
143
- * in `./lib` directory of Rails application and require it manually
144
- * in some directory which is in `PATH`
145
145
  * in `JRUBY_HOME/lib` directory
146
+ * in `./lib` directory of Rails application
146
147
  * or include path to JDBC driver jar file in Java `CLASSPATH`
148
+ * in some directory which is in `PATH`
149
+
150
+ If you put multiple versions of JDBC driver in the same directory the higher version one will be used.
147
151
 
148
152
  Make sure to setup the following Oracle-specific environment variables properly
149
153
 
data/Rakefile CHANGED
@@ -1,5 +1,5 @@
1
- require 'rubygems'
2
- require 'bundler'
1
+ require "rubygems"
2
+ require "bundler"
3
3
  begin
4
4
  Bundler.setup(:default, :development)
5
5
  rescue Bundler::BundlerError => e
@@ -8,41 +8,46 @@ rescue Bundler::BundlerError => e
8
8
  exit e.status_code
9
9
  end
10
10
 
11
- require 'rake'
11
+ require "rake"
12
12
 
13
- require 'jeweler'
14
- Jeweler::Tasks.new do |gem|
15
- gem.name = "ruby-plsql"
16
- gem.summary = "Ruby API for calling Oracle PL/SQL procedures."
17
- gem.description = <<-EOS
18
- ruby-plsql gem provides simple Ruby API for calling Oracle PL/SQL procedures.
19
- It could be used both for accessing Oracle PL/SQL API procedures in legacy applications
20
- as well as it could be used to create PL/SQL unit tests using Ruby testing libraries.
21
- EOS
22
- gem.email = "raimonds.simanovskis@gmail.com"
23
- gem.homepage = "http://github.com/rsim/ruby-plsql"
24
- gem.authors = ["Raimonds Simanovskis"]
25
- gem.extra_rdoc_files = ['README.md']
13
+ begin
14
+ require "juwelier"
15
+ Juwelier::Tasks.new do |gem|
16
+ gem.name = "ruby-plsql"
17
+ gem.summary = "Ruby API for calling Oracle PL/SQL procedures."
18
+ gem.description = <<-EOS
19
+ ruby-plsql gem provides simple Ruby API for calling Oracle PL/SQL procedures.
20
+ It could be used both for accessing Oracle PL/SQL API procedures in legacy applications
21
+ as well as it could be used to create PL/SQL unit tests using Ruby testing libraries.
22
+ EOS
23
+ gem.email = "raimonds.simanovskis@gmail.com"
24
+ gem.homepage = "http://github.com/rsim/ruby-plsql"
25
+ gem.license = "MIT".freeze
26
+ gem.authors = ["Raimonds Simanovskis"]
27
+ gem.extra_rdoc_files = ["README.md"]
28
+ end
29
+ Juwelier::RubygemsDotOrgTasks.new
30
+ rescue LoadError
31
+ # juwelier not installed
26
32
  end
27
- Jeweler::RubygemsDotOrgTasks.new
28
33
 
29
- require 'rspec/core/rake_task'
34
+ require "rspec/core/rake_task"
30
35
  RSpec::Core::RakeTask.new(:spec)
31
36
 
32
37
  desc "Code coverage detail"
33
38
  task :simplecov do
34
- ENV['COVERAGE'] = "true"
35
- Rake::Task['spec'].execute
39
+ ENV["COVERAGE"] = "true"
40
+ Rake::Task["spec"].execute
36
41
  end
37
42
 
38
- task :default => :spec
43
+ task default: :spec
39
44
 
40
- require 'rdoc/task'
45
+ require "rdoc/task"
41
46
  Rake::RDocTask.new do |rdoc|
42
- version = File.exist?('VERSION') ? File.read('VERSION') : ""
47
+ version = File.exist?("VERSION") ? File.read("VERSION") : ""
43
48
 
44
- rdoc.rdoc_dir = 'doc'
49
+ rdoc.rdoc_dir = "doc"
45
50
  rdoc.title = "ruby-plsql #{version}"
46
- rdoc.rdoc_files.include('README*')
47
- rdoc.rdoc_files.include('lib/**/*.rb')
51
+ rdoc.rdoc_files.include("README*")
52
+ rdoc.rdoc_files.include("lib/**/*.rb")
48
53
  end