rom-relation 0.1.1 → 0.1.2
Sign up to get free protection for your applications and to get access to all the features.
- data/Changelog.md +5 -0
- data/Gemfile +2 -2
- data/lib/rom-relation.rb +2 -0
- data/lib/rom/relation/version.rb +9 -0
- data/lib/rom/support/axiom/adapter.rb +11 -0
- data/rom-relation.gemspec +2 -2
- data/spec/integration/environment_setup_spec.rb +1 -1
- data/spec/spec_helper.rb +1 -3
- data/spec/unit/rom/repository/element_writer_spec.rb +1 -1
- metadata +3 -3
- data/lib/rom/version.rb +0 -7
data/Changelog.md
CHANGED
data/Gemfile
CHANGED
@@ -6,14 +6,14 @@ gemspec
|
|
6
6
|
|
7
7
|
gem 'rom-relation', path: '.'
|
8
8
|
|
9
|
-
gem 'axiom', git: 'https://github.com/dkubb/axiom.git'
|
9
|
+
gem 'axiom', git: 'https://github.com/dkubb/axiom.git', branch: 'master'
|
10
10
|
gem 'rom-mapper', git: 'https://github.com/rom-rb/rom-mapper.git'
|
11
11
|
|
12
12
|
group :test do
|
13
13
|
gem 'bogus', '~> 0.1'
|
14
14
|
gem 'randexp'
|
15
15
|
gem 'ruby-graphviz'
|
16
|
-
gem 'axiom-memory-adapter', git: 'https://github.com/dkubb/axiom-memory-adapter.git'
|
16
|
+
gem 'axiom-memory-adapter', git: 'https://github.com/dkubb/axiom-memory-adapter.git', branch: 'master'
|
17
17
|
end
|
18
18
|
|
19
19
|
group :development do
|
data/lib/rom-relation.rb
CHANGED
@@ -39,6 +39,8 @@ module Axiom
|
|
39
39
|
#
|
40
40
|
# @api private
|
41
41
|
def self.build(uri)
|
42
|
+
require_adapter(uri)
|
43
|
+
|
42
44
|
klass = get(uri)
|
43
45
|
|
44
46
|
if klass.name == 'Axiom::Adapter::Memory'
|
@@ -71,6 +73,15 @@ module Axiom
|
|
71
73
|
}
|
72
74
|
end
|
73
75
|
|
76
|
+
# Try to load an adapter using a standard path
|
77
|
+
#
|
78
|
+
# @api private
|
79
|
+
def self.require_adapter(uri)
|
80
|
+
require "rom/support/axiom/adapter/#{uri.scheme}"
|
81
|
+
rescue LoadError
|
82
|
+
end
|
83
|
+
private_class_method :require_adapter
|
84
|
+
|
74
85
|
# Set the uri scheme for an adapter class
|
75
86
|
#
|
76
87
|
# @example for a DataObjects adapter
|
data/rom-relation.gemspec
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
# encoding: utf-8
|
2
2
|
|
3
|
-
require File.expand_path('../lib/rom/version', __FILE__)
|
3
|
+
require File.expand_path('../lib/rom/relation/version', __FILE__)
|
4
4
|
|
5
5
|
Gem::Specification.new do |gem|
|
6
6
|
gem.name = 'rom-relation'
|
@@ -10,7 +10,7 @@ Gem::Specification.new do |gem|
|
|
10
10
|
gem.email = 'piotr.solnica@gmail.com'
|
11
11
|
gem.homepage = 'http://rom-rb.org'
|
12
12
|
gem.require_paths = ['lib']
|
13
|
-
gem.version = ROM::Relation::VERSION
|
13
|
+
gem.version = ROM::Relation::VERSION.dup
|
14
14
|
gem.files = `git ls-files`.split("\n")
|
15
15
|
gem.test_files = `git ls-files -- {spec}/*`.split("\n")
|
16
16
|
gem.license = 'MIT'
|
data/spec/spec_helper.rb
CHANGED
@@ -22,15 +22,13 @@ end
|
|
22
22
|
|
23
23
|
require 'rom-relation'
|
24
24
|
require 'rom-mapper'
|
25
|
-
require 'rom/support/axiom/adapter/memory'
|
26
25
|
|
27
26
|
require 'devtools/spec_helper'
|
28
27
|
require 'bogus/rspec'
|
29
28
|
|
30
29
|
include ROM
|
31
30
|
|
32
|
-
ROM_ENV
|
33
|
-
ROM_ADAPTER = ENV.fetch('ROM_ADAPTER', :in_memory).to_sym
|
31
|
+
ROM_ENV = Environment.setup(test: 'memory://test')
|
34
32
|
|
35
33
|
Bogus.configure do |config|
|
36
34
|
config.search_modules << ROM
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rom-relation
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.2
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2013-
|
12
|
+
date: 2013-09-02 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: addressable
|
@@ -176,6 +176,7 @@ files:
|
|
176
176
|
- lib/rom/mapping.rb
|
177
177
|
- lib/rom/mapping/definition.rb
|
178
178
|
- lib/rom/relation.rb
|
179
|
+
- lib/rom/relation/version.rb
|
179
180
|
- lib/rom/repository.rb
|
180
181
|
- lib/rom/schema.rb
|
181
182
|
- lib/rom/schema/definition.rb
|
@@ -186,7 +187,6 @@ files:
|
|
186
187
|
- lib/rom/support/axiom/adapter/memory.rb
|
187
188
|
- lib/rom/support/axiom/adapter/postgres.rb
|
188
189
|
- lib/rom/support/axiom/adapter/sqlite3.rb
|
189
|
-
- lib/rom/version.rb
|
190
190
|
- rom-relation.gemspec
|
191
191
|
- spec/integration/environment_setup_spec.rb
|
192
192
|
- spec/integration/mapping_relations_spec.rb
|