bounded_context 0.18.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/Gemfile +6 -0
- data/Makefile +27 -0
- data/README.md +3 -0
- data/bounded_context.gemspec +27 -0
- data/lib/bounded_context/generator.rb +25 -0
- data/lib/bounded_context/templates/module.rb +2 -0
- data/lib/bounded_context/version.rb +3 -0
- data/lib/bounded_context.rb +5 -0
- metadata +135 -0
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA1:
|
3
|
+
metadata.gz: 07e5c0023b0bc09abb28f4fca3d420f55c8b5a22
|
4
|
+
data.tar.gz: 06b0163ed90ec9dbd483d7bbd599112111815193
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: 667e1b338bd7063fbc8680cc665336f1625bd67cf4bb664c50e4d3c2f87a85a7aa4f11bdb079098d850c72946ee2d6893194a27a06f25f2f7c2416815d6237b0
|
7
|
+
data.tar.gz: 35c12c7451a6689915f0726698bae05026bf9a303315ec7cec4964857616120bc9bdc83d06ad2d1100049900dfbfc4e8b47463397bda5b0a17604ce9daed5a79
|
data/Gemfile
ADDED
data/Makefile
ADDED
@@ -0,0 +1,27 @@
|
|
1
|
+
GEM_VERSION = `cat ../RES_VERSION`
|
2
|
+
|
3
|
+
install: ## Install gem dependencies
|
4
|
+
@echo "Installing gem dependencies"
|
5
|
+
@bundle install
|
6
|
+
|
7
|
+
test: ## Run tests
|
8
|
+
@echo "Running basic tests - beware: this won't guarantee build pass"
|
9
|
+
@bundle exec rspec
|
10
|
+
|
11
|
+
mutate: test ## Run mutation tests
|
12
|
+
@echo "Running mutation tests - only 100% free mutation will be accepted"
|
13
|
+
@bundle exec mutant --include lib --require bounded_context --use rspec "BoundedContext*"
|
14
|
+
|
15
|
+
build:
|
16
|
+
@gem build -V bounded_context.gemspec
|
17
|
+
@mkdir -p pkg/
|
18
|
+
@mv bounded_context-$(GEM_VERSION).gem pkg/
|
19
|
+
|
20
|
+
release: build
|
21
|
+
@gem push pkg/bounded_context-$(GEM_VERSION).gem
|
22
|
+
|
23
|
+
help:
|
24
|
+
@grep -E '^[a-zA-Z_-]+:.*?## .*$$' $(MAKEFILE_LIST) | sort | awk 'BEGIN {FS = ":.*?## "}; {printf "\033[36m%-30s\033[0m %s\n", $$1, $$2}'
|
25
|
+
|
26
|
+
.PHONY: help
|
27
|
+
.DEFAULT_GOAL := help
|
data/README.md
ADDED
@@ -0,0 +1,27 @@
|
|
1
|
+
|
2
|
+
lib = File.expand_path("../lib", __FILE__)
|
3
|
+
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
4
|
+
require "bounded_context/version"
|
5
|
+
|
6
|
+
Gem::Specification.new do |spec|
|
7
|
+
spec.name = "bounded_context"
|
8
|
+
spec.version = BoundedContext::VERSION
|
9
|
+
spec.authors = ["Paweł Pacana"]
|
10
|
+
spec.email = ["pawel.pacana@gmail.com"]
|
11
|
+
|
12
|
+
spec.summary = %q{Generate opinionated component structure.}
|
13
|
+
|
14
|
+
spec.files = `git ls-files -z`.split("\x0").reject do |f|
|
15
|
+
f.match(%r{^(test|spec|features)/})
|
16
|
+
end
|
17
|
+
spec.bindir = "exe"
|
18
|
+
spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
|
19
|
+
spec.require_paths = ["lib"]
|
20
|
+
|
21
|
+
spec.add_development_dependency "bundler", "~> 1.15"
|
22
|
+
spec.add_development_dependency "rake", "~> 10.0"
|
23
|
+
spec.add_development_dependency "rspec", "~> 3.6"
|
24
|
+
spec.add_development_dependency "rails", "~> 4.2"
|
25
|
+
spec.add_development_dependency "fakefs", "~> 0.11.2"
|
26
|
+
spec.add_development_dependency 'mutant-rspec', '~> 0.8.14'
|
27
|
+
end
|
@@ -0,0 +1,25 @@
|
|
1
|
+
require 'rails/generators'
|
2
|
+
|
3
|
+
module BoundedContext
|
4
|
+
class Generator < Rails::Generators::NamedBase
|
5
|
+
source_root File.expand_path(File.join(File.dirname(__FILE__), 'templates'))
|
6
|
+
|
7
|
+
def create_bounded_context
|
8
|
+
template "module.rb", "#{bounded_context_name}/lib/#{bounded_context_name}.rb"
|
9
|
+
|
10
|
+
application do
|
11
|
+
"config.paths.add '#{bounded_context_name}/lib', eager_load: true"
|
12
|
+
end
|
13
|
+
end
|
14
|
+
|
15
|
+
private
|
16
|
+
|
17
|
+
def bounded_context_namespace
|
18
|
+
name.camelize
|
19
|
+
end
|
20
|
+
|
21
|
+
def bounded_context_name
|
22
|
+
name.underscore
|
23
|
+
end
|
24
|
+
end
|
25
|
+
end
|
metadata
ADDED
@@ -0,0 +1,135 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: bounded_context
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.18.0
|
5
|
+
platform: ruby
|
6
|
+
authors:
|
7
|
+
- Paweł Pacana
|
8
|
+
autorequire:
|
9
|
+
bindir: exe
|
10
|
+
cert_chain: []
|
11
|
+
date: 2017-09-25 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.15'
|
20
|
+
type: :development
|
21
|
+
prerelease: false
|
22
|
+
version_requirements: !ruby/object:Gem::Requirement
|
23
|
+
requirements:
|
24
|
+
- - "~>"
|
25
|
+
- !ruby/object:Gem::Version
|
26
|
+
version: '1.15'
|
27
|
+
- !ruby/object:Gem::Dependency
|
28
|
+
name: rake
|
29
|
+
requirement: !ruby/object:Gem::Requirement
|
30
|
+
requirements:
|
31
|
+
- - "~>"
|
32
|
+
- !ruby/object:Gem::Version
|
33
|
+
version: '10.0'
|
34
|
+
type: :development
|
35
|
+
prerelease: false
|
36
|
+
version_requirements: !ruby/object:Gem::Requirement
|
37
|
+
requirements:
|
38
|
+
- - "~>"
|
39
|
+
- !ruby/object:Gem::Version
|
40
|
+
version: '10.0'
|
41
|
+
- !ruby/object:Gem::Dependency
|
42
|
+
name: rspec
|
43
|
+
requirement: !ruby/object:Gem::Requirement
|
44
|
+
requirements:
|
45
|
+
- - "~>"
|
46
|
+
- !ruby/object:Gem::Version
|
47
|
+
version: '3.6'
|
48
|
+
type: :development
|
49
|
+
prerelease: false
|
50
|
+
version_requirements: !ruby/object:Gem::Requirement
|
51
|
+
requirements:
|
52
|
+
- - "~>"
|
53
|
+
- !ruby/object:Gem::Version
|
54
|
+
version: '3.6'
|
55
|
+
- !ruby/object:Gem::Dependency
|
56
|
+
name: rails
|
57
|
+
requirement: !ruby/object:Gem::Requirement
|
58
|
+
requirements:
|
59
|
+
- - "~>"
|
60
|
+
- !ruby/object:Gem::Version
|
61
|
+
version: '4.2'
|
62
|
+
type: :development
|
63
|
+
prerelease: false
|
64
|
+
version_requirements: !ruby/object:Gem::Requirement
|
65
|
+
requirements:
|
66
|
+
- - "~>"
|
67
|
+
- !ruby/object:Gem::Version
|
68
|
+
version: '4.2'
|
69
|
+
- !ruby/object:Gem::Dependency
|
70
|
+
name: fakefs
|
71
|
+
requirement: !ruby/object:Gem::Requirement
|
72
|
+
requirements:
|
73
|
+
- - "~>"
|
74
|
+
- !ruby/object:Gem::Version
|
75
|
+
version: 0.11.2
|
76
|
+
type: :development
|
77
|
+
prerelease: false
|
78
|
+
version_requirements: !ruby/object:Gem::Requirement
|
79
|
+
requirements:
|
80
|
+
- - "~>"
|
81
|
+
- !ruby/object:Gem::Version
|
82
|
+
version: 0.11.2
|
83
|
+
- !ruby/object:Gem::Dependency
|
84
|
+
name: mutant-rspec
|
85
|
+
requirement: !ruby/object:Gem::Requirement
|
86
|
+
requirements:
|
87
|
+
- - "~>"
|
88
|
+
- !ruby/object:Gem::Version
|
89
|
+
version: 0.8.14
|
90
|
+
type: :development
|
91
|
+
prerelease: false
|
92
|
+
version_requirements: !ruby/object:Gem::Requirement
|
93
|
+
requirements:
|
94
|
+
- - "~>"
|
95
|
+
- !ruby/object:Gem::Version
|
96
|
+
version: 0.8.14
|
97
|
+
description:
|
98
|
+
email:
|
99
|
+
- pawel.pacana@gmail.com
|
100
|
+
executables: []
|
101
|
+
extensions: []
|
102
|
+
extra_rdoc_files: []
|
103
|
+
files:
|
104
|
+
- Gemfile
|
105
|
+
- Makefile
|
106
|
+
- README.md
|
107
|
+
- bounded_context.gemspec
|
108
|
+
- lib/bounded_context.rb
|
109
|
+
- lib/bounded_context/generator.rb
|
110
|
+
- lib/bounded_context/templates/module.rb
|
111
|
+
- lib/bounded_context/version.rb
|
112
|
+
homepage:
|
113
|
+
licenses: []
|
114
|
+
metadata: {}
|
115
|
+
post_install_message:
|
116
|
+
rdoc_options: []
|
117
|
+
require_paths:
|
118
|
+
- lib
|
119
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
120
|
+
requirements:
|
121
|
+
- - ">="
|
122
|
+
- !ruby/object:Gem::Version
|
123
|
+
version: '0'
|
124
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
125
|
+
requirements:
|
126
|
+
- - ">="
|
127
|
+
- !ruby/object:Gem::Version
|
128
|
+
version: '0'
|
129
|
+
requirements: []
|
130
|
+
rubyforge_project:
|
131
|
+
rubygems_version: 2.6.11
|
132
|
+
signing_key:
|
133
|
+
specification_version: 4
|
134
|
+
summary: Generate opinionated component structure.
|
135
|
+
test_files: []
|