hanami-model 1.3.0 → 1.3.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +5 -0
- data/hanami-model.gemspec +1 -1
- data/lib/hanami/model/entity_name.rb +1 -1
- data/lib/hanami/model/migrator/adapter.rb +1 -1
- data/lib/hanami/model/migrator/postgres_adapter.rb +1 -3
- data/lib/hanami/model/sql/types.rb +20 -22
- data/lib/hanami/model/version.rb +1 -1
- metadata +11 -6
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: df13a7841413591c746b96e4aba4fa83c2dce2b6d2559df65248e3a8b6e40718
|
4
|
+
data.tar.gz: 31ae64e82689ba9fc81ee568381170b80052168773c371d68dbbe971862d1af0
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 6c5cdfd5522e7a01904c7602a08cd85fa267eb34c96e921d93b75f999ed2fab858223ed96f887e1e955a101a49ec5615aad2f2948ed3b959d2ada344c434fe58
|
7
|
+
data.tar.gz: f64f1f9405fd5cb3fe86b50dd052399ae1a317be83039a7caadb57105239587ee917e46a8f4c173ac039abccaff10963bb8c1b020d1b451f6fa39f99801a010b
|
data/CHANGELOG.md
CHANGED
data/hanami-model.gemspec
CHANGED
@@ -25,7 +25,7 @@ Gem::Specification.new do |spec|
|
|
25
25
|
spec.add_runtime_dependency 'dry-types', '~> 0.11.0'
|
26
26
|
spec.add_runtime_dependency 'concurrent-ruby', '~> 1.0'
|
27
27
|
|
28
|
-
spec.add_development_dependency 'bundler'
|
28
|
+
spec.add_development_dependency 'bundler', '>= 1.6', '< 3'
|
29
29
|
spec.add_development_dependency 'rake', '~> 12'
|
30
30
|
spec.add_development_dependency 'rspec', '~> 3.7'
|
31
31
|
end
|
@@ -96,9 +96,7 @@ module Hanami
|
|
96
96
|
|
97
97
|
begin
|
98
98
|
Open3.popen3(command, database) do |_stdin, _stdout, stderr, wait_thr|
|
99
|
-
unless wait_thr.value.success? # wait_thr.value is the exit status
|
100
|
-
raise MigrationError.new(modified_message(stderr.read))
|
101
|
-
end
|
99
|
+
raise MigrationError.new(modified_message(stderr.read)) unless wait_thr.value.success? # wait_thr.value is the exit status
|
102
100
|
end
|
103
101
|
rescue SystemCallError => e
|
104
102
|
raise MigrationError.new(modified_message(e.message))
|
@@ -36,26 +36,26 @@ module Hanami
|
|
36
36
|
# @since 0.7.0
|
37
37
|
# @api private
|
38
38
|
MAPPING = {
|
39
|
-
Types::String.pristine
|
40
|
-
Types::Int.pristine
|
41
|
-
Types::Float.pristine
|
42
|
-
Types::Decimal.pristine
|
43
|
-
Types::Bool.pristine
|
44
|
-
Types::Date.pristine
|
45
|
-
Types::DateTime.pristine
|
46
|
-
Types::Time.pristine
|
47
|
-
Types::Array.pristine
|
48
|
-
Types::Hash.pristine
|
49
|
-
Types::String.optional.pristine
|
50
|
-
Types::Int.optional.pristine
|
51
|
-
Types::Float.optional.pristine
|
52
|
-
Types::Decimal.optional.pristine
|
53
|
-
Types::Bool.optional.pristine
|
54
|
-
Types::Date.optional.pristine
|
39
|
+
Types::String.pristine => Schema::String,
|
40
|
+
Types::Int.pristine => Schema::Int,
|
41
|
+
Types::Float.pristine => Schema::Float,
|
42
|
+
Types::Decimal.pristine => Schema::Decimal,
|
43
|
+
Types::Bool.pristine => Schema::Bool,
|
44
|
+
Types::Date.pristine => Schema::Date,
|
45
|
+
Types::DateTime.pristine => Schema::DateTime,
|
46
|
+
Types::Time.pristine => Schema::Time,
|
47
|
+
Types::Array.pristine => Schema::Array,
|
48
|
+
Types::Hash.pristine => Schema::Hash,
|
49
|
+
Types::String.optional.pristine => Schema::String,
|
50
|
+
Types::Int.optional.pristine => Schema::Int,
|
51
|
+
Types::Float.optional.pristine => Schema::Float,
|
52
|
+
Types::Decimal.optional.pristine => Schema::Decimal,
|
53
|
+
Types::Bool.optional.pristine => Schema::Bool,
|
54
|
+
Types::Date.optional.pristine => Schema::Date,
|
55
55
|
Types::DateTime.optional.pristine => Schema::DateTime,
|
56
|
-
Types::Time.optional.pristine
|
57
|
-
Types::Array.optional.pristine
|
58
|
-
Types::Hash.optional.pristine
|
56
|
+
Types::Time.optional.pristine => Schema::Time,
|
57
|
+
Types::Array.optional.pristine => Schema::Array,
|
58
|
+
Types::Hash.optional.pristine => Schema::Hash
|
59
59
|
}.freeze
|
60
60
|
|
61
61
|
# Convert given type into coercible
|
@@ -86,9 +86,7 @@ module Hanami
|
|
86
86
|
# @api private
|
87
87
|
def self.pg_json_pristines
|
88
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
|
89
|
+
hash[type] = (ROM::SQL::Types::PG.const_get(type).pristine if defined?(ROM::SQL::Types::PG))
|
92
90
|
end
|
93
91
|
end
|
94
92
|
|
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.3.
|
4
|
+
version: 1.3.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Luca Guidi
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2019-01-18 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: hanami-utils
|
@@ -112,14 +112,20 @@ dependencies:
|
|
112
112
|
requirements:
|
113
113
|
- - ">="
|
114
114
|
- !ruby/object:Gem::Version
|
115
|
-
version: '
|
115
|
+
version: '1.6'
|
116
|
+
- - "<"
|
117
|
+
- !ruby/object:Gem::Version
|
118
|
+
version: '3'
|
116
119
|
type: :development
|
117
120
|
prerelease: false
|
118
121
|
version_requirements: !ruby/object:Gem::Requirement
|
119
122
|
requirements:
|
120
123
|
- - ">="
|
121
124
|
- !ruby/object:Gem::Version
|
122
|
-
version: '
|
125
|
+
version: '1.6'
|
126
|
+
- - "<"
|
127
|
+
- !ruby/object:Gem::Version
|
128
|
+
version: '3'
|
123
129
|
- !ruby/object:Gem::Dependency
|
124
130
|
name: rake
|
125
131
|
requirement: !ruby/object:Gem::Requirement
|
@@ -219,8 +225,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
219
225
|
- !ruby/object:Gem::Version
|
220
226
|
version: '0'
|
221
227
|
requirements: []
|
222
|
-
|
223
|
-
rubygems_version: 2.7.7
|
228
|
+
rubygems_version: 3.0.2
|
224
229
|
signing_key:
|
225
230
|
specification_version: 4
|
226
231
|
summary: A persistence layer for Hanami
|