p2ruby 0.1.2 → 0.1.4

Sign up to get free protection for your applications and to get access to all the features.
data/.gitignore CHANGED
@@ -16,11 +16,13 @@ tmtags
16
16
  ## PROJECT::GENERAL
17
17
  coverage
18
18
  config
19
+ data
19
20
  rdoc
20
21
  pkg
21
22
  log
22
23
  tmp
23
24
  .idea
25
+ .iml
24
26
  .bundle
25
27
 
26
28
  ## PROJECT::SPECIFIC
data/HISTORY CHANGED
@@ -13,3 +13,11 @@
13
13
  == 0.1.2 / 2011-03-19
14
14
 
15
15
  * WinGui require issues
16
+
17
+ == 0.1.3 / 2011-03-19
18
+
19
+ * Bundler.require not useable inside gem libs
20
+
21
+ == 0.1.4 / 2011-11-11
22
+
23
+ * Fixed brittle specs
data/README.rdoc CHANGED
@@ -4,12 +4,13 @@ url:: http://github.com/arvicco/p2ruby
4
4
 
5
5
  == DESCRIPTION:
6
6
 
7
- Ruby bindings and wrapper classes for P2ClientGate.
7
+ Ruby bindings and wrapper classes for RTS Plaza2 COM library (P2ClientGate).
8
8
 
9
9
  == FEATURES/PROBLEMS:
10
10
 
11
11
  All implemented COM classes wrapped except for CP2DataBuffer. Most event interfaces work,
12
- except for IP2AsyncEvent* since they are not implemented anywhere.
12
+ except for IP2AsyncEvent* since they are not implemented anywhere (see
13
+ http://forum.rts.ru/viewtopic.asp?t=20260).
13
14
 
14
15
  == REQUIREMENTS:
15
16
 
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.1.2
1
+ 0.1.4
data/bin/olegen.rb CHANGED
File without changes
data/lib/extension.rb CHANGED
@@ -1,13 +1,13 @@
1
1
  class String
2
2
  # returns snake_case representation of string
3
3
  def snake_case
4
- gsub(/([a-z])([A-Z0-9])/, '\1_\2' ).downcase
4
+ gsub(/([a-z])([A-Z0-9])/, '\1_\2').downcase
5
5
  end
6
6
 
7
7
  # returns camel_case representation of string
8
8
  def camel_case
9
9
  if self.include? '_'
10
- self.split('_').map{|e| e.capitalize}.join
10
+ self.split('_').map { |e| e.capitalize }.join
11
11
  else
12
12
  unless self =~ (/^[A-Z]/)
13
13
  self.capitalize
@@ -152,8 +152,18 @@ module P2
152
152
  end
153
153
 
154
154
  # method UI4 Connect2
155
- # �������� ���������� ���������� ���������� � ��������. ������� � ���������� � ������ Connection#Connect.
156
- # BSTR conn_str [IN]
155
+ # �������� ���������� ���������� ���������� � ��������.
156
+ # ������� � ���������� � ������ Connection#Connect.
157
+ # !!!!!!!!! Can be used for LRPC transport instead of TCP/IP:
158
+ # -------------------------------------
159
+ # ����� HRESULT Connect2([in] BSTR connStr, [out,retval] ULONG *errClass).
160
+ # � connStr �������� ��������� ��������.
161
+ # ��� ����������� ������: *"APPNAME=superRobot;LRPCQ_PORT=4001"*,
162
+ # ��� ������ "APPNAME=superRobot;HOST=127.0.0.1;PORT=4001".
163
+ # �������� ������ ������ Connect. Properties AppName, Host, Port, Password
164
+ # � ����� ������� �� ������������. �������� � ������ 1.10.x
165
+ #
166
+ # BSTR conn_str [IN]
157
167
  def Connect2(conn_str)
158
168
  @ole._invoke(18, [conn_str], [VT_BSTR])
159
169
  end
data/lib/p2ruby/record.rb CHANGED
@@ -26,7 +26,7 @@ module P2
26
26
  GetValAsStringByIndex(id)
27
27
  else
28
28
  GetValAsString(id.to_s)
29
- end.force_encoding('IBM866').encode('CP1251', :undef => :replace)
29
+ end #.force_encoding('IBM866').encode('CP1251', :undef => :replace)
30
30
  end
31
31
 
32
32
  # Yields all fields (basis for mixed in Enumerable methods)
data/lib/p2ruby.rb CHANGED
@@ -1,12 +1,9 @@
1
1
  require 'version'
2
2
  require 'win32ole'
3
3
  require 'win32ole/property'
4
+ require 'win_gui'
4
5
  #require 'win32ole-pr'
5
6
 
6
- require 'rubygems'
7
- require 'bundler/setup'
8
- Bundler.require(:default)
9
-
10
7
  # Namespace for loading P2ClientGate constants and helper methods
11
8
  module P2
12
9
  # enum TConnectionStatus � ��������� ����������/�������. �������� ��������� ��������:
data/lib/version.rb CHANGED
@@ -2,7 +2,7 @@ require 'pathname'
2
2
 
3
3
  module P2
4
4
 
5
- VERSION_FILE = Pathname.new(__FILE__).dirname + '../VERSION' # :nodoc:
5
+ VERSION_FILE = Pathname.new(__FILE__).dirname + '../VERSION' # :nodoc:
6
6
  VERSION = VERSION_FILE.exist? ? VERSION_FILE.read.strip : nil
7
7
 
8
8
  end