itamae-mitsurin 0.4 → 0.7

Sign up to get free protection for your applications and to get access to all the features.
Files changed (235) hide show
  1. checksums.yaml +4 -4
  2. data/LICENSE.txt +1 -1
  3. data/README.md +2 -1
  4. data/Rakefile +17 -15
  5. data/bin/itamae +2 -3
  6. data/bin/manaita +5 -0
  7. data/itamae-mitsurin.gemspec +4 -4
  8. data/lib/itamae-mitsurin.rb +17 -0
  9. data/lib/{itamae → itamae-mitsurin}/backend.rb +13 -13
  10. data/lib/{itamae → itamae-mitsurin}/cli.rb +5 -5
  11. data/lib/{itamae → itamae-mitsurin}/definition.rb +2 -2
  12. data/lib/itamae-mitsurin/ext.rb +1 -0
  13. data/lib/{itamae → itamae-mitsurin}/ext/specinfra.rb +0 -0
  14. data/lib/{itamae → itamae-mitsurin}/handler.rb +3 -3
  15. data/lib/{itamae → itamae-mitsurin}/handler/base.rb +1 -1
  16. data/lib/{itamae → itamae-mitsurin}/handler/debug.rb +2 -2
  17. data/lib/{itamae → itamae-mitsurin}/handler/fluentd.rb +2 -2
  18. data/lib/{itamae → itamae-mitsurin}/handler/json.rb +1 -1
  19. data/lib/{itamae → itamae-mitsurin}/handler_proxy.rb +1 -1
  20. data/lib/{itamae → itamae-mitsurin}/logger.rb +5 -5
  21. data/lib/itamae-mitsurin/mitsurin.rb +14 -0
  22. data/lib/{itamae → itamae-mitsurin}/mitsurin/cli.rb +5 -5
  23. data/lib/{itamae → itamae-mitsurin}/mitsurin/creators.rb +3 -3
  24. data/lib/itamae-mitsurin/mitsurin/creators/cookbook.rb +24 -0
  25. data/lib/itamae-mitsurin/mitsurin/creators/project.rb +24 -0
  26. data/lib/{itamae → itamae-mitsurin}/mitsurin/creators/templates/project/.rspec +0 -0
  27. data/lib/{itamae → itamae-mitsurin}/mitsurin/creators/templates/project/Gemfile +0 -1
  28. data/lib/itamae-mitsurin/mitsurin/creators/templates/project/Rakefile +2 -0
  29. data/lib/{itamae/generators/templates/cookbook/files → itamae-mitsurin/mitsurin/creators/templates/project/environments}/.keep +0 -0
  30. data/lib/{itamae → itamae-mitsurin}/mitsurin/creators/templates/project/environments/sample.json +0 -0
  31. data/lib/{itamae/generators/templates/cookbook/templates → itamae-mitsurin/mitsurin/creators/templates/project/keys}/.keep +0 -0
  32. data/lib/{itamae/generators/templates/project/cookbooks → itamae-mitsurin/mitsurin/creators/templates/project/nodes}/.keep +0 -0
  33. data/lib/itamae-mitsurin/mitsurin/creators/templates/project/nodes/sample01.json +10 -0
  34. data/lib/{itamae/generators → itamae-mitsurin/mitsurin/creators}/templates/project/roles/.keep +0 -0
  35. data/lib/{itamae/generators/templates/role/files → itamae-mitsurin/mitsurin/creators/templates/project/site-cookbooks/_base/_base/attributes}/.keep +0 -0
  36. data/lib/itamae-mitsurin/mitsurin/creators/templates/project/site-cookbooks/_base/_base/recipes/default.rb +1 -0
  37. data/lib/{itamae/generators/templates/role/templates → itamae-mitsurin/mitsurin/creators/templates/project/site-cookbooks/_base/_base/recipes/directories}/.keep +0 -0
  38. data/lib/{itamae/mitsurin/creators/templates/project/environments → itamae-mitsurin/mitsurin/creators/templates/project/site-cookbooks/_base/_base/recipes/files}/.keep +0 -0
  39. data/lib/{itamae/mitsurin/creators/templates/project/keys → itamae-mitsurin/mitsurin/creators/templates/project/site-cookbooks/_base/_base/recipes/templates}/.keep +0 -0
  40. data/lib/{itamae → itamae-mitsurin}/mitsurin/creators/templates/project/site-cookbooks/_base/_base/spec/default_spec.rb +0 -0
  41. data/lib/{itamae → itamae-mitsurin}/mitsurin/creators/templates/project/spec/spec_helper.rb +0 -0
  42. data/lib/{itamae/mitsurin/creators/templates/project/nodes → itamae-mitsurin/mitsurin/creators/templates/project/tmp-nodes}/.keep +0 -0
  43. data/lib/{itamae/mitsurin/creators/templates/project/roles → itamae-mitsurin/mitsurin/creators/templates/site-cookbooks/attributes}/.keep +0 -0
  44. data/lib/{itamae/generators/templates/cookbook → itamae-mitsurin/mitsurin/creators/templates/site-cookbooks/recipes}/default.rb +0 -0
  45. data/lib/{itamae/mitsurin/creators/templates/project/site-cookbooks/_base/_base/attributes → itamae-mitsurin/mitsurin/creators/templates/site-cookbooks/recipes/directories}/.keep +0 -0
  46. data/lib/{itamae/mitsurin/creators/templates/project/site-cookbooks/_base/_base → itamae-mitsurin/mitsurin/creators/templates/site-cookbooks/recipes}/files/.keep +0 -0
  47. data/lib/{itamae/mitsurin/creators/templates/project/site-cookbooks/_base/_base → itamae-mitsurin/mitsurin/creators/templates/site-cookbooks/recipes}/templates/.keep +0 -0
  48. data/lib/{itamae/generators/templates/role/default.rb → itamae-mitsurin/mitsurin/creators/templates/site-cookbooks/spec/default_spec.rb} +0 -0
  49. data/lib/itamae-mitsurin/mitsurin/itamae_task.rb +197 -0
  50. data/lib/itamae-mitsurin/mitsurin/itamae_with_git_task.rb +213 -0
  51. data/lib/itamae-mitsurin/mitsurin/serverspec_task.rb +123 -0
  52. data/lib/{itamae → itamae-mitsurin}/node.rb +3 -3
  53. data/lib/{itamae → itamae-mitsurin}/notification.rb +3 -3
  54. data/lib/{itamae → itamae-mitsurin}/recipe.rb +6 -6
  55. data/lib/{itamae → itamae-mitsurin}/recipe_children.rb +2 -2
  56. data/lib/{itamae → itamae-mitsurin}/resource.rb +23 -23
  57. data/lib/{itamae → itamae-mitsurin}/resource/aws_ebs_volume.rb +3 -3
  58. data/lib/{itamae → itamae-mitsurin}/resource/base.rb +23 -23
  59. data/lib/{itamae → itamae-mitsurin}/resource/directory.rb +2 -2
  60. data/lib/{itamae → itamae-mitsurin}/resource/execute.rb +2 -2
  61. data/lib/itamae-mitsurin/resource/file.rb +180 -0
  62. data/lib/{itamae → itamae-mitsurin}/resource/gem_package.rb +2 -2
  63. data/lib/{itamae → itamae-mitsurin}/resource/git.rb +2 -2
  64. data/lib/{itamae → itamae-mitsurin}/resource/group.rb +2 -2
  65. data/lib/{itamae → itamae-mitsurin}/resource/http_request.rb +3 -3
  66. data/lib/{itamae → itamae-mitsurin}/resource/link.rb +2 -2
  67. data/lib/{itamae → itamae-mitsurin}/resource/local_ruby_block.rb +2 -2
  68. data/lib/{itamae → itamae-mitsurin}/resource/package.rb +2 -2
  69. data/lib/{itamae → itamae-mitsurin}/resource/remote_directory.rb +5 -5
  70. data/lib/{itamae → itamae-mitsurin}/resource/remote_file.rb +3 -3
  71. data/lib/{itamae → itamae-mitsurin}/resource/service.rb +2 -2
  72. data/lib/{itamae → itamae-mitsurin}/resource/template.rb +2 -2
  73. data/lib/{itamae → itamae-mitsurin}/resource/user.rb +2 -2
  74. data/lib/{itamae → itamae-mitsurin}/runner.rb +8 -8
  75. data/lib/{itamae/mitsurin → itamae-mitsurin}/version.rb +1 -3
  76. data/lib/itamae-mitsurin/version.txt +1 -0
  77. data/test/test_itamae-mitsurin.rb +18 -0
  78. data/test/test_itamae-mitsurin/ext/test_specinfra.rb +39 -0
  79. data/test/test_itamae-mitsurin/handler/test_base.rb +40 -0
  80. data/test/test_itamae-mitsurin/handler/test_debug.rb +10 -0
  81. data/test/test_itamae-mitsurin/handler/test_fluentd.rb +44 -0
  82. data/test/test_itamae-mitsurin/handler/test_json.rb +22 -0
  83. data/test/test_itamae-mitsurin/mitsurin/creators/templates/project/.rspec +2 -0
  84. data/test/test_itamae-mitsurin/mitsurin/creators/templates/project/Gemfile +3 -0
  85. data/{lib/itamae → test/test_itamae-mitsurin}/mitsurin/creators/templates/project/Rakefile +0 -0
  86. data/{lib/itamae/mitsurin/creators/templates/project/tmp-nodes → test/test_itamae-mitsurin/mitsurin/creators/templates/project/environments}/.keep +0 -0
  87. data/test/test_itamae-mitsurin/mitsurin/creators/templates/project/environments/sample.json +7 -0
  88. data/{lib/itamae/mitsurin/creators/templates/site-cookbooks/attributes → test/test_itamae-mitsurin/mitsurin/creators/templates/project/keys}/.keep +0 -0
  89. data/{lib/itamae/mitsurin/creators/templates/site-cookbooks/files → test/test_itamae-mitsurin/mitsurin/creators/templates/project/nodes}/.keep +0 -0
  90. data/{lib/itamae → test/test_itamae-mitsurin}/mitsurin/creators/templates/project/nodes/sample01.json +0 -0
  91. data/{lib/itamae/mitsurin/creators/templates/site-cookbooks/spec → test/test_itamae-mitsurin/mitsurin/creators/templates/project/roles}/.keep +0 -0
  92. 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
  93. 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
  94. data/{lib/itamae → test/test_itamae-mitsurin}/mitsurin/creators/templates/project/site-cookbooks/_base/_base/recipes/default.rb +0 -0
  95. data/test/test_itamae-mitsurin/mitsurin/creators/templates/project/site-cookbooks/_base/_base/spec/default_spec.rb +1 -0
  96. data/test/test_itamae-mitsurin/mitsurin/creators/templates/project/site-cookbooks/_base/_base/templates/.keep +0 -0
  97. data/test/test_itamae-mitsurin/mitsurin/creators/templates/project/spec/spec_helper.rb +33 -0
  98. data/test/test_itamae-mitsurin/mitsurin/creators/templates/project/tmp-nodes/.keep +0 -0
  99. data/test/test_itamae-mitsurin/mitsurin/creators/templates/site-cookbooks/attributes/.keep +0 -0
  100. data/test/test_itamae-mitsurin/mitsurin/creators/templates/site-cookbooks/files/.keep +0 -0
  101. data/test/test_itamae-mitsurin/mitsurin/creators/templates/site-cookbooks/recipes/default.rb +0 -0
  102. data/test/test_itamae-mitsurin/mitsurin/creators/templates/site-cookbooks/spec/.keep +0 -0
  103. data/test/test_itamae-mitsurin/mitsurin/creators/templates/site-cookbooks/templates/.keep +0 -0
  104. data/{lib/itamae/mitsurin/creators/cookbook.rb → test/test_itamae-mitsurin/mitsurin/creators/test_cookbook.rb} +0 -0
  105. data/{lib/itamae/mitsurin/creators/project.rb → test/test_itamae-mitsurin/mitsurin/creators/test_project.rb} +0 -0
  106. data/test/test_itamae-mitsurin/mitsurin/test_cli.rb +56 -0
  107. data/test/test_itamae-mitsurin/mitsurin/test_creators.rb +19 -0
  108. data/{lib/itamae/mitsurin/itamae_task.rb → test/test_itamae-mitsurin/mitsurin/test_itamae_task.rb} +0 -1
  109. data/{lib/itamae/mitsurin/itamae_with_git_task.rb → test/test_itamae-mitsurin/mitsurin/test_itamae_with_git_task.rb} +0 -1
  110. data/{lib/itamae/mitsurin/serverspec_task.rb → test/test_itamae-mitsurin/mitsurin/test_serverspec_task.rb} +1 -1
  111. data/test/test_itamae-mitsurin/resource/test_aws_ebs_volume.rb +84 -0
  112. data/test/test_itamae-mitsurin/resource/test_base.rb +374 -0
  113. data/test/test_itamae-mitsurin/resource/test_directory.rb +63 -0
  114. data/test/test_itamae-mitsurin/resource/test_execute.rb +26 -0
  115. data/{lib/itamae/resource/file.rb → test/test_itamae-mitsurin/resource/test_file.rb} +6 -6
  116. data/test/test_itamae-mitsurin/resource/test_gem_package.rb +81 -0
  117. data/test/test_itamae-mitsurin/resource/test_git.rb +94 -0
  118. data/test/test_itamae-mitsurin/resource/test_group.rb +42 -0
  119. data/test/test_itamae-mitsurin/resource/test_http_request.rb +71 -0
  120. data/test/test_itamae-mitsurin/resource/test_link.rb +33 -0
  121. data/test/test_itamae-mitsurin/resource/test_local_ruby_block.rb +15 -0
  122. data/test/test_itamae-mitsurin/resource/test_package.rb +44 -0
  123. data/test/test_itamae-mitsurin/resource/test_remote_directory.rb +84 -0
  124. data/test/test_itamae-mitsurin/resource/test_remote_file.rb +54 -0
  125. data/test/test_itamae-mitsurin/resource/test_service.rb +69 -0
  126. data/test/test_itamae-mitsurin/resource/test_template.rb +53 -0
  127. data/test/test_itamae-mitsurin/resource/test_user.rb +93 -0
  128. data/test/test_itamae-mitsurin/test_backend.rb +297 -0
  129. data/test/test_itamae-mitsurin/test_cli.rb +88 -0
  130. data/test/test_itamae-mitsurin/test_definition.rb +40 -0
  131. data/test/test_itamae-mitsurin/test_ext.rb +1 -0
  132. data/test/test_itamae-mitsurin/test_handler.rb +21 -0
  133. data/test/test_itamae-mitsurin/test_handler_proxy.rb +38 -0
  134. data/test/test_itamae-mitsurin/test_logger.rb +124 -0
  135. data/test/test_itamae-mitsurin/test_mitsurin.rb +14 -0
  136. data/test/test_itamae-mitsurin/test_node.rb +74 -0
  137. data/test/test_itamae-mitsurin/test_notification.rb +46 -0
  138. data/test/test_itamae-mitsurin/test_recipe.rb +171 -0
  139. data/test/test_itamae-mitsurin/test_recipe_children.rb +86 -0
  140. data/test/test_itamae-mitsurin/test_resource.rb +73 -0
  141. data/test/test_itamae-mitsurin/test_runner.rb +124 -0
  142. data/test/test_itamae-mitsurin/test_version.rb +3 -0
  143. data/{lib/itamae/mitsurin → test/test_itamae-mitsurin}/version.txt +0 -0
  144. data/test_project/.rspec +2 -0
  145. data/test_project/Gemfile +4 -0
  146. data/test_project/Rakefile +3 -0
  147. data/test_project/environments/.keep +0 -0
  148. data/test_project/keys/.keep +0 -0
  149. data/test_project/nodes/.keep +0 -0
  150. data/test_project/nodes/test.json +9 -0
  151. data/test_project/roles/.keep +0 -0
  152. data/test_project/roles/test.json +14 -0
  153. data/test_project/site-cookbooks/_base/_base/attributes/.keep +0 -0
  154. data/test_project/site-cookbooks/_base/_base/files/.keep +0 -0
  155. data/test_project/site-cookbooks/_base/_base/recipes/default.rb +1 -0
  156. data/test_project/site-cookbooks/_base/_base/spec/default_spec.rb +1 -0
  157. data/test_project/site-cookbooks/_base/_base/templates/.keep +0 -0
  158. data/test_project/site-cookbooks/a_test/directory/attributes/.keep +0 -0
  159. data/test_project/site-cookbooks/a_test/directory/files/.keep +0 -0
  160. data/test_project/site-cookbooks/a_test/directory/recipes/default.rb +8 -0
  161. data/test_project/site-cookbooks/a_test/directory/spec/.keep +0 -0
  162. data/test_project/site-cookbooks/a_test/directory/spec/default_spec.rb +4 -0
  163. data/test_project/site-cookbooks/a_test/directory/templates/.keep +0 -0
  164. data/test_project/site-cookbooks/a_test/package/attributes/.keep +0 -0
  165. data/test_project/site-cookbooks/a_test/package/files/.keep +0 -0
  166. data/test_project/site-cookbooks/a_test/package/recipes/default.rb +2 -0
  167. data/test_project/site-cookbooks/a_test/package/spec/.keep +0 -0
  168. data/test_project/site-cookbooks/a_test/package/spec/default_spec.rb +4 -0
  169. data/test_project/site-cookbooks/a_test/package/templates/.keep +0 -0
  170. data/test_project/site-cookbooks/a_test/service/attributes/.keep +0 -0
  171. data/test_project/site-cookbooks/a_test/service/files/.keep +0 -0
  172. data/test_project/site-cookbooks/a_test/service/recipes/default.rb +5 -0
  173. data/test_project/site-cookbooks/a_test/service/spec/.keep +0 -0
  174. data/test_project/site-cookbooks/a_test/service/spec/default_spec.rb +6 -0
  175. data/test_project/site-cookbooks/a_test/service/templates/.keep +0 -0
  176. data/test_project/site-cookbooks/b_test/git/attributes/.keep +0 -0
  177. data/test_project/site-cookbooks/b_test/git/files/.keep +0 -0
  178. data/test_project/site-cookbooks/b_test/git/recipes/default.rb +5 -0
  179. data/test_project/site-cookbooks/b_test/git/spec/.keep +0 -0
  180. data/test_project/site-cookbooks/b_test/git/spec/default_spec.rb +5 -0
  181. data/test_project/site-cookbooks/b_test/git/templates/.keep +0 -0
  182. data/test_project/site-cookbooks/b_test/link/attributes/.keep +0 -0
  183. data/test_project/site-cookbooks/b_test/link/files/.keep +0 -0
  184. data/test_project/site-cookbooks/b_test/link/recipes/default.rb +5 -0
  185. data/test_project/site-cookbooks/b_test/link/spec/.keep +0 -0
  186. data/test_project/site-cookbooks/b_test/link/spec/default_spec.rb +5 -0
  187. data/test_project/site-cookbooks/b_test/link/templates/.keep +0 -0
  188. data/test_project/site-cookbooks/b_test/remote_file/attributes/.keep +0 -0
  189. data/test_project/site-cookbooks/b_test/remote_file/files/.keep +0 -0
  190. data/test_project/site-cookbooks/b_test/remote_file/files/remote_file.sh +1 -0
  191. data/test_project/site-cookbooks/b_test/remote_file/recipes/default.rb +9 -0
  192. data/test_project/site-cookbooks/b_test/remote_file/spec/.keep +0 -0
  193. data/test_project/site-cookbooks/b_test/remote_file/spec/default_spec.rb +7 -0
  194. data/test_project/site-cookbooks/b_test/remote_file/templates/.keep +0 -0
  195. data/test_project/site-cookbooks/b_test/template/attributes/.keep +0 -0
  196. data/test_project/site-cookbooks/b_test/template/files/.keep +0 -0
  197. data/test_project/site-cookbooks/b_test/template/recipes/default.rb +5 -0
  198. data/test_project/site-cookbooks/b_test/template/spec/.keep +0 -0
  199. data/test_project/site-cookbooks/b_test/template/spec/default_spec.rb +7 -0
  200. data/test_project/site-cookbooks/b_test/template/templates/.keep +0 -0
  201. data/test_project/site-cookbooks/b_test/template/templates/template.erb +2 -0
  202. data/test_project/site-cookbooks/c_test/execute/attributes/.keep +0 -0
  203. data/test_project/site-cookbooks/c_test/execute/files/.keep +0 -0
  204. data/test_project/site-cookbooks/c_test/execute/recipes/default.rb +6 -0
  205. data/test_project/site-cookbooks/c_test/execute/spec/.keep +0 -0
  206. data/test_project/site-cookbooks/c_test/execute/spec/default_spec.rb +6 -0
  207. data/test_project/site-cookbooks/c_test/execute/templates/.keep +0 -0
  208. data/test_project/site-cookbooks/c_test/remote_directory/attributes/.keep +0 -0
  209. data/test_project/site-cookbooks/c_test/remote_directory/files/.keep +0 -0
  210. data/test_project/site-cookbooks/c_test/remote_directory/recipes/default.rb +10 -0
  211. data/test_project/site-cookbooks/c_test/remote_directory/spec/.keep +0 -0
  212. data/test_project/site-cookbooks/c_test/remote_directory/spec/default_spec.rb +20 -0
  213. data/test_project/site-cookbooks/c_test/remote_directory/templates/.keep +0 -0
  214. data/test_project/site-cookbooks/c_test/remote_directory/templates/remote_dir/a.txt +0 -0
  215. data/test_project/site-cookbooks/c_test/remote_directory/templates/remote_dir/b.txt +0 -0
  216. data/test_project/site-cookbooks/c_test/remote_directory/templates/remote_dir/c.txt +0 -0
  217. data/test_project/site-cookbooks/d_spec/air/attributes/.keep +0 -0
  218. data/test_project/site-cookbooks/d_spec/air/files/.keep +0 -0
  219. data/test_project/site-cookbooks/d_spec/air/recipes/default.rb +0 -0
  220. data/test_project/site-cookbooks/d_spec/air/spec/.keep +0 -0
  221. data/test_project/site-cookbooks/d_spec/air/spec/default_spec.rb +0 -0
  222. data/test_project/site-cookbooks/d_spec/air/templates/.keep +0 -0
  223. data/test_project/spec/spec_helper.rb +33 -0
  224. data/test_project/tmp-nodes/.keep +0 -0
  225. data/test_project/tmp-nodes/test.json +12 -0
  226. metadata +337 -138
  227. data/bin/itamae-mitsurin +0 -5
  228. data/lib/itamae.rb +0 -18
  229. data/lib/itamae/ext.rb +0 -1
  230. data/lib/itamae/generators.rb +0 -20
  231. data/lib/itamae/generators/cookbook.rb +0 -22
  232. data/lib/itamae/generators/project.rb +0 -22
  233. data/lib/itamae/generators/role.rb +0 -22
  234. data/lib/itamae/generators/templates/project/Gemfile +0 -4
  235. data/lib/itamae/mitsurin.rb +0 -14
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: eb10fdaf74906a17da6f88364c2fd758f20d35ab
4
- data.tar.gz: e0a64acfc4099cc9a7bc4f35ab612abefe7d4cb4
3
+ metadata.gz: e4a13a13168741e95c8e8adc93ab308a34a45892
4
+ data.tar.gz: 47410d5b59390fc5aeb0b95801b7ac12979c3da5
5
5
  SHA512:
6
- metadata.gz: 1aa4b406d867b1fc844bcdba2f096eb2decb1065f7c257f9da8522652ac39e37ef4c1fae1966a0536308ee3721a1b8cbc72614b2f1d0565e0ff952d0058790f4
7
- data.tar.gz: 4454340317f8a0e1a905c7b3e3778a17909b06f1a60df20cc1dff3eadd4036d6f3f5d3464168098c5ae67636c9a7d365a6b3f2ea4cc07fcd7526dda4fd78acf9
6
+ metadata.gz: 1241689feb0f512bb31deea4e8263d94b485cff966d382045f2d5e731a15af1780e9396638e8c042fb9ca2778287d1eca5c9d3d4a7bfe6032d9bb24b6304ae0b
7
+ data.tar.gz: 29684144ddebcab7d461745a26e286a5d7fa97807008d7a7cd31864939f8c5ed500f4fab4ab938c8362ce77a2f381cad830e2645f49fb25d424dd117eb8d3c57
data/LICENSE.txt CHANGED
@@ -1,6 +1,6 @@
1
1
  Copyright (c) 2016 Akihiro Kamiyama
2
2
 
3
- Ripped out of Itamae 1.9.3, Itamae-plugin-resource-aws 0.1 and modified.
3
+ Ripped out of Itamae, Itamae-plugin-resource-aws 0.1 and modified.
4
4
  Copyright (c) 2013-2015 Ryota Arai
5
5
  Copyright (c) 2015 Gosuke Miyashita
6
6
 
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
- $ itamae-mitsurin init
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/mitsurin/version.rb'
14
+ require './lib/itamae-mitsurin/version.rb'
15
15
  def version
16
- Itamae::Mitsurin::VERSION
16
+ ItamaeMitsurin::VERSION
17
17
  end
18
18
 
19
- task :default => :test
20
- task :test => :compile
21
- Rake::TestTask.new do |t|
22
- t.libs << 'lib' << 'test'
23
- t.test_files = FileList['test/test_*.rb'].exclude('test/test_assoccoords.rb')
24
- end
25
-
26
- Rake::ExtensionTask.new do |ext|
27
- ext.name = 'itamae-mitsurin'
28
- ext.ext_dir = 'ext/'
29
- ext.lib_dir = 'lib/'
30
- end
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/mitsurin/version.txt")
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
@@ -1,5 +1,4 @@
1
1
  #!/usr/bin/env ruby
2
2
 
3
- require 'itamae/cli'
4
- Itamae::CLI.start
5
-
3
+ require 'itamae-mitsurin/cli'
4
+ ItamaeMitsurin::CLI.start
data/bin/manaita ADDED
@@ -0,0 +1,5 @@
1
+ #!/usr/bin/env ruby
2
+
3
+ require 'itamae-mitsurin/mitsurin/cli'
4
+ ItamaeMitsurin::Mitsurin::CLI.start
5
+
@@ -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/mitsurin/version'
4
+ require 'itamae-mitsurin/version'
5
5
 
6
6
  Gem::Specification.new do |spec|
7
7
  spec.name = "itamae-mitsurin"
8
- spec.version = Itamae::Mitsurin::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 "rake"
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 Itamae
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
- Itamae.logger.debug "Executing `#{command}`..."
50
+ ItamaeMitsurin.logger.debug "Executing `#{command}`..."
51
51
 
52
52
  result = nil
53
53
 
54
- Itamae.logger.with_indent do
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 Itamae.logger.level == ::Logger::DEBUG
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
- Itamae.logger.public_send(method, message)
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
- Itamae.logger.debug "Receiving a file from '#{src}' to '#{dst}'..."
94
+ ItamaeMitsurin.logger.debug "Receiving a file from '#{src}' to '#{dst}'..."
95
95
  else
96
- Itamae.logger.debug "Receiving a file from '#{src}'..."
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
- Itamae.logger.debug "Sending a file from '#{src}' to '#{dst}'..."
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
- Itamae.logger.debug "Sending a directory from '#{src}' to '#{dst}'..."
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
- Itamae.logger.public_send(severity, "#{output_name} | #{line}")
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
- Itamae.logger.info "Image created: #{image.id}"
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
- Itamae.logger.fatal "To use docker backend, please install 'docker-api' gem"
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 = Itamae.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 Itamae
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
- Itamae.logger.level = ::Logger.const_get(options[:log_level].upcase)
15
- Itamae.logger.formatter.colored = options[:color]
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 "Itamae-Mitsurin v#{Itamae::Mitsurin::VERSION}"
74
+ puts "itamae-mitsurin v#{ItamaeMitsurin::VERSION}"
75
75
  end
76
76
 
77
77
  private
@@ -1,6 +1,6 @@
1
- require 'itamae'
1
+ require 'itamae-mitsurin'
2
2
 
3
- module Itamae
3
+ module ItamaeMitsurin
4
4
  class Definition < Resource::Base
5
5
  class << self
6
6
  attr_accessor :definition_block
@@ -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 Itamae
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,6 +1,6 @@
1
1
  require 'socket'
2
2
 
3
- module Itamae
3
+ module ItamaeMitsurin
4
4
  module Handler
5
5
  class Base
6
6
  attr_reader :recipes, :resources, :actions
@@ -1,9 +1,9 @@
1
- module Itamae
1
+ module ItamaeMitsurin
2
2
  module Handler
3
3
  class Debug < Base
4
4
  def event(type, payload = {})
5
5
  super
6
- Itamae.logger.info("EVENT:#{type} #{payload}")
6
+ ItamaeMitsurin.logger.info("EVENT:#{type} #{payload}")
7
7
  end
8
8
  end
9
9
  end
@@ -1,4 +1,4 @@
1
- module Itamae
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
- Itamae.logger.warn "Sending logs to Fluentd failed: #{@fluent_logger.last_error}"
15
+ ItamaeMitsurin.logger.warn "Sending logs to Fluentd failed: #{@fluent_logger.last_error}"
16
16
  end
17
17
  end
18
18
 
@@ -1,4 +1,4 @@
1
- module Itamae
1
+ module ItamaeMitsurin
2
2
  module Handler
3
3
  class Json < Base
4
4
  def initialize(*)
@@ -1,4 +1,4 @@
1
- module Itamae
1
+ module ItamaeMitsurin
2
2
  class HandlerProxy
3
3
  def initialize
4
4
  @instances = []
@@ -1,8 +1,8 @@
1
- require 'itamae'
1
+ require 'itamae-mitsurin'
2
2
  require 'logger'
3
3
  require 'ansi/code'
4
4
 
5
- module Itamae
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 = Itamae::Logger::Formatter.new
113
- end.extend(Itamae::Logger::Helper)
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(Itamae::Logger::Helper)
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 Itamae
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 "Itamae-Mitsurin v#{Itamae::Mitsurin::VERSION}"
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: "itamae #{command}" was called with "#{target}" !
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