hanami-model 1.0.0.rc1 → 1.0.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: c5b51f9cfc66b92f4b8936a5015b9daf4d056be0
4
- data.tar.gz: 834180b5dd78fe9ff14139d3f7e3657f327fa806
3
+ metadata.gz: 70775a4002119bba8febe56e6a61619320d1a832
4
+ data.tar.gz: d1890cf53c762541f9821eaa4fe7d8ef50aac0dc
5
5
  SHA512:
6
- metadata.gz: 186b4a809fb873d51bd8a308b722a1e24a37f031f1b07caeaa1c877930339c48857527b5ca503d6d77348c2fe0ba697a74d0a6317213f694c7c2bea1b274f6a7
7
- data.tar.gz: c4f5245997c82f21608fdfe046ecb6eb703bd11bef7e1c8ebe7e28f5385c36fb5ebfa34b0cd2e8643c64a3dc1b573770da7b1a66e41424d98ef637fe37e83b64
6
+ metadata.gz: c49a0c0249cb4e9083bdf0874d654e7cface01ede618be1cecb15a646abb34edab19b4597cdc5532dcf6657a0ec9b9dafba24559d9268dcd3558cb61204211cd
7
+ data.tar.gz: 661788bbaf06b16872f40c25091c68aa0e67137265df3ba807f458b9118cfe0487890d4f3f268d909920ac10f1e337ec8a37fab496994ea04f220cabcc89654f
data/CHANGELOG.md CHANGED
@@ -1,6 +1,8 @@
1
1
  # Hanami::Model
2
2
  A persistence layer for Hanami
3
3
 
4
+ ## v1.0.0 - 2017-04-06
5
+
4
6
  ## v1.0.0.rc1 - 2017-03-31
5
7
 
6
8
  ## v1.0.0.beta3 - 2017-03-17
data/hanami-model.gemspec CHANGED
@@ -20,9 +20,9 @@ Gem::Specification.new do |spec|
20
20
  spec.require_paths = ['lib']
21
21
  spec.required_ruby_version = '>= 2.3.0'
22
22
 
23
- spec.add_runtime_dependency 'hanami-utils', '~> 1.0.0.rc1'
24
- spec.add_runtime_dependency 'rom-sql', '~> 1.1'
25
- spec.add_runtime_dependency 'rom-repository', '~> 1.2'
23
+ spec.add_runtime_dependency 'hanami-utils', '~> 1.0'
24
+ spec.add_runtime_dependency 'rom-sql', '~> 1.2'
25
+ spec.add_runtime_dependency 'rom-repository', '~> 1.3'
26
26
  spec.add_runtime_dependency 'dry-types', '~> 0.9'
27
27
  spec.add_runtime_dependency 'concurrent-ruby', '~> 1.0'
28
28
 
@@ -17,11 +17,11 @@ module Hanami
17
17
  # @api private
18
18
  attr_reader :entities
19
19
 
20
- # @since 1.0.0.beta1
20
+ # @since 1.0.0
21
21
  # @api private
22
22
  attr_reader :logger
23
23
 
24
- # @since 1.0.0.beta1
24
+ # @since 1.0.0
25
25
  # @api private
26
26
  attr_reader :migrations_logger
27
27
 
@@ -109,26 +109,26 @@ module Hanami
109
109
  end
110
110
  end
111
111
 
112
- # @since 1.0.0.beta1
112
+ # @since 1.0.0
113
113
  # @api private
114
114
  def configure_gateway
115
115
  @gateway_config.call(gateway) unless @gateway_config.nil?
116
116
  end
117
117
 
118
- # @since 1.0.0.beta1
118
+ # @since 1.0.0
119
119
  # @api private
120
120
  def logger=(value)
121
121
  return if value.nil?
122
122
  gateway.use_logger(@logger = value)
123
123
  end
124
124
 
125
- # @since 1.0.0.beta1
125
+ # @since 1.0.0
126
126
  # @api private
127
127
  def rom
128
128
  @rom ||= ROM::Configuration.new(@backend, @url, infer_relations: false)
129
129
  end
130
130
 
131
- # @since 1.0.0.beta1
131
+ # @since 1.0.0
132
132
  # @api private
133
133
  def load!(repositories, &blk) # rubocop:disable Metrics/AbcSize
134
134
  rom.setup.auto_registration(config.directory.to_s) unless config.directory.nil?
@@ -144,7 +144,7 @@ module Hanami
144
144
  raise Hanami::Model::Error.for(e)
145
145
  end
146
146
 
147
- # @since 1.0.0.beta1
147
+ # @since 1.0.0
148
148
  # @api private
149
149
  def method_missing(method_name, *args, &blk)
150
150
  if rom.respond_to?(method_name)
@@ -25,11 +25,11 @@ module Hanami
25
25
  # @api private
26
26
  attr_reader :_schema
27
27
 
28
- # @since 1.0.0.beta1
28
+ # @since 1.0.0
29
29
  # @api private
30
30
  attr_reader :_logger
31
31
 
32
- # @since 1.0.0.beta1
32
+ # @since 1.0.0
33
33
  # @api private
34
34
  attr_reader :_gateway
35
35
 
@@ -39,7 +39,7 @@ module Hanami
39
39
  new.tap { |config| config.instance_eval(&block) }
40
40
  end
41
41
 
42
- # @since 1.0.0.beta1
42
+ # @since 1.0.0
43
43
  # @api private
44
44
  def migrations_logger(stream = $stdout)
45
45
  require 'hanami/model/migrator/logger'
@@ -73,7 +73,7 @@ module Hanami
73
73
  @_schema = path
74
74
  end
75
75
 
76
- # @since 1.0.0.beta1
76
+ # @since 1.0.0
77
77
  # @api private
78
78
  def logger(stream, options = {})
79
79
  require 'hanami/logger'
@@ -82,7 +82,7 @@ module Hanami
82
82
  @_logger = Hanami::Logger.new('hanami.model', opts)
83
83
  end
84
84
 
85
- # @since 1.0.0.beta1
85
+ # @since 1.0.0
86
86
  # @api private
87
87
  def gateway(&blk)
88
88
  @_gateway = blk
@@ -103,13 +103,13 @@ module Hanami
103
103
 
104
104
  # Unknown database type error for repository auto-mapping
105
105
  #
106
- # @since 1.0.0.beta1
106
+ # @since 1.0.0
107
107
  class UnknownDatabaseTypeError < Error
108
108
  end
109
109
 
110
110
  # Unknown primary key error
111
111
  #
112
- # @since 1.0.0.beta1
112
+ # @since 1.0.0
113
113
  class MissingPrimaryKeyError < Error
114
114
  end
115
115
  end
@@ -4,7 +4,7 @@ module Hanami
4
4
  #
5
5
  # It eliminates the need of use #as for repository queries
6
6
  #
7
- # @since 1.0.0.beta1
7
+ # @since 1.0.0
8
8
  # @api private
9
9
  class MappedRelation < SimpleDelegator
10
10
  # Mapper name.
@@ -13,17 +13,17 @@ module Hanami
13
13
  # reference for it. Example: <tt>BookRepository</tt> references <tt>Book</tt>
14
14
  # as <tt>:entity</tt>.
15
15
  #
16
- # @since 1.0.0.beta1
16
+ # @since 1.0.0
17
17
  # @api private
18
18
  MAPPER_NAME = :entity
19
19
 
20
- # @since 1.0.0.beta1
20
+ # @since 1.0.0
21
21
  # @api private
22
22
  def self.mapper_name
23
23
  MAPPER_NAME
24
24
  end
25
25
 
26
- # @since 1.0.0.beta1
26
+ # @since 1.0.0
27
27
  # @api private
28
28
  def initialize(relation)
29
29
  super(relation.as(self.class.mapper_name))
@@ -143,7 +143,7 @@ module Hanami
143
143
 
144
144
  private
145
145
 
146
- # @since 1.0.0.beta1
146
+ # @since 1.0.0
147
147
  # @api private
148
148
  attr_reader :configuration
149
149
 
@@ -5,24 +5,24 @@ module Hanami
5
5
  class Migrator
6
6
  # Automatic logger for migrations
7
7
  #
8
- # @since 1.0.0.beta1
8
+ # @since 1.0.0
9
9
  # @api private
10
10
  class Logger < Hanami::Logger
11
11
  # Formatter for migrations logger
12
12
  #
13
- # @since 1.0.0.beta1
13
+ # @since 1.0.0
14
14
  # @api private
15
15
  class Formatter < Hanami::Logger::Formatter
16
16
  private
17
17
 
18
- # @since 1.0.0.beta1
18
+ # @since 1.0.0
19
19
  # @api private
20
20
  def _format(hash)
21
21
  "[hanami] [#{hash.fetch(:severity)}] #{hash.fetch(:message)}\n"
22
22
  end
23
23
  end
24
24
 
25
- # @since 1.0.0.beta1
25
+ # @since 1.0.0
26
26
  # @api private
27
27
  def initialize(stream)
28
28
  super(nil, stream: stream, formatter: Formatter.new)
@@ -10,7 +10,7 @@ module Hanami
10
10
  # @api private
11
11
  PASSWORD = 'MYSQL_PWD'.freeze
12
12
 
13
- # @since 1.0.0.beta1
13
+ # @since 1.0.0
14
14
  # @api private
15
15
  DB_CREATION_ERROR = 'Database creation failed. If the database exists, ' \
16
16
  'then its console may be open. See this issue for more details: ' \
@@ -22,7 +22,7 @@ module Hanami
22
22
  # @api private
23
23
  PASSWORD = 'PGPASSWORD'.freeze
24
24
 
25
- # @since 1.0.0.beta1
25
+ # @since 1.0.0
26
26
  # @api private
27
27
  DB_CREATION_ERROR = 'createdb: database creation failed. If the database exists, ' \
28
28
  'then its console may be open. See this issue for more details: ' \
@@ -3,6 +3,6 @@ module Hanami
3
3
  # Defines the version
4
4
  #
5
5
  # @since 0.1.0
6
- VERSION = '1.0.0.rc1'.freeze
6
+ VERSION = '1.0.0'.freeze
7
7
  end
8
8
  end
@@ -226,7 +226,7 @@ module Hanami
226
226
  #
227
227
  # NOTE: This should be used **only** when Hanami can't find a corresponding Ruby type for your column.
228
228
  #
229
- # @since 1.0.0.beta1
229
+ # @since 1.0.0
230
230
  #
231
231
  # @example
232
232
  # # In this example `name` is a PostgreSQL Enum type that we want to treat like a string.
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.0.rc1
4
+ version: 1.0.0
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-03-31 00:00:00.000000000 Z
11
+ date: 2017-04-06 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: hanami-utils
@@ -16,42 +16,42 @@ dependencies:
16
16
  requirements:
17
17
  - - "~>"
18
18
  - !ruby/object:Gem::Version
19
- version: 1.0.0.rc1
19
+ version: '1.0'
20
20
  type: :runtime
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
24
  - - "~>"
25
25
  - !ruby/object:Gem::Version
26
- version: 1.0.0.rc1
26
+ version: '1.0'
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: rom-sql
29
29
  requirement: !ruby/object:Gem::Requirement
30
30
  requirements:
31
31
  - - "~>"
32
32
  - !ruby/object:Gem::Version
33
- version: '1.1'
33
+ version: '1.2'
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.1'
40
+ version: '1.2'
41
41
  - !ruby/object:Gem::Dependency
42
42
  name: rom-repository
43
43
  requirement: !ruby/object:Gem::Requirement
44
44
  requirements:
45
45
  - - "~>"
46
46
  - !ruby/object:Gem::Version
47
- version: '1.2'
47
+ version: '1.3'
48
48
  type: :runtime
49
49
  prerelease: false
50
50
  version_requirements: !ruby/object:Gem::Requirement
51
51
  requirements:
52
52
  - - "~>"
53
53
  - !ruby/object:Gem::Version
54
- version: '1.2'
54
+ version: '1.3'
55
55
  - !ruby/object:Gem::Dependency
56
56
  name: dry-types
57
57
  requirement: !ruby/object:Gem::Requirement
@@ -187,9 +187,9 @@ required_ruby_version: !ruby/object:Gem::Requirement
187
187
  version: 2.3.0
188
188
  required_rubygems_version: !ruby/object:Gem::Requirement
189
189
  requirements:
190
- - - ">"
190
+ - - ">="
191
191
  - !ruby/object:Gem::Version
192
- version: 1.3.1
192
+ version: '0'
193
193
  requirements: []
194
194
  rubyforge_project:
195
195
  rubygems_version: 2.6.11