ddd_domain 0.0.1 → 0.0.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/MIT-LICENSE +20 -20
- data/README.rdoc +2 -2
- data/Rakefile +34 -34
- data/lib/ddd_domain/version.rb +3 -3
- data/lib/ddd_domain.rb +2 -2
- data/lib/generators/domains/USAGE +8 -8
- data/lib/generators/domains/domains_generator.rb +25 -15
- data/lib/tasks/ddd_domain_tasks.rake +4 -4
- data/test/ddd_domain_test.rb +7 -7
- data/test/dummy/README.rdoc +0 -0
- data/test/dummy/Rakefile +0 -0
- data/test/dummy/app/assets/javascripts/application.js +0 -0
- data/test/dummy/app/assets/stylesheets/application.css +0 -0
- data/test/dummy/app/controllers/application_controller.rb +0 -0
- data/test/dummy/app/helpers/application_helper.rb +0 -0
- data/test/dummy/app/views/layouts/application.html.erb +0 -0
- data/test/dummy/bin/bundle +0 -0
- data/test/dummy/bin/rails +0 -0
- data/test/dummy/bin/rake +0 -0
- data/test/dummy/bin/setup +0 -0
- data/test/dummy/config/application.rb +0 -0
- data/test/dummy/config/boot.rb +0 -0
- data/test/dummy/config/database.yml +0 -0
- data/test/dummy/config/environment.rb +0 -0
- data/test/dummy/config/environments/development.rb +0 -0
- data/test/dummy/config/environments/production.rb +0 -0
- data/test/dummy/config/environments/test.rb +0 -0
- data/test/dummy/config/initializers/assets.rb +0 -0
- data/test/dummy/config/initializers/backtrace_silencers.rb +0 -0
- data/test/dummy/config/initializers/cookies_serializer.rb +0 -0
- data/test/dummy/config/initializers/filter_parameter_logging.rb +0 -0
- data/test/dummy/config/initializers/inflections.rb +0 -0
- data/test/dummy/config/initializers/mime_types.rb +0 -0
- data/test/dummy/config/initializers/session_store.rb +0 -0
- data/test/dummy/config/initializers/wrap_parameters.rb +0 -0
- data/test/dummy/config/locales/en.yml +0 -0
- data/test/dummy/config/routes.rb +0 -0
- data/test/dummy/config/secrets.yml +0 -0
- data/test/dummy/config.ru +0 -0
- data/test/dummy/public/404.html +0 -0
- data/test/dummy/public/422.html +0 -0
- data/test/dummy/public/500.html +0 -0
- data/test/dummy/public/favicon.ico +0 -0
- data/test/test_helper.rb +20 -20
- metadata +29 -29
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: a6448ec0833488d649f449439e9a46f37f6401f7
|
4
|
+
data.tar.gz: 915693f989cd643684ddedd22679d4505cbda867
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 58872885526662e35d131994fe77746f79b0b87c966df8a470856d9c01862196a8ba081d6379bb3df1767f033d9751bb31f314a32ab7b17db110e7beab98b00e
|
7
|
+
data.tar.gz: 31f4f3a8a47c3c98baf33e4a598edd8cba32f05e2432bd50bc9f084381ebd831c5b3c4134511c0de0461448003b246daad0c9925bae2efefeeb822be77d8a96d
|
data/MIT-LICENSE
CHANGED
@@ -1,20 +1,20 @@
|
|
1
|
-
Copyright 2015
|
2
|
-
|
3
|
-
Permission is hereby granted, free of charge, to any person obtaining
|
4
|
-
a copy of this software and associated documentation files (the
|
5
|
-
"Software"), to deal in the Software without restriction, including
|
6
|
-
without limitation the rights to use, copy, modify, merge, publish,
|
7
|
-
distribute, sublicense, and/or sell copies of the Software, and to
|
8
|
-
permit persons to whom the Software is furnished to do so, subject to
|
9
|
-
the following conditions:
|
10
|
-
|
11
|
-
The above copyright notice and this permission notice shall be
|
12
|
-
included in all copies or substantial portions of the Software.
|
13
|
-
|
14
|
-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
15
|
-
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
16
|
-
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
17
|
-
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
18
|
-
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
19
|
-
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
20
|
-
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
1
|
+
Copyright 2015
|
2
|
+
|
3
|
+
Permission is hereby granted, free of charge, to any person obtaining
|
4
|
+
a copy of this software and associated documentation files (the
|
5
|
+
"Software"), to deal in the Software without restriction, including
|
6
|
+
without limitation the rights to use, copy, modify, merge, publish,
|
7
|
+
distribute, sublicense, and/or sell copies of the Software, and to
|
8
|
+
permit persons to whom the Software is furnished to do so, subject to
|
9
|
+
the following conditions:
|
10
|
+
|
11
|
+
The above copyright notice and this permission notice shall be
|
12
|
+
included in all copies or substantial portions of the Software.
|
13
|
+
|
14
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
15
|
+
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
16
|
+
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
17
|
+
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
18
|
+
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
19
|
+
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
20
|
+
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
data/README.rdoc
CHANGED
@@ -1,3 +1,3 @@
|
|
1
|
-
= DddDomain
|
2
|
-
|
1
|
+
= DddDomain
|
2
|
+
|
3
3
|
This project rocks and uses MIT-LICENSE.
|
data/Rakefile
CHANGED
@@ -1,34 +1,34 @@
|
|
1
|
-
begin
|
2
|
-
require 'bundler/setup'
|
3
|
-
rescue LoadError
|
4
|
-
puts 'You must `gem install bundler` and `bundle install` to run rake tasks'
|
5
|
-
end
|
6
|
-
|
7
|
-
require 'rdoc/task'
|
8
|
-
|
9
|
-
RDoc::Task.new(:rdoc) do |rdoc|
|
10
|
-
rdoc.rdoc_dir = 'rdoc'
|
11
|
-
rdoc.title = 'DddDomain'
|
12
|
-
rdoc.options << '--line-numbers'
|
13
|
-
rdoc.rdoc_files.include('README.rdoc')
|
14
|
-
rdoc.rdoc_files.include('lib/**/*.rb')
|
15
|
-
end
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
Bundler::GemHelper.install_tasks
|
23
|
-
|
24
|
-
require 'rake/testtask'
|
25
|
-
|
26
|
-
Rake::TestTask.new(:test) do |t|
|
27
|
-
t.libs << 'lib'
|
28
|
-
t.libs << 'test'
|
29
|
-
t.pattern = 'test/**/*_test.rb'
|
30
|
-
t.verbose = false
|
31
|
-
end
|
32
|
-
|
33
|
-
|
34
|
-
task default: :test
|
1
|
+
begin
|
2
|
+
require 'bundler/setup'
|
3
|
+
rescue LoadError
|
4
|
+
puts 'You must `gem install bundler` and `bundle install` to run rake tasks'
|
5
|
+
end
|
6
|
+
|
7
|
+
require 'rdoc/task'
|
8
|
+
|
9
|
+
RDoc::Task.new(:rdoc) do |rdoc|
|
10
|
+
rdoc.rdoc_dir = 'rdoc'
|
11
|
+
rdoc.title = 'DddDomain'
|
12
|
+
rdoc.options << '--line-numbers'
|
13
|
+
rdoc.rdoc_files.include('README.rdoc')
|
14
|
+
rdoc.rdoc_files.include('lib/**/*.rb')
|
15
|
+
end
|
16
|
+
|
17
|
+
|
18
|
+
|
19
|
+
|
20
|
+
|
21
|
+
|
22
|
+
Bundler::GemHelper.install_tasks
|
23
|
+
|
24
|
+
require 'rake/testtask'
|
25
|
+
|
26
|
+
Rake::TestTask.new(:test) do |t|
|
27
|
+
t.libs << 'lib'
|
28
|
+
t.libs << 'test'
|
29
|
+
t.pattern = 'test/**/*_test.rb'
|
30
|
+
t.verbose = false
|
31
|
+
end
|
32
|
+
|
33
|
+
|
34
|
+
task default: :test
|
data/lib/ddd_domain/version.rb
CHANGED
@@ -1,3 +1,3 @@
|
|
1
|
-
module DddDomain
|
2
|
-
VERSION = "0.0.
|
3
|
-
end
|
1
|
+
module DddDomain
|
2
|
+
VERSION = "0.0.2"
|
3
|
+
end
|
data/lib/ddd_domain.rb
CHANGED
@@ -1,2 +1,2 @@
|
|
1
|
-
module DddDomain
|
2
|
-
end
|
1
|
+
module DddDomain
|
2
|
+
end
|
@@ -1,8 +1,8 @@
|
|
1
|
-
Description:
|
2
|
-
Explain the generator
|
3
|
-
|
4
|
-
Example:
|
5
|
-
rails generate domains Thing
|
6
|
-
|
7
|
-
This will create:
|
8
|
-
what/will/it/create
|
1
|
+
Description:
|
2
|
+
Explain the generator
|
3
|
+
|
4
|
+
Example:
|
5
|
+
rails generate domains Thing
|
6
|
+
|
7
|
+
This will create:
|
8
|
+
what/will/it/create
|
@@ -1,15 +1,25 @@
|
|
1
|
-
class DomainsGenerator < Rails::Generators::NamedBase
|
2
|
-
source_root File.expand_path('../templates', __FILE__)
|
3
|
-
|
4
|
-
def create_initializer_file
|
5
|
-
empty_directory "app/domains/#{file_name}"
|
6
|
-
create_file "app/domains/#{file_name}/.keep"
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
end
|
1
|
+
class DomainsGenerator < Rails::Generators::NamedBase
|
2
|
+
source_root File.expand_path('../templates', __FILE__)
|
3
|
+
|
4
|
+
def create_initializer_file
|
5
|
+
empty_directory "app/domains/#{file_name}"
|
6
|
+
create_file "app/domains/#{file_name}/.keep"
|
7
|
+
|
8
|
+
if File.exists? "config/application.rb"
|
9
|
+
inject_into_file 'config/application.rb', :before => " end\nend" do
|
10
|
+
<<-"RUBY"
|
11
|
+
|
12
|
+
# Configure load paths for DDD domain #{file_name}
|
13
|
+
config.autoload_paths += %W(\#{config.root}/app/domains/#{file_name})
|
14
|
+
RUBY
|
15
|
+
end
|
16
|
+
elsif File.exists? "lib/#{namespace.to_s.underscore}/engine.rb"
|
17
|
+
inject_into_file "lib/#{namespace.to_s.underscore}/engine.rb", :before => " end\nend" do
|
18
|
+
<<-"RUBY"
|
19
|
+
|
20
|
+
config.autoload_paths += %W(\#{config.root}/app/domains/#{file_name})
|
21
|
+
RUBY
|
22
|
+
end
|
23
|
+
end
|
24
|
+
end
|
25
|
+
end
|
@@ -1,4 +1,4 @@
|
|
1
|
-
# desc "Explaining what the task does"
|
2
|
-
# task :ddd_domain do
|
3
|
-
# # Task goes here
|
4
|
-
# end
|
1
|
+
# desc "Explaining what the task does"
|
2
|
+
# task :ddd_domain do
|
3
|
+
# # Task goes here
|
4
|
+
# end
|
data/test/ddd_domain_test.rb
CHANGED
@@ -1,7 +1,7 @@
|
|
1
|
-
require 'test_helper'
|
2
|
-
|
3
|
-
class DddDomainTest < ActiveSupport::TestCase
|
4
|
-
test "truth" do
|
5
|
-
assert_kind_of Module, DddDomain
|
6
|
-
end
|
7
|
-
end
|
1
|
+
require 'test_helper'
|
2
|
+
|
3
|
+
class DddDomainTest < ActiveSupport::TestCase
|
4
|
+
test "truth" do
|
5
|
+
assert_kind_of Module, DddDomain
|
6
|
+
end
|
7
|
+
end
|
data/test/dummy/README.rdoc
CHANGED
File without changes
|
data/test/dummy/Rakefile
CHANGED
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
data/test/dummy/bin/bundle
CHANGED
File without changes
|
data/test/dummy/bin/rails
CHANGED
File without changes
|
data/test/dummy/bin/rake
CHANGED
File without changes
|
data/test/dummy/bin/setup
CHANGED
File without changes
|
File without changes
|
data/test/dummy/config/boot.rb
CHANGED
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
data/test/dummy/config/routes.rb
CHANGED
File without changes
|
File without changes
|
data/test/dummy/config.ru
CHANGED
File without changes
|
data/test/dummy/public/404.html
CHANGED
File without changes
|
data/test/dummy/public/422.html
CHANGED
File without changes
|
data/test/dummy/public/500.html
CHANGED
File without changes
|
File without changes
|
data/test/test_helper.rb
CHANGED
@@ -1,20 +1,20 @@
|
|
1
|
-
# Configure Rails Environment
|
2
|
-
ENV["RAILS_ENV"] = "test"
|
3
|
-
|
4
|
-
require File.expand_path("../../test/dummy/config/environment.rb", __FILE__)
|
5
|
-
ActiveRecord::Migrator.migrations_paths = [File.expand_path("../../test/dummy/db/migrate", __FILE__)]
|
6
|
-
require "rails/test_help"
|
7
|
-
|
8
|
-
# Filter out Minitest backtrace while allowing backtrace from other libraries
|
9
|
-
# to be shown.
|
10
|
-
Minitest.backtrace_filter = Minitest::BacktraceFilter.new
|
11
|
-
|
12
|
-
# Load support files
|
13
|
-
Dir["#{File.dirname(__FILE__)}/support/**/*.rb"].each { |f| require f }
|
14
|
-
|
15
|
-
# Load fixtures from the engine
|
16
|
-
if ActiveSupport::TestCase.respond_to?(:fixture_path=)
|
17
|
-
ActiveSupport::TestCase.fixture_path = File.expand_path("../fixtures", __FILE__)
|
18
|
-
ActionDispatch::IntegrationTest.fixture_path = ActiveSupport::TestCase.fixture_path
|
19
|
-
ActiveSupport::TestCase.fixtures :all
|
20
|
-
end
|
1
|
+
# Configure Rails Environment
|
2
|
+
ENV["RAILS_ENV"] = "test"
|
3
|
+
|
4
|
+
require File.expand_path("../../test/dummy/config/environment.rb", __FILE__)
|
5
|
+
ActiveRecord::Migrator.migrations_paths = [File.expand_path("../../test/dummy/db/migrate", __FILE__)]
|
6
|
+
require "rails/test_help"
|
7
|
+
|
8
|
+
# Filter out Minitest backtrace while allowing backtrace from other libraries
|
9
|
+
# to be shown.
|
10
|
+
Minitest.backtrace_filter = Minitest::BacktraceFilter.new
|
11
|
+
|
12
|
+
# Load support files
|
13
|
+
Dir["#{File.dirname(__FILE__)}/support/**/*.rb"].each { |f| require f }
|
14
|
+
|
15
|
+
# Load fixtures from the engine
|
16
|
+
if ActiveSupport::TestCase.respond_to?(:fixture_path=)
|
17
|
+
ActiveSupport::TestCase.fixture_path = File.expand_path("../fixtures", __FILE__)
|
18
|
+
ActionDispatch::IntegrationTest.fixture_path = ActiveSupport::TestCase.fixture_path
|
19
|
+
ActiveSupport::TestCase.fixtures :all
|
20
|
+
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: ddd_domain
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- FUNABARA Masao
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2016-08-09 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|
@@ -16,14 +16,14 @@ dependencies:
|
|
16
16
|
requirements:
|
17
17
|
- - "~>"
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version: 4.2.
|
19
|
+
version: 4.2.0
|
20
20
|
type: :runtime
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
24
|
- - "~>"
|
25
25
|
- !ruby/object:Gem::Version
|
26
|
-
version: 4.2.
|
26
|
+
version: 4.2.0
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: sqlite3
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
@@ -109,44 +109,44 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
109
109
|
version: '0'
|
110
110
|
requirements: []
|
111
111
|
rubyforge_project:
|
112
|
-
rubygems_version: 2.
|
112
|
+
rubygems_version: 2.5.1
|
113
113
|
signing_key:
|
114
114
|
specification_version: 4
|
115
115
|
summary: It supports the domain of Domain Driven Design.
|
116
116
|
test_files:
|
117
|
-
- test/test_helper.rb
|
118
117
|
- test/ddd_domain_test.rb
|
119
|
-
- test/dummy/
|
120
|
-
- test/dummy/
|
121
|
-
- test/dummy/
|
122
|
-
- test/dummy/
|
123
|
-
- test/dummy/
|
118
|
+
- test/dummy/app/assets/javascripts/application.js
|
119
|
+
- test/dummy/app/assets/stylesheets/application.css
|
120
|
+
- test/dummy/app/controllers/application_controller.rb
|
121
|
+
- test/dummy/app/helpers/application_helper.rb
|
122
|
+
- test/dummy/app/views/layouts/application.html.erb
|
123
|
+
- test/dummy/bin/bundle
|
124
124
|
- test/dummy/bin/rails
|
125
125
|
- test/dummy/bin/rake
|
126
126
|
- test/dummy/bin/setup
|
127
|
-
- test/dummy/
|
128
|
-
- test/dummy/config/database.yml
|
129
|
-
- test/dummy/config/locales/en.yml
|
127
|
+
- test/dummy/config/application.rb
|
130
128
|
- test/dummy/config/boot.rb
|
131
|
-
- test/dummy/config/
|
132
|
-
- test/dummy/config/
|
133
|
-
- test/dummy/config/environments/test.rb
|
134
|
-
- test/dummy/config/environments/production.rb
|
129
|
+
- test/dummy/config/database.yml
|
130
|
+
- test/dummy/config/environment.rb
|
135
131
|
- test/dummy/config/environments/development.rb
|
132
|
+
- test/dummy/config/environments/production.rb
|
133
|
+
- test/dummy/config/environments/test.rb
|
136
134
|
- test/dummy/config/initializers/assets.rb
|
137
|
-
- test/dummy/config/initializers/
|
135
|
+
- test/dummy/config/initializers/backtrace_silencers.rb
|
138
136
|
- test/dummy/config/initializers/cookies_serializer.rb
|
137
|
+
- test/dummy/config/initializers/filter_parameter_logging.rb
|
139
138
|
- test/dummy/config/initializers/inflections.rb
|
139
|
+
- test/dummy/config/initializers/mime_types.rb
|
140
140
|
- test/dummy/config/initializers/session_store.rb
|
141
|
-
- test/dummy/config/initializers/filter_parameter_logging.rb
|
142
|
-
- test/dummy/config/initializers/backtrace_silencers.rb
|
143
141
|
- test/dummy/config/initializers/wrap_parameters.rb
|
144
|
-
- test/dummy/config/
|
145
|
-
- test/dummy/config/
|
146
|
-
- test/dummy/
|
142
|
+
- test/dummy/config/locales/en.yml
|
143
|
+
- test/dummy/config/routes.rb
|
144
|
+
- test/dummy/config/secrets.yml
|
147
145
|
- test/dummy/config.ru
|
148
|
-
- test/dummy/
|
149
|
-
- test/dummy/
|
150
|
-
- test/dummy/
|
151
|
-
- test/dummy/
|
152
|
-
- test/dummy/
|
146
|
+
- test/dummy/public/404.html
|
147
|
+
- test/dummy/public/422.html
|
148
|
+
- test/dummy/public/500.html
|
149
|
+
- test/dummy/public/favicon.ico
|
150
|
+
- test/dummy/Rakefile
|
151
|
+
- test/dummy/README.rdoc
|
152
|
+
- test/test_helper.rb
|