Created
December 13, 2016 23:48
-
-
Save panthomakos/7e3a5c3745b8ab729bb3ac1a68a3eb0a to your computer and use it in GitHub Desktop.
mapping (Hanami::Model::Error)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
source 'https://rubygems.org' | |
gem 'sqlite3' | |
gem 'hanami-model' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
GEM | |
remote: https://rubygems.org/ | |
specs: | |
concurrent-ruby (1.0.2) | |
dry-configurable (0.4.0) | |
concurrent-ruby (~> 1.0) | |
dry-container (0.6.0) | |
concurrent-ruby (~> 1.0) | |
dry-configurable (~> 0.1, >= 0.1.3) | |
dry-core (0.2.1) | |
concurrent-ruby (~> 1.0) | |
dry-equalizer (0.2.0) | |
dry-logic (0.4.0) | |
dry-container (~> 0.2, >= 0.2.6) | |
dry-core (~> 0.1) | |
dry-equalizer (~> 0.2) | |
dry-types (0.9.3) | |
concurrent-ruby (~> 1.0) | |
dry-configurable (~> 0.1) | |
dry-container (~> 0.3) | |
dry-core (~> 0.2, >= 0.2.1) | |
dry-equalizer (~> 0.2) | |
dry-logic (~> 0.4, >= 0.4.0) | |
inflecto (~> 0.0.0, >= 0.0.2) | |
hanami-model (0.7.0) | |
concurrent-ruby (~> 1.0) | |
dry-types (~> 0.9) | |
hanami-utils (~> 0.8) | |
rom-repository (~> 0.3) | |
rom-sql (~> 0.9) | |
hanami-utils (0.9.1) | |
inflecto (0.0.2) | |
rom (2.0.2) | |
concurrent-ruby (~> 1.0) | |
dry-equalizer (~> 0.2) | |
dry-types (~> 0.8) | |
rom-mapper (~> 0.4.0) | |
rom-support (~> 2.0) | |
rom-mapper (0.4.0) | |
dry-equalizer (~> 0.2) | |
rom-support (~> 2.0.0) | |
transproc (~> 0.4.0) | |
rom-repository (0.3.1) | |
rom (~> 2.0) | |
rom-mapper (~> 0.4) | |
rom-support (~> 2.0) | |
rom-sql (0.9.0) | |
dry-core (~> 0.2) | |
dry-equalizer (~> 0.2) | |
dry-types (~> 0.9) | |
rom (~> 2.0) | |
rom-support (~> 2.0) | |
sequel (~> 4.25) | |
rom-support (2.0.0) | |
concurrent-ruby (~> 1.0) | |
dry-equalizer (~> 0.2) | |
transproc (~> 0.4.0) | |
wisper (~> 1.6, >= 1.6.0) | |
sequel (4.41.0) | |
sqlite3 (1.3.12) | |
transproc (0.4.1) | |
wisper (1.6.1) | |
PLATFORMS | |
ruby | |
DEPENDENCIES | |
hanami-model | |
sqlite3 | |
BUNDLED WITH | |
1.12.5 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'sequel' | |
require 'hanami/model' | |
DB = Sequel.connect('sqlite://test.db?mode=memory&cache=shared') | |
DB.create_table? :users do | |
primary_key :id | |
String :name, size: 50 | |
end | |
class User < ::Hanami::Entity | |
end | |
class UserRepository < ::Hanami::Repository | |
end | |
Hanami::Model.configure do | |
adapter :sql, 'sqlite://test.db?mode=memory&cache=shared' | |
end | |
Hanami::Model.load! | |
UserRepository.new.create(name: 'Foo') |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$HOME/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/hanami-model-0.7.0/lib/hanami/repository.rb:302:in `rescue in create': mapping (Hanami::Model::Error) | |
from $HOME/.rbenv/versions/2.3.1/lib/ruby/gems/2.3.0/gems/hanami-model-0.7.0/lib/hanami/repository.rb:300:in `create' | |
from main.rb:24:in `<main>' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment