ass_launcher 0.6.0 → 0.7.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.travis.yml +15 -0
- data/README.md +205 -97
- data/ass_launcher.gemspec +1 -2
- data/en.README.md +235 -0
- data/examples/README.md +35 -0
- data/examples/create_infobase_example.rb +1 -1
- data/examples/enterprise_ole_example.rb +15 -15
- data/examples/enterprise_running_example.rb +1 -1
- data/examples/example_helper.rb +2 -2
- data/examples/troubles/README.md +20 -0
- data/examples/troubles/with_creteinfobase_example.rb +23 -23
- data/examples/troubles/with_running_1c_example.rb +1 -71
- data/examples/v8i_file_example.rb +1 -1
- data/lib/ass_launcher.rb +1 -0
- data/lib/ass_launcher/cmd.rb +1 -1
- data/lib/ass_launcher/enterprise/cli/arguments_builder.rb +1 -1
- data/lib/ass_launcher/enterprise/cli/spec_dsl.rb +7 -5
- data/lib/ass_launcher/enterprise/cli_def/8.3.13.rb +9 -0
- data/lib/ass_launcher/enterprise/ole/ole_binaries.rb +3 -3
- data/lib/ass_launcher/support/shell/process_holder.rb +9 -9
- data/lib/ass_launcher/version.rb +1 -8
- metadata +21 -5
@@ -26,7 +26,7 @@ module Examples
|
|
26
26
|
command.run.wait
|
27
27
|
end
|
28
28
|
|
29
|
-
it 'Designer show
|
29
|
+
it 'Designer show dialog with error message for serevr infobase' do
|
30
30
|
skip unless TROUBLES_EXECUTE_CONTROL::SHOW_STUPID_GUI
|
31
31
|
designer = CLIENTS::THICK.command :designer do
|
32
32
|
_S 'example.org/fake_ib'
|
@@ -36,34 +36,6 @@ module Examples
|
|
36
36
|
# It show GUI
|
37
37
|
designer.run.wait
|
38
38
|
end
|
39
|
-
|
40
|
-
describe 'Solution. For file infobase only!!!' do
|
41
|
-
it 'Arguments builder check existing path for /F parameter' do
|
42
|
-
proc {
|
43
|
-
CLIENTS::THICK.command(:enterprise) do
|
44
|
-
_F 'bad infobase path'
|
45
|
-
end
|
46
|
-
}.must_raise ArgumentError
|
47
|
-
end
|
48
|
-
|
49
|
-
it 'Connection string fails in #to_args method if path not exists' do
|
50
|
-
extend AssLauncher::Api
|
51
|
-
conns = cs_file file: 'bad infobase path'
|
52
|
-
|
53
|
-
# Call #to_args directly
|
54
|
-
proc {
|
55
|
-
CLIENTS::THIN.command(conns.to_args)
|
56
|
-
}.must_raise Errno::ENOENT
|
57
|
-
|
58
|
-
# Passing connection string into arguments builder
|
59
|
-
# have the same effect
|
60
|
-
proc {
|
61
|
-
CLIENTS::THIN.command do
|
62
|
-
connection_string conns
|
63
|
-
end
|
64
|
-
}.must_raise Errno::ENOENT
|
65
|
-
end
|
66
|
-
end
|
67
39
|
end
|
68
40
|
|
69
41
|
describe '1C:Enterprise ignores mistakes in CLI parameters' do
|
@@ -89,20 +61,6 @@ module Examples
|
|
89
61
|
command.run.wait.result.exitstatus.must_equal 0
|
90
62
|
end
|
91
63
|
|
92
|
-
it 'One of the rare cases when 1C:Enterprise verifies of paramter value' do
|
93
|
-
command = CLIENTS::THICK\
|
94
|
-
.command(:designer, ['/F', TMP::EMPTY_IB]) do
|
95
|
-
checkModules do
|
96
|
-
thinClient
|
97
|
-
eXtension 'bad value'
|
98
|
-
end
|
99
|
-
end
|
100
|
-
command.run.wait.result.exitstatus.wont_equal 0
|
101
|
-
|
102
|
-
# But doesn't explains cause of error
|
103
|
-
command.process_holder.result.assout.must_equal ''
|
104
|
-
end
|
105
|
-
|
106
64
|
describe 'Solutions this troubles with arguments builder' do
|
107
65
|
it 'Arguments builder fails BuildError if unknown parameter given' do
|
108
66
|
proc {
|
@@ -163,34 +121,6 @@ module Examples
|
|
163
121
|
source_string.wont_equal ret_string
|
164
122
|
ret_string.must_equal 'Hello \\\\\\'
|
165
123
|
end
|
166
|
-
|
167
|
-
describe 'Solutions' do
|
168
|
-
it 'Check value /C parameter with arguments builder' do
|
169
|
-
proc {
|
170
|
-
CLIENTS::THIN.command do
|
171
|
-
_C '"'
|
172
|
-
end
|
173
|
-
}.must_raise ArgumentError
|
174
|
-
end
|
175
|
-
|
176
|
-
it 'Passing value with single quote char' do
|
177
|
-
source_string = 'Hello \'World\''
|
178
|
-
|
179
|
-
enterprise = CLIENTS::THICK\
|
180
|
-
.command :enterprise do
|
181
|
-
_C source_string
|
182
|
-
connection_string TMP::EMPTY_IB_CS
|
183
|
-
_Debug
|
184
|
-
debuggerURL 'tcp://localhost'
|
185
|
-
_Execute TEMPLATES::HELLO_EPF
|
186
|
-
end
|
187
|
-
|
188
|
-
enterprise.run.wait
|
189
|
-
ret_string = enterprise.process_holder.result.assout.strip
|
190
|
-
|
191
|
-
source_string.must_equal ret_string
|
192
|
-
end
|
193
|
-
end
|
194
124
|
end
|
195
125
|
|
196
126
|
describe 'Designer talks "Infobase not found!" but exit with 0 for file infobase' do
|
data/lib/ass_launcher.rb
CHANGED
data/lib/ass_launcher/cmd.rb
CHANGED
@@ -16,7 +16,7 @@ module AssLauncher
|
|
16
16
|
# +-SomeParameter+ CLI parameter. DLS methods case insensitive.
|
17
17
|
# Top level builder have method
|
18
18
|
# {IncludeConnectionString#connection_string} for pass connection
|
19
|
-
# string and convert
|
19
|
+
# string and convert connection string into arguments array.
|
20
20
|
# @example
|
21
21
|
# client = AssLauncher::Enterprise.thick_clients('> 0').sort.last
|
22
22
|
# # Builds arguments for check configuration:
|
@@ -102,7 +102,7 @@ module AssLauncher
|
|
102
102
|
end
|
103
103
|
alias_method :chose_list, :switch_list
|
104
104
|
|
105
|
-
# Define {Cli::Parameters::Path} parameter and
|
105
|
+
# Define {Cli::Parameters::Path} parameter and its subparameters.
|
106
106
|
# Subparameters defines in the block.
|
107
107
|
# @param name [String] name of 1C:Enterprise CLI parameter
|
108
108
|
# @param desc [String] description of 1C:Enterprise CLI parameter for
|
@@ -136,13 +136,15 @@ module AssLauncher
|
|
136
136
|
&block)
|
137
137
|
end
|
138
138
|
|
139
|
+
# Define {Cli::Parameters::PathTwice} parameter and its subparameters.
|
140
|
+
# Subparameters defines in the block.
|
139
141
|
# @return [Cli::Parameters::PathTwice]
|
140
142
|
def path_twice(name, desc, *clients, **options, &block)
|
141
143
|
new_param(Parameters::PathTwice, name, desc,
|
142
144
|
clients, **options, &block)
|
143
145
|
end
|
144
146
|
|
145
|
-
# Define {Cli::Parameters::StringParam} parameter and
|
147
|
+
# Define {Cli::Parameters::StringParam} parameter and its subparameters.
|
146
148
|
# Subparameters defines in the block.
|
147
149
|
# @param (see #path)
|
148
150
|
# @return [Cli::Parameters::StringParam]
|
@@ -151,7 +153,7 @@ module AssLauncher
|
|
151
153
|
clients, **options, &block)
|
152
154
|
end
|
153
155
|
|
154
|
-
# Define {Cli::Parameters::Flag} parameter and
|
156
|
+
# Define {Cli::Parameters::Flag} parameter and its subparameters.
|
155
157
|
# Subparameters defines in the block.
|
156
158
|
# @param (see #path)
|
157
159
|
# @return [Cli::Parameters::Flag]
|
@@ -160,7 +162,7 @@ module AssLauncher
|
|
160
162
|
clients, **options, &block)
|
161
163
|
end
|
162
164
|
|
163
|
-
# Define {Cli::Parameters::Switch} parameter and
|
165
|
+
# Define {Cli::Parameters::Switch} parameter and its subparameters.
|
164
166
|
# Subparameters defines in the block.
|
165
167
|
# @note use helper {#switch_list} for build +:switch_list+ option
|
166
168
|
# @param (see #path)
|
@@ -170,7 +172,7 @@ module AssLauncher
|
|
170
172
|
clients, options, &block)
|
171
173
|
end
|
172
174
|
|
173
|
-
# Define {Cli::Parameters::Chose} parameter and
|
175
|
+
# Define {Cli::Parameters::Chose} parameter and its subparameters.
|
174
176
|
# Subparameters defines in the block.
|
175
177
|
# @note use helper {#chose_list} for build +:chose_list+ option
|
176
178
|
# @param (see #path)
|
@@ -3,10 +3,10 @@ require 'ass_launcher/enterprise/ole/win32ole'
|
|
3
3
|
#
|
4
4
|
module AssLauncher
|
5
5
|
class Configuration
|
6
|
-
# Forcing to use
|
6
|
+
# Forcing to use in-process x86_64 1C Ole server in x86_64 Ruby.
|
7
7
|
attr_writer :use_x86_64_ole
|
8
8
|
|
9
|
-
# Forcing to use
|
9
|
+
# Forcing to use in-process x86_64 1C Ole server in x86_64 Ruby.
|
10
10
|
def use_x86_64_ole?
|
11
11
|
@use_x86_64_ole ||= false
|
12
12
|
end
|
@@ -135,7 +135,7 @@ module AssLauncher
|
|
135
135
|
protected :clsids
|
136
136
|
end
|
137
137
|
|
138
|
-
# Wrapper for v8x.COMConnector
|
138
|
+
# Wrapper for v8x.COMConnector in-process OLE server
|
139
139
|
# @note It work not correct. If old version ole object is loded in
|
140
140
|
# memory new registred version will be ignored.
|
141
141
|
class COMConnector < AbstractAssOleBinary
|
@@ -2,25 +2,25 @@
|
|
2
2
|
module AssLauncher
|
3
3
|
module Support
|
4
4
|
module Shell
|
5
|
-
# Class for running {Command} in
|
6
|
-
#
|
7
|
-
#
|
8
|
-
#
|
5
|
+
# Class for running {Command} in a spawned process and control its life
|
6
|
+
# cycle. {ProcessHolder} waits a spawned process in a separate thread and
|
7
|
+
# calls {Command#exit_handling} after its completion.
|
8
|
+
#
|
9
9
|
# @example
|
10
|
-
# # Run command
|
10
|
+
# # Run command without waiting its ending
|
11
11
|
# ph = ProcessHolder.run(command, options)
|
12
12
|
#
|
13
|
+
# # Wait until command is executing and have got of execution result
|
13
14
|
# result = ph.wait.result
|
14
15
|
# raise 'bang!' unless result.sucsess?
|
15
16
|
#
|
16
|
-
# #
|
17
|
-
#
|
17
|
+
# # Or run command and kill process when it need
|
18
18
|
# ph = ProcessHolder.run(command, options)
|
19
19
|
#
|
20
|
-
# sleep 10 #
|
20
|
+
# sleep 10 # waiting until process wakes up
|
21
21
|
#
|
22
22
|
# if ! ph.alive?
|
23
|
-
# raise 'command
|
23
|
+
# raise 'command unexpected exit'
|
24
24
|
# end
|
25
25
|
#
|
26
26
|
# # doing something
|
data/lib/ass_launcher/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: ass_launcher
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.7.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Leonid Vlasov
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2019-01-06 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: inifile
|
@@ -206,6 +206,20 @@ dependencies:
|
|
206
206
|
- - "~>"
|
207
207
|
- !ruby/object:Gem::Version
|
208
208
|
version: '1.1'
|
209
|
+
- !ruby/object:Gem::Dependency
|
210
|
+
name: yard
|
211
|
+
requirement: !ruby/object:Gem::Requirement
|
212
|
+
requirements:
|
213
|
+
- - ">="
|
214
|
+
- !ruby/object:Gem::Version
|
215
|
+
version: '0'
|
216
|
+
type: :development
|
217
|
+
prerelease: false
|
218
|
+
version_requirements: !ruby/object:Gem::Requirement
|
219
|
+
requirements:
|
220
|
+
- - ">="
|
221
|
+
- !ruby/object:Gem::Version
|
222
|
+
version: '0'
|
209
223
|
description: Don't ask why this necessary. Believe this necessary!
|
210
224
|
email:
|
211
225
|
- leoniv.vlasov@gmail.com
|
@@ -231,6 +245,8 @@ files:
|
|
231
245
|
- bin/lib/dev_helper/cli_def_snippets.rb
|
232
246
|
- bin/lib/dev_helper/designer.rb
|
233
247
|
- bin/setup
|
248
|
+
- en.README.md
|
249
|
+
- examples/README.md
|
234
250
|
- examples/arguments_builder_example.rb
|
235
251
|
- examples/binary_wrappers_example.rb
|
236
252
|
- examples/connection_string_example.rb
|
@@ -242,6 +258,7 @@ files:
|
|
242
258
|
- examples/templates/example_template.cf
|
243
259
|
- examples/templates/example_template.v8i
|
244
260
|
- examples/templates/hello.epf
|
261
|
+
- examples/troubles/README.md
|
245
262
|
- examples/troubles/with_creteinfobase_example.rb
|
246
263
|
- examples/troubles/with_running_1c_example.rb
|
247
264
|
- examples/v8i_file_example.rb
|
@@ -270,6 +287,7 @@ files:
|
|
270
287
|
- lib/ass_launcher/enterprise/cli_def/8.3.10.rb
|
271
288
|
- lib/ass_launcher/enterprise/cli_def/8.3.11.rb
|
272
289
|
- lib/ass_launcher/enterprise/cli_def/8.3.12.rb
|
290
|
+
- lib/ass_launcher/enterprise/cli_def/8.3.13.rb
|
273
291
|
- lib/ass_launcher/enterprise/cli_def/8.3.3.rb
|
274
292
|
- lib/ass_launcher/enterprise/cli_def/8.3.4.rb
|
275
293
|
- lib/ass_launcher/enterprise/cli_def/8.3.5.rb
|
@@ -294,9 +312,7 @@ files:
|
|
294
312
|
homepage: https://github.com/leoniv/ass_launcher
|
295
313
|
licenses:
|
296
314
|
- MIT
|
297
|
-
metadata:
|
298
|
-
known_enterprise_versions: 8.1.0, 8.2.17, 8.2.18, 8.3.3, 8.3.4, 8.3.5, 8.3.6, 8.3.7,
|
299
|
-
8.3.8, 8.3.9, 8.3.10, 8.3.11, 8.3.12
|
315
|
+
metadata: {}
|
300
316
|
post_install_message:
|
301
317
|
rdoc_options: []
|
302
318
|
require_paths:
|