ass_launcher 0.2.0 → 0.2.1

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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: c6b94d52dbe7ef1d1765d781154d6ace91eb0341
4
- data.tar.gz: 9869be552aafa7badc2150e4c9e9ad41ccd99bb0
3
+ metadata.gz: 151ba725780425ee017d6bc5fbea9ffa3f643036
4
+ data.tar.gz: 86ac07de538f59d48e20ce69dead65c555addac6
5
5
  SHA512:
6
- metadata.gz: 87421d5aad3ed605426ff419c02101cbed5354c45139d961db4a3e0cfc194f4ca6cd544fa48ed5977ad541e3e072a9fcdb100f6ca1ae92c9a622c59ba0c70c95
7
- data.tar.gz: 9f40bbfdfd74bbfc56ae5e76f2be176feddb9e19ad245ea9c0b5b0259cac8a141d6f85288ff94a594bc2ffb906c4a4304fd4bbe417987f11003e3180106c7d55
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.
@@ -308,6 +308,10 @@ module AssLauncher
308
308
  [key('').to_s, rdp_(p1).to_s, rdp_(p2).to_s]
309
309
  end
310
310
 
311
+ def arguments_count
312
+ 2
313
+ end
314
+
311
315
  def rdp_(p)
312
316
  platform.path(p).realdirpath
313
317
  end
@@ -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
- if linux?
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
- unless instaled?
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
- unless instaled?
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
- unless status.success?
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
 
@@ -1,5 +1,5 @@
1
1
  module AssLauncher
2
- VERSION = "0.2.0"
2
+ VERSION = "0.2.1"
3
3
  module KNOWN_ENTERPRISE_VERSIONS
4
4
  require 'ass_launcher/enterprise/cli_defs_loader'
5
5
  extend AssLauncher::Enterprise::CliDefsLoader
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.0
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: 2016-11-15 00:00:00.000000000 Z
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: