hanami-model 0.0.0 → 0.6.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +145 -0
- data/EXAMPLE.md +212 -0
- data/LICENSE.md +22 -0
- data/README.md +600 -7
- data/hanami-model.gemspec +17 -12
- data/lib/hanami-model.rb +1 -0
- data/lib/hanami/entity.rb +298 -0
- data/lib/hanami/entity/dirty_tracking.rb +74 -0
- data/lib/hanami/model.rb +204 -2
- data/lib/hanami/model/adapters/abstract.rb +281 -0
- data/lib/hanami/model/adapters/file_system_adapter.rb +288 -0
- data/lib/hanami/model/adapters/implementation.rb +111 -0
- data/lib/hanami/model/adapters/memory/collection.rb +132 -0
- data/lib/hanami/model/adapters/memory/command.rb +113 -0
- data/lib/hanami/model/adapters/memory/query.rb +653 -0
- data/lib/hanami/model/adapters/memory_adapter.rb +179 -0
- data/lib/hanami/model/adapters/null_adapter.rb +24 -0
- data/lib/hanami/model/adapters/sql/collection.rb +287 -0
- data/lib/hanami/model/adapters/sql/command.rb +73 -0
- data/lib/hanami/model/adapters/sql/console.rb +33 -0
- data/lib/hanami/model/adapters/sql/consoles/mysql.rb +49 -0
- data/lib/hanami/model/adapters/sql/consoles/postgresql.rb +48 -0
- data/lib/hanami/model/adapters/sql/consoles/sqlite.rb +26 -0
- data/lib/hanami/model/adapters/sql/query.rb +788 -0
- data/lib/hanami/model/adapters/sql_adapter.rb +296 -0
- data/lib/hanami/model/coercer.rb +74 -0
- data/lib/hanami/model/config/adapter.rb +116 -0
- data/lib/hanami/model/config/mapper.rb +45 -0
- data/lib/hanami/model/configuration.rb +275 -0
- data/lib/hanami/model/error.rb +7 -0
- data/lib/hanami/model/mapper.rb +124 -0
- data/lib/hanami/model/mapping.rb +48 -0
- data/lib/hanami/model/mapping/attribute.rb +85 -0
- data/lib/hanami/model/mapping/coercers.rb +314 -0
- data/lib/hanami/model/mapping/collection.rb +490 -0
- data/lib/hanami/model/mapping/collection_coercer.rb +79 -0
- data/lib/hanami/model/migrator.rb +324 -0
- data/lib/hanami/model/migrator/adapter.rb +170 -0
- data/lib/hanami/model/migrator/connection.rb +133 -0
- data/lib/hanami/model/migrator/mysql_adapter.rb +72 -0
- data/lib/hanami/model/migrator/postgres_adapter.rb +119 -0
- data/lib/hanami/model/migrator/sqlite_adapter.rb +110 -0
- data/lib/hanami/model/version.rb +4 -1
- data/lib/hanami/repository.rb +872 -0
- metadata +100 -16
- data/.gitignore +0 -9
- data/Gemfile +0 -4
- data/Rakefile +0 -2
- data/bin/console +0 -14
- data/bin/setup +0 -8
metadata
CHANGED
@@ -1,61 +1,144 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: hanami-model
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.6.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Luca Guidi
|
8
|
+
- Trung Lê
|
9
|
+
- Alfonso Uceda
|
8
10
|
autorequire:
|
9
|
-
bindir:
|
11
|
+
bindir: bin
|
10
12
|
cert_chain: []
|
11
|
-
date: 2016-01-
|
13
|
+
date: 2016-01-22 00:00:00.000000000 Z
|
12
14
|
dependencies:
|
15
|
+
- !ruby/object:Gem::Dependency
|
16
|
+
name: hanami-utils
|
17
|
+
requirement: !ruby/object:Gem::Requirement
|
18
|
+
requirements:
|
19
|
+
- - "~>"
|
20
|
+
- !ruby/object:Gem::Version
|
21
|
+
version: '0.7'
|
22
|
+
type: :runtime
|
23
|
+
prerelease: false
|
24
|
+
version_requirements: !ruby/object:Gem::Requirement
|
25
|
+
requirements:
|
26
|
+
- - "~>"
|
27
|
+
- !ruby/object:Gem::Version
|
28
|
+
version: '0.7'
|
29
|
+
- !ruby/object:Gem::Dependency
|
30
|
+
name: sequel
|
31
|
+
requirement: !ruby/object:Gem::Requirement
|
32
|
+
requirements:
|
33
|
+
- - "~>"
|
34
|
+
- !ruby/object:Gem::Version
|
35
|
+
version: '4.9'
|
36
|
+
type: :runtime
|
37
|
+
prerelease: false
|
38
|
+
version_requirements: !ruby/object:Gem::Requirement
|
39
|
+
requirements:
|
40
|
+
- - "~>"
|
41
|
+
- !ruby/object:Gem::Version
|
42
|
+
version: '4.9'
|
13
43
|
- !ruby/object:Gem::Dependency
|
14
44
|
name: bundler
|
15
45
|
requirement: !ruby/object:Gem::Requirement
|
16
46
|
requirements:
|
17
47
|
- - "~>"
|
18
48
|
- !ruby/object:Gem::Version
|
19
|
-
version: '1.
|
49
|
+
version: '1.6'
|
50
|
+
type: :development
|
51
|
+
prerelease: false
|
52
|
+
version_requirements: !ruby/object:Gem::Requirement
|
53
|
+
requirements:
|
54
|
+
- - "~>"
|
55
|
+
- !ruby/object:Gem::Version
|
56
|
+
version: '1.6'
|
57
|
+
- !ruby/object:Gem::Dependency
|
58
|
+
name: minitest
|
59
|
+
requirement: !ruby/object:Gem::Requirement
|
60
|
+
requirements:
|
61
|
+
- - "~>"
|
62
|
+
- !ruby/object:Gem::Version
|
63
|
+
version: '5'
|
20
64
|
type: :development
|
21
65
|
prerelease: false
|
22
66
|
version_requirements: !ruby/object:Gem::Requirement
|
23
67
|
requirements:
|
24
68
|
- - "~>"
|
25
69
|
- !ruby/object:Gem::Version
|
26
|
-
version: '
|
70
|
+
version: '5'
|
27
71
|
- !ruby/object:Gem::Dependency
|
28
72
|
name: rake
|
29
73
|
requirement: !ruby/object:Gem::Requirement
|
30
74
|
requirements:
|
31
75
|
- - "~>"
|
32
76
|
- !ruby/object:Gem::Version
|
33
|
-
version: '10
|
77
|
+
version: '10'
|
34
78
|
type: :development
|
35
79
|
prerelease: false
|
36
80
|
version_requirements: !ruby/object:Gem::Requirement
|
37
81
|
requirements:
|
38
82
|
- - "~>"
|
39
83
|
- !ruby/object:Gem::Version
|
40
|
-
version: '10
|
41
|
-
description:
|
84
|
+
version: '10'
|
85
|
+
description: A persistence framework with entities, repositories, data mapper and
|
86
|
+
query objects
|
42
87
|
email:
|
43
88
|
- me@lucaguidi.com
|
89
|
+
- trung.le@ruby-journal.com
|
90
|
+
- uceda73@gmail.com
|
44
91
|
executables: []
|
45
92
|
extensions: []
|
46
93
|
extra_rdoc_files: []
|
47
94
|
files:
|
48
|
-
-
|
49
|
-
-
|
95
|
+
- CHANGELOG.md
|
96
|
+
- EXAMPLE.md
|
97
|
+
- LICENSE.md
|
50
98
|
- README.md
|
51
|
-
- Rakefile
|
52
|
-
- bin/console
|
53
|
-
- bin/setup
|
54
99
|
- hanami-model.gemspec
|
100
|
+
- lib/hanami-model.rb
|
101
|
+
- lib/hanami/entity.rb
|
102
|
+
- lib/hanami/entity/dirty_tracking.rb
|
55
103
|
- lib/hanami/model.rb
|
104
|
+
- lib/hanami/model/adapters/abstract.rb
|
105
|
+
- lib/hanami/model/adapters/file_system_adapter.rb
|
106
|
+
- lib/hanami/model/adapters/implementation.rb
|
107
|
+
- lib/hanami/model/adapters/memory/collection.rb
|
108
|
+
- lib/hanami/model/adapters/memory/command.rb
|
109
|
+
- lib/hanami/model/adapters/memory/query.rb
|
110
|
+
- lib/hanami/model/adapters/memory_adapter.rb
|
111
|
+
- lib/hanami/model/adapters/null_adapter.rb
|
112
|
+
- lib/hanami/model/adapters/sql/collection.rb
|
113
|
+
- lib/hanami/model/adapters/sql/command.rb
|
114
|
+
- lib/hanami/model/adapters/sql/console.rb
|
115
|
+
- lib/hanami/model/adapters/sql/consoles/mysql.rb
|
116
|
+
- lib/hanami/model/adapters/sql/consoles/postgresql.rb
|
117
|
+
- lib/hanami/model/adapters/sql/consoles/sqlite.rb
|
118
|
+
- lib/hanami/model/adapters/sql/query.rb
|
119
|
+
- lib/hanami/model/adapters/sql_adapter.rb
|
120
|
+
- lib/hanami/model/coercer.rb
|
121
|
+
- lib/hanami/model/config/adapter.rb
|
122
|
+
- lib/hanami/model/config/mapper.rb
|
123
|
+
- lib/hanami/model/configuration.rb
|
124
|
+
- lib/hanami/model/error.rb
|
125
|
+
- lib/hanami/model/mapper.rb
|
126
|
+
- lib/hanami/model/mapping.rb
|
127
|
+
- lib/hanami/model/mapping/attribute.rb
|
128
|
+
- lib/hanami/model/mapping/coercers.rb
|
129
|
+
- lib/hanami/model/mapping/collection.rb
|
130
|
+
- lib/hanami/model/mapping/collection_coercer.rb
|
131
|
+
- lib/hanami/model/migrator.rb
|
132
|
+
- lib/hanami/model/migrator/adapter.rb
|
133
|
+
- lib/hanami/model/migrator/connection.rb
|
134
|
+
- lib/hanami/model/migrator/mysql_adapter.rb
|
135
|
+
- lib/hanami/model/migrator/postgres_adapter.rb
|
136
|
+
- lib/hanami/model/migrator/sqlite_adapter.rb
|
56
137
|
- lib/hanami/model/version.rb
|
138
|
+
- lib/hanami/repository.rb
|
57
139
|
homepage: http://hanamirb.org
|
58
|
-
licenses:
|
140
|
+
licenses:
|
141
|
+
- MIT
|
59
142
|
metadata: {}
|
60
143
|
post_install_message:
|
61
144
|
rdoc_options: []
|
@@ -65,7 +148,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
65
148
|
requirements:
|
66
149
|
- - ">="
|
67
150
|
- !ruby/object:Gem::Version
|
68
|
-
version:
|
151
|
+
version: 2.0.0
|
69
152
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
70
153
|
requirements:
|
71
154
|
- - ">="
|
@@ -76,5 +159,6 @@ rubyforge_project:
|
|
76
159
|
rubygems_version: 2.5.1
|
77
160
|
signing_key:
|
78
161
|
specification_version: 4
|
79
|
-
summary:
|
162
|
+
summary: A persistence layer for Hanami
|
80
163
|
test_files: []
|
164
|
+
has_rdoc:
|
data/.gitignore
DELETED
data/Gemfile
DELETED
data/Rakefile
DELETED
data/bin/console
DELETED
@@ -1,14 +0,0 @@
|
|
1
|
-
#!/usr/bin/env ruby
|
2
|
-
|
3
|
-
require "bundler/setup"
|
4
|
-
require "hanami/model"
|
5
|
-
|
6
|
-
# You can add fixtures and/or initialization code here to make experimenting
|
7
|
-
# with your gem easier. You can also use a different console, if you like.
|
8
|
-
|
9
|
-
# (If you use this, don't forget to add pry to your Gemfile!)
|
10
|
-
# require "pry"
|
11
|
-
# Pry.start
|
12
|
-
|
13
|
-
require "irb"
|
14
|
-
IRB.start
|