koine-repository 0.9.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA1:
3
+ metadata.gz: 36b03786f4b0ebe34368292642fce3c0c3dfbd12
4
+ data.tar.gz: 366f68f61c1743aa0be0b5b3a7f4619bfbcb9833
5
+ SHA512:
6
+ metadata.gz: 28469400bc788603e5bd6e6a1adf48b0f17f130d6d4016a206179d1e54022b79e12d6105fa2c2c42e93194ddb66d9813f3360456b90d89206973a5436dbe7361
7
+ data.tar.gz: c8f900f7b4ee632b5692a0c27b3ebc571d8e28bc8951b4e6b5c8be5b62dd63fe10b83549152f60d73fdf1a8bde715b8359ec4a421037a11fb4dc8a5543539f47
data/.env ADDED
@@ -0,0 +1,3 @@
1
+ DATABASE_URL_MYSQL="mysql://root@localhost/koine_repository"
2
+ DATABASE_URL_PG="postgres://postgres@localhost/koine_repository"
3
+ DATABASE_URL_SQLITE="postgres://postgres@localhost/koine_repository"
data/.gitignore ADDED
@@ -0,0 +1,9 @@
1
+ /.bundle/
2
+ /.yardoc
3
+ /Gemfile.lock
4
+ /_yardoc/
5
+ /coverage/
6
+ /doc/
7
+ /pkg/
8
+ /spec/reports/
9
+ /tmp/
data/.scrutinizer.yml ADDED
@@ -0,0 +1,21 @@
1
+ checks:
2
+ ruby:
3
+ code_rating: true
4
+ duplicate_code: true
5
+
6
+ build:
7
+ tests:
8
+ override:
9
+ -
10
+ command: 'bundle exec rake test:scrutinizer'
11
+ environment:
12
+ 'SCRUTINIZER_CC_FILE': 'my-coverage'
13
+ coverage:
14
+ file: 'my-coverage'
15
+ format: 'rb-cc'
16
+
17
+ project_setup:
18
+ before:
19
+ - mysql -e 'create database koine_repository'
20
+ - bundle exec rake db:migrate
21
+ # - psql -c 'create database koine_repository' -U postgres
data/.travis.yml ADDED
@@ -0,0 +1,23 @@
1
+ language: ruby
2
+ rvm:
3
+ - 1.9.3
4
+ - 2.0
5
+ - 2.1
6
+ - 2.2
7
+
8
+ env:
9
+ - DB=sqlite
10
+ - DB=mysql
11
+ # - DB=postgresql
12
+ - DB=pg
13
+
14
+ script:
15
+ - rake db:migrate
16
+ - rake test
17
+
18
+
19
+ before_script:
20
+ - mysql -e 'create database koine_repository'
21
+ - psql -c 'create database koine_repository' -U postgres
22
+
23
+ sudo: false
@@ -0,0 +1,13 @@
1
+ # Contributor Code of Conduct
2
+
3
+ As contributors and maintainers of this project, we pledge to respect all people who contribute through reporting issues, posting feature requests, updating documentation, submitting pull requests or patches, and other activities.
4
+
5
+ We are committed to making participation in this project a harassment-free experience for everyone, regardless of level of experience, gender, gender identity and expression, sexual orientation, disability, personal appearance, body size, race, age, or religion.
6
+
7
+ Examples of unacceptable behavior by participants include the use of sexual language or imagery, derogatory comments or personal attacks, trolling, public or private harassment, insults, or other unprofessional conduct.
8
+
9
+ Project maintainers have the right and responsibility to remove, edit, or reject comments, commits, code, wiki edits, issues, and other contributions that are not aligned to this Code of Conduct. Project maintainers who do not follow the Code of Conduct may be removed from the project team.
10
+
11
+ Instances of abusive, harassing, or otherwise unacceptable behavior may be reported by opening an issue or contacting one or more of the project maintainers.
12
+
13
+ This Code of Conduct is adapted from the [Contributor Covenant](http:contributor-covenant.org), version 1.0.0, available at [http://contributor-covenant.org/version/1/0/0/](http://contributor-covenant.org/version/1/0/0/)
data/Gemfile ADDED
@@ -0,0 +1,4 @@
1
+ source 'https://rubygems.org'
2
+
3
+ # Specify your gem's dependencies in koine-repository.gemspec
4
+ gemspec
data/LICENSE.txt ADDED
@@ -0,0 +1,21 @@
1
+ The MIT License (MIT)
2
+
3
+ Copyright (c) 2015 Marcelo Jacobus
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in
13
+ all copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
21
+ THE SOFTWARE.
data/README.md ADDED
@@ -0,0 +1,165 @@
1
+ # Koine::Repository
2
+
3
+ If you want to use repository pattern as your way into the database
4
+
5
+ [![Build Status](https://travis-ci.org/mjacobus/koine-repository.svg)](https://travis-ci.org/mjacobus/koine-repository)
6
+ [![Code Coverage](https://scrutinizer-ci.com/g/mjacobus/koine-repository/badges/coverage.png?b=master)](https://scrutinizer-ci.com/g/mjacobus/koine-repository/?branch=master)
7
+ [![Code Climate](https://codeclimate.com/github/mjacobus/koine-repository/badges/gpa.svg)](https://codeclimate.com/github/mjacobus/koine-repository)
8
+ [![Scrutinizer Code Quality](https://scrutinizer-ci.com/g/mjacobus/koine-repository/badges/quality-score.png?b=master)](https://scrutinizer-ci.com/g/mjacobus/koine-repository/?branch=master)
9
+ [![Dependency Status](https://gemnasium.com/mjacobus/koine-repository.svg)](https://gemnasium.com/mjacobus/koine-repository)
10
+
11
+ ## Installation
12
+
13
+ Add this line to your application's Gemfile:
14
+
15
+ ```ruby
16
+ gem 'koine-repository'
17
+ ```
18
+
19
+ And then execute:
20
+
21
+ $ bundle
22
+
23
+ Or install it yourself as:
24
+
25
+ $ gem install koine-repository
26
+
27
+ ## Usage
28
+
29
+ Given you have a table called ```articles``` with fields:
30
+
31
+ - id
32
+ - body
33
+ - title
34
+ - published
35
+
36
+ You can create your entity as follows:
37
+
38
+ ```ruby
39
+ class Article
40
+ attr_accessor :id, :body, :title, :published
41
+ end
42
+ ```
43
+
44
+ Then you can create a repository class for your articles
45
+
46
+ ```ruby
47
+ class ArticlesRepository < Koine::Repository::Repository
48
+ # adds methods find(id), create(entity) and update(entity)
49
+ include Koine::Repository::Repository::IdAwareEntity
50
+
51
+ def published
52
+ find_all_by(published: true)
53
+ end
54
+ end
55
+ ```
56
+
57
+ ### Putting all together:
58
+
59
+ With repositories nothing is magic. You need to instantiate your classes and
60
+ give them their dependencies.
61
+
62
+ Then you can start using your classes. Here is how you manually instantiate your
63
+ classes:
64
+
65
+ ```ruby
66
+ db_adapter = Sequel.connect(db_string)
67
+
68
+ articles_storage = ::Koine::Repository::Persistence::Sql.new(
69
+ db_adapter,
70
+ :articles
71
+ )
72
+
73
+ repository = ArticlesRepository.new(articles_adapter)
74
+ ```
75
+
76
+ To make creation of objects easier, you should use factories or some kind
77
+ of dependency injection solution.
78
+
79
+ It could be as in the example bellow;
80
+
81
+ ```ruby
82
+ container = ApplicationDependencies.new
83
+
84
+ container.set(:db_connection) do |di|
85
+ Sequel.connect("mysql://root@localhost/some_db")
86
+ end
87
+
88
+ container.set(:articles_persistence) do |di|
89
+ Koine::Repository::Persistence::Sql.new(
90
+ di.get(:db_connection),
91
+ :articles
92
+ )
93
+ end
94
+
95
+ container.set(ArticlesRepository) do |di|
96
+ repository = ArticlesRepository.new(di.get(:articles_persistence))
97
+ repository.hydrator = Koine::Hydrator::Hydrator.new
98
+ repository.entity_prototype = Article.new
99
+
100
+ repository
101
+ end
102
+ ```
103
+
104
+ ### Using your repository:
105
+
106
+ Accessing the repository in your controller:
107
+
108
+ ```ruby
109
+ class ArticlesController < MyBaseController
110
+ def index
111
+ @articles = repository.published
112
+ end
113
+
114
+ def create
115
+ @article = Article.new
116
+ set_attributes(@article)
117
+
118
+ # validate as you wish
119
+
120
+ repository.create(@article)
121
+
122
+ redirect_to :articles_path, notice: "Article with id #{@article.id} created"
123
+ end
124
+
125
+ def update
126
+ @article = repository.find(params[:id])
127
+ set_attributes(@article)
128
+
129
+ # validate
130
+
131
+ repository.update(@article)
132
+ end
133
+
134
+ def destroy
135
+ @article = repository.find(params[:id])
136
+ repository.remove(@article)
137
+ end
138
+
139
+ private
140
+
141
+ def set_attributes(article)
142
+ article.title = params[:title]
143
+ article.body = params[:body]
144
+ article.published = params[:published]
145
+ end
146
+
147
+ def repository
148
+ @repository ||= dependencies.get(ArticlesRepository)
149
+ end
150
+ end
151
+ ```
152
+
153
+ ## Development
154
+
155
+ After checking out the repo, run `bin/setup` to install dependencies. Then, run `bin/console` for an interactive prompt that will allow you to experiment.
156
+
157
+ To install this gem onto your local machine, run `bundle exec rake install`. To release a new version, update the version number in `version.rb`, and then run `bundle exec rake release` to create a git tag for the version, push git commits and tags, and push the `.gem` file to [rubygems.org](https://rubygems.org).
158
+
159
+ ## Contributing
160
+
161
+ 1. Fork it ( https://github.com/mjacobus/koine-repository/fork )
162
+ 2. Create your feature branch (`git checkout -b my-new-feature`)
163
+ 3. Commit your changes (`git commit -am 'Add some feature'`)
164
+ 4. Push to the branch (`git push origin my-new-feature`)
165
+ 5. Create a new Pull Request
data/Rakefile ADDED
@@ -0,0 +1,55 @@
1
+ require "bundler/gem_tasks"
2
+ require "rake/testtask"
3
+ require "dotenv"
4
+
5
+ $LOAD_PATH.unshift File.expand_path('..', __FILE__)
6
+
7
+ Dotenv.load
8
+
9
+ Rake::TestTask.new do |t|
10
+ t.libs << "test"
11
+ t.test_files = FileList['test/**/*_test.rb'] + FileList['test/**/*_spec.rb']
12
+ t.verbose = true
13
+ end
14
+
15
+ namespace :test do
16
+ task :coveralls do
17
+ ENV['COVERALLS'] = 'true'
18
+ Rake::Task['test:coverage'].invoke
19
+ end
20
+
21
+ task :coverage do
22
+ ENV['COVERAGE'] = 'true'
23
+ Rake::Task['test'].invoke
24
+ end
25
+
26
+ task :scrutinizer do
27
+ ENV['SCRUTINIZER'] = 'true'
28
+ Rake::Task['test'].invoke
29
+ end
30
+ end
31
+
32
+ namespace :db do
33
+ desc "Run migrations"
34
+ task :migrate, [:version] do |t, args|
35
+ require "test/support/database"
36
+
37
+ Sequel.extension :migration
38
+
39
+ db = TestDb.instance.adapter
40
+
41
+ if args[:version]
42
+ puts "Migrating to version #{args[:version]}"
43
+ Sequel::Migrator.run(db, "db/migrations", target: args[:version].to_i)
44
+ else
45
+ puts "Migrating to latest"
46
+ Sequel::Migrator.run(db, "db/migrations")
47
+ end
48
+ end
49
+
50
+ task :create do
51
+ puts "please create manually your table"
52
+ end
53
+ end
54
+
55
+ task default: :test
data/bin/console ADDED
@@ -0,0 +1,14 @@
1
+ #!/usr/bin/env ruby
2
+
3
+ require "bundler/setup"
4
+ require "koine/repository"
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
data/bin/setup ADDED
@@ -0,0 +1,7 @@
1
+ #!/bin/bash
2
+ set -euo pipefail
3
+ IFS=$'\n\t'
4
+
5
+ bundle install
6
+
7
+ # Do any other automated setup that you need to do here
@@ -0,0 +1,13 @@
1
+ Sequel.migration do
2
+ up do
3
+ create_table(:articles) do
4
+ primary_key :id
5
+ String :title
6
+ String :body
7
+ end
8
+ end
9
+
10
+ down do
11
+ drop_table(:articles)
12
+ end
13
+ end
@@ -0,0 +1,37 @@
1
+ # coding: utf-8
2
+ lib = File.expand_path('../lib', __FILE__)
3
+ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
4
+ require 'koine/repository/version'
5
+
6
+ Gem::Specification.new do |spec|
7
+ spec.name = "koine-repository"
8
+ spec.version = Koine::Repository::VERSION
9
+ spec.authors = ["Marcelo Jacobus"]
10
+ spec.email = ["marcelo.jacobus@gmail.com"]
11
+
12
+ spec.summary = %q{Repository patter for ruby}
13
+ spec.description = %q{Repository patter for ruby}
14
+ spec.homepage = "https://github.com/mjacobus/koine-repository"
15
+ spec.license = "MIT"
16
+
17
+ spec.files = `git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(test|spec|features)/}) }
18
+ spec.bindir = "exe"
19
+ spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
20
+ spec.require_paths = ["lib"]
21
+
22
+ spec.add_dependency "sequel"
23
+
24
+ spec.add_development_dependency "bundler"
25
+ spec.add_development_dependency "rake", "~> 10.0"
26
+ spec.add_development_dependency "scrutinizer-ocular"
27
+ spec.add_development_dependency "minitest"
28
+ spec.add_development_dependency "coveralls"
29
+ spec.add_development_dependency "simplecov"
30
+ spec.add_development_dependency "dotenv"
31
+
32
+ # Database connections
33
+ spec.add_development_dependency "pg"
34
+ spec.add_development_dependency "mysql2"
35
+ spec.add_development_dependency "mysql"
36
+ spec.add_development_dependency "sqlite3"
37
+ end
@@ -0,0 +1,35 @@
1
+ module Koine
2
+ module Hydrator
3
+ class Hydrator
4
+ def hydrate(data, object)
5
+ data.each do |key, value|
6
+ method = "#{key}="
7
+ object.send(method, value) if object.respond_to?(method)
8
+ end
9
+ end
10
+
11
+ def extract(object)
12
+ data = {}
13
+
14
+ entity_methods(object).each do |method|
15
+ if object.method(method).arity == 0
16
+ data[method] = object.send(method)
17
+ end
18
+ end
19
+
20
+ data
21
+ end
22
+
23
+ private
24
+
25
+ # disconsiders methods that are inherited from Object class
26
+ def entity_methods(object)
27
+ reject_methods = Object.public_instance_methods
28
+
29
+ object.public_methods(true).reject do |method|
30
+ reject_methods.include?(method)
31
+ end
32
+ end
33
+ end
34
+ end
35
+ end
@@ -0,0 +1,26 @@
1
+ module Koine
2
+ module Repository
3
+ module IdAwareEntity
4
+ def find(id)
5
+ data = storage.find_one_by(id: id)
6
+ return data unless data
7
+ entity = new_entity
8
+ hydrate(data, entity)
9
+ entity
10
+ end
11
+
12
+ def create(entity)
13
+ values = hydrator.extract(entity)
14
+ values.delete("id")
15
+ values.delete(:id)
16
+ entity.id = storage.insert(values)
17
+ end
18
+
19
+ def update(entity)
20
+ values = hydrator.extract(entity)
21
+ values.delete(:id)
22
+ storage.update_where({ id: entity.id }, values)
23
+ end
24
+ end
25
+ end
26
+ end
@@ -0,0 +1,46 @@
1
+ module Koine
2
+ module Repository
3
+ module Persistence
4
+ class Adapter
5
+ class Sql < Adapter
6
+ attr_reader :adapter, :table_name, :table, :id_field
7
+
8
+ def initialize(adapter, table_name, id_field = :id)
9
+ @adapter = adapter
10
+ @table_name = table_name
11
+ @table = adapter[table_name]
12
+ @id_field = id_field
13
+ end
14
+
15
+ def exists?(criterias)
16
+ table.where(criterias).limit(2).count > 0
17
+ end
18
+
19
+ def find(id)
20
+ find_one_by(id_field => id)
21
+ end
22
+
23
+ def find_one_by(criterias)
24
+ table.where(criterias).first!
25
+ end
26
+
27
+ def find_all_by(criterias)
28
+ table.where(criterias)
29
+ end
30
+
31
+ def insert(values)
32
+ table.insert(values)
33
+ end
34
+
35
+ def update_where(criterias, values)
36
+ find_all_by(criterias).update(values)
37
+ end
38
+
39
+ def delete_where(criterias)
40
+ find_all_by(criterias).delete
41
+ end
42
+ end
43
+ end
44
+ end
45
+ end
46
+ end
@@ -0,0 +1,35 @@
1
+ module Koine
2
+ module Repository
3
+ module Persistence
4
+ class Adapter
5
+ def find(*)
6
+ raise "Method not implemented: 'find'"
7
+ end
8
+
9
+ def exists?(*)
10
+ raise "Method not implemented: 'exists?'"
11
+ end
12
+
13
+ def find_one_by(*)
14
+ raise "Method not implemented: 'find_one_by'"
15
+ end
16
+
17
+ def find_all_by(*)
18
+ raise "Method not implemented: 'find_all_by'"
19
+ end
20
+
21
+ def insert(*)
22
+ raise "Method not implemented: 'insert'"
23
+ end
24
+
25
+ def update_where(*)
26
+ raise "Method not implemented: 'update_where'"
27
+ end
28
+
29
+ def delete_where(*)
30
+ raise "Method not implemented: 'delete_where'"
31
+ end
32
+ end
33
+ end
34
+ end
35
+ end
@@ -0,0 +1,62 @@
1
+ module Koine
2
+ module Repository
3
+ class Repository
4
+ class RecordNotFound < RuntimeError; end
5
+
6
+ attr_accessor :hydrator, :entity_prototype
7
+ attr_reader :storage
8
+
9
+ def initialize(storage)
10
+ @storage = storage
11
+ end
12
+
13
+ def save(*)
14
+ raise "Method not implemented"
15
+ end
16
+
17
+ def remove(*)
18
+ raise "Method not implemented"
19
+ end
20
+
21
+ def find_all_by(criterias)
22
+ hydrate_collection(storage.find_all_by(criterias))
23
+ end
24
+
25
+ def find_one_by(criterias)
26
+ raw_data = storage.find_one_by(criterias)
27
+ hydrate(raw_data, new_entity) if raw_data
28
+ end
29
+
30
+ def find_one_by!(criterias)
31
+ find_one_by(criterias) or raise RecordNotFound
32
+ end
33
+
34
+ def hydrator
35
+ @hydrator ||= Koine::Hydrator::Hydrator.new
36
+ end
37
+
38
+ def entity_prototype
39
+ @entity_prototype or raise RuntimeError.new("Entity prototype was not set")
40
+ end
41
+
42
+ private
43
+
44
+ def hydrate_collection(collection)
45
+ [].tap do |hydrated|
46
+ collection.each do |element|
47
+ hydrated << hydrate(element, new_entity)
48
+ end
49
+ end
50
+ end
51
+
52
+ def hydrate(data, entity)
53
+ hydrator.hydrate(data, entity)
54
+ entity
55
+ end
56
+
57
+ def new_entity
58
+ entity_prototype.dup
59
+ end
60
+ end
61
+ end
62
+ end
@@ -0,0 +1,5 @@
1
+ module Koine
2
+ module Repository
3
+ VERSION = "0.9.0"
4
+ end
5
+ end
@@ -0,0 +1,11 @@
1
+ require "koine/repository/version"
2
+ require "koine/hydrator/hydrator"
3
+ require "koine/repository/repository"
4
+ require "koine/repository/id_aware_entity"
5
+ require "koine/repository/persistence/adapter"
6
+ require "koine/repository/persistence/adapter/sql"
7
+
8
+ module Koine
9
+ module Repository
10
+ end
11
+ end
metadata ADDED
@@ -0,0 +1,232 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: koine-repository
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.9.0
5
+ platform: ruby
6
+ authors:
7
+ - Marcelo Jacobus
8
+ autorequire:
9
+ bindir: exe
10
+ cert_chain: []
11
+ date: 2015-10-11 00:00:00.000000000 Z
12
+ dependencies:
13
+ - !ruby/object:Gem::Dependency
14
+ name: sequel
15
+ requirement: !ruby/object:Gem::Requirement
16
+ requirements:
17
+ - - ">="
18
+ - !ruby/object:Gem::Version
19
+ version: '0'
20
+ type: :runtime
21
+ prerelease: false
22
+ version_requirements: !ruby/object:Gem::Requirement
23
+ requirements:
24
+ - - ">="
25
+ - !ruby/object:Gem::Version
26
+ version: '0'
27
+ - !ruby/object:Gem::Dependency
28
+ name: bundler
29
+ requirement: !ruby/object:Gem::Requirement
30
+ requirements:
31
+ - - ">="
32
+ - !ruby/object:Gem::Version
33
+ version: '0'
34
+ type: :development
35
+ prerelease: false
36
+ version_requirements: !ruby/object:Gem::Requirement
37
+ requirements:
38
+ - - ">="
39
+ - !ruby/object:Gem::Version
40
+ version: '0'
41
+ - !ruby/object:Gem::Dependency
42
+ name: rake
43
+ requirement: !ruby/object:Gem::Requirement
44
+ requirements:
45
+ - - "~>"
46
+ - !ruby/object:Gem::Version
47
+ version: '10.0'
48
+ type: :development
49
+ prerelease: false
50
+ version_requirements: !ruby/object:Gem::Requirement
51
+ requirements:
52
+ - - "~>"
53
+ - !ruby/object:Gem::Version
54
+ version: '10.0'
55
+ - !ruby/object:Gem::Dependency
56
+ name: scrutinizer-ocular
57
+ requirement: !ruby/object:Gem::Requirement
58
+ requirements:
59
+ - - ">="
60
+ - !ruby/object:Gem::Version
61
+ version: '0'
62
+ type: :development
63
+ prerelease: false
64
+ version_requirements: !ruby/object:Gem::Requirement
65
+ requirements:
66
+ - - ">="
67
+ - !ruby/object:Gem::Version
68
+ version: '0'
69
+ - !ruby/object:Gem::Dependency
70
+ name: minitest
71
+ requirement: !ruby/object:Gem::Requirement
72
+ requirements:
73
+ - - ">="
74
+ - !ruby/object:Gem::Version
75
+ version: '0'
76
+ type: :development
77
+ prerelease: false
78
+ version_requirements: !ruby/object:Gem::Requirement
79
+ requirements:
80
+ - - ">="
81
+ - !ruby/object:Gem::Version
82
+ version: '0'
83
+ - !ruby/object:Gem::Dependency
84
+ name: coveralls
85
+ requirement: !ruby/object:Gem::Requirement
86
+ requirements:
87
+ - - ">="
88
+ - !ruby/object:Gem::Version
89
+ version: '0'
90
+ type: :development
91
+ prerelease: false
92
+ version_requirements: !ruby/object:Gem::Requirement
93
+ requirements:
94
+ - - ">="
95
+ - !ruby/object:Gem::Version
96
+ version: '0'
97
+ - !ruby/object:Gem::Dependency
98
+ name: simplecov
99
+ requirement: !ruby/object:Gem::Requirement
100
+ requirements:
101
+ - - ">="
102
+ - !ruby/object:Gem::Version
103
+ version: '0'
104
+ type: :development
105
+ prerelease: false
106
+ version_requirements: !ruby/object:Gem::Requirement
107
+ requirements:
108
+ - - ">="
109
+ - !ruby/object:Gem::Version
110
+ version: '0'
111
+ - !ruby/object:Gem::Dependency
112
+ name: dotenv
113
+ requirement: !ruby/object:Gem::Requirement
114
+ requirements:
115
+ - - ">="
116
+ - !ruby/object:Gem::Version
117
+ version: '0'
118
+ type: :development
119
+ prerelease: false
120
+ version_requirements: !ruby/object:Gem::Requirement
121
+ requirements:
122
+ - - ">="
123
+ - !ruby/object:Gem::Version
124
+ version: '0'
125
+ - !ruby/object:Gem::Dependency
126
+ name: pg
127
+ requirement: !ruby/object:Gem::Requirement
128
+ requirements:
129
+ - - ">="
130
+ - !ruby/object:Gem::Version
131
+ version: '0'
132
+ type: :development
133
+ prerelease: false
134
+ version_requirements: !ruby/object:Gem::Requirement
135
+ requirements:
136
+ - - ">="
137
+ - !ruby/object:Gem::Version
138
+ version: '0'
139
+ - !ruby/object:Gem::Dependency
140
+ name: mysql2
141
+ requirement: !ruby/object:Gem::Requirement
142
+ requirements:
143
+ - - ">="
144
+ - !ruby/object:Gem::Version
145
+ version: '0'
146
+ type: :development
147
+ prerelease: false
148
+ version_requirements: !ruby/object:Gem::Requirement
149
+ requirements:
150
+ - - ">="
151
+ - !ruby/object:Gem::Version
152
+ version: '0'
153
+ - !ruby/object:Gem::Dependency
154
+ name: mysql
155
+ requirement: !ruby/object:Gem::Requirement
156
+ requirements:
157
+ - - ">="
158
+ - !ruby/object:Gem::Version
159
+ version: '0'
160
+ type: :development
161
+ prerelease: false
162
+ version_requirements: !ruby/object:Gem::Requirement
163
+ requirements:
164
+ - - ">="
165
+ - !ruby/object:Gem::Version
166
+ version: '0'
167
+ - !ruby/object:Gem::Dependency
168
+ name: sqlite3
169
+ requirement: !ruby/object:Gem::Requirement
170
+ requirements:
171
+ - - ">="
172
+ - !ruby/object:Gem::Version
173
+ version: '0'
174
+ type: :development
175
+ prerelease: false
176
+ version_requirements: !ruby/object:Gem::Requirement
177
+ requirements:
178
+ - - ">="
179
+ - !ruby/object:Gem::Version
180
+ version: '0'
181
+ description: Repository patter for ruby
182
+ email:
183
+ - marcelo.jacobus@gmail.com
184
+ executables: []
185
+ extensions: []
186
+ extra_rdoc_files: []
187
+ files:
188
+ - ".env"
189
+ - ".gitignore"
190
+ - ".scrutinizer.yml"
191
+ - ".travis.yml"
192
+ - CODE_OF_CONDUCT.md
193
+ - Gemfile
194
+ - LICENSE.txt
195
+ - README.md
196
+ - Rakefile
197
+ - bin/console
198
+ - bin/setup
199
+ - db/migrations/1_create_articles.rb
200
+ - koine-repository.gemspec
201
+ - lib/koine/hydrator/hydrator.rb
202
+ - lib/koine/repository.rb
203
+ - lib/koine/repository/id_aware_entity.rb
204
+ - lib/koine/repository/persistence/adapter.rb
205
+ - lib/koine/repository/persistence/adapter/sql.rb
206
+ - lib/koine/repository/repository.rb
207
+ - lib/koine/repository/version.rb
208
+ homepage: https://github.com/mjacobus/koine-repository
209
+ licenses:
210
+ - MIT
211
+ metadata: {}
212
+ post_install_message:
213
+ rdoc_options: []
214
+ require_paths:
215
+ - lib
216
+ required_ruby_version: !ruby/object:Gem::Requirement
217
+ requirements:
218
+ - - ">="
219
+ - !ruby/object:Gem::Version
220
+ version: '0'
221
+ required_rubygems_version: !ruby/object:Gem::Requirement
222
+ requirements:
223
+ - - ">="
224
+ - !ruby/object:Gem::Version
225
+ version: '0'
226
+ requirements: []
227
+ rubyforge_project:
228
+ rubygems_version: 2.4.8
229
+ signing_key:
230
+ specification_version: 4
231
+ summary: Repository patter for ruby
232
+ test_files: []