hanami-model 1.0.2 → 1.0.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: b42e3225f01dfdc11db772e01e9380930378b34b
4
- data.tar.gz: 61c681f2b8dacd1867ac9b929e84f2fc2d9da120
3
+ metadata.gz: 26938ba6252cbc720bdfd91be65cab1be7b9c97a
4
+ data.tar.gz: 4c040a5a05553bc96b4005ab6ff6548e061c42fe
5
5
  SHA512:
6
- metadata.gz: c7c31f943c0af575a6b1197c87d2ce0bcf1b1ccf3e42dab6869c85580e79f5f316c62d7c52093a8b96b4fb5ace02e237723fd3fa115398247e68c409871cb592
7
- data.tar.gz: f6b396a6f8e57b35d9a213f9d49c45610a3dc3825fc8233e83721af811bdf411b270e6d1ce8420d745d91d725ba3ca826ffa1b6dca02e4976c44de79dc74a6e8
6
+ metadata.gz: c72428d1c7605407265a7f9a8cd1262d324cc1a6c2aa9b3065de336db887807ac8073dd07d61600d166c40f6771be8617a4a41d4e7519b36dd315c5ba4897493
7
+ data.tar.gz: 30072c52994377e97ada94f7214f1ddc5ab941b46e56b8000d00d213209146df5b488cfbd662e9b36696084f0bc07e9c87ebbacd8cf8b0c65ce3ffb192a223b6
data/CHANGELOG.md CHANGED
@@ -1,6 +1,10 @@
1
1
  # Hanami::Model
2
2
  A persistence layer for Hanami
3
3
 
4
+ ## v1.0.3 - 2017-10-11
5
+ ### Fixed
6
+ - [Luca Guidi] Keep the dependency on `dry-types` at `~> 0.11.0`
7
+
4
8
  ## v1.0.2 - 2017-08-04
5
9
  ### Fixed
6
10
  - [Maurizio De Magnis] URI escape for Postgres password
data/hanami-model.gemspec CHANGED
@@ -23,7 +23,7 @@ Gem::Specification.new do |spec|
23
23
  spec.add_runtime_dependency 'hanami-utils', '~> 1.0'
24
24
  spec.add_runtime_dependency 'rom-sql', '~> 1.3'
25
25
  spec.add_runtime_dependency 'rom-repository', '~> 1.4'
26
- spec.add_runtime_dependency 'dry-types', '~> 0.11'
26
+ spec.add_runtime_dependency 'dry-types', '~> 0.11.0'
27
27
  spec.add_runtime_dependency 'concurrent-ruby', '~> 1.0'
28
28
 
29
29
  spec.add_development_dependency 'bundler', '~> 1.6'
data/lib/hanami/entity.rb CHANGED
@@ -33,7 +33,7 @@ module Hanami
33
33
  # end
34
34
  # end
35
35
  #
36
- # **Hanami::Model** ships `Hanami::Entity` for developers's convenience.
36
+ # **Hanami::Model** ships `Hanami::Entity` for developers' convenience.
37
37
  #
38
38
  # **Hanami::Model** depends on a narrow and well-defined interface for an
39
39
  # Entity - `#id`, `#id=`, `#initialize(attributes={})`.If your object
data/lib/hanami/model.rb CHANGED
@@ -82,7 +82,7 @@ module Hanami
82
82
 
83
83
  # Disconnect from the database
84
84
  #
85
- # This is useful for reboot applications in production and to ensure that
85
+ # This is useful for rebooting applications in production and to ensure that
86
86
  # the framework prunes stale connections.
87
87
  #
88
88
  # @since 1.0.0
@@ -2,7 +2,7 @@ module Hanami
2
2
  module Model
3
3
  # Mapped proxy for ROM relations.
4
4
  #
5
- # It eliminates the need of use #as for repository queries
5
+ # It eliminates the need to use #as for repository queries
6
6
  #
7
7
  # @since 1.0.0
8
8
  # @api private
@@ -116,7 +116,7 @@ module Hanami
116
116
  # # Reads all files from "db/migrations" and apply them
117
117
  # Hanami::Model::Migrator.migrate
118
118
  #
119
- # # Migrate to a specifiy version
119
+ # # Migrate to a specific version
120
120
  # Hanami::Model::Migrator.migrate(version: "20150610133853")
121
121
  #
122
122
  # NOTE: Class level interface SHOULD be removed in Hanami 2.0
@@ -189,7 +189,7 @@ module Hanami
189
189
  # migrations 'db/migrations'
190
190
  # end
191
191
  #
192
- # Hanami::Model::Migrator.prepare # => creates `foo' and run migrations
192
+ # Hanami::Model::Migrator.prepare # => creates `foo' and runs migrations
193
193
  #
194
194
  # @example Prepare Database (with schema dump)
195
195
  # require 'hanami/model'
@@ -123,10 +123,10 @@ module Hanami
123
123
  # Returns a database connection
124
124
  #
125
125
  # Given a DB connection URI we can connect to a specific database or not, we need this when creating
126
- # or droping a database. Important to notice that we can't always open a _global_ DB connection,
126
+ # or dropping a database. Important to notice that we can't always open a _global_ DB connection,
127
127
  # because most of the times application's DB user has no rights to do so.
128
128
  #
129
- # @param global [Boolean] determine whether or not a connection should specify an database.
129
+ # @param global [Boolean] determine whether or not a connection should specify a database.
130
130
  #
131
131
  # @since 0.5.0
132
132
  # @api private
@@ -110,7 +110,7 @@ module Hanami
110
110
  # end
111
111
  #
112
112
  # down do
113
- # drop_table :itmes
113
+ # drop_table :items
114
114
  # execute 'DROP TYPE inventory_item'
115
115
  # end
116
116
  # end
@@ -22,7 +22,7 @@ module Hanami
22
22
  # associations and potentially to mapping defined by the repository.
23
23
  #
24
24
  # @param registry [Hash] a registry that keeps reference between
25
- # entities klass and their underscored names
25
+ # entities class and their underscored names
26
26
  # @param relation [ROM::Relation] the database relation
27
27
  # @param mapping [Hanami::Model::Mapping] the optional repository
28
28
  # mapping
@@ -75,7 +75,7 @@ module Hanami
75
75
  # Build the schema
76
76
  #
77
77
  # @param registry [Hash] a registry that keeps reference between
78
- # entities klass and their underscored names
78
+ # entities class and their underscored names
79
79
  # @param relation [ROM::Relation] the database relation
80
80
  # @param mapping [Hanami::Model::Mapping] the optional repository
81
81
  # mapping
@@ -112,7 +112,7 @@ module Hanami
112
112
  # Merge attributes and associations
113
113
  #
114
114
  # @param registry [Hash] a registry that keeps reference between
115
- # entities klass and their underscored names
115
+ # entities class and their underscored names
116
116
  # @param associations [ROM::AssociationSet] a set of associations for
117
117
  # the current relation
118
118
  #
@@ -70,7 +70,7 @@ module Hanami
70
70
 
71
71
  # NOTE: In the future rom-sql should be able to always return Ruby
72
72
  # types instead of Sequel types. When that will happen we can get
73
- # rid of this logic in the block and to fallback to:
73
+ # rid of this logic in the block and fall back to:
74
74
  #
75
75
  # MAPPING.fetch(unwrapped.pristine, attribute)
76
76
  MAPPING.fetch(unwrapped.pristine) do
@@ -57,7 +57,7 @@ module Hanami
57
57
  # Check if value can be coerced
58
58
  #
59
59
  # It is true if value is an instance of `object` type or if value
60
- # respond to `#to_hash`.
60
+ # responds to `#to_hash`.
61
61
  #
62
62
  # @param value [Object] the value
63
63
  #
@@ -3,6 +3,6 @@ module Hanami
3
3
  # Defines the version
4
4
  #
5
5
  # @since 0.1.0
6
- VERSION = '1.0.2'.freeze
6
+ VERSION = '1.0.3'.freeze
7
7
  end
8
8
  end
@@ -54,7 +54,7 @@ module Hanami
54
54
  #
55
55
  # All the queries and commands are private.
56
56
  # This decision forces developers to define intention revealing API, instead
57
- # leak storage API details outside of a repository.
57
+ # of leaking storage API details outside of a repository.
58
58
  #
59
59
  # @example
60
60
  # require 'hanami/model'
@@ -87,7 +87,7 @@ module Hanami
87
87
  # # * It expresses a clear intent.
88
88
  # #
89
89
  # # * The caller can be easily tested in isolation.
90
- # # It's just a matter of stub this method.
90
+ # # It's just a matter of stubbing this method.
91
91
  # #
92
92
  # # * If we change the storage, the callers aren't affected.
93
93
  #
@@ -167,7 +167,7 @@ module Hanami
167
167
  # rubocop:enable Metrics/AbcSize
168
168
  # rubocop:enable Metrics/MethodLength
169
169
 
170
- # Defines the ampping between a database table and an entity.
170
+ # Defines the mapping between a database table and an entity.
171
171
  #
172
172
  # It's also responsible to associate table columns to entity attributes.
173
173
  #
@@ -314,7 +314,7 @@ module Hanami
314
314
  module Commands
315
315
  # Create a new record
316
316
  #
317
- # @return [Hanami::Entity] an new created entity
317
+ # @return [Hanami::Entity] a new created entity
318
318
  #
319
319
  # @raise [Hanami::Model::Error] an error in case the command fails
320
320
  #
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.2
4
+ version: 1.0.3
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-08-04 00:00:00.000000000 Z
11
+ date: 2017-10-11 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: hanami-utils
@@ -58,14 +58,14 @@ dependencies:
58
58
  requirements:
59
59
  - - "~>"
60
60
  - !ruby/object:Gem::Version
61
- version: '0.11'
61
+ version: 0.11.0
62
62
  type: :runtime
63
63
  prerelease: false
64
64
  version_requirements: !ruby/object:Gem::Requirement
65
65
  requirements:
66
66
  - - "~>"
67
67
  - !ruby/object:Gem::Version
68
- version: '0.11'
68
+ version: 0.11.0
69
69
  - !ruby/object:Gem::Dependency
70
70
  name: concurrent-ruby
71
71
  requirement: !ruby/object:Gem::Requirement
@@ -192,7 +192,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
192
192
  version: '0'
193
193
  requirements: []
194
194
  rubyforge_project:
195
- rubygems_version: 2.6.11
195
+ rubygems_version: 2.6.13
196
196
  signing_key:
197
197
  specification_version: 4
198
198
  summary: A persistence layer for Hanami