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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: d6eb622b91903507519f6688aa5c8653c5005c13
4
- data.tar.gz: 79afc9beeb30025148730c14840e749d8fa521cc
3
+ metadata.gz: efc994a8fec207a476eb5d6ec12a4c1dea7fc225
4
+ data.tar.gz: f33cea9bd176bb20a64cdae577563f3984dcf78a
5
5
  SHA512:
6
- metadata.gz: 0d43e9b140f20957ba2e72b503c308fb007ad1b2209acad106a2ac76170b94b915ca1be8ac721a4aa3ec5084bfbfa15c050f22080a38063bd2aac17a90f381bf
7
- data.tar.gz: 8de7cc51e9e2064fc99fce59b6cef4d55b627e4704458737dbe75de78e19b9c1f915519a8267156c660443edb20fc98c8f0d150e5c458fb1e825ff8aefe0f403
6
+ metadata.gz: 16f971241f291b4d6e8c193db2268382d72df8f406b14da13b7321ecfb57993204bab5cbc4d4b8c7557d7e6ca806913e33ee2607909c7720b8c49a89ab21a313
7
+ data.tar.gz: f1edb7c0c0d2f2acf172a8dd1c5ab1942dede05c5cef583dcf576125f3393a44a5f0dd338f43ca68851188a501dabada64c89666b09341c33815ea5c957d66ae
@@ -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.0
10
- - 2.1
11
- - 2.2
9
+ - 2.1.7
10
+ - 2.2.5
11
+ - 2.3.1
12
12
  - rbx-2
13
- - jruby-9000
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:
@@ -1,3 +1,11 @@
1
+ # 0.3.0 2016-07-27
2
+
3
+ ## Changed
4
+
5
+ * Updated to work with rom 2.0
6
+
7
+ [Compare v0.2.0...v0.3.0](https://github.com/rom-rb/rom-model/compare/v0.2.0...v0.3.0)
8
+
1
9
  # 0.2.0 2016-01-06
2
10
 
3
11
  ## Added
data/Gemfile CHANGED
@@ -4,7 +4,7 @@ gemspec
4
4
 
5
5
  group :test do
6
6
  gem 'rspec'
7
- gem 'rom-sql'
7
+ gem 'rom-sql', '~> 0.8'
8
8
  gem 'pg', platforms: [:mri, :rbx]
9
9
  gem 'pg_jruby', platforms: :jruby
10
10
  gem 'codeclimate-test-reporter', require: nil, platform: :rbx
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
- # ROM::Model
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
- ## The Plan™
25
+ ## Future Plans
26
26
 
27
- This gem is built on top of existing 3rd party gems that have proven to be stable
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
 
@@ -1,5 +1,5 @@
1
1
  module ROM
2
2
  module Model
3
- VERSION = '0.2.0'.freeze
3
+ VERSION = '0.3.0'.freeze
4
4
  end
5
5
  end
@@ -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', '~> 1.0.0'
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'
@@ -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).use(:macros) }
3
+ let(:configuration) { ROM::Configuration.new(:sql, DB_URI) }
4
4
  let(:uri) { DB_URI }
5
5
  let(:conn) { Sequel.connect(uri) }
6
6
 
@@ -6,6 +6,16 @@ end
6
6
  require 'rom-model'
7
7
  require 'rom-sql'
8
8
 
9
+ module ROM
10
+ def self.env=(env)
11
+ @env = env
12
+ end
13
+
14
+ def self.env
15
+ @env
16
+ end
17
+ end
18
+
9
19
  begin
10
20
  require 'byebug'
11
21
  rescue LoadError
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.2.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-01-06 00:00:00.000000000 Z
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: 1.0.0
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: 1.0.0
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: