script_executor 1.3.1 → 1.3.2
Sign up to get free protection for your applications and to get access to all the features.
- data/.idea/misc.xml +1 -1
- data/.idea/script_executor.iml +13 -0
- data/.idea/workspace.xml +31 -48
- data/CHANGES +5 -1
- data/lib/script_executor/executable.rb +18 -18
- data/lib/script_executor/version.rb +1 -1
- metadata +2 -2
data/.idea/misc.xml
CHANGED
@@ -1,5 +1,5 @@
|
|
1
1
|
<?xml version="1.0" encoding="UTF-8"?>
|
2
2
|
<project version="4">
|
3
|
-
<component name="ProjectRootManager" version="2" project-jdk-name="RVM: ruby-1.9.3-
|
3
|
+
<component name="ProjectRootManager" version="2" project-jdk-name="RVM: ruby-1.9.3-p385 [script_executor]" project-jdk-type="RUBY_SDK" />
|
4
4
|
</project>
|
5
5
|
|
data/.idea/script_executor.iml
CHANGED
@@ -13,6 +13,19 @@
|
|
13
13
|
<content url="file://$MODULE_DIR$" />
|
14
14
|
<orderEntry type="inheritedJdk" />
|
15
15
|
<orderEntry type="sourceFolder" forTests="false" />
|
16
|
+
<orderEntry type="library" scope="PROVIDED" name="bundler (v1.2.3, RVM: ruby-1.9.3-p385 [script_executor]) [gem]" level="application" />
|
17
|
+
<orderEntry type="library" scope="PROVIDED" name="diff-lcs (v1.1.3, RVM: ruby-1.9.3-p385 [script_executor]) [gem]" level="application" />
|
18
|
+
<orderEntry type="library" scope="PROVIDED" name="file_utils (v1.0.6, RVM: ruby-1.9.3-p385 [script_executor]) [gem]" level="application" />
|
19
|
+
<orderEntry type="library" scope="PROVIDED" name="gemcutter (v0.7.1, RVM: ruby-1.9.3-p385 [script_executor]) [gem]" level="application" />
|
20
|
+
<orderEntry type="library" scope="PROVIDED" name="gemspec_deps_gen (v1.0.5, RVM: ruby-1.9.3-p385 [script_executor]) [gem]" level="application" />
|
21
|
+
<orderEntry type="library" scope="PROVIDED" name="highline (v1.6.15, RVM: ruby-1.9.3-p385 [script_executor]) [gem]" level="application" />
|
22
|
+
<orderEntry type="library" scope="PROVIDED" name="metaclass (v0.0.1, RVM: ruby-1.9.3-p385 [script_executor]) [gem]" level="application" />
|
23
|
+
<orderEntry type="library" scope="PROVIDED" name="mocha (v0.13.1, RVM: ruby-1.9.3-p385 [script_executor]) [gem]" level="application" />
|
24
|
+
<orderEntry type="library" scope="PROVIDED" name="net-ssh (v2.6.2, RVM: ruby-1.9.3-p385 [script_executor]) [gem]" level="application" />
|
25
|
+
<orderEntry type="library" scope="PROVIDED" name="rspec (v2.12.0, RVM: ruby-1.9.3-p385 [script_executor]) [gem]" level="application" />
|
26
|
+
<orderEntry type="library" scope="PROVIDED" name="rspec-core (v2.12.2, RVM: ruby-1.9.3-p385 [script_executor]) [gem]" level="application" />
|
27
|
+
<orderEntry type="library" scope="PROVIDED" name="rspec-expectations (v2.12.1, RVM: ruby-1.9.3-p385 [script_executor]) [gem]" level="application" />
|
28
|
+
<orderEntry type="library" scope="PROVIDED" name="rspec-mocks (v2.12.0, RVM: ruby-1.9.3-p385 [script_executor]) [gem]" level="application" />
|
16
29
|
</component>
|
17
30
|
</module>
|
18
31
|
|
data/.idea/workspace.xml
CHANGED
@@ -2,17 +2,16 @@
|
|
2
2
|
<project version="4">
|
3
3
|
<component name="ChangeListManager">
|
4
4
|
<list default="true" id="6995392e-f204-4557-be32-fd20f300d877" name="Default" comment="">
|
5
|
-
<change type="MODIFICATION" beforePath="$PROJECT_DIR$/.rvmrc" afterPath="$PROJECT_DIR$/.rvmrc" />
|
6
5
|
<change type="MODIFICATION" beforePath="$PROJECT_DIR$/CHANGES" afterPath="$PROJECT_DIR$/CHANGES" />
|
7
6
|
<change type="MODIFICATION" beforePath="$PROJECT_DIR$/lib/script_executor/executable.rb" afterPath="$PROJECT_DIR$/lib/script_executor/executable.rb" />
|
8
|
-
<change type="MODIFICATION" beforePath="$PROJECT_DIR
|
7
|
+
<change type="MODIFICATION" beforePath="$PROJECT_DIR$/.idea/misc.xml" afterPath="$PROJECT_DIR$/.idea/misc.xml" />
|
9
8
|
<change type="MODIFICATION" beforePath="$PROJECT_DIR$/.idea/script_executor.iml" afterPath="$PROJECT_DIR$/.idea/script_executor.iml" />
|
10
9
|
<change type="MODIFICATION" beforePath="$PROJECT_DIR$/lib/script_executor/version.rb" afterPath="$PROJECT_DIR$/lib/script_executor/version.rb" />
|
11
10
|
<change type="MODIFICATION" beforePath="$PROJECT_DIR$/.idea/workspace.xml" afterPath="$PROJECT_DIR$/.idea/workspace.xml" />
|
12
11
|
</list>
|
13
12
|
<ignored path="script_executor.iws" />
|
14
13
|
<ignored path=".idea/workspace.xml" />
|
15
|
-
<file path="/Dummy.txt" changelist="6995392e-f204-4557-be32-fd20f300d877" time="
|
14
|
+
<file path="/Dummy.txt" changelist="6995392e-f204-4557-be32-fd20f300d877" time="1361391088248" ignored="false" />
|
16
15
|
<file path="/Gemfile" changelist="6995392e-f204-4557-be32-fd20f300d877" time="1355437179953" ignored="false" />
|
17
16
|
<file path="/script_executor_spec.rb" changelist="6995392e-f204-4557-be32-fd20f300d877" time="1355762516678" ignored="false" />
|
18
17
|
<file path="$PROJECT_DIR$/../../ui/src/thor/oracle_client.thor" changelist="6995392e-f204-4557-be32-fd20f300d877" time="1355417447890" ignored="false" />
|
@@ -65,7 +64,7 @@
|
|
65
64
|
<file path="$PROJECT_DIR$/../../ui/src/Gemfile" changelist="6995392e-f204-4557-be32-fd20f300d877" time="1355507081269" ignored="false" />
|
66
65
|
<file path="/fragment.rb" changelist="6995392e-f204-4557-be32-fd20f300d877" time="1355433500821" ignored="false" />
|
67
66
|
<file path="/script_executor.rb" changelist="6995392e-f204-4557-be32-fd20f300d877" time="1355762503911" ignored="false" />
|
68
|
-
<file path="/CHANGES" changelist="6995392e-f204-4557-be32-fd20f300d877" time="
|
67
|
+
<file path="/CHANGES" changelist="6995392e-f204-4557-be32-fd20f300d877" time="1361391164121" ignored="false" />
|
69
68
|
<file path="$USER_HOME$/.rvm/gems/ruby-1.8.7-p371@r21/gems/rake-0.8.7/lib/rake.rb" changelist="6995392e-f204-4557-be32-fd20f300d877" time="1355156976039" ignored="false" />
|
70
69
|
<file path="$USER_HOME$/.rvm/gems/ruby-1.8.7-p371@r21/gems/file_utils-1.0.5/lib/file_utils/file_utils.rb" changelist="6995392e-f204-4557-be32-fd20f300d877" time="1355082830869" ignored="false" />
|
71
70
|
<file path="$PROJECT_DIR$/../../ui/src/bin/install_oracle_client.sh" changelist="6995392e-f204-4557-be32-fd20f300d877" time="1355179739279" ignored="false" />
|
@@ -209,19 +208,10 @@
|
|
209
208
|
</provider>
|
210
209
|
</entry>
|
211
210
|
</file>
|
212
|
-
<file leaf-file-name="CHANGES" pinned="false" current="true" current-in-tab="true">
|
213
|
-
<entry file="file://$PROJECT_DIR$/CHANGES">
|
214
|
-
<provider selected="true" editor-type-id="text-editor">
|
215
|
-
<state line="30" column="2" selection-start="391" selection-end="423" vertical-scroll-proportion="0.794702">
|
216
|
-
<folding />
|
217
|
-
</state>
|
218
|
-
</provider>
|
219
|
-
</entry>
|
220
|
-
</file>
|
221
211
|
<file leaf-file-name="executable.rb" pinned="false" current="false" current-in-tab="false">
|
222
212
|
<entry file="file://$PROJECT_DIR$/lib/script_executor/executable.rb">
|
223
213
|
<provider selected="true" editor-type-id="text-editor">
|
224
|
-
<state line="
|
214
|
+
<state line="51" column="7" selection-start="0" selection-end="4368" vertical-scroll-proportion="0.0">
|
225
215
|
<folding />
|
226
216
|
</state>
|
227
217
|
</provider>
|
@@ -239,7 +229,7 @@
|
|
239
229
|
<file leaf-file-name=".rvmrc" pinned="false" current="false" current-in-tab="false">
|
240
230
|
<entry file="file://$PROJECT_DIR$/.rvmrc">
|
241
231
|
<provider selected="true" editor-type-id="text-editor">
|
242
|
-
<state line="4" column="
|
232
|
+
<state line="4" column="11" selection-start="98" selection-end="98" vertical-scroll-proportion="0.0">
|
243
233
|
<folding />
|
244
234
|
</state>
|
245
235
|
</provider>
|
@@ -248,7 +238,16 @@
|
|
248
238
|
<file leaf-file-name="version.rb" pinned="false" current="false" current-in-tab="false">
|
249
239
|
<entry file="file://$PROJECT_DIR$/lib/script_executor/version.rb">
|
250
240
|
<provider selected="true" editor-type-id="text-editor">
|
251
|
-
<state line="
|
241
|
+
<state line="1" column="18" selection-start="40" selection-end="40" vertical-scroll-proportion="0.0">
|
242
|
+
<folding />
|
243
|
+
</state>
|
244
|
+
</provider>
|
245
|
+
</entry>
|
246
|
+
</file>
|
247
|
+
<file leaf-file-name="CHANGES" pinned="false" current="true" current-in-tab="true">
|
248
|
+
<entry file="file://$PROJECT_DIR$/CHANGES">
|
249
|
+
<provider selected="true" editor-type-id="text-editor">
|
250
|
+
<state line="31" column="51" selection-start="425" selection-end="425" vertical-scroll-proportion="0.81848186">
|
252
251
|
<folding />
|
253
252
|
</state>
|
254
253
|
</provider>
|
@@ -293,9 +292,9 @@
|
|
293
292
|
<option value="$PROJECT_DIR$/lib/script_executor/capturer.rb" />
|
294
293
|
<option value="$PROJECT_DIR$/lib/script_executor/output_buffer.rb" />
|
295
294
|
<option value="$PROJECT_DIR$/.rvmrc" />
|
296
|
-
<option value="$PROJECT_DIR$/lib/script_executor/version.rb" />
|
297
|
-
<option value="$PROJECT_DIR$/lib/script_executor/executable.rb" />
|
298
295
|
<option value="$PROJECT_DIR$/spec/executable_spec.rb" />
|
296
|
+
<option value="$PROJECT_DIR$/lib/script_executor/executable.rb" />
|
297
|
+
<option value="$PROJECT_DIR$/lib/script_executor/version.rb" />
|
299
298
|
<option value="$PROJECT_DIR$/CHANGES" />
|
300
299
|
</list>
|
301
300
|
</option>
|
@@ -332,7 +331,6 @@
|
|
332
331
|
<sortByType />
|
333
332
|
</navigator>
|
334
333
|
<panes>
|
335
|
-
<pane id="Scope" />
|
336
334
|
<pane id="ProjectPane">
|
337
335
|
<subPane>
|
338
336
|
<PATH>
|
@@ -351,20 +349,6 @@
|
|
351
349
|
<option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
|
352
350
|
</PATH_ELEMENT>
|
353
351
|
</PATH>
|
354
|
-
<PATH>
|
355
|
-
<PATH_ELEMENT>
|
356
|
-
<option name="myItemId" value="script_executor" />
|
357
|
-
<option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.ProjectViewProjectNode" />
|
358
|
-
</PATH_ELEMENT>
|
359
|
-
<PATH_ELEMENT>
|
360
|
-
<option name="myItemId" value="script_executor" />
|
361
|
-
<option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
|
362
|
-
</PATH_ELEMENT>
|
363
|
-
<PATH_ELEMENT>
|
364
|
-
<option name="myItemId" value="spec" />
|
365
|
-
<option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
|
366
|
-
</PATH_ELEMENT>
|
367
|
-
</PATH>
|
368
352
|
<PATH>
|
369
353
|
<PATH_ELEMENT>
|
370
354
|
<option name="myItemId" value="script_executor" />
|
@@ -399,6 +383,7 @@
|
|
399
383
|
</PATH>
|
400
384
|
</subPane>
|
401
385
|
</pane>
|
386
|
+
<pane id="Scope" />
|
402
387
|
</panes>
|
403
388
|
</component>
|
404
389
|
<component name="PropertiesComponent">
|
@@ -675,11 +660,11 @@
|
|
675
660
|
<frame x="262" y="33" width="1613" height="1087" extended-state="0" />
|
676
661
|
<editor active="true" />
|
677
662
|
<layout>
|
678
|
-
<window_info id="Changes" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="true" weight="0.
|
663
|
+
<window_info id="Changes" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="true" weight="0.3608871" sideWeight="0.9955329" order="7" side_tool="false" content_ui="tabs" />
|
679
664
|
<window_info id="TODO" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" sideWeight="0.5" order="6" side_tool="false" content_ui="tabs" />
|
680
665
|
<window_info id="Database" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" sideWeight="0.5" order="3" side_tool="false" content_ui="tabs" />
|
681
666
|
<window_info id="Structure" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.25" sideWeight="0.5" order="1" side_tool="true" content_ui="tabs" />
|
682
|
-
<window_info id="Project" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="true" weight="0.
|
667
|
+
<window_info id="Project" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="true" weight="0.25015953" sideWeight="0.6391129" order="0" side_tool="false" content_ui="combo" />
|
683
668
|
<window_info id="Debug" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.3979798" sideWeight="0.5" order="3" side_tool="false" content_ui="tabs" />
|
684
669
|
<window_info id="Favorites" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" sideWeight="0.5" order="2" side_tool="true" content_ui="tabs" />
|
685
670
|
<window_info id="Event Log" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" sideWeight="0.5" order="7" side_tool="true" content_ui="tabs" />
|
@@ -795,9 +780,7 @@
|
|
795
780
|
</entry>
|
796
781
|
<entry file="file://$PROJECT_DIR$/spec/script_locator_spec.rb">
|
797
782
|
<provider selected="true" editor-type-id="text-editor">
|
798
|
-
<state line="22" column="67" selection-start="475" selection-end="475" vertical-scroll-proportion="0.0"
|
799
|
-
<folding />
|
800
|
-
</state>
|
783
|
+
<state line="22" column="67" selection-start="475" selection-end="475" vertical-scroll-proportion="0.0" />
|
801
784
|
</provider>
|
802
785
|
</entry>
|
803
786
|
<entry file="file://$PROJECT_DIR$/Rakefile">
|
@@ -819,44 +802,44 @@
|
|
819
802
|
</state>
|
820
803
|
</provider>
|
821
804
|
</entry>
|
822
|
-
<entry file="file://$PROJECT_DIR
|
805
|
+
<entry file="file://$PROJECT_DIR$/lib/script_executor/output_buffer.rb">
|
823
806
|
<provider selected="true" editor-type-id="text-editor">
|
824
|
-
<state line="
|
807
|
+
<state line="7" column="10" selection-start="93" selection-end="93" vertical-scroll-proportion="0.0">
|
825
808
|
<folding />
|
826
809
|
</state>
|
827
810
|
</provider>
|
828
811
|
</entry>
|
829
|
-
<entry file="file://$PROJECT_DIR$/
|
812
|
+
<entry file="file://$PROJECT_DIR$/spec/executable_spec.rb">
|
830
813
|
<provider selected="true" editor-type-id="text-editor">
|
831
|
-
<state line="
|
814
|
+
<state line="88" column="127" selection-start="2079" selection-end="2079" vertical-scroll-proportion="0.0">
|
832
815
|
<folding />
|
833
816
|
</state>
|
834
817
|
</provider>
|
835
818
|
</entry>
|
836
|
-
<entry file="file://$PROJECT_DIR
|
819
|
+
<entry file="file://$PROJECT_DIR$/.rvmrc">
|
837
820
|
<provider selected="true" editor-type-id="text-editor">
|
838
|
-
<state line="
|
821
|
+
<state line="4" column="11" selection-start="98" selection-end="98" vertical-scroll-proportion="0.0">
|
839
822
|
<folding />
|
840
823
|
</state>
|
841
824
|
</provider>
|
842
825
|
</entry>
|
843
826
|
<entry file="file://$PROJECT_DIR$/lib/script_executor/executable.rb">
|
844
827
|
<provider selected="true" editor-type-id="text-editor">
|
845
|
-
<state line="
|
828
|
+
<state line="51" column="7" selection-start="0" selection-end="4368" vertical-scroll-proportion="0.0">
|
846
829
|
<folding />
|
847
830
|
</state>
|
848
831
|
</provider>
|
849
832
|
</entry>
|
850
|
-
<entry file="file://$PROJECT_DIR$/
|
833
|
+
<entry file="file://$PROJECT_DIR$/lib/script_executor/version.rb">
|
851
834
|
<provider selected="true" editor-type-id="text-editor">
|
852
|
-
<state line="
|
835
|
+
<state line="1" column="18" selection-start="40" selection-end="40" vertical-scroll-proportion="0.0">
|
853
836
|
<folding />
|
854
837
|
</state>
|
855
838
|
</provider>
|
856
839
|
</entry>
|
857
840
|
<entry file="file://$PROJECT_DIR$/CHANGES">
|
858
841
|
<provider selected="true" editor-type-id="text-editor">
|
859
|
-
<state line="
|
842
|
+
<state line="31" column="51" selection-start="425" selection-end="425" vertical-scroll-proportion="0.81848186">
|
860
843
|
<folding />
|
861
844
|
</state>
|
862
845
|
</provider>
|
data/CHANGES
CHANGED
@@ -5,8 +5,8 @@ require 'script_executor/output_buffer'
|
|
5
5
|
|
6
6
|
module Executable
|
7
7
|
|
8
|
-
def
|
9
|
-
@output
|
8
|
+
def output
|
9
|
+
@output ||= $stdout
|
10
10
|
end
|
11
11
|
|
12
12
|
def execute params={}, &code
|
@@ -21,7 +21,7 @@ module Executable
|
|
21
21
|
commands = locate_commands script, &code
|
22
22
|
|
23
23
|
if commands.nil?
|
24
|
-
|
24
|
+
output.puts "No commands were provided!"
|
25
25
|
return
|
26
26
|
end
|
27
27
|
|
@@ -59,27 +59,27 @@ module Executable
|
|
59
59
|
ssh_command = ssh_command(domain, user, identity_file)
|
60
60
|
|
61
61
|
if simulate
|
62
|
-
|
63
|
-
|
62
|
+
output.puts "Remote script: '#{ssh_command}'"
|
63
|
+
output.puts "-------"
|
64
64
|
print_commands commands
|
65
|
-
|
65
|
+
output.puts "-------"
|
66
66
|
else
|
67
|
-
|
68
|
-
|
67
|
+
output.puts "Remote execution on: '#{ssh_command}'"
|
68
|
+
output.puts "-------"
|
69
69
|
print_commands commands
|
70
|
-
|
70
|
+
output.puts "-------"
|
71
71
|
end
|
72
72
|
else
|
73
73
|
if simulate
|
74
|
-
|
75
|
-
|
74
|
+
output.puts "Script:"
|
75
|
+
output.puts "-------"
|
76
76
|
print_commands commands
|
77
|
-
|
77
|
+
output.puts "-------"
|
78
78
|
else
|
79
|
-
|
80
|
-
|
79
|
+
output.puts "Local execution:"
|
80
|
+
output.puts "-------"
|
81
81
|
print_commands(commands)
|
82
|
-
|
82
|
+
output.puts "-------"
|
83
83
|
end
|
84
84
|
end
|
85
85
|
end
|
@@ -88,7 +88,7 @@ module Executable
|
|
88
88
|
lines = StringIO.new commands
|
89
89
|
|
90
90
|
lines.each_line do |line|
|
91
|
-
|
91
|
+
output.puts line
|
92
92
|
end
|
93
93
|
end
|
94
94
|
|
@@ -97,7 +97,7 @@ module Executable
|
|
97
97
|
|
98
98
|
IO.popen(commands) do |pipe|
|
99
99
|
pipe.each("\r") do |line|
|
100
|
-
|
100
|
+
output.print(line) unless suppress_output
|
101
101
|
|
102
102
|
storage.save(line.chomp) if storage
|
103
103
|
|
@@ -122,7 +122,7 @@ module Executable
|
|
122
122
|
channel.request_pty # <- problem must be here.
|
123
123
|
channel.send_data password + "\n"
|
124
124
|
else
|
125
|
-
|
125
|
+
output.print(line) unless suppress_output
|
126
126
|
|
127
127
|
storage.save(line.chomp) if storage
|
128
128
|
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: script_executor
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.3.
|
4
|
+
version: 1.3.2
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2013-02-
|
12
|
+
date: 2013-02-20 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: highline
|