script_executor 1.3.4 → 1.3.5

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,15 +1,15 @@
1
1
  ---
2
2
  !binary "U0hBMQ==":
3
3
  metadata.gz: !binary |-
4
- NzM4NGFhNjBhZmIxMjU2ZTc4MWFjMjBmMDk5MWJjYWQ2ZjM5ZmFkMA==
4
+ MDgwMTRiNTUwZmRmZDdhNmQzMTE0MDdjN2Q0Njc0Y2ZlMWU3MWRmMQ==
5
5
  data.tar.gz: !binary |-
6
- Njk5MGUzMDNhZTQzYzdiYTk4ZDI2OTMyNWM4NGU1ZThlZmZiZDIxZQ==
6
+ M2E4ODI0YWU3MGU5Zjg5OWYyYjU4MTFkNTYzNTE4NmZmMzhkZjZhZQ==
7
7
  !binary "U0hBNTEy":
8
8
  metadata.gz: !binary |-
9
- MTU2ZTEyNDhhZDM1ODczMzRjYjA2NWQwNWJiMmZlMmNmYjVlNGI3MjJmYTMz
10
- NTNjMTJhZTg5MGZkMTNhOGJiZjlkY2EyMzdjYzQwZDVjOWJmOWQxZWJmNWYw
11
- YjgyYzIyODkzMWY2ODcyZTZhZDhjYmQ1ZGE3NGMxNTZiOTk5ZDY=
9
+ YjY3ODA0OTg0NTYwNjA3ZWJkNjEzZmI1ZjE2NWE2MTE5Yzk0MTM4Y2JjNWZk
10
+ YjM0NDJhZjNjMjc4Mjc5ZjRjNjFjNjYzOTFhZTI4NWYyNTFiNzUzNmFlMGQz
11
+ MzJmNzFlMGQ2ZTM0NTYzNDNlNDllZTIwZDFiNzFjYjg4NzIwNzk=
12
12
  data.tar.gz: !binary |-
13
- YmNlZTQ0ODU4ODI0Y2MzYmU2NTBiOGNiOGYyZWUzMDgyMDA2M2NmZmFlODNj
14
- ZDNmZmNkYmE1NDlmMTMwMzdiMzVhNzMzYzcwODE0YmQ1YmRiMGQwNTg0NGJh
15
- Y2JjYmYwY2E0OWM1NThjNDY3YWE5ZTIyNGVjMWI4ZjUyODk5Njk=
13
+ Y2Q4YzBkNWU1OTliNTQ2NGY4ZTU2YWFjMjdiYjVkMzdmMjZhMzEwM2ExZjNm
14
+ YmRiNDA2NDg2YjJkYWU3NzYwOTA3NzU4MjA5Zjg1MDE2ZWM3YTlhNmRkMTdh
15
+ MWFhMTc0Y2Y2YzYyMGI2ODNiZmZkNzU3MDg0MzdmYTI0ODY2M2Q=
data/.idea/workspace.xml CHANGED
@@ -32,19 +32,46 @@
32
32
  <file leaf-file-name="executable.rb" pinned="false" current="false" current-in-tab="false">
33
33
  <entry file="file://$PROJECT_DIR$/lib/script_executor/executable.rb">
34
34
  <provider selected="true" editor-type-id="text-editor">
35
- <state line="17" column="33" selection-start="411" selection-end="411" vertical-scroll-proportion="0.0" vertical-offset="0" max-vertical-offset="1125">
35
+ <state line="14" column="32" selection-start="350" selection-end="350" vertical-scroll-proportion="0.0" vertical-offset="0" max-vertical-offset="1125">
36
36
  <folding />
37
37
  </state>
38
38
  </provider>
39
39
  </entry>
40
40
  </file>
41
- <file leaf-file-name="README.md" pinned="false" current="true" current-in-tab="true">
41
+ <file leaf-file-name="version.rb" pinned="false" current="false" current-in-tab="false">
42
+ <entry file="file://$PROJECT_DIR$/lib/script_executor/version.rb">
43
+ <provider selected="true" editor-type-id="text-editor">
44
+ <state line="1" column="18" selection-start="39" selection-end="39" vertical-scroll-proportion="0.0" vertical-offset="0" max-vertical-offset="120">
45
+ <folding />
46
+ </state>
47
+ </provider>
48
+ </entry>
49
+ </file>
50
+ <file leaf-file-name="CHANGES" pinned="false" current="true" current-in-tab="true">
51
+ <entry file="file://$PROJECT_DIR$/CHANGES">
52
+ <provider selected="true" editor-type-id="text-editor">
53
+ <state line="46" column="26" selection-start="573" selection-end="573" vertical-scroll-proportion="0.9474606" vertical-offset="149" max-vertical-offset="780">
54
+ <folding />
55
+ </state>
56
+ </provider>
57
+ </entry>
58
+ </file>
59
+ <file leaf-file-name="README.md" pinned="false" current="false" current-in-tab="false">
42
60
  <entry file="file://$PROJECT_DIR$/README.md">
43
61
  <provider editor-type-id="MarkdownPreviewEditor">
44
62
  <state />
45
63
  </provider>
46
64
  <provider selected="true" editor-type-id="text-editor">
47
- <state line="11" column="40" selection-start="206" selection-end="206" vertical-scroll-proportion="0.3033088" vertical-offset="0" max-vertical-offset="1920">
65
+ <state line="13" column="12" selection-start="217" selection-end="217" vertical-scroll-proportion="44.296295" vertical-offset="1391" max-vertical-offset="1935">
66
+ <folding />
67
+ </state>
68
+ </provider>
69
+ </entry>
70
+ </file>
71
+ <file leaf-file-name="remote_command.rb" pinned="false" current="false" current-in-tab="false">
72
+ <entry file="file://$PROJECT_DIR$/lib/script_executor/remote_command.rb">
73
+ <provider selected="true" editor-type-id="text-editor">
74
+ <state line="11" column="36" selection-start="312" selection-end="312" vertical-scroll-proportion="-6.3461537" vertical-offset="0" max-vertical-offset="1500">
48
75
  <folding />
49
76
  </state>
50
77
  </provider>
@@ -53,10 +80,8 @@
53
80
  <file leaf-file-name="script_locator_spec.rb" pinned="false" current="false" current-in-tab="false">
54
81
  <entry file="file://$PROJECT_DIR$/spec/script_locator_spec.rb">
55
82
  <provider selected="true" editor-type-id="text-editor">
56
- <state line="7" column="0" selection-start="141" selection-end="141" vertical-scroll-proportion="0.0" vertical-offset="0" max-vertical-offset="660">
57
- <folding>
58
- <element signature="e#524#584#0" expanded="true" />
59
- </folding>
83
+ <state line="7" column="0" selection-start="141" selection-end="141" vertical-scroll-proportion="0.0" vertical-offset="105" max-vertical-offset="660">
84
+ <folding />
60
85
  </state>
61
86
  </provider>
62
87
  </entry>
@@ -73,7 +98,7 @@
73
98
  <file leaf-file-name="executable_spec.rb" pinned="false" current="false" current-in-tab="false">
74
99
  <entry file="file://$PROJECT_DIR$/spec/executable_spec.rb">
75
100
  <provider selected="true" editor-type-id="text-editor">
76
- <state line="55" column="28" selection-start="1235" selection-end="1253" vertical-scroll-proportion="0.0" vertical-offset="866" max-vertical-offset="1470">
101
+ <state line="19" column="123" selection-start="414" selection-end="414" vertical-scroll-proportion="0.0" vertical-offset="750" max-vertical-offset="1470">
77
102
  <folding />
78
103
  </state>
79
104
  </provider>
@@ -111,13 +136,13 @@
111
136
  <option value="$PROJECT_DIR$/lib/script_locator.rb" />
112
137
  <option value="$PROJECT_DIR$/lib/script_executor.rb" />
113
138
  <option value="$PROJECT_DIR$/lib/script_executor/local_command.rb" />
139
+ <option value="$PROJECT_DIR$/spec/executable_spec.rb" />
140
+ <option value="$PROJECT_DIR$/spec/script_locator_spec.rb" />
141
+ <option value="$PROJECT_DIR$/README.md" />
114
142
  <option value="$PROJECT_DIR$/lib/script_executor/remote_command.rb" />
115
143
  <option value="$PROJECT_DIR$/lib/script_executor/executable.rb" />
116
- <option value="$PROJECT_DIR$/spec/executable_spec.rb" />
117
144
  <option value="$PROJECT_DIR$/lib/script_executor/version.rb" />
118
145
  <option value="$PROJECT_DIR$/CHANGES" />
119
- <option value="$PROJECT_DIR$/spec/script_locator_spec.rb" />
120
- <option value="$PROJECT_DIR$/README.md" />
121
146
  </list>
122
147
  </option>
123
148
  </component>
@@ -160,6 +185,46 @@
160
185
  <option name="myItemId" value="script_executor" />
161
186
  <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.ProjectViewProjectNode" />
162
187
  </PATH_ELEMENT>
188
+ <PATH_ELEMENT>
189
+ <option name="myItemId" value="External Libraries" />
190
+ <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.ExternalLibrariesNode" />
191
+ </PATH_ELEMENT>
192
+ </PATH>
193
+ <PATH>
194
+ <PATH_ELEMENT>
195
+ <option name="myItemId" value="script_executor" />
196
+ <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.ProjectViewProjectNode" />
197
+ </PATH_ELEMENT>
198
+ <PATH_ELEMENT>
199
+ <option name="myItemId" value="External Libraries" />
200
+ <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.ExternalLibrariesNode" />
201
+ </PATH_ELEMENT>
202
+ <PATH_ELEMENT>
203
+ <option name="myItemId" value="net-ssh (v2.6.2, RVM: ruby-1.9.3-p484 [script_executor]) [gem]" />
204
+ <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.NamedLibraryElementNode" />
205
+ </PATH_ELEMENT>
206
+ </PATH>
207
+ <PATH>
208
+ <PATH_ELEMENT>
209
+ <option name="myItemId" value="script_executor" />
210
+ <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.ProjectViewProjectNode" />
211
+ </PATH_ELEMENT>
212
+ <PATH_ELEMENT>
213
+ <option name="myItemId" value="External Libraries" />
214
+ <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.ExternalLibrariesNode" />
215
+ </PATH_ELEMENT>
216
+ <PATH_ELEMENT>
217
+ <option name="myItemId" value="net-ssh (v2.6.2, RVM: ruby-1.9.3-p484 [script_executor]) [gem]" />
218
+ <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.NamedLibraryElementNode" />
219
+ </PATH_ELEMENT>
220
+ <PATH_ELEMENT>
221
+ <option name="myItemId" value="lib" />
222
+ <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
223
+ </PATH_ELEMENT>
224
+ <PATH_ELEMENT>
225
+ <option name="myItemId" value="net" />
226
+ <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
227
+ </PATH_ELEMENT>
163
228
  </PATH>
164
229
  <PATH>
165
230
  <PATH_ELEMENT>
@@ -522,10 +587,10 @@
522
587
  </list>
523
588
  <recent_temporary>
524
589
  <list size="5">
525
- <item index="0" class="java.lang.String" itemvalue="RSpec.script_locator_spec" />
526
- <item index="1" class="java.lang.String" itemvalue="RSpec.MyExecutable local execution should execute commands locally from :script parameter: script_executor" />
527
- <item index="2" class="java.lang.String" itemvalue="RSpec.MyExecutable remote execution should execute commands from :script parameter" />
528
- <item index="3" class="java.lang.String" itemvalue="RSpec.executable_spec" />
590
+ <item index="0" class="java.lang.String" itemvalue="RSpec.MyExecutable local execution should execute commands locally from :script parameter: script_executor" />
591
+ <item index="1" class="java.lang.String" itemvalue="RSpec.MyExecutable remote execution should execute commands from :script parameter" />
592
+ <item index="2" class="java.lang.String" itemvalue="RSpec.executable_spec" />
593
+ <item index="3" class="java.lang.String" itemvalue="RSpec.script_locator_spec" />
529
594
  <item index="4" class="java.lang.String" itemvalue="RSpec.ScriptExecutor should execute commands locally from the block of code as sudo" />
530
595
  </list>
531
596
  </recent_temporary>
@@ -554,12 +619,11 @@
554
619
  </component>
555
620
  <component name="ToolWindowManager">
556
621
  <frame x="44" y="22" width="1636" height="1028" extended-state="6" />
557
- <editor active="false" />
622
+ <editor active="true" />
558
623
  <layout>
559
624
  <window_info id="Dilbert" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" sideWeight="0.5" order="0" side_tool="false" content_ui="tabs" />
560
- <window_info id="Changes" active="true" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="true" weight="0.357985" sideWeight="0.9955329" order="7" side_tool="false" content_ui="tabs" />
625
+ <window_info id="Changes" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="true" weight="0.357985" sideWeight="0.9955329" order="7" side_tool="false" content_ui="tabs" />
561
626
  <window_info id="Terminal" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" sideWeight="0.5" order="8" side_tool="false" content_ui="tabs" />
562
- <window_info id="Find" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.32929292" sideWeight="0.5" order="1" side_tool="false" content_ui="tabs" />
563
627
  <window_info id="Heroku" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" sideWeight="0.5" order="8" side_tool="false" content_ui="tabs" />
564
628
  <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" />
565
629
  <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" />
@@ -569,14 +633,15 @@
569
633
  <window_info id="Messages" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.32925683" sideWeight="0.5" order="7" side_tool="false" content_ui="tabs" />
570
634
  <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" />
571
635
  <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" />
572
- <window_info id="Project" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="true" weight="0.29736513" sideWeight="0.64040405" order="0" side_tool="false" content_ui="combo" />
636
+ <window_info id="Project" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="true" weight="0.30865747" sideWeight="0.64040405" order="0" side_tool="false" content_ui="combo" />
573
637
  <window_info id="Run" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.3226152" sideWeight="0.5" order="2" side_tool="false" content_ui="tabs" />
574
638
  <window_info id="Cvs" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.25" sideWeight="0.5" order="4" side_tool="false" content_ui="tabs" />
575
639
  <window_info id="Message" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" sideWeight="0.5" order="0" side_tool="false" content_ui="tabs" />
576
640
  <window_info id="Ant Build" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.25" sideWeight="0.5" order="1" side_tool="false" content_ui="tabs" />
641
+ <window_info id="Find" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.32929292" sideWeight="0.5" order="1" side_tool="false" content_ui="tabs" />
577
642
  <window_info id="Commander" active="false" anchor="right" auto_hide="false" internal_type="SLIDING" type="SLIDING" visible="false" weight="0.4" sideWeight="0.5" order="0" side_tool="false" content_ui="tabs" />
578
- <window_info id="Hierarchy" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.25" sideWeight="0.5" order="2" side_tool="false" content_ui="combo" />
579
643
  <window_info id="Inspection" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.4" sideWeight="0.5" order="5" side_tool="false" content_ui="tabs" />
644
+ <window_info id="Hierarchy" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.25" sideWeight="0.5" order="2" side_tool="false" content_ui="combo" />
580
645
  <window_info id="LuaJ" active="false" anchor="right" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" sideWeight="0.5" order="4" side_tool="false" content_ui="tabs" />
581
646
  </layout>
582
647
  </component>
@@ -595,7 +660,8 @@
595
660
  <MESSAGE value="bug fixes" />
596
661
  <MESSAGE value="internal refactoring" />
597
662
  <MESSAGE value="internal refactoring&#10;" />
598
- <option name="LAST_COMMIT_MESSAGE" value="internal refactoring&#10;" />
663
+ <MESSAGE value="adding port as parameter" />
664
+ <option name="LAST_COMMIT_MESSAGE" value="adding port as parameter" />
599
665
  </component>
600
666
  <component name="XDebuggerManager">
601
667
  <breakpoint-manager>
@@ -613,13 +679,6 @@
613
679
  </breakpoint-manager>
614
680
  </component>
615
681
  <component name="editorHistoryManager">
616
- <entry file="file://$PROJECT_DIR$/lib/script_executor/executable.rb">
617
- <provider selected="true" editor-type-id="text-editor">
618
- <state line="4" column="61" selection-start="78" selection-end="78" vertical-scroll-proportion="0.0" vertical-offset="60" max-vertical-offset="3465">
619
- <folding />
620
- </state>
621
- </provider>
622
- </entry>
623
682
  <entry file="file://$PROJECT_DIR$/.ruby-gemset">
624
683
  <provider selected="true" editor-type-id="text-editor">
625
684
  <state line="0" column="25" selection-start="15" selection-end="15" vertical-scroll-proportion="0.0" vertical-offset="0" max-vertical-offset="90" />
@@ -632,9 +691,7 @@
632
691
  </entry>
633
692
  <entry file="file://$PROJECT_DIR$/lib/script_executor/version.rb">
634
693
  <provider selected="true" editor-type-id="text-editor">
635
- <state line="0" column="0" selection-start="0" selection-end="44" vertical-scroll-proportion="0.0" vertical-offset="0" max-vertical-offset="120">
636
- <folding />
637
- </state>
694
+ <state line="0" column="0" selection-start="0" selection-end="44" vertical-scroll-proportion="0.0" vertical-offset="0" max-vertical-offset="120" />
638
695
  </provider>
639
696
  </entry>
640
697
  <entry file="file://$PROJECT_DIR$/spec/spec_helper.rb">
@@ -681,9 +738,7 @@
681
738
  </entry>
682
739
  <entry file="file://$PROJECT_DIR$/lib/script_executor/version.rb">
683
740
  <provider selected="true" editor-type-id="text-editor">
684
- <state line="0" column="0" selection-start="0" selection-end="44" vertical-scroll-proportion="0.0" vertical-offset="0" max-vertical-offset="120">
685
- <folding />
686
- </state>
741
+ <state line="0" column="0" selection-start="0" selection-end="44" vertical-scroll-proportion="0.0" vertical-offset="0" max-vertical-offset="120" />
687
742
  </provider>
688
743
  </entry>
689
744
  <entry file="file://$PROJECT_DIR$/spec/spec_helper.rb">
@@ -730,9 +785,7 @@
730
785
  </entry>
731
786
  <entry file="file://$PROJECT_DIR$/lib/script_executor/version.rb">
732
787
  <provider selected="true" editor-type-id="text-editor">
733
- <state line="0" column="0" selection-start="0" selection-end="44" vertical-scroll-proportion="0.0" vertical-offset="0" max-vertical-offset="128">
734
- <folding />
735
- </state>
788
+ <state line="0" column="0" selection-start="0" selection-end="44" vertical-scroll-proportion="0.0" vertical-offset="0" max-vertical-offset="128" />
736
789
  </provider>
737
790
  </entry>
738
791
  <entry file="file://$PROJECT_DIR$/spec/spec_helper.rb">
@@ -827,82 +880,81 @@
827
880
  </entry>
828
881
  <entry file="file://$PROJECT_DIR$/lib/script_executor/output_buffer.rb">
829
882
  <provider selected="true" editor-type-id="text-editor">
830
- <state line="0" column="0" selection-start="0" selection-end="0" vertical-scroll-proportion="0.0" vertical-offset="0" max-vertical-offset="602">
831
- <folding />
832
- </state>
883
+ <state line="0" column="0" selection-start="0" selection-end="0" vertical-scroll-proportion="0.0" vertical-offset="0" max-vertical-offset="602" />
833
884
  </provider>
834
885
  </entry>
835
886
  <entry file="file://$PROJECT_DIR$/lib/script_executor/local_command.rb">
836
887
  <provider selected="true" editor-type-id="text-editor">
837
- <state line="21" column="0" selection-start="576" selection-end="576" vertical-scroll-proportion="0.0" vertical-offset="154" max-vertical-offset="1260">
838
- <folding />
839
- </state>
888
+ <state line="21" column="0" selection-start="576" selection-end="576" vertical-scroll-proportion="0.0" vertical-offset="154" max-vertical-offset="1260" />
840
889
  </provider>
841
890
  </entry>
842
- <entry file="file://$PROJECT_DIR$/lib/script_executor/remote_command.rb">
891
+ <entry file="file://$PROJECT_DIR$/lib/script_executor/script_executor.rb">
843
892
  <provider selected="true" editor-type-id="text-editor">
844
- <state line="12" column="21" selection-start="381" selection-end="381" vertical-scroll-proportion="0.0" vertical-offset="0" max-vertical-offset="1455">
893
+ <state line="0" column="0" selection-start="0" selection-end="0" vertical-scroll-proportion="0.0" vertical-offset="0" max-vertical-offset="195" />
894
+ </provider>
895
+ </entry>
896
+ <entry file="file://$PROJECT_DIR$/lib/script_executor/script_locator.rb">
897
+ <provider selected="true" editor-type-id="text-editor">
898
+ <state line="0" column="0" selection-start="0" selection-end="0" vertical-scroll-proportion="0.0" vertical-offset="30" max-vertical-offset="855">
845
899
  <folding />
846
900
  </state>
847
901
  </provider>
848
902
  </entry>
849
- <entry file="file://$PROJECT_DIR$/lib/script_executor/version.rb">
903
+ <entry file="file://$PROJECT_DIR$/spec/script_locator_spec.rb">
850
904
  <provider selected="true" editor-type-id="text-editor">
851
- <state line="1" column="18" selection-start="39" selection-end="39" vertical-scroll-proportion="0.0" vertical-offset="0" max-vertical-offset="120">
905
+ <state line="7" column="0" selection-start="141" selection-end="141" vertical-scroll-proportion="0.0" vertical-offset="0" max-vertical-offset="660">
852
906
  <folding />
853
907
  </state>
854
908
  </provider>
855
909
  </entry>
856
- <entry file="file://$PROJECT_DIR$/CHANGES">
910
+ <entry file="file://$PROJECT_DIR$/README.md">
911
+ <provider editor-type-id="MarkdownPreviewEditor">
912
+ <state />
913
+ </provider>
857
914
  <provider selected="true" editor-type-id="text-editor">
858
- <state line="0" column="27" selection-start="27" selection-end="27" vertical-scroll-proportion="0.0" vertical-offset="0" max-vertical-offset="720">
915
+ <state line="13" column="12" selection-start="217" selection-end="217" vertical-scroll-proportion="44.296295" vertical-offset="1391" max-vertical-offset="1935">
859
916
  <folding />
860
917
  </state>
861
918
  </provider>
862
919
  </entry>
863
- <entry file="file://$PROJECT_DIR$/lib/script_executor/script_executor.rb">
920
+ <entry file="file://$USER_HOME$/.rvm/gems/ruby-1.9.3-p484@script_executor/gems/net-ssh-2.6.2/lib/net/ssh.rb">
864
921
  <provider selected="true" editor-type-id="text-editor">
865
- <state line="0" column="0" selection-start="0" selection-end="0" vertical-scroll-proportion="0.0" vertical-offset="0" max-vertical-offset="195">
922
+ <state line="158" column="13" selection-start="8062" selection-end="8062" vertical-scroll-proportion="0.33274958" vertical-offset="2180" max-vertical-offset="3450">
866
923
  <folding />
867
924
  </state>
868
925
  </provider>
869
926
  </entry>
870
- <entry file="file://$PROJECT_DIR$/lib/script_executor/executable.rb">
927
+ <entry file="file://$PROJECT_DIR$/spec/executable_spec.rb">
871
928
  <provider selected="true" editor-type-id="text-editor">
872
- <state line="17" column="33" selection-start="411" selection-end="411" vertical-scroll-proportion="0.0" vertical-offset="0" max-vertical-offset="1125">
929
+ <state line="19" column="123" selection-start="414" selection-end="414" vertical-scroll-proportion="0.0" vertical-offset="0" max-vertical-offset="1470">
873
930
  <folding />
874
931
  </state>
875
932
  </provider>
876
933
  </entry>
877
- <entry file="file://$PROJECT_DIR$/lib/script_executor/script_locator.rb">
934
+ <entry file="file://$PROJECT_DIR$/lib/script_executor/remote_command.rb">
878
935
  <provider selected="true" editor-type-id="text-editor">
879
- <state line="0" column="0" selection-start="0" selection-end="0" vertical-scroll-proportion="0.0" vertical-offset="30" max-vertical-offset="855">
936
+ <state line="11" column="36" selection-start="312" selection-end="312" vertical-scroll-proportion="-6.3461537" vertical-offset="0" max-vertical-offset="1500">
880
937
  <folding />
881
938
  </state>
882
939
  </provider>
883
940
  </entry>
884
- <entry file="file://$PROJECT_DIR$/spec/executable_spec.rb">
941
+ <entry file="file://$PROJECT_DIR$/lib/script_executor/executable.rb">
885
942
  <provider selected="true" editor-type-id="text-editor">
886
- <state line="55" column="28" selection-start="1235" selection-end="1253" vertical-scroll-proportion="0.0" vertical-offset="615" max-vertical-offset="1470">
943
+ <state line="14" column="32" selection-start="350" selection-end="350" vertical-scroll-proportion="0.0" vertical-offset="0" max-vertical-offset="1125">
887
944
  <folding />
888
945
  </state>
889
946
  </provider>
890
947
  </entry>
891
- <entry file="file://$PROJECT_DIR$/spec/script_locator_spec.rb">
948
+ <entry file="file://$PROJECT_DIR$/lib/script_executor/version.rb">
892
949
  <provider selected="true" editor-type-id="text-editor">
893
- <state line="7" column="0" selection-start="141" selection-end="141" vertical-scroll-proportion="0.0" vertical-offset="0" max-vertical-offset="660">
894
- <folding>
895
- <element signature="e#524#584#0" expanded="true" />
896
- </folding>
950
+ <state line="1" column="18" selection-start="39" selection-end="39" vertical-scroll-proportion="0.0" vertical-offset="0" max-vertical-offset="120">
951
+ <folding />
897
952
  </state>
898
953
  </provider>
899
954
  </entry>
900
- <entry file="file://$PROJECT_DIR$/README.md">
901
- <provider editor-type-id="MarkdownPreviewEditor">
902
- <state />
903
- </provider>
955
+ <entry file="file://$PROJECT_DIR$/CHANGES">
904
956
  <provider selected="true" editor-type-id="text-editor">
905
- <state line="11" column="40" selection-start="206" selection-end="206" vertical-scroll-proportion="0.3033088" vertical-offset="0" max-vertical-offset="1920">
957
+ <state line="46" column="26" selection-start="573" selection-end="573" vertical-scroll-proportion="0.9474606" vertical-offset="149" max-vertical-offset="780">
906
958
  <folding />
907
959
  </state>
908
960
  </provider>
data/CHANGES CHANGED
@@ -40,4 +40,8 @@
40
40
 
41
41
  == Version 1.3.4
42
42
 
43
- * Internal refactoring.
43
+ * Internal refactoring.
44
+
45
+ == Version 1.3.5
46
+
47
+ * Adding port as parameter.
data/README.md CHANGED
@@ -37,8 +37,9 @@ executor.execute "ls"
37
37
  ```ruby
38
38
  server_info = {
39
39
  :remote => true,
40
- :domain => "some.host",
41
- :user => "some.user",
40
+ :domain => "some_host",
41
+ :user => "some_user",
42
+ :password => "some_password"
42
43
  }
43
44
 
44
45
  executor.execute server_info.merge(:script => "ls -al")
@@ -9,7 +9,7 @@ module Executable
9
9
  params = {}
10
10
  script = simple_commands
11
11
  else
12
- script = params[:script]
12
+ script = params.delete(:script)
13
13
  end
14
14
 
15
15
  commands = locate_commands script, &code
@@ -3,16 +3,17 @@ require 'net/ssh'
3
3
  require "highline"
4
4
 
5
5
  class RemoteCommand
6
- attr_reader :domain, :user, :password, :identity_file, :suppress_output, :capture_output, :simulate
6
+ attr_reader :host, :user, :options, :suppress_output, :capture_output, :simulate
7
7
 
8
8
  def initialize params
9
- @domain = params[:domain]
10
- @user = params[:user]
11
- @password = params[:password]
12
- @identity_file = params[:identity_file]
13
- @suppress_output = params[:suppress_output]
14
- @capture_output = params[:capture_output]
15
- @simulate = params[:simulate]
9
+ @host = params.delete(:domain)
10
+ @user = params.delete(:user)
11
+
12
+ @suppress_output = params.delete(:suppress_output)
13
+ @capture_output = params.delete(:capture_output)
14
+ @simulate = params.delete(:simulate)
15
+
16
+ @options = params
16
17
  end
17
18
 
18
19
  def execute commands, line_action
@@ -22,9 +23,9 @@ class RemoteCommand
22
23
  storage = capture_output ? OutputBuffer.new : nil
23
24
  output = suppress_output ? nil : $stdout
24
25
 
25
- password = HighLine.new.ask("Enter password for #{user}: ") { |q| q.echo = '*' } if @password.nil?
26
+ options[password] = HighLine.new.ask("Enter password for #{options[:user]}: ") { |q| q.echo = '*' } if options[:password].nil?
26
27
 
27
- Net::SSH.start(domain, user, :password => password) do |session|
28
+ Net::SSH.start(host, user, options) do |session|
28
29
  session.exec(commands) do |channel, _, line|
29
30
  if ask_password?(line)
30
31
  channel.request_pty
@@ -47,7 +48,7 @@ class RemoteCommand
47
48
  private
48
49
 
49
50
  def print commands, output
50
- ssh_command = ssh_command(domain, user, identity_file)
51
+ ssh_command = ssh_command(host, options)
51
52
 
52
53
  if simulate
53
54
  output.puts "Remote script: '#{ssh_command}'"
@@ -74,10 +75,12 @@ class RemoteCommand
74
75
  end
75
76
  end
76
77
 
77
- def ssh_command domain, user, identity_file
78
- cmd = user.nil? ? domain : "#{user}@#{domain}"
78
+ def ssh_command host, options
79
+ cmd = options[:user].nil? ? host : "#{options[:user]}@#{host}"
80
+
81
+ cmd << " -i #{options[:identity_file]}" if options[:identity_file]
79
82
 
80
- cmd << " -i #{identity_file}" if identity_file
83
+ cmd << " -p #{options[:port]}" if options[:port]
81
84
 
82
85
  #cmd << " -t -t"
83
86
 
@@ -1,3 +1,3 @@
1
1
  class ScriptExecutor
2
- VERSION = "1.3.4"
2
+ VERSION = "1.3.5"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: script_executor
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.3.4
4
+ version: 1.3.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Alexander Shvets
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2013-12-07 00:00:00.000000000 Z
11
+ date: 2013-12-16 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: highline