hanami-model 1.0.3 → 1.0.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +6 -0
- data/hanami-model.gemspec +2 -1
- data/lib/hanami/model/plugins/mapping.rb +1 -1
- data/lib/hanami/model/plugins/timestamps.rb +1 -1
- data/lib/hanami/model/sql/types.rb +12 -2
- data/lib/hanami/model/version.rb +1 -1
- metadata +28 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 4a4972da9eec643eb9b1ff52fe1d2f6a626aba4b
|
4
|
+
data.tar.gz: 8dc59827cda2726dd50fb02c0ef3cc3488943613
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 1418bf7590d149a90abbd463e728f5a20ab3417fddbfe4fc8a46f61205700224de6fa2a0c685a102575727a6fca821067dd3b739c93fba8d9886f71afa6de8f2
|
7
|
+
data.tar.gz: 2de56a5ddd4f1705b553a953ac47c1fe862217e553fb9a2158492f426f234ac6959895403517343d4558fd8c220c57dc8a58106e56e0502278919f57c76aaada
|
data/CHANGELOG.md
CHANGED
@@ -1,6 +1,12 @@
|
|
1
1
|
# Hanami::Model
|
2
2
|
A persistence layer for Hanami
|
3
3
|
|
4
|
+
## v1.0.4 - 2017-10-14
|
5
|
+
### Fixed
|
6
|
+
- [Nikita Shilnikov] Keep the dependency on `dry-sql` at `~> 1.3`, which is compatible with `dry-types` `~> 0.11.0`
|
7
|
+
- [Nikita Shilnikov] Ensure to write Postgres JSON (`PGJSON`) type for nested associated records
|
8
|
+
- [Nikita Shilnikov] Ensure `Repository#select` to work with `Hanami::Model::MappedRelation`
|
9
|
+
|
4
10
|
## v1.0.3 - 2017-10-11
|
5
11
|
### Fixed
|
6
12
|
- [Luca Guidi] Keep the dependency on `dry-types` at `~> 0.11.0`
|
data/hanami-model.gemspec
CHANGED
@@ -21,7 +21,8 @@ Gem::Specification.new do |spec|
|
|
21
21
|
spec.required_ruby_version = '>= 2.3.0'
|
22
22
|
|
23
23
|
spec.add_runtime_dependency 'hanami-utils', '~> 1.0'
|
24
|
-
spec.add_runtime_dependency 'rom
|
24
|
+
spec.add_runtime_dependency 'rom', '~> 3.3', '>= 3.3.2'
|
25
|
+
spec.add_runtime_dependency 'rom-sql', '~> 1.3', '>= 1.3.5'
|
25
26
|
spec.add_runtime_dependency 'rom-repository', '~> 1.4'
|
26
27
|
spec.add_runtime_dependency 'dry-types', '~> 0.11.0'
|
27
28
|
spec.add_runtime_dependency 'concurrent-ruby', '~> 1.0'
|
@@ -82,11 +82,21 @@ module Hanami
|
|
82
82
|
end
|
83
83
|
end
|
84
84
|
|
85
|
+
# @since 1.0.4
|
86
|
+
# @api private
|
87
|
+
def self.pg_json_pristines
|
88
|
+
@pg_json_pristines ||= ::Hash.new do |hash, type|
|
89
|
+
hash[type] = if defined?(ROM::SQL::Types::PG)
|
90
|
+
ROM::SQL::Types::PG.const_get(type).pristine
|
91
|
+
end
|
92
|
+
end
|
93
|
+
end
|
94
|
+
|
85
95
|
# @since 1.0.2
|
86
96
|
# @api private
|
87
97
|
def self.pg_json?(pristine)
|
88
|
-
|
89
|
-
|
98
|
+
pristine == pg_json_pristines['JSONB'.freeze] ||
|
99
|
+
pristine == pg_json_pristines['JSON'.freeze]
|
90
100
|
end
|
91
101
|
|
92
102
|
private_class_method :pg_json?
|
data/lib/hanami/model/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: hanami-model
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.
|
4
|
+
version: 1.0.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Luca Guidi
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2017-10-
|
11
|
+
date: 2017-10-14 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: hanami-utils
|
@@ -24,6 +24,26 @@ dependencies:
|
|
24
24
|
- - "~>"
|
25
25
|
- !ruby/object:Gem::Version
|
26
26
|
version: '1.0'
|
27
|
+
- !ruby/object:Gem::Dependency
|
28
|
+
name: rom
|
29
|
+
requirement: !ruby/object:Gem::Requirement
|
30
|
+
requirements:
|
31
|
+
- - "~>"
|
32
|
+
- !ruby/object:Gem::Version
|
33
|
+
version: '3.3'
|
34
|
+
- - ">="
|
35
|
+
- !ruby/object:Gem::Version
|
36
|
+
version: 3.3.2
|
37
|
+
type: :runtime
|
38
|
+
prerelease: false
|
39
|
+
version_requirements: !ruby/object:Gem::Requirement
|
40
|
+
requirements:
|
41
|
+
- - "~>"
|
42
|
+
- !ruby/object:Gem::Version
|
43
|
+
version: '3.3'
|
44
|
+
- - ">="
|
45
|
+
- !ruby/object:Gem::Version
|
46
|
+
version: 3.3.2
|
27
47
|
- !ruby/object:Gem::Dependency
|
28
48
|
name: rom-sql
|
29
49
|
requirement: !ruby/object:Gem::Requirement
|
@@ -31,6 +51,9 @@ dependencies:
|
|
31
51
|
- - "~>"
|
32
52
|
- !ruby/object:Gem::Version
|
33
53
|
version: '1.3'
|
54
|
+
- - ">="
|
55
|
+
- !ruby/object:Gem::Version
|
56
|
+
version: 1.3.5
|
34
57
|
type: :runtime
|
35
58
|
prerelease: false
|
36
59
|
version_requirements: !ruby/object:Gem::Requirement
|
@@ -38,6 +61,9 @@ dependencies:
|
|
38
61
|
- - "~>"
|
39
62
|
- !ruby/object:Gem::Version
|
40
63
|
version: '1.3'
|
64
|
+
- - ">="
|
65
|
+
- !ruby/object:Gem::Version
|
66
|
+
version: 1.3.5
|
41
67
|
- !ruby/object:Gem::Dependency
|
42
68
|
name: rom-repository
|
43
69
|
requirement: !ruby/object:Gem::Requirement
|