rtomayko (owner)

Forks

Revisions

gist: 115173 Download_button fork
public
Public Clone URL: git://gist.github.com/115173.git
Embed All Files: show embed
Text only #
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
integrity 0.1.9.0 depends on dm-core =0.9.11
http://github.com/integrity/integrity/blob/497f7f1ade5a9bef5caf4ab0e239d45359c25bf8/integrity.gemspec#L24
 
dm-core 0.9.11 depends on data_objects ~>0.9.11
http://github.com/datamapper/dm-core/blob/65802c9db1e61d0ae584633fc274b5cae959733a/dm-core.gemspec#L27
 
this causes the data_objects 0.9.12 gem to be installed when the integrity gem is installed
 
dm-core, when DataMapper.setup is called, requires postgres_adapter, which executes a gem constraint for do_postgres ~> 0.9.11:
http://github.com/datamapper/dm-core/blob/65802c9db1e61d0ae584633fc274b5cae959733a/lib/dm-core/adapters/postgres_adapter.rb#L1
 
That loads the do_postgres 0.9.11, which has a hard dependency on data_objects 0.9.11:
 
    $ gem depend do_postgres
    Gem do_postgres-0.9.11
      data_objects (= 0.9.11, runtime)
      hoe (>= 1.8.2, development)
 
But the data_objects 0.9.12 gem has already been loaded so a LoadError is raised saying
that do_postgres can't be loaded.
 
The only fix we've found is to add the following to the very top of integrity-config.rb:
 
    gem 'data_objects', '=0.9.11'
    require 'data_objects'
 
Another option would be for the integrity.gemspec to specify a hard dependency
on data_objects =0.9.11 instead of ~>0.9.11.