rom-model 0.2.0 → 0.3.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.travis.yml +4 -5
- data/CHANGELOG.md +8 -0
- data/Gemfile +1 -1
- data/README.md +3 -21
- data/lib/rom/model/version.rb +1 -1
- data/rom-model.gemspec +1 -1
- data/spec/shared/database.rb +1 -1
- data/spec/spec_helper.rb +10 -0
- metadata +5 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: efc994a8fec207a476eb5d6ec12a4c1dea7fc225
|
4
|
+
data.tar.gz: f33cea9bd176bb20a64cdae577563f3984dcf78a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 16f971241f291b4d6e8c193db2268382d72df8f406b14da13b7321ecfb57993204bab5cbc4d4b8c7557d7e6ca806913e33ee2607909c7720b8c49a89ab21a313
|
7
|
+
data.tar.gz: f1edb7c0c0d2f2acf172a8dd1c5ab1942dede05c5cef583dcf576125f3393a44a5f0dd338f43ca68851188a501dabada64c89666b09341c33815ea5c957d66ae
|
data/.travis.yml
CHANGED
@@ -6,16 +6,15 @@ before_script:
|
|
6
6
|
- psql -c 'create database rom_model' -U postgres
|
7
7
|
script: "bundle exec rake ci"
|
8
8
|
rvm:
|
9
|
-
- 2.
|
10
|
-
- 2.
|
11
|
-
- 2.
|
9
|
+
- 2.1.7
|
10
|
+
- 2.2.5
|
11
|
+
- 2.3.1
|
12
12
|
- rbx-2
|
13
|
-
- jruby-
|
13
|
+
- jruby-9.0.5.0
|
14
14
|
- jruby-head
|
15
15
|
- ruby-head
|
16
16
|
env:
|
17
17
|
global:
|
18
|
-
- CODECLIMATE_REPO_TOKEN=TODO
|
19
18
|
- JRUBY_OPTS='--dev -J-Xmx1024M'
|
20
19
|
matrix:
|
21
20
|
allow_failures:
|
data/CHANGELOG.md
CHANGED
data/Gemfile
CHANGED
data/README.md
CHANGED
@@ -4,7 +4,7 @@
|
|
4
4
|
[codeclimate]: https://codeclimate.com/github/rom-rb/rom-model
|
5
5
|
[inchpages]: http://inch-ci.org/github/rom-rb/rom-model
|
6
6
|
|
7
|
-
#
|
7
|
+
# rom-model
|
8
8
|
|
9
9
|
[![Gem Version](https://badge.fury.io/rb/rom-model.svg)][gem]
|
10
10
|
[![Build Status](https://travis-ci.org/rom-rb/rom-model.svg?branch=master)][travis]
|
@@ -22,27 +22,9 @@ The package includes:
|
|
22
22
|
- `ROM::Validator` a standalone validator object extension built on top of
|
23
23
|
`ActiveModel::Validations` with additional features like nested validators
|
24
24
|
|
25
|
-
##
|
25
|
+
## Future Plans
|
26
26
|
|
27
|
-
|
28
|
-
and good-enough. Unfortunately neither Virtus nor ActiveModel do not meet certain
|
29
|
-
design requirements to be a good fit in the long term.
|
30
|
-
|
31
|
-
For that reason we're exploring how to build a better foundation for rom-model.
|
32
|
-
Specifically following initiatives are taking place:
|
33
|
-
|
34
|
-
- Exploring a lower-level validation library with great composability features
|
35
|
-
and simple interface
|
36
|
-
- Investigating a lower-level input data sanitization/coercion library that would
|
37
|
-
be a perfect fit for handling web forms and json input
|
38
|
-
|
39
|
-
Furthermore rom-model will be soon extended with a third extension for defining
|
40
|
-
[Algebraic Data Types](https://en.wikipedia.org/wiki/Algebraic_data_type) which
|
41
|
-
will work remarkably well with [rom-repository](https://github.com/rom-rb/rom-repository)
|
42
|
-
and its auto-mapping features.
|
43
|
-
|
44
|
-
This project will provide convenient interfaces on top of robust lower-level tools
|
45
|
-
and if it turns out to be too big we'll split it into smaller gems.
|
27
|
+
It is very likely this gem will be deprecated. For now please consider using [dry-validation](https://github.com/dry-rb/dry-validation) along with [dry-types](https://github.com/dry-rb/dry-types) instead of rom-model. We may integrate rom-model with these libs to provide persistence-related features for dry-validation, or just abandon rom-model completely. Time will tell.
|
46
28
|
|
47
29
|
## Installation
|
48
30
|
|
data/lib/rom/model/version.rb
CHANGED
data/rom-model.gemspec
CHANGED
@@ -18,7 +18,7 @@ Gem::Specification.new do |spec|
|
|
18
18
|
spec.require_paths = ["lib"]
|
19
19
|
|
20
20
|
spec.add_runtime_dependency 'dry-equalizer', '~> 0.2'
|
21
|
-
spec.add_runtime_dependency 'rom-support', '~>
|
21
|
+
spec.add_runtime_dependency 'rom-support', '~> 2.0'
|
22
22
|
spec.add_runtime_dependency 'charlatan', '~> 0.1'
|
23
23
|
spec.add_runtime_dependency 'virtus', '~> 1.0', '>= 1.0.5'
|
24
24
|
spec.add_runtime_dependency 'activemodel', '>= 3.0', '< 5.0'
|
data/spec/shared/database.rb
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
shared_context 'database' do
|
2
2
|
let(:rom) { ROM.env = ROM.container(configuration) }
|
3
|
-
let(:configuration) { ROM::Configuration.new(:sql, DB_URI)
|
3
|
+
let(:configuration) { ROM::Configuration.new(:sql, DB_URI) }
|
4
4
|
let(:uri) { DB_URI }
|
5
5
|
let(:conn) { Sequel.connect(uri) }
|
6
6
|
|
data/spec/spec_helper.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rom-model
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.3.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Piotr Solnica
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-
|
11
|
+
date: 2016-07-27 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: dry-equalizer
|
@@ -30,14 +30,14 @@ dependencies:
|
|
30
30
|
requirements:
|
31
31
|
- - "~>"
|
32
32
|
- !ruby/object:Gem::Version
|
33
|
-
version:
|
33
|
+
version: '2.0'
|
34
34
|
type: :runtime
|
35
35
|
prerelease: false
|
36
36
|
version_requirements: !ruby/object:Gem::Requirement
|
37
37
|
requirements:
|
38
38
|
- - "~>"
|
39
39
|
- !ruby/object:Gem::Version
|
40
|
-
version:
|
40
|
+
version: '2.0'
|
41
41
|
- !ruby/object:Gem::Dependency
|
42
42
|
name: charlatan
|
43
43
|
requirement: !ruby/object:Gem::Requirement
|
@@ -210,3 +210,4 @@ test_files:
|
|
210
210
|
- spec/unit/attributes_spec.rb
|
211
211
|
- spec/unit/validator/embedded_spec.rb
|
212
212
|
- spec/unit/validator_spec.rb
|
213
|
+
has_rdoc:
|