ruby-plsql 0.8.0 → 0.9.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 (56) hide show
  1. checksums.yaml +4 -4
  2. data/History.txt +2 -0
  3. data/VERSION +1 -1
  4. data/lib/plsql/connection.rb +14 -14
  5. data/lib/plsql/helpers.rb +3 -3
  6. data/lib/plsql/jdbc_connection.rb +3 -3
  7. data/lib/plsql/oci_connection.rb +8 -4
  8. data/lib/plsql/package.rb +3 -3
  9. data/lib/plsql/procedure.rb +32 -17
  10. data/lib/plsql/procedure_call.rb +15 -15
  11. data/lib/plsql/schema.rb +13 -9
  12. data/lib/plsql/sequence.rb +2 -2
  13. data/lib/plsql/table.rb +6 -6
  14. data/lib/plsql/type.rb +7 -7
  15. data/lib/plsql/variable.rb +4 -4
  16. data/lib/plsql/version.rb +1 -1
  17. data/lib/plsql/view.rb +2 -2
  18. metadata +13 -138
  19. data/.github/stale.yml +0 -37
  20. data/.github/workflows/rubocop.yml +0 -37
  21. data/.github/workflows/test.yml +0 -69
  22. data/.rubocop.yml +0 -147
  23. data/.travis/oracle/download.sh +0 -15
  24. data/.travis/oracle/install.sh +0 -32
  25. data/.travis/setup_accounts.sh +0 -9
  26. data/.travis.yml +0 -88
  27. data/Gemfile +0 -24
  28. data/Rakefile +0 -53
  29. data/Vagrantfile +0 -38
  30. data/ci/network/admin/tnsnames.ora +0 -7
  31. data/ci/setup_accounts.sh +0 -9
  32. data/gemfiles/Gemfile.activerecord-5.0 +0 -21
  33. data/gemfiles/Gemfile.activerecord-5.1 +0 -21
  34. data/gemfiles/Gemfile.activerecord-5.2 +0 -21
  35. data/gemfiles/Gemfile.activerecord-6.0 +0 -21
  36. data/gemfiles/Gemfile.activerecord-6.1 +0 -21
  37. data/gemfiles/Gemfile.activerecord-main +0 -21
  38. data/ruby-plsql.gemspec +0 -114
  39. data/spec/plsql/connection_spec.rb +0 -505
  40. data/spec/plsql/package_spec.rb +0 -172
  41. data/spec/plsql/procedure_spec.rb +0 -2390
  42. data/spec/plsql/schema_spec.rb +0 -364
  43. data/spec/plsql/sequence_spec.rb +0 -67
  44. data/spec/plsql/sql_statements_spec.rb +0 -91
  45. data/spec/plsql/table_spec.rb +0 -376
  46. data/spec/plsql/type_spec.rb +0 -299
  47. data/spec/plsql/variable_spec.rb +0 -497
  48. data/spec/plsql/version_spec.rb +0 -8
  49. data/spec/plsql/view_spec.rb +0 -264
  50. data/spec/spec.opts +0 -6
  51. data/spec/spec_helper.rb +0 -121
  52. data/spec/support/create_arunit_user.sql +0 -2
  53. data/spec/support/custom_config.rb.sample +0 -14
  54. data/spec/support/file_check_script.sh +0 -9
  55. data/spec/support/test_db.rb +0 -149
  56. data/spec/support/unlock_and_setup_hr_user.sql +0 -2
@@ -1,5 +1,5 @@
1
1
  module PLSQL
2
- module VariableClassMethods #:nodoc:
2
+ module VariableClassMethods # :nodoc:
3
3
  def find(schema, variable, package, override_schema_name = nil)
4
4
  variable_upcase = variable.to_s.upcase
5
5
  schema.select_all(
@@ -17,10 +17,10 @@ module PLSQL
17
17
  end
18
18
  end
19
19
 
20
- class Variable #:nodoc:
20
+ class Variable # :nodoc:
21
21
  extend VariableClassMethods
22
22
 
23
- attr_reader :schema_name, :package_name, :variable_name #:nodoc:
23
+ attr_reader :schema_name, :package_name, :variable_name # :nodoc:
24
24
 
25
25
  def initialize(schema, variable, package, variable_type, override_schema_name = nil)
26
26
  @schema = schema
@@ -95,7 +95,7 @@ module PLSQL
95
95
  end
96
96
 
97
97
  # wrapper class to simulate Procedure class for ProcedureClass#exec
98
- class VariableProcedure #:nodoc:
98
+ class VariableProcedure # :nodoc:
99
99
  attr_reader :arguments, :argument_list, :return, :out_list, :schema
100
100
 
101
101
  def initialize(schema, variable, operation, metadata)
data/lib/plsql/version.rb CHANGED
@@ -1,3 +1,3 @@
1
- module PLSQL #:nodoc:
1
+ module PLSQL # :nodoc:
2
2
  VERSION = File.read(File.dirname(__FILE__) + "/../../VERSION").chomp
3
3
  end
data/lib/plsql/view.rb CHANGED
@@ -1,5 +1,5 @@
1
1
  module PLSQL
2
- module ViewClassMethods #:nodoc:
2
+ module ViewClassMethods # :nodoc:
3
3
  def find(schema, view)
4
4
  if schema.select_first(
5
5
  "SELECT view_name FROM all_views
@@ -33,6 +33,6 @@ module PLSQL
33
33
  class View < Table
34
34
  extend ViewClassMethods
35
35
 
36
- alias :view_name :table_name #:nodoc:
36
+ alias :view_name :table_name # :nodoc:
37
37
  end
38
38
  end
metadata CHANGED
@@ -1,85 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ruby-plsql
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.8.0
4
+ version: 0.9.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Raimonds Simanovskis
8
- autorequire:
9
8
  bindir: bin
10
9
  cert_chain: []
11
- date: 2021-08-10 00:00:00.000000000 Z
10
+ date: 1980-01-02 00:00:00.000000000 Z
12
11
  dependencies:
13
- - !ruby/object:Gem::Dependency
14
- name: juwelier
15
- requirement: !ruby/object:Gem::Requirement
16
- requirements:
17
- - - "~>"
18
- - !ruby/object:Gem::Version
19
- version: '2.0'
20
- type: :development
21
- prerelease: false
22
- version_requirements: !ruby/object:Gem::Requirement
23
- requirements:
24
- - - "~>"
25
- - !ruby/object:Gem::Version
26
- version: '2.0'
27
- - !ruby/object:Gem::Dependency
28
- name: rspec_junit_formatter
29
- requirement: !ruby/object:Gem::Requirement
30
- requirements:
31
- - - ">="
32
- - !ruby/object:Gem::Version
33
- version: '0'
34
- type: :development
35
- prerelease: false
36
- version_requirements: !ruby/object:Gem::Requirement
37
- requirements:
38
- - - ">="
39
- - !ruby/object:Gem::Version
40
- version: '0'
41
- - !ruby/object:Gem::Dependency
42
- name: rubocop
43
- requirement: !ruby/object:Gem::Requirement
44
- requirements:
45
- - - '='
46
- - !ruby/object:Gem::Version
47
- version: '0.81'
48
- type: :development
49
- prerelease: false
50
- version_requirements: !ruby/object:Gem::Requirement
51
- requirements:
52
- - - '='
53
- - !ruby/object:Gem::Version
54
- version: '0.81'
55
- - !ruby/object:Gem::Dependency
56
- name: rubocop-performance
57
- requirement: !ruby/object:Gem::Requirement
58
- requirements:
59
- - - ">="
60
- - !ruby/object:Gem::Version
61
- version: '0'
62
- type: :development
63
- prerelease: false
64
- version_requirements: !ruby/object:Gem::Requirement
65
- requirements:
66
- - - ">="
67
- - !ruby/object:Gem::Version
68
- version: '0'
69
- - !ruby/object:Gem::Dependency
70
- name: rubocop-rails
71
- requirement: !ruby/object:Gem::Requirement
72
- requirements:
73
- - - ">="
74
- - !ruby/object:Gem::Version
75
- version: '0'
76
- type: :development
77
- prerelease: false
78
- version_requirements: !ruby/object:Gem::Requirement
79
- requirements:
80
- - - ">="
81
- - !ruby/object:Gem::Version
82
- version: '0'
83
12
  - !ruby/object:Gem::Dependency
84
13
  name: rake
85
14
  requirement: !ruby/object:Gem::Requirement
@@ -109,33 +38,19 @@ dependencies:
109
38
  - !ruby/object:Gem::Version
110
39
  version: '3.1'
111
40
  - !ruby/object:Gem::Dependency
112
- name: activerecord
113
- requirement: !ruby/object:Gem::Requirement
114
- requirements:
115
- - - "~>"
116
- - !ruby/object:Gem::Version
117
- version: '5.0'
118
- type: :development
119
- prerelease: false
120
- version_requirements: !ruby/object:Gem::Requirement
121
- requirements:
122
- - - "~>"
123
- - !ruby/object:Gem::Version
124
- version: '5.0'
125
- - !ruby/object:Gem::Dependency
126
- name: activerecord-oracle_enhanced-adapter
41
+ name: rspec_junit_formatter
127
42
  requirement: !ruby/object:Gem::Requirement
128
43
  requirements:
129
- - - "~>"
44
+ - - ">="
130
45
  - !ruby/object:Gem::Version
131
- version: '1.7'
46
+ version: '0'
132
47
  type: :development
133
48
  prerelease: false
134
49
  version_requirements: !ruby/object:Gem::Requirement
135
50
  requirements:
136
- - - "~>"
51
+ - - ">="
137
52
  - !ruby/object:Gem::Version
138
- version: '1.7'
53
+ version: '0'
139
54
  - !ruby/object:Gem::Dependency
140
55
  name: simplecov
141
56
  requirement: !ruby/object:Gem::Requirement
@@ -164,39 +79,20 @@ dependencies:
164
79
  - - "~>"
165
80
  - !ruby/object:Gem::Version
166
81
  version: '2.1'
167
- description: |2
168
- ruby-plsql gem provides simple Ruby API for calling Oracle PL/SQL procedures.
169
- It could be used both for accessing Oracle PL/SQL API procedures in legacy applications
170
- as well as it could be used to create PL/SQL unit tests using Ruby testing libraries.
82
+ description: |-
83
+ ruby-plsql gem provides simple Ruby API for calling Oracle PL/SQL procedures.
84
+ It could be used both for accessing Oracle PL/SQL API procedures in legacy applications
85
+ as well as it could be used to create PL/SQL unit tests using Ruby testing libraries.
171
86
  email: raimonds.simanovskis@gmail.com
172
87
  executables: []
173
88
  extensions: []
174
89
  extra_rdoc_files:
175
90
  - README.md
176
91
  files:
177
- - ".github/stale.yml"
178
- - ".github/workflows/rubocop.yml"
179
- - ".github/workflows/test.yml"
180
- - ".rubocop.yml"
181
- - ".travis.yml"
182
- - ".travis/oracle/download.sh"
183
- - ".travis/oracle/install.sh"
184
- - ".travis/setup_accounts.sh"
185
- - Gemfile
186
92
  - History.txt
187
93
  - License.txt
188
94
  - README.md
189
- - Rakefile
190
95
  - VERSION
191
- - Vagrantfile
192
- - ci/network/admin/tnsnames.ora
193
- - ci/setup_accounts.sh
194
- - gemfiles/Gemfile.activerecord-5.0
195
- - gemfiles/Gemfile.activerecord-5.1
196
- - gemfiles/Gemfile.activerecord-5.2
197
- - gemfiles/Gemfile.activerecord-6.0
198
- - gemfiles/Gemfile.activerecord-6.1
199
- - gemfiles/Gemfile.activerecord-main
200
96
  - lib/plsql/connection.rb
201
97
  - lib/plsql/helpers.rb
202
98
  - lib/plsql/jdbc_connection.rb
@@ -215,30 +111,10 @@ files:
215
111
  - lib/plsql/view.rb
216
112
  - lib/ruby-plsql.rb
217
113
  - lib/ruby_plsql.rb
218
- - ruby-plsql.gemspec
219
- - spec/plsql/connection_spec.rb
220
- - spec/plsql/package_spec.rb
221
- - spec/plsql/procedure_spec.rb
222
- - spec/plsql/schema_spec.rb
223
- - spec/plsql/sequence_spec.rb
224
- - spec/plsql/sql_statements_spec.rb
225
- - spec/plsql/table_spec.rb
226
- - spec/plsql/type_spec.rb
227
- - spec/plsql/variable_spec.rb
228
- - spec/plsql/version_spec.rb
229
- - spec/plsql/view_spec.rb
230
- - spec/spec.opts
231
- - spec/spec_helper.rb
232
- - spec/support/create_arunit_user.sql
233
- - spec/support/custom_config.rb.sample
234
- - spec/support/file_check_script.sh
235
- - spec/support/test_db.rb
236
- - spec/support/unlock_and_setup_hr_user.sql
237
- homepage: http://github.com/rsim/ruby-plsql
114
+ homepage: https://github.com/rsim/ruby-plsql
238
115
  licenses:
239
116
  - MIT
240
117
  metadata: {}
241
- post_install_message:
242
118
  rdoc_options: []
243
119
  require_paths:
244
120
  - lib
@@ -253,8 +129,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
253
129
  - !ruby/object:Gem::Version
254
130
  version: '0'
255
131
  requirements: []
256
- rubygems_version: 3.2.22
257
- signing_key:
132
+ rubygems_version: 4.0.10
258
133
  specification_version: 4
259
134
  summary: Ruby API for calling Oracle PL/SQL procedures.
260
135
  test_files: []
data/.github/stale.yml DELETED
@@ -1,37 +0,0 @@
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
@@ -1,37 +0,0 @@
1
- name: RuboCop
2
-
3
- on:
4
- push:
5
- pull_request:
6
- schedule:
7
- - cron: "0 0 * * *"
8
-
9
- jobs:
10
- build:
11
-
12
- runs-on: ubuntu-latest
13
-
14
- steps:
15
- - uses: actions/checkout@v1
16
- - name: Set up Ruby 2.6
17
- uses: actions/setup-ruby@v1
18
- with:
19
- ruby-version: 2.6.x
20
- - name: Install required package
21
- run: |
22
- sudo apt-get install alien
23
- - name: Download Oracle instant client
24
- run: |
25
- wget -q https://download.oracle.com/otn_software/linux/instantclient/193000/oracle-instantclient19.3-basic-19.3.0.0.0-1.x86_64.rpm
26
- wget -q https://download.oracle.com/otn_software/linux/instantclient/193000/oracle-instantclient19.3-sqlplus-19.3.0.0.0-1.x86_64.rpm
27
- wget -q https://download.oracle.com/otn_software/linux/instantclient/193000/oracle-instantclient19.3-devel-19.3.0.0.0-1.x86_64.rpm
28
- - name: Install Oracle instant client
29
- run: |
30
- sudo alien -i oracle-instantclient19.3-basic-19.3.0.0.0-1.x86_64.rpm
31
- sudo alien -i oracle-instantclient19.3-sqlplus-19.3.0.0.0-1.x86_64.rpm
32
- sudo alien -i oracle-instantclient19.3-devel-19.3.0.0.0-1.x86_64.rpm
33
-
34
- - name: Build and run RuboCop
35
- run: |
36
- bundle install --jobs 4 --retry 3
37
- bundle exec rubocop --parallel
@@ -1,69 +0,0 @@
1
- name: test
2
-
3
- on:
4
- push:
5
- pull_request:
6
-
7
- jobs:
8
- build:
9
-
10
- runs-on: ubuntu-20.04
11
- continue-on-error: true
12
- strategy:
13
- matrix:
14
- ruby: [
15
- 3.0,
16
- 2.7,
17
- 2.6,
18
- 2.5,
19
- ruby-head,
20
- ruby-debug
21
- ]
22
- env:
23
- ORACLE_HOME: /usr/lib/oracle/18.5/client64
24
- LD_LIBRARY_PATH: /usr/lib/oracle/18.5/client64/lib
25
- NLS_LANG: AMERICAN_AMERICA.AL32UTF8
26
- TNS_ADMIN: ./ci/network/admin
27
- DATABASE_NAME: XEPDB1
28
- TZ: Europe/Riga
29
- DATABASE_SYS_PASSWORD: Oracle18
30
- DATABASE_VERSION: 18.4.0.0
31
-
32
- services:
33
- oracle:
34
- image: quillbuilduser/oracle-18-xe
35
- ports:
36
- - 1521:1521
37
- env:
38
- TZ: Europe/Riga
39
- steps:
40
- - uses: actions/checkout@v2
41
- - name: Set up Ruby
42
- uses: ruby/setup-ruby@v1
43
- with:
44
- ruby-version: ${{ matrix.ruby }}
45
- - name: Install required package
46
- run: |
47
- sudo apt-get install alien
48
- - name: Download Oracle client
49
- run: |
50
- wget -q https://download.oracle.com/otn_software/linux/instantclient/185000/oracle-instantclient18.5-basic-18.5.0.0.0-3.x86_64.rpm
51
- wget -q https://download.oracle.com/otn_software/linux/instantclient/185000/oracle-instantclient18.5-sqlplus-18.5.0.0.0-3.x86_64.rpm
52
- wget -q https://download.oracle.com/otn_software/linux/instantclient/185000/oracle-instantclient18.5-devel-18.5.0.0.0-3.x86_64.rpm
53
- - name: Install Oracle client
54
- run: |
55
- sudo alien -i oracle-instantclient18.5-basic-18.5.0.0.0-3.x86_64.rpm
56
- sudo alien -i oracle-instantclient18.5-sqlplus-18.5.0.0.0-3.x86_64.rpm
57
- sudo alien -i oracle-instantclient18.5-devel-18.5.0.0.0-3.x86_64.rpm
58
- - name: Install JDBC Driver
59
- run: |
60
- cp $ORACLE_HOME/lib/ojdbc8.jar lib/.
61
- - name: Create database user
62
- run: |
63
- ./ci/setup_accounts.sh
64
- - name: Bundle install
65
- run: |
66
- bundle install --jobs 4 --retry 3
67
- - name: Run RSpec
68
- run: |
69
- bundle exec rspec
data/.rubocop.yml DELETED
@@ -1,147 +0,0 @@
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.3
6
- DisabledByDefault: true
7
-
8
- # Prefer &&/|| over and/or.
9
- Style/AndOr:
10
- Enabled: true
11
-
12
- # Align `when` with `case`.
13
- Layout/CaseIndentation:
14
- Enabled: true
15
-
16
- # Align comments with method definitions.
17
- Layout/CommentIndentation:
18
- Enabled: true
19
-
20
- Layout/ElseAlignment:
21
- Enabled: true
22
-
23
- Layout/EmptyLineAfterMagicComment:
24
- Enabled: true
25
-
26
- # No extra empty lines.
27
- Layout/EmptyLines:
28
- Enabled: true
29
-
30
- # In a regular class definition, no empty lines around the body.
31
- Layout/EmptyLinesAroundClassBody:
32
- Enabled: true
33
-
34
- # In a regular method definition, no empty lines around the body.
35
- Layout/EmptyLinesAroundMethodBody:
36
- Enabled: true
37
-
38
- # In a regular module definition, no empty lines around the body.
39
- Layout/EmptyLinesAroundModuleBody:
40
- Enabled: true
41
-
42
- Layout/FirstArgumentIndentation:
43
- Enabled: true
44
-
45
- # Use Ruby >= 1.9 syntax for hashes. Prefer { a: :b } over { :a => :b }.
46
- Style/HashSyntax:
47
- Enabled: true
48
-
49
- # Method definitions after `private` or `protected` isolated calls need one
50
- # extra level of indentation.
51
- Layout/IndentationConsistency:
52
- Enabled: true
53
- EnforcedStyle: indented_internal_methods
54
-
55
- # Two spaces, no tabs (for indentation).
56
- Layout/IndentationWidth:
57
- Enabled: true
58
-
59
- Layout/LeadingCommentSpace:
60
- Enabled: true
61
-
62
- Layout/SpaceAfterColon:
63
- Enabled: true
64
-
65
- Layout/SpaceAfterComma:
66
- Enabled: true
67
-
68
- Layout/SpaceAroundEqualsInParameterDefault:
69
- Enabled: true
70
-
71
- Layout/SpaceAroundKeyword:
72
- Enabled: true
73
-
74
- Layout/SpaceAroundOperators:
75
- Enabled: true
76
-
77
- Layout/SpaceBeforeComma:
78
- Enabled: true
79
-
80
- Layout/SpaceBeforeFirstArg:
81
- Enabled: true
82
-
83
- Style/DefWithParentheses:
84
- Enabled: true
85
-
86
- # Defining a method with parameters needs parentheses.
87
- Style/MethodDefParentheses:
88
- Enabled: true
89
-
90
- Style/FrozenStringLiteralComment:
91
- Enabled: false
92
- EnforcedStyle: always
93
-
94
- # Use `foo {}` not `foo{}`.
95
- Layout/SpaceBeforeBlockBraces:
96
- Enabled: true
97
-
98
- # Use `foo { bar }` not `foo {bar}`.
99
- Layout/SpaceInsideBlockBraces:
100
- Enabled: true
101
-
102
- # Use `{ a: 1 }` not `{a:1}`.
103
- Layout/SpaceInsideHashLiteralBraces:
104
- Enabled: true
105
-
106
- Layout/SpaceInsideParens:
107
- Enabled: true
108
-
109
- # Check quotes usage according to lint rule below.
110
- Style/StringLiterals:
111
- Enabled: true
112
- EnforcedStyle: double_quotes
113
-
114
- # Detect hard tabs, no hard tabs.
115
- Layout/Tab:
116
- Enabled: true
117
-
118
- # Blank lines should not have any spaces.
119
- Layout/TrailingEmptyLines:
120
- Enabled: true
121
-
122
- # No trailing whitespace.
123
- Layout/TrailingWhitespace:
124
- Enabled: true
125
-
126
- # Use quotes for string literals when they are enough.
127
- Style/RedundantPercentQ:
128
- Enabled: true
129
-
130
- # Align `end` with the matching keyword or starting expression except for
131
- # assignments, where it should be aligned with the LHS.
132
- Layout/EndAlignment:
133
- Enabled: true
134
- EnforcedStyleAlignWith: variable
135
- AutoCorrect: true
136
-
137
- # Use my_method(my_arg) not my_method( my_arg ) or my_method my_arg.
138
- Lint/RequireParentheses:
139
- Enabled: true
140
-
141
- Style/RedundantReturn:
142
- Enabled: true
143
- AllowMultipleReturnValues: true
144
-
145
- Style/Semicolon:
146
- Enabled: true
147
- AllowAsExpressionSeparator: true
@@ -1,15 +0,0 @@
1
- #!/usr/bin/env bash
2
-
3
- cd "$(dirname "$(readlink -f "$0")")"
4
-
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}"
11
-
12
- pwd
13
-
14
- ls -lAh "${deb_file}"
15
-
@@ -1,32 +0,0 @@
1
- #!/usr/bin/env bash
2
-
3
- [ -n "$ORACLE_FILE" ] || { echo "Missing ORACLE_FILE environment variable!"; exit 1; }
4
- [ -n "$ORACLE_HOME" ] || { echo "Missing ORACLE_HOME environment variable!"; exit 1; }
5
-
6
- cd "$(dirname "$(readlink -f "$0")")"
7
-
8
- ORACLE_DEB=docker-oracle-xe-11g/assets/oracle-xe_11.2.0-1.0_amd64.deb
9
-
10
- sudo apt-get -qq update
11
- sudo apt-get --no-install-recommends -qq install bc libaio1
12
-
13
- df -B1 /dev/shm | awk 'END { if ($1 != "shmfs" && $1 != "tmpfs" || $2 < 2147483648) exit 1 }' ||
14
- ( sudo rm -r /dev/shm && sudo mkdir /dev/shm && sudo mount -t tmpfs shmfs -o size=2G /dev/shm )
15
-
16
- test -f /sbin/chkconfig ||
17
- ( echo '#!/bin/sh' | sudo tee /sbin/chkconfig > /dev/null && sudo chmod u+x /sbin/chkconfig )
18
-
19
- test -d /var/lock/subsys || sudo mkdir /var/lock/subsys
20
-
21
- sudo dpkg -i "${ORACLE_DEB}"
22
-
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
- sudo usermod -aG dba $USER
26
-
27
- ( echo ; echo ; echo travis ; echo travis ; echo n ) | sudo AWK='/usr/bin/awk' /etc/init.d/oracle-xe configure
28
-
29
- "$ORACLE_HOME/bin/sqlplus" -L -S / AS SYSDBA <<SQL
30
- CREATE USER $USER IDENTIFIED EXTERNALLY;
31
- GRANT CONNECT, RESOURCE TO $USER;
32
- SQL
@@ -1,9 +0,0 @@
1
- #!/bin/bash
2
-
3
- set -ev
4
-
5
- "$ORACLE_HOME/bin/sqlplus" -L -S / AS SYSDBA <<SQL
6
- @@spec/support/unlock_and_setup_hr_user.sql
7
- @@spec/support/create_arunit_user.sql
8
- exit
9
- SQL