dtk-client 0.7.10 → 0.8.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +5 -13
- data/README.md +83 -49
- data/bin/dtk +18 -1
- data/bin/dtk-execute +18 -1
- data/bin/dtk-shell +17 -0
- data/dtk-client.gemspec +1 -1
- data/lib/auxiliary.rb +18 -1
- data/lib/bundler_monkey_patch.rb +17 -0
- data/lib/client.rb +18 -3
- data/lib/command_helper.rb +18 -1
- data/lib/command_helpers/git_repo/merge.rb +18 -1
- data/lib/command_helpers/git_repo.rb +18 -3
- data/lib/command_helpers/jenkins_client/config_xml.rb +18 -1
- data/lib/command_helpers/jenkins_client.rb +18 -4
- data/lib/command_helpers/service_importer.rb +20 -5
- data/lib/command_helpers/service_link.rb +18 -3
- data/lib/command_helpers/test_module_creator.rb +18 -1
- data/lib/commands/common/thor/access_control.rb +18 -1
- data/lib/commands/common/thor/action_result_handler.rb +17 -0
- data/lib/commands/common/thor/assembly_template.rb +18 -1
- data/lib/commands/common/thor/assembly_workspace.rb +18 -1
- data/lib/commands/common/thor/base_command_helper.rb +18 -1
- data/lib/commands/common/thor/clone.rb +19 -2
- data/lib/commands/common/thor/common.rb +18 -1
- data/lib/commands/common/thor/common_base.rb +18 -1
- data/lib/commands/common/thor/create_target.rb +18 -1
- data/lib/commands/common/thor/edit.rb +18 -2
- data/lib/commands/common/thor/inventory_parser.rb +18 -1
- data/lib/commands/common/thor/list_diffs.rb +17 -0
- data/lib/commands/common/thor/module/import.rb +18 -1
- data/lib/commands/common/thor/module.rb +20 -2
- data/lib/commands/common/thor/node.rb +18 -1
- data/lib/commands/common/thor/poller.rb +17 -0
- data/lib/commands/common/thor/pull_clone_changes.rb +18 -2
- data/lib/commands/common/thor/pull_from_remote.rb +18 -1
- data/lib/commands/common/thor/puppet_forge.rb +18 -3
- data/lib/commands/common/thor/purge_clone.rb +18 -1
- data/lib/commands/common/thor/push_clone_changes.rb +18 -1
- data/lib/commands/common/thor/push_to_remote.rb +18 -1
- data/lib/commands/common/thor/remotes.rb +17 -0
- data/lib/commands/common/thor/reparse.rb +18 -1
- data/lib/commands/common/thor/set_required_attributes.rb +18 -1
- data/lib/commands/thor/account.rb +42 -67
- data/lib/commands/thor/assembly.rb +18 -1
- data/lib/commands/thor/attribute.rb +17 -0
- data/lib/commands/thor/component.rb +18 -1
- data/lib/commands/thor/component_module.rb +18 -2
- data/lib/commands/thor/component_template.rb +18 -1
- data/lib/commands/thor/dependency.rb +18 -2
- data/lib/commands/thor/developer.rb +18 -1
- data/lib/commands/thor/dtk.rb +18 -2
- data/lib/commands/thor/library.rb +18 -2
- data/lib/commands/thor/node.rb +18 -3
- data/lib/commands/thor/node_group.rb +18 -2
- data/lib/commands/thor/node_template.rb +18 -2
- data/lib/commands/thor/project.rb +18 -1
- data/lib/commands/thor/provider.rb +18 -1
- data/lib/commands/thor/remotes.rb +18 -1
- data/lib/commands/thor/service.rb +20 -3
- data/lib/commands/thor/service_module.rb +19 -10
- data/lib/commands/thor/state_change.rb +17 -2
- data/lib/commands/thor/target.rb +18 -1
- data/lib/commands/thor/task.rb +18 -2
- data/lib/commands/thor/test_module.rb +18 -1
- data/lib/commands/thor/utils.rb +18 -1
- data/lib/commands/thor/workspace.rb +25 -3
- data/lib/commands.rb +18 -1
- data/lib/config/configuration.rb +18 -1
- data/lib/config/disk_cacher.rb +17 -0
- data/lib/configurator.rb +18 -2
- data/lib/context_router.rb +18 -1
- data/lib/core.rb +18 -1
- data/lib/domain/git_adapter.rb +18 -1
- data/lib/domain/git_error_handler.rb +17 -0
- data/lib/domain/response/error_handler.rb +18 -2
- data/lib/domain/response.rb +18 -2
- data/lib/dtk-client/version.rb +18 -1
- data/lib/dtk_client.rb +17 -0
- data/lib/dtk_constants.rb +18 -1
- data/lib/dtk_error.rb +18 -1
- data/lib/dtk_logger.rb +18 -1
- data/lib/error.rb +18 -1
- data/lib/execute/cli_pure/cli_rerouter.rb +17 -0
- data/lib/execute/command/api_call/map.rb +18 -1
- data/lib/execute/command/api_call/service.rb +18 -1
- data/lib/execute/command/api_call/translation_term.rb +18 -2
- data/lib/execute/command/api_call.rb +18 -1
- data/lib/execute/command/rest_call.rb +18 -1
- data/lib/execute/command.rb +18 -1
- data/lib/execute/command_processor/rest_call.rb +18 -2
- data/lib/execute/command_processor.rb +18 -1
- data/lib/execute/error_usage.rb +17 -0
- data/lib/execute/execute_context/result_store.rb +18 -1
- data/lib/execute/execute_context.rb +18 -2
- data/lib/execute/script/add_tenant.rb +18 -1
- data/lib/execute/script.rb +18 -2
- data/lib/execute.rb +18 -2
- data/lib/parser/adapters/option_parser.rb +18 -1
- data/lib/parser/adapters/thor/common_option_defs.rb +18 -1
- data/lib/parser/adapters/thor.rb +18 -1
- data/lib/require_first.rb +18 -1
- data/lib/search_hash.rb +18 -1
- data/lib/shell/context.rb +22 -5
- data/lib/shell/context_aux.rb +17 -0
- data/lib/shell/domain/active_context.rb +17 -0
- data/lib/shell/domain/context_entity.rb +17 -0
- data/lib/shell/domain/context_params.rb +18 -1
- data/lib/shell/domain/override_tasks.rb +18 -1
- data/lib/shell/domain/shadow_entity.rb +18 -1
- data/lib/shell/header_shell.rb +17 -0
- data/lib/shell/help_monkey_patch.rb +17 -0
- data/lib/shell/interactive_wizard.rb +46 -29
- data/lib/shell/message_queue.rb +18 -1
- data/lib/shell/parse_monkey_patch.rb +17 -0
- data/lib/shell/status_monitor.rb +17 -0
- data/lib/shell.rb +18 -5
- data/lib/task_status/refresh_mode.rb +18 -1
- data/lib/task_status/snapshot_mode.rb +18 -1
- data/lib/task_status/stream_mode/element/format.rb +18 -3
- data/lib/task_status/stream_mode/element/hierarchical_task/result/action.rb +18 -1
- data/lib/task_status/stream_mode/element/hierarchical_task/result/components.rb +17 -0
- data/lib/task_status/stream_mode/element/hierarchical_task/result/node_level.rb +17 -0
- data/lib/task_status/stream_mode/element/hierarchical_task/result.rb +18 -1
- data/lib/task_status/stream_mode/element/hierarchical_task/steps/action.rb +18 -2
- data/lib/task_status/stream_mode/element/hierarchical_task/steps/components.rb +18 -1
- data/lib/task_status/stream_mode/element/hierarchical_task/steps/node_level.rb +18 -1
- data/lib/task_status/stream_mode/element/hierarchical_task/steps.rb +18 -1
- data/lib/task_status/stream_mode/element/hierarchical_task.rb +18 -1
- data/lib/task_status/stream_mode/element/no_results.rb +17 -1
- data/lib/task_status/stream_mode/element/render.rb +18 -1
- data/lib/task_status/stream_mode/element/stage/render.rb +18 -1
- data/lib/task_status/stream_mode/element/stage.rb +18 -1
- data/lib/task_status/stream_mode/element/task_end.rb +18 -2
- data/lib/task_status/stream_mode/element/task_start.rb +18 -2
- data/lib/task_status/stream_mode/element.rb +18 -2
- data/lib/task_status/stream_mode.rb +18 -1
- data/lib/task_status.rb +18 -1
- data/lib/util/common_util.rb +17 -0
- data/lib/util/console.rb +18 -1
- data/lib/util/dtk_puppet.rb +17 -0
- data/lib/util/module_util.rb +18 -1
- data/lib/util/os_util.rb +19 -1
- data/lib/util/permission_util.rb +18 -1
- data/lib/util/remote_dependency_util.rb +17 -0
- data/lib/util/ssh_util.rb +17 -0
- data/lib/view_processor/augmented_simple_list.rb +18 -1
- data/lib/view_processor/hash_pretty_print.rb +18 -1
- data/lib/view_processor/simple_list.rb +18 -1
- data/lib/view_processor/table_print.rb +18 -5
- data/lib/view_processor.rb +18 -1
- data/puppet/r8meta.puppet.yml +17 -0
- metadata +19 -19
@@ -1,3 +1,20 @@
|
|
1
|
+
#
|
2
|
+
# Copyright (C) 2010-2016 dtk contributors
|
3
|
+
#
|
4
|
+
# This file is part of the dtk project.
|
5
|
+
#
|
6
|
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
7
|
+
# you may not use this file except in compliance with the License.
|
8
|
+
# You may obtain a copy of the License at
|
9
|
+
#
|
10
|
+
# http://www.apache.org/licenses/LICENSE-2.0
|
11
|
+
#
|
12
|
+
# Unless required by applicable law or agreed to in writing, software
|
13
|
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
14
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
15
|
+
# See the License for the specific language governing permissions and
|
16
|
+
# limitations under the License.
|
17
|
+
#
|
1
18
|
class DTK::Client::Execute
|
2
19
|
class Command
|
3
20
|
class APICall < self
|
@@ -40,4 +57,4 @@ class DTK::Client::Execute
|
|
40
57
|
|
41
58
|
end
|
42
59
|
end
|
43
|
-
end
|
60
|
+
end
|
@@ -1,3 +1,20 @@
|
|
1
|
+
#
|
2
|
+
# Copyright (C) 2010-2016 dtk contributors
|
3
|
+
#
|
4
|
+
# This file is part of the dtk project.
|
5
|
+
#
|
6
|
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
7
|
+
# you may not use this file except in compliance with the License.
|
8
|
+
# You may obtain a copy of the License at
|
9
|
+
#
|
10
|
+
# http://www.apache.org/licenses/LICENSE-2.0
|
11
|
+
#
|
12
|
+
# Unless required by applicable law or agreed to in writing, software
|
13
|
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
14
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
15
|
+
# See the License for the specific language governing permissions and
|
16
|
+
# limitations under the License.
|
17
|
+
#
|
1
18
|
class DTK::Client::Execute
|
2
19
|
class Command
|
3
20
|
class RestCall < self
|
@@ -17,4 +34,4 @@ class DTK::Client::Execute
|
|
17
34
|
end
|
18
35
|
end
|
19
36
|
end
|
20
|
-
end
|
37
|
+
end
|
data/lib/execute/command.rb
CHANGED
@@ -1,3 +1,20 @@
|
|
1
|
+
#
|
2
|
+
# Copyright (C) 2010-2016 dtk contributors
|
3
|
+
#
|
4
|
+
# This file is part of the dtk project.
|
5
|
+
#
|
6
|
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
7
|
+
# you may not use this file except in compliance with the License.
|
8
|
+
# You may obtain a copy of the License at
|
9
|
+
#
|
10
|
+
# http://www.apache.org/licenses/LICENSE-2.0
|
11
|
+
#
|
12
|
+
# Unless required by applicable law or agreed to in writing, software
|
13
|
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
14
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
15
|
+
# See the License for the specific language governing permissions and
|
16
|
+
# limitations under the License.
|
17
|
+
#
|
1
18
|
class DTK::Client::Execute
|
2
19
|
class Command
|
3
20
|
dtk_require('command/rest_call')
|
@@ -20,4 +37,4 @@ class DTK::Client::Execute
|
|
20
37
|
@input_hash[key]
|
21
38
|
end
|
22
39
|
end
|
23
|
-
end
|
40
|
+
end
|
@@ -1,3 +1,20 @@
|
|
1
|
+
#
|
2
|
+
# Copyright (C) 2010-2016 dtk contributors
|
3
|
+
#
|
4
|
+
# This file is part of the dtk project.
|
5
|
+
#
|
6
|
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
7
|
+
# you may not use this file except in compliance with the License.
|
8
|
+
# You may obtain a copy of the License at
|
9
|
+
#
|
10
|
+
# http://www.apache.org/licenses/LICENSE-2.0
|
11
|
+
#
|
12
|
+
# Unless required by applicable law or agreed to in writing, software
|
13
|
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
14
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
15
|
+
# See the License for the specific language governing permissions and
|
16
|
+
# limitations under the License.
|
17
|
+
#
|
1
18
|
class DTK::Client::Execute; class CommandProcessor
|
2
19
|
class RestCall< self
|
3
20
|
extend ::DTK::Client::CommandBase # TODO: have a Base that is not just for commands (CommandBase)
|
@@ -39,5 +56,4 @@ class DTK::Client::Execute; class CommandProcessor
|
|
39
56
|
end
|
40
57
|
|
41
58
|
end
|
42
|
-
end; end
|
43
|
-
|
59
|
+
end; end
|
@@ -1,3 +1,20 @@
|
|
1
|
+
#
|
2
|
+
# Copyright (C) 2010-2016 dtk contributors
|
3
|
+
#
|
4
|
+
# This file is part of the dtk project.
|
5
|
+
#
|
6
|
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
7
|
+
# you may not use this file except in compliance with the License.
|
8
|
+
# You may obtain a copy of the License at
|
9
|
+
#
|
10
|
+
# http://www.apache.org/licenses/LICENSE-2.0
|
11
|
+
#
|
12
|
+
# Unless required by applicable law or agreed to in writing, software
|
13
|
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
14
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
15
|
+
# See the License for the specific language governing permissions and
|
16
|
+
# limitations under the License.
|
17
|
+
#
|
1
18
|
class DTK::Client::Execute
|
2
19
|
class CommandProcessor
|
3
20
|
dtk_require('command_processor/rest_call')
|
@@ -10,4 +27,4 @@ class DTK::Client::Execute
|
|
10
27
|
end
|
11
28
|
end
|
12
29
|
end
|
13
|
-
end
|
30
|
+
end
|
data/lib/execute/error_usage.rb
CHANGED
@@ -1,3 +1,20 @@
|
|
1
|
+
#
|
2
|
+
# Copyright (C) 2010-2016 dtk contributors
|
3
|
+
#
|
4
|
+
# This file is part of the dtk project.
|
5
|
+
#
|
6
|
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
7
|
+
# you may not use this file except in compliance with the License.
|
8
|
+
# You may obtain a copy of the License at
|
9
|
+
#
|
10
|
+
# http://www.apache.org/licenses/LICENSE-2.0
|
11
|
+
#
|
12
|
+
# Unless required by applicable law or agreed to in writing, software
|
13
|
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
14
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
15
|
+
# See the License for the specific language governing permissions and
|
16
|
+
# limitations under the License.
|
17
|
+
#
|
1
18
|
class DTK::Client::Execute
|
2
19
|
class ErrorUsage < ::DTK::Client::Error
|
3
20
|
end
|
@@ -1,3 +1,20 @@
|
|
1
|
+
#
|
2
|
+
# Copyright (C) 2010-2016 dtk contributors
|
3
|
+
#
|
4
|
+
# This file is part of the dtk project.
|
5
|
+
#
|
6
|
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
7
|
+
# you may not use this file except in compliance with the License.
|
8
|
+
# You may obtain a copy of the License at
|
9
|
+
#
|
10
|
+
# http://www.apache.org/licenses/LICENSE-2.0
|
11
|
+
#
|
12
|
+
# Unless required by applicable law or agreed to in writing, software
|
13
|
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
14
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
15
|
+
# See the License for the specific language governing permissions and
|
16
|
+
# limitations under the License.
|
17
|
+
#
|
1
18
|
class DTK::Client::Execute
|
2
19
|
class ExecuteContext
|
3
20
|
class ResultStore < Hash
|
@@ -17,4 +34,4 @@ class DTK::Client::Execute
|
|
17
34
|
end
|
18
35
|
end
|
19
36
|
end
|
20
|
-
end
|
37
|
+
end
|
@@ -1,3 +1,20 @@
|
|
1
|
+
#
|
2
|
+
# Copyright (C) 2010-2016 dtk contributors
|
3
|
+
#
|
4
|
+
# This file is part of the dtk project.
|
5
|
+
#
|
6
|
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
7
|
+
# you may not use this file except in compliance with the License.
|
8
|
+
# You may obtain a copy of the License at
|
9
|
+
#
|
10
|
+
# http://www.apache.org/licenses/LICENSE-2.0
|
11
|
+
#
|
12
|
+
# Unless required by applicable law or agreed to in writing, software
|
13
|
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
14
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
15
|
+
# See the License for the specific language governing permissions and
|
16
|
+
# limitations under the License.
|
17
|
+
#
|
1
18
|
class DTK::Client::Execute
|
2
19
|
class ExecuteContext
|
3
20
|
dtk_require('execute_context/result_store')
|
@@ -66,5 +83,4 @@ class DTK::Client::Execute
|
|
66
83
|
end
|
67
84
|
|
68
85
|
end
|
69
|
-
end
|
70
|
-
|
86
|
+
end
|
@@ -1,3 +1,20 @@
|
|
1
|
+
#
|
2
|
+
# Copyright (C) 2010-2016 dtk contributors
|
3
|
+
#
|
4
|
+
# This file is part of the dtk project.
|
5
|
+
#
|
6
|
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
7
|
+
# you may not use this file except in compliance with the License.
|
8
|
+
# You may obtain a copy of the License at
|
9
|
+
#
|
10
|
+
# http://www.apache.org/licenses/LICENSE-2.0
|
11
|
+
#
|
12
|
+
# Unless required by applicable law or agreed to in writing, software
|
13
|
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
14
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
15
|
+
# See the License for the specific language governing permissions and
|
16
|
+
# limitations under the License.
|
17
|
+
#
|
1
18
|
class DTK::Client::Execute::Script
|
2
19
|
class AddTenant < self
|
3
20
|
def self.ret_params_from_argv()
|
@@ -101,4 +118,4 @@ class DTK::Client::Execute::Script
|
|
101
118
|
end
|
102
119
|
end
|
103
120
|
end
|
104
|
-
end
|
121
|
+
end
|
data/lib/execute/script.rb
CHANGED
@@ -1,3 +1,20 @@
|
|
1
|
+
#
|
2
|
+
# Copyright (C) 2010-2016 dtk contributors
|
3
|
+
#
|
4
|
+
# This file is part of the dtk project.
|
5
|
+
#
|
6
|
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
7
|
+
# you may not use this file except in compliance with the License.
|
8
|
+
# You may obtain a copy of the License at
|
9
|
+
#
|
10
|
+
# http://www.apache.org/licenses/LICENSE-2.0
|
11
|
+
#
|
12
|
+
# Unless required by applicable law or agreed to in writing, software
|
13
|
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
14
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
15
|
+
# See the License for the specific language governing permissions and
|
16
|
+
# limitations under the License.
|
17
|
+
#
|
1
18
|
class DTK::Client::Execute
|
2
19
|
class Script < self
|
3
20
|
dtk_require('script/add_tenant')
|
@@ -44,5 +61,4 @@ class DTK::Client::Execute
|
|
44
61
|
end
|
45
62
|
extend OptionParserHelper
|
46
63
|
end
|
47
|
-
end
|
48
|
-
|
64
|
+
end
|
data/lib/execute.rb
CHANGED
@@ -1,3 +1,20 @@
|
|
1
|
+
#
|
2
|
+
# Copyright (C) 2010-2016 dtk contributors
|
3
|
+
#
|
4
|
+
# This file is part of the dtk project.
|
5
|
+
#
|
6
|
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
7
|
+
# you may not use this file except in compliance with the License.
|
8
|
+
# You may obtain a copy of the License at
|
9
|
+
#
|
10
|
+
# http://www.apache.org/licenses/LICENSE-2.0
|
11
|
+
#
|
12
|
+
# Unless required by applicable law or agreed to in writing, software
|
13
|
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
14
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
15
|
+
# See the License for the specific language governing permissions and
|
16
|
+
# limitations under the License.
|
17
|
+
#
|
1
18
|
module DTK::Client
|
2
19
|
class Execute
|
3
20
|
# The order matters
|
@@ -9,5 +26,4 @@ module DTK::Client
|
|
9
26
|
|
10
27
|
extend ExecuteContext::ClassMixin
|
11
28
|
end
|
12
|
-
end
|
13
|
-
|
29
|
+
end
|
@@ -1,3 +1,20 @@
|
|
1
|
+
#
|
2
|
+
# Copyright (C) 2010-2016 dtk contributors
|
3
|
+
#
|
4
|
+
# This file is part of the dtk project.
|
5
|
+
#
|
6
|
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
7
|
+
# you may not use this file except in compliance with the License.
|
8
|
+
# You may obtain a copy of the License at
|
9
|
+
#
|
10
|
+
# http://www.apache.org/licenses/LICENSE-2.0
|
11
|
+
#
|
12
|
+
# Unless required by applicable law or agreed to in writing, software
|
13
|
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
14
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
15
|
+
# See the License for the specific language governing permissions and
|
16
|
+
# limitations under the License.
|
17
|
+
#
|
1
18
|
require 'optparse'
|
2
19
|
module DTK
|
3
20
|
module Client
|
@@ -50,4 +67,4 @@ module DTK
|
|
50
67
|
end
|
51
68
|
end
|
52
69
|
end
|
53
|
-
end
|
70
|
+
end
|
@@ -1,3 +1,20 @@
|
|
1
|
+
#
|
2
|
+
# Copyright (C) 2010-2016 dtk contributors
|
3
|
+
#
|
4
|
+
# This file is part of the dtk project.
|
5
|
+
#
|
6
|
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
7
|
+
# you may not use this file except in compliance with the License.
|
8
|
+
# You may obtain a copy of the License at
|
9
|
+
#
|
10
|
+
# http://www.apache.org/licenses/LICENSE-2.0
|
11
|
+
#
|
12
|
+
# Unless required by applicable law or agreed to in writing, software
|
13
|
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
14
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
15
|
+
# See the License for the specific language governing permissions and
|
16
|
+
# limitations under the License.
|
17
|
+
#
|
1
18
|
module DTK; module Client
|
2
19
|
class CommandBaseThor
|
3
20
|
module CommonOptionDefs
|
@@ -20,4 +37,4 @@ module DTK; module Client
|
|
20
37
|
end
|
21
38
|
end
|
22
39
|
end
|
23
|
-
end; end
|
40
|
+
end; end
|
data/lib/parser/adapters/thor.rb
CHANGED
@@ -1,3 +1,20 @@
|
|
1
|
+
#
|
2
|
+
# Copyright (C) 2010-2016 dtk contributors
|
3
|
+
#
|
4
|
+
# This file is part of the dtk project.
|
5
|
+
#
|
6
|
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
7
|
+
# you may not use this file except in compliance with the License.
|
8
|
+
# You may obtain a copy of the License at
|
9
|
+
#
|
10
|
+
# http://www.apache.org/licenses/LICENSE-2.0
|
11
|
+
#
|
12
|
+
# Unless required by applicable law or agreed to in writing, software
|
13
|
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
14
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
15
|
+
# See the License for the specific language governing permissions and
|
16
|
+
# limitations under the License.
|
17
|
+
#
|
1
18
|
require 'thor'
|
2
19
|
require 'thor/group'
|
3
20
|
require 'readline'
|
@@ -535,4 +552,4 @@ module DTK
|
|
535
552
|
end
|
536
553
|
end
|
537
554
|
end
|
538
|
-
end
|
555
|
+
end
|
data/lib/require_first.rb
CHANGED
@@ -1,3 +1,20 @@
|
|
1
|
+
#
|
2
|
+
# Copyright (C) 2010-2016 dtk contributors
|
3
|
+
#
|
4
|
+
# This file is part of the dtk project.
|
5
|
+
#
|
6
|
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
7
|
+
# you may not use this file except in compliance with the License.
|
8
|
+
# You may obtain a copy of the License at
|
9
|
+
#
|
10
|
+
# http://www.apache.org/licenses/LICENSE-2.0
|
11
|
+
#
|
12
|
+
# Unless required by applicable law or agreed to in writing, software
|
13
|
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
14
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
15
|
+
# See the License for the specific language governing permissions and
|
16
|
+
# limitations under the License.
|
17
|
+
#
|
1
18
|
require File.expand_path('../lib/error', File.dirname(__FILE__))
|
2
19
|
|
3
20
|
# we leave possibilites that folders user multiple names
|
@@ -84,4 +101,4 @@ def determine_common_folder
|
|
84
101
|
end
|
85
102
|
|
86
103
|
return nil
|
87
|
-
end
|
104
|
+
end
|
data/lib/search_hash.rb
CHANGED
@@ -1,3 +1,20 @@
|
|
1
|
+
#
|
2
|
+
# Copyright (C) 2010-2016 dtk contributors
|
3
|
+
#
|
4
|
+
# This file is part of the dtk project.
|
5
|
+
#
|
6
|
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
7
|
+
# you may not use this file except in compliance with the License.
|
8
|
+
# You may obtain a copy of the License at
|
9
|
+
#
|
10
|
+
# http://www.apache.org/licenses/LICENSE-2.0
|
11
|
+
#
|
12
|
+
# Unless required by applicable law or agreed to in writing, software
|
13
|
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
14
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
15
|
+
# See the License for the specific language governing permissions and
|
16
|
+
# limitations under the License.
|
17
|
+
#
|
1
18
|
module DTK
|
2
19
|
module Client
|
3
20
|
class SearchHash < Hash
|
@@ -24,4 +41,4 @@ module DTK
|
|
24
41
|
end
|
25
42
|
end
|
26
43
|
end
|
27
|
-
end
|
44
|
+
end
|
data/lib/shell/context.rb
CHANGED
@@ -1,3 +1,20 @@
|
|
1
|
+
#
|
2
|
+
# Copyright (C) 2010-2016 dtk contributors
|
3
|
+
#
|
4
|
+
# This file is part of the dtk project.
|
5
|
+
#
|
6
|
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
7
|
+
# you may not use this file except in compliance with the License.
|
8
|
+
# You may obtain a copy of the License at
|
9
|
+
#
|
10
|
+
# http://www.apache.org/licenses/LICENSE-2.0
|
11
|
+
#
|
12
|
+
# Unless required by applicable law or agreed to in writing, software
|
13
|
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
14
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
15
|
+
# See the License for the specific language governing permissions and
|
16
|
+
# limitations under the License.
|
17
|
+
#
|
1
18
|
require File.expand_path('../commands/thor/dtk', File.dirname(__FILE__))
|
2
19
|
require File.expand_path('../auxiliary', File.dirname(__FILE__))
|
3
20
|
require 'json'
|
@@ -825,9 +842,11 @@ module DTK
|
|
825
842
|
id = entity_name.identifier
|
826
843
|
opts[id_label] = id
|
827
844
|
|
828
|
-
response_ruby_obj = DTK::Client::CommandBaseThor.get_cached_response(endpoint
|
845
|
+
response_ruby_obj = DTK::Client::CommandBaseThor.get_cached_response(endpoint, url, opts)
|
846
|
+
# response_ruby_obj = post rest_url(url), opts
|
829
847
|
else
|
830
|
-
response_ruby_obj = DTK::Client::CommandBaseThor.get_cached_response(endpoint
|
848
|
+
response_ruby_obj = DTK::Client::CommandBaseThor.get_cached_response(endpoint, url, opts)
|
849
|
+
# response_ruby_obj = post rest_url(url), opts
|
831
850
|
end
|
832
851
|
|
833
852
|
if response_ruby_obj && response_ruby_obj.ok?
|
@@ -1042,6 +1061,4 @@ module DTK
|
|
1042
1061
|
end
|
1043
1062
|
end
|
1044
1063
|
end
|
1045
|
-
end
|
1046
|
-
|
1047
|
-
|
1064
|
+
end
|
data/lib/shell/context_aux.rb
CHANGED
@@ -1,3 +1,20 @@
|
|
1
|
+
#
|
2
|
+
# Copyright (C) 2010-2016 dtk contributors
|
3
|
+
#
|
4
|
+
# This file is part of the dtk project.
|
5
|
+
#
|
6
|
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
7
|
+
# you may not use this file except in compliance with the License.
|
8
|
+
# You may obtain a copy of the License at
|
9
|
+
#
|
10
|
+
# http://www.apache.org/licenses/LICENSE-2.0
|
11
|
+
#
|
12
|
+
# Unless required by applicable law or agreed to in writing, software
|
13
|
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
14
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
15
|
+
# See the License for the specific language governing permissions and
|
16
|
+
# limitations under the License.
|
17
|
+
#
|
1
18
|
module DTK
|
2
19
|
module Shell
|
3
20
|
class ContextAux
|
@@ -1,3 +1,20 @@
|
|
1
|
+
#
|
2
|
+
# Copyright (C) 2010-2016 dtk contributors
|
3
|
+
#
|
4
|
+
# This file is part of the dtk project.
|
5
|
+
#
|
6
|
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
7
|
+
# you may not use this file except in compliance with the License.
|
8
|
+
# You may obtain a copy of the License at
|
9
|
+
#
|
10
|
+
# http://www.apache.org/licenses/LICENSE-2.0
|
11
|
+
#
|
12
|
+
# Unless required by applicable law or agreed to in writing, software
|
13
|
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
14
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
15
|
+
# See the License for the specific language governing permissions and
|
16
|
+
# limitations under the License.
|
17
|
+
#
|
1
18
|
module DTK::Shell
|
2
19
|
class ActiveContext
|
3
20
|
|
@@ -1,3 +1,20 @@
|
|
1
|
+
#
|
2
|
+
# Copyright (C) 2010-2016 dtk contributors
|
3
|
+
#
|
4
|
+
# This file is part of the dtk project.
|
5
|
+
#
|
6
|
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
7
|
+
# you may not use this file except in compliance with the License.
|
8
|
+
# You may obtain a copy of the License at
|
9
|
+
#
|
10
|
+
# http://www.apache.org/licenses/LICENSE-2.0
|
11
|
+
#
|
12
|
+
# Unless required by applicable law or agreed to in writing, software
|
13
|
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
14
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
15
|
+
# See the License for the specific language governing permissions and
|
16
|
+
# limitations under the License.
|
17
|
+
#
|
1
18
|
module DTK::Shell
|
2
19
|
class ContextEntity
|
3
20
|
attr_accessor :entity
|
@@ -1,3 +1,20 @@
|
|
1
|
+
#
|
2
|
+
# Copyright (C) 2010-2016 dtk contributors
|
3
|
+
#
|
4
|
+
# This file is part of the dtk project.
|
5
|
+
#
|
6
|
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
7
|
+
# you may not use this file except in compliance with the License.
|
8
|
+
# You may obtain a copy of the License at
|
9
|
+
#
|
10
|
+
# http://www.apache.org/licenses/LICENSE-2.0
|
11
|
+
#
|
12
|
+
# Unless required by applicable law or agreed to in writing, software
|
13
|
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
14
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
15
|
+
# See the License for the specific language governing permissions and
|
16
|
+
# limitations under the License.
|
17
|
+
#
|
1
18
|
module DTK::Shell
|
2
19
|
class ContextParams
|
3
20
|
|
@@ -203,4 +220,4 @@ module DTK::Shell
|
|
203
220
|
end
|
204
221
|
|
205
222
|
end
|
206
|
-
end
|
223
|
+
end
|
@@ -1,3 +1,20 @@
|
|
1
|
+
#
|
2
|
+
# Copyright (C) 2010-2016 dtk contributors
|
3
|
+
#
|
4
|
+
# This file is part of the dtk project.
|
5
|
+
#
|
6
|
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
7
|
+
# you may not use this file except in compliance with the License.
|
8
|
+
# You may obtain a copy of the License at
|
9
|
+
#
|
10
|
+
# http://www.apache.org/licenses/LICENSE-2.0
|
11
|
+
#
|
12
|
+
# Unless required by applicable law or agreed to in writing, software
|
13
|
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
14
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
15
|
+
# See the License for the specific language governing permissions and
|
16
|
+
# limitations under the License.
|
17
|
+
#
|
1
18
|
module DTK
|
2
19
|
module Shell
|
3
20
|
|
@@ -68,4 +85,4 @@ module DTK
|
|
68
85
|
end
|
69
86
|
|
70
87
|
end
|
71
|
-
end
|
88
|
+
end
|
@@ -1,3 +1,20 @@
|
|
1
|
+
#
|
2
|
+
# Copyright (C) 2010-2016 dtk contributors
|
3
|
+
#
|
4
|
+
# This file is part of the dtk project.
|
5
|
+
#
|
6
|
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
7
|
+
# you may not use this file except in compliance with the License.
|
8
|
+
# You may obtain a copy of the License at
|
9
|
+
#
|
10
|
+
# http://www.apache.org/licenses/LICENSE-2.0
|
11
|
+
#
|
12
|
+
# Unless required by applicable law or agreed to in writing, software
|
13
|
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
14
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
15
|
+
# See the License for the specific language governing permissions and
|
16
|
+
# limitations under the License.
|
17
|
+
#
|
1
18
|
##
|
2
19
|
# This is temporary workaround to faciliate concept we are introducing
|
3
20
|
#
|
@@ -56,4 +73,4 @@ module DTK
|
|
56
73
|
|
57
74
|
end
|
58
75
|
end
|
59
|
-
end
|
76
|
+
end
|
data/lib/shell/header_shell.rb
CHANGED
@@ -1,3 +1,20 @@
|
|
1
|
+
#
|
2
|
+
# Copyright (C) 2010-2016 dtk contributors
|
3
|
+
#
|
4
|
+
# This file is part of the dtk project.
|
5
|
+
#
|
6
|
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
7
|
+
# you may not use this file except in compliance with the License.
|
8
|
+
# You may obtain a copy of the License at
|
9
|
+
#
|
10
|
+
# http://www.apache.org/licenses/LICENSE-2.0
|
11
|
+
#
|
12
|
+
# Unless required by applicable law or agreed to in writing, software
|
13
|
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
14
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
15
|
+
# See the License for the specific language governing permissions and
|
16
|
+
# limitations under the License.
|
17
|
+
#
|
1
18
|
require 'hirb'
|
2
19
|
|
3
20
|
module DTK
|
@@ -1,3 +1,20 @@
|
|
1
|
+
#
|
2
|
+
# Copyright (C) 2010-2016 dtk contributors
|
3
|
+
#
|
4
|
+
# This file is part of the dtk project.
|
5
|
+
#
|
6
|
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
7
|
+
# you may not use this file except in compliance with the License.
|
8
|
+
# You may obtain a copy of the License at
|
9
|
+
#
|
10
|
+
# http://www.apache.org/licenses/LICENSE-2.0
|
11
|
+
#
|
12
|
+
# Unless required by applicable law or agreed to in writing, software
|
13
|
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
14
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
15
|
+
# See the License for the specific language governing permissions and
|
16
|
+
# limitations under the License.
|
17
|
+
#
|
1
18
|
class Thor
|
2
19
|
class << self
|
3
20
|
# NOTE: Class is loaded automaticly in dtk-shell
|