ruby-plsql-spec 0.1.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (47) hide show
  1. data/.gitignore +13 -0
  2. data/Gemfile +11 -0
  3. data/History.txt +5 -0
  4. data/INSTALL-Windows.markdown +55 -0
  5. data/License.txt +20 -0
  6. data/README.markdown +91 -0
  7. data/Rakefile +49 -0
  8. data/VERSION +1 -0
  9. data/bin/plsql-spec +5 -0
  10. data/examples/source/award_bonus.rb +29 -0
  11. data/examples/source/betwnstr.rb +19 -0
  12. data/examples/source/remove_rooms_by_name.rb +45 -0
  13. data/examples/source/what_is_profiled.rb +207 -0
  14. data/examples/spec/award_bonus_spec.rb +35 -0
  15. data/examples/spec/betwnstr_spec.rb +24 -0
  16. data/examples/spec/database.yml +16 -0
  17. data/examples/spec/factories/employee_factory.rb +23 -0
  18. data/examples/spec/helpers/inspect_helpers.rb +17 -0
  19. data/examples/spec/helpers/oracle_ebs_helpers.rb +32 -0
  20. data/examples/spec/helpers/time_helpers.rb +5 -0
  21. data/examples/spec/oracle_ebs_spec.rb +61 -0
  22. data/examples/spec/remove_rooms_by_name_spec.rb +51 -0
  23. data/examples/spec/spec_helper.rb +78 -0
  24. data/examples/spec/what_is_profiled_spec.rb +12 -0
  25. data/lib/plsql/coverage.rb +262 -0
  26. data/lib/plsql/coverage/coverage.css +277 -0
  27. data/lib/plsql/coverage/details.html.erb +35 -0
  28. data/lib/plsql/coverage/index.html.erb +71 -0
  29. data/lib/plsql/coverage/jquery.min.js +154 -0
  30. data/lib/plsql/coverage/jquery.tablesorter.min.js +2 -0
  31. data/lib/plsql/coverage/proftab.sql +66 -0
  32. data/lib/plsql/coverage/rcov.js +43 -0
  33. data/lib/plsql/coverage/table_line.html.erb +15 -0
  34. data/lib/plsql/spec.rb +5 -0
  35. data/lib/plsql/spec/cli.rb +81 -0
  36. data/lib/plsql/spec/templates/database.yml +16 -0
  37. data/lib/plsql/spec/templates/helpers/inspect_helpers.rb +17 -0
  38. data/lib/plsql/spec/templates/helpers/time_helpers.rb +5 -0
  39. data/lib/plsql/spec/templates/spec_helper.rb +78 -0
  40. data/lib/plsql/spec/version.rb +5 -0
  41. data/lib/ruby-plsql-spec.rb +1 -0
  42. data/ruby-plsql-spec.gemspec +113 -0
  43. data/spec/plsql/coverage_spec.rb +246 -0
  44. data/spec/plsql/spec/cli_spec.rb +264 -0
  45. data/spec/spec.opts +6 -0
  46. data/spec/spec_helper.rb +61 -0
  47. metadata +177 -0
@@ -0,0 +1,6 @@
1
+ --colour
2
+ --format
3
+ progress
4
+ --loadby
5
+ mtime
6
+ --reverse
@@ -0,0 +1,61 @@
1
+ require "rubygems"
2
+
3
+ # Set up gems listed in the Gemfile.
4
+ gemfile = File.expand_path('../../Gemfile', __FILE__)
5
+ begin
6
+ ENV['BUNDLE_GEMFILE'] = gemfile
7
+ require 'bundler'
8
+ Bundler.setup
9
+ rescue Bundler::GemNotFound => e
10
+ STDERR.puts e.message
11
+ STDERR.puts "Try running `bundle install`."
12
+ exit!
13
+ end if File.exist?(gemfile)
14
+
15
+ $:.unshift(File.expand_path('../../lib', __FILE__))
16
+
17
+ require 'spec'
18
+ require 'nokogiri'
19
+
20
+ require 'ruby-plsql-spec'
21
+
22
+ DATABASE_NAME = ENV['DATABASE_NAME'] || 'orcl'
23
+ DATABASE_HOST = ENV['DATABASE_HOST'] || 'localhost'
24
+ DATABASE_PORT = ENV['DATABASE_PORT'] || 1521
25
+ DATABASE_USER = ENV['DATABASE_USER'] || 'hr'
26
+ DATABASE_PASSWORD = ENV['DATABASE_PASSWORD'] || 'hr'
27
+
28
+ CONNECTION_PARAMS = {
29
+ :username => DATABASE_USER,
30
+ :password => DATABASE_PASSWORD,
31
+ :database => DATABASE_NAME
32
+ }
33
+ CONNECTION_PARAMS[:host] = DATABASE_HOST if defined?(DATABASE_HOST)
34
+ CONNECTION_PARAMS[:port] = DATABASE_PORT if defined?(DATABASE_PORT)
35
+
36
+ Spec::Runner.configure do |config|
37
+ # taken from thor specs
38
+ def capture(stream)
39
+ begin
40
+ stream = stream.to_s
41
+ eval "$#{stream} = StringIO.new"
42
+ yield
43
+ result = eval("$#{stream}").string
44
+ ensure
45
+ eval("$#{stream} = #{stream.upcase}")
46
+ end
47
+
48
+ result
49
+ end
50
+ alias :silence :capture
51
+
52
+ def source_root
53
+ File.join(File.dirname(__FILE__), 'fixtures')
54
+ end
55
+
56
+ def destination_root
57
+ File.join(File.dirname(__FILE__), 'sandbox')
58
+ end
59
+
60
+
61
+ end
metadata ADDED
@@ -0,0 +1,177 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: ruby-plsql-spec
3
+ version: !ruby/object:Gem::Version
4
+ hash: 27
5
+ prerelease: false
6
+ segments:
7
+ - 0
8
+ - 1
9
+ - 0
10
+ version: 0.1.0
11
+ platform: ruby
12
+ authors:
13
+ - Raimonds Simanovskis
14
+ autorequire:
15
+ bindir: bin
16
+ cert_chain: []
17
+
18
+ date: 2010-10-05 00:00:00 +03:00
19
+ default_executable: plsql-spec
20
+ dependencies:
21
+ - !ruby/object:Gem::Dependency
22
+ name: ruby-plsql
23
+ prerelease: false
24
+ requirement: &id001 !ruby/object:Gem::Requirement
25
+ none: false
26
+ requirements:
27
+ - - ">="
28
+ - !ruby/object:Gem::Version
29
+ hash: 9
30
+ segments:
31
+ - 0
32
+ - 4
33
+ - 3
34
+ version: 0.4.3
35
+ type: :runtime
36
+ version_requirements: *id001
37
+ - !ruby/object:Gem::Dependency
38
+ name: thor
39
+ prerelease: false
40
+ requirement: &id002 !ruby/object:Gem::Requirement
41
+ none: false
42
+ requirements:
43
+ - - ">="
44
+ - !ruby/object:Gem::Version
45
+ hash: 35
46
+ segments:
47
+ - 0
48
+ - 14
49
+ - 2
50
+ version: 0.14.2
51
+ type: :runtime
52
+ version_requirements: *id002
53
+ - !ruby/object:Gem::Dependency
54
+ name: rspec
55
+ prerelease: false
56
+ requirement: &id003 !ruby/object:Gem::Requirement
57
+ none: false
58
+ requirements:
59
+ - - ~>
60
+ - !ruby/object:Gem::Version
61
+ hash: 27
62
+ segments:
63
+ - 1
64
+ - 3
65
+ - 0
66
+ version: 1.3.0
67
+ type: :runtime
68
+ version_requirements: *id003
69
+ description: |
70
+ ruby-plsql-spec is Oracle PL/SQL unit testing framework which is built using Ruby programming language, ruby-plsql library and RSpec testing framework.
71
+
72
+ email: raimonds.simanovskis@gmail.com
73
+ executables:
74
+ - plsql-spec
75
+ extensions: []
76
+
77
+ extra_rdoc_files:
78
+ - README.markdown
79
+ files:
80
+ - .gitignore
81
+ - Gemfile
82
+ - History.txt
83
+ - INSTALL-Windows.markdown
84
+ - License.txt
85
+ - README.markdown
86
+ - Rakefile
87
+ - VERSION
88
+ - bin/plsql-spec
89
+ - examples/source/award_bonus.rb
90
+ - examples/source/betwnstr.rb
91
+ - examples/source/remove_rooms_by_name.rb
92
+ - examples/source/what_is_profiled.rb
93
+ - examples/spec/award_bonus_spec.rb
94
+ - examples/spec/betwnstr_spec.rb
95
+ - examples/spec/database.yml
96
+ - examples/spec/factories/employee_factory.rb
97
+ - examples/spec/helpers/inspect_helpers.rb
98
+ - examples/spec/helpers/oracle_ebs_helpers.rb
99
+ - examples/spec/helpers/time_helpers.rb
100
+ - examples/spec/oracle_ebs_spec.rb
101
+ - examples/spec/remove_rooms_by_name_spec.rb
102
+ - examples/spec/spec_helper.rb
103
+ - examples/spec/what_is_profiled_spec.rb
104
+ - lib/plsql/coverage.rb
105
+ - lib/plsql/coverage/coverage.css
106
+ - lib/plsql/coverage/details.html.erb
107
+ - lib/plsql/coverage/index.html.erb
108
+ - lib/plsql/coverage/jquery.min.js
109
+ - lib/plsql/coverage/jquery.tablesorter.min.js
110
+ - lib/plsql/coverage/proftab.sql
111
+ - lib/plsql/coverage/rcov.js
112
+ - lib/plsql/coverage/table_line.html.erb
113
+ - lib/plsql/spec.rb
114
+ - lib/plsql/spec/cli.rb
115
+ - lib/plsql/spec/templates/database.yml
116
+ - lib/plsql/spec/templates/helpers/inspect_helpers.rb
117
+ - lib/plsql/spec/templates/helpers/time_helpers.rb
118
+ - lib/plsql/spec/templates/spec_helper.rb
119
+ - lib/plsql/spec/version.rb
120
+ - lib/ruby-plsql-spec.rb
121
+ - ruby-plsql-spec.gemspec
122
+ - spec/plsql/coverage_spec.rb
123
+ - spec/plsql/spec/cli_spec.rb
124
+ - spec/spec.opts
125
+ - spec/spec_helper.rb
126
+ has_rdoc: true
127
+ homepage: http://github.com/rsim/ruby-plsql-spec
128
+ licenses: []
129
+
130
+ post_install_message:
131
+ rdoc_options:
132
+ - --charset=UTF-8
133
+ require_paths:
134
+ - lib
135
+ required_ruby_version: !ruby/object:Gem::Requirement
136
+ none: false
137
+ requirements:
138
+ - - ">="
139
+ - !ruby/object:Gem::Version
140
+ hash: 3
141
+ segments:
142
+ - 0
143
+ version: "0"
144
+ required_rubygems_version: !ruby/object:Gem::Requirement
145
+ none: false
146
+ requirements:
147
+ - - ">="
148
+ - !ruby/object:Gem::Version
149
+ hash: 3
150
+ segments:
151
+ - 0
152
+ version: "0"
153
+ requirements: []
154
+
155
+ rubyforge_project:
156
+ rubygems_version: 1.3.7
157
+ signing_key:
158
+ specification_version: 3
159
+ summary: Oracle PL/SQL unit testing framework using Ruby and RSpec
160
+ test_files:
161
+ - spec/plsql/coverage_spec.rb
162
+ - spec/plsql/spec/cli_spec.rb
163
+ - spec/spec_helper.rb
164
+ - examples/source/award_bonus.rb
165
+ - examples/source/betwnstr.rb
166
+ - examples/source/remove_rooms_by_name.rb
167
+ - examples/source/what_is_profiled.rb
168
+ - examples/spec/award_bonus_spec.rb
169
+ - examples/spec/betwnstr_spec.rb
170
+ - examples/spec/factories/employee_factory.rb
171
+ - examples/spec/helpers/inspect_helpers.rb
172
+ - examples/spec/helpers/oracle_ebs_helpers.rb
173
+ - examples/spec/helpers/time_helpers.rb
174
+ - examples/spec/oracle_ebs_spec.rb
175
+ - examples/spec/remove_rooms_by_name_spec.rb
176
+ - examples/spec/spec_helper.rb
177
+ - examples/spec/what_is_profiled_spec.rb