ass_launcher 0.2.0 → 0.2.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +2 -1
- data/lib/ass_launcher/enterprise/cli/parameters.rb +4 -0
- data/lib/ass_launcher/enterprise/ole/ole_binaries.rb +31 -11
- data/lib/ass_launcher/version.rb +1 -1
- metadata +3 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 151ba725780425ee017d6bc5fbea9ffa3f643036
|
4
|
+
data.tar.gz: 86ac07de538f59d48e20ce69dead65c555addac6
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 1d2f0dfed40ed49ffc9ef8f656950cafb4a4abfc4ab7c25e178c953eb2026ec10c6682c85624ec4add6bfad460e8388bced79dcc592005515a8caf282df5d7b6
|
7
|
+
data.tar.gz: 67a614b7fa70a4a561e09796d5a65d53412bb9b3c808e4cff7178faddabe9cf8c507b43e66b803657a29c7a0f0f7392dd2e7b0a05f8d1ec87273a4fdbc97a564
|
data/README.md
CHANGED
@@ -1,5 +1,6 @@
|
|
1
|
-
|
2
1
|
[![Code Climate](https://codeclimate.com/github/leoniv/ass_launcher/badges/gpa.svg)](https://codeclimate.com/github/leoniv/ass_launcher)
|
2
|
+
[![Gem Version](https://badge.fury.io/rb/ass_launcher.svg)](https://badge.fury.io/rb/ass_launcher)
|
3
|
+
|
3
4
|
# AssLauncher
|
4
5
|
|
5
6
|
Ruby wrapper for 1C:Enterprise platform.
|
@@ -11,13 +11,15 @@ module AssLauncher
|
|
11
11
|
# @abstract
|
12
12
|
class AbstractAssOleBinary
|
13
13
|
include AssLauncher::Support::Platforms
|
14
|
+
|
14
15
|
# @return [Gem::Version::Requirement]
|
15
16
|
attr_reader :requirement
|
17
|
+
|
16
18
|
# @param requirement [Gem::Version::Requirement] version of 1C Ole
|
17
19
|
# server
|
18
20
|
def initialize(requirement)
|
19
|
-
fail NotImplementedError, 'WIN32OLE undefined for this machine'\
|
20
|
-
|
21
|
+
fail NotImplementedError, 'WIN32OLE undefined for this machine' if\
|
22
|
+
linux?
|
21
23
|
@requirement = Gem::Version::Requirement.new(requirement)
|
22
24
|
end
|
23
25
|
|
@@ -74,8 +76,8 @@ module AssLauncher
|
|
74
76
|
# Register Ole server
|
75
77
|
def reg
|
76
78
|
return true if registred?
|
77
|
-
fail "Platform version `#{requirement}' not instaled."\
|
78
|
-
|
79
|
+
fail "Platform version `#{requirement}' not instaled." unless\
|
80
|
+
instaled?
|
79
81
|
reg_server
|
80
82
|
end
|
81
83
|
|
@@ -87,8 +89,8 @@ module AssLauncher
|
|
87
89
|
# Unregister Ole server
|
88
90
|
def unreg
|
89
91
|
return true unless registred?
|
90
|
-
fail "Platform version `#{requirement}' not instaled."\
|
91
|
-
|
92
|
+
fail "Platform version `#{requirement}' not instaled." unless\
|
93
|
+
instaled?
|
92
94
|
unreg_server
|
93
95
|
end
|
94
96
|
|
@@ -130,6 +132,24 @@ module AssLauncher
|
|
130
132
|
class COMConnector < AbstractAssOleBinary
|
131
133
|
require 'English'
|
132
134
|
BINARY = 'comcntr.dll'
|
135
|
+
# Ruby for x32 architectures
|
136
|
+
X32_ARCHS = ['i386-mingw32', 'i386-cygwin']
|
137
|
+
|
138
|
+
# (see AbstractAssOleBinary#initialize)
|
139
|
+
def initialize(requirement)
|
140
|
+
super requirement
|
141
|
+
fail "v8x.COMConnector unavailable for #{arch} Ruby" unless\
|
142
|
+
x32_arch?
|
143
|
+
end
|
144
|
+
|
145
|
+
def arch
|
146
|
+
RbConfig::CONFIG['arch']
|
147
|
+
end
|
148
|
+
|
149
|
+
def x32_arch?
|
150
|
+
X32_ARCHS.include? arch
|
151
|
+
end
|
152
|
+
|
133
153
|
def binary
|
134
154
|
BINARY
|
135
155
|
end
|
@@ -149,7 +169,7 @@ module AssLauncher
|
|
149
169
|
private :clsids
|
150
170
|
|
151
171
|
def _binary_wrapper
|
152
|
-
Enterprise.thick_clients(requirement.to_s).last
|
172
|
+
Enterprise.thick_clients(requirement.to_s).sort.last
|
153
173
|
end
|
154
174
|
private :_binary_wrapper
|
155
175
|
|
@@ -177,8 +197,8 @@ module AssLauncher
|
|
177
197
|
private :childe_status
|
178
198
|
|
179
199
|
def fail_reg_unreg_server(message, status)
|
180
|
-
fail "Failure #{message} `#{path.win_string}' #{status}"\
|
181
|
-
|
200
|
+
fail "Failure #{message} `#{path.win_string}' #{status}" unless\
|
201
|
+
status.success?
|
182
202
|
status
|
183
203
|
end
|
184
204
|
private :fail_reg_unreg_server
|
@@ -198,7 +218,7 @@ module AssLauncher
|
|
198
218
|
private :prog_id
|
199
219
|
|
200
220
|
def _binary_wrapper
|
201
|
-
Enterprise.thick_clients(requirement.to_s).last
|
221
|
+
Enterprise.thick_clients(requirement.to_s).sort.last
|
202
222
|
end
|
203
223
|
private :_binary_wrapper
|
204
224
|
|
@@ -240,7 +260,7 @@ module AssLauncher
|
|
240
260
|
private :prog_id
|
241
261
|
|
242
262
|
def _binary_wrapper
|
243
|
-
Enterprise.thin_clients(requirement.to_s).last
|
263
|
+
Enterprise.thin_clients(requirement.to_s).sort.last
|
244
264
|
end
|
245
265
|
private :_binary_wrapper
|
246
266
|
|
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.2.
|
4
|
+
version: 0.2.1
|
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: 2017-01-31 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: inifile
|
@@ -262,3 +262,4 @@ signing_key:
|
|
262
262
|
specification_version: 4
|
263
263
|
summary: Ruby wrapper for 1C:Enterprise platform
|
264
264
|
test_files: []
|
265
|
+
has_rdoc:
|