masamune 0.15.6 → 0.16.0
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/Rakefile +1 -1
- data/bin/{masamune-elastic-mapreduce → masamune-aws-emr} +3 -3
- data/bin/masamune-dump +1 -1
- data/bin/masamune-hive +1 -1
- data/bin/masamune-psql +1 -1
- data/bin/masamune-shell +1 -1
- data/lib/masamune.rb +1 -1
- data/lib/masamune/actions.rb +1 -1
- data/lib/masamune/actions/{elastic_mapreduce.rb → aws_emr.rb} +14 -30
- data/lib/masamune/actions/data_flow.rb +1 -1
- data/lib/masamune/actions/date_parse.rb +1 -1
- data/lib/masamune/actions/execute.rb +1 -1
- data/lib/masamune/actions/filesystem.rb +1 -1
- data/lib/masamune/actions/hadoop_filesystem.rb +1 -1
- data/lib/masamune/actions/hadoop_streaming.rb +10 -8
- data/lib/masamune/actions/hive.rb +2 -2
- data/lib/masamune/actions/invoke_parallel.rb +1 -1
- data/lib/masamune/actions/postgres.rb +1 -1
- data/lib/masamune/actions/postgres_admin.rb +1 -1
- data/lib/masamune/actions/s3cmd.rb +1 -1
- data/lib/masamune/actions/transform.rb +1 -1
- data/lib/masamune/after_initialize_callbacks.rb +1 -1
- data/lib/masamune/cached_filesystem.rb +2 -2
- data/lib/masamune/commands.rb +1 -1
- data/lib/masamune/commands/{elastic_mapreduce.rb → aws_emr.rb} +38 -29
- data/lib/masamune/commands/hadoop_filesystem.rb +1 -1
- data/lib/masamune/commands/hadoop_streaming.rb +1 -1
- data/lib/masamune/commands/hive.rb +1 -1
- data/lib/masamune/commands/postgres.rb +1 -1
- data/lib/masamune/commands/postgres_admin.rb +1 -1
- data/lib/masamune/commands/postgres_common.rb +1 -1
- data/lib/masamune/commands/retry_with_backoff.rb +1 -1
- data/lib/masamune/commands/s3cmd.rb +1 -1
- data/lib/masamune/commands/shell.rb +11 -7
- data/lib/masamune/configuration.rb +2 -38
- data/lib/masamune/data_plan.rb +1 -1
- data/lib/masamune/data_plan/builder.rb +1 -1
- data/lib/masamune/data_plan/elem.rb +1 -1
- data/lib/masamune/data_plan/engine.rb +1 -1
- data/lib/masamune/data_plan/rule.rb +1 -1
- data/lib/masamune/data_plan/set.rb +1 -1
- data/lib/masamune/environment.rb +1 -1
- data/lib/masamune/filesystem.rb +1 -1
- data/lib/masamune/has_environment.rb +1 -1
- data/lib/masamune/helpers.rb +1 -1
- data/lib/masamune/helpers/postgres.rb +1 -1
- data/lib/masamune/io.rb +1 -1
- data/lib/masamune/last_element.rb +1 -1
- data/lib/masamune/method_logger.rb +1 -1
- data/lib/masamune/multi_io.rb +1 -1
- data/lib/masamune/schema.rb +1 -1
- data/lib/masamune/schema/catalog.rb +1 -1
- data/lib/masamune/schema/column.rb +1 -1
- data/lib/masamune/schema/dimension.rb +1 -1
- data/lib/masamune/schema/fact.rb +1 -1
- data/lib/masamune/schema/map.rb +1 -1
- data/lib/masamune/schema/row.rb +1 -1
- data/lib/masamune/schema/store.rb +1 -1
- data/lib/masamune/schema/table.rb +1 -1
- data/lib/masamune/schema/table_reference.rb +1 -1
- data/lib/masamune/spec_helper.rb +1 -1
- data/lib/masamune/string_format.rb +1 -1
- data/lib/masamune/tasks/aws_emr_thor.rb +79 -0
- data/lib/masamune/tasks/dump_thor.rb +1 -1
- data/lib/masamune/tasks/hive_thor.rb +2 -2
- data/lib/masamune/tasks/postgres_thor.rb +1 -1
- data/lib/masamune/tasks/shell_thor.rb +1 -1
- data/lib/masamune/template.rb +1 -1
- data/lib/masamune/thor.rb +1 -1
- data/lib/masamune/topological_hash.rb +1 -1
- data/lib/masamune/transform.rb +1 -1
- data/lib/masamune/transform/bulk_upsert.rb +1 -1
- data/lib/masamune/transform/common.rb +1 -1
- data/lib/masamune/transform/common/denormalize_table.rb +1 -1
- data/lib/masamune/transform/consolidate_dimension.rb +1 -1
- data/lib/masamune/transform/deduplicate_dimension.rb +1 -1
- data/lib/masamune/transform/define_schema.rb +1 -1
- data/lib/masamune/transform/define_table.rb +1 -1
- data/lib/masamune/transform/denormalize_table.rb +1 -1
- data/lib/masamune/transform/hive.rb +1 -1
- data/lib/masamune/transform/hive/define_schema.hql.erb +1 -1
- data/lib/masamune/transform/hive/define_table.hql.erb +1 -1
- data/lib/masamune/transform/hive/define_table.rb +1 -1
- data/lib/masamune/transform/hive/denormalize_table.hql.erb +1 -1
- data/lib/masamune/transform/hive/denormalize_table.rb +1 -1
- data/lib/masamune/transform/insert_reference_values.rb +1 -1
- data/lib/masamune/transform/load_dimension.rb +1 -1
- data/lib/masamune/transform/load_fact.rb +1 -1
- data/lib/masamune/transform/operator.rb +1 -1
- data/lib/masamune/transform/postgres.rb +1 -1
- data/lib/masamune/transform/postgres/bulk_upsert.psql.erb +1 -1
- data/lib/masamune/transform/postgres/bulk_upsert.rb +1 -1
- data/lib/masamune/transform/postgres/deduplicate_dimension.psql.erb +1 -1
- data/lib/masamune/transform/postgres/deduplicate_dimension.rb +1 -1
- data/lib/masamune/transform/postgres/define_foreign_key.psql.erb +1 -1
- data/lib/masamune/transform/postgres/define_index.psql.erb +1 -1
- data/lib/masamune/transform/postgres/define_inheritance.psql.erb +1 -1
- data/lib/masamune/transform/postgres/define_schema.psql.erb +1 -1
- data/lib/masamune/transform/postgres/define_table.psql.erb +1 -1
- data/lib/masamune/transform/postgres/define_table.rb +1 -1
- data/lib/masamune/transform/postgres/define_unique.psql.erb +1 -1
- data/lib/masamune/transform/postgres/denormalize_table.psql.erb +1 -1
- data/lib/masamune/transform/postgres/denormalize_table.rb +1 -1
- data/lib/masamune/transform/postgres/insert_reference_values.psql.erb +1 -1
- data/lib/masamune/transform/postgres/insert_reference_values.rb +1 -1
- data/lib/masamune/transform/postgres/relabel_dimension.psql.erb +1 -1
- data/lib/masamune/transform/postgres/relabel_dimension.rb +1 -1
- data/lib/masamune/transform/postgres/replace_table.psql.erb +1 -1
- data/lib/masamune/transform/postgres/rollup_fact.psql.erb +1 -1
- data/lib/masamune/transform/postgres/rollup_fact.rb +1 -1
- data/lib/masamune/transform/postgres/snapshot_dimension.psql.erb +1 -1
- data/lib/masamune/transform/postgres/snapshot_dimension.rb +1 -1
- data/lib/masamune/transform/postgres/stage_dimension.psql.erb +1 -1
- data/lib/masamune/transform/postgres/stage_dimension.rb +1 -1
- data/lib/masamune/transform/postgres/stage_fact.psql.erb +1 -1
- data/lib/masamune/transform/postgres/stage_fact.rb +1 -1
- data/lib/masamune/transform/relabel_dimension.rb +1 -1
- data/lib/masamune/transform/rollup_fact.rb +1 -1
- data/lib/masamune/transform/snapshot_dimension.rb +1 -1
- data/lib/masamune/transform/stage_dimension.rb +1 -1
- data/lib/masamune/transform/stage_fact.rb +1 -1
- data/lib/masamune/version.rb +2 -2
- data/spec/fixtures/aggregate.sql.erb +1 -1
- data/spec/fixtures/comment.sql.erb +1 -1
- data/spec/fixtures/invalid.sql.erb +1 -1
- data/spec/fixtures/relative.sql.erb +1 -1
- data/spec/fixtures/simple.sql.erb +1 -1
- data/spec/fixtures/whitespace.sql.erb +1 -1
- data/spec/masamune/actions/{elastic_mapreduce_spec.rb → aws_emr_spec.rb} +22 -42
- data/spec/masamune/actions/execute_spec.rb +1 -1
- data/spec/masamune/actions/hadoop_filesystem_spec.rb +1 -1
- data/spec/masamune/actions/hadoop_streaming_spec.rb +8 -8
- data/spec/masamune/actions/hive_spec.rb +5 -5
- data/spec/masamune/actions/invoke_parallel_spec.rb +1 -1
- data/spec/masamune/actions/postgres_admin_spec.rb +1 -1
- data/spec/masamune/actions/postgres_spec.rb +1 -1
- data/spec/masamune/actions/s3cmd_spec.rb +1 -1
- data/spec/masamune/actions/transform_spec.rb +1 -1
- data/spec/masamune/after_initialization_callbacks_spec.rb +1 -1
- data/spec/masamune/cached_filesystem_spec.rb +1 -1
- data/spec/masamune/commands/aws_emr_spec.rb +115 -0
- data/spec/masamune/commands/hadoop_filesystem_spec.rb +1 -1
- data/spec/masamune/commands/hadoop_streaming_spec.rb +1 -1
- data/spec/masamune/commands/hive_spec.rb +1 -1
- data/spec/masamune/commands/postgres_admin_spec.rb +1 -1
- data/spec/masamune/commands/postgres_spec.rb +1 -1
- data/spec/masamune/commands/retry_with_backoff_spec.rb +1 -1
- data/spec/masamune/commands/s3cmd_spec.rb +1 -1
- data/spec/masamune/commands/shell_spec.rb +79 -2
- data/spec/masamune/configuration_spec.rb +1 -65
- data/spec/masamune/data_plan/builder_spec.rb +1 -1
- data/spec/masamune/data_plan/elem_spec.rb +1 -1
- data/spec/masamune/data_plan/engine_spec.rb +1 -1
- data/spec/masamune/data_plan/rule_spec.rb +1 -1
- data/spec/masamune/data_plan/set_spec.rb +1 -1
- data/spec/masamune/environment_spec.rb +1 -1
- data/spec/masamune/filesystem_spec.rb +1 -1
- data/spec/masamune/helpers/postgres_spec.rb +1 -1
- data/spec/masamune/rspec/job_fixture_spec.rb +1 -1
- data/spec/masamune/rspec/mock_filesystem_spec.rb +1 -1
- data/spec/masamune/rspec/shared_example_group_spec.rb +1 -1
- data/spec/masamune/schema/catalog_spec.rb +1 -1
- data/spec/masamune/schema/column_spec.rb +1 -1
- data/spec/masamune/schema/dimension_spec.rb +1 -1
- data/spec/masamune/schema/fact_spec.rb +1 -1
- data/spec/masamune/schema/map_spec.rb +1 -1
- data/spec/masamune/schema/row_spec.rb +1 -1
- data/spec/masamune/schema/store_spec.rb +1 -1
- data/spec/masamune/schema/table_spec.rb +1 -1
- data/spec/masamune/string_format_spec.rb +1 -1
- data/spec/masamune/tasks/aws_emr_thor_spec.rb +69 -0
- data/spec/masamune/tasks/dump_thor_spec.rb +1 -1
- data/spec/masamune/tasks/hive_thor_spec.rb +1 -1
- data/spec/masamune/tasks/postgres_thor_spec.rb +1 -1
- data/spec/masamune/tasks/shell_thor_spec.rb +1 -1
- data/spec/masamune/template_spec.rb +1 -1
- data/spec/masamune/thor_spec.rb +1 -1
- data/spec/masamune/transform/bulk_upsert.dimension_spec.rb +1 -1
- data/spec/masamune/transform/consolidate_dimension_spec.rb +1 -1
- data/spec/masamune/transform/deduplicate_dimension_spec.rb +1 -1
- data/spec/masamune/transform/define_schema_spec.rb +1 -1
- data/spec/masamune/transform/define_table.dimension_spec.rb +1 -1
- data/spec/masamune/transform/define_table.fact_spec.rb +1 -1
- data/spec/masamune/transform/define_table.table_spec.rb +1 -1
- data/spec/masamune/transform/denormalize_table_spec.rb +1 -1
- data/spec/masamune/transform/insert_reference_values.dimension_spec.rb +1 -1
- data/spec/masamune/transform/insert_reference_values.fact_spec.rb +1 -1
- data/spec/masamune/transform/load_dimension_spec.rb +1 -1
- data/spec/masamune/transform/load_fact_spec.rb +1 -1
- data/spec/masamune/transform/relabel_dimension_spec.rb +1 -1
- data/spec/masamune/transform/rollup_fact_spec.rb +1 -1
- data/spec/masamune/transform/snapshot_dimension_spec.rb +1 -1
- data/spec/masamune/transform/stage_dimension_spec.rb +1 -1
- data/spec/masamune/transform/stage_fact_spec.rb +1 -1
- data/spec/masamune_spec.rb +1 -1
- data/spec/spec_helper.rb +1 -1
- data/spec/support/masamune/example_group.rb +1 -1
- data/spec/support/masamune/job_example_group.rb +1 -1
- data/spec/support/masamune/job_fixture.rb +1 -1
- data/spec/support/masamune/mock_command.rb +1 -1
- data/spec/support/masamune/mock_delegate.rb +1 -1
- data/spec/support/masamune/mock_filesystem.rb +1 -1
- data/spec/support/masamune/shared_example_group.rb +1 -1
- data/spec/support/masamune/step_example_group.rb +1 -1
- data/spec/support/masamune/step_fixture.rb +1 -1
- data/spec/support/masamune/task_example_group.rb +1 -1
- data/spec/support/masamune/thor_mute.rb +1 -1
- data/spec/support/rspec/example/action_example_group.rb +1 -1
- data/spec/support/rspec/example/task_example_group.rb +1 -1
- data/spec/support/rspec/example/transform_example_group.rb +1 -1
- data/spec/support/shared_examples/postgres_common_examples.rb +1 -1
- metadata +14 -13
- data/lib/masamune/commands/interactive.rb +0 -37
- data/lib/masamune/tasks/elastic_mapreduce_thor.rb +0 -61
- 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-
|
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-
|
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-
|
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-
|
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-
|
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-
|
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-
|
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-
|
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-
|
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
|
@@ -42,7 +42,7 @@ module Masamune::Commands
|
|
42
42
|
end
|
43
43
|
|
44
44
|
def replace(opts = {})
|
45
|
-
logger.debug(
|
45
|
+
logger.debug("replace: #{command_info}")
|
46
46
|
before_execute
|
47
47
|
around_execute do
|
48
48
|
pid = Process.fork
|
@@ -57,8 +57,6 @@ module Masamune::Commands
|
|
57
57
|
end
|
58
58
|
|
59
59
|
def before_execute
|
60
|
-
logger.debug(command_args)
|
61
|
-
|
62
60
|
if configuration.verbose
|
63
61
|
trace(command_args)
|
64
62
|
end
|
@@ -91,8 +89,8 @@ module Masamune::Commands
|
|
91
89
|
end
|
92
90
|
|
93
91
|
def command_args
|
94
|
-
if @delegate.respond_to?(:command_args)
|
95
|
-
@delegate.command_args
|
92
|
+
if @delegate.respond_to?(:command_args) && @delegate.command_args
|
93
|
+
Array.wrap(@delegate.command_args).flatten.compact.map(&:to_s)
|
96
94
|
else
|
97
95
|
raise 'no command_args'
|
98
96
|
end
|
@@ -122,6 +120,8 @@ module Masamune::Commands
|
|
122
120
|
end
|
123
121
|
|
124
122
|
def execute_block
|
123
|
+
logger.debug("execute: #{command_info}")
|
124
|
+
|
125
125
|
Open3.popen3(command_env, *command_args) do |p_stdin, p_stdout, p_stderr, t_stdin|
|
126
126
|
p_stdin.wait_writable(PIPE_TIMEOUT) or raise "IO stdin not ready for write in #{PIPE_TIMEOUT}"
|
127
127
|
|
@@ -158,7 +158,7 @@ module Masamune::Commands
|
|
158
158
|
}
|
159
159
|
|
160
160
|
[t_stderr, t_stdout, t_stdin].compact.each { |t| t.join }
|
161
|
-
logger.debug(t_stdin.value)
|
161
|
+
logger.debug("status: #{t_stdin.value.to_s}")
|
162
162
|
t_stdin.value
|
163
163
|
end
|
164
164
|
end
|
@@ -202,5 +202,9 @@ module Masamune::Commands
|
|
202
202
|
def detach
|
203
203
|
STDIN.close; STDOUT.close; STDERR.close
|
204
204
|
end
|
205
|
+
|
206
|
+
def command_info
|
207
|
+
(command_env.map { |key, val| "#{key}=#{val}" } + command_args).join(' ')
|
208
|
+
end
|
205
209
|
end
|
206
210
|
end
|
@@ -1,6 +1,6 @@
|
|
1
1
|
# The MIT License (MIT)
|
2
2
|
#
|
3
|
-
# Copyright (c) 2014-
|
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
|
@@ -42,7 +42,7 @@ class Masamune::Configuration
|
|
42
42
|
attr_accessor :backoff
|
43
43
|
attr_accessor :params
|
44
44
|
|
45
|
-
COMMANDS = %w(hive hadoop_streaming hadoop_filesystem
|
45
|
+
COMMANDS = %w(aws_emr hive hadoop_streaming hadoop_filesystem s3cmd postgres postgres_admin)
|
46
46
|
COMMANDS.each do |command|
|
47
47
|
attr_accessor command
|
48
48
|
define_method(command) do
|
@@ -61,8 +61,6 @@ class Masamune::Configuration
|
|
61
61
|
self.backoff = 5
|
62
62
|
self.params = HashWithIndifferentAccess.new
|
63
63
|
|
64
|
-
@templates = Hash.new { |h,k| h[k] = {} }
|
65
|
-
|
66
64
|
COMMANDS.each do |command|
|
67
65
|
instance_variable_set("@#{command}", {})
|
68
66
|
end
|
@@ -112,20 +110,6 @@ class Masamune::Configuration
|
|
112
110
|
environment.reload_logger!
|
113
111
|
end
|
114
112
|
|
115
|
-
def bind_template(section, template, input_args = {})
|
116
|
-
free_command = load_template(section, template)[:command].split(/\s+/)
|
117
|
-
[].tap do |bind_command|
|
118
|
-
free_command.each do |free_expr|
|
119
|
-
if free_expr =~ /(%.*)/
|
120
|
-
free_param = $1
|
121
|
-
bind_command << free_expr.gsub!(free_param, bind_param(section, template, free_param, input_args))
|
122
|
-
elsif param = free_expr
|
123
|
-
bind_command << param
|
124
|
-
end
|
125
|
-
end
|
126
|
-
end
|
127
|
-
end
|
128
|
-
|
129
113
|
def as_options
|
130
114
|
opts = []
|
131
115
|
opts << '--quiet' if quiet
|
@@ -166,26 +150,6 @@ class Masamune::Configuration
|
|
166
150
|
|
167
151
|
private
|
168
152
|
|
169
|
-
def load_template(section, template_name)
|
170
|
-
@templates[section][template_name] ||= begin
|
171
|
-
raise ArgumentError, "no configuration section #{section}" unless COMMANDS.include?(section.to_s)
|
172
|
-
raise ArgumentError, 'no template_name' unless template_name
|
173
|
-
templates = send(section).fetch(:templates, {}).symbolize_keys!
|
174
|
-
template = templates[template_name.to_sym] or raise ArgumentError, "no template for #{template_name}"
|
175
|
-
template.symbolize_keys!
|
176
|
-
template.has_key?(:command) or raise ArgumentError, "no command for template #{template_name}"
|
177
|
-
template[:default] ||= {}
|
178
|
-
template[:default] = Hash[ template[:default].collect { |key,val| [key.to_sym, val.to_s] } ]
|
179
|
-
template
|
180
|
-
end
|
181
|
-
end
|
182
|
-
|
183
|
-
def bind_param(section, template, free_param, input_args = {})
|
184
|
-
default = load_template(section, template).fetch(:default, {})
|
185
|
-
param = free_param[/(?<=%).*/].to_sym
|
186
|
-
default.merge(input_args.symbolize_keys || {})[param] or raise ArgumentError, "no param for #{free_param}"
|
187
|
-
end
|
188
|
-
|
189
153
|
def load_paths(paths)
|
190
154
|
paths.each do |value|
|
191
155
|
symbol, path, options = *value.to_a.flatten
|
data/lib/masamune/data_plan.rb
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
# The MIT License (MIT)
|
2
2
|
#
|
3
|
-
# Copyright (c) 2014-
|
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-
|
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-
|
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-
|
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-
|
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-
|
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
|
data/lib/masamune/environment.rb
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
# The MIT License (MIT)
|
2
2
|
#
|
3
|
-
# Copyright (c) 2014-
|
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
|
data/lib/masamune/filesystem.rb
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
# The MIT License (MIT)
|
2
2
|
#
|
3
|
-
# Copyright (c) 2014-
|
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-
|
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
|
data/lib/masamune/helpers.rb
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
# The MIT License (MIT)
|
2
2
|
#
|
3
|
-
# Copyright (c) 2014-
|
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-
|
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
|
data/lib/masamune/io.rb
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
# The MIT License (MIT)
|
2
2
|
#
|
3
|
-
# Copyright (c) 2014-
|
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-
|
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-
|
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
|
data/lib/masamune/multi_io.rb
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
# The MIT License (MIT)
|
2
2
|
#
|
3
|
-
# Copyright (c) 2014-
|
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
|
data/lib/masamune/schema.rb
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
# The MIT License (MIT)
|
2
2
|
#
|
3
|
-
# Copyright (c) 2014-
|
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-
|
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-
|
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-
|
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
|
data/lib/masamune/schema/fact.rb
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
# The MIT License (MIT)
|
2
2
|
#
|
3
|
-
# Copyright (c) 2014-
|
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
|
data/lib/masamune/schema/map.rb
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
# The MIT License (MIT)
|
2
2
|
#
|
3
|
-
# Copyright (c) 2014-
|
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
|
data/lib/masamune/schema/row.rb
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
# The MIT License (MIT)
|
2
2
|
#
|
3
|
-
# Copyright (c) 2014-
|
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-
|
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-
|
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-
|
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
|
data/lib/masamune/spec_helper.rb
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
# The MIT License (MIT)
|
2
2
|
#
|
3
|
-
# Copyright (c) 2014-
|
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-
|
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
|