schema_associations 0.1.0.pre1 → 0.1.0.pre2

Sign up to get free protection for your applications and to get access to all the features.
data/README.rdoc CHANGED
@@ -53,7 +53,7 @@ SchemaAssociations::Config for the available options.
53
53
  == Compatibility
54
54
 
55
55
  SchemaAssociations supports all combinations of:
56
- * rails 3.0 or 3.1
56
+ * rails 3.0 or 3.1 (prerelease)
57
57
  * MRI ruby 1.8.7 or 1.9.2
58
58
 
59
59
  == Installation
@@ -76,10 +76,18 @@ or in a Gemfile
76
76
 
77
77
  == Testing
78
78
 
79
- SchemaAssociations is tested using rspec and sqlite3. To run the tests, after you've forked & cloned:
79
+ SchemaAssociations is tested using rspec, sqlite3, and rvm, with some
80
+ hackery to test against multiple versions of rails and ruby. To run the
81
+ full combo of tests, after you've forked & cloned:
80
82
 
81
83
  $ cd schema_associations
82
- $ bundle install
84
+ $ ./runspecs --install # do this once to install gem dependencies for all versions (slow)
85
+ $ ./runspecs # as many times as you like
86
+
87
+ You can also pick a specific version of rails and ruby to use, such as:
88
+ $ export SCHEMA_ASSOCIATIONS_RAILS_VERSION
89
+ $ SCHEMA_ASSOCIATIONS_RAILS_VERSION=3.1
90
+ $ rvm use 1.9.2
83
91
  $ rake spec
84
92
 
85
93
  If you're running ruby 1.9.2, code coverage results will be in coverage/index.html -- it should be at 100% coverage.
@@ -1,3 +1,3 @@
1
1
  module SchemaAssociations
2
- VERSION = "0.1.0.pre1"
2
+ VERSION = "0.1.0.pre2"
3
3
  end
data/runspecs ADDED
@@ -0,0 +1,27 @@
1
+ #!/usr/bin/env ruby
2
+
3
+ require 'optparse'
4
+
5
+ RUBY_VERSIONS = %W[1.8.7 1.9.2]
6
+ RAILS_VERSIONS = %W[3.0 3.1]
7
+
8
+ options = {}
9
+ OptionParser.new do |opts|
10
+ opts.banner = "Usage: #{$0} [options]"
11
+
12
+ opts.on("--install", "Install gem dependencies") do |v|
13
+ options[:install] = v
14
+ end
15
+ end.parse!
16
+
17
+ cmd = if options [:install]
18
+ 'bundle update'
19
+ else
20
+ 'bundle update --local | grep rails \\n rake spec'
21
+ end
22
+
23
+ RUBY_VERSIONS.each do |ruby|
24
+ RAILS_VERSIONS.each do |rails|
25
+ system "echo 'PS1="" SCHEMA_ASSOCIATION_RAILS_VERSION=#{rails} \\n rvm use #{ruby} \\n #{cmd} \\n exit' | bash -i" or abort "aborting #{$0}"
26
+ end
27
+ end
@@ -21,8 +21,14 @@ Gem::Specification.new do |s|
21
21
 
22
22
  s.add_dependency("schema_plus")
23
23
 
24
+ case ENV['SCHEMA_ASSOCIATION_RAILS_VERSION']
25
+ when '3.0'
26
+ s.add_development_dependency("rails", "~> 3.0")
27
+ when '3.1'
28
+ s.add_development_dependency("rails", ">= 3.1.0.pre1")
29
+ end
30
+
24
31
  s.add_development_dependency("rake", "~> 0.8.7")
25
- s.add_development_dependency("rails", ">= 3.1.0.rc1")
26
32
  s.add_development_dependency("rspec")
27
33
  s.add_development_dependency("sqlite3")
28
34
  s.add_development_dependency("simplecov")
metadata CHANGED
@@ -1,8 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: schema_associations
3
3
  version: !ruby/object:Gem::Version
4
- prerelease: 6
5
- version: 0.1.0.pre1
4
+ hash: -1876988183
5
+ prerelease: true
6
+ segments:
7
+ - 0
8
+ - 1
9
+ - 0
10
+ - pre2
11
+ version: 0.1.0.pre2
6
12
  platform: ruby
7
13
  authors:
8
14
  - Ronen Barzel
@@ -11,7 +17,7 @@ autorequire:
11
17
  bindir: bin
12
18
  cert_chain: []
13
19
 
14
- date: 2011-07-17 00:00:00 -07:00
20
+ date: 2011-07-19 00:00:00 -07:00
15
21
  default_executable:
16
22
  dependencies:
17
23
  - !ruby/object:Gem::Dependency
@@ -22,6 +28,9 @@ dependencies:
22
28
  requirements:
23
29
  - - ">="
24
30
  - !ruby/object:Gem::Version
31
+ hash: 3
32
+ segments:
33
+ - 0
25
34
  version: "0"
26
35
  type: :runtime
27
36
  version_requirements: *id001
@@ -33,75 +42,70 @@ dependencies:
33
42
  requirements:
34
43
  - - ~>
35
44
  - !ruby/object:Gem::Version
45
+ hash: 49
46
+ segments:
47
+ - 0
48
+ - 8
49
+ - 7
36
50
  version: 0.8.7
37
51
  type: :development
38
52
  version_requirements: *id002
39
53
  - !ruby/object:Gem::Dependency
40
- name: rails
54
+ name: rspec
41
55
  prerelease: false
42
56
  requirement: &id003 !ruby/object:Gem::Requirement
43
57
  none: false
44
58
  requirements:
45
59
  - - ">="
46
60
  - !ruby/object:Gem::Version
47
- version: 3.1.0.rc1
61
+ hash: 3
62
+ segments:
63
+ - 0
64
+ version: "0"
48
65
  type: :development
49
66
  version_requirements: *id003
50
67
  - !ruby/object:Gem::Dependency
51
- name: rspec
68
+ name: sqlite3
52
69
  prerelease: false
53
70
  requirement: &id004 !ruby/object:Gem::Requirement
54
71
  none: false
55
72
  requirements:
56
73
  - - ">="
57
74
  - !ruby/object:Gem::Version
75
+ hash: 3
76
+ segments:
77
+ - 0
58
78
  version: "0"
59
79
  type: :development
60
80
  version_requirements: *id004
61
81
  - !ruby/object:Gem::Dependency
62
- name: sqlite3
82
+ name: simplecov
63
83
  prerelease: false
64
84
  requirement: &id005 !ruby/object:Gem::Requirement
65
85
  none: false
66
86
  requirements:
67
87
  - - ">="
68
88
  - !ruby/object:Gem::Version
89
+ hash: 3
90
+ segments:
91
+ - 0
69
92
  version: "0"
70
93
  type: :development
71
94
  version_requirements: *id005
72
95
  - !ruby/object:Gem::Dependency
73
- name: simplecov
96
+ name: simplecov-gem-adapter
74
97
  prerelease: false
75
98
  requirement: &id006 !ruby/object:Gem::Requirement
76
99
  none: false
77
100
  requirements:
78
101
  - - ">="
79
102
  - !ruby/object:Gem::Version
103
+ hash: 3
104
+ segments:
105
+ - 0
80
106
  version: "0"
81
107
  type: :development
82
108
  version_requirements: *id006
83
- - !ruby/object:Gem::Dependency
84
- name: simplecov-gem-adapter
85
- prerelease: false
86
- requirement: &id007 !ruby/object:Gem::Requirement
87
- none: false
88
- requirements:
89
- - - ">="
90
- - !ruby/object:Gem::Version
91
- version: "0"
92
- type: :development
93
- version_requirements: *id007
94
- - !ruby/object:Gem::Dependency
95
- name: ruby-debug19
96
- prerelease: false
97
- requirement: &id008 !ruby/object:Gem::Requirement
98
- none: false
99
- requirements:
100
- - - ">="
101
- - !ruby/object:Gem::Version
102
- version: "0"
103
- type: :development
104
- version_requirements: *id008
105
109
  description: SchemaAssociations extends ActiveRecord to automatically create associations by inspecting the database schema. This is more more DRY than the standard behavior, for which in addition to specifying the foreign key in the migration, you must also specify complementary associations in two model files (e.g. a :belongs_to and a :has_many).
106
110
  email:
107
111
  - ronen@barzel.org
@@ -123,9 +127,8 @@ files:
123
127
  - lib/schema_associations/active_record/associations.rb
124
128
  - lib/schema_associations/railtie.rb
125
129
  - lib/schema_associations/version.rb
130
+ - runspecs
126
131
  - schema_associations.gemspec
127
- - schema_associations.gemspec.rails3.0
128
- - schema_associations.gemspec.rails3.1
129
132
  - spec/association_spec.rb
130
133
  - spec/connection.rb
131
134
  - spec/spec_helper.rb
@@ -143,17 +146,25 @@ required_ruby_version: !ruby/object:Gem::Requirement
143
146
  requirements:
144
147
  - - ">="
145
148
  - !ruby/object:Gem::Version
149
+ hash: 3
150
+ segments:
151
+ - 0
146
152
  version: "0"
147
153
  required_rubygems_version: !ruby/object:Gem::Requirement
148
154
  none: false
149
155
  requirements:
150
156
  - - ">"
151
157
  - !ruby/object:Gem::Version
158
+ hash: 25
159
+ segments:
160
+ - 1
161
+ - 3
162
+ - 1
152
163
  version: 1.3.1
153
164
  requirements: []
154
165
 
155
166
  rubyforge_project: schema_associations
156
- rubygems_version: 1.6.2
167
+ rubygems_version: 1.3.7
157
168
  signing_key:
158
169
  specification_version: 3
159
170
  summary: ActiveRecord extension that automatically (DRY) creates associations based on the schema
@@ -1,35 +0,0 @@
1
- # -*- encoding: utf-8 -*-
2
- $:.push File.expand_path("../lib", __FILE__)
3
- require "schema_associations/version"
4
-
5
- Gem::Specification.new do |s|
6
- s.name = "schema_associations"
7
- s.version = SchemaAssociations::VERSION
8
- s.platform = Gem::Platform::RUBY
9
- s.authors = ["Ronen Barzel", "Michał Łomnicki"]
10
- s.email = ["ronen@barzel.org", "michal.lomnicki@gmail.com"]
11
- s.homepage = "https://github.com/ronen/schema_associations"
12
- s.summary = "ActiveRecord extension that automatically (DRY) creates associations based on the schema"
13
- s.description = "SchemaAssociations extends ActiveRecord to automatically create associations by inspecting the database schema. This is more more DRY than the standard behavior, for which in addition to specifying the foreign key in the migration, you must also specify complementary associations in two model files (e.g. a :belongs_to and a :has_many)."
14
-
15
- s.rubyforge_project = "schema_associations"
16
-
17
- s.files = `git ls-files`.split("\n")
18
- s.test_files = `git ls-files -- {test,spec,features}/*`.split("\n")
19
- s.executables = `git ls-files -- bin/*`.split("\n").map{ |f| File.basename(f) }
20
- s.require_paths = ["lib"]
21
-
22
- s.add_dependency("schema_plus")
23
- s.add_dependency("valuable")
24
-
25
- s.add_development_dependency("rails", "~> 3.0")
26
- s.add_development_dependency("rspec")
27
- s.add_development_dependency("pg")
28
- s.add_development_dependency("mysql")
29
- s.add_development_dependency("mysql2", "0.2.6")
30
- s.add_development_dependency("sqlite3")
31
- s.add_development_dependency("simplecov")
32
- s.add_development_dependency("simplecov-gem-adapter")
33
- s.add_development_dependency("ruby-debug19") if RUBY_VERSION >= "1.9.2"
34
- end
35
-
@@ -1,36 +0,0 @@
1
- # -*- encoding: utf-8 -*-
2
- $:.push File.expand_path("../lib", __FILE__)
3
- require "schema_associations/version"
4
-
5
- Gem::Specification.new do |s|
6
- s.name = "schema_associations"
7
- s.version = SchemaAssociations::VERSION
8
- s.platform = Gem::Platform::RUBY
9
- s.authors = ["Ronen Barzel", "Michał Łomnicki"]
10
- s.email = ["ronen@barzel.org", "michal.lomnicki@gmail.com"]
11
- s.homepage = "https://github.com/ronen/schema_associations"
12
- s.summary = "ActiveRecord extension that automatically (DRY) creates associations based on the schema"
13
- s.description = "SchemaAssociations extends ActiveRecord to automatically create associations by inspecting the database schema. This is more more DRY than the standard behavior, for which in addition to specifying the foreign key in the migration, you must also specify complementary associations in two model files (e.g. a :belongs_to and a :has_many)."
14
-
15
- s.rubyforge_project = "schema_associations"
16
-
17
- s.files = `git ls-files`.split("\n")
18
- s.test_files = `git ls-files -- {test,spec,features}/*`.split("\n")
19
- s.executables = `git ls-files -- bin/*`.split("\n").map{ |f| File.basename(f) }
20
- s.require_paths = ["lib"]
21
-
22
- s.add_dependency("schema_plus")
23
- s.add_dependency("valuable")
24
-
25
- s.add_development_dependency("rake", "~> 0.8.7")
26
- s.add_development_dependency("rails", ">= 3.1.0.rc1")
27
- s.add_development_dependency("rspec")
28
- s.add_development_dependency("pg")
29
- s.add_development_dependency("mysql")
30
- s.add_development_dependency("mysql2")
31
- s.add_development_dependency("sqlite3")
32
- s.add_development_dependency("simplecov")
33
- s.add_development_dependency("simplecov-gem-adapter")
34
- s.add_development_dependency("ruby-debug19") if RUBY_VERSION >= "1.9.2"
35
- end
36
-