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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 66e131f81b427ef058c0c7e487f7807c7e1f5623c3ba45a51cfa3c9914c622ba
4
- data.tar.gz: 45c80ccdafaa47c93523f85661e5f05890c7a6c42922c7a64e0bdb55a04fe295
3
+ metadata.gz: df13a7841413591c746b96e4aba4fa83c2dce2b6d2559df65248e3a8b6e40718
4
+ data.tar.gz: 31ae64e82689ba9fc81ee568381170b80052168773c371d68dbbe971862d1af0
5
5
  SHA512:
6
- metadata.gz: 54f2d6be0c05f58cad0cf956a9c046c7ce98e913864b954986e266e333bf378334b5d0ee8cf5201d020f665ba0994d8fbecbd79560d12088baa5c41421b4b25b
7
- data.tar.gz: 0e17665af522a897160097cc42ba0a65ecdeffffbd0e433ac3d6a01b1e74a9a8e236b94f42d853b04955b355c79f8dfcbf85ceea2480d0568b76535c2a231110
6
+ metadata.gz: 6c5cdfd5522e7a01904c7602a08cd85fa267eb34c96e921d93b75f999ed2fab858223ed96f887e1e955a101a49ec5615aad2f2948ed3b959d2ada344c434fe58
7
+ data.tar.gz: f64f1f9405fd5cb3fe86b50dd052399ae1a317be83039a7caadb57105239587ee917e46a8f4c173ac039abccaff10963bb8c1b020d1b451f6fa39f99801a010b
@@ -1,6 +1,11 @@
1
1
  # Hanami::Model
2
2
  A persistence layer for Hanami
3
3
 
4
+ ## v1.3.1 - 2019-01-18
5
+ ### Added
6
+ - [Luca Guidi] Official support for Ruby: MRI 2.6
7
+ - [Luca Guidi] Support `bundler` 2.0+
8
+
4
9
  ## v1.3.0 - 2018-10-24
5
10
 
6
11
  ## v1.3.0.beta1 - 2018-08-08
@@ -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
@@ -10,7 +10,7 @@ module Hanami
10
10
  class EntityName
11
11
  # @since 0.7.0
12
12
  # @api private
13
- SUFFIX = /Repository\z/
13
+ SUFFIX = /Repository\z/.freeze
14
14
 
15
15
  # @param name [Class,String] the class or its name
16
16
  # @return [String] the entity name
@@ -124,7 +124,7 @@ module Hanami
124
124
 
125
125
  # @since 1.1.0
126
126
  # @api private
127
- MIGRATIONS_FILE_NAME_PATTERN = /\A[\d]{14}/
127
+ MIGRATIONS_FILE_NAME_PATTERN = /\A[\d]{14}/.freeze
128
128
 
129
129
  # @since 1.1.0
130
130
  # @api private
@@ -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 => 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,
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 => Schema::Time,
57
- Types::Array.optional.pristine => Schema::Array,
58
- Types::Hash.optional.pristine => Schema::Hash
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
 
@@ -3,6 +3,6 @@ module Hanami
3
3
  # Defines the version
4
4
  #
5
5
  # @since 0.1.0
6
- VERSION = '1.3.0'.freeze
6
+ VERSION = '1.3.1'.freeze
7
7
  end
8
8
  end
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.0
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: 2018-10-24 00:00:00.000000000 Z
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: '0'
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: '0'
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
- rubyforge_project:
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