oracle-model-generator 0.3.1 → 0.3.2

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA1:
3
+ metadata.gz: b08bfd1eb4571ecdbbf5cc02f216581514367d88
4
+ data.tar.gz: cfeb424ff1b19a26f265b3e8a04969931973ef8b
5
+ SHA512:
6
+ metadata.gz: a284019c0512deb281022efda26bfa11b04264e1eb7f4767862cd88fb661567ef1464ba0cc4bf4416312907c739a8e0248d7c649dd7f2253b9cb33e3be00dfee
7
+ data.tar.gz: f9fd0d86eddafb2417c4d6ca4a1b077e57742cd5a9fe9e29eacfad6e6d420aa94fc006a07ec3ac1f650dc6927899a36d07bf052620884f8dac859c841915923e
data/CHANGES CHANGED
@@ -1,3 +1,10 @@
1
+ = 0.3.2 - 6-Nov-2014
2
+ * Removed explicit references to Rails 3 in documentation. It's now simply
3
+ Rails 2, or Rails 3 or higher.
4
+ * Some minor updates in generated test file text, as test-unit 2 no longer
5
+ requires the require workaround.
6
+ * Updates to Rakefile and gemspec.
7
+
1
8
  = 0.3.1 - 3-Apr-2012
2
9
  * Added the --class option that allows you to specify the model name on the
3
10
  command line. Thanks go to Daniel Luna for the patch (plus some minor fixes).
data/README CHANGED
@@ -140,7 +140,7 @@ implied warranties, including, without limitation, the implied
140
140
  warranties of merchantability and fitness for a particular purpose.
141
141
 
142
142
  = Copyright
143
- (C) 2010-2012 Daniel J. Berger
143
+ (C) 2010-2014 Daniel J. Berger
144
144
  All Rights Reserved
145
145
 
146
146
  = License
data/Rakefile CHANGED
@@ -1,8 +1,6 @@
1
1
  require 'rake'
2
2
  require 'rake/testtask'
3
3
  require 'rake/clean'
4
- require 'rbconfig'
5
- include Config
6
4
 
7
5
  CLEAN.include("**/*.gem", "**/*.rbc", "**/*.log")
8
6
 
@@ -10,13 +8,18 @@ namespace 'gem' do
10
8
  desc 'Create the oracle-model-generator gem'
11
9
  task :create => :clean do
12
10
  spec = eval(IO.read('oracle-model-generator.gemspec'))
13
- Gem::Builder.new(spec).build
11
+ if Gem::VERSION < "2.0"
12
+ Gem::Builder.new(spec).build
13
+ else
14
+ require 'rubygems/package'
15
+ Gem::Package.build(spec)
16
+ end
14
17
  end
15
18
 
16
19
  desc 'Install the oracle-model-generator gem'
17
20
  task :install => [:create] do
18
21
  file = Dir["oracle-model-generator*.gem"].last
19
- sh "gem install #{file}"
22
+ sh "gem install -l #{file}"
20
23
  end
21
24
  end
22
25
 
data/bin/omg CHANGED
@@ -35,7 +35,7 @@ def help
35
35
  -o, --output => The name of the file to create.
36
36
  -u, --user => The user used to establish a connection to the database.
37
37
  -p, --password => The password used to establish a connection to the database.
38
- -r, --rails => The version of rails you're using (2 or 3).
38
+ -r, --rails => The version of rails you're using (2 or higher).
39
39
  -x, --tests => Generate tests (the default).
40
40
  -c, --class => Class name for the generated table (optional)
41
41
 
@@ -55,7 +55,7 @@ def help
55
55
 
56
56
  Examples:
57
57
 
58
- # Create a User model for the users table (rails 3)
58
+ # Create a User model for the users table (current rails)
59
59
  omg -d some_database -u scott -p tiger -t users
60
60
 
61
61
  # Create a User model for the users table (rails 2)
@@ -126,11 +126,11 @@ unless ofile
126
126
  ofile += '.rb'
127
127
  end
128
128
 
129
- # Default to Rails 3
130
- rails = (opts['rails'] && opts['rails'].to_i) || 3
129
+ # Default to Rails 4
130
+ rails = (opts['rails'] && opts['rails'].to_i) || 4
131
131
 
132
- if rails < 2 || rails > 3
133
- puts "Invalid version of Rails. Specify either 2 or 3."
132
+ if rails < 2
133
+ puts "Invalid version of Rails. Must be 2 or higher."
134
134
  exit!
135
135
  end
136
136
 
@@ -138,7 +138,7 @@ omg.instance_eval { @model = opts['class'] } if opts['class'] # dirty fix
138
138
 
139
139
  File.open(ofile, 'w') do |fh|
140
140
  fh.puts "class #{omg.model} < ActiveRecord::Base"
141
- fh.puts " set_table_name :\"#{table}\""
141
+ fh.puts " set_table_name \"#{table}\""
142
142
 
143
143
  if omg.primary_keys.size > 1
144
144
  fh.puts "\n # Requires the composite-primary-keys library"
@@ -276,11 +276,7 @@ if opts['x'].nil? || opts['x'] == 'testunit'
276
276
  setup_var.chop! if setup_var[-1].chr.downcase == 's'
277
277
  instance_var = "@#{setup_var}"
278
278
 
279
- # This bit is necessary to force test-unit 2 instead of using the library
280
- # that ships as part of the Ruby standard library.
281
- fh.puts "require 'rubygems'"
282
- fh.puts "gem 'test-unit'"
283
- fh.puts "require 'test/unit'\n\n"
279
+ fh.puts "require 'test-unit'\n\n"
284
280
 
285
281
  fh.puts "class TC_#{omg.model} < Test::Unit::TestCase\n"
286
282
  fh.puts " def setup"
@@ -4,7 +4,7 @@ module Oracle
4
4
  module Model
5
5
  class Generator
6
6
  # The version of the oracle-model-generator library
7
- VERSION = '0.3.1'
7
+ VERSION = '0.3.2'
8
8
 
9
9
  # The raw OCI8 connection.
10
10
  attr_reader :connection
@@ -2,7 +2,7 @@ require 'rubygems'
2
2
 
3
3
  Gem::Specification.new do |gem|
4
4
  gem.name = 'oracle-model-generator'
5
- gem.version = '0.3.1'
5
+ gem.version = '0.3.2'
6
6
  gem.author = 'Daniel J. Berger'
7
7
  gem.license = 'Artistic 2.0'
8
8
  gem.email = 'djberg96@gmail.com'
@@ -11,13 +11,12 @@ Gem::Specification.new do |gem|
11
11
  gem.test_file = 'test/test_oracle_model_generator.rb'
12
12
  gem.files = Dir['**/*'].reject{ |f| f.include?('git') }
13
13
 
14
- gem.executables = "omg"
15
- gem.rubyforge_project = 'N/A'
16
- gem.extra_rdoc_files = %w[CHANGES README MANIFEST]
14
+ gem.executables = "omg"
15
+ gem.extra_rdoc_files = %w[CHANGES README MANIFEST]
17
16
 
18
17
  gem.add_dependency('ruby-oci8')
19
- gem.add_dependency('getopt', '>= 1.4.0')
20
- gem.add_development_dependency('test-unit', '>= 2.1.1')
18
+ gem.add_dependency('getopt')
19
+ gem.add_development_dependency('test-unit')
21
20
 
22
21
  gem.description = <<-EOF
23
22
  The oracle-model-generator library allows you to generate an ActiveRecord
@@ -20,7 +20,7 @@ class TC_Oracle_Model_Generator < Test::Unit::TestCase
20
20
  end
21
21
 
22
22
  test "version number is correct" do
23
- assert_equal('0.3.1', Oracle::Model::Generator::VERSION)
23
+ assert_equal('0.3.2', Oracle::Model::Generator::VERSION)
24
24
  end
25
25
 
26
26
  test "constructor accepts an oci8 connection object" do
metadata CHANGED
@@ -1,120 +1,101 @@
1
- --- !ruby/object:Gem::Specification
1
+ --- !ruby/object:Gem::Specification
2
2
  name: oracle-model-generator
3
- version: !ruby/object:Gem::Version
4
- hash: 17
5
- prerelease:
6
- segments:
7
- - 0
8
- - 3
9
- - 1
10
- version: 0.3.1
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.3.2
11
5
  platform: ruby
12
- authors:
6
+ authors:
13
7
  - Daniel J. Berger
14
8
  autorequire:
15
9
  bindir: bin
16
10
  cert_chain: []
17
-
18
- date: 2012-04-03 00:00:00 Z
19
- dependencies:
20
- - !ruby/object:Gem::Dependency
11
+ date: 2014-11-07 00:00:00.000000000 Z
12
+ dependencies:
13
+ - !ruby/object:Gem::Dependency
21
14
  name: ruby-oci8
22
- prerelease: false
23
- requirement: &id001 !ruby/object:Gem::Requirement
24
- none: false
25
- requirements:
15
+ requirement: !ruby/object:Gem::Requirement
16
+ requirements:
26
17
  - - ">="
27
- - !ruby/object:Gem::Version
28
- hash: 3
29
- segments:
30
- - 0
31
- version: "0"
18
+ - !ruby/object:Gem::Version
19
+ version: '0'
32
20
  type: :runtime
33
- version_requirements: *id001
34
- - !ruby/object:Gem::Dependency
35
- name: getopt
36
21
  prerelease: false
37
- requirement: &id002 !ruby/object:Gem::Requirement
38
- none: false
39
- requirements:
22
+ version_requirements: !ruby/object:Gem::Requirement
23
+ requirements:
40
24
  - - ">="
41
- - !ruby/object:Gem::Version
42
- hash: 7
43
- segments:
44
- - 1
45
- - 4
46
- - 0
47
- version: 1.4.0
25
+ - !ruby/object:Gem::Version
26
+ version: '0'
27
+ - !ruby/object:Gem::Dependency
28
+ name: getopt
29
+ requirement: !ruby/object:Gem::Requirement
30
+ requirements:
31
+ - - ">="
32
+ - !ruby/object:Gem::Version
33
+ version: '0'
48
34
  type: :runtime
49
- version_requirements: *id002
50
- - !ruby/object:Gem::Dependency
51
- name: test-unit
52
35
  prerelease: false
53
- requirement: &id003 !ruby/object:Gem::Requirement
54
- none: false
55
- requirements:
36
+ version_requirements: !ruby/object:Gem::Requirement
37
+ requirements:
56
38
  - - ">="
57
- - !ruby/object:Gem::Version
58
- hash: 9
59
- segments:
60
- - 2
61
- - 1
62
- - 1
63
- version: 2.1.1
39
+ - !ruby/object:Gem::Version
40
+ version: '0'
41
+ - !ruby/object:Gem::Dependency
42
+ name: test-unit
43
+ requirement: !ruby/object:Gem::Requirement
44
+ requirements:
45
+ - - ">="
46
+ - !ruby/object:Gem::Version
47
+ version: '0'
64
48
  type: :development
65
- version_requirements: *id003
66
- description: " The oracle-model-generator library allows you to generate an ActiveRecord\n model from an existing Oracle table or view.\n"
49
+ prerelease: false
50
+ version_requirements: !ruby/object:Gem::Requirement
51
+ requirements:
52
+ - - ">="
53
+ - !ruby/object:Gem::Version
54
+ version: '0'
55
+ description: |2
56
+ The oracle-model-generator library allows you to generate an ActiveRecord
57
+ model from an existing Oracle table or view.
67
58
  email: djberg96@gmail.com
68
- executables:
59
+ executables:
69
60
  - omg
70
61
  extensions: []
71
-
72
- extra_rdoc_files:
62
+ extra_rdoc_files:
73
63
  - CHANGES
74
64
  - README
75
65
  - MANIFEST
76
- files:
77
- - bin/omg
66
+ files:
78
67
  - CHANGES
68
+ - MANIFEST
69
+ - README
70
+ - Rakefile
71
+ - bin/omg
79
72
  - lib/oracle/model/generator.rb
80
73
  - lib/oracle_model_generator.rb
81
- - MANIFEST
82
74
  - oracle-model-generator.gemspec
83
- - Rakefile
84
- - README
85
75
  - test/test_oracle_model_generator.rb
86
76
  homepage: http://www.github.com/djberg96/oracle-model-generator
87
- licenses:
77
+ licenses:
88
78
  - Artistic 2.0
79
+ metadata: {}
89
80
  post_install_message:
90
81
  rdoc_options: []
91
-
92
- require_paths:
82
+ require_paths:
93
83
  - lib
94
- required_ruby_version: !ruby/object:Gem::Requirement
95
- none: false
96
- requirements:
84
+ required_ruby_version: !ruby/object:Gem::Requirement
85
+ requirements:
97
86
  - - ">="
98
- - !ruby/object:Gem::Version
99
- hash: 3
100
- segments:
101
- - 0
102
- version: "0"
103
- required_rubygems_version: !ruby/object:Gem::Requirement
104
- none: false
105
- requirements:
87
+ - !ruby/object:Gem::Version
88
+ version: '0'
89
+ required_rubygems_version: !ruby/object:Gem::Requirement
90
+ requirements:
106
91
  - - ">="
107
- - !ruby/object:Gem::Version
108
- hash: 3
109
- segments:
110
- - 0
111
- version: "0"
92
+ - !ruby/object:Gem::Version
93
+ version: '0'
112
94
  requirements: []
113
-
114
- rubyforge_project: N/A
115
- rubygems_version: 1.8.10
95
+ rubyforge_project:
96
+ rubygems_version: 2.4.2
116
97
  signing_key:
117
- specification_version: 3
98
+ specification_version: 4
118
99
  summary: A Ruby interface for determining protocol information
119
- test_files:
100
+ test_files:
120
101
  - test/test_oracle_model_generator.rb