masamune 0.15.6 → 0.16.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (217) hide show
  1. checksums.yaml +4 -4
  2. data/LICENSE.txt +1 -1
  3. data/Rakefile +1 -1
  4. data/bin/{masamune-elastic-mapreduce → masamune-aws-emr} +3 -3
  5. data/bin/masamune-dump +1 -1
  6. data/bin/masamune-hive +1 -1
  7. data/bin/masamune-psql +1 -1
  8. data/bin/masamune-shell +1 -1
  9. data/lib/masamune.rb +1 -1
  10. data/lib/masamune/actions.rb +1 -1
  11. data/lib/masamune/actions/{elastic_mapreduce.rb → aws_emr.rb} +14 -30
  12. data/lib/masamune/actions/data_flow.rb +1 -1
  13. data/lib/masamune/actions/date_parse.rb +1 -1
  14. data/lib/masamune/actions/execute.rb +1 -1
  15. data/lib/masamune/actions/filesystem.rb +1 -1
  16. data/lib/masamune/actions/hadoop_filesystem.rb +1 -1
  17. data/lib/masamune/actions/hadoop_streaming.rb +10 -8
  18. data/lib/masamune/actions/hive.rb +2 -2
  19. data/lib/masamune/actions/invoke_parallel.rb +1 -1
  20. data/lib/masamune/actions/postgres.rb +1 -1
  21. data/lib/masamune/actions/postgres_admin.rb +1 -1
  22. data/lib/masamune/actions/s3cmd.rb +1 -1
  23. data/lib/masamune/actions/transform.rb +1 -1
  24. data/lib/masamune/after_initialize_callbacks.rb +1 -1
  25. data/lib/masamune/cached_filesystem.rb +2 -2
  26. data/lib/masamune/commands.rb +1 -1
  27. data/lib/masamune/commands/{elastic_mapreduce.rb → aws_emr.rb} +38 -29
  28. data/lib/masamune/commands/hadoop_filesystem.rb +1 -1
  29. data/lib/masamune/commands/hadoop_streaming.rb +1 -1
  30. data/lib/masamune/commands/hive.rb +1 -1
  31. data/lib/masamune/commands/postgres.rb +1 -1
  32. data/lib/masamune/commands/postgres_admin.rb +1 -1
  33. data/lib/masamune/commands/postgres_common.rb +1 -1
  34. data/lib/masamune/commands/retry_with_backoff.rb +1 -1
  35. data/lib/masamune/commands/s3cmd.rb +1 -1
  36. data/lib/masamune/commands/shell.rb +11 -7
  37. data/lib/masamune/configuration.rb +2 -38
  38. data/lib/masamune/data_plan.rb +1 -1
  39. data/lib/masamune/data_plan/builder.rb +1 -1
  40. data/lib/masamune/data_plan/elem.rb +1 -1
  41. data/lib/masamune/data_plan/engine.rb +1 -1
  42. data/lib/masamune/data_plan/rule.rb +1 -1
  43. data/lib/masamune/data_plan/set.rb +1 -1
  44. data/lib/masamune/environment.rb +1 -1
  45. data/lib/masamune/filesystem.rb +1 -1
  46. data/lib/masamune/has_environment.rb +1 -1
  47. data/lib/masamune/helpers.rb +1 -1
  48. data/lib/masamune/helpers/postgres.rb +1 -1
  49. data/lib/masamune/io.rb +1 -1
  50. data/lib/masamune/last_element.rb +1 -1
  51. data/lib/masamune/method_logger.rb +1 -1
  52. data/lib/masamune/multi_io.rb +1 -1
  53. data/lib/masamune/schema.rb +1 -1
  54. data/lib/masamune/schema/catalog.rb +1 -1
  55. data/lib/masamune/schema/column.rb +1 -1
  56. data/lib/masamune/schema/dimension.rb +1 -1
  57. data/lib/masamune/schema/fact.rb +1 -1
  58. data/lib/masamune/schema/map.rb +1 -1
  59. data/lib/masamune/schema/row.rb +1 -1
  60. data/lib/masamune/schema/store.rb +1 -1
  61. data/lib/masamune/schema/table.rb +1 -1
  62. data/lib/masamune/schema/table_reference.rb +1 -1
  63. data/lib/masamune/spec_helper.rb +1 -1
  64. data/lib/masamune/string_format.rb +1 -1
  65. data/lib/masamune/tasks/aws_emr_thor.rb +79 -0
  66. data/lib/masamune/tasks/dump_thor.rb +1 -1
  67. data/lib/masamune/tasks/hive_thor.rb +2 -2
  68. data/lib/masamune/tasks/postgres_thor.rb +1 -1
  69. data/lib/masamune/tasks/shell_thor.rb +1 -1
  70. data/lib/masamune/template.rb +1 -1
  71. data/lib/masamune/thor.rb +1 -1
  72. data/lib/masamune/topological_hash.rb +1 -1
  73. data/lib/masamune/transform.rb +1 -1
  74. data/lib/masamune/transform/bulk_upsert.rb +1 -1
  75. data/lib/masamune/transform/common.rb +1 -1
  76. data/lib/masamune/transform/common/denormalize_table.rb +1 -1
  77. data/lib/masamune/transform/consolidate_dimension.rb +1 -1
  78. data/lib/masamune/transform/deduplicate_dimension.rb +1 -1
  79. data/lib/masamune/transform/define_schema.rb +1 -1
  80. data/lib/masamune/transform/define_table.rb +1 -1
  81. data/lib/masamune/transform/denormalize_table.rb +1 -1
  82. data/lib/masamune/transform/hive.rb +1 -1
  83. data/lib/masamune/transform/hive/define_schema.hql.erb +1 -1
  84. data/lib/masamune/transform/hive/define_table.hql.erb +1 -1
  85. data/lib/masamune/transform/hive/define_table.rb +1 -1
  86. data/lib/masamune/transform/hive/denormalize_table.hql.erb +1 -1
  87. data/lib/masamune/transform/hive/denormalize_table.rb +1 -1
  88. data/lib/masamune/transform/insert_reference_values.rb +1 -1
  89. data/lib/masamune/transform/load_dimension.rb +1 -1
  90. data/lib/masamune/transform/load_fact.rb +1 -1
  91. data/lib/masamune/transform/operator.rb +1 -1
  92. data/lib/masamune/transform/postgres.rb +1 -1
  93. data/lib/masamune/transform/postgres/bulk_upsert.psql.erb +1 -1
  94. data/lib/masamune/transform/postgres/bulk_upsert.rb +1 -1
  95. data/lib/masamune/transform/postgres/deduplicate_dimension.psql.erb +1 -1
  96. data/lib/masamune/transform/postgres/deduplicate_dimension.rb +1 -1
  97. data/lib/masamune/transform/postgres/define_foreign_key.psql.erb +1 -1
  98. data/lib/masamune/transform/postgres/define_index.psql.erb +1 -1
  99. data/lib/masamune/transform/postgres/define_inheritance.psql.erb +1 -1
  100. data/lib/masamune/transform/postgres/define_schema.psql.erb +1 -1
  101. data/lib/masamune/transform/postgres/define_table.psql.erb +1 -1
  102. data/lib/masamune/transform/postgres/define_table.rb +1 -1
  103. data/lib/masamune/transform/postgres/define_unique.psql.erb +1 -1
  104. data/lib/masamune/transform/postgres/denormalize_table.psql.erb +1 -1
  105. data/lib/masamune/transform/postgres/denormalize_table.rb +1 -1
  106. data/lib/masamune/transform/postgres/insert_reference_values.psql.erb +1 -1
  107. data/lib/masamune/transform/postgres/insert_reference_values.rb +1 -1
  108. data/lib/masamune/transform/postgres/relabel_dimension.psql.erb +1 -1
  109. data/lib/masamune/transform/postgres/relabel_dimension.rb +1 -1
  110. data/lib/masamune/transform/postgres/replace_table.psql.erb +1 -1
  111. data/lib/masamune/transform/postgres/rollup_fact.psql.erb +1 -1
  112. data/lib/masamune/transform/postgres/rollup_fact.rb +1 -1
  113. data/lib/masamune/transform/postgres/snapshot_dimension.psql.erb +1 -1
  114. data/lib/masamune/transform/postgres/snapshot_dimension.rb +1 -1
  115. data/lib/masamune/transform/postgres/stage_dimension.psql.erb +1 -1
  116. data/lib/masamune/transform/postgres/stage_dimension.rb +1 -1
  117. data/lib/masamune/transform/postgres/stage_fact.psql.erb +1 -1
  118. data/lib/masamune/transform/postgres/stage_fact.rb +1 -1
  119. data/lib/masamune/transform/relabel_dimension.rb +1 -1
  120. data/lib/masamune/transform/rollup_fact.rb +1 -1
  121. data/lib/masamune/transform/snapshot_dimension.rb +1 -1
  122. data/lib/masamune/transform/stage_dimension.rb +1 -1
  123. data/lib/masamune/transform/stage_fact.rb +1 -1
  124. data/lib/masamune/version.rb +2 -2
  125. data/spec/fixtures/aggregate.sql.erb +1 -1
  126. data/spec/fixtures/comment.sql.erb +1 -1
  127. data/spec/fixtures/invalid.sql.erb +1 -1
  128. data/spec/fixtures/relative.sql.erb +1 -1
  129. data/spec/fixtures/simple.sql.erb +1 -1
  130. data/spec/fixtures/whitespace.sql.erb +1 -1
  131. data/spec/masamune/actions/{elastic_mapreduce_spec.rb → aws_emr_spec.rb} +22 -42
  132. data/spec/masamune/actions/execute_spec.rb +1 -1
  133. data/spec/masamune/actions/hadoop_filesystem_spec.rb +1 -1
  134. data/spec/masamune/actions/hadoop_streaming_spec.rb +8 -8
  135. data/spec/masamune/actions/hive_spec.rb +5 -5
  136. data/spec/masamune/actions/invoke_parallel_spec.rb +1 -1
  137. data/spec/masamune/actions/postgres_admin_spec.rb +1 -1
  138. data/spec/masamune/actions/postgres_spec.rb +1 -1
  139. data/spec/masamune/actions/s3cmd_spec.rb +1 -1
  140. data/spec/masamune/actions/transform_spec.rb +1 -1
  141. data/spec/masamune/after_initialization_callbacks_spec.rb +1 -1
  142. data/spec/masamune/cached_filesystem_spec.rb +1 -1
  143. data/spec/masamune/commands/aws_emr_spec.rb +115 -0
  144. data/spec/masamune/commands/hadoop_filesystem_spec.rb +1 -1
  145. data/spec/masamune/commands/hadoop_streaming_spec.rb +1 -1
  146. data/spec/masamune/commands/hive_spec.rb +1 -1
  147. data/spec/masamune/commands/postgres_admin_spec.rb +1 -1
  148. data/spec/masamune/commands/postgres_spec.rb +1 -1
  149. data/spec/masamune/commands/retry_with_backoff_spec.rb +1 -1
  150. data/spec/masamune/commands/s3cmd_spec.rb +1 -1
  151. data/spec/masamune/commands/shell_spec.rb +79 -2
  152. data/spec/masamune/configuration_spec.rb +1 -65
  153. data/spec/masamune/data_plan/builder_spec.rb +1 -1
  154. data/spec/masamune/data_plan/elem_spec.rb +1 -1
  155. data/spec/masamune/data_plan/engine_spec.rb +1 -1
  156. data/spec/masamune/data_plan/rule_spec.rb +1 -1
  157. data/spec/masamune/data_plan/set_spec.rb +1 -1
  158. data/spec/masamune/environment_spec.rb +1 -1
  159. data/spec/masamune/filesystem_spec.rb +1 -1
  160. data/spec/masamune/helpers/postgres_spec.rb +1 -1
  161. data/spec/masamune/rspec/job_fixture_spec.rb +1 -1
  162. data/spec/masamune/rspec/mock_filesystem_spec.rb +1 -1
  163. data/spec/masamune/rspec/shared_example_group_spec.rb +1 -1
  164. data/spec/masamune/schema/catalog_spec.rb +1 -1
  165. data/spec/masamune/schema/column_spec.rb +1 -1
  166. data/spec/masamune/schema/dimension_spec.rb +1 -1
  167. data/spec/masamune/schema/fact_spec.rb +1 -1
  168. data/spec/masamune/schema/map_spec.rb +1 -1
  169. data/spec/masamune/schema/row_spec.rb +1 -1
  170. data/spec/masamune/schema/store_spec.rb +1 -1
  171. data/spec/masamune/schema/table_spec.rb +1 -1
  172. data/spec/masamune/string_format_spec.rb +1 -1
  173. data/spec/masamune/tasks/aws_emr_thor_spec.rb +69 -0
  174. data/spec/masamune/tasks/dump_thor_spec.rb +1 -1
  175. data/spec/masamune/tasks/hive_thor_spec.rb +1 -1
  176. data/spec/masamune/tasks/postgres_thor_spec.rb +1 -1
  177. data/spec/masamune/tasks/shell_thor_spec.rb +1 -1
  178. data/spec/masamune/template_spec.rb +1 -1
  179. data/spec/masamune/thor_spec.rb +1 -1
  180. data/spec/masamune/transform/bulk_upsert.dimension_spec.rb +1 -1
  181. data/spec/masamune/transform/consolidate_dimension_spec.rb +1 -1
  182. data/spec/masamune/transform/deduplicate_dimension_spec.rb +1 -1
  183. data/spec/masamune/transform/define_schema_spec.rb +1 -1
  184. data/spec/masamune/transform/define_table.dimension_spec.rb +1 -1
  185. data/spec/masamune/transform/define_table.fact_spec.rb +1 -1
  186. data/spec/masamune/transform/define_table.table_spec.rb +1 -1
  187. data/spec/masamune/transform/denormalize_table_spec.rb +1 -1
  188. data/spec/masamune/transform/insert_reference_values.dimension_spec.rb +1 -1
  189. data/spec/masamune/transform/insert_reference_values.fact_spec.rb +1 -1
  190. data/spec/masamune/transform/load_dimension_spec.rb +1 -1
  191. data/spec/masamune/transform/load_fact_spec.rb +1 -1
  192. data/spec/masamune/transform/relabel_dimension_spec.rb +1 -1
  193. data/spec/masamune/transform/rollup_fact_spec.rb +1 -1
  194. data/spec/masamune/transform/snapshot_dimension_spec.rb +1 -1
  195. data/spec/masamune/transform/stage_dimension_spec.rb +1 -1
  196. data/spec/masamune/transform/stage_fact_spec.rb +1 -1
  197. data/spec/masamune_spec.rb +1 -1
  198. data/spec/spec_helper.rb +1 -1
  199. data/spec/support/masamune/example_group.rb +1 -1
  200. data/spec/support/masamune/job_example_group.rb +1 -1
  201. data/spec/support/masamune/job_fixture.rb +1 -1
  202. data/spec/support/masamune/mock_command.rb +1 -1
  203. data/spec/support/masamune/mock_delegate.rb +1 -1
  204. data/spec/support/masamune/mock_filesystem.rb +1 -1
  205. data/spec/support/masamune/shared_example_group.rb +1 -1
  206. data/spec/support/masamune/step_example_group.rb +1 -1
  207. data/spec/support/masamune/step_fixture.rb +1 -1
  208. data/spec/support/masamune/task_example_group.rb +1 -1
  209. data/spec/support/masamune/thor_mute.rb +1 -1
  210. data/spec/support/rspec/example/action_example_group.rb +1 -1
  211. data/spec/support/rspec/example/task_example_group.rb +1 -1
  212. data/spec/support/rspec/example/transform_example_group.rb +1 -1
  213. data/spec/support/shared_examples/postgres_common_examples.rb +1 -1
  214. metadata +14 -13
  215. data/lib/masamune/commands/interactive.rb +0 -37
  216. data/lib/masamune/tasks/elastic_mapreduce_thor.rb +0 -61
  217. data/spec/masamune/tasks/elastic_mapreduce_thor_spec.rb +0 -54
@@ -1,6 +1,6 @@
1
1
  # The MIT License (MIT)
2
2
  #
3
- # Copyright (c) 2014-2015, VMware, Inc. All Rights Reserved.
3
+ # Copyright (c) 2014-2016, VMware, Inc. All Rights Reserved.
4
4
  #
5
5
  # Permission is hereby granted, free of charge, to any person obtaining a copy
6
6
  # of this software and associated documentation files (the "Software"), to deal
@@ -1,6 +1,6 @@
1
1
  # The MIT License (MIT)
2
2
  #
3
- # Copyright (c) 2014-2015, VMware, Inc. All Rights Reserved.
3
+ # Copyright (c) 2014-2016, VMware, Inc. All Rights Reserved.
4
4
  #
5
5
  # Permission is hereby granted, free of charge, to any person obtaining a copy
6
6
  # of this software and associated documentation files (the "Software"), to deal
@@ -1,6 +1,6 @@
1
1
  # The MIT License (MIT)
2
2
  #
3
- # Copyright (c) 2014-2015, VMware, Inc. All Rights Reserved.
3
+ # Copyright (c) 2014-2016, VMware, Inc. All Rights Reserved.
4
4
  #
5
5
  # Permission is hereby granted, free of charge, to any person obtaining a copy
6
6
  # of this software and associated documentation files (the "Software"), to deal
@@ -1,6 +1,6 @@
1
1
  # The MIT License (MIT)
2
2
  #
3
- # Copyright (c) 2014-2015, VMware, Inc. All Rights Reserved.
3
+ # Copyright (c) 2014-2016, VMware, Inc. All Rights Reserved.
4
4
  #
5
5
  # Permission is hereby granted, free of charge, to any person obtaining a copy
6
6
  # of this software and associated documentation files (the "Software"), to deal
@@ -1,6 +1,6 @@
1
1
  # The MIT License (MIT)
2
2
  #
3
- # Copyright (c) 2014-2015, VMware, Inc. All Rights Reserved.
3
+ # Copyright (c) 2014-2016, VMware, Inc. All Rights Reserved.
4
4
  #
5
5
  # Permission is hereby granted, free of charge, to any person obtaining a copy
6
6
  # of this software and associated documentation files (the "Software"), to deal
@@ -1,6 +1,6 @@
1
1
  # The MIT License (MIT)
2
2
  #
3
- # Copyright (c) 2014-2015, VMware, Inc. All Rights Reserved.
3
+ # Copyright (c) 2014-2016, VMware, Inc. All Rights Reserved.
4
4
  #
5
5
  # Permission is hereby granted, free of charge, to any person obtaining a copy
6
6
  # of this software and associated documentation files (the "Software"), to deal
@@ -1,6 +1,6 @@
1
1
  # The MIT License (MIT)
2
2
  #
3
- # Copyright (c) 2014-2015, VMware, Inc. All Rights Reserved.
3
+ # Copyright (c) 2014-2016, VMware, Inc. All Rights Reserved.
4
4
  #
5
5
  # Permission is hereby granted, free of charge, to any person obtaining a copy
6
6
  # of this software and associated documentation files (the "Software"), to deal
@@ -1,6 +1,6 @@
1
1
  # The MIT License (MIT)
2
2
  #
3
- # Copyright (c) 2014-2015, VMware, Inc. All Rights Reserved.
3
+ # Copyright (c) 2014-2016, VMware, Inc. All Rights Reserved.
4
4
  #
5
5
  # Permission is hereby granted, free of charge, to any person obtaining a copy
6
6
  # of this software and associated documentation files (the "Software"), to deal
@@ -1,6 +1,6 @@
1
1
  # The MIT License (MIT)
2
2
  #
3
- # Copyright (c) 2014-2015, VMware, Inc. All Rights Reserved.
3
+ # Copyright (c) 2014-2016, VMware, Inc. All Rights Reserved.
4
4
  #
5
5
  # Permission is hereby granted, free of charge, to any person obtaining a copy
6
6
  # of this software and associated documentation files (the "Software"), to deal
@@ -1,6 +1,6 @@
1
1
  # The MIT License (MIT)
2
2
  #
3
- # Copyright (c) 2014-2015, VMware, Inc. All Rights Reserved.
3
+ # Copyright (c) 2014-2016, VMware, Inc. All Rights Reserved.
4
4
  #
5
5
  # Permission is hereby granted, free of charge, to any person obtaining a copy
6
6
  # of this software and associated documentation files (the "Software"), to deal
@@ -1,6 +1,6 @@
1
1
  # The MIT License (MIT)
2
2
  #
3
- # Copyright (c) 2014-2015, VMware, Inc. All Rights Reserved.
3
+ # Copyright (c) 2014-2016, VMware, Inc. All Rights Reserved.
4
4
  #
5
5
  # Permission is hereby granted, free of charge, to any person obtaining a copy
6
6
  # of this software and associated documentation files (the "Software"), to deal
@@ -1,6 +1,6 @@
1
1
  # The MIT License (MIT)
2
2
  #
3
- # Copyright (c) 2014-2015, VMware, Inc. All Rights Reserved.
3
+ # Copyright (c) 2014-2016, VMware, Inc. All Rights Reserved.
4
4
  #
5
5
  # Permission is hereby granted, free of charge, to any person obtaining a copy
6
6
  # of this software and associated documentation files (the "Software"), to deal
@@ -1,6 +1,6 @@
1
1
  # The MIT License (MIT)
2
2
  #
3
- # Copyright (c) 2014-2015, VMware, Inc. All Rights Reserved.
3
+ # Copyright (c) 2014-2016, VMware, Inc. All Rights Reserved.
4
4
  #
5
5
  # Permission is hereby granted, free of charge, to any person obtaining a copy
6
6
  # of this software and associated documentation files (the "Software"), to deal
@@ -1,6 +1,6 @@
1
1
  # The MIT License (MIT)
2
2
  #
3
- # Copyright (c) 2014-2015, VMware, Inc. All Rights Reserved.
3
+ # Copyright (c) 2014-2016, VMware, Inc. All Rights Reserved.
4
4
  #
5
5
  # Permission is hereby granted, free of charge, to any person obtaining a copy
6
6
  # of this software and associated documentation files (the "Software"), to deal
@@ -1,6 +1,6 @@
1
1
  # The MIT License (MIT)
2
2
  #
3
- # Copyright (c) 2014-2015, VMware, Inc. All Rights Reserved.
3
+ # Copyright (c) 2014-2016, VMware, Inc. All Rights Reserved.
4
4
  #
5
5
  # Permission is hereby granted, free of charge, to any person obtaining a copy
6
6
  # of this software and associated documentation files (the "Software"), to deal
@@ -1,6 +1,6 @@
1
1
  # The MIT License (MIT)
2
2
  #
3
- # Copyright (c) 2014-2015, VMware, Inc. All Rights Reserved.
3
+ # Copyright (c) 2014-2016, VMware, Inc. All Rights Reserved.
4
4
  #
5
5
  # Permission is hereby granted, free of charge, to any person obtaining a copy
6
6
  # of this software and associated documentation files (the "Software"), to deal
@@ -1,6 +1,6 @@
1
1
  # The MIT License (MIT)
2
2
  #
3
- # Copyright (c) 2014-2015, VMware, Inc. All Rights Reserved.
3
+ # Copyright (c) 2014-2016, VMware, Inc. All Rights Reserved.
4
4
  #
5
5
  # Permission is hereby granted, free of charge, to any person obtaining a copy
6
6
  # of this software and associated documentation files (the "Software"), to deal
@@ -1,6 +1,6 @@
1
1
  # The MIT License (MIT)
2
2
  #
3
- # Copyright (c) 2014-2015, VMware, Inc. All Rights Reserved.
3
+ # Copyright (c) 2014-2016, VMware, Inc. All Rights Reserved.
4
4
  #
5
5
  # Permission is hereby granted, free of charge, to any person obtaining a copy
6
6
  # of this software and associated documentation files (the "Software"), to deal
@@ -1,6 +1,6 @@
1
1
  # The MIT License (MIT)
2
2
  #
3
- # Copyright (c) 2014-2015, VMware, Inc. All Rights Reserved.
3
+ # Copyright (c) 2014-2016, VMware, Inc. All Rights Reserved.
4
4
  #
5
5
  # Permission is hereby granted, free of charge, to any person obtaining a copy
6
6
  # of this software and associated documentation files (the "Software"), to deal
@@ -0,0 +1,69 @@
1
+ # The MIT License (MIT)
2
+ #
3
+ # Copyright (c) 2014-2016, VMware, Inc. All Rights Reserved.
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.
22
+
23
+ require 'masamune/tasks/aws_emr_thor'
24
+
25
+ describe Masamune::Tasks::AwsEmrThor do
26
+ context 'with help command ' do
27
+ let(:command) { 'help' }
28
+ it_behaves_like 'general usage'
29
+ end
30
+
31
+ Masamune::Tasks::AwsEmrThor::REQUIRE_CLUSTER_ID_ACTIONS.each do |action, _|
32
+ context "with #{action} command" do
33
+ let(:command) { action.underscore }
34
+
35
+ context 'with --help' do
36
+ let(:options) { ['--help'] }
37
+ it_behaves_like 'command usage'
38
+ end
39
+
40
+ context 'without --cluster-id' do
41
+ it_behaves_like 'raises Thor::RequiredArgumentMissingError', /No value provided for required options '--cluster-id'/
42
+ end
43
+
44
+ context 'with --cluster-id' do
45
+ let(:options) { ['--cluster-id=j-XYZ'] }
46
+ it do
47
+ expect_any_instance_of(described_class).to receive(:aws_emr).with(hash_including(action: action, cluster_id: 'j-XYZ')).once.and_return(mock_success)
48
+ cli_invocation
49
+ end
50
+ end
51
+ end
52
+ end
53
+
54
+ Masamune::Tasks::AwsEmrThor::NO_REQUIRE_CLUSTER_ID_ACTIONS.each do |action, _|
55
+ context "with #{action} command" do
56
+ let(:command) { action.underscore }
57
+
58
+ it do
59
+ expect_any_instance_of(described_class).to receive(:aws_emr).with(hash_including(action: action)).once.and_return(mock_success)
60
+ cli_invocation
61
+ end
62
+
63
+ context 'with --help' do
64
+ let(:options) { ['--help'] }
65
+ it_behaves_like 'command usage'
66
+ end
67
+ end
68
+ end
69
+ end
@@ -1,6 +1,6 @@
1
1
  # The MIT License (MIT)
2
2
  #
3
- # Copyright (c) 2014-2015, VMware, Inc. All Rights Reserved.
3
+ # Copyright (c) 2014-2016, VMware, Inc. All Rights Reserved.
4
4
  #
5
5
  # Permission is hereby granted, free of charge, to any person obtaining a copy
6
6
  # of this software and associated documentation files (the "Software"), to deal
@@ -1,6 +1,6 @@
1
1
  # The MIT License (MIT)
2
2
  #
3
- # Copyright (c) 2014-2015, VMware, Inc. All Rights Reserved.
3
+ # Copyright (c) 2014-2016, VMware, Inc. All Rights Reserved.
4
4
  #
5
5
  # Permission is hereby granted, free of charge, to any person obtaining a copy
6
6
  # of this software and associated documentation files (the "Software"), to deal
@@ -1,6 +1,6 @@
1
1
  # The MIT License (MIT)
2
2
  #
3
- # Copyright (c) 2014-2015, VMware, Inc. All Rights Reserved.
3
+ # Copyright (c) 2014-2016, VMware, Inc. All Rights Reserved.
4
4
  #
5
5
  # Permission is hereby granted, free of charge, to any person obtaining a copy
6
6
  # of this software and associated documentation files (the "Software"), to deal
@@ -1,6 +1,6 @@
1
1
  # The MIT License (MIT)
2
2
  #
3
- # Copyright (c) 2014-2015, VMware, Inc. All Rights Reserved.
3
+ # Copyright (c) 2014-2016, VMware, Inc. All Rights Reserved.
4
4
  #
5
5
  # Permission is hereby granted, free of charge, to any person obtaining a copy
6
6
  # of this software and associated documentation files (the "Software"), to deal
@@ -1,6 +1,6 @@
1
1
  # The MIT License (MIT)
2
2
  #
3
- # Copyright (c) 2014-2015, VMware, Inc. All Rights Reserved.
3
+ # Copyright (c) 2014-2016, VMware, Inc. All Rights Reserved.
4
4
  #
5
5
  # Permission is hereby granted, free of charge, to any person obtaining a copy
6
6
  # of this software and associated documentation files (the "Software"), to deal
@@ -1,6 +1,6 @@
1
1
  # The MIT License (MIT)
2
2
  #
3
- # Copyright (c) 2014-2015, VMware, Inc. All Rights Reserved.
3
+ # Copyright (c) 2014-2016, VMware, Inc. All Rights Reserved.
4
4
  #
5
5
  # Permission is hereby granted, free of charge, to any person obtaining a copy
6
6
  # of this software and associated documentation files (the "Software"), to deal
@@ -1,6 +1,6 @@
1
1
  # The MIT License (MIT)
2
2
  #
3
- # Copyright (c) 2014-2015, VMware, Inc. All Rights Reserved.
3
+ # Copyright (c) 2014-2016, VMware, Inc. All Rights Reserved.
4
4
  #
5
5
  # Permission is hereby granted, free of charge, to any person obtaining a copy
6
6
  # of this software and associated documentation files (the "Software"), to deal
@@ -1,6 +1,6 @@
1
1
  # The MIT License (MIT)
2
2
  #
3
- # Copyright (c) 2014-2015, VMware, Inc. All Rights Reserved.
3
+ # Copyright (c) 2014-2016, VMware, Inc. All Rights Reserved.
4
4
  #
5
5
  # Permission is hereby granted, free of charge, to any person obtaining a copy
6
6
  # of this software and associated documentation files (the "Software"), to deal
@@ -1,6 +1,6 @@
1
1
  # The MIT License (MIT)
2
2
  #
3
- # Copyright (c) 2014-2015, VMware, Inc. All Rights Reserved.
3
+ # Copyright (c) 2014-2016, VMware, Inc. All Rights Reserved.
4
4
  #
5
5
  # Permission is hereby granted, free of charge, to any person obtaining a copy
6
6
  # of this software and associated documentation files (the "Software"), to deal
@@ -1,6 +1,6 @@
1
1
  # The MIT License (MIT)
2
2
  #
3
- # Copyright (c) 2014-2015, VMware, Inc. All Rights Reserved.
3
+ # Copyright (c) 2014-2016, VMware, Inc. All Rights Reserved.
4
4
  #
5
5
  # Permission is hereby granted, free of charge, to any person obtaining a copy
6
6
  # of this software and associated documentation files (the "Software"), to deal
@@ -1,6 +1,6 @@
1
1
  # The MIT License (MIT)
2
2
  #
3
- # Copyright (c) 2014-2015, VMware, Inc. All Rights Reserved.
3
+ # Copyright (c) 2014-2016, VMware, Inc. All Rights Reserved.
4
4
  #
5
5
  # Permission is hereby granted, free of charge, to any person obtaining a copy
6
6
  # of this software and associated documentation files (the "Software"), to deal
@@ -1,6 +1,6 @@
1
1
  # The MIT License (MIT)
2
2
  #
3
- # Copyright (c) 2014-2015, VMware, Inc. All Rights Reserved.
3
+ # Copyright (c) 2014-2016, VMware, Inc. All Rights Reserved.
4
4
  #
5
5
  # Permission is hereby granted, free of charge, to any person obtaining a copy
6
6
  # of this software and associated documentation files (the "Software"), to deal
@@ -1,6 +1,6 @@
1
1
  # The MIT License (MIT)
2
2
  #
3
- # Copyright (c) 2014-2015, VMware, Inc. All Rights Reserved.
3
+ # Copyright (c) 2014-2016, VMware, Inc. All Rights Reserved.
4
4
  #
5
5
  # Permission is hereby granted, free of charge, to any person obtaining a copy
6
6
  # of this software and associated documentation files (the "Software"), to deal
@@ -1,6 +1,6 @@
1
1
  # The MIT License (MIT)
2
2
  #
3
- # Copyright (c) 2014-2015, VMware, Inc. All Rights Reserved.
3
+ # Copyright (c) 2014-2016, VMware, Inc. All Rights Reserved.
4
4
  #
5
5
  # Permission is hereby granted, free of charge, to any person obtaining a copy
6
6
  # of this software and associated documentation files (the "Software"), to deal
@@ -1,6 +1,6 @@
1
1
  # The MIT License (MIT)
2
2
  #
3
- # Copyright (c) 2014-2015, VMware, Inc. All Rights Reserved.
3
+ # Copyright (c) 2014-2016, VMware, Inc. All Rights Reserved.
4
4
  #
5
5
  # Permission is hereby granted, free of charge, to any person obtaining a copy
6
6
  # of this software and associated documentation files (the "Software"), to deal
@@ -1,6 +1,6 @@
1
1
  # The MIT License (MIT)
2
2
  #
3
- # Copyright (c) 2014-2015, VMware, Inc. All Rights Reserved.
3
+ # Copyright (c) 2014-2016, VMware, Inc. All Rights Reserved.
4
4
  #
5
5
  # Permission is hereby granted, free of charge, to any person obtaining a copy
6
6
  # of this software and associated documentation files (the "Software"), to deal
@@ -1,6 +1,6 @@
1
1
  # The MIT License (MIT)
2
2
  #
3
- # Copyright (c) 2014-2015, VMware, Inc. All Rights Reserved.
3
+ # Copyright (c) 2014-2016, VMware, Inc. All Rights Reserved.
4
4
  #
5
5
  # Permission is hereby granted, free of charge, to any person obtaining a copy
6
6
  # of this software and associated documentation files (the "Software"), to deal
@@ -1,6 +1,6 @@
1
1
  # The MIT License (MIT)
2
2
  #
3
- # Copyright (c) 2014-2015, VMware, Inc. All Rights Reserved.
3
+ # Copyright (c) 2014-2016, VMware, Inc. All Rights Reserved.
4
4
  #
5
5
  # Permission is hereby granted, free of charge, to any person obtaining a copy
6
6
  # of this software and associated documentation files (the "Software"), to deal
@@ -1,6 +1,6 @@
1
1
  # The MIT License (MIT)
2
2
  #
3
- # Copyright (c) 2014-2015, VMware, Inc. All Rights Reserved.
3
+ # Copyright (c) 2014-2016, VMware, Inc. All Rights Reserved.
4
4
  #
5
5
  # Permission is hereby granted, free of charge, to any person obtaining a copy
6
6
  # of this software and associated documentation files (the "Software"), to deal
@@ -1,6 +1,6 @@
1
1
  # The MIT License (MIT)
2
2
  #
3
- # Copyright (c) 2014-2015, VMware, Inc. All Rights Reserved.
3
+ # Copyright (c) 2014-2016, VMware, Inc. All Rights Reserved.
4
4
  #
5
5
  # Permission is hereby granted, free of charge, to any person obtaining a copy
6
6
  # of this software and associated documentation files (the "Software"), to deal
@@ -1,6 +1,6 @@
1
1
  # The MIT License (MIT)
2
2
  #
3
- # Copyright (c) 2014-2015, VMware, Inc. All Rights Reserved.
3
+ # Copyright (c) 2014-2016, VMware, Inc. All Rights Reserved.
4
4
  #
5
5
  # Permission is hereby granted, free of charge, to any person obtaining a copy
6
6
  # of this software and associated documentation files (the "Software"), to deal
@@ -1,6 +1,6 @@
1
1
  # The MIT License (MIT)
2
2
  #
3
- # Copyright (c) 2014-2015, VMware, Inc. All Rights Reserved.
3
+ # Copyright (c) 2014-2016, VMware, Inc. All Rights Reserved.
4
4
  #
5
5
  # Permission is hereby granted, free of charge, to any person obtaining a copy
6
6
  # of this software and associated documentation files (the "Software"), to deal
@@ -1,6 +1,6 @@
1
1
  # The MIT License (MIT)
2
2
  #
3
- # Copyright (c) 2014-2015, VMware, Inc. All Rights Reserved.
3
+ # Copyright (c) 2014-2016, VMware, Inc. All Rights Reserved.
4
4
  #
5
5
  # Permission is hereby granted, free of charge, to any person obtaining a copy
6
6
  # of this software and associated documentation files (the "Software"), to deal
@@ -1,6 +1,6 @@
1
1
  # The MIT License (MIT)
2
2
  #
3
- # Copyright (c) 2014-2015, VMware, Inc. All Rights Reserved.
3
+ # Copyright (c) 2014-2016, VMware, Inc. All Rights Reserved.
4
4
  #
5
5
  # Permission is hereby granted, free of charge, to any person obtaining a copy
6
6
  # of this software and associated documentation files (the "Software"), to deal