rom 0.5.0 → 0.6.0.beta1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.rubocop.yml +19 -15
- data/.rubocop_todo.yml +28 -0
- data/.travis.yml +8 -1
- data/CHANGELOG.md +40 -0
- data/Gemfile +10 -2
- data/Guardfile +12 -10
- data/README.md +42 -43
- data/Rakefile +13 -23
- data/lib/rom.rb +19 -27
- data/lib/rom/command.rb +118 -0
- data/lib/rom/command_registry.rb +13 -27
- data/lib/rom/commands.rb +1 -59
- data/lib/rom/commands/abstract.rb +147 -0
- data/lib/rom/commands/composite.rb +47 -0
- data/lib/rom/commands/create.rb +2 -17
- data/lib/rom/commands/delete.rb +5 -25
- data/lib/rom/commands/result.rb +5 -5
- data/lib/rom/commands/update.rb +3 -27
- data/lib/rom/constants.rb +19 -0
- data/lib/rom/env.rb +85 -35
- data/lib/rom/global.rb +173 -42
- data/lib/rom/header.rb +5 -5
- data/lib/rom/header/attribute.rb +2 -2
- data/lib/rom/lint/enumerable_dataset.rb +52 -0
- data/lib/rom/lint/linter.rb +64 -0
- data/lib/rom/lint/repository.rb +78 -0
- data/lib/rom/lint/spec.rb +20 -0
- data/lib/rom/lint/test.rb +98 -0
- data/lib/rom/mapper.rb +32 -5
- data/lib/rom/mapper/attribute_dsl.rb +240 -0
- data/lib/rom/mapper/dsl.rb +100 -0
- data/lib/rom/mapper/model_dsl.rb +55 -0
- data/lib/rom/mapper_registry.rb +8 -1
- data/lib/rom/memory.rb +4 -0
- data/lib/rom/memory/commands.rb +46 -0
- data/lib/rom/memory/dataset.rb +72 -0
- data/lib/rom/memory/relation.rb +44 -0
- data/lib/rom/memory/repository.rb +62 -0
- data/lib/rom/memory/storage.rb +57 -0
- data/lib/rom/model_builder.rb +44 -5
- data/lib/rom/processor.rb +1 -1
- data/lib/rom/processor/transproc.rb +109 -16
- data/lib/rom/reader.rb +91 -39
- data/lib/rom/relation.rb +165 -26
- data/lib/rom/relation/composite.rb +132 -0
- data/lib/rom/relation/curried.rb +48 -0
- data/lib/rom/relation/lazy.rb +173 -0
- data/lib/rom/relation/loaded.rb +75 -0
- data/lib/rom/relation/registry_reader.rb +23 -0
- data/lib/rom/repository.rb +93 -34
- data/lib/rom/setup.rb +54 -98
- data/lib/rom/setup/finalize.rb +85 -76
- data/lib/rom/setup_dsl/command.rb +36 -0
- data/lib/rom/setup_dsl/command_dsl.rb +34 -0
- data/lib/rom/setup_dsl/mapper.rb +32 -0
- data/lib/rom/setup_dsl/mapper_dsl.rb +30 -0
- data/lib/rom/setup_dsl/relation.rb +21 -0
- data/lib/rom/setup_dsl/setup.rb +75 -0
- data/lib/rom/support/array_dataset.rb +38 -0
- data/lib/rom/support/class_builder.rb +44 -0
- data/lib/rom/support/class_macros.rb +56 -0
- data/lib/rom/support/data_proxy.rb +102 -0
- data/lib/rom/support/enumerable_dataset.rb +58 -0
- data/lib/rom/support/inflector.rb +73 -0
- data/lib/rom/support/options.rb +188 -0
- data/lib/rom/support/registry.rb +4 -8
- data/lib/rom/version.rb +1 -1
- data/rakelib/benchmark.rake +13 -0
- data/rakelib/mutant.rake +16 -0
- data/rakelib/rubocop.rake +18 -0
- data/rom.gemspec +4 -7
- data/spec/integration/commands/create_spec.rb +32 -24
- data/spec/integration/commands/delete_spec.rb +15 -7
- data/spec/integration/commands/update_spec.rb +13 -11
- data/spec/integration/mappers/deep_embedded_spec.rb +4 -11
- data/spec/integration/mappers/definition_dsl_spec.rb +31 -44
- data/spec/integration/mappers/embedded_spec.rb +9 -24
- data/spec/integration/mappers/group_spec.rb +22 -30
- data/spec/integration/mappers/prefixing_attributes_spec.rb +18 -23
- data/spec/integration/mappers/renaming_attributes_spec.rb +23 -38
- data/spec/integration/mappers/symbolizing_attributes_spec.rb +18 -24
- data/spec/integration/mappers/wrap_spec.rb +22 -30
- data/spec/integration/multi_repo_spec.rb +15 -37
- data/spec/integration/relations/reading_spec.rb +82 -14
- data/spec/integration/repositories/extending_relations_spec.rb +50 -0
- data/spec/integration/{adapters → repositories}/setting_logger_spec.rb +6 -5
- data/spec/integration/setup_spec.rb +59 -62
- data/spec/shared/enumerable_dataset.rb +49 -0
- data/spec/shared/one_behavior.rb +26 -0
- data/spec/shared/users_and_tasks.rb +11 -23
- data/spec/spec_helper.rb +16 -7
- data/spec/support/constant_leak_finder.rb +14 -0
- data/spec/test/memory_repository_lint_test.rb +27 -0
- data/spec/unit/rom/command_registry_spec.rb +44 -0
- data/spec/unit/rom/commands/result_spec.rb +14 -0
- data/spec/unit/rom/commands_spec.rb +174 -0
- data/spec/unit/rom/env_spec.rb +40 -7
- data/spec/unit/rom/global_spec.rb +14 -0
- data/spec/unit/rom/{mapper_builder_spec.rb → mapper/dsl_spec.rb} +52 -38
- data/spec/unit/rom/mapper_spec.rb +51 -10
- data/spec/unit/rom/{adapter/memory → memory}/dataset_spec.rb +6 -4
- data/spec/unit/rom/memory/repository_spec.rb +12 -0
- data/spec/unit/rom/memory/storage_spec.rb +45 -0
- data/spec/unit/rom/model_builder_spec.rb +4 -3
- data/spec/unit/rom/processor/transproc_spec.rb +1 -0
- data/spec/unit/rom/reader_spec.rb +97 -24
- data/spec/unit/rom/relation/composite_spec.rb +65 -0
- data/spec/unit/rom/relation/lazy_spec.rb +145 -0
- data/spec/unit/rom/relation/loaded_spec.rb +28 -0
- data/spec/unit/rom/relation_spec.rb +111 -6
- data/spec/unit/rom/repository_spec.rb +59 -9
- data/spec/unit/rom/setup_spec.rb +99 -11
- data/spec/unit/rom/support/array_dataset_spec.rb +59 -0
- data/spec/unit/rom/support/class_builder_spec.rb +42 -0
- data/spec/unit/rom/support/enumerable_dataset_spec.rb +17 -0
- data/spec/unit/rom/support/inflector_spec.rb +89 -0
- data/spec/unit/rom/support/options_spec.rb +119 -0
- metadata +74 -112
- data/lib/rom/adapter.rb +0 -191
- data/lib/rom/adapter/memory.rb +0 -32
- data/lib/rom/adapter/memory/commands.rb +0 -31
- data/lib/rom/adapter/memory/dataset.rb +0 -67
- data/lib/rom/adapter/memory/storage.rb +0 -26
- data/lib/rom/commands/with_options.rb +0 -18
- data/lib/rom/config.rb +0 -70
- data/lib/rom/mapper_builder.rb +0 -52
- data/lib/rom/mapper_builder/mapper_dsl.rb +0 -114
- data/lib/rom/mapper_builder/model_dsl.rb +0 -29
- data/lib/rom/reader_builder.rb +0 -48
- data/lib/rom/relation_builder.rb +0 -62
- data/lib/rom/setup/base_relation_dsl.rb +0 -46
- data/lib/rom/setup/command_dsl.rb +0 -46
- data/lib/rom/setup/mapper_dsl.rb +0 -19
- data/lib/rom/setup/relation_dsl.rb +0 -20
- data/lib/rom/setup/schema_dsl.rb +0 -33
- data/spec/integration/adapters/extending_relations_spec.rb +0 -41
- data/spec/integration/commands/try_spec.rb +0 -27
- data/spec/integration/schema_spec.rb +0 -77
- data/spec/unit/config_spec.rb +0 -60
- data/spec/unit/rom/adapter_spec.rb +0 -79
- data/spec/unit/rom_spec.rb +0 -14
@@ -0,0 +1,17 @@
|
|
1
|
+
require 'spec_helper'
|
2
|
+
|
3
|
+
require 'rom/support/enumerable_dataset'
|
4
|
+
|
5
|
+
describe ROM::EnumerableDataset do
|
6
|
+
let(:klass) do
|
7
|
+
Class.new do
|
8
|
+
include ROM::EnumerableDataset
|
9
|
+
|
10
|
+
def self.row_proc
|
11
|
+
Transproc(:symbolize_keys)
|
12
|
+
end
|
13
|
+
end
|
14
|
+
end
|
15
|
+
|
16
|
+
it_behaves_like 'an enumerable dataset'
|
17
|
+
end
|
@@ -0,0 +1,89 @@
|
|
1
|
+
require 'spec_helper'
|
2
|
+
|
3
|
+
describe ROM::Inflector do
|
4
|
+
shared_examples 'an inflector' do
|
5
|
+
it 'singularises' do
|
6
|
+
expect(api.singularize('tasks')).to eq 'task'
|
7
|
+
end
|
8
|
+
|
9
|
+
it 'pluralizes' do
|
10
|
+
expect(api.pluralize('task')).to eq 'tasks'
|
11
|
+
end
|
12
|
+
|
13
|
+
it 'camelizes' do
|
14
|
+
expect(api.camelize('task_user')).to eq 'TaskUser'
|
15
|
+
end
|
16
|
+
|
17
|
+
it 'underscores' do
|
18
|
+
expect(api.underscore('TaskUser')).to eq 'task_user'
|
19
|
+
end
|
20
|
+
|
21
|
+
it 'demodulizes' do
|
22
|
+
expect(api.demodulize('Task::User')).to eq 'User'
|
23
|
+
end
|
24
|
+
|
25
|
+
it 'constantizes' do
|
26
|
+
expect(api.constantize('String')).to equal String
|
27
|
+
end
|
28
|
+
|
29
|
+
it 'classifies' do
|
30
|
+
expect(api.classify('task_user/name')).to eq 'TaskUser::Name'
|
31
|
+
end
|
32
|
+
end
|
33
|
+
|
34
|
+
subject(:api) { ROM::Inflector }
|
35
|
+
|
36
|
+
context 'with detected inflector' do
|
37
|
+
before do
|
38
|
+
if api.instance_variables.include?(:@inflector)
|
39
|
+
api.__send__(:remove_instance_variable, :@inflector)
|
40
|
+
end
|
41
|
+
end
|
42
|
+
|
43
|
+
it 'prefers ActiveSupport::Inflector' do
|
44
|
+
expect(api.inflector == ::ActiveSupport::Inflector).to be true
|
45
|
+
end
|
46
|
+
end
|
47
|
+
|
48
|
+
context 'with automatic detection' do
|
49
|
+
before do
|
50
|
+
if api.instance_variables.include?(:@inflector)
|
51
|
+
api.__send__(:remove_instance_variable, :@inflector)
|
52
|
+
end
|
53
|
+
end
|
54
|
+
|
55
|
+
it 'automatically selects an inflector backend' do
|
56
|
+
expect(api.inflector).not_to be nil
|
57
|
+
end
|
58
|
+
end
|
59
|
+
|
60
|
+
context 'with ActiveSupport::Inflector' do
|
61
|
+
before do
|
62
|
+
api.select_backend(:activesupport)
|
63
|
+
end
|
64
|
+
|
65
|
+
it 'is ActiveSupport::Inflector' do
|
66
|
+
expect(api.inflector).to be(::ActiveSupport::Inflector)
|
67
|
+
end
|
68
|
+
|
69
|
+
it_behaves_like 'an inflector'
|
70
|
+
end
|
71
|
+
|
72
|
+
context 'with Inflecto' do
|
73
|
+
before do
|
74
|
+
api.select_backend(:inflecto)
|
75
|
+
end
|
76
|
+
|
77
|
+
it 'is Inflecto' do
|
78
|
+
expect(api.inflector).to be(::Inflecto)
|
79
|
+
end
|
80
|
+
|
81
|
+
it_behaves_like 'an inflector'
|
82
|
+
end
|
83
|
+
|
84
|
+
context 'an unrecognized inflector library is selected' do
|
85
|
+
it 'raises a NameError' do
|
86
|
+
expect { api.select_backend(:foo) }.to raise_error(NameError)
|
87
|
+
end
|
88
|
+
end
|
89
|
+
end
|
@@ -0,0 +1,119 @@
|
|
1
|
+
require 'spec_helper'
|
2
|
+
|
3
|
+
describe ROM::Options do
|
4
|
+
let(:klass) do
|
5
|
+
Class.new do
|
6
|
+
include ROM::Options
|
7
|
+
|
8
|
+
option :name, type: String, reader: true, allow: %w(foo bar)
|
9
|
+
option :repo, reader: true
|
10
|
+
option :other
|
11
|
+
end
|
12
|
+
end
|
13
|
+
|
14
|
+
describe '.new' do
|
15
|
+
it 'works without passing a hash' do
|
16
|
+
expect { klass.new }.not_to raise_error
|
17
|
+
end
|
18
|
+
|
19
|
+
it 'sets options hash' do
|
20
|
+
object = klass.new(name: 'foo')
|
21
|
+
expect(object.options).to eql(name: 'foo')
|
22
|
+
end
|
23
|
+
|
24
|
+
it 'allows any value when :allow is not specified' do
|
25
|
+
repo = double('repo')
|
26
|
+
object = klass.new(repo: repo)
|
27
|
+
expect(object.options).to eql(repo: repo)
|
28
|
+
end
|
29
|
+
|
30
|
+
it 'sets readers for options when specified' do
|
31
|
+
object = klass.new(name: 'bar', repo: 'default')
|
32
|
+
expect(object.name).to eql('bar')
|
33
|
+
expect(object.repo).to eql('default')
|
34
|
+
expect(object).to_not respond_to(:other)
|
35
|
+
end
|
36
|
+
|
37
|
+
it 'checks option key' do
|
38
|
+
expect { klass.new(unexpected: 'foo') }
|
39
|
+
.to raise_error(ROM::InvalidOptionKeyError, /:unexpected/)
|
40
|
+
end
|
41
|
+
|
42
|
+
it 'checks option type' do
|
43
|
+
expect { klass.new(name: :foo) }
|
44
|
+
.to raise_error(ROM::InvalidOptionValueError, /:foo/)
|
45
|
+
end
|
46
|
+
|
47
|
+
it 'checks option value' do
|
48
|
+
expect { klass.new(name: 'invalid') }
|
49
|
+
.to raise_error(ROM::InvalidOptionValueError, /invalid/)
|
50
|
+
end
|
51
|
+
|
52
|
+
it 'copies klass options to descendant' do
|
53
|
+
other = Class.new(klass).new(name: 'foo')
|
54
|
+
expect(other.options).to eql(name: 'foo')
|
55
|
+
end
|
56
|
+
|
57
|
+
it 'does not interfere with its parent`s option definitions' do
|
58
|
+
Class.new(klass) do
|
59
|
+
option :child, default: :nope
|
60
|
+
end
|
61
|
+
object = klass.new
|
62
|
+
expect(object.options).to eql({})
|
63
|
+
end
|
64
|
+
|
65
|
+
it 'sets option defaults statically' do
|
66
|
+
default_value = []
|
67
|
+
klass.option :args, default: default_value
|
68
|
+
|
69
|
+
object = klass.new
|
70
|
+
|
71
|
+
expect(object.options).to eql(args: default_value)
|
72
|
+
expect(object.options[:args]).to equal(default_value)
|
73
|
+
end
|
74
|
+
|
75
|
+
it 'sets option defaults dynamically via proc' do
|
76
|
+
klass.option :args, default: proc { |*a| a }
|
77
|
+
|
78
|
+
object = klass.new
|
79
|
+
|
80
|
+
expect(object.options).to eql(args: [object])
|
81
|
+
end
|
82
|
+
|
83
|
+
it 'allow nil as default value' do
|
84
|
+
klass.option :args, default: nil
|
85
|
+
|
86
|
+
object = klass.new
|
87
|
+
|
88
|
+
expect(object.options).to eql(args: nil)
|
89
|
+
end
|
90
|
+
|
91
|
+
it 'options are frozen' do
|
92
|
+
object = klass.new
|
93
|
+
|
94
|
+
expect { object.options[:foo] = :bar }
|
95
|
+
.to raise_error(RuntimeError, /frozen/)
|
96
|
+
end
|
97
|
+
|
98
|
+
it 'call parent`s `inherited` hook' do
|
99
|
+
m = Module.new do
|
100
|
+
def inherited(_base)
|
101
|
+
raise "hook called"
|
102
|
+
end
|
103
|
+
end
|
104
|
+
klass.extend m
|
105
|
+
|
106
|
+
expect { Class.new(klass).new }
|
107
|
+
.to raise_error(/hook called/)
|
108
|
+
end
|
109
|
+
|
110
|
+
it 'does not modify passed options' do
|
111
|
+
options = {}
|
112
|
+
klass.option :foo, default: :bar
|
113
|
+
|
114
|
+
klass.new(options)
|
115
|
+
|
116
|
+
expect(options).to eq({})
|
117
|
+
end
|
118
|
+
end
|
119
|
+
end
|
metadata
CHANGED
@@ -1,29 +1,15 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rom
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.6.0.beta1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Piotr Solnica
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2015-02-26 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
|
-
- !ruby/object:Gem::Dependency
|
14
|
-
name: addressable
|
15
|
-
requirement: !ruby/object:Gem::Requirement
|
16
|
-
requirements:
|
17
|
-
- - "~>"
|
18
|
-
- !ruby/object:Gem::Version
|
19
|
-
version: '2.3'
|
20
|
-
type: :runtime
|
21
|
-
prerelease: false
|
22
|
-
version_requirements: !ruby/object:Gem::Requirement
|
23
|
-
requirements:
|
24
|
-
- - "~>"
|
25
|
-
- !ruby/object:Gem::Version
|
26
|
-
version: '2.3'
|
27
13
|
- !ruby/object:Gem::Dependency
|
28
14
|
name: transproc
|
29
15
|
requirement: !ruby/object:Gem::Requirement
|
@@ -58,66 +44,6 @@ dependencies:
|
|
58
44
|
- - ">="
|
59
45
|
- !ruby/object:Gem::Version
|
60
46
|
version: 0.0.9
|
61
|
-
- !ruby/object:Gem::Dependency
|
62
|
-
name: concord
|
63
|
-
requirement: !ruby/object:Gem::Requirement
|
64
|
-
requirements:
|
65
|
-
- - "~>"
|
66
|
-
- !ruby/object:Gem::Version
|
67
|
-
version: '0.1'
|
68
|
-
- - ">="
|
69
|
-
- !ruby/object:Gem::Version
|
70
|
-
version: 0.1.4
|
71
|
-
type: :runtime
|
72
|
-
prerelease: false
|
73
|
-
version_requirements: !ruby/object:Gem::Requirement
|
74
|
-
requirements:
|
75
|
-
- - "~>"
|
76
|
-
- !ruby/object:Gem::Version
|
77
|
-
version: '0.1'
|
78
|
-
- - ">="
|
79
|
-
- !ruby/object:Gem::Version
|
80
|
-
version: 0.1.4
|
81
|
-
- !ruby/object:Gem::Dependency
|
82
|
-
name: charlatan
|
83
|
-
requirement: !ruby/object:Gem::Requirement
|
84
|
-
requirements:
|
85
|
-
- - "~>"
|
86
|
-
- !ruby/object:Gem::Version
|
87
|
-
version: '0.1'
|
88
|
-
- - ">="
|
89
|
-
- !ruby/object:Gem::Version
|
90
|
-
version: '0.1'
|
91
|
-
type: :runtime
|
92
|
-
prerelease: false
|
93
|
-
version_requirements: !ruby/object:Gem::Requirement
|
94
|
-
requirements:
|
95
|
-
- - "~>"
|
96
|
-
- !ruby/object:Gem::Version
|
97
|
-
version: '0.1'
|
98
|
-
- - ">="
|
99
|
-
- !ruby/object:Gem::Version
|
100
|
-
version: '0.1'
|
101
|
-
- !ruby/object:Gem::Dependency
|
102
|
-
name: inflecto
|
103
|
-
requirement: !ruby/object:Gem::Requirement
|
104
|
-
requirements:
|
105
|
-
- - "~>"
|
106
|
-
- !ruby/object:Gem::Version
|
107
|
-
version: '0.0'
|
108
|
-
- - ">="
|
109
|
-
- !ruby/object:Gem::Version
|
110
|
-
version: 0.0.2
|
111
|
-
type: :runtime
|
112
|
-
prerelease: false
|
113
|
-
version_requirements: !ruby/object:Gem::Requirement
|
114
|
-
requirements:
|
115
|
-
- - "~>"
|
116
|
-
- !ruby/object:Gem::Version
|
117
|
-
version: '0.0'
|
118
|
-
- - ">="
|
119
|
-
- !ruby/object:Gem::Version
|
120
|
-
version: 0.0.2
|
121
47
|
- !ruby/object:Gem::Dependency
|
122
48
|
name: rake
|
123
49
|
requirement: !ruby/object:Gem::Requirement
|
@@ -138,42 +64,42 @@ dependencies:
|
|
138
64
|
requirements:
|
139
65
|
- - "~>"
|
140
66
|
- !ruby/object:Gem::Version
|
141
|
-
version: '3.
|
67
|
+
version: '3.2'
|
142
68
|
type: :development
|
143
69
|
prerelease: false
|
144
70
|
version_requirements: !ruby/object:Gem::Requirement
|
145
71
|
requirements:
|
146
72
|
- - "~>"
|
147
73
|
- !ruby/object:Gem::Version
|
148
|
-
version: '3.
|
74
|
+
version: '3.2'
|
149
75
|
- !ruby/object:Gem::Dependency
|
150
76
|
name: rspec-mocks
|
151
77
|
requirement: !ruby/object:Gem::Requirement
|
152
78
|
requirements:
|
153
79
|
- - "~>"
|
154
80
|
- !ruby/object:Gem::Version
|
155
|
-
version: '3.
|
81
|
+
version: '3.2'
|
156
82
|
type: :development
|
157
83
|
prerelease: false
|
158
84
|
version_requirements: !ruby/object:Gem::Requirement
|
159
85
|
requirements:
|
160
86
|
- - "~>"
|
161
87
|
- !ruby/object:Gem::Version
|
162
|
-
version: '3.
|
88
|
+
version: '3.2'
|
163
89
|
- !ruby/object:Gem::Dependency
|
164
90
|
name: rspec-expectations
|
165
91
|
requirement: !ruby/object:Gem::Requirement
|
166
92
|
requirements:
|
167
93
|
- - "~>"
|
168
94
|
- !ruby/object:Gem::Version
|
169
|
-
version: '3.
|
95
|
+
version: '3.2'
|
170
96
|
type: :development
|
171
97
|
prerelease: false
|
172
98
|
version_requirements: !ruby/object:Gem::Requirement
|
173
99
|
requirements:
|
174
100
|
- - "~>"
|
175
101
|
- !ruby/object:Gem::Version
|
176
|
-
version: '3.
|
102
|
+
version: '3.2'
|
177
103
|
description: Persistence and mapping toolkit for Ruby
|
178
104
|
email: piotr.solnica@gmail.com
|
179
105
|
executables: []
|
@@ -183,6 +109,7 @@ files:
|
|
183
109
|
- ".gitignore"
|
184
110
|
- ".rspec"
|
185
111
|
- ".rubocop.yml"
|
112
|
+
- ".rubocop_todo.yml"
|
186
113
|
- ".ruby-version"
|
187
114
|
- ".travis.yml"
|
188
115
|
- CHANGELOG.md
|
@@ -192,52 +119,71 @@ files:
|
|
192
119
|
- README.md
|
193
120
|
- Rakefile
|
194
121
|
- lib/rom.rb
|
195
|
-
- lib/rom/
|
196
|
-
- lib/rom/adapter/memory.rb
|
197
|
-
- lib/rom/adapter/memory/commands.rb
|
198
|
-
- lib/rom/adapter/memory/dataset.rb
|
199
|
-
- lib/rom/adapter/memory/storage.rb
|
122
|
+
- lib/rom/command.rb
|
200
123
|
- lib/rom/command_registry.rb
|
201
124
|
- lib/rom/commands.rb
|
125
|
+
- lib/rom/commands/abstract.rb
|
126
|
+
- lib/rom/commands/composite.rb
|
202
127
|
- lib/rom/commands/create.rb
|
203
128
|
- lib/rom/commands/delete.rb
|
204
129
|
- lib/rom/commands/result.rb
|
205
130
|
- lib/rom/commands/update.rb
|
206
|
-
- lib/rom/
|
207
|
-
- lib/rom/config.rb
|
131
|
+
- lib/rom/constants.rb
|
208
132
|
- lib/rom/env.rb
|
209
133
|
- lib/rom/global.rb
|
210
134
|
- lib/rom/header.rb
|
211
135
|
- lib/rom/header/attribute.rb
|
136
|
+
- lib/rom/lint/enumerable_dataset.rb
|
137
|
+
- lib/rom/lint/linter.rb
|
138
|
+
- lib/rom/lint/repository.rb
|
139
|
+
- lib/rom/lint/spec.rb
|
140
|
+
- lib/rom/lint/test.rb
|
212
141
|
- lib/rom/mapper.rb
|
213
|
-
- lib/rom/
|
214
|
-
- lib/rom/
|
215
|
-
- lib/rom/
|
142
|
+
- lib/rom/mapper/attribute_dsl.rb
|
143
|
+
- lib/rom/mapper/dsl.rb
|
144
|
+
- lib/rom/mapper/model_dsl.rb
|
216
145
|
- lib/rom/mapper_registry.rb
|
146
|
+
- lib/rom/memory.rb
|
147
|
+
- lib/rom/memory/commands.rb
|
148
|
+
- lib/rom/memory/dataset.rb
|
149
|
+
- lib/rom/memory/relation.rb
|
150
|
+
- lib/rom/memory/repository.rb
|
151
|
+
- lib/rom/memory/storage.rb
|
217
152
|
- lib/rom/model_builder.rb
|
218
153
|
- lib/rom/processor.rb
|
219
154
|
- lib/rom/processor/transproc.rb
|
220
155
|
- lib/rom/reader.rb
|
221
|
-
- lib/rom/reader_builder.rb
|
222
156
|
- lib/rom/relation.rb
|
223
|
-
- lib/rom/
|
157
|
+
- lib/rom/relation/composite.rb
|
158
|
+
- lib/rom/relation/curried.rb
|
159
|
+
- lib/rom/relation/lazy.rb
|
160
|
+
- lib/rom/relation/loaded.rb
|
161
|
+
- lib/rom/relation/registry_reader.rb
|
224
162
|
- lib/rom/repository.rb
|
225
163
|
- lib/rom/setup.rb
|
226
|
-
- lib/rom/setup/base_relation_dsl.rb
|
227
|
-
- lib/rom/setup/command_dsl.rb
|
228
164
|
- lib/rom/setup/finalize.rb
|
229
|
-
- lib/rom/
|
230
|
-
- lib/rom/
|
231
|
-
- lib/rom/
|
165
|
+
- lib/rom/setup_dsl/command.rb
|
166
|
+
- lib/rom/setup_dsl/command_dsl.rb
|
167
|
+
- lib/rom/setup_dsl/mapper.rb
|
168
|
+
- lib/rom/setup_dsl/mapper_dsl.rb
|
169
|
+
- lib/rom/setup_dsl/relation.rb
|
170
|
+
- lib/rom/setup_dsl/setup.rb
|
171
|
+
- lib/rom/support/array_dataset.rb
|
172
|
+
- lib/rom/support/class_builder.rb
|
173
|
+
- lib/rom/support/class_macros.rb
|
174
|
+
- lib/rom/support/data_proxy.rb
|
175
|
+
- lib/rom/support/enumerable_dataset.rb
|
176
|
+
- lib/rom/support/inflector.rb
|
177
|
+
- lib/rom/support/options.rb
|
232
178
|
- lib/rom/support/registry.rb
|
233
179
|
- lib/rom/version.rb
|
180
|
+
- rakelib/benchmark.rake
|
181
|
+
- rakelib/mutant.rake
|
182
|
+
- rakelib/rubocop.rake
|
234
183
|
- rom.gemspec
|
235
|
-
- spec/integration/adapters/extending_relations_spec.rb
|
236
|
-
- spec/integration/adapters/setting_logger_spec.rb
|
237
184
|
- spec/integration/commands/create_spec.rb
|
238
185
|
- spec/integration/commands/delete_spec.rb
|
239
186
|
- spec/integration/commands/error_handling_spec.rb
|
240
|
-
- spec/integration/commands/try_spec.rb
|
241
187
|
- spec/integration/commands/update_spec.rb
|
242
188
|
- spec/integration/mappers/deep_embedded_spec.rb
|
243
189
|
- spec/integration/mappers/definition_dsl_spec.rb
|
@@ -250,27 +196,43 @@ files:
|
|
250
196
|
- spec/integration/multi_repo_spec.rb
|
251
197
|
- spec/integration/relations/reading_spec.rb
|
252
198
|
- spec/integration/relations/registry_dsl_spec.rb
|
253
|
-
- spec/integration/
|
199
|
+
- spec/integration/repositories/extending_relations_spec.rb
|
200
|
+
- spec/integration/repositories/setting_logger_spec.rb
|
254
201
|
- spec/integration/setup_spec.rb
|
202
|
+
- spec/shared/enumerable_dataset.rb
|
203
|
+
- spec/shared/one_behavior.rb
|
255
204
|
- spec/shared/users_and_tasks.rb
|
256
205
|
- spec/spec_helper.rb
|
206
|
+
- spec/support/constant_leak_finder.rb
|
257
207
|
- spec/support/mutant.rb
|
258
|
-
- spec/
|
259
|
-
- spec/unit/rom/
|
260
|
-
- spec/unit/rom/
|
208
|
+
- spec/test/memory_repository_lint_test.rb
|
209
|
+
- spec/unit/rom/command_registry_spec.rb
|
210
|
+
- spec/unit/rom/commands/result_spec.rb
|
211
|
+
- spec/unit/rom/commands_spec.rb
|
261
212
|
- spec/unit/rom/env_spec.rb
|
213
|
+
- spec/unit/rom/global_spec.rb
|
262
214
|
- spec/unit/rom/header_spec.rb
|
263
|
-
- spec/unit/rom/
|
215
|
+
- spec/unit/rom/mapper/dsl_spec.rb
|
264
216
|
- spec/unit/rom/mapper_registry_spec.rb
|
265
217
|
- spec/unit/rom/mapper_spec.rb
|
218
|
+
- spec/unit/rom/memory/dataset_spec.rb
|
219
|
+
- spec/unit/rom/memory/repository_spec.rb
|
220
|
+
- spec/unit/rom/memory/storage_spec.rb
|
266
221
|
- spec/unit/rom/model_builder_spec.rb
|
267
222
|
- spec/unit/rom/processor/transproc_spec.rb
|
268
223
|
- spec/unit/rom/reader_spec.rb
|
269
224
|
- spec/unit/rom/registry_spec.rb
|
225
|
+
- spec/unit/rom/relation/composite_spec.rb
|
226
|
+
- spec/unit/rom/relation/lazy_spec.rb
|
227
|
+
- spec/unit/rom/relation/loaded_spec.rb
|
270
228
|
- spec/unit/rom/relation_spec.rb
|
271
229
|
- spec/unit/rom/repository_spec.rb
|
272
230
|
- spec/unit/rom/setup_spec.rb
|
273
|
-
- spec/unit/
|
231
|
+
- spec/unit/rom/support/array_dataset_spec.rb
|
232
|
+
- spec/unit/rom/support/class_builder_spec.rb
|
233
|
+
- spec/unit/rom/support/enumerable_dataset_spec.rb
|
234
|
+
- spec/unit/rom/support/inflector_spec.rb
|
235
|
+
- spec/unit/rom/support/options_spec.rb
|
274
236
|
homepage: http://rom-rb.org
|
275
237
|
licenses:
|
276
238
|
- MIT
|
@@ -281,14 +243,14 @@ require_paths:
|
|
281
243
|
- lib
|
282
244
|
required_ruby_version: !ruby/object:Gem::Requirement
|
283
245
|
requirements:
|
284
|
-
- - "
|
246
|
+
- - "~>"
|
285
247
|
- !ruby/object:Gem::Version
|
286
|
-
version: '0'
|
248
|
+
version: '2.0'
|
287
249
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
288
250
|
requirements:
|
289
|
-
- - "
|
251
|
+
- - ">"
|
290
252
|
- !ruby/object:Gem::Version
|
291
|
-
version:
|
253
|
+
version: 1.3.1
|
292
254
|
requirements: []
|
293
255
|
rubyforge_project:
|
294
256
|
rubygems_version: 2.2.2
|