skeletron 0.1.0
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 +7 -0
- data/.dockerignore +11 -0
- data/.gitignore +17 -0
- data/.rspec +3 -0
- data/.rubocop.yml +129 -0
- data/.travis.yml +5 -0
- data/Dockerfile +18 -0
- data/Gemfile +6 -0
- data/LICENSE.txt +21 -0
- data/Makefile +25 -0
- data/README.md +77 -0
- data/Rakefile +6 -0
- data/architecture_diagram.png +0 -0
- data/bin/console +14 -0
- data/bin/setup +8 -0
- data/docker-compose.yml +8 -0
- data/lib/skeletron.rb +4 -0
- data/lib/skeletron/entity.rb +11 -0
- data/lib/skeletron/entity/identifiable.rb +17 -0
- data/lib/skeletron/entity/relatable.rb +38 -0
- data/lib/skeletron/entity_gateway.rb +18 -0
- data/lib/skeletron/entity_gateway/creatable.rb +21 -0
- data/lib/skeletron/entity_gateway/deletable.rb +19 -0
- data/lib/skeletron/entity_gateway/errors.rb +15 -0
- data/lib/skeletron/entity_gateway/readable.rb +28 -0
- data/lib/skeletron/entity_gateway/transactor.rb +14 -0
- data/lib/skeletron/entity_gateway/updatable.rb +21 -0
- data/lib/skeletron/null/entity_gateway.rb +68 -0
- data/lib/skeletron/null/entity_gateway/transactor.rb +15 -0
- data/lib/skeletron/version.rb +3 -0
- data/skeletron.gemspec +30 -0
- metadata +171 -0
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: 78dfff42cf959d89f058867dd78a569921f3ccc1bfc3ede6f9ffe5b2abbe666c
|
4
|
+
data.tar.gz: d1292a09a6c8bbdb7a41bbcd8f67581a49f666cf3d417b1d79c0fc27542cd927
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: 39ee155c4a28f708eb87befba316c7d6b56705bed71a05e7f7b4dc8e6a9a91204e6276aa89d3f59a65d8bb5eaeae2959d622abfa3058a92cde31e1bbf1d9430b
|
7
|
+
data.tar.gz: 5b621c3f9dba3779912c6ec7cc3d42ec7aae1096db5b1b44e31b178f4ddc16fdd20d8ce062521989d85f2abc4dc575b6575eadceb877fc96ec8bb5217a675028
|
data/.dockerignore
ADDED
data/.gitignore
ADDED
data/.rspec
ADDED
data/.rubocop.yml
ADDED
@@ -0,0 +1,129 @@
|
|
1
|
+
AllCops:
|
2
|
+
TargetRubyVersion: 2.4
|
3
|
+
Include:
|
4
|
+
- ./Rakefile
|
5
|
+
Exclude:
|
6
|
+
- bin/**/*
|
7
|
+
|
8
|
+
# Rails:
|
9
|
+
# Enabled: false
|
10
|
+
|
11
|
+
Layout/AlignParameters:
|
12
|
+
Enabled: false
|
13
|
+
|
14
|
+
Layout/ClosingParenthesisIndentation:
|
15
|
+
Enabled: false
|
16
|
+
|
17
|
+
Layout/DotPosition:
|
18
|
+
EnforcedStyle: leading
|
19
|
+
|
20
|
+
Layout/EmptyLines:
|
21
|
+
Enabled: true
|
22
|
+
|
23
|
+
Layout/EmptyLinesAroundBlockBody:
|
24
|
+
Enabled: true
|
25
|
+
|
26
|
+
Layout/IndentArray:
|
27
|
+
EnforcedStyle: consistent
|
28
|
+
|
29
|
+
Layout/IndentHash:
|
30
|
+
EnforcedStyle: consistent
|
31
|
+
|
32
|
+
Layout/MultilineMethodCallIndentation:
|
33
|
+
EnforcedStyle: indented
|
34
|
+
|
35
|
+
Layout/MultilineOperationIndentation:
|
36
|
+
EnforcedStyle: indented
|
37
|
+
|
38
|
+
Layout/SpaceAroundOperators:
|
39
|
+
AllowForAlignment: true
|
40
|
+
|
41
|
+
Layout/SpaceBeforeFirstArg:
|
42
|
+
AllowForAlignment: true
|
43
|
+
|
44
|
+
Layout/SpaceInsideBlockBraces:
|
45
|
+
Enabled: false
|
46
|
+
|
47
|
+
Lint/EndAlignment:
|
48
|
+
EnforcedStyleAlignWith: variable
|
49
|
+
|
50
|
+
Lint/UnusedBlockArgument:
|
51
|
+
Enabled: false
|
52
|
+
|
53
|
+
Lint/UnusedMethodArgument:
|
54
|
+
Enabled: false
|
55
|
+
|
56
|
+
Metrics/BlockLength:
|
57
|
+
Enabled: false
|
58
|
+
|
59
|
+
Metrics/ClassLength:
|
60
|
+
Max: 250
|
61
|
+
|
62
|
+
Metrics/LineLength:
|
63
|
+
Max: 120
|
64
|
+
|
65
|
+
Metrics/MethodLength:
|
66
|
+
Max: 52
|
67
|
+
|
68
|
+
Metrics/ModuleLength:
|
69
|
+
Max: 300
|
70
|
+
|
71
|
+
Naming/FileName:
|
72
|
+
Enabled: false
|
73
|
+
|
74
|
+
Naming/PredicateName:
|
75
|
+
NamePrefix:
|
76
|
+
- 'is_'
|
77
|
+
|
78
|
+
Performance/HashEachMethods:
|
79
|
+
Enabled: false
|
80
|
+
|
81
|
+
Style/Documentation:
|
82
|
+
Enabled: false
|
83
|
+
|
84
|
+
Style/EmptyElse:
|
85
|
+
Enabled: false
|
86
|
+
|
87
|
+
Style/FrozenStringLiteralComment:
|
88
|
+
Enabled: false
|
89
|
+
|
90
|
+
Style/GlobalVars:
|
91
|
+
Enabled: true
|
92
|
+
|
93
|
+
Style/GuardClause:
|
94
|
+
Enabled: false
|
95
|
+
|
96
|
+
Style/Lambda:
|
97
|
+
Enabled: false
|
98
|
+
|
99
|
+
Style/Proc:
|
100
|
+
Enabled: false
|
101
|
+
|
102
|
+
Style/RaiseArgs:
|
103
|
+
Enabled: false
|
104
|
+
|
105
|
+
Style/RegexpLiteral:
|
106
|
+
EnforcedStyle: slashes
|
107
|
+
AllowInnerSlashes: true
|
108
|
+
|
109
|
+
Style/RescueModifier:
|
110
|
+
Enabled: false
|
111
|
+
|
112
|
+
Style/Semicolon:
|
113
|
+
AllowAsExpressionSeparator: true
|
114
|
+
|
115
|
+
Style/SignalException:
|
116
|
+
Enabled: false
|
117
|
+
|
118
|
+
Style/SingleLineBlockParams:
|
119
|
+
Enabled: false
|
120
|
+
|
121
|
+
Style/StringLiterals:
|
122
|
+
Enabled: false
|
123
|
+
|
124
|
+
Style/SymbolArray:
|
125
|
+
Enabled: false
|
126
|
+
|
127
|
+
Style/WordArray:
|
128
|
+
EnforcedStyle: percent
|
129
|
+
MinSize: 5
|
data/.travis.yml
ADDED
data/Dockerfile
ADDED
@@ -0,0 +1,18 @@
|
|
1
|
+
FROM ruby:2.5
|
2
|
+
LABEL author="David Elner"
|
3
|
+
LABEL author_email="david@davidelner.com"
|
4
|
+
|
5
|
+
# Setup a working directory
|
6
|
+
WORKDIR /opt/skeletron
|
7
|
+
|
8
|
+
# Copy gem specifications
|
9
|
+
RUN gem install bundler -v '1.16.1'
|
10
|
+
COPY Gemfile* ./
|
11
|
+
COPY skeletron.gemspec .
|
12
|
+
COPY lib/skeletron/version.rb lib/skeletron/
|
13
|
+
|
14
|
+
# Install gems
|
15
|
+
RUN bundle install --system
|
16
|
+
|
17
|
+
# Add source code
|
18
|
+
COPY . /opt/skeletron
|
data/Gemfile
ADDED
data/LICENSE.txt
ADDED
@@ -0,0 +1,21 @@
|
|
1
|
+
The MIT License (MIT)
|
2
|
+
|
3
|
+
Copyright (c) 2018 David Elner
|
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/Makefile
ADDED
@@ -0,0 +1,25 @@
|
|
1
|
+
.PHONY: build-gem build-image bash rspec
|
2
|
+
|
3
|
+
# Gem
|
4
|
+
# ---
|
5
|
+
|
6
|
+
build-gem:
|
7
|
+
gem build skeletron.gemspec
|
8
|
+
|
9
|
+
# Docker
|
10
|
+
# ------
|
11
|
+
|
12
|
+
build-image:
|
13
|
+
docker-compose build
|
14
|
+
|
15
|
+
bash:
|
16
|
+
docker-compose run --rm skeletron /bin/bash
|
17
|
+
|
18
|
+
console:
|
19
|
+
docker-compose run --rm skeletron ./bin/console
|
20
|
+
|
21
|
+
rspec:
|
22
|
+
docker-compose run --rm skeletron bundle exec rspec
|
23
|
+
|
24
|
+
rubocop:
|
25
|
+
docker-compose run --rm skeletron bundle exec rubocop
|
data/README.md
ADDED
@@ -0,0 +1,77 @@
|
|
1
|
+
# Skeletron
|
2
|
+
|
3
|
+
Skeletron is library to aid the building of Ruby applications on "use-case-driven" architecture.
|
4
|
+
|
5
|
+
### What is "use-case-driven" (UCD) architecture?
|
6
|
+
|
7
|
+

|
8
|
+
|
9
|
+
**Robert Martin describes the architecture in his "Architecture: The Lost Years" lecture**:
|
10
|
+
|
11
|
+
[](https://www.youtube.com/watch?v=WpkDN78P884)
|
12
|
+
|
13
|
+
https://www.youtube.com/watch?v=WpkDN78P884
|
14
|
+
|
15
|
+
**This architecture aims to address some common problems in modern Ruby applications**:
|
16
|
+
|
17
|
+
- Web-layer coupling with application-layer logic.
|
18
|
+
- Application-layer coupling with database implementation.
|
19
|
+
- Complicated and expensive unit testing that results from this coupling.
|
20
|
+
|
21
|
+
**And to this end, emphasizes a few key points**:
|
22
|
+
|
23
|
+
- HTTP/Web/Rails is a delivery mechanism
|
24
|
+
- Database is a detail; not any integral part of the intent of the applicaiton itself.
|
25
|
+
- A good architecture allows major decisions to be deferred: e.g. choosing a database.
|
26
|
+
- A good architecture maximizes the number of decisions *NOT* made.
|
27
|
+
- So you can decide those later and plug them in to fit business needs or respond to changes in business logic.
|
28
|
+
|
29
|
+
#### Key components
|
30
|
+
|
31
|
+
- **Entities**
|
32
|
+
|
33
|
+
Generic business objects & rules, agnostic to presentation or storage mechanisms (e.g. Order, Customer).
|
34
|
+
|
35
|
+
- **Interactors**
|
36
|
+
|
37
|
+
Application specific business rules; Manipulates the relevant data from the Request Model and interacts with the Entities.
|
38
|
+
|
39
|
+
- **Boundaries & Gateways**
|
40
|
+
|
41
|
+
Protocols or Interfaces for defining .
|
42
|
+
|
43
|
+
- **Models**
|
44
|
+
|
45
|
+
Dumb data structures representing input or output, without methods. e.g. Request Model, Response Model, View Model.
|
46
|
+
|
47
|
+
- **Controllers**
|
48
|
+
|
49
|
+
Convert the stuff submitted by the delivery mechanism into a delivery agnostic Request Model.
|
50
|
+
|
51
|
+
- **Presenters**
|
52
|
+
|
53
|
+
Turns the delivery agnostic Response Model into a prepared “viewified” data structure ready for easy manipulation by the view.
|
54
|
+
|
55
|
+
### Mission statement
|
56
|
+
|
57
|
+
Skeletron aims to:
|
58
|
+
|
59
|
+
- **Provide modules to aid implemention UCD architecture**: They are optional and composable, so you can implement only what you want.
|
60
|
+
- **Favor simplicity over convention**: In order to promote extensibility and modularity to give the author maximum freedom.
|
61
|
+
|
62
|
+
It is **NOT**:
|
63
|
+
|
64
|
+
- **An application framework in itself** e.g. Rails; it's an application library.
|
65
|
+
- **"Opinionated"**: it's here to aid your architecture choices, not constrain.
|
66
|
+
|
67
|
+
### Quickstart
|
68
|
+
|
69
|
+
*TODO*
|
70
|
+
|
71
|
+
#### Available features
|
72
|
+
|
73
|
+
*TODO*
|
74
|
+
|
75
|
+
### Contributing
|
76
|
+
|
77
|
+
*TODO*
|
data/Rakefile
ADDED
Binary file
|
data/bin/console
ADDED
@@ -0,0 +1,14 @@
|
|
1
|
+
#!/usr/bin/env ruby
|
2
|
+
|
3
|
+
require "bundler/setup"
|
4
|
+
require "skeletron"
|
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(__FILE__)
|
data/bin/setup
ADDED
data/docker-compose.yml
ADDED
data/lib/skeletron.rb
ADDED
@@ -0,0 +1,38 @@
|
|
1
|
+
module Skeletron
|
2
|
+
module Entity
|
3
|
+
module Relatable
|
4
|
+
def self.included(base)
|
5
|
+
base.extend(ClassMethods)
|
6
|
+
end
|
7
|
+
|
8
|
+
module ClassMethods
|
9
|
+
def define_associates(*args)
|
10
|
+
(@associates = args).tap { set_association_methods! }
|
11
|
+
end
|
12
|
+
|
13
|
+
def associates
|
14
|
+
@associates ||= []
|
15
|
+
end
|
16
|
+
|
17
|
+
private
|
18
|
+
|
19
|
+
def set_association_methods!
|
20
|
+
generate_association_methods.tap do |mod|
|
21
|
+
const_set(:"#{name.split('::').last}AssociationMethods", mod)
|
22
|
+
include(mod)
|
23
|
+
end
|
24
|
+
end
|
25
|
+
|
26
|
+
def generate_association_methods
|
27
|
+
associates = self.associates
|
28
|
+
|
29
|
+
Module.new do
|
30
|
+
class_eval <<-METHODS, __FILE__, __LINE__ + 1
|
31
|
+
#{associates.collect { |k| "attr_accessor :#{k}" }.join("\n")}
|
32
|
+
METHODS
|
33
|
+
end
|
34
|
+
end
|
35
|
+
end
|
36
|
+
end
|
37
|
+
end
|
38
|
+
end
|
@@ -0,0 +1,18 @@
|
|
1
|
+
require 'skeletron/entity_gateway/errors'
|
2
|
+
require 'skeletron/entity_gateway/creatable'
|
3
|
+
require 'skeletron/entity_gateway/deletable'
|
4
|
+
require 'skeletron/entity_gateway/readable'
|
5
|
+
require 'skeletron/entity_gateway/updatable'
|
6
|
+
require 'skeletron/entity_gateway/transactor'
|
7
|
+
|
8
|
+
module Skeletron
|
9
|
+
module EntityGateway
|
10
|
+
def self.included(base)
|
11
|
+
base.include(Creatable)
|
12
|
+
base.include(Readable)
|
13
|
+
base.include(Updatable)
|
14
|
+
base.include(Deletable)
|
15
|
+
base.include(Transactor)
|
16
|
+
end
|
17
|
+
end
|
18
|
+
end
|
@@ -0,0 +1,21 @@
|
|
1
|
+
module Skeletron
|
2
|
+
module EntityGateway
|
3
|
+
module Creatable
|
4
|
+
# Build a new entity, without persisting it
|
5
|
+
# attributes: Hash of attributes for the entity
|
6
|
+
# block: Proc { |entity| }, called after build.
|
7
|
+
# Returns: Entity object.
|
8
|
+
def build(attributes = {}, &block)
|
9
|
+
raise NotImplementedError.new
|
10
|
+
end
|
11
|
+
|
12
|
+
# Create a new entity and persist it
|
13
|
+
# attributes: Hash of attributes for the entity
|
14
|
+
# block: Proc { |entity| }, called after build, before save.
|
15
|
+
# Returns: Entity object.
|
16
|
+
def create(attributes = {}, &block)
|
17
|
+
raise NotImplementedError.new
|
18
|
+
end
|
19
|
+
end
|
20
|
+
end
|
21
|
+
end
|
@@ -0,0 +1,19 @@
|
|
1
|
+
module Skeletron
|
2
|
+
module EntityGateway
|
3
|
+
module Deletable
|
4
|
+
# Delete entity by ID
|
5
|
+
# id: ID of the entity
|
6
|
+
# Returns: true.
|
7
|
+
def delete(id)
|
8
|
+
raise NotImplementedError.new
|
9
|
+
end
|
10
|
+
|
11
|
+
# Delete all entities which match all attributes
|
12
|
+
# attributes: Hash of attributes to match
|
13
|
+
# Returns: Integer count of entities deleted.
|
14
|
+
def delete_all(attributes = {})
|
15
|
+
raise NotImplementedError.new
|
16
|
+
end
|
17
|
+
end
|
18
|
+
end
|
19
|
+
end
|
@@ -0,0 +1,28 @@
|
|
1
|
+
module Skeletron
|
2
|
+
module EntityGateway
|
3
|
+
module Readable
|
4
|
+
# Find entity by ID
|
5
|
+
# id: ID of the entity
|
6
|
+
# Returns: Entity object.
|
7
|
+
# Raises NotFoundError if no result.
|
8
|
+
def find(id)
|
9
|
+
raise NotImplementedError.new
|
10
|
+
end
|
11
|
+
|
12
|
+
# Find entity by ID
|
13
|
+
# id: ID of the entity
|
14
|
+
# Returns: Entity object.
|
15
|
+
# Returns null entity object if no result.
|
16
|
+
def find_by_id(id)
|
17
|
+
raise NotImplementedError.new
|
18
|
+
end
|
19
|
+
|
20
|
+
# Find entities which match all attributes
|
21
|
+
# attributes: Hash of attributes to match
|
22
|
+
# Returns: Array of entity objects.
|
23
|
+
def find_all_by(attributes = {})
|
24
|
+
raise NotImplementedError.new
|
25
|
+
end
|
26
|
+
end
|
27
|
+
end
|
28
|
+
end
|
@@ -0,0 +1,14 @@
|
|
1
|
+
module Skeletron
|
2
|
+
module EntityGateway
|
3
|
+
# Represents an type that is capable of performing transactions
|
4
|
+
module Transactor
|
5
|
+
# Runs a transaction.
|
6
|
+
# block: Proc that defines transaction body of work.
|
7
|
+
# When block finishes, changes are committed or rolled back.
|
8
|
+
# Returns: `block` return value.
|
9
|
+
def transaction(&block)
|
10
|
+
raise NotImplementedError.new
|
11
|
+
end
|
12
|
+
end
|
13
|
+
end
|
14
|
+
end
|
@@ -0,0 +1,21 @@
|
|
1
|
+
module Skeletron
|
2
|
+
module EntityGateway
|
3
|
+
module Updatable
|
4
|
+
# Update entity by ID
|
5
|
+
# id: ID of the entity
|
6
|
+
# attributes: Hash of attributes to update
|
7
|
+
# Returns: Entity object.
|
8
|
+
def update(id:, attributes: {})
|
9
|
+
raise NotImplementedError.new
|
10
|
+
end
|
11
|
+
|
12
|
+
# Update all entities which match all attributes
|
13
|
+
# by: Hash of attributes to match
|
14
|
+
# with: Hash of attributes to update
|
15
|
+
# Returns: Array of entity objects.
|
16
|
+
def update_all(by: {}, with: {})
|
17
|
+
raise NotImplementedError.new
|
18
|
+
end
|
19
|
+
end
|
20
|
+
end
|
21
|
+
end
|
@@ -0,0 +1,68 @@
|
|
1
|
+
require 'skeletron/entity_gateway'
|
2
|
+
|
3
|
+
module Skeletron
|
4
|
+
module Null
|
5
|
+
module EntityGateway
|
6
|
+
def self.included(base)
|
7
|
+
base.include(Skeletron::EntityGateway)
|
8
|
+
base.extend(ClassMethods)
|
9
|
+
base.include(InstanceMethods)
|
10
|
+
end
|
11
|
+
|
12
|
+
module ClassMethods
|
13
|
+
def define_default_object(object = nil, &block)
|
14
|
+
@default_object = object || block
|
15
|
+
end
|
16
|
+
|
17
|
+
def default_object
|
18
|
+
return @default_object.call if @default_object.class <= Proc
|
19
|
+
@default_object
|
20
|
+
end
|
21
|
+
end
|
22
|
+
|
23
|
+
module InstanceMethods
|
24
|
+
# Creatable
|
25
|
+
def build(attributes = {})
|
26
|
+
self.class.default_object.tap do |card|
|
27
|
+
yield(card) if block_given?
|
28
|
+
end
|
29
|
+
end
|
30
|
+
|
31
|
+
def create(attributes = {}, &block)
|
32
|
+
build(attributes, &block)
|
33
|
+
end
|
34
|
+
|
35
|
+
# Readable
|
36
|
+
def find(id)
|
37
|
+
raise Skeletron::EntityGateway::NotFoundError.new(id)
|
38
|
+
end
|
39
|
+
|
40
|
+
def find_by_id(id)
|
41
|
+
self.class.default_object
|
42
|
+
end
|
43
|
+
|
44
|
+
def find_all_by(attributes = {})
|
45
|
+
[]
|
46
|
+
end
|
47
|
+
|
48
|
+
# Updatable
|
49
|
+
def update(id:, attributes: {})
|
50
|
+
self.class.default_object
|
51
|
+
end
|
52
|
+
|
53
|
+
def update_all(by: {}, with: {})
|
54
|
+
[]
|
55
|
+
end
|
56
|
+
|
57
|
+
# Deletable
|
58
|
+
def delete(id)
|
59
|
+
true
|
60
|
+
end
|
61
|
+
|
62
|
+
def delete_all(attributes = {})
|
63
|
+
0
|
64
|
+
end
|
65
|
+
end
|
66
|
+
end
|
67
|
+
end
|
68
|
+
end
|
data/skeletron.gemspec
ADDED
@@ -0,0 +1,30 @@
|
|
1
|
+
|
2
|
+
lib = File.expand_path('../lib', __FILE__)
|
3
|
+
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
4
|
+
require 'skeletron/version'
|
5
|
+
|
6
|
+
Gem::Specification.new do |spec|
|
7
|
+
spec.name = 'skeletron'
|
8
|
+
spec.version = Skeletron::VERSION
|
9
|
+
spec.authors = ['David Elner']
|
10
|
+
spec.email = ['david@davidelner.com']
|
11
|
+
|
12
|
+
spec.summary = 'Library for building use-case-driven Ruby applications.'
|
13
|
+
spec.description = 'Library for building use-case-driven Ruby applications.'
|
14
|
+
spec.homepage = 'http://github.com/delner/skeletron'
|
15
|
+
|
16
|
+
spec.files = `git ls-files -z`.split("\x0").reject do |f|
|
17
|
+
f.match(/^(test|spec|features)\//)
|
18
|
+
end
|
19
|
+
spec.bindir = 'exe'
|
20
|
+
spec.executables = spec.files.grep(/^exe\//) { |f| File.basename(f) }
|
21
|
+
spec.require_paths = ['lib']
|
22
|
+
|
23
|
+
spec.add_development_dependency 'bundler', '~> 1.16'
|
24
|
+
spec.add_development_dependency 'pry', '~> 0.11'
|
25
|
+
spec.add_development_dependency 'pry-stack_explorer', '~> 0.4'
|
26
|
+
spec.add_development_dependency 'rake', '~> 10.0'
|
27
|
+
spec.add_development_dependency 'rspec', '~> 3.0'
|
28
|
+
spec.add_development_dependency 'rubocop', '~> 0.50'
|
29
|
+
spec.add_development_dependency 'simplecov', '~> 0.15'
|
30
|
+
end
|
metadata
ADDED
@@ -0,0 +1,171 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: skeletron
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.1.0
|
5
|
+
platform: ruby
|
6
|
+
authors:
|
7
|
+
- David Elner
|
8
|
+
autorequire:
|
9
|
+
bindir: exe
|
10
|
+
cert_chain: []
|
11
|
+
date: 2018-02-12 00:00:00.000000000 Z
|
12
|
+
dependencies:
|
13
|
+
- !ruby/object:Gem::Dependency
|
14
|
+
name: bundler
|
15
|
+
requirement: !ruby/object:Gem::Requirement
|
16
|
+
requirements:
|
17
|
+
- - "~>"
|
18
|
+
- !ruby/object:Gem::Version
|
19
|
+
version: '1.16'
|
20
|
+
type: :development
|
21
|
+
prerelease: false
|
22
|
+
version_requirements: !ruby/object:Gem::Requirement
|
23
|
+
requirements:
|
24
|
+
- - "~>"
|
25
|
+
- !ruby/object:Gem::Version
|
26
|
+
version: '1.16'
|
27
|
+
- !ruby/object:Gem::Dependency
|
28
|
+
name: pry
|
29
|
+
requirement: !ruby/object:Gem::Requirement
|
30
|
+
requirements:
|
31
|
+
- - "~>"
|
32
|
+
- !ruby/object:Gem::Version
|
33
|
+
version: '0.11'
|
34
|
+
type: :development
|
35
|
+
prerelease: false
|
36
|
+
version_requirements: !ruby/object:Gem::Requirement
|
37
|
+
requirements:
|
38
|
+
- - "~>"
|
39
|
+
- !ruby/object:Gem::Version
|
40
|
+
version: '0.11'
|
41
|
+
- !ruby/object:Gem::Dependency
|
42
|
+
name: pry-stack_explorer
|
43
|
+
requirement: !ruby/object:Gem::Requirement
|
44
|
+
requirements:
|
45
|
+
- - "~>"
|
46
|
+
- !ruby/object:Gem::Version
|
47
|
+
version: '0.4'
|
48
|
+
type: :development
|
49
|
+
prerelease: false
|
50
|
+
version_requirements: !ruby/object:Gem::Requirement
|
51
|
+
requirements:
|
52
|
+
- - "~>"
|
53
|
+
- !ruby/object:Gem::Version
|
54
|
+
version: '0.4'
|
55
|
+
- !ruby/object:Gem::Dependency
|
56
|
+
name: rake
|
57
|
+
requirement: !ruby/object:Gem::Requirement
|
58
|
+
requirements:
|
59
|
+
- - "~>"
|
60
|
+
- !ruby/object:Gem::Version
|
61
|
+
version: '10.0'
|
62
|
+
type: :development
|
63
|
+
prerelease: false
|
64
|
+
version_requirements: !ruby/object:Gem::Requirement
|
65
|
+
requirements:
|
66
|
+
- - "~>"
|
67
|
+
- !ruby/object:Gem::Version
|
68
|
+
version: '10.0'
|
69
|
+
- !ruby/object:Gem::Dependency
|
70
|
+
name: rspec
|
71
|
+
requirement: !ruby/object:Gem::Requirement
|
72
|
+
requirements:
|
73
|
+
- - "~>"
|
74
|
+
- !ruby/object:Gem::Version
|
75
|
+
version: '3.0'
|
76
|
+
type: :development
|
77
|
+
prerelease: false
|
78
|
+
version_requirements: !ruby/object:Gem::Requirement
|
79
|
+
requirements:
|
80
|
+
- - "~>"
|
81
|
+
- !ruby/object:Gem::Version
|
82
|
+
version: '3.0'
|
83
|
+
- !ruby/object:Gem::Dependency
|
84
|
+
name: rubocop
|
85
|
+
requirement: !ruby/object:Gem::Requirement
|
86
|
+
requirements:
|
87
|
+
- - "~>"
|
88
|
+
- !ruby/object:Gem::Version
|
89
|
+
version: '0.50'
|
90
|
+
type: :development
|
91
|
+
prerelease: false
|
92
|
+
version_requirements: !ruby/object:Gem::Requirement
|
93
|
+
requirements:
|
94
|
+
- - "~>"
|
95
|
+
- !ruby/object:Gem::Version
|
96
|
+
version: '0.50'
|
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.15'
|
104
|
+
type: :development
|
105
|
+
prerelease: false
|
106
|
+
version_requirements: !ruby/object:Gem::Requirement
|
107
|
+
requirements:
|
108
|
+
- - "~>"
|
109
|
+
- !ruby/object:Gem::Version
|
110
|
+
version: '0.15'
|
111
|
+
description: Library for building use-case-driven Ruby applications.
|
112
|
+
email:
|
113
|
+
- david@davidelner.com
|
114
|
+
executables: []
|
115
|
+
extensions: []
|
116
|
+
extra_rdoc_files: []
|
117
|
+
files:
|
118
|
+
- ".dockerignore"
|
119
|
+
- ".gitignore"
|
120
|
+
- ".rspec"
|
121
|
+
- ".rubocop.yml"
|
122
|
+
- ".travis.yml"
|
123
|
+
- Dockerfile
|
124
|
+
- Gemfile
|
125
|
+
- LICENSE.txt
|
126
|
+
- Makefile
|
127
|
+
- README.md
|
128
|
+
- Rakefile
|
129
|
+
- architecture_diagram.png
|
130
|
+
- bin/console
|
131
|
+
- bin/setup
|
132
|
+
- docker-compose.yml
|
133
|
+
- lib/skeletron.rb
|
134
|
+
- lib/skeletron/entity.rb
|
135
|
+
- lib/skeletron/entity/identifiable.rb
|
136
|
+
- lib/skeletron/entity/relatable.rb
|
137
|
+
- lib/skeletron/entity_gateway.rb
|
138
|
+
- lib/skeletron/entity_gateway/creatable.rb
|
139
|
+
- lib/skeletron/entity_gateway/deletable.rb
|
140
|
+
- lib/skeletron/entity_gateway/errors.rb
|
141
|
+
- lib/skeletron/entity_gateway/readable.rb
|
142
|
+
- lib/skeletron/entity_gateway/transactor.rb
|
143
|
+
- lib/skeletron/entity_gateway/updatable.rb
|
144
|
+
- lib/skeletron/null/entity_gateway.rb
|
145
|
+
- lib/skeletron/null/entity_gateway/transactor.rb
|
146
|
+
- lib/skeletron/version.rb
|
147
|
+
- skeletron.gemspec
|
148
|
+
homepage: http://github.com/delner/skeletron
|
149
|
+
licenses: []
|
150
|
+
metadata: {}
|
151
|
+
post_install_message:
|
152
|
+
rdoc_options: []
|
153
|
+
require_paths:
|
154
|
+
- lib
|
155
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
156
|
+
requirements:
|
157
|
+
- - ">="
|
158
|
+
- !ruby/object:Gem::Version
|
159
|
+
version: '0'
|
160
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
161
|
+
requirements:
|
162
|
+
- - ">="
|
163
|
+
- !ruby/object:Gem::Version
|
164
|
+
version: '0'
|
165
|
+
requirements: []
|
166
|
+
rubyforge_project:
|
167
|
+
rubygems_version: 2.7.3
|
168
|
+
signing_key:
|
169
|
+
specification_version: 4
|
170
|
+
summary: Library for building use-case-driven Ruby applications.
|
171
|
+
test_files: []
|