script_executor 1.2.1 → 1.3.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
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-p327 [script_executor]" project-jdk-type="RUBY_SDK" />
3
+ <component name="ProjectRootManager" version="2" project-jdk-name="RVM: ruby-1.9.3-p374 [script_executor]" project-jdk-type="RUBY_SDK" />
4
4
  </project>
5
5
 
@@ -13,26 +13,22 @@
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="archive-tar-minitar (v0.5.2, RVM: ruby-1.9.3-p327 [script_executor]) [gem]" level="application" />
17
- <orderEntry type="library" scope="PROVIDED" name="bundler (v1.2.3, RVM: ruby-1.9.3-p327 [script_executor]) [gem]" level="application" />
18
- <orderEntry type="library" scope="PROVIDED" name="columnize (v0.3.6, RVM: ruby-1.9.3-p327 [script_executor]) [gem]" level="application" />
19
- <orderEntry type="library" scope="PROVIDED" name="diff-lcs (v1.1.3, RVM: ruby-1.9.3-p327 [script_executor]) [gem]" level="application" />
20
- <orderEntry type="library" scope="PROVIDED" name="file_utils (v1.0.6, RVM: ruby-1.9.3-p327 [script_executor]) [gem]" level="application" />
21
- <orderEntry type="library" scope="PROVIDED" name="gemcutter (v0.7.1, RVM: ruby-1.9.3-p327 [script_executor]) [gem]" level="application" />
22
- <orderEntry type="library" scope="PROVIDED" name="gemspec_deps_gen (v1.0.5, RVM: ruby-1.9.3-p327 [script_executor]) [gem]" level="application" />
23
- <orderEntry type="library" scope="PROVIDED" name="highline (v1.6.15, RVM: ruby-1.9.3-p327 [script_executor]) [gem]" level="application" />
24
- <orderEntry type="library" scope="PROVIDED" name="linecache19 (v0.5.13, RVM: ruby-1.9.3-p327 [script_executor]) [gem]" level="application" />
25
- <orderEntry type="library" scope="PROVIDED" name="metaclass (v0.0.1, RVM: ruby-1.9.3-p327 [script_executor]) [gem]" level="application" />
26
- <orderEntry type="library" scope="PROVIDED" name="mocha (v0.13.1, RVM: ruby-1.9.3-p327 [script_executor]) [gem]" level="application" />
27
- <orderEntry type="library" scope="PROVIDED" name="net-ssh (v2.6.2, RVM: ruby-1.9.3-p327 [script_executor]) [gem]" level="application" />
28
- <orderEntry type="library" scope="PROVIDED" name="rake (v10.0.3, RVM: ruby-1.9.3-p327 [script_executor]) [gem]" level="application" />
29
- <orderEntry type="library" scope="PROVIDED" name="rspec (v2.12.0, RVM: ruby-1.9.3-p327 [script_executor]) [gem]" level="application" />
30
- <orderEntry type="library" scope="PROVIDED" name="rspec-core (v2.12.2, RVM: ruby-1.9.3-p327 [script_executor]) [gem]" level="application" />
31
- <orderEntry type="library" scope="PROVIDED" name="rspec-expectations (v2.12.1, RVM: ruby-1.9.3-p327 [script_executor]) [gem]" level="application" />
32
- <orderEntry type="library" scope="PROVIDED" name="rspec-mocks (v2.12.0, RVM: ruby-1.9.3-p327 [script_executor]) [gem]" level="application" />
33
- <orderEntry type="library" scope="PROVIDED" name="ruby-debug-base19x (v0.11.30.pre10, RVM: ruby-1.9.3-p327 [script_executor]) [gem]" level="application" />
34
- <orderEntry type="library" scope="PROVIDED" name="ruby-debug-ide (v0.4.17.beta14, RVM: ruby-1.9.3-p327 [script_executor]) [gem]" level="application" />
35
- <orderEntry type="library" scope="PROVIDED" name="ruby_core_source (v0.1.5, RVM: ruby-1.9.3-p327 [script_executor]) [gem]" level="application" />
16
+ <orderEntry type="library" scope="PROVIDED" name="archive-tar-minitar (v0.5.2, RVM: ruby-1.9.3-p374 [script_executor]) [gem]" level="application" />
17
+ <orderEntry type="library" scope="PROVIDED" name="bundler (v1.2.3, RVM: ruby-1.9.3-p374 [script_executor]) [gem]" level="application" />
18
+ <orderEntry type="library" scope="PROVIDED" name="diff-lcs (v1.1.3, RVM: ruby-1.9.3-p374 [script_executor]) [gem]" level="application" />
19
+ <orderEntry type="library" scope="PROVIDED" name="file_utils (v1.0.6, RVM: ruby-1.9.3-p374 [script_executor]) [gem]" level="application" />
20
+ <orderEntry type="library" scope="PROVIDED" name="gemcutter (v0.7.1, RVM: ruby-1.9.3-p374 [script_executor]) [gem]" level="application" />
21
+ <orderEntry type="library" scope="PROVIDED" name="gemspec_deps_gen (v1.0.5, RVM: ruby-1.9.3-p374 [script_executor]) [gem]" level="application" />
22
+ <orderEntry type="library" scope="PROVIDED" name="highline (v1.6.15, RVM: ruby-1.9.3-p374 [script_executor]) [gem]" level="application" />
23
+ <orderEntry type="library" scope="PROVIDED" name="metaclass (v0.0.1, RVM: ruby-1.9.3-p374 [script_executor]) [gem]" level="application" />
24
+ <orderEntry type="library" scope="PROVIDED" name="mocha (v0.13.1, RVM: ruby-1.9.3-p374 [script_executor]) [gem]" level="application" />
25
+ <orderEntry type="library" scope="PROVIDED" name="net-ssh (v2.6.2, RVM: ruby-1.9.3-p374 [script_executor]) [gem]" level="application" />
26
+ <orderEntry type="library" scope="PROVIDED" name="rake (v10.0.3, RVM: ruby-1.9.3-p374 [script_executor]) [gem]" level="application" />
27
+ <orderEntry type="library" scope="PROVIDED" name="rspec (v2.12.0, RVM: ruby-1.9.3-p374 [script_executor]) [gem]" level="application" />
28
+ <orderEntry type="library" scope="PROVIDED" name="rspec-core (v2.12.2, RVM: ruby-1.9.3-p374 [script_executor]) [gem]" level="application" />
29
+ <orderEntry type="library" scope="PROVIDED" name="rspec-expectations (v2.12.1, RVM: ruby-1.9.3-p374 [script_executor]) [gem]" level="application" />
30
+ <orderEntry type="library" scope="PROVIDED" name="rspec-mocks (v2.12.0, RVM: ruby-1.9.3-p374 [script_executor]) [gem]" level="application" />
31
+ <orderEntry type="library" scope="PROVIDED" name="ruby_core_source (v0.1.5, RVM: ruby-1.9.3-p374 [script_executor]) [gem]" level="application" />
36
32
  </component>
37
33
  </module>
38
34
 
data/.idea/workspace.xml CHANGED
@@ -2,15 +2,20 @@
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="NEW" beforePath="" afterPath="$PROJECT_DIR$/lib/script_executor/output_buffer.rb" />
5
6
  <change type="MODIFICATION" beforePath="$PROJECT_DIR$/CHANGES" afterPath="$PROJECT_DIR$/CHANGES" />
6
- <change type="MODIFICATION" beforePath="$PROJECT_DIR$/lib/script_executor/script_locator.rb" afterPath="$PROJECT_DIR$/lib/script_executor/script_locator.rb" />
7
- <change type="MODIFICATION" beforePath="$PROJECT_DIR$/spec/script_locator_spec.rb" afterPath="$PROJECT_DIR$/spec/script_locator_spec.rb" />
7
+ <change type="MODIFICATION" beforePath="$PROJECT_DIR$/Gemfile.lock" afterPath="$PROJECT_DIR$/Gemfile.lock" />
8
+ <change type="MODIFICATION" beforePath="$PROJECT_DIR$/Gemfile" afterPath="$PROJECT_DIR$/Gemfile" />
9
+ <change type="MODIFICATION" beforePath="$PROJECT_DIR$/lib/script_executor/executable.rb" afterPath="$PROJECT_DIR$/lib/script_executor/executable.rb" />
10
+ <change type="MODIFICATION" beforePath="$PROJECT_DIR$/spec/executable_spec.rb" afterPath="$PROJECT_DIR$/spec/executable_spec.rb" />
11
+ <change type="MODIFICATION" beforePath="$PROJECT_DIR$/.idea/misc.xml" afterPath="$PROJECT_DIR$/.idea/misc.xml" />
12
+ <change type="MODIFICATION" beforePath="$PROJECT_DIR$/.idea/script_executor.iml" afterPath="$PROJECT_DIR$/.idea/script_executor.iml" />
8
13
  <change type="MODIFICATION" beforePath="$PROJECT_DIR$/lib/script_executor/version.rb" afterPath="$PROJECT_DIR$/lib/script_executor/version.rb" />
9
14
  <change type="MODIFICATION" beforePath="$PROJECT_DIR$/.idea/workspace.xml" afterPath="$PROJECT_DIR$/.idea/workspace.xml" />
10
15
  </list>
11
16
  <ignored path="script_executor.iws" />
12
17
  <ignored path=".idea/workspace.xml" />
13
- <file path="/Dummy.txt" changelist="6995392e-f204-4557-be32-fd20f300d877" time="1356118530293" ignored="false" />
18
+ <file path="/Dummy.txt" changelist="6995392e-f204-4557-be32-fd20f300d877" time="1360087073170" ignored="false" />
14
19
  <file path="/Gemfile" changelist="6995392e-f204-4557-be32-fd20f300d877" time="1355437179953" ignored="false" />
15
20
  <file path="/script_executor_spec.rb" changelist="6995392e-f204-4557-be32-fd20f300d877" time="1355762516678" ignored="false" />
16
21
  <file path="$PROJECT_DIR$/../../ui/src/thor/oracle_client.thor" changelist="6995392e-f204-4557-be32-fd20f300d877" time="1355417447890" ignored="false" />
@@ -63,7 +68,7 @@
63
68
  <file path="$PROJECT_DIR$/../../ui/src/Gemfile" changelist="6995392e-f204-4557-be32-fd20f300d877" time="1355507081269" ignored="false" />
64
69
  <file path="/fragment.rb" changelist="6995392e-f204-4557-be32-fd20f300d877" time="1355433500821" ignored="false" />
65
70
  <file path="/script_executor.rb" changelist="6995392e-f204-4557-be32-fd20f300d877" time="1355762503911" ignored="false" />
66
- <file path="/CHANGES" changelist="6995392e-f204-4557-be32-fd20f300d877" time="1356118598805" ignored="false" />
71
+ <file path="/CHANGES" changelist="6995392e-f204-4557-be32-fd20f300d877" time="1360095742407" ignored="false" />
67
72
  <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" />
68
73
  <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" />
69
74
  <file path="$PROJECT_DIR$/../../ui/src/bin/install_oracle_client.sh" changelist="6995392e-f204-4557-be32-fd20f300d877" time="1355179739279" ignored="false" />
@@ -80,7 +85,7 @@
80
85
  <file path="$USER_HOME$/.rvm/gems/ruby-1.8.7-p371@r21/gems/thor-0.16.0/lib/thor/shell.rb" changelist="6995392e-f204-4557-be32-fd20f300d877" time="1355156380308" ignored="false" />
81
86
  <file path="$USER_HOME$/.rvm/gems/ruby-1.8.7-p371@r21/gems/thor-0.16.0/lib/thor/util.rb" changelist="6995392e-f204-4557-be32-fd20f300d877" time="1355156380308" ignored="false" />
82
87
  <file path="$PROJECT_DIR$/../../ui/src/Gemfile.lock" changelist="6995392e-f204-4557-be32-fd20f300d877" time="1355413042305" ignored="false" />
83
- <file path="/a.dummy" changelist="6995392e-f204-4557-be32-fd20f300d877" time="1355522341269" ignored="false" />
88
+ <file path="/a.dummy" changelist="6995392e-f204-4557-be32-fd20f300d877" time="1356125599344" ignored="false" />
84
89
  <file path="$USER_HOME$/.rvm/gems/ruby-1.8.7-p371@r21/gems/nokogiri-1.5.0/lib/nokogiri/xml/processing_instruction.rb" changelist="6995392e-f204-4557-be32-fd20f300d877" time="1355156976039" ignored="false" />
85
90
  <file path="$USER_HOME$/.rvm/gems/ruby-1.8.7-p371@r21/gems/nokogiri-1.5.0/lib/nokogiri/xml/builder.rb" changelist="6995392e-f204-4557-be32-fd20f300d877" time="1355156976039" ignored="false" />
86
91
  <file path="$USER_HOME$/.rvm/gems/ruby-1.8.7-p371@r21/gems/nokogiri-1.5.0/lib/nokogiri/xml/attribute_decl.rb" changelist="6995392e-f204-4557-be32-fd20f300d877" time="1355156976039" ignored="false" />
@@ -115,7 +120,7 @@
115
120
  <file path="$PROJECT_DIR$/../../ui/src/config/dbauth/proteusui-billing-dev" changelist="6995392e-f204-4557-be32-fd20f300d877" time="1355236991453" ignored="false" />
116
121
  <file path="$PROJECT_DIR$/../../ui/src/config/dbauthfiles/proteusui-billing-dev" changelist="6995392e-f204-4557-be32-fd20f300d877" time="1355244789972" ignored="false" />
117
122
  <file path="$PROJECT_DIR$/../../ui/src/app/domain/partner.rb" changelist="6995392e-f204-4557-be32-fd20f300d877" time="1355762106018" ignored="false" />
118
- <file path="/executable.rb" changelist="6995392e-f204-4557-be32-fd20f300d877" time="1355416708647" ignored="false" />
123
+ <file path="/executable.rb" changelist="6995392e-f204-4557-be32-fd20f300d877" time="1360095536136" ignored="false" />
119
124
  <file path="$PROJECT_DIR$/../../ui/src/thor/tomcat.thor" changelist="6995392e-f204-4557-be32-fd20f300d877" time="1355410403079" ignored="false" />
120
125
  <file path="/tomcat.thor" changelist="6995392e-f204-4557-be32-fd20f300d877" time="1355410403079" ignored="false" />
121
126
  <file path="$PROJECT_DIR$/../../ui/src/thor/ssh.thor" changelist="6995392e-f204-4557-be32-fd20f300d877" time="1355767370410" ignored="false" />
@@ -143,7 +148,7 @@
143
148
  <file path="$PROJECT_DIR$/../../ui/src/ws/ws.sh" changelist="6995392e-f204-4557-be32-fd20f300d877" time="1355438329921" ignored="false" />
144
149
  <file path="$PROJECT_DIR$/../../ui/src/thor/tools.thor" changelist="6995392e-f204-4557-be32-fd20f300d877" time="1355524523025" ignored="false" />
145
150
  <file path="/tools.thor" changelist="6995392e-f204-4557-be32-fd20f300d877" time="1355524523025" ignored="false" />
146
- <file path="$PROJECT_DIR$/../../ui/src/ws/preview_order_request.xml" changelist="6995392e-f204-4557-be32-fd20f300d877" time="1355523852604" ignored="false" />
151
+ <file path="$PROJECT_DIR$/../../ui/src/ws/preview_order_request.xml" changelist="6995392e-f204-4557-be32-fd20f300d877" time="1356128866484" ignored="false" />
147
152
  <file path="$PROJECT_DIR$/../../ui/src/app/services/services/abstract_gateway.rb" changelist="6995392e-f204-4557-be32-fd20f300d877" time="1355503445554" ignored="false" />
148
153
  <file path="$PROJECT_DIR$/../../ui/src/test.rb" changelist="6995392e-f204-4557-be32-fd20f300d877" time="1355504817247" ignored="false" />
149
154
  <file path="/test.rb" changelist="6995392e-f204-4557-be32-fd20f300d877" time="1355504817247" ignored="false" />
@@ -160,6 +165,27 @@
160
165
  <file path="/script_helper.rb" changelist="6995392e-f204-4557-be32-fd20f300d877" time="1355762300792" ignored="false" />
161
166
  <file path="/script_locator_spec.rb" changelist="6995392e-f204-4557-be32-fd20f300d877" time="1356121354915" ignored="false" />
162
167
  <file path="/script_locator.rb" changelist="6995392e-f204-4557-be32-fd20f300d877" time="1356120843372" ignored="false" />
168
+ <file path="$USER_HOME$/.rvm/gems/ruby-1.8.7-p371-i386@r21/gems/script_executor-1.2.0/lib/script_executor/executable.rb" changelist="6995392e-f204-4557-be32-fd20f300d877" time="1356122282755" ignored="false" />
169
+ <file path="$USER_HOME$/.rvm/gems/ruby-1.8.7-p371-i386@r21/gems/script_executor-1.2.0/lib/script_executor/script_executor.rb" changelist="6995392e-f204-4557-be32-fd20f300d877" time="1356122282755" ignored="false" />
170
+ <file path="$USER_HOME$/.rvm/gems/ruby-1.8.7-p371-i386@r21/gems/script_executor-1.2.0/lib/script_executor/script_locator.rb" changelist="6995392e-f204-4557-be32-fd20f300d877" time="1356122282755" ignored="false" />
171
+ <file path="$PROJECT_DIR$/../../ui/src/app/services/sws/templates/_subscribe_data.rxml" changelist="6995392e-f204-4557-be32-fd20f300d877" time="1356124445612" ignored="false" />
172
+ <file path="$PROJECT_DIR$/../../ui/src/app/services/sws/invoice_request.rb" changelist="6995392e-f204-4557-be32-fd20f300d877" time="1356124779666" ignored="false" />
173
+ <file path="$PROJECT_DIR$/../../ui/src/config/dbauth/proteusui-billing-signoff" changelist="6995392e-f204-4557-be32-fd20f300d877" time="1356126026081" ignored="false" />
174
+ <file path="$PROJECT_DIR$/../../ui/src/config/dbauthfiles/proteusui-billing-signoff" changelist="6995392e-f204-4557-be32-fd20f300d877" time="1356125994575" ignored="false" />
175
+ <file path="$PROJECT_DIR$/../../ui/src/config/dbauth_info_trunk.yml" changelist="6995392e-f204-4557-be32-fd20f300d877" time="1356125799207" ignored="false" />
176
+ <file path="$PROJECT_DIR$/../../ui/src/config/dbauth_info_branch.yml" changelist="6995392e-f204-4557-be32-fd20f300d877" time="1356125824614" ignored="false" />
177
+ <file path="$PROJECT_DIR$/../../ui/src/test.xml" changelist="6995392e-f204-4557-be32-fd20f300d877" time="1356126281460" ignored="false" />
178
+ <file path="$PROJECT_DIR$/../../ui/src/test2.xml" changelist="6995392e-f204-4557-be32-fd20f300d877" time="1356127254157" ignored="false" />
179
+ <file path="$PROJECT_DIR$/../../ui/src/spec/functional/services/vdv/tos_service_spec.rb" changelist="6995392e-f204-4557-be32-fd20f300d877" time="1356127967167" ignored="false" />
180
+ <file path="$PROJECT_DIR$/../../ui/src/ws/response.xml" changelist="6995392e-f204-4557-be32-fd20f300d877" time="1356128956986" ignored="false" />
181
+ <file path="$PROJECT_DIR$/../../ui/src/test3.xml" changelist="6995392e-f204-4557-be32-fd20f300d877" time="1356131164616" ignored="false" />
182
+ <file path="/media_adapter.rb" changelist="6995392e-f204-4557-be32-fd20f300d877" time="1360086898548" ignored="false" />
183
+ <file path="$PROJECT_DIR$/../etv/lib/media_adapter.rb" changelist="6995392e-f204-4557-be32-fd20f300d877" time="1360086916731" ignored="false" />
184
+ <file path="$USER_HOME$/.rvm/gems/ruby-1.9.3-p374@etv/gems/script_executor-1.2.1/lib/script_executor/executable.rb" changelist="6995392e-f204-4557-be32-fd20f300d877" time="1360085856665" ignored="false" />
185
+ <file path="$PROJECT_DIR$/../etv/spec/media_adapter_spec.rb" changelist="6995392e-f204-4557-be32-fd20f300d877" time="1360087064665" ignored="false" />
186
+ <file path="/media_adapter_spec.rb" changelist="6995392e-f204-4557-be32-fd20f300d877" time="1360086911017" ignored="false" />
187
+ <file path="$PROJECT_DIR$/../etv/spec/resource_accessor_spec.rb" changelist="6995392e-f204-4557-be32-fd20f300d877" time="1360086178796" ignored="false" />
188
+ <file path="/capturer.rb" changelist="6995392e-f204-4557-be32-fd20f300d877" time="1360095357175" ignored="false" />
163
189
  <option name="TRACKING_ENABLED" value="true" />
164
190
  <option name="SHOW_DIALOG" value="false" />
165
191
  <option name="HIGHLIGHT_CONFLICTS" value="true" />
@@ -179,61 +205,7 @@
179
205
  <file leaf-file-name="executable_spec.rb" pinned="false" current="false" current-in-tab="false">
180
206
  <entry file="file://$PROJECT_DIR$/spec/executable_spec.rb">
181
207
  <provider selected="true" editor-type-id="text-editor">
182
- <state line="13" column="32" selection-start="239" selection-end="239" vertical-scroll-proportion="0.0">
183
- <folding />
184
- </state>
185
- </provider>
186
- </entry>
187
- </file>
188
- <file leaf-file-name="executable.rb" pinned="false" current="false" current-in-tab="false">
189
- <entry file="file://$PROJECT_DIR$/lib/script_executor/executable.rb">
190
- <provider selected="true" editor-type-id="text-editor">
191
- <state line="140" column="58" selection-start="3444" selection-end="3444" vertical-scroll-proportion="0.0">
192
- <folding />
193
- </state>
194
- </provider>
195
- </entry>
196
- </file>
197
- <file leaf-file-name="script_executor.rb" pinned="false" current="false" current-in-tab="false">
198
- <entry file="file://$PROJECT_DIR$/lib/script_executor/script_executor.rb">
199
- <provider selected="true" editor-type-id="text-editor">
200
- <state line="7" column="20" selection-start="109" selection-end="109" vertical-scroll-proportion="0.0">
201
- <folding />
202
- </state>
203
- </provider>
204
- </entry>
205
- </file>
206
- <file leaf-file-name="script_executor.rb" pinned="false" current="false" current-in-tab="false">
207
- <entry file="file://$PROJECT_DIR$/lib/script_executor.rb">
208
- <provider selected="true" editor-type-id="text-editor">
209
- <state line="2" column="41" selection-start="96" selection-end="96" vertical-scroll-proportion="0.0">
210
- <folding />
211
- </state>
212
- </provider>
213
- </entry>
214
- </file>
215
- <file leaf-file-name="script_locator.rb" pinned="false" current="false" current-in-tab="false">
216
- <entry file="file://$PROJECT_DIR$/lib/script_executor/script_locator.rb">
217
- <provider selected="true" editor-type-id="text-editor">
218
- <state line="0" column="0" selection-start="0" selection-end="0" vertical-scroll-proportion="0.0">
219
- <folding />
220
- </state>
221
- </provider>
222
- </entry>
223
- </file>
224
- <file leaf-file-name="erb.rb" pinned="false" current="false" current-in-tab="false">
225
- <entry file="file://$USER_HOME$/.rvm/rubies/ruby-1.9.3-p327/lib/ruby/1.9.1/erb.rb">
226
- <provider selected="true" editor-type-id="text-editor">
227
- <state line="71" column="1" selection-start="2081" selection-end="2109" vertical-scroll-proportion="-14.615385">
228
- <folding />
229
- </state>
230
- </provider>
231
- </entry>
232
- </file>
233
- <file leaf-file-name="version.rb" pinned="false" current="false" current-in-tab="false">
234
- <entry file="file://$PROJECT_DIR$/lib/script_executor/version.rb">
235
- <provider selected="true" editor-type-id="text-editor">
236
- <state line="2" column="21" selection-start="45" selection-end="45" vertical-scroll-proportion="0.0">
208
+ <state line="34" column="131" selection-start="768" selection-end="768" vertical-scroll-proportion="0.0">
237
209
  <folding />
238
210
  </state>
239
211
  </provider>
@@ -242,27 +214,25 @@
242
214
  <file leaf-file-name="CHANGES" pinned="false" current="true" current-in-tab="true">
243
215
  <entry file="file://$PROJECT_DIR$/CHANGES">
244
216
  <provider selected="true" editor-type-id="text-editor">
245
- <state line="22" column="2" selection-start="300" selection-end="317" vertical-scroll-proportion="0.57050246">
217
+ <state line="26" column="2" selection-start="340" selection-end="369" vertical-scroll-proportion="0.68874174">
246
218
  <folding />
247
219
  </state>
248
220
  </provider>
249
221
  </entry>
250
222
  </file>
251
- <file leaf-file-name="script_locator_spec.rb" pinned="false" current="false" current-in-tab="false">
252
- <entry file="file://$PROJECT_DIR$/spec/script_locator_spec.rb">
223
+ <file leaf-file-name="executable.rb" pinned="false" current="false" current-in-tab="false">
224
+ <entry file="file://$PROJECT_DIR$/lib/script_executor/executable.rb">
253
225
  <provider selected="true" editor-type-id="text-editor">
254
- <state line="22" column="67" selection-start="475" selection-end="475" vertical-scroll-proportion="0.0">
255
- <folding>
256
- <element signature="e#520#580#0" expanded="true" />
257
- </folding>
226
+ <state line="17" column="111" selection-start="360" selection-end="360" vertical-scroll-proportion="0.0">
227
+ <folding />
258
228
  </state>
259
229
  </provider>
260
230
  </entry>
261
231
  </file>
262
- <file leaf-file-name="Rakefile" pinned="false" current="false" current-in-tab="false">
263
- <entry file="file://$PROJECT_DIR$/Rakefile">
232
+ <file leaf-file-name="spec_helper.rb" pinned="false" current="false" current-in-tab="false">
233
+ <entry file="file://$PROJECT_DIR$/spec/spec_helper.rb">
264
234
  <provider selected="true" editor-type-id="text-editor">
265
- <state line="31" column="3" selection-start="675" selection-end="675" vertical-scroll-proportion="0.0">
235
+ <state line="0" column="0" selection-start="0" selection-end="0" vertical-scroll-proportion="0.0">
266
236
  <folding />
267
237
  </state>
268
238
  </provider>
@@ -288,16 +258,19 @@
288
258
  <list>
289
259
  <option value="$PROJECT_DIR$/Rakefile" />
290
260
  <option value="$PROJECT_DIR$/lib/script_executor.rb" />
291
- <option value="$PROJECT_DIR$/Gemfile" />
292
261
  <option value="$PROJECT_DIR$/lib/script_executor/script_helper.rb" />
293
262
  <option value="$PROJECT_DIR$/lib/script_executor/script_executor.rb" />
294
263
  <option value="$PROJECT_DIR$/spec/script_executor_spec.rb" />
295
264
  <option value="$PROJECT_DIR$/lib/script_locator.rb" />
296
- <option value="$PROJECT_DIR$/lib/script_executor/executable.rb" />
297
- <option value="$PROJECT_DIR$/lib/script_executor/version.rb" />
298
- <option value="$PROJECT_DIR$/CHANGES" />
299
265
  <option value="$PROJECT_DIR$/lib/script_executor/script_locator.rb" />
300
266
  <option value="$PROJECT_DIR$/spec/script_locator_spec.rb" />
267
+ <option value="$PROJECT_DIR$/Gemfile" />
268
+ <option value="$PROJECT_DIR$/lib/script_executor/version.rb" />
269
+ <option value="$PROJECT_DIR$/lib/script_executor/capturer.rb" />
270
+ <option value="$PROJECT_DIR$/lib/script_executor/output_buffer.rb" />
271
+ <option value="$PROJECT_DIR$/lib/script_executor/executable.rb" />
272
+ <option value="$PROJECT_DIR$/spec/executable_spec.rb" />
273
+ <option value="$PROJECT_DIR$/CHANGES" />
301
274
  </list>
302
275
  </option>
303
276
  </component>
@@ -333,7 +306,6 @@
333
306
  <sortByType />
334
307
  </navigator>
335
308
  <panes>
336
- <pane id="Scope" />
337
309
  <pane id="ProjectPane">
338
310
  <subPane>
339
311
  <PATH>
@@ -346,92 +318,6 @@
346
318
  <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.ExternalLibrariesNode" />
347
319
  </PATH_ELEMENT>
348
320
  </PATH>
349
- <PATH>
350
- <PATH_ELEMENT>
351
- <option name="myItemId" value="script_executor" />
352
- <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.ProjectViewProjectNode" />
353
- </PATH_ELEMENT>
354
- <PATH_ELEMENT>
355
- <option name="myItemId" value="External Libraries" />
356
- <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.ExternalLibrariesNode" />
357
- </PATH_ELEMENT>
358
- <PATH_ELEMENT>
359
- <option name="myItemId" value="bundler (v1.2.3, RVM: ruby-1.9.3-p327 [script_executor]) [gem]" />
360
- <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.NamedLibraryElementNode" />
361
- </PATH_ELEMENT>
362
- </PATH>
363
- <PATH>
364
- <PATH_ELEMENT>
365
- <option name="myItemId" value="script_executor" />
366
- <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.ProjectViewProjectNode" />
367
- </PATH_ELEMENT>
368
- <PATH_ELEMENT>
369
- <option name="myItemId" value="External Libraries" />
370
- <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.ExternalLibrariesNode" />
371
- </PATH_ELEMENT>
372
- <PATH_ELEMENT>
373
- <option name="myItemId" value="bundler (v1.2.3, RVM: ruby-1.9.3-p327 [script_executor]) [gem]" />
374
- <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.NamedLibraryElementNode" />
375
- </PATH_ELEMENT>
376
- <PATH_ELEMENT>
377
- <option name="myItemId" value="lib" />
378
- <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
379
- </PATH_ELEMENT>
380
- </PATH>
381
- <PATH>
382
- <PATH_ELEMENT>
383
- <option name="myItemId" value="script_executor" />
384
- <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.ProjectViewProjectNode" />
385
- </PATH_ELEMENT>
386
- <PATH_ELEMENT>
387
- <option name="myItemId" value="External Libraries" />
388
- <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.ExternalLibrariesNode" />
389
- </PATH_ELEMENT>
390
- <PATH_ELEMENT>
391
- <option name="myItemId" value="bundler (v1.2.3, RVM: ruby-1.9.3-p327 [script_executor]) [gem]" />
392
- <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.NamedLibraryElementNode" />
393
- </PATH_ELEMENT>
394
- <PATH_ELEMENT>
395
- <option name="myItemId" value="lib" />
396
- <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
397
- </PATH_ELEMENT>
398
- <PATH_ELEMENT>
399
- <option name="myItemId" value="bundler" />
400
- <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
401
- </PATH_ELEMENT>
402
- </PATH>
403
- <PATH>
404
- <PATH_ELEMENT>
405
- <option name="myItemId" value="script_executor" />
406
- <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.ProjectViewProjectNode" />
407
- </PATH_ELEMENT>
408
- <PATH_ELEMENT>
409
- <option name="myItemId" value="External Libraries" />
410
- <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.ExternalLibrariesNode" />
411
- </PATH_ELEMENT>
412
- <PATH_ELEMENT>
413
- <option name="myItemId" value="&lt; RVM: ruby-1.9.3-p327 [script_executor] &gt;" />
414
- <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.NamedLibraryElementNode" />
415
- </PATH_ELEMENT>
416
- </PATH>
417
- <PATH>
418
- <PATH_ELEMENT>
419
- <option name="myItemId" value="script_executor" />
420
- <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.ProjectViewProjectNode" />
421
- </PATH_ELEMENT>
422
- <PATH_ELEMENT>
423
- <option name="myItemId" value="External Libraries" />
424
- <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.ExternalLibrariesNode" />
425
- </PATH_ELEMENT>
426
- <PATH_ELEMENT>
427
- <option name="myItemId" value="&lt; RVM: ruby-1.9.3-p327 [script_executor] &gt;" />
428
- <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.NamedLibraryElementNode" />
429
- </PATH_ELEMENT>
430
- <PATH_ELEMENT>
431
- <option name="myItemId" value="1.9.1" />
432
- <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.PsiDirectoryNode" />
433
- </PATH_ELEMENT>
434
- </PATH>
435
321
  <PATH>
436
322
  <PATH_ELEMENT>
437
323
  <option name="myItemId" value="script_executor" />
@@ -490,19 +376,20 @@
490
376
  </PATH>
491
377
  </subPane>
492
378
  </pane>
379
+ <pane id="Scope" />
493
380
  </panes>
494
381
  </component>
495
382
  <component name="PropertiesComponent">
496
383
  <property name="options.splitter.main.proportions" value="0.3" />
497
384
  <property name="WebServerToolWindowFactoryState" value="false" />
498
- <property name="options.lastSelected" value="org.jetbrains.plugins.ruby.settings.RubyIdeSdkConfigurable" />
499
385
  <property name="recentsLimit" value="5" />
386
+ <property name="options.lastSelected" value="org.jetbrains.plugins.ruby.settings.RubyIdeSdkConfigurable" />
500
387
  <property name="restartRequiresConfirmation" value="true" />
501
388
  <property name="FullScreen" value="false" />
502
- <property name="options.searchVisible" value="true" />
503
389
  <property name="options.splitter.details.proportions" value="0.2" />
390
+ <property name="options.searchVisible" value="true" />
504
391
  </component>
505
- <component name="RunManager" selected="RSpec.script_locator_spec">
392
+ <component name="RunManager" selected="RSpec.executable_spec">
506
393
  <configuration default="false" name="ScriptExecutor should execute commands from :script parameter" type="RSpecRunConfigurationType" factoryName="RSpec" temporary="true">
507
394
  <predefined_log_file id="RUBY_RSPEC" enabled="true" />
508
395
  <module name="script_executor" />
@@ -574,17 +461,16 @@
574
461
  <ConfigurationWrapper RunnerId="RubyRunner" />
575
462
  <method />
576
463
  </configuration>
577
- <configuration default="false" name="executable_spec" type="RSpecRunConfigurationType" factoryName="RSpec" temporary="true">
464
+ <configuration default="false" name="script_locator_spec" type="RSpecRunConfigurationType" factoryName="RSpec" temporary="true">
578
465
  <predefined_log_file id="RUBY_RSPEC" enabled="true" />
579
466
  <module name="script_executor" />
580
467
  <RSPEC_RUN_CONFIG_SETTINGS_ID NAME="RUBY_ARGS" VALUE="-e $stdout.sync=true;$stderr.sync=true;load($0=ARGV.shift)" />
581
- <RSPEC_RUN_CONFIG_SETTINGS_ID NAME="WORK DIR" VALUE="$PROJECT_DIR$/spec" />
468
+ <RSPEC_RUN_CONFIG_SETTINGS_ID NAME="WORK DIR" VALUE="$PROJECT_DIR$" />
582
469
  <RSPEC_RUN_CONFIG_SETTINGS_ID NAME="SHOULD_USE_SDK" VALUE="false" />
583
470
  <RSPEC_RUN_CONFIG_SETTINGS_ID NAME="ALTERN_SDK_NAME" VALUE="" />
584
471
  <RSPEC_RUN_CONFIG_SETTINGS_ID NAME="myPassParentEnvs" VALUE="true" />
585
472
  <envs>
586
473
  <env name="JRUBY_OPTS" value="-X+O" />
587
- <env name="RUBYLIB" value="$USER_HOME$/.rvm/gems/ruby-1.9.3-p327@script_executor/gems/ruby-debug-base19x-0.11.30.pre11/lib:$USER_HOME$/.rvm/gems/ruby-1.9.3-p327@script_executor/gems/ruby-debug-ide-0.4.17.beta14/lib" />
588
474
  </envs>
589
475
  <EXTENSION ID="BundlerRunConfigurationExtension" bundleExecEnabled="true" />
590
476
  <EXTENSION ID="JRubyRunConfigurationExtension" />
@@ -595,7 +481,7 @@
595
481
  </EXTENSION>
596
482
  <EXTENSION ID="org.jetbrains.plugins.ruby.motion.run.MotionSimulatorRunExtension" />
597
483
  <RSPEC_RUN_CONFIG_SETTINGS_ID NAME="TESTS_FOLDER_PATH" VALUE="" />
598
- <RSPEC_RUN_CONFIG_SETTINGS_ID NAME="TEST_SCRIPT_PATH" VALUE="$PROJECT_DIR$/spec/executable_spec.rb" />
484
+ <RSPEC_RUN_CONFIG_SETTINGS_ID NAME="TEST_SCRIPT_PATH" VALUE="$PROJECT_DIR$/spec/script_locator_spec.rb" />
599
485
  <RSPEC_RUN_CONFIG_SETTINGS_ID NAME="SPEC_RUNNER_PATH" VALUE="" />
600
486
  <RSPEC_RUN_CONFIG_SETTINGS_ID NAME="TEST_FILE_MASK" VALUE="**/*_spec.rb" />
601
487
  <RSPEC_RUN_CONFIG_SETTINGS_ID NAME="SPEC_EXAMPLE_NAME" VALUE="" />
@@ -605,13 +491,11 @@
605
491
  <RSPEC_RUN_CONFIG_SETTINGS_ID NAME="USE_CUSTOM_SPEC_RUNNER" VALUE="false" />
606
492
  <RSPEC_RUN_CONFIG_SETTINGS_ID NAME="DRB" VALUE="false" />
607
493
  <RSPEC_RUN_CONFIG_SETTINGS_ID NAME="FULL_BACKTRACE" VALUE="false" />
608
- <RunnerSettings RunnerId="RubyDebugRunner" />
609
494
  <RunnerSettings RunnerId="RubyRunner" />
610
- <ConfigurationWrapper RunnerId="RubyDebugRunner" />
611
495
  <ConfigurationWrapper RunnerId="RubyRunner" />
612
496
  <method />
613
497
  </configuration>
614
- <configuration default="false" name="script_locator_spec" type="RSpecRunConfigurationType" factoryName="RSpec" temporary="true">
498
+ <configuration default="false" name="executable_spec" type="RSpecRunConfigurationType" factoryName="RSpec" temporary="true">
615
499
  <predefined_log_file id="RUBY_RSPEC" enabled="true" />
616
500
  <module name="script_executor" />
617
501
  <RSPEC_RUN_CONFIG_SETTINGS_ID NAME="RUBY_ARGS" VALUE="-e $stdout.sync=true;$stderr.sync=true;load($0=ARGV.shift)" />
@@ -631,7 +515,7 @@
631
515
  </EXTENSION>
632
516
  <EXTENSION ID="org.jetbrains.plugins.ruby.motion.run.MotionSimulatorRunExtension" />
633
517
  <RSPEC_RUN_CONFIG_SETTINGS_ID NAME="TESTS_FOLDER_PATH" VALUE="" />
634
- <RSPEC_RUN_CONFIG_SETTINGS_ID NAME="TEST_SCRIPT_PATH" VALUE="$PROJECT_DIR$/spec/script_locator_spec.rb" />
518
+ <RSPEC_RUN_CONFIG_SETTINGS_ID NAME="TEST_SCRIPT_PATH" VALUE="$PROJECT_DIR$/spec/executable_spec.rb" />
635
519
  <RSPEC_RUN_CONFIG_SETTINGS_ID NAME="SPEC_RUNNER_PATH" VALUE="" />
636
520
  <RSPEC_RUN_CONFIG_SETTINGS_ID NAME="TEST_FILE_MASK" VALUE="**/*_spec.rb" />
637
521
  <RSPEC_RUN_CONFIG_SETTINGS_ID NAME="SPEC_EXAMPLE_NAME" VALUE="" />
@@ -743,16 +627,16 @@
743
627
  <item index="0" class="java.lang.String" itemvalue="Ruby remote debug.remote" />
744
628
  <item index="1" class="java.lang.String" itemvalue="RSpec.ScriptExecutor should execute commands from :script parameter" />
745
629
  <item index="2" class="java.lang.String" itemvalue="RSpec.ScriptExecutor should execute commands locally from the block of code as sudo" />
746
- <item index="3" class="java.lang.String" itemvalue="RSpec.executable_spec" />
747
- <item index="4" class="java.lang.String" itemvalue="RSpec.script_locator_spec" />
630
+ <item index="3" class="java.lang.String" itemvalue="RSpec.script_locator_spec" />
631
+ <item index="4" class="java.lang.String" itemvalue="RSpec.executable_spec" />
748
632
  </list>
749
633
  <recent_temporary>
750
634
  <list size="5">
751
- <item index="0" class="java.lang.String" itemvalue="RSpec.script_locator_spec" />
752
- <item index="1" class="java.lang.String" itemvalue="RSpec.executable_spec" />
635
+ <item index="0" class="java.lang.String" itemvalue="RSpec.executable_spec" />
636
+ <item index="1" class="java.lang.String" itemvalue="RSpec.script_locator_spec" />
753
637
  <item index="2" class="java.lang.String" itemvalue="RSpec.executable_spec" />
754
- <item index="3" class="java.lang.String" itemvalue="RSpec.ScriptExecutor should execute commands from :script parameter" />
755
- <item index="4" class="java.lang.String" itemvalue="RSpec.ScriptExecutor should execute commands locally from the block of code as sudo" />
638
+ <item index="3" class="java.lang.String" itemvalue="RSpec.executable_spec" />
639
+ <item index="4" class="java.lang.String" itemvalue="RSpec.ScriptExecutor should execute commands from :script parameter" />
756
640
  </list>
757
641
  </recent_temporary>
758
642
  </component>
@@ -769,15 +653,15 @@
769
653
  <frame x="262" y="33" width="1613" height="1087" extended-state="0" />
770
654
  <editor active="true" />
771
655
  <layout>
772
- <window_info id="Changes" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.36161616" sideWeight="0.9955329" order="7" side_tool="false" content_ui="tabs" />
656
+ <window_info id="Changes" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="true" weight="0.36161616" sideWeight="0.9955329" order="7" side_tool="false" content_ui="tabs" />
773
657
  <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" />
774
658
  <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" />
775
659
  <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" />
776
- <window_info id="Project" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="true" weight="0.23420548" sideWeight="0.67474747" order="0" side_tool="false" content_ui="combo" />
660
+ <window_info id="Project" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="true" weight="0.2373963" sideWeight="0.63838387" order="0" side_tool="false" content_ui="combo" />
777
661
  <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" />
778
662
  <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" />
779
663
  <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" />
780
- <window_info id="Run" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="true" weight="0.32525253" sideWeight="0.5" order="2" side_tool="false" content_ui="tabs" />
664
+ <window_info id="Run" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.3242424" sideWeight="0.5" order="2" side_tool="false" content_ui="tabs" />
781
665
  <window_info id="Version Control" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" sideWeight="0.5" order="7" side_tool="false" content_ui="tabs" />
782
666
  <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" />
783
667
  <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" />
@@ -843,15 +727,20 @@
843
727
  </component>
844
728
  <component name="XDebuggerManager">
845
729
  <breakpoint-manager>
846
- <option name="time" value="2" />
730
+ <breakpoints>
731
+ <line-breakpoint enabled="true" type="ruby-line">
732
+ <url>file://$PROJECT_DIR$/lib/script_executor/executable.rb</url>
733
+ <line>93</line>
734
+ <option name="timeStamp" value="2" />
735
+ </line-breakpoint>
736
+ </breakpoints>
737
+ <breakpoints-dialog>
738
+ <breakpoints-dialog />
739
+ </breakpoints-dialog>
740
+ <option name="time" value="3" />
847
741
  </breakpoint-manager>
848
742
  </component>
849
743
  <component name="editorHistoryManager">
850
- <entry file="file://$PROJECT_DIR$/spec/spec_helper.rb">
851
- <provider selected="true" editor-type-id="text-editor">
852
- <state line="0" column="0" selection-start="0" selection-end="0" vertical-scroll-proportion="0.0" />
853
- </provider>
854
- </entry>
855
744
  <entry file="file://$PROJECT_DIR$/lib/script_locator.rb">
856
745
  <provider selected="true" editor-type-id="text-editor">
857
746
  <state line="2" column="58" selection-start="95" selection-end="95" vertical-scroll-proportion="0.034006376" />
@@ -862,13 +751,6 @@
862
751
  <state line="2" column="64" selection-start="91" selection-end="91" vertical-scroll-proportion="0.033195022" />
863
752
  </provider>
864
753
  </entry>
865
- <entry file="file://$PROJECT_DIR$/Gemfile">
866
- <provider selected="true" editor-type-id="text-editor">
867
- <state line="14" column="28" selection-start="186" selection-end="186" vertical-scroll-proportion="0.23284823">
868
- <folding />
869
- </state>
870
- </provider>
871
- </entry>
872
754
  <entry file="file://$USER_HOME$/.rvm/gems/ruby-1.9.3-p327@global/gems/bundler-1.2.3/lib/bundler/dsl.rb">
873
755
  <provider selected="true" editor-type-id="text-editor">
874
756
  <state line="61" column="8" selection-start="2147" selection-end="2147" vertical-scroll-proportion="0.016859852" />
@@ -879,74 +761,86 @@
879
761
  <state line="0" column="0" selection-start="0" selection-end="0" vertical-scroll-proportion="0.0" />
880
762
  </provider>
881
763
  </entry>
882
- <entry file="file://$PROJECT_DIR$/lib/script_executor/executable.rb">
764
+ <entry file="file://$PROJECT_DIR$/lib/script_executor/script_executor.rb">
883
765
  <provider selected="true" editor-type-id="text-editor">
884
- <state line="140" column="58" selection-start="3444" selection-end="3444" vertical-scroll-proportion="0.0">
766
+ <state line="7" column="0" selection-start="109" selection-end="109" vertical-scroll-proportion="0.0">
885
767
  <folding />
886
768
  </state>
887
769
  </provider>
888
770
  </entry>
889
- <entry file="file://$PROJECT_DIR$/lib/script_executor/script_executor.rb">
771
+ <entry file="file://$PROJECT_DIR$/lib/script_executor.rb">
890
772
  <provider selected="true" editor-type-id="text-editor">
891
- <state line="7" column="20" selection-start="109" selection-end="109" vertical-scroll-proportion="0.0">
773
+ <state line="2" column="41" selection-start="96" selection-end="96" vertical-scroll-proportion="0.0">
892
774
  <folding />
893
775
  </state>
894
776
  </provider>
895
777
  </entry>
896
- <entry file="file://$PROJECT_DIR$/lib/script_executor.rb">
778
+ <entry file="file://$PROJECT_DIR$/lib/script_executor/script_locator.rb">
897
779
  <provider selected="true" editor-type-id="text-editor">
898
- <state line="2" column="41" selection-start="96" selection-end="96" vertical-scroll-proportion="0.0">
780
+ <state line="0" column="0" selection-start="0" selection-end="0" vertical-scroll-proportion="0.0">
899
781
  <folding />
900
782
  </state>
901
783
  </provider>
902
784
  </entry>
903
- <entry file="file://$PROJECT_DIR$/lib/script_executor/version.rb">
785
+ <entry file="file://$PROJECT_DIR$/spec/script_locator_spec.rb">
786
+ <provider selected="true" editor-type-id="text-editor">
787
+ <state line="22" column="67" selection-start="475" selection-end="475" vertical-scroll-proportion="0.0">
788
+ <folding />
789
+ </state>
790
+ </provider>
791
+ </entry>
792
+ <entry file="file://$PROJECT_DIR$/Rakefile">
904
793
  <provider selected="true" editor-type-id="text-editor">
905
- <state line="2" column="21" selection-start="45" selection-end="45" vertical-scroll-proportion="0.0">
794
+ <state line="31" column="3" selection-start="675" selection-end="675" vertical-scroll-proportion="0.0">
906
795
  <folding />
907
796
  </state>
908
797
  </provider>
909
798
  </entry>
910
- <entry file="file://$USER_HOME$/.rvm/rubies/ruby-1.9.3-p327/lib/ruby/1.9.1/erb.rb">
799
+ <entry file="file://$PROJECT_DIR$/Gemfile">
911
800
  <provider selected="true" editor-type-id="text-editor">
912
- <state line="71" column="1" selection-start="2081" selection-end="2109" vertical-scroll-proportion="-14.615385">
801
+ <state line="6" column="18" selection-start="73" selection-end="73" vertical-scroll-proportion="0.0">
913
802
  <folding />
914
803
  </state>
915
804
  </provider>
916
805
  </entry>
917
- <entry file="file://$PROJECT_DIR$/lib/script_executor/script_locator.rb">
806
+ <entry file="file://$PROJECT_DIR$/lib/script_executor/output_buffer.rb">
918
807
  <provider selected="true" editor-type-id="text-editor">
919
- <state line="0" column="0" selection-start="0" selection-end="0" vertical-scroll-proportion="0.0">
808
+ <state line="7" column="10" selection-start="93" selection-end="93" vertical-scroll-proportion="0.174727">
920
809
  <folding />
921
810
  </state>
922
811
  </provider>
923
812
  </entry>
924
- <entry file="file://$PROJECT_DIR$/spec/executable_spec.rb">
813
+ <entry file="file://$PROJECT_DIR$/lib/script_executor/version.rb">
925
814
  <provider selected="true" editor-type-id="text-editor">
926
- <state line="13" column="32" selection-start="239" selection-end="239" vertical-scroll-proportion="0.0">
815
+ <state line="2" column="3" selection-start="45" selection-end="45" vertical-scroll-proportion="0.049921997">
927
816
  <folding />
928
817
  </state>
929
818
  </provider>
930
819
  </entry>
931
- <entry file="file://$PROJECT_DIR$/spec/script_locator_spec.rb">
820
+ <entry file="file://$PROJECT_DIR$/lib/script_executor/executable.rb">
932
821
  <provider selected="true" editor-type-id="text-editor">
933
- <state line="22" column="67" selection-start="475" selection-end="475" vertical-scroll-proportion="0.0">
934
- <folding>
935
- <element signature="e#520#580#0" expanded="true" />
936
- </folding>
822
+ <state line="17" column="111" selection-start="360" selection-end="360" vertical-scroll-proportion="0.0">
823
+ <folding />
937
824
  </state>
938
825
  </provider>
939
826
  </entry>
940
- <entry file="file://$PROJECT_DIR$/Rakefile">
827
+ <entry file="file://$PROJECT_DIR$/spec/spec_helper.rb">
941
828
  <provider selected="true" editor-type-id="text-editor">
942
- <state line="31" column="3" selection-start="675" selection-end="675" vertical-scroll-proportion="0.0">
829
+ <state line="0" column="0" selection-start="0" selection-end="0" vertical-scroll-proportion="0.0">
830
+ <folding />
831
+ </state>
832
+ </provider>
833
+ </entry>
834
+ <entry file="file://$PROJECT_DIR$/spec/executable_spec.rb">
835
+ <provider selected="true" editor-type-id="text-editor">
836
+ <state line="34" column="131" selection-start="768" selection-end="768" vertical-scroll-proportion="0.0">
943
837
  <folding />
944
838
  </state>
945
839
  </provider>
946
840
  </entry>
947
841
  <entry file="file://$PROJECT_DIR$/CHANGES">
948
842
  <provider selected="true" editor-type-id="text-editor">
949
- <state line="22" column="2" selection-start="300" selection-end="317" vertical-scroll-proportion="0.57050246">
843
+ <state line="26" column="2" selection-start="340" selection-end="369" vertical-scroll-proportion="0.68874174">
950
844
  <folding />
951
845
  </state>
952
846
  </provider>
data/CHANGES CHANGED
@@ -21,3 +21,7 @@
21
21
  == Version 1.2.1
22
22
 
23
23
  * Fix binding issue.
24
+
25
+ == Version 1.3.0
26
+
27
+ * Adding line action parameter.
data/Gemfile CHANGED
@@ -15,16 +15,16 @@ group :test do
15
15
  gem "mocha"
16
16
  end
17
17
 
18
- group :debug do
19
- if RUBY_VERSION.include? "1.9"
20
- unless File.exist? "#{ENV['GEM_HOME']}/gems/linecache19-0.5.13/lib/linecache19.rb"
21
- `curl -OL http://rubyforge.org/frs/download.php/75414/linecache19-0.5.13.gem`
22
- `gem i linecache19-0.5.13.gem`
23
- end
24
-
25
- gem "linecache19", "0.5.13"
26
- gem "ruby-debug-base19x", "0.11.30.pre10"
27
- gem "ruby-debug-ide", "0.4.17.beta14"
28
- end
29
- end
18
+ #group :debug do
19
+ # if RUBY_VERSION.include? "1.9"
20
+ # unless File.exist? "#{ENV['GEM_HOME']}/gems/linecache19-0.5.13/lib/linecache19.rb"
21
+ # `curl -OL http://rubyforge.org/frs/download.php/75414/linecache19-0.5.13.gem`
22
+ # `gem i linecache19-0.5.13.gem`
23
+ # end
24
+ #
25
+ # gem "linecache19", "0.5.13"
26
+ # gem "ruby-debug-base19x", "0.11.30.pre10"
27
+ # gem "ruby-debug-ide", "0.4.17.beta14"
28
+ # end
29
+ #end
30
30
 
data/Gemfile.lock CHANGED
@@ -1,21 +1,16 @@
1
1
  GEM
2
2
  remote: http://rubygems.org/
3
3
  specs:
4
- archive-tar-minitar (0.5.2)
5
- columnize (0.3.6)
6
4
  diff-lcs (1.1.3)
7
5
  file_utils (1.0.6)
8
6
  gemcutter (0.7.1)
9
7
  gemspec_deps_gen (1.0.5)
10
8
  file_utils
11
9
  highline (1.6.15)
12
- linecache19 (0.5.13)
13
- ruby_core_source (>= 0.1.4)
14
10
  metaclass (0.0.1)
15
11
  mocha (0.13.1)
16
12
  metaclass (~> 0.0.1)
17
13
  net-ssh (2.6.2)
18
- rake (10.0.3)
19
14
  rspec (2.12.0)
20
15
  rspec-core (~> 2.12.0)
21
16
  rspec-expectations (~> 2.12.0)
@@ -24,15 +19,6 @@ GEM
24
19
  rspec-expectations (2.12.1)
25
20
  diff-lcs (~> 1.1.3)
26
21
  rspec-mocks (2.12.0)
27
- ruby-debug-base19x (0.11.30.pre10)
28
- columnize (>= 0.3.1)
29
- linecache19 (>= 0.5.11)
30
- rake (>= 0.8.1)
31
- ruby_core_source (>= 0.1.4)
32
- ruby-debug-ide (0.4.17.beta14)
33
- rake (>= 0.8.1)
34
- ruby_core_source (0.1.5)
35
- archive-tar-minitar (>= 0.5.2)
36
22
 
37
23
  PLATFORMS
38
24
  ruby
@@ -41,9 +27,6 @@ DEPENDENCIES
41
27
  gemcutter
42
28
  gemspec_deps_gen
43
29
  highline
44
- linecache19 (= 0.5.13)
45
30
  mocha
46
31
  net-ssh
47
32
  rspec
48
- ruby-debug-base19x (= 0.11.30.pre10)
49
- ruby-debug-ide (= 0.4.17.beta14)
@@ -1,6 +1,8 @@
1
1
  require 'net/ssh'
2
2
  require "highline/import"
3
3
 
4
+ require 'script_executor/output_buffer'
5
+
4
6
  module Executable
5
7
 
6
8
  def execute params={}, &code
@@ -25,20 +27,23 @@ module Executable
25
27
  domain = params[:domain]
26
28
  user = params[:user]
27
29
  password = params[:password]
28
- identity_file = params[:identity_file]
29
30
  capture_output = params[:capture_output]
30
31
  simulate = params[:simulate]
32
+ line_action = params[:line_action]
31
33
 
32
- print_execution commands, remote, domain, user, identity_file, simulate
33
-
34
- printer = Proc.new { |data| print data }
34
+ print_execution commands, remote, domain, user, nil, simulate
35
35
 
36
36
  unless simulate
37
+ line_action = lambda { |line| print line } unless line_action
38
+ storage = capture_output ? OutputBuffer.new : nil
39
+
37
40
  if remote
38
- execute_ssh commands, domain, user, password, identity_file, printer, capture_output
41
+ execute_ssh commands, domain, user, password, line_action, storage
39
42
  else
40
- execute_command commands, password, printer, capture_output
43
+ execute_command commands, password, line_action, storage
41
44
  end
45
+
46
+ storage.buffer.join("\n") if storage
42
47
  end
43
48
  end
44
49
 
@@ -82,54 +87,43 @@ module Executable
82
87
  end
83
88
  end
84
89
 
85
- def execute_command commands, password, printer, capture_output=false
86
- result = capture_output ? [] : nil
87
-
90
+ def execute_command commands, password, line_action, storage
88
91
  commands = commands + inline_password(password) if password
89
92
 
90
- IO.popen(commands).each_line do |line|
91
- if capture_output
92
- result << line.chomp
93
- else
94
- printer.call(line)
93
+ IO.popen(commands) do |pipe|
94
+ pipe.each("\r") do |line|
95
+ storage.save(line.chomp) if storage
96
+
97
+ line_action.call(line)
95
98
  end
96
99
  end
97
-
98
- result.join("\n") if capture_output
99
100
  end
100
101
 
101
102
  def inline_password password
102
103
  password ? "<<EOF\n#{password}\nEOF" : ""
103
104
  end
104
105
 
105
- def execute_ssh commands, domain, user, password, identity_file, printer, capture_output=false
106
+ def execute_ssh commands, domain, user, password, line_action, storage
106
107
  if password.nil?
107
108
  password = ask("Enter password for #{user}: ") { |q| q.echo = '*' }
108
109
  end
109
110
 
110
- result = capture_output ? [] : nil
111
-
112
111
  Net::SSH.start(domain, user, :password => password) do |session|
113
- session.exec "#{commands}" do |channel, _, data|
114
- if data =~ /^\[sudo\] password for user:/ || data =~ /sudo password:/
112
+ session.exec "#{commands}" do |channel, _, line|
113
+ if line =~ /^\[sudo\] password for user:/ || line =~ /sudo password:/
115
114
  #puts "Password request"
116
115
  channel.request_pty # <- problem must be here.
117
116
  channel.send_data password + "\n"
118
117
  else
119
- #buffer << data.chomp
120
- if capture_output
121
- result << data.chomp
122
- else
123
- printer.call(data)
124
- end
118
+ storage.save(line.chomp) if storage
119
+
120
+ line_action.call(line)
125
121
  end
126
122
  end
127
123
 
128
124
  # run the aggregated event loop
129
125
  session.loop
130
126
  end
131
-
132
- result.join("\n") if capture_output
133
127
  end
134
128
 
135
129
  def locate_commands script, &code
@@ -0,0 +1,11 @@
1
+ class OutputBuffer
2
+ attr_reader :buffer
3
+
4
+ def initialize
5
+ @buffer = []
6
+ end
7
+
8
+ def save line
9
+ buffer << line
10
+ end
11
+ end
@@ -1,3 +1,3 @@
1
1
  module ScriptExecutor
2
- VERSION = "1.2.1"
2
+ VERSION = "1.3.0"
3
3
  end
@@ -72,8 +72,8 @@ describe MyExecutable do
72
72
  it "should execute commands from the block of code" do
73
73
  result = subject.execute @remote_info do
74
74
  %Q(
75
- whoami
76
- )
75
+ whoami
76
+ )
77
77
  end
78
78
 
79
79
  result.should == ENV['USER']
@@ -82,8 +82,8 @@ describe MyExecutable do
82
82
  it "should execute sudo command" do
83
83
  result = subject.execute @remote_info.merge(:sudo => true, :password => @password) do
84
84
  %Q(
85
- ~/apache-tomcat-7.0.34/bin/shutdown.sh
86
- )
85
+ ~/apache-tomcat-7.0.34/bin/shutdown.sh
86
+ )
87
87
  end
88
88
 
89
89
  p result
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.2.1
4
+ version: 1.3.0
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: 2012-12-21 00:00:00.000000000 Z
12
+ date: 2013-02-05 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: highline
@@ -103,6 +103,7 @@ files:
103
103
  - lib/executable.rb
104
104
  - lib/script_executor.rb
105
105
  - lib/script_executor/executable.rb
106
+ - lib/script_executor/output_buffer.rb
106
107
  - lib/script_executor/script_executor.rb
107
108
  - lib/script_executor/script_locator.rb
108
109
  - lib/script_executor/version.rb
@@ -124,9 +125,6 @@ required_ruby_version: !ruby/object:Gem::Requirement
124
125
  - - ! '>='
125
126
  - !ruby/object:Gem::Version
126
127
  version: '0'
127
- segments:
128
- - 0
129
- hash: 3068490283749073270
130
128
  required_rubygems_version: !ruby/object:Gem::Requirement
131
129
  none: false
132
130
  requirements:
@@ -135,7 +133,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
135
133
  version: '0'
136
134
  requirements: []
137
135
  rubyforge_project:
138
- rubygems_version: 1.8.24
136
+ rubygems_version: 1.8.25
139
137
  signing_key:
140
138
  specification_version: 3
141
139
  summary: This library helps to execute code, locally or remote over ssh