script_executor 1.0.1 → 1.1.0

Sign up to get free protection for your applications and to get access to all the features.
data/.idea/.rakeTasks CHANGED
@@ -4,4 +4,4 @@ You are allowed to:
4
4
  1. Remove rake task
5
5
  2. Add existing rake tasks
6
6
  To add existing rake tasks automatically delete this file and reload the project.
7
- --><RakeGroup description="" fullCmd="" taksId="rake" /></Settings>
7
+ --><RakeGroup description="" fullCmd="" taksId="rake"><RakeTask description="Run RSpec code examples" fullCmd="spec" taksId="spec" /><RakeTask description="" fullCmd="build" taksId="build" /><RakeTask description="" fullCmd="install" taksId="install" /><RakeTask description="" fullCmd="release" taksId="release" /></RakeGroup></Settings>
@@ -15,7 +15,6 @@
15
15
  <orderEntry type="sourceFolder" forTests="false" />
16
16
  <orderEntry type="library" scope="PROVIDED" name="bundler (v1.2.3, RVM: ruby-1.9.3-p327 [script_executor]) [gem]" level="application" />
17
17
  <orderEntry type="library" scope="PROVIDED" name="diff-lcs (v1.1.3, RVM: ruby-1.9.3-p327 [script_executor]) [gem]" level="application" />
18
- <orderEntry type="library" scope="PROVIDED" name="file_utils (v1.0.5, RVM: ruby-1.9.3-p327 [script_executor]) [gem]" level="application" />
19
18
  <orderEntry type="library" scope="PROVIDED" name="gemcutter (v0.7.1, RVM: ruby-1.9.3-p327 [script_executor]) [gem]" level="application" />
20
19
  <orderEntry type="library" scope="PROVIDED" name="gemspec_deps_gen (v1.0.5, RVM: ruby-1.9.3-p327 [script_executor]) [gem]" level="application" />
21
20
  <orderEntry type="library" scope="PROVIDED" name="highline (v1.6.15, RVM: ruby-1.9.3-p327 [script_executor]) [gem]" level="application" />
data/.idea/workspace.xml CHANGED
@@ -2,24 +2,24 @@
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$/CHANGES" afterPath="$PROJECT_DIR$/CHANGES" />
6
- <change type="MODIFICATION" beforePath="$PROJECT_DIR$/Gemfile.lock" afterPath="$PROJECT_DIR$/Gemfile.lock" />
7
- <change type="MODIFICATION" beforePath="$PROJECT_DIR$/Gemfile" afterPath="$PROJECT_DIR$/Gemfile" />
8
- <change type="MODIFICATION" beforePath="$PROJECT_DIR$/Rakefile" afterPath="$PROJECT_DIR$/Rakefile" />
9
- <change type="MODIFICATION" beforePath="$PROJECT_DIR$/script_executor.gemspec" afterPath="$PROJECT_DIR$/script_executor.gemspec" />
5
+ <change type="NEW" beforePath="" afterPath="$PROJECT_DIR$/lib/executable.rb" />
6
+ <change type="NEW" beforePath="" afterPath="$PROJECT_DIR$/lib/script_executor/executable.rb" />
7
+ <change type="MODIFICATION" beforePath="$PROJECT_DIR$/.idea/.rakeTasks" afterPath="$PROJECT_DIR$/.idea/.rakeTasks" />
8
+ <change type="MODIFICATION" beforePath="$PROJECT_DIR$/lib/script_executor.rb" afterPath="$PROJECT_DIR$/lib/script_executor.rb" />
10
9
  <change type="MODIFICATION" beforePath="$PROJECT_DIR$/lib/script_executor/script_executor.rb" afterPath="$PROJECT_DIR$/lib/script_executor/script_executor.rb" />
11
10
  <change type="MODIFICATION" beforePath="$PROJECT_DIR$/spec/script_executor_spec.rb" afterPath="$PROJECT_DIR$/spec/script_executor_spec.rb" />
12
11
  <change type="MODIFICATION" beforePath="$PROJECT_DIR$/lib/script_executor/version.rb" afterPath="$PROJECT_DIR$/lib/script_executor/version.rb" />
12
+ <change type="MODIFICATION" beforePath="$PROJECT_DIR$/.idea/workspace.xml" afterPath="$PROJECT_DIR$/.idea/workspace.xml" />
13
13
  </list>
14
14
  <ignored path="script_executor.iws" />
15
15
  <ignored path=".idea/workspace.xml" />
16
- <file path="/Dummy.txt" changelist="6995392e-f204-4557-be32-fd20f300d877" time="1355016192912" ignored="false" />
17
- <file path="/Gemfile" changelist="6995392e-f204-4557-be32-fd20f300d877" time="1355063712662" ignored="false" />
18
- <file path="/script_executor_spec.rb" changelist="6995392e-f204-4557-be32-fd20f300d877" time="1355059359540" ignored="false" />
19
- <file path="$PROJECT_DIR$/../../ui/src/thor/oracle_client.thor" changelist="6995392e-f204-4557-be32-fd20f300d877" time="1355059278885" ignored="false" />
20
- <file path="/oracle_client.thor" changelist="6995392e-f204-4557-be32-fd20f300d877" time="1355059278885" ignored="false" />
21
- <file path="$PROJECT_DIR$/../../ui/src/docs/how-to-install-tools-on-mountain-lion.txt" changelist="6995392e-f204-4557-be32-fd20f300d877" time="1355061472364" ignored="false" />
22
- <file path="/how-to-install-tools-on-mountain-lion.txt" changelist="6995392e-f204-4557-be32-fd20f300d877" time="1355061463842" ignored="false" />
16
+ <file path="/Dummy.txt" changelist="6995392e-f204-4557-be32-fd20f300d877" time="1355411695800" ignored="false" />
17
+ <file path="/Gemfile" changelist="6995392e-f204-4557-be32-fd20f300d877" time="1355411482839" ignored="false" />
18
+ <file path="/script_executor_spec.rb" changelist="6995392e-f204-4557-be32-fd20f300d877" time="1355353469670" ignored="false" />
19
+ <file path="$PROJECT_DIR$/../../ui/src/thor/oracle_client.thor" changelist="6995392e-f204-4557-be32-fd20f300d877" time="1355416098113" ignored="false" />
20
+ <file path="/oracle_client.thor" changelist="6995392e-f204-4557-be32-fd20f300d877" time="1355170217364" ignored="false" />
21
+ <file path="$PROJECT_DIR$/../../ui/src/docs/how-to-install-tools-on-mountain-lion.txt" changelist="6995392e-f204-4557-be32-fd20f300d877" time="1355179284273" ignored="false" />
22
+ <file path="/how-to-install-tools-on-mountain-lion.txt" changelist="6995392e-f204-4557-be32-fd20f300d877" time="1355179183290" ignored="false" />
23
23
  <file path="$USER_HOME$/.rvm/rubies/ruby-1.9.3-p327/lib/ruby/1.9.1/rubygems.rb" changelist="6995392e-f204-4557-be32-fd20f300d877" time="1355061482853" ignored="false" />
24
24
  <file path="$USER_HOME$/.rvm/rubies/ruby-1.9.3-p327/lib/ruby/1.9.1/syck.rb" changelist="6995392e-f204-4557-be32-fd20f300d877" time="1355061482853" ignored="false" />
25
25
  <file path="$USER_HOME$/.rvm/rubies/ruby-1.9.3-p327/lib/ruby/1.9.1/mkmf.rb" changelist="6995392e-f204-4557-be32-fd20f300d877" time="1355061482853" ignored="false" />
@@ -70,10 +70,72 @@
70
70
  <file path="$USER_HOME$/.rvm/gems/ruby-1.9.3-p327@script_executor/gems/rspec-expectations-2.12.0/lib/rspec/matchers/dsl.rb" changelist="6995392e-f204-4557-be32-fd20f300d877" time="1355061696976" ignored="false" />
71
71
  <file path="$USER_HOME$/.rvm/gems/ruby-1.9.3-p327@script_executor/gems/rspec-expectations-2.12.0/lib/rspec/matchers/operator_matcher.rb" changelist="6995392e-f204-4557-be32-fd20f300d877" time="1355061696976" ignored="false" />
72
72
  <file path="$USER_HOME$/.rvm/gems/ruby-1.9.3-p327@script_executor/gems/rspec-expectations-2.12.0/lib/rspec/matchers/pretty.rb" changelist="6995392e-f204-4557-be32-fd20f300d877" time="1355061696976" ignored="false" />
73
- <file path="$PROJECT_DIR$/../../ui/src/Gemfile" changelist="6995392e-f204-4557-be32-fd20f300d877" time="1355062244364" ignored="false" />
73
+ <file path="$PROJECT_DIR$/../../ui/src/Gemfile" changelist="6995392e-f204-4557-be32-fd20f300d877" time="1355412928924" ignored="false" />
74
74
  <file path="/fragment.rb" changelist="6995392e-f204-4557-be32-fd20f300d877" time="1355062484724" ignored="false" />
75
- <file path="/script_executor.rb" changelist="6995392e-f204-4557-be32-fd20f300d877" time="1355062643063" ignored="false" />
75
+ <file path="/script_executor.rb" changelist="6995392e-f204-4557-be32-fd20f300d877" time="1355415829525" ignored="false" />
76
76
  <file path="/CHANGES" changelist="6995392e-f204-4557-be32-fd20f300d877" time="1355062946290" ignored="false" />
77
+ <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" />
78
+ <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" />
79
+ <file path="$PROJECT_DIR$/../../ui/src/bin/install_oracle_client.sh" changelist="6995392e-f204-4557-be32-fd20f300d877" time="1355179739279" ignored="false" />
80
+ <file path="/install_oracle_client.sh" changelist="6995392e-f204-4557-be32-fd20f300d877" time="1355179739279" ignored="false" />
81
+ <file path="/a.rxml" changelist="6995392e-f204-4557-be32-fd20f300d877" time="1355155941784" ignored="false" />
82
+ <file path="/a.rb" changelist="6995392e-f204-4557-be32-fd20f300d877" time="1355156020300" ignored="false" />
83
+ <file path="/a.feature" changelist="6995392e-f204-4557-be32-fd20f300d877" time="1355155959870" ignored="false" />
84
+ <file path="/a.html" changelist="6995392e-f204-4557-be32-fd20f300d877" time="1355155962516" ignored="false" />
85
+ <file path="$USER_HOME$/.rvm/gems/ruby-1.8.7-p371@r21/gems/file_utils-1.0.6/lib/file_utils/file_utils.rb" changelist="6995392e-f204-4557-be32-fd20f300d877" time="1355156976039" ignored="false" />
86
+ <file path="$USER_HOME$/.rvm/gems/ruby-1.8.7-p371@r21/gems/thor-0.16.0/lib/thor.rb" changelist="6995392e-f204-4557-be32-fd20f300d877" time="1355156976039" ignored="false" />
87
+ <file path="$USER_HOME$/.rvm/gems/ruby-1.8.7-p371@r21/gems/ruby-debug-base-0.10.4/lib/ruby-debug-base.rb" changelist="6995392e-f204-4557-be32-fd20f300d877" time="1355156380308" ignored="false" />
88
+ <file path="$USER_HOME$/.rvm/gems/ruby-1.8.7-p371@r21/gems/thor-0.16.0/lib/thor/base.rb" changelist="6995392e-f204-4557-be32-fd20f300d877" time="1355156976039" ignored="false" />
89
+ <file path="$USER_HOME$/.rvm/gems/ruby-1.8.7-p371@r21/gems/highline-1.6.2/lib/highline/import.rb" changelist="6995392e-f204-4557-be32-fd20f300d877" time="1355156380308" ignored="false" />
90
+ <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" />
91
+ <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" />
92
+ <file path="$PROJECT_DIR$/../../ui/src/Gemfile.lock" changelist="6995392e-f204-4557-be32-fd20f300d877" time="1355413042305" ignored="false" />
93
+ <file path="/a.dummy" changelist="6995392e-f204-4557-be32-fd20f300d877" time="1355236966673" ignored="false" />
94
+ <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" />
95
+ <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" />
96
+ <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" />
97
+ <file path="$USER_HOME$/.rvm/gems/ruby-1.8.7-p371@r21/gems/nokogiri-1.5.0/lib/nokogiri/xml/namespace.rb" changelist="6995392e-f204-4557-be32-fd20f300d877" time="1355156976039" ignored="false" />
98
+ <file path="$USER_HOME$/.rvm/gems/ruby-1.8.7-p371@r21/gems/thor-0.16.0/lib/thor/group.rb" changelist="6995392e-f204-4557-be32-fd20f300d877" time="1355156976040" ignored="false" />
99
+ <file path="$USER_HOME$/.rvm/gems/ruby-1.8.7-p371@r21/gems/libxml-ruby-1.1.3/lib/libxml/node.rb" changelist="6995392e-f204-4557-be32-fd20f300d877" time="1355156976040" ignored="false" />
100
+ <file path="$USER_HOME$/.rvm/gems/ruby-1.8.7-p371@r21/gems/capistrano-2.9.0/lib/capistrano/recipes/deploy/scm/accurev.rb" changelist="6995392e-f204-4557-be32-fd20f300d877" time="1355156976040" ignored="false" />
101
+ <file path="$USER_HOME$/.rvm/gems/ruby-1.8.7-p371@r21/gems/net-sftp-2.0.5/lib/net/sftp/protocol/01/base.rb" changelist="6995392e-f204-4557-be32-fd20f300d877" time="1355156976040" ignored="false" />
102
+ <file path="$USER_HOME$/.rvm/gems/ruby-1.8.7-p371@r21/gems/nokogiri-1.5.0/lib/nokogiri/xml/sax/document.rb" changelist="6995392e-f204-4557-be32-fd20f300d877" time="1355156976040" ignored="false" />
103
+ <file path="$USER_HOME$/.rvm/gems/ruby-1.8.7-p371@r21/gems/nokogiri-1.5.0/lib/nokogiri/xml/node/save_options.rb" changelist="6995392e-f204-4557-be32-fd20f300d877" time="1355156976040" ignored="false" />
104
+ <file path="$USER_HOME$/.rvm/gems/ruby-1.8.7-p371@r21/gems/mysql-2.8.1/lib/mysql_api.bundle" changelist="6995392e-f204-4557-be32-fd20f300d877" time="1355157215820" ignored="false" />
105
+ <file path="$USER_HOME$/.rvm/gems/ruby-1.8.7-p371@r21/gems/mysql-2.8.1/lib/mysql.rb" changelist="6995392e-f204-4557-be32-fd20f300d877" time="1355157215820" ignored="false" />
106
+ <file path="$PROJECT_DIR$/../../ui/src/docs/how-to-install-project-on-mountain-lion.txt" changelist="6995392e-f204-4557-be32-fd20f300d877" time="1355179671697" ignored="false" />
107
+ <file path="$PROJECT_DIR$/../../ui/src/vendor/rails/activerecord/lib/active_record/connection_adapters/mysql_adapter.rb" changelist="6995392e-f204-4557-be32-fd20f300d877" time="1355160370287" ignored="false" />
108
+ <file path="$USER_HOME$/.rvm/gems/ruby-1.8.7-p371@global/gems/bundler-1.2.3/lib/bundler/runtime.rb" changelist="6995392e-f204-4557-be32-fd20f300d877" time="1355161308510" ignored="false" />
109
+ <file path="$USER_HOME$/.rvm/gems/ruby-1.8.7-p371@global/gems/bundler-1.2.3/lib/bundler/vendor/thor/shell/basic.rb" changelist="6995392e-f204-4557-be32-fd20f300d877" time="1355161308510" ignored="false" />
110
+ <file path="$USER_HOME$/.rvm/gems/ruby-1.8.7-p371@global/gems/bundler-1.2.3/lib/bundler/dsl.rb" changelist="6995392e-f204-4557-be32-fd20f300d877" time="1355161308510" ignored="false" />
111
+ <file path="$USER_HOME$/.rvm/gems/ruby-1.8.7-p371@global/gems/bundler-1.2.3/lib/bundler.rb" changelist="6995392e-f204-4557-be32-fd20f300d877" time="1355161308510" ignored="false" />
112
+ <file path="$USER_HOME$/.rvm/gems/ruby-1.8.7-p371@global/gems/bundler-1.2.3/lib/bundler/vendor/thor/base.rb" changelist="6995392e-f204-4557-be32-fd20f300d877" time="1355161308510" ignored="false" />
113
+ <file path="$PROJECT_DIR$/../../ui/src/.rvmrc" changelist="6995392e-f204-4557-be32-fd20f300d877" time="1355178983225" ignored="false" />
114
+ <file path="/.rvmrc" changelist="6995392e-f204-4557-be32-fd20f300d877" time="1355178458251" ignored="false" />
115
+ <file path="$PROJECT_DIR$/../../ui/src/bin/signoff_server.sh" changelist="6995392e-f204-4557-be32-fd20f300d877" time="1355162000411" ignored="false" />
116
+ <file path="/signoff_server.sh" changelist="6995392e-f204-4557-be32-fd20f300d877" time="1355162000411" ignored="false" />
117
+ <file path="$PROJECT_DIR$/../../ui/src/thor/mysql_client.thor" changelist="6995392e-f204-4557-be32-fd20f300d877" time="1355171729126" ignored="false" />
118
+ <file path="/mysql_client.thor" changelist="6995392e-f204-4557-be32-fd20f300d877" time="1355171715036" ignored="false" />
119
+ <file path="$PROJECT_DIR$/../../ui/src/script/server" changelist="6995392e-f204-4557-be32-fd20f300d877" time="1355177080296" ignored="false" />
120
+ <file path="/server" changelist="6995392e-f204-4557-be32-fd20f300d877" time="1355177036710" ignored="false" />
121
+ <file path="$PROJECT_DIR$/../../ui/src/config/environment.rb" changelist="6995392e-f204-4557-be32-fd20f300d877" time="1355177639518" ignored="false" />
122
+ <file path="/environment.rb" changelist="6995392e-f204-4557-be32-fd20f300d877" time="1355177191360" ignored="false" />
123
+ <file path="/how-to-install-project-on-mountain-lion.txt" changelist="6995392e-f204-4557-be32-fd20f300d877" time="1355179671697" ignored="false" />
124
+ <file path="$PROJECT_DIR$/../../ui/src/config/dbauth/proteusui-vdv-dev" changelist="6995392e-f204-4557-be32-fd20f300d877" time="1355236982919" ignored="false" />
125
+ <file path="$PROJECT_DIR$/../../ui/src/config/dbauth/proteusui-billing-dev" changelist="6995392e-f204-4557-be32-fd20f300d877" time="1355236991453" ignored="false" />
126
+ <file path="$PROJECT_DIR$/../../ui/src/config/dbauthfiles/proteusui-billing-dev" changelist="6995392e-f204-4557-be32-fd20f300d877" time="1355244789972" ignored="false" />
127
+ <file path="$PROJECT_DIR$/../../ui/src/app/domain/partner.rb" changelist="6995392e-f204-4557-be32-fd20f300d877" time="1355245302438" ignored="false" />
128
+ <file path="/executable.rb" changelist="6995392e-f204-4557-be32-fd20f300d877" time="1355416708647" ignored="false" />
129
+ <file path="$PROJECT_DIR$/../../ui/src/thor/tomcat.thor" changelist="6995392e-f204-4557-be32-fd20f300d877" time="1355410403079" ignored="false" />
130
+ <file path="/tomcat.thor" changelist="6995392e-f204-4557-be32-fd20f300d877" time="1355410403079" ignored="false" />
131
+ <file path="$PROJECT_DIR$/../../ui/src/thor/ssh.thor" changelist="6995392e-f204-4557-be32-fd20f300d877" time="1355415898117" ignored="false" />
132
+ <file path="/ssh.thor" changelist="6995392e-f204-4557-be32-fd20f300d877" time="1355415893294" ignored="false" />
133
+ <file path="$PROJECT_DIR$/../../ui/src/thor/homer.thor" changelist="6995392e-f204-4557-be32-fd20f300d877" time="1355416035915" ignored="false" />
134
+ <file path="$PROJECT_DIR$/../../ui/src/vendor/gems/script_executor/lib/script_executor/script_executor.rb" changelist="6995392e-f204-4557-be32-fd20f300d877" time="1355415829525" ignored="false" />
135
+ <file path="$PROJECT_DIR$/../../ui/src/vendor/gems/script_executor/lib/script_executor.rb" changelist="6995392e-f204-4557-be32-fd20f300d877" time="1355411914177" ignored="false" />
136
+ <file path="$PROJECT_DIR$/../../ui/src/vendor/gems/script_executor/lib/executable.rb" changelist="6995392e-f204-4557-be32-fd20f300d877" time="1355411904894" ignored="false" />
137
+ <file path="$PROJECT_DIR$/../../ui/src/vendor/gems/script_executor/lib/script_executor/executable.rb" changelist="6995392e-f204-4557-be32-fd20f300d877" time="1355415271960" ignored="false" />
138
+ <file path="/homer.thor" changelist="6995392e-f204-4557-be32-fd20f300d877" time="1355416021332" ignored="false" />
77
139
  <option name="TRACKING_ENABLED" value="true" />
78
140
  <option name="SHOW_DIALOG" value="false" />
79
141
  <option name="HIGHLIGHT_CONFLICTS" value="true" />
@@ -93,25 +155,7 @@
93
155
  <file leaf-file-name="script_executor_spec.rb" pinned="false" current="false" current-in-tab="false">
94
156
  <entry file="file://$PROJECT_DIR$/spec/script_executor_spec.rb">
95
157
  <provider selected="true" editor-type-id="text-editor">
96
- <state line="44" column="129" selection-start="1112" selection-end="1112" vertical-scroll-proportion="0.0">
97
- <folding />
98
- </state>
99
- </provider>
100
- </entry>
101
- </file>
102
- <file leaf-file-name="spec_helper.rb" pinned="false" current="false" current-in-tab="false">
103
- <entry file="file://$PROJECT_DIR$/spec/spec_helper.rb">
104
- <provider selected="true" editor-type-id="text-editor">
105
- <state line="0" column="0" selection-start="0" selection-end="0" vertical-scroll-proportion="0.0">
106
- <folding />
107
- </state>
108
- </provider>
109
- </entry>
110
- </file>
111
- <file leaf-file-name="script_executor.rb" pinned="false" current="false" current-in-tab="false">
112
- <entry file="file://$PROJECT_DIR$/lib/script_executor.rb">
113
- <provider selected="true" editor-type-id="text-editor">
114
- <state line="2" column="0" selection-start="55" selection-end="55" vertical-scroll-proportion="0.0">
158
+ <state line="9" column="37" selection-start="208" selection-end="208" vertical-scroll-proportion="-5.5384617">
115
159
  <folding />
116
160
  </state>
117
161
  </provider>
@@ -120,43 +164,25 @@
120
164
  <file leaf-file-name="script_executor.rb" pinned="false" current="false" current-in-tab="false">
121
165
  <entry file="file://$PROJECT_DIR$/lib/script_executor/script_executor.rb">
122
166
  <provider selected="true" editor-type-id="text-editor">
123
- <state line="159" column="32" selection-start="3474" selection-end="3474" vertical-scroll-proportion="0.0">
124
- <folding />
125
- </state>
126
- </provider>
127
- </entry>
128
- </file>
129
- <file leaf-file-name="version.rb" pinned="false" current="false" current-in-tab="false">
130
- <entry file="file://$PROJECT_DIR$/lib/script_executor/version.rb">
131
- <provider selected="true" editor-type-id="text-editor">
132
- <state line="1" column="18" selection-start="40" selection-end="40" vertical-scroll-proportion="0.0">
167
+ <state line="3" column="0" selection-start="43" selection-end="43" vertical-scroll-proportion="0.0">
133
168
  <folding />
134
169
  </state>
135
170
  </provider>
136
171
  </entry>
137
172
  </file>
138
- <file leaf-file-name="Rakefile" pinned="false" current="false" current-in-tab="false">
139
- <entry file="file://$PROJECT_DIR$/Rakefile">
173
+ <file leaf-file-name="executable.rb" pinned="false" current="true" current-in-tab="true">
174
+ <entry file="file://$PROJECT_DIR$/lib/script_executor/executable.rb">
140
175
  <provider selected="true" editor-type-id="text-editor">
141
- <state line="31" column="121" selection-start="675" selection-end="675" vertical-scroll-proportion="0.0">
176
+ <state line="108" column="43" selection-start="2606" selection-end="2606" vertical-scroll-proportion="2.860927">
142
177
  <folding />
143
178
  </state>
144
179
  </provider>
145
180
  </entry>
146
181
  </file>
147
- <file leaf-file-name="CHANGES" pinned="false" current="false" current-in-tab="false">
148
- <entry file="file://$PROJECT_DIR$/CHANGES">
149
- <provider selected="true" editor-type-id="text-editor">
150
- <state line="9" column="43" selection-start="154" selection-end="154" vertical-scroll-proportion="0.0">
151
- <folding />
152
- </state>
153
- </provider>
154
- </entry>
155
- </file>
156
- <file leaf-file-name="Gemfile" pinned="false" current="true" current-in-tab="true">
182
+ <file leaf-file-name="Gemfile" pinned="false" current="false" current-in-tab="false">
157
183
  <entry file="file://$PROJECT_DIR$/Gemfile">
158
184
  <provider selected="true" editor-type-id="text-editor">
159
- <state line="8" column="24" selection-start="120" selection-end="120" vertical-scroll-proportion="0.2158516">
185
+ <state line="8" column="24" selection-start="120" selection-end="120" vertical-scroll-proportion="0.0">
160
186
  <folding />
161
187
  </state>
162
188
  </provider>
@@ -180,20 +206,22 @@
180
206
  <component name="IdeDocumentHistory">
181
207
  <option name="changedFiles">
182
208
  <list>
183
- <option value="$PROJECT_DIR$/spec/script_executor_spec.rb" />
184
- <option value="$PROJECT_DIR$/lib/script_executor/script_executor.rb" />
185
- <option value="$PROJECT_DIR$/lib/script_executor/version.rb" />
186
209
  <option value="$PROJECT_DIR$/CHANGES" />
187
210
  <option value="$PROJECT_DIR$/Rakefile" />
188
211
  <option value="$PROJECT_DIR$/Gemfile" />
212
+ <option value="$PROJECT_DIR$/lib/script_executor/version.rb" />
213
+ <option value="$PROJECT_DIR$/lib/script_executor.rb" />
214
+ <option value="$PROJECT_DIR$/lib/script_executor/script_executor.rb" />
215
+ <option value="$PROJECT_DIR$/spec/script_executor_spec.rb" />
216
+ <option value="$PROJECT_DIR$/lib/script_executor/executable.rb" />
189
217
  </list>
190
218
  </option>
191
219
  </component>
192
220
  <component name="ProjectFrameBounds">
193
- <option name="x" value="416" />
194
- <option name="y" value="22" />
195
- <option name="width" value="1506" />
196
- <option name="height" value="1170" />
221
+ <option name="x" value="262" />
222
+ <option name="y" value="33" />
223
+ <option name="width" value="1613" />
224
+ <option name="height" value="1087" />
197
225
  </component>
198
226
  <component name="ProjectLevelVcsManager" settingsEditedManually="false">
199
227
  <OptionsSetting value="true" id="Add" />
@@ -221,6 +249,7 @@
221
249
  <sortByType />
222
250
  </navigator>
223
251
  <panes>
252
+ <pane id="Scope" />
224
253
  <pane id="ProjectPane">
225
254
  <subPane>
226
255
  <PATH>
@@ -228,10 +257,6 @@
228
257
  <option name="myItemId" value="script_executor" />
229
258
  <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.ProjectViewProjectNode" />
230
259
  </PATH_ELEMENT>
231
- <PATH_ELEMENT>
232
- <option name="myItemId" value="External Libraries" />
233
- <option name="myItemType" value="com.intellij.ide.projectView.impl.nodes.ExternalLibrariesNode" />
234
- </PATH_ELEMENT>
235
260
  </PATH>
236
261
  <PATH>
237
262
  <PATH_ELEMENT>
@@ -291,19 +316,18 @@
291
316
  </PATH>
292
317
  </subPane>
293
318
  </pane>
294
- <pane id="Scope" />
295
319
  </panes>
296
320
  </component>
297
321
  <component name="PropertiesComponent">
298
322
  <property name="options.splitter.main.proportions" value="0.3" />
299
323
  <property name="WebServerToolWindowFactoryState" value="false" />
300
- <property name="options.lastSelected" value="org.jetbrains.plugins.ruby.settings.RubyIdeSdkConfigurable" />
301
324
  <property name="recentsLimit" value="5" />
325
+ <property name="options.lastSelected" value="org.jetbrains.plugins.ruby.settings.RubyIdeSdkConfigurable" />
302
326
  <property name="restartRequiresConfirmation" value="true" />
303
- <property name="options.searchVisible" value="true" />
304
327
  <property name="options.splitter.details.proportions" value="0.2" />
328
+ <property name="options.searchVisible" value="true" />
305
329
  </component>
306
- <component name="RunManager" selected="Ruby remote debug.remote">
330
+ <component name="RunManager" selected="RSpec.script_executor_spec">
307
331
  <configuration default="false" name="ScriptExecutor should execute commands from :script parameter" type="RSpecRunConfigurationType" factoryName="RSpec" temporary="true">
308
332
  <predefined_log_file id="RUBY_RSPEC" enabled="true" />
309
333
  <module name="script_executor" />
@@ -373,6 +397,39 @@
373
397
  <ConfigurationWrapper RunnerId="RubyRunner" />
374
398
  <method />
375
399
  </configuration>
400
+ <configuration default="false" name="script_executor_spec" type="RSpecRunConfigurationType" factoryName="RSpec" temporary="true">
401
+ <predefined_log_file id="RUBY_RSPEC" enabled="true" />
402
+ <module name="script_executor" />
403
+ <RSPEC_RUN_CONFIG_SETTINGS_ID NAME="RUBY_ARGS" VALUE="-e $stdout.sync=true;$stderr.sync=true;load($0=ARGV.shift)" />
404
+ <RSPEC_RUN_CONFIG_SETTINGS_ID NAME="WORK DIR" VALUE="$PROJECT_DIR$/spec" />
405
+ <RSPEC_RUN_CONFIG_SETTINGS_ID NAME="SHOULD_USE_SDK" VALUE="false" />
406
+ <RSPEC_RUN_CONFIG_SETTINGS_ID NAME="ALTERN_SDK_NAME" VALUE="" />
407
+ <RSPEC_RUN_CONFIG_SETTINGS_ID NAME="myPassParentEnvs" VALUE="true" />
408
+ <envs>
409
+ <env name="JRUBY_OPTS" value="-X+O" />
410
+ </envs>
411
+ <EXTENSION ID="BundlerRunConfigurationExtension" bundleExecEnabled="true" />
412
+ <EXTENSION ID="RubyCoverageRunConfigurationExtension" enabled="false" sample_coverage="true" track_test_folders="true" runner="rcov">
413
+ <COVERAGE_PATTERN ENABLED="true">
414
+ <PATTERN REGEXPS="/.rvm/" INCLUDED="false" />
415
+ </COVERAGE_PATTERN>
416
+ </EXTENSION>
417
+ <EXTENSION ID="org.jetbrains.plugins.ruby.motion.run.MotionSimulatorRunExtension" />
418
+ <RSPEC_RUN_CONFIG_SETTINGS_ID NAME="TESTS_FOLDER_PATH" VALUE="" />
419
+ <RSPEC_RUN_CONFIG_SETTINGS_ID NAME="TEST_SCRIPT_PATH" VALUE="$PROJECT_DIR$/spec/script_executor_spec.rb" />
420
+ <RSPEC_RUN_CONFIG_SETTINGS_ID NAME="SPEC_RUNNER_PATH" VALUE="" />
421
+ <RSPEC_RUN_CONFIG_SETTINGS_ID NAME="TEST_FILE_MASK" VALUE="**/*_spec.rb" />
422
+ <RSPEC_RUN_CONFIG_SETTINGS_ID NAME="SPEC_EXAMPLE_NAME" VALUE="" />
423
+ <RSPEC_RUN_CONFIG_SETTINGS_ID NAME="TEST_TEST_TYPE" VALUE="TEST_SCRIPT" />
424
+ <RSPEC_RUN_CONFIG_SETTINGS_ID NAME="SPEC_ARGS" VALUE="" />
425
+ <RSPEC_RUN_CONFIG_SETTINGS_ID NAME="RUNNER_VERSION" VALUE="" />
426
+ <RSPEC_RUN_CONFIG_SETTINGS_ID NAME="USE_CUSTOM_SPEC_RUNNER" VALUE="false" />
427
+ <RSPEC_RUN_CONFIG_SETTINGS_ID NAME="DRB" VALUE="false" />
428
+ <RSPEC_RUN_CONFIG_SETTINGS_ID NAME="FULL_BACKTRACE" VALUE="false" />
429
+ <RunnerSettings RunnerId="RubyRunner" />
430
+ <ConfigurationWrapper RunnerId="RubyRunner" />
431
+ <method />
432
+ </configuration>
376
433
  <configuration default="true" type="RSpecRunConfigurationType" factoryName="RSpec">
377
434
  <predefined_log_file id="RUBY_RSPEC" enabled="true" />
378
435
  <module name="" />
@@ -402,6 +459,50 @@
402
459
  <RSPEC_RUN_CONFIG_SETTINGS_ID NAME="FULL_BACKTRACE" VALUE="false" />
403
460
  <method />
404
461
  </configuration>
462
+ <configuration default="true" type="RubyRunConfigurationType" factoryName="Ruby">
463
+ <module name="" />
464
+ <RUBY_RUN_CONFIG NAME="RUBY_ARGS" VALUE="-e $stdout.sync=true;$stderr.sync=true;load($0=ARGV.shift)" />
465
+ <RUBY_RUN_CONFIG NAME="WORK DIR" VALUE="" />
466
+ <RUBY_RUN_CONFIG NAME="SHOULD_USE_SDK" VALUE="false" />
467
+ <RUBY_RUN_CONFIG NAME="ALTERN_SDK_NAME" VALUE="" />
468
+ <RUBY_RUN_CONFIG NAME="myPassParentEnvs" VALUE="true" />
469
+ <envs />
470
+ <EXTENSION ID="BundlerRunConfigurationExtension" bundleExecEnabled="false" />
471
+ <EXTENSION ID="RubyCoverageRunConfigurationExtension" enabled="false" sample_coverage="true" track_test_folders="true" runner="rcov">
472
+ <COVERAGE_PATTERN ENABLED="true">
473
+ <PATTERN REGEXPS="/.rvm/" INCLUDED="false" />
474
+ </COVERAGE_PATTERN>
475
+ </EXTENSION>
476
+ <EXTENSION ID="org.jetbrains.plugins.ruby.motion.run.MotionSimulatorRunExtension" />
477
+ <RUBY_RUN_CONFIG NAME="SCRIPT_PATH" VALUE="" />
478
+ <RUBY_RUN_CONFIG NAME="SCRIPT_ARGS" VALUE="" />
479
+ <method />
480
+ </configuration>
481
+ <configuration default="true" type="TestUnitRunConfigurationType" factoryName="Test::Unit/Shoulda/Minitest">
482
+ <predefined_log_file id="RUBY_TESTUNIT" enabled="true" />
483
+ <module name="" />
484
+ <RTEST_RUN_CONFIG_SETTINGS_ID NAME="RUBY_ARGS" VALUE="-e $stdout.sync=true;$stderr.sync=true;load($0=ARGV.shift)" />
485
+ <RTEST_RUN_CONFIG_SETTINGS_ID NAME="WORK DIR" VALUE="" />
486
+ <RTEST_RUN_CONFIG_SETTINGS_ID NAME="SHOULD_USE_SDK" VALUE="false" />
487
+ <RTEST_RUN_CONFIG_SETTINGS_ID NAME="ALTERN_SDK_NAME" VALUE="" />
488
+ <RTEST_RUN_CONFIG_SETTINGS_ID NAME="myPassParentEnvs" VALUE="true" />
489
+ <envs />
490
+ <EXTENSION ID="BundlerRunConfigurationExtension" bundleExecEnabled="false" />
491
+ <EXTENSION ID="RubyCoverageRunConfigurationExtension" enabled="false" sample_coverage="true" track_test_folders="true" runner="rcov">
492
+ <COVERAGE_PATTERN ENABLED="true">
493
+ <PATTERN REGEXPS="/.rvm/" INCLUDED="false" />
494
+ </COVERAGE_PATTERN>
495
+ </EXTENSION>
496
+ <EXTENSION ID="org.jetbrains.plugins.ruby.motion.run.MotionSimulatorRunExtension" />
497
+ <RTEST_RUN_CONFIG_SETTINGS_ID NAME="TESTS_FOLDER_PATH" VALUE="" />
498
+ <RTEST_RUN_CONFIG_SETTINGS_ID NAME="TEST_SCRIPT_PATH" VALUE="" />
499
+ <RTEST_RUN_CONFIG_SETTINGS_ID NAME="TEST_FILE_MASK" VALUE="" />
500
+ <RTEST_RUN_CONFIG_SETTINGS_ID NAME="TEST_METHOD_NAME" VALUE="" />
501
+ <RTEST_RUN_CONFIG_SETTINGS_ID NAME="TEST_TEST_TYPE" VALUE="TEST_SCRIPT" />
502
+ <RTEST_RUN_CONFIG_SETTINGS_ID NAME="DRB" VALUE="false" />
503
+ <RTEST_RUN_CONFIG_SETTINGS_ID NAME="RUNNER_OPTIONS" VALUE="" />
504
+ <method />
505
+ </configuration>
405
506
  <configuration default="true" type="RubyRemoteDebugConfigurationType" factoryName="Ruby remote debug">
406
507
  <RUBY_REMOTE_DEBUG_CONFIG NAME="REMOTE_HOST" VALUE="localhost" />
407
508
  <RUBY_REMOTE_DEBUG_CONFIG NAME="PORT" VALUE="1234" />
@@ -420,15 +521,18 @@
420
521
  <ConfigurationWrapper RunnerId="RubyRemoteDebugRunner" />
421
522
  <method />
422
523
  </configuration>
423
- <list size="3">
424
- <item index="0" class="java.lang.String" itemvalue="RSpec.ScriptExecutor should execute commands from :script parameter" />
425
- <item index="1" class="java.lang.String" itemvalue="RSpec.ScriptExecutor should execute commands locally from the block of code as sudo" />
426
- <item index="2" class="java.lang.String" itemvalue="Ruby remote debug.remote" />
524
+ <list size="4">
525
+ <item index="0" class="java.lang.String" itemvalue="Ruby remote debug.remote" />
526
+ <item index="1" class="java.lang.String" itemvalue="RSpec.ScriptExecutor should execute commands from :script parameter" />
527
+ <item index="2" class="java.lang.String" itemvalue="RSpec.ScriptExecutor should execute commands locally from the block of code as sudo" />
528
+ <item index="3" class="java.lang.String" itemvalue="RSpec.script_executor_spec" />
427
529
  </list>
428
530
  <recent_temporary>
429
- <list size="2">
430
- <item index="0" class="java.lang.String" itemvalue="RSpec.ScriptExecutor should execute commands from :script parameter" />
431
- <item index="1" class="java.lang.String" itemvalue="RSpec.ScriptExecutor should execute commands locally from the block of code as sudo" />
531
+ <list size="4">
532
+ <item index="0" class="java.lang.String" itemvalue="RSpec.script_executor_spec" />
533
+ <item index="1" class="java.lang.String" itemvalue="RSpec.script_executor_spec" />
534
+ <item index="2" class="java.lang.String" itemvalue="RSpec.ScriptExecutor should execute commands from :script parameter" />
535
+ <item index="3" class="java.lang.String" itemvalue="RSpec.ScriptExecutor should execute commands locally from the block of code as sudo" />
432
536
  </list>
433
537
  </recent_temporary>
434
538
  </component>
@@ -442,27 +546,27 @@
442
546
  <servers />
443
547
  </component>
444
548
  <component name="ToolWindowManager">
445
- <frame x="416" y="22" width="1506" height="1170" extended-state="0" />
446
- <editor active="true" />
549
+ <frame x="262" y="33" width="1613" height="1087" extended-state="0" />
550
+ <editor active="false" />
447
551
  <layout>
448
- <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="-1" side_tool="false" content_ui="tabs" />
449
- <window_info id="Changes" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" sideWeight="0.5" order="-1" side_tool="false" content_ui="tabs" />
552
+ <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" />
450
553
  <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" />
451
- <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="-1" side_tool="false" content_ui="tabs" />
554
+ <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" />
452
555
  <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" />
453
- <window_info id="Project" active="false" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="true" weight="0.31164384" sideWeight="0.6001864" order="0" side_tool="false" content_ui="combo" />
454
- <window_info id="Debug" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="true" weight="0.3998136" sideWeight="0.5" order="3" side_tool="false" content_ui="tabs" />
455
- <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="-1" side_tool="true" content_ui="tabs" />
456
- <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="-1" side_tool="true" content_ui="tabs" />
457
- <window_info id="Run" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.32618827" sideWeight="0.5" order="2" side_tool="false" content_ui="tabs" />
458
- <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="-1" side_tool="false" content_ui="tabs" />
556
+ <window_info id="Project" active="true" anchor="left" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="true" weight="0.22463305" sideWeight="0.63838387" order="0" side_tool="false" content_ui="combo" />
557
+ <window_info id="Debug" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.3989071" sideWeight="0.5" order="3" side_tool="false" content_ui="tabs" />
558
+ <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" />
559
+ <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" />
560
+ <window_info id="Run" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.32525253" sideWeight="0.5" order="2" side_tool="false" content_ui="tabs" />
561
+ <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" />
459
562
  <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" />
460
563
  <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" />
461
- <window_info id="Find" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" sideWeight="0.5" order="1" side_tool="false" content_ui="tabs" />
462
564
  <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" />
565
+ <window_info id="Find" active="false" anchor="bottom" auto_hide="false" internal_type="DOCKED" type="DOCKED" visible="false" weight="0.33" sideWeight="0.5" order="1" side_tool="false" content_ui="tabs" />
566
+ <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" />
463
567
  <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" />
464
- <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" />
465
568
  <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" />
569
+ <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" />
466
570
  </layout>
467
571
  </component>
468
572
  <component name="VcsContentAnnotationSettings">
@@ -517,21 +621,17 @@
517
621
  </component>
518
622
  <component name="XDebuggerManager">
519
623
  <breakpoint-manager>
520
- <breakpoints>
521
- <line-breakpoint enabled="true" type="ruby-line">
522
- <url>file://$PROJECT_DIR$/spec/script_executor_spec.rb</url>
523
- <line>42</line>
524
- </line-breakpoint>
525
- <line-breakpoint enabled="true" type="ruby-line">
526
- <url>file://$PROJECT_DIR$/lib/script_executor/script_executor.rb</url>
527
- <line>31</line>
528
- <option name="timeStamp" value="1" />
529
- </line-breakpoint>
530
- </breakpoints>
531
624
  <option name="time" value="2" />
532
625
  </breakpoint-manager>
533
626
  </component>
534
627
  <component name="editorHistoryManager">
628
+ <entry file="file://$PROJECT_DIR$/spec/script_executor_spec.rb">
629
+ <provider selected="true" editor-type-id="text-editor">
630
+ <state line="45" column="14" selection-start="1012" selection-end="1012" vertical-scroll-proportion="0.0">
631
+ <folding />
632
+ </state>
633
+ </provider>
634
+ </entry>
535
635
  <entry file="file://$PROJECT_DIR$/spec/spec_helper.rb">
536
636
  <provider selected="true" editor-type-id="text-editor">
537
637
  <state line="0" column="0" selection-start="0" selection-end="0" vertical-scroll-proportion="0.0">
@@ -546,44 +646,87 @@
546
646
  </state>
547
647
  </provider>
548
648
  </entry>
549
- <entry file="file://$PROJECT_DIR$/spec/script_executor_spec.rb">
649
+ <entry file="file://$PROJECT_DIR$/lib/script_executor/script_executor.rb">
550
650
  <provider selected="true" editor-type-id="text-editor">
551
- <state line="44" column="129" selection-start="1112" selection-end="1112" vertical-scroll-proportion="0.0">
651
+ <state line="159" column="32" selection-start="3474" selection-end="3474" vertical-scroll-proportion="0.0">
552
652
  <folding />
553
653
  </state>
554
654
  </provider>
555
655
  </entry>
556
- <entry file="file://$PROJECT_DIR$/lib/script_executor/script_executor.rb">
656
+ <entry file="file://$PROJECT_DIR$/lib/script_executor/version.rb">
557
657
  <provider selected="true" editor-type-id="text-editor">
558
- <state line="159" column="32" selection-start="3474" selection-end="3474" vertical-scroll-proportion="0.0">
658
+ <state line="1" column="18" selection-start="40" selection-end="40" vertical-scroll-proportion="0.0">
559
659
  <folding />
560
660
  </state>
561
661
  </provider>
562
662
  </entry>
563
- <entry file="file://$PROJECT_DIR$/CHANGES">
663
+ <entry file="file://$PROJECT_DIR$/Rakefile">
564
664
  <provider selected="true" editor-type-id="text-editor">
565
- <state line="9" column="43" selection-start="154" selection-end="154" vertical-scroll-proportion="0.0">
665
+ <state line="31" column="3" selection-start="675" selection-end="675" vertical-scroll-proportion="0.0" />
666
+ </provider>
667
+ </entry>
668
+ <entry file="file://$PROJECT_DIR$/Gemfile">
669
+ <provider selected="true" editor-type-id="text-editor">
670
+ <state line="8" column="24" selection-start="120" selection-end="120" vertical-scroll-proportion="0.0">
566
671
  <folding />
567
672
  </state>
568
673
  </provider>
569
674
  </entry>
675
+ <entry file="file://$PROJECT_DIR$/CHANGES">
676
+ <provider selected="true" editor-type-id="text-editor">
677
+ <state line="9" column="43" selection-start="154" selection-end="154" vertical-scroll-proportion="0.0" />
678
+ </provider>
679
+ </entry>
680
+ <entry file="file://$PROJECT_DIR$/Rakefile">
681
+ <provider selected="true" editor-type-id="text-editor">
682
+ <state line="31" column="3" selection-start="675" selection-end="675" vertical-scroll-proportion="0.7178003" />
683
+ </provider>
684
+ </entry>
570
685
  <entry file="file://$PROJECT_DIR$/lib/script_executor/version.rb">
571
686
  <provider selected="true" editor-type-id="text-editor">
572
- <state line="1" column="18" selection-start="40" selection-end="40" vertical-scroll-proportion="0.0">
687
+ <state line="1" column="18" selection-start="40" selection-end="40" vertical-scroll-proportion="0.023154847">
573
688
  <folding />
574
689
  </state>
575
690
  </provider>
576
691
  </entry>
577
- <entry file="file://$PROJECT_DIR$/Rakefile">
692
+ <entry file="file://$PROJECT_DIR$/spec/spec_helper.rb">
578
693
  <provider selected="true" editor-type-id="text-editor">
579
- <state line="31" column="121" selection-start="675" selection-end="675" vertical-scroll-proportion="0.0">
694
+ <state line="0" column="0" selection-start="0" selection-end="0" vertical-scroll-proportion="0.0">
695
+ <folding />
696
+ </state>
697
+ </provider>
698
+ </entry>
699
+ <entry file="file://$PROJECT_DIR$/lib/script_executor/script_executor.rb">
700
+ <provider selected="true" editor-type-id="text-editor">
701
+ <state line="3" column="0" selection-start="43" selection-end="43" vertical-scroll-proportion="0.0">
580
702
  <folding />
581
703
  </state>
582
704
  </provider>
583
705
  </entry>
584
706
  <entry file="file://$PROJECT_DIR$/Gemfile">
585
707
  <provider selected="true" editor-type-id="text-editor">
586
- <state line="8" column="24" selection-start="120" selection-end="120" vertical-scroll-proportion="0.2158516">
708
+ <state line="8" column="24" selection-start="120" selection-end="120" vertical-scroll-proportion="0.0">
709
+ <folding />
710
+ </state>
711
+ </provider>
712
+ </entry>
713
+ <entry file="file://$PROJECT_DIR$/lib/script_executor.rb">
714
+ <provider selected="true" editor-type-id="text-editor">
715
+ <state line="2" column="41" selection-start="96" selection-end="96" vertical-scroll-proportion="0.052980132">
716
+ <folding />
717
+ </state>
718
+ </provider>
719
+ </entry>
720
+ <entry file="file://$PROJECT_DIR$/spec/script_executor_spec.rb">
721
+ <provider selected="true" editor-type-id="text-editor">
722
+ <state line="9" column="37" selection-start="208" selection-end="208" vertical-scroll-proportion="-5.5384617">
723
+ <folding />
724
+ </state>
725
+ </provider>
726
+ </entry>
727
+ <entry file="file://$PROJECT_DIR$/lib/script_executor/executable.rb">
728
+ <provider selected="true" editor-type-id="text-editor">
729
+ <state line="108" column="43" selection-start="2606" selection-end="2606" vertical-scroll-proportion="2.860927">
587
730
  <folding />
588
731
  </state>
589
732
  </provider>
data/lib/executable.rb ADDED
@@ -0,0 +1,3 @@
1
+ require 'rubygems' unless Object.const_defined?(:Gem)
2
+
3
+ require 'script_executor/executable'
@@ -1,3 +1,3 @@
1
1
  require 'rubygems' unless Object.const_defined?(:Gem)
2
2
 
3
- require 'script_executor/script_executor'
3
+ require 'script_executor/script_executor'
@@ -0,0 +1,177 @@
1
+ require 'net/ssh'
2
+ require "highline/import"
3
+
4
+ module Executable
5
+
6
+ def execute params={}, &code
7
+ if params.class != Hash
8
+ simple_commands = commands_from_object(params)
9
+ params = {}
10
+ script = simple_commands
11
+ else
12
+ script = params[:script]
13
+ end
14
+
15
+ commands = locate_commands script, &code
16
+
17
+ if commands.nil?
18
+ puts "No commands were provided!"
19
+ return
20
+ end
21
+
22
+ commands = sudo(commands) if params[:sudo]
23
+
24
+ remote = params[:remote]
25
+ domain = params[:domain]
26
+ user = params[:user]
27
+ password = params[:password]
28
+ identity_file = params[:identity_file]
29
+ capture_output = params[:capture_output]
30
+ simulate = params[:simulate]
31
+
32
+ print_execution commands, remote, domain, user, identity_file, simulate
33
+
34
+ printer = Proc.new { |data| print data }
35
+
36
+ unless simulate
37
+ if remote
38
+ execute_ssh commands, domain, user, password, identity_file, printer, capture_output
39
+ else
40
+ execute_command commands, password, printer, capture_output
41
+ end
42
+ end
43
+ end
44
+
45
+ private
46
+
47
+ def print_execution commands, remote, domain, user, identity_file, simulate
48
+ if remote
49
+ ssh_command = ssh_command(domain, user, identity_file)
50
+
51
+ if simulate
52
+ puts "Remote script: '#{ssh_command}'"
53
+ puts "-------"
54
+ print_commands commands
55
+ puts "-------"
56
+ else
57
+ puts "Remote execution on: '#{ssh_command}'"
58
+ puts "-------"
59
+ print_commands commands
60
+ puts "-------"
61
+ end
62
+ else
63
+ if simulate
64
+ puts "Script:"
65
+ puts "-------"
66
+ print_commands commands
67
+ puts "-------"
68
+ else
69
+ puts "Local execution:"
70
+ puts "-------"
71
+ print_commands(commands)
72
+ puts "-------"
73
+ end
74
+ end
75
+ end
76
+
77
+ def print_commands commands
78
+ lines = StringIO.new commands
79
+
80
+ lines.each_line do |line|
81
+ puts line
82
+ end
83
+ end
84
+
85
+ def execute_command commands, password, printer, capture_output=false
86
+ result = capture_output ? [] : nil
87
+
88
+ commands = commands + inline_password(password) if password
89
+
90
+ IO.popen(commands).each_line do |line|
91
+ if capture_output
92
+ result << line.chomp
93
+ else
94
+ printer.call(line)
95
+ end
96
+ end
97
+
98
+ result.join("\n") if capture_output
99
+ end
100
+
101
+ def inline_password password
102
+ password ? "<<EOF\n#{password}\nEOF" : ""
103
+ end
104
+
105
+ def execute_ssh commands, domain, user, password, identity_file, printer, capture_output=false
106
+ if password.nil?
107
+ password = ask("Enter password for #{user}: ") { |q| q.echo = '*' }
108
+ end
109
+
110
+ result = capture_output ? [] : nil
111
+
112
+ 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:/
115
+ #puts "Password request"
116
+ channel.request_pty # <- problem must be here.
117
+ channel.send_data password + "\n"
118
+ else
119
+ #buffer << data.chomp
120
+ if capture_output
121
+ result << data.chomp
122
+ else
123
+ printer.call(data)
124
+ end
125
+ end
126
+ end
127
+
128
+ # run the aggregated event loop
129
+ session.loop
130
+ end
131
+
132
+ result.join("\n") if capture_output
133
+ end
134
+
135
+ def locate_commands script, &code
136
+ if block_given?
137
+ commands_from_block &code
138
+ elsif script
139
+ commands_from_object script
140
+ else
141
+ nil
142
+ end
143
+ end
144
+
145
+ def commands_from_block &code
146
+ s1 = code.call.split(/\n/)
147
+ s2 = s1.reject {|el| el.strip.size == 0 || el.empty?}
148
+ s3 = s2.collect {|el| el.strip}
149
+
150
+ s3.join("\n")
151
+ end
152
+
153
+ def commands_from_object object
154
+ if object.class == String
155
+ object
156
+ elsif object.class == Array
157
+ object.join("\n")
158
+ else
159
+ object
160
+ end
161
+ end
162
+
163
+ def ssh_command domain, user, identity_file
164
+ cmd = user.nil? ? domain : "#{user}@#{domain}"
165
+
166
+ cmd << " -i #{identity_file}" if identity_file
167
+
168
+ #cmd << " -t -t"
169
+
170
+ "ssh #{cmd}"
171
+ end
172
+
173
+ def sudo commands
174
+ "sudo -S -p 'sudo password: ' -s -- '#{commands}'"
175
+ end
176
+
177
+ end
@@ -1,163 +1,6 @@
1
- require 'shellwords'
2
- require 'net/ssh'
3
- require "highline/import"
1
+ require 'executable'
4
2
 
5
3
  class ScriptExecutor
6
-
7
- def execute params={}, &code
8
- if params.class != Hash
9
- simple_commands = commands_from_object(params)
10
- params = {}
11
- params[:script] = simple_commands
12
- end
13
-
14
- remote = params.delete(:remote)
15
-
16
- remote ? remote_execute(params, &code) : local_execute(params, &code)
17
- end
18
-
19
- def local_execute params={}, &code
20
- simulate = params.delete(:simulate)
21
- sudo = params.delete(:sudo)
22
-
23
- commands = locate_commands params[:script], &code
24
-
25
- if commands.nil?
26
- puts "No commands were provided!"
27
- return
28
- end
29
-
30
- commands = sudo(commands) if sudo
31
-
32
- if simulate
33
- puts "Script:"
34
- puts "-------"
35
- print_commands commands
36
- puts "-------"
37
- else
38
- puts "Local execution:"
39
- puts "-------"
40
- print_commands(commands)
41
- puts "-------"
42
- execute_command commands, params[:capture_output]
43
- end
44
- end
45
-
46
- def remote_execute params={}, &code
47
- simulate = params.delete(:simulate)
48
- sudo = params.delete(:sudo)
49
-
50
- commands = locate_commands params[:script], &code
51
-
52
- if commands.nil?
53
- puts "No commands were provided!"
54
- return
55
- end
56
-
57
- commands = sudo(commands) if sudo
58
-
59
- ssh_command = ssh_command(params[:domain], params[:user], params[:identity_file])
60
-
61
- if simulate
62
- puts "Remote script: '#{ssh_command}'"
63
- puts "-------"
64
- print_commands commands
65
- puts "-------"
66
- else
67
- puts "Remote execution on: '#{ssh_command}'"
68
- puts "-------"
69
- print_commands commands
70
- puts "-------"
71
-
72
- execute_ssh(params[:domain], params[:user], commands)
73
- end
74
- end
75
-
76
- private
77
-
78
- def print_commands commands
79
- lines = StringIO.new commands
80
-
81
- lines.each_line do |line|
82
- puts line
83
- end
84
- end
85
-
86
- def execute_command commands, capture_output=false
87
- if capture_output
88
- buffer = []
89
-
90
- IO.popen(commands).each_line do |line|
91
- buffer << line.chomp
92
- end
93
-
94
- buffer.join("\n")
95
- else
96
- IO.popen(commands).each_line do |line|
97
- print line
98
- end
99
- end
100
- end
101
-
102
- def execute_ssh domain, user, commands
103
- password = ask("Enter password for #{user}: ") { |q| q.echo = '*' }
104
-
105
- Net::SSH.start(domain, user, :password => password) do |session|
106
- session.exec "#{commands}" do |channel, _, data|
107
- if data =~ /^\[sudo\] password for user:/ || data =~ /sudo password:/
108
- #puts "Password request"
109
- channel.request_pty # <- problem must be here.
110
- channel.send_data password + "\n"
111
- else
112
- print data
113
- end
114
- end
115
-
116
- # run the aggregated event loop
117
- session.loop
118
- end
119
- end
120
-
121
- def locate_commands script, &code
122
- if block_given?
123
- commands_from_block &code
124
- elsif script
125
- commands_from_object script
126
- else
127
- nil
128
- end
129
- end
130
-
131
- def commands_from_block &code
132
- s1 = code.call.split(/\n/)
133
- s2 = s1.reject {|el| el.strip.size == 0 || el.empty?}
134
- s3 = s2.collect {|el| el.strip}
135
-
136
- s3.join("\n")
137
- end
138
-
139
- def commands_from_object object
140
- if object.class == String
141
- object
142
- elsif object.class == Array
143
- object.join("\n")
144
- else
145
- object
146
- end
147
- end
148
-
149
- def ssh_command domain, user, identity_file
150
- cmd = user.nil? ? domain : "#{user}@#{domain}"
151
-
152
- cmd << " -i #{identity_file}" if identity_file
153
-
154
- #cmd << " -t -t"
155
-
156
- "ssh #{cmd}"
157
- end
158
-
159
- def sudo commands
160
- "sudo -S -p 'sudo password: ' -s -- '#{commands}'"
161
- end
4
+ include Executable
162
5
 
163
6
  end
@@ -1,3 +1,3 @@
1
1
  module ScriptExecutor
2
- VERSION = "1.0.1"
2
+ VERSION = "1.1.0"
3
3
  end
@@ -3,64 +3,87 @@ require File.expand_path('spec_helper', File.dirname(__FILE__))
3
3
  require 'script_executor'
4
4
 
5
5
  describe ScriptExecutor do
6
- server_info = {
7
- :simulate => false,
8
- :domain => "localhost",
9
- :user => "user",
10
- :remote => true
11
- }
12
6
 
13
7
  subject { ScriptExecutor.new }
14
8
 
15
- it "should execute commands from :script parameter" do
16
- subject.execute server_info.merge(:script => "ls -al")
17
-
18
- #result.should include "file_utils/version.rb"
9
+ before :all do
10
+ @password ||= ask("Enter password for #{ENV['USER']}: ") { |q| q.echo = '*' }
19
11
  end
20
12
 
21
- it "should execute commands from the block of code" do
22
- subject.execute server_info do
23
- %Q(
24
- ls -al
25
- )
13
+ describe "local execution" do
14
+ before :all do
15
+ @local_info = {
16
+ :capture_output => true
17
+ }
26
18
  end
27
- end
28
19
 
29
- it "should execute commands locally from :script parameter" do
30
- subject.execute :script => "ls -al", :simulate => false
31
- end
20
+ it "should execute commands locally from :script parameter" do
21
+ result = subject.execute @local_info.merge(:script => "whoami")
32
22
 
33
- it "should execute commands locally from the block of code" do
34
- subject.execute do
35
- %Q(
36
- ls -al
37
- ls
23
+ result.should == ENV['USER']
24
+ end
25
+
26
+ it "should execute commands locally from the block of code" do
27
+ result = subject.execute @local_info do
28
+ %Q(
29
+ whoami
30
+ whoami
38
31
  )
32
+ end
33
+
34
+ result.to_s.should == "#{ENV['USER']}\n#{ENV['USER']}"
39
35
  end
40
- end
41
36
 
42
- it "should execute commands locally from the block of code as sudo" do
43
- subject.execute :sudo => true do
44
- %Q(
45
- cp /Users/oshvets/work/dev_contrib/installs/oracle-client/instantclient-basic-10.2.0.4.0-macosx-x86.zip /usr/local/oracle
46
- cp /Users/oshvets/work/dev_contrib/installs/oracle-client/instantclient-sdk-10.2.0.4.0-macosx-x86.zip /usr/local/oracle
37
+ it "should execute commands locally from the block of code as sudo" do
38
+ result = subject.execute @local_info.merge(:sudo => true, :password => @password) do
39
+ %Q(
40
+ whoami
41
+ whoami
47
42
  )
43
+ end
44
+
45
+ puts "2 #{@password}"
46
+ result.to_s.should == "root\nroot"
48
47
  end
49
48
  end
50
49
 
51
- it "should execute sudo command locally" do
52
- subject.execute :sudo => true, :simulate => false, :remote => false do
53
- %Q(
54
- ~/apache-tomcat-7.0.27/bin/shutdown.sh
50
+ describe "remote execution" do
51
+ before :all do
52
+ @remote_info = {
53
+ :simulate => false,
54
+ :domain => "localhost",
55
+ :user => ENV['USER'],
56
+ :password => @password,
57
+ :remote => true,
58
+ :capture_output => true
59
+ }
60
+ end
61
+
62
+ it "should execute commands from :script parameter" do
63
+ result = subject.execute @remote_info.merge(:script => "whoami")
64
+
65
+ result.should == ENV['USER']
66
+ end
67
+
68
+ it "should execute commands from the block of code" do
69
+ result = subject.execute @remote_info do
70
+ %Q(
71
+ whoami
55
72
  )
73
+ end
74
+
75
+ result.should == ENV['USER']
56
76
  end
57
- end
58
77
 
59
- it "should execute sudo command on remote side" do
60
- subject.execute server_info.merge(:sudo => true, :simulate => false, :remote => true) do
61
- %Q(
62
- /etc/init.d/tomcat5 restart
78
+ it "should execute sudo command" do
79
+ result = subject.execute @remote_info.merge(:sudo => true, :password => @password) do
80
+ %Q(
81
+ ~/apache-tomcat-7.0.34/bin/shutdown.sh
63
82
  )
83
+ end
84
+
85
+ p result
64
86
  end
65
87
  end
88
+
66
89
  end
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.0.1
4
+ version: 1.1.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-09 00:00:00.000000000 Z
12
+ date: 2012-12-13 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: highline
@@ -100,7 +100,9 @@ files:
100
100
  - LICENSE
101
101
  - README.md
102
102
  - Rakefile
103
+ - lib/executable.rb
103
104
  - lib/script_executor.rb
105
+ - lib/script_executor/executable.rb
104
106
  - lib/script_executor/script_executor.rb
105
107
  - lib/script_executor/version.rb
106
108
  - script_executor.gemspec