itamae-mitsurin 0.4 → 0.7
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/LICENSE.txt +1 -1
- data/README.md +2 -1
- data/Rakefile +17 -15
- data/bin/itamae +2 -3
- data/bin/manaita +5 -0
- data/itamae-mitsurin.gemspec +4 -4
- data/lib/itamae-mitsurin.rb +17 -0
- data/lib/{itamae → itamae-mitsurin}/backend.rb +13 -13
- data/lib/{itamae → itamae-mitsurin}/cli.rb +5 -5
- data/lib/{itamae → itamae-mitsurin}/definition.rb +2 -2
- data/lib/itamae-mitsurin/ext.rb +1 -0
- data/lib/{itamae → itamae-mitsurin}/ext/specinfra.rb +0 -0
- data/lib/{itamae → itamae-mitsurin}/handler.rb +3 -3
- data/lib/{itamae → itamae-mitsurin}/handler/base.rb +1 -1
- data/lib/{itamae → itamae-mitsurin}/handler/debug.rb +2 -2
- data/lib/{itamae → itamae-mitsurin}/handler/fluentd.rb +2 -2
- data/lib/{itamae → itamae-mitsurin}/handler/json.rb +1 -1
- data/lib/{itamae → itamae-mitsurin}/handler_proxy.rb +1 -1
- data/lib/{itamae → itamae-mitsurin}/logger.rb +5 -5
- data/lib/itamae-mitsurin/mitsurin.rb +14 -0
- data/lib/{itamae → itamae-mitsurin}/mitsurin/cli.rb +5 -5
- data/lib/{itamae → itamae-mitsurin}/mitsurin/creators.rb +3 -3
- data/lib/itamae-mitsurin/mitsurin/creators/cookbook.rb +24 -0
- data/lib/itamae-mitsurin/mitsurin/creators/project.rb +24 -0
- data/lib/{itamae → itamae-mitsurin}/mitsurin/creators/templates/project/.rspec +0 -0
- data/lib/{itamae → itamae-mitsurin}/mitsurin/creators/templates/project/Gemfile +0 -1
- data/lib/itamae-mitsurin/mitsurin/creators/templates/project/Rakefile +2 -0
- data/lib/{itamae/generators/templates/cookbook/files → itamae-mitsurin/mitsurin/creators/templates/project/environments}/.keep +0 -0
- data/lib/{itamae → itamae-mitsurin}/mitsurin/creators/templates/project/environments/sample.json +0 -0
- data/lib/{itamae/generators/templates/cookbook/templates → itamae-mitsurin/mitsurin/creators/templates/project/keys}/.keep +0 -0
- data/lib/{itamae/generators/templates/project/cookbooks → itamae-mitsurin/mitsurin/creators/templates/project/nodes}/.keep +0 -0
- data/lib/itamae-mitsurin/mitsurin/creators/templates/project/nodes/sample01.json +10 -0
- data/lib/{itamae/generators → itamae-mitsurin/mitsurin/creators}/templates/project/roles/.keep +0 -0
- data/lib/{itamae/generators/templates/role/files → itamae-mitsurin/mitsurin/creators/templates/project/site-cookbooks/_base/_base/attributes}/.keep +0 -0
- data/lib/itamae-mitsurin/mitsurin/creators/templates/project/site-cookbooks/_base/_base/recipes/default.rb +1 -0
- data/lib/{itamae/generators/templates/role/templates → itamae-mitsurin/mitsurin/creators/templates/project/site-cookbooks/_base/_base/recipes/directories}/.keep +0 -0
- data/lib/{itamae/mitsurin/creators/templates/project/environments → itamae-mitsurin/mitsurin/creators/templates/project/site-cookbooks/_base/_base/recipes/files}/.keep +0 -0
- data/lib/{itamae/mitsurin/creators/templates/project/keys → itamae-mitsurin/mitsurin/creators/templates/project/site-cookbooks/_base/_base/recipes/templates}/.keep +0 -0
- data/lib/{itamae → itamae-mitsurin}/mitsurin/creators/templates/project/site-cookbooks/_base/_base/spec/default_spec.rb +0 -0
- data/lib/{itamae → itamae-mitsurin}/mitsurin/creators/templates/project/spec/spec_helper.rb +0 -0
- data/lib/{itamae/mitsurin/creators/templates/project/nodes → itamae-mitsurin/mitsurin/creators/templates/project/tmp-nodes}/.keep +0 -0
- data/lib/{itamae/mitsurin/creators/templates/project/roles → itamae-mitsurin/mitsurin/creators/templates/site-cookbooks/attributes}/.keep +0 -0
- data/lib/{itamae/generators/templates/cookbook → itamae-mitsurin/mitsurin/creators/templates/site-cookbooks/recipes}/default.rb +0 -0
- data/lib/{itamae/mitsurin/creators/templates/project/site-cookbooks/_base/_base/attributes → itamae-mitsurin/mitsurin/creators/templates/site-cookbooks/recipes/directories}/.keep +0 -0
- data/lib/{itamae/mitsurin/creators/templates/project/site-cookbooks/_base/_base → itamae-mitsurin/mitsurin/creators/templates/site-cookbooks/recipes}/files/.keep +0 -0
- data/lib/{itamae/mitsurin/creators/templates/project/site-cookbooks/_base/_base → itamae-mitsurin/mitsurin/creators/templates/site-cookbooks/recipes}/templates/.keep +0 -0
- data/lib/{itamae/generators/templates/role/default.rb → itamae-mitsurin/mitsurin/creators/templates/site-cookbooks/spec/default_spec.rb} +0 -0
- data/lib/itamae-mitsurin/mitsurin/itamae_task.rb +197 -0
- data/lib/itamae-mitsurin/mitsurin/itamae_with_git_task.rb +213 -0
- data/lib/itamae-mitsurin/mitsurin/serverspec_task.rb +123 -0
- data/lib/{itamae → itamae-mitsurin}/node.rb +3 -3
- data/lib/{itamae → itamae-mitsurin}/notification.rb +3 -3
- data/lib/{itamae → itamae-mitsurin}/recipe.rb +6 -6
- data/lib/{itamae → itamae-mitsurin}/recipe_children.rb +2 -2
- data/lib/{itamae → itamae-mitsurin}/resource.rb +23 -23
- data/lib/{itamae → itamae-mitsurin}/resource/aws_ebs_volume.rb +3 -3
- data/lib/{itamae → itamae-mitsurin}/resource/base.rb +23 -23
- data/lib/{itamae → itamae-mitsurin}/resource/directory.rb +2 -2
- data/lib/{itamae → itamae-mitsurin}/resource/execute.rb +2 -2
- data/lib/itamae-mitsurin/resource/file.rb +180 -0
- data/lib/{itamae → itamae-mitsurin}/resource/gem_package.rb +2 -2
- data/lib/{itamae → itamae-mitsurin}/resource/git.rb +2 -2
- data/lib/{itamae → itamae-mitsurin}/resource/group.rb +2 -2
- data/lib/{itamae → itamae-mitsurin}/resource/http_request.rb +3 -3
- data/lib/{itamae → itamae-mitsurin}/resource/link.rb +2 -2
- data/lib/{itamae → itamae-mitsurin}/resource/local_ruby_block.rb +2 -2
- data/lib/{itamae → itamae-mitsurin}/resource/package.rb +2 -2
- data/lib/{itamae → itamae-mitsurin}/resource/remote_directory.rb +5 -5
- data/lib/{itamae → itamae-mitsurin}/resource/remote_file.rb +3 -3
- data/lib/{itamae → itamae-mitsurin}/resource/service.rb +2 -2
- data/lib/{itamae → itamae-mitsurin}/resource/template.rb +2 -2
- data/lib/{itamae → itamae-mitsurin}/resource/user.rb +2 -2
- data/lib/{itamae → itamae-mitsurin}/runner.rb +8 -8
- data/lib/{itamae/mitsurin → itamae-mitsurin}/version.rb +1 -3
- data/lib/itamae-mitsurin/version.txt +1 -0
- data/test/test_itamae-mitsurin.rb +18 -0
- data/test/test_itamae-mitsurin/ext/test_specinfra.rb +39 -0
- data/test/test_itamae-mitsurin/handler/test_base.rb +40 -0
- data/test/test_itamae-mitsurin/handler/test_debug.rb +10 -0
- data/test/test_itamae-mitsurin/handler/test_fluentd.rb +44 -0
- data/test/test_itamae-mitsurin/handler/test_json.rb +22 -0
- data/test/test_itamae-mitsurin/mitsurin/creators/templates/project/.rspec +2 -0
- data/test/test_itamae-mitsurin/mitsurin/creators/templates/project/Gemfile +3 -0
- data/{lib/itamae → test/test_itamae-mitsurin}/mitsurin/creators/templates/project/Rakefile +0 -0
- data/{lib/itamae/mitsurin/creators/templates/project/tmp-nodes → test/test_itamae-mitsurin/mitsurin/creators/templates/project/environments}/.keep +0 -0
- data/test/test_itamae-mitsurin/mitsurin/creators/templates/project/environments/sample.json +7 -0
- data/{lib/itamae/mitsurin/creators/templates/site-cookbooks/attributes → test/test_itamae-mitsurin/mitsurin/creators/templates/project/keys}/.keep +0 -0
- data/{lib/itamae/mitsurin/creators/templates/site-cookbooks/files → test/test_itamae-mitsurin/mitsurin/creators/templates/project/nodes}/.keep +0 -0
- data/{lib/itamae → test/test_itamae-mitsurin}/mitsurin/creators/templates/project/nodes/sample01.json +0 -0
- data/{lib/itamae/mitsurin/creators/templates/site-cookbooks/spec → test/test_itamae-mitsurin/mitsurin/creators/templates/project/roles}/.keep +0 -0
- data/{lib/itamae/mitsurin/creators/templates/site-cookbooks/templates → test/test_itamae-mitsurin/mitsurin/creators/templates/project/site-cookbooks/_base/_base/attributes}/.keep +0 -0
- data/{lib/itamae/mitsurin/creators/templates/site-cookbooks/recipes/default.rb → test/test_itamae-mitsurin/mitsurin/creators/templates/project/site-cookbooks/_base/_base/files/.keep} +0 -0
- data/{lib/itamae → test/test_itamae-mitsurin}/mitsurin/creators/templates/project/site-cookbooks/_base/_base/recipes/default.rb +0 -0
- data/test/test_itamae-mitsurin/mitsurin/creators/templates/project/site-cookbooks/_base/_base/spec/default_spec.rb +1 -0
- data/test/test_itamae-mitsurin/mitsurin/creators/templates/project/site-cookbooks/_base/_base/templates/.keep +0 -0
- data/test/test_itamae-mitsurin/mitsurin/creators/templates/project/spec/spec_helper.rb +33 -0
- data/test/test_itamae-mitsurin/mitsurin/creators/templates/project/tmp-nodes/.keep +0 -0
- data/test/test_itamae-mitsurin/mitsurin/creators/templates/site-cookbooks/attributes/.keep +0 -0
- data/test/test_itamae-mitsurin/mitsurin/creators/templates/site-cookbooks/files/.keep +0 -0
- data/test/test_itamae-mitsurin/mitsurin/creators/templates/site-cookbooks/recipes/default.rb +0 -0
- data/test/test_itamae-mitsurin/mitsurin/creators/templates/site-cookbooks/spec/.keep +0 -0
- data/test/test_itamae-mitsurin/mitsurin/creators/templates/site-cookbooks/templates/.keep +0 -0
- data/{lib/itamae/mitsurin/creators/cookbook.rb → test/test_itamae-mitsurin/mitsurin/creators/test_cookbook.rb} +0 -0
- data/{lib/itamae/mitsurin/creators/project.rb → test/test_itamae-mitsurin/mitsurin/creators/test_project.rb} +0 -0
- data/test/test_itamae-mitsurin/mitsurin/test_cli.rb +56 -0
- data/test/test_itamae-mitsurin/mitsurin/test_creators.rb +19 -0
- data/{lib/itamae/mitsurin/itamae_task.rb → test/test_itamae-mitsurin/mitsurin/test_itamae_task.rb} +0 -1
- data/{lib/itamae/mitsurin/itamae_with_git_task.rb → test/test_itamae-mitsurin/mitsurin/test_itamae_with_git_task.rb} +0 -1
- data/{lib/itamae/mitsurin/serverspec_task.rb → test/test_itamae-mitsurin/mitsurin/test_serverspec_task.rb} +1 -1
- data/test/test_itamae-mitsurin/resource/test_aws_ebs_volume.rb +84 -0
- data/test/test_itamae-mitsurin/resource/test_base.rb +374 -0
- data/test/test_itamae-mitsurin/resource/test_directory.rb +63 -0
- data/test/test_itamae-mitsurin/resource/test_execute.rb +26 -0
- data/{lib/itamae/resource/file.rb → test/test_itamae-mitsurin/resource/test_file.rb} +6 -6
- data/test/test_itamae-mitsurin/resource/test_gem_package.rb +81 -0
- data/test/test_itamae-mitsurin/resource/test_git.rb +94 -0
- data/test/test_itamae-mitsurin/resource/test_group.rb +42 -0
- data/test/test_itamae-mitsurin/resource/test_http_request.rb +71 -0
- data/test/test_itamae-mitsurin/resource/test_link.rb +33 -0
- data/test/test_itamae-mitsurin/resource/test_local_ruby_block.rb +15 -0
- data/test/test_itamae-mitsurin/resource/test_package.rb +44 -0
- data/test/test_itamae-mitsurin/resource/test_remote_directory.rb +84 -0
- data/test/test_itamae-mitsurin/resource/test_remote_file.rb +54 -0
- data/test/test_itamae-mitsurin/resource/test_service.rb +69 -0
- data/test/test_itamae-mitsurin/resource/test_template.rb +53 -0
- data/test/test_itamae-mitsurin/resource/test_user.rb +93 -0
- data/test/test_itamae-mitsurin/test_backend.rb +297 -0
- data/test/test_itamae-mitsurin/test_cli.rb +88 -0
- data/test/test_itamae-mitsurin/test_definition.rb +40 -0
- data/test/test_itamae-mitsurin/test_ext.rb +1 -0
- data/test/test_itamae-mitsurin/test_handler.rb +21 -0
- data/test/test_itamae-mitsurin/test_handler_proxy.rb +38 -0
- data/test/test_itamae-mitsurin/test_logger.rb +124 -0
- data/test/test_itamae-mitsurin/test_mitsurin.rb +14 -0
- data/test/test_itamae-mitsurin/test_node.rb +74 -0
- data/test/test_itamae-mitsurin/test_notification.rb +46 -0
- data/test/test_itamae-mitsurin/test_recipe.rb +171 -0
- data/test/test_itamae-mitsurin/test_recipe_children.rb +86 -0
- data/test/test_itamae-mitsurin/test_resource.rb +73 -0
- data/test/test_itamae-mitsurin/test_runner.rb +124 -0
- data/test/test_itamae-mitsurin/test_version.rb +3 -0
- data/{lib/itamae/mitsurin → test/test_itamae-mitsurin}/version.txt +0 -0
- data/test_project/.rspec +2 -0
- data/test_project/Gemfile +4 -0
- data/test_project/Rakefile +3 -0
- data/test_project/environments/.keep +0 -0
- data/test_project/keys/.keep +0 -0
- data/test_project/nodes/.keep +0 -0
- data/test_project/nodes/test.json +9 -0
- data/test_project/roles/.keep +0 -0
- data/test_project/roles/test.json +14 -0
- data/test_project/site-cookbooks/_base/_base/attributes/.keep +0 -0
- data/test_project/site-cookbooks/_base/_base/files/.keep +0 -0
- data/test_project/site-cookbooks/_base/_base/recipes/default.rb +1 -0
- data/test_project/site-cookbooks/_base/_base/spec/default_spec.rb +1 -0
- data/test_project/site-cookbooks/_base/_base/templates/.keep +0 -0
- data/test_project/site-cookbooks/a_test/directory/attributes/.keep +0 -0
- data/test_project/site-cookbooks/a_test/directory/files/.keep +0 -0
- data/test_project/site-cookbooks/a_test/directory/recipes/default.rb +8 -0
- data/test_project/site-cookbooks/a_test/directory/spec/.keep +0 -0
- data/test_project/site-cookbooks/a_test/directory/spec/default_spec.rb +4 -0
- data/test_project/site-cookbooks/a_test/directory/templates/.keep +0 -0
- data/test_project/site-cookbooks/a_test/package/attributes/.keep +0 -0
- data/test_project/site-cookbooks/a_test/package/files/.keep +0 -0
- data/test_project/site-cookbooks/a_test/package/recipes/default.rb +2 -0
- data/test_project/site-cookbooks/a_test/package/spec/.keep +0 -0
- data/test_project/site-cookbooks/a_test/package/spec/default_spec.rb +4 -0
- data/test_project/site-cookbooks/a_test/package/templates/.keep +0 -0
- data/test_project/site-cookbooks/a_test/service/attributes/.keep +0 -0
- data/test_project/site-cookbooks/a_test/service/files/.keep +0 -0
- data/test_project/site-cookbooks/a_test/service/recipes/default.rb +5 -0
- data/test_project/site-cookbooks/a_test/service/spec/.keep +0 -0
- data/test_project/site-cookbooks/a_test/service/spec/default_spec.rb +6 -0
- data/test_project/site-cookbooks/a_test/service/templates/.keep +0 -0
- data/test_project/site-cookbooks/b_test/git/attributes/.keep +0 -0
- data/test_project/site-cookbooks/b_test/git/files/.keep +0 -0
- data/test_project/site-cookbooks/b_test/git/recipes/default.rb +5 -0
- data/test_project/site-cookbooks/b_test/git/spec/.keep +0 -0
- data/test_project/site-cookbooks/b_test/git/spec/default_spec.rb +5 -0
- data/test_project/site-cookbooks/b_test/git/templates/.keep +0 -0
- data/test_project/site-cookbooks/b_test/link/attributes/.keep +0 -0
- data/test_project/site-cookbooks/b_test/link/files/.keep +0 -0
- data/test_project/site-cookbooks/b_test/link/recipes/default.rb +5 -0
- data/test_project/site-cookbooks/b_test/link/spec/.keep +0 -0
- data/test_project/site-cookbooks/b_test/link/spec/default_spec.rb +5 -0
- data/test_project/site-cookbooks/b_test/link/templates/.keep +0 -0
- data/test_project/site-cookbooks/b_test/remote_file/attributes/.keep +0 -0
- data/test_project/site-cookbooks/b_test/remote_file/files/.keep +0 -0
- data/test_project/site-cookbooks/b_test/remote_file/files/remote_file.sh +1 -0
- data/test_project/site-cookbooks/b_test/remote_file/recipes/default.rb +9 -0
- data/test_project/site-cookbooks/b_test/remote_file/spec/.keep +0 -0
- data/test_project/site-cookbooks/b_test/remote_file/spec/default_spec.rb +7 -0
- data/test_project/site-cookbooks/b_test/remote_file/templates/.keep +0 -0
- data/test_project/site-cookbooks/b_test/template/attributes/.keep +0 -0
- data/test_project/site-cookbooks/b_test/template/files/.keep +0 -0
- data/test_project/site-cookbooks/b_test/template/recipes/default.rb +5 -0
- data/test_project/site-cookbooks/b_test/template/spec/.keep +0 -0
- data/test_project/site-cookbooks/b_test/template/spec/default_spec.rb +7 -0
- data/test_project/site-cookbooks/b_test/template/templates/.keep +0 -0
- data/test_project/site-cookbooks/b_test/template/templates/template.erb +2 -0
- data/test_project/site-cookbooks/c_test/execute/attributes/.keep +0 -0
- data/test_project/site-cookbooks/c_test/execute/files/.keep +0 -0
- data/test_project/site-cookbooks/c_test/execute/recipes/default.rb +6 -0
- data/test_project/site-cookbooks/c_test/execute/spec/.keep +0 -0
- data/test_project/site-cookbooks/c_test/execute/spec/default_spec.rb +6 -0
- data/test_project/site-cookbooks/c_test/execute/templates/.keep +0 -0
- data/test_project/site-cookbooks/c_test/remote_directory/attributes/.keep +0 -0
- data/test_project/site-cookbooks/c_test/remote_directory/files/.keep +0 -0
- data/test_project/site-cookbooks/c_test/remote_directory/recipes/default.rb +10 -0
- data/test_project/site-cookbooks/c_test/remote_directory/spec/.keep +0 -0
- data/test_project/site-cookbooks/c_test/remote_directory/spec/default_spec.rb +20 -0
- data/test_project/site-cookbooks/c_test/remote_directory/templates/.keep +0 -0
- data/test_project/site-cookbooks/c_test/remote_directory/templates/remote_dir/a.txt +0 -0
- data/test_project/site-cookbooks/c_test/remote_directory/templates/remote_dir/b.txt +0 -0
- data/test_project/site-cookbooks/c_test/remote_directory/templates/remote_dir/c.txt +0 -0
- data/test_project/site-cookbooks/d_spec/air/attributes/.keep +0 -0
- data/test_project/site-cookbooks/d_spec/air/files/.keep +0 -0
- data/test_project/site-cookbooks/d_spec/air/recipes/default.rb +0 -0
- data/test_project/site-cookbooks/d_spec/air/spec/.keep +0 -0
- data/test_project/site-cookbooks/d_spec/air/spec/default_spec.rb +0 -0
- data/test_project/site-cookbooks/d_spec/air/templates/.keep +0 -0
- data/test_project/spec/spec_helper.rb +33 -0
- data/test_project/tmp-nodes/.keep +0 -0
- data/test_project/tmp-nodes/test.json +12 -0
- metadata +337 -138
- data/bin/itamae-mitsurin +0 -5
- data/lib/itamae.rb +0 -18
- data/lib/itamae/ext.rb +0 -1
- data/lib/itamae/generators.rb +0 -20
- data/lib/itamae/generators/cookbook.rb +0 -22
- data/lib/itamae/generators/project.rb +0 -22
- data/lib/itamae/generators/role.rb +0 -22
- data/lib/itamae/generators/templates/project/Gemfile +0 -4
- data/lib/itamae/mitsurin.rb +0 -14
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: e4a13a13168741e95c8e8adc93ab308a34a45892
|
4
|
+
data.tar.gz: 47410d5b59390fc5aeb0b95801b7ac12979c3da5
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 1241689feb0f512bb31deea4e8263d94b485cff966d382045f2d5e731a15af1780e9396638e8c042fb9ca2778287d1eca5c9d3d4a7bfe6032d9bb24b6304ae0b
|
7
|
+
data.tar.gz: 29684144ddebcab7d461745a26e286a5d7fa97807008d7a7cd31864939f8c5ed500f4fab4ab938c8362ce77a2f381cad830e2645f49fb25d424dd117eb8d3c57
|
data/LICENSE.txt
CHANGED
data/README.md
CHANGED
@@ -7,6 +7,7 @@ Customized version of Itamae and plugin
|
|
7
7
|
- Like more Chef
|
8
8
|
- Little attributes
|
9
9
|
- Support AWS Resource
|
10
|
+
- Running on the RakeTask
|
10
11
|
|
11
12
|
## Installation
|
12
13
|
|
@@ -14,7 +15,7 @@ Customized version of Itamae and plugin
|
|
14
15
|
$ gem install itamae-mitsurin
|
15
16
|
$ mkdir project_dir
|
16
17
|
$ cd project_dir
|
17
|
-
$
|
18
|
+
$ manaita init
|
18
19
|
```
|
19
20
|
|
20
21
|
## Usage AWS Resource
|
data/Rakefile
CHANGED
@@ -11,23 +11,25 @@ rescue LoadError
|
|
11
11
|
puts 'If you want to create gem, You must install Bundler'
|
12
12
|
end
|
13
13
|
|
14
|
-
require './lib/itamae
|
14
|
+
require './lib/itamae-mitsurin/version.rb'
|
15
15
|
def version
|
16
|
-
|
16
|
+
ItamaeMitsurin::VERSION
|
17
17
|
end
|
18
18
|
|
19
|
-
task :default => :test
|
20
|
-
task :test => :compile
|
21
|
-
Rake::TestTask.new
|
22
|
-
|
23
|
-
t.
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
ext.
|
30
|
-
|
19
|
+
#task :default => :test
|
20
|
+
#task :test => :compile
|
21
|
+
Rake::TestTask.new
|
22
|
+
#Rake::TestTask.new do |t|
|
23
|
+
# t.libs << 'lib' << 'test'
|
24
|
+
# t.libs << 'test'
|
25
|
+
# t.test_files = FileList['test/test*.rb'].exclude('test/test_assoccoords.rb')
|
26
|
+
#end
|
27
|
+
|
28
|
+
#Rake::ExtensionTask.new do |ext|
|
29
|
+
# ext.name = 'itamae-mitsurin'
|
30
|
+
# ext.ext_dir = 'ext/'
|
31
|
+
# ext.lib_dir = 'lib/'
|
32
|
+
#end
|
31
33
|
|
32
34
|
Rake::PackageTask.new('itamae-mitsurin', "#{version}") do |t|
|
33
35
|
t.need_tar_gz = true
|
@@ -37,7 +39,7 @@ end
|
|
37
39
|
namespace :release do
|
38
40
|
desc "Bump up version and commit"
|
39
41
|
task :version_up do
|
40
|
-
version_file = File.expand_path("lib/itamae
|
42
|
+
version_file = File.expand_path("lib/itamae-mitsurin/version.txt")
|
41
43
|
current_version = File.read(version_file).strip
|
42
44
|
|
43
45
|
if /\A(.+?)(\d+)\z/ =~ current_version
|
data/bin/itamae
CHANGED
data/bin/manaita
ADDED
data/itamae-mitsurin.gemspec
CHANGED
@@ -1,11 +1,11 @@
|
|
1
1
|
# coding: utf-8
|
2
2
|
lib = File.expand_path('../lib', __FILE__)
|
3
3
|
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
4
|
-
require 'itamae
|
4
|
+
require 'itamae-mitsurin/version'
|
5
5
|
|
6
6
|
Gem::Specification.new do |spec|
|
7
7
|
spec.name = "itamae-mitsurin"
|
8
|
-
spec.version =
|
8
|
+
spec.version = ItamaeMitsurin::VERSION
|
9
9
|
spec.authors = ["Akihiro Kamiyama"]
|
10
10
|
spec.email = ["akihiro.vamps@gmail.com"]
|
11
11
|
spec.summary = %q{Customized version of Itamae and Itamae plugin}
|
@@ -18,15 +18,15 @@ Gem::Specification.new do |spec|
|
|
18
18
|
spec.require_paths = ["lib"]
|
19
19
|
|
20
20
|
spec.add_runtime_dependency "thor"
|
21
|
-
spec.add_runtime_dependency "specinfra", [">= 2.51.2", "< 3.0.0"]
|
22
21
|
spec.add_runtime_dependency "hashie"
|
23
22
|
spec.add_runtime_dependency "ansi"
|
24
23
|
spec.add_runtime_dependency "schash", "~> 0.1.0"
|
25
24
|
spec.add_runtime_dependency "aws-sdk", "~> 2"
|
26
25
|
spec.add_runtime_dependency "serverspec", [">= 2.30", "< 3.0.0"]
|
27
|
-
spec.add_runtime_dependency "
|
26
|
+
spec.add_runtime_dependency "highline"
|
28
27
|
|
29
28
|
spec.add_development_dependency "bundler", "~> 1.10"
|
29
|
+
spec.add_development_dependency "rake-compiler"
|
30
30
|
spec.add_development_dependency "rspec", "~> 3.0"
|
31
31
|
spec.add_development_dependency "pry-byebug"
|
32
32
|
spec.add_development_dependency "docker-api", "~> 1.20"
|
@@ -0,0 +1,17 @@
|
|
1
|
+
require "itamae-mitsurin/runner"
|
2
|
+
require "itamae-mitsurin/cli"
|
3
|
+
require "itamae-mitsurin/recipe"
|
4
|
+
require "itamae-mitsurin/resource"
|
5
|
+
require "itamae-mitsurin/handler"
|
6
|
+
require "itamae-mitsurin/handler_proxy"
|
7
|
+
require "itamae-mitsurin/recipe_children"
|
8
|
+
require "itamae-mitsurin/logger"
|
9
|
+
require "itamae-mitsurin/node"
|
10
|
+
require "itamae-mitsurin/backend"
|
11
|
+
require "itamae-mitsurin/notification"
|
12
|
+
require "itamae-mitsurin/definition"
|
13
|
+
require "itamae-mitsurin/ext"
|
14
|
+
|
15
|
+
module ItamaeMitsurin
|
16
|
+
# Your code goes here...
|
17
|
+
end
|
@@ -22,7 +22,7 @@ module Specinfra
|
|
22
22
|
end
|
23
23
|
end
|
24
24
|
|
25
|
-
module
|
25
|
+
module ItamaeMitsurin
|
26
26
|
module Backend
|
27
27
|
UnknownBackendTypeError = Class.new(StandardError)
|
28
28
|
CommandExecutionError = Class.new(StandardError)
|
@@ -47,11 +47,11 @@ module Itamae
|
|
47
47
|
options = {error: true}.merge(options)
|
48
48
|
|
49
49
|
command = build_command(commands, options)
|
50
|
-
|
50
|
+
ItamaeMitsurin.logger.debug "Executing `#{command}`..."
|
51
51
|
|
52
52
|
result = nil
|
53
53
|
|
54
|
-
|
54
|
+
ItamaeMitsurin.logger.with_indent do
|
55
55
|
reset_output_handler
|
56
56
|
|
57
57
|
result = run_command_with_profiling(command)
|
@@ -65,7 +65,7 @@ module Itamae
|
|
65
65
|
method = :error
|
66
66
|
message = "Command `#{command}` failed. (exit status: #{result.exit_status})"
|
67
67
|
|
68
|
-
unless
|
68
|
+
unless ItamaeMitsurin.logger.level == ::Logger::DEBUG
|
69
69
|
result.stdout.each_line do |l|
|
70
70
|
log_output_line("stdout", l, :error)
|
71
71
|
end
|
@@ -75,7 +75,7 @@ module Itamae
|
|
75
75
|
end
|
76
76
|
end
|
77
77
|
|
78
|
-
|
78
|
+
ItamaeMitsurin.logger.public_send(method, message)
|
79
79
|
end
|
80
80
|
|
81
81
|
if options[:error] && result.exit_status != 0
|
@@ -91,15 +91,15 @@ module Itamae
|
|
91
91
|
|
92
92
|
def receive_file(src, dst = nil)
|
93
93
|
if dst
|
94
|
-
|
94
|
+
ItamaeMitsurin.logger.debug "Receiving a file from '#{src}' to '#{dst}'..."
|
95
95
|
else
|
96
|
-
|
96
|
+
ItamaeMitsurin.logger.debug "Receiving a file from '#{src}'..."
|
97
97
|
end
|
98
98
|
@backend.receive_file(src, dst)
|
99
99
|
end
|
100
100
|
|
101
101
|
def send_file(src, dst)
|
102
|
-
|
102
|
+
ItamaeMitsurin.logger.debug "Sending a file from '#{src}' to '#{dst}'..."
|
103
103
|
unless ::File.exist?(src)
|
104
104
|
raise SourceNotExistError, "The file '#{src}' doesn't exist."
|
105
105
|
end
|
@@ -110,7 +110,7 @@ module Itamae
|
|
110
110
|
end
|
111
111
|
|
112
112
|
def send_directory(src, dst)
|
113
|
-
|
113
|
+
ItamaeMitsurin.logger.debug "Sending a directory from '#{src}' to '#{dst}'..."
|
114
114
|
unless ::File.exist?(src)
|
115
115
|
raise SourceNotExistError, "The directory '#{src}' doesn't exist."
|
116
116
|
end
|
@@ -162,7 +162,7 @@ module Itamae
|
|
162
162
|
|
163
163
|
def log_output_line(output_name, line, severity = :debug)
|
164
164
|
line = line.gsub(/[[:cntrl:]]/, '')
|
165
|
-
|
165
|
+
ItamaeMitsurin.logger.public_send(severity, "#{output_name} | #{line}")
|
166
166
|
end
|
167
167
|
|
168
168
|
def build_command(commands, options)
|
@@ -271,7 +271,7 @@ module Itamae
|
|
271
271
|
class Docker < Base
|
272
272
|
def finalize
|
273
273
|
image = @backend.commit_container
|
274
|
-
|
274
|
+
ItamaeMitsurin.logger.info "Image created: #{image.id}"
|
275
275
|
end
|
276
276
|
|
277
277
|
private
|
@@ -279,12 +279,12 @@ module Itamae
|
|
279
279
|
begin
|
280
280
|
require 'docker'
|
281
281
|
rescue LoadError
|
282
|
-
|
282
|
+
ItamaeMitsurin.logger.fatal "To use docker backend, please install 'docker-api' gem"
|
283
283
|
end
|
284
284
|
|
285
285
|
# TODO: Move to Specinfra?
|
286
286
|
Excon.defaults[:ssl_verify_peer] = @options[:tls_verify_peer]
|
287
|
-
::Docker.logger =
|
287
|
+
::Docker.logger = ItamaeMitsurin.logger
|
288
288
|
|
289
289
|
Specinfra::Backend::Docker.new(
|
290
290
|
docker_image: @options[:image],
|
@@ -1,7 +1,7 @@
|
|
1
|
-
require 'itamae'
|
1
|
+
require 'itamae-mitsurin'
|
2
2
|
require 'thor'
|
3
3
|
|
4
|
-
module
|
4
|
+
module ItamaeMitsurin
|
5
5
|
class CLI < Thor
|
6
6
|
|
7
7
|
class_option :log_level, type: :string, aliases: ['-l'], default: 'info'
|
@@ -11,8 +11,8 @@ module Itamae
|
|
11
11
|
def initialize(*)
|
12
12
|
super
|
13
13
|
|
14
|
-
|
15
|
-
|
14
|
+
ItamaeMitsurin.logger.level = ::Logger.const_get(options[:log_level].upcase)
|
15
|
+
ItamaeMitsurin.logger.formatter.colored = options[:color]
|
16
16
|
end
|
17
17
|
|
18
18
|
def self.define_exec_options
|
@@ -71,7 +71,7 @@ module Itamae
|
|
71
71
|
|
72
72
|
desc "version", "Print version"
|
73
73
|
def version
|
74
|
-
puts "
|
74
|
+
puts "itamae-mitsurin v#{ItamaeMitsurin::VERSION}"
|
75
75
|
end
|
76
76
|
|
77
77
|
private
|
@@ -0,0 +1 @@
|
|
1
|
+
require 'itamae-mitsurin/ext/specinfra'
|
File without changes
|
@@ -1,6 +1,6 @@
|
|
1
|
-
require 'itamae/handler/base'
|
1
|
+
require 'itamae-mitsurin/handler/base'
|
2
2
|
|
3
|
-
module
|
3
|
+
module ItamaeMitsurin
|
4
4
|
module Handler
|
5
5
|
def self.from_type(type)
|
6
6
|
first_time = true
|
@@ -8,7 +8,7 @@ module Itamae
|
|
8
8
|
class_name = type.split('_').map(&:capitalize).join
|
9
9
|
self.const_get(class_name)
|
10
10
|
rescue NameError
|
11
|
-
require "itamae/handler/#{type}"
|
11
|
+
require "itamae-mitsurin/handler/#{type}"
|
12
12
|
|
13
13
|
if first_time
|
14
14
|
first_time = false
|
@@ -1,4 +1,4 @@
|
|
1
|
-
module
|
1
|
+
module ItamaeMitsurin
|
2
2
|
module Handler
|
3
3
|
class Fluentd < Base
|
4
4
|
attr_accessor :fluent_logger # for test
|
@@ -12,7 +12,7 @@ module Itamae
|
|
12
12
|
super
|
13
13
|
|
14
14
|
unless @fluent_logger.post(type, payload.merge(hostname: hostname))
|
15
|
-
|
15
|
+
ItamaeMitsurin.logger.warn "Sending logs to Fluentd failed: #{@fluent_logger.last_error}"
|
16
16
|
end
|
17
17
|
end
|
18
18
|
|
@@ -1,8 +1,8 @@
|
|
1
|
-
require 'itamae'
|
1
|
+
require 'itamae-mitsurin'
|
2
2
|
require 'logger'
|
3
3
|
require 'ansi/code'
|
4
4
|
|
5
|
-
module
|
5
|
+
module ItamaeMitsurin
|
6
6
|
module Logger
|
7
7
|
module Helper
|
8
8
|
def with_indent
|
@@ -109,8 +109,8 @@ module Itamae
|
|
109
109
|
end
|
110
110
|
|
111
111
|
@logger = ::Logger.new($stdout).tap do |l|
|
112
|
-
l.formatter =
|
113
|
-
end.extend(
|
112
|
+
l.formatter = ItamaeMitsurin::Logger::Formatter.new
|
113
|
+
end.extend(ItamaeMitsurin::Logger::Helper)
|
114
114
|
|
115
115
|
class << self
|
116
116
|
def logger
|
@@ -118,7 +118,7 @@ module Itamae
|
|
118
118
|
end
|
119
119
|
|
120
120
|
def logger=(l)
|
121
|
-
@logger = l.extend(
|
121
|
+
@logger = l.extend(ItamaeMitsurin::Logger::Helper)
|
122
122
|
end
|
123
123
|
end
|
124
124
|
end
|
@@ -0,0 +1,14 @@
|
|
1
|
+
require 'itamae-mitsurin/version'
|
2
|
+
require 'itamae-mitsurin/mitsurin/cli'
|
3
|
+
require 'itamae-mitsurin/mitsurin/creators'
|
4
|
+
require 'aws-sdk'
|
5
|
+
#require 'itamae-mitsurin/mitsurin/itamae_task'
|
6
|
+
#require 'itamae-mitsurin/mitsurin/serverspec_task'
|
7
|
+
#require 'itamae-mitsurin/mitsurin/itamae_with_git_task'
|
8
|
+
|
9
|
+
|
10
|
+
module ItamaeMitsurin
|
11
|
+
module Mitsurin
|
12
|
+
# TODO
|
13
|
+
end
|
14
|
+
end
|
@@ -1,8 +1,8 @@
|
|
1
|
-
require 'itamae'
|
2
|
-
require 'itamae/mitsurin'
|
1
|
+
require 'itamae-mitsurin'
|
2
|
+
require 'itamae-mitsurin/mitsurin'
|
3
3
|
require 'thor'
|
4
4
|
|
5
|
-
module
|
5
|
+
module ItamaeMitsurin
|
6
6
|
module Mitsurin
|
7
7
|
class CLI < Thor
|
8
8
|
CREATE_TARGETS = %w[ cookbook ].freeze
|
@@ -11,7 +11,7 @@ module Itamae
|
|
11
11
|
|
12
12
|
desc "version", "Print version"
|
13
13
|
def version
|
14
|
-
puts "
|
14
|
+
puts "shikomi(itamae-mitsurin) v#{ItamaeMitsurin::VERSION}"
|
15
15
|
end
|
16
16
|
|
17
17
|
desc "init", "Create a new project"
|
@@ -46,7 +46,7 @@ module Itamae
|
|
46
46
|
private
|
47
47
|
def validate_create_target!(command, target)
|
48
48
|
unless CREATE_TARGETS.include?(target)
|
49
|
-
msg = %Q!ERROR: "
|
49
|
+
msg = %Q!ERROR: "shikomi #{command}" was called with "#{target}" !
|
50
50
|
msg << "but expected to be in #{CREATE_TARGETS.inspect}"
|
51
51
|
fail InvocationError, msg
|
52
52
|
end
|