nwrfc 0.0.6 → 0.0.7

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,15 +1,15 @@
1
1
  ---
2
2
  !binary "U0hBMQ==":
3
3
  metadata.gz: !binary |-
4
- YmE4ZjJmYTkwN2U1M2RhZGJiMzNhMGNiNTJlNjRhMmRhYzE1ZGYyMw==
4
+ Y2MwMWZmNDQ5YTk5ODZlMjBmM2I1M2M3MGZhNWU0MTRlODdhZjM3YQ==
5
5
  data.tar.gz: !binary |-
6
- MGQ2NWEyMDRiMTUzMTQyZDk5NGEwNTIwYTAyNDkxNDRjNjRkYzVkMQ==
6
+ ZDRhMjc3YWZmZDI3Nzk1YjhmMGIzNzc3ZDAxMDAyOGUwYjc0ODc3NQ==
7
7
  SHA512:
8
8
  metadata.gz: !binary |-
9
- YTg2YmE4MmE4NTE5Zjk3M2I0MDJmYTVmOWQ4MzM3MzYyOWRhOGRiMmE5MzY1
10
- NTM4YTVhMjIyYjFiMzMxMjFjZjk2NmFlZWE1YmI5YzhiMmU3NTg1MGU4YTRi
11
- YjY2Y2EyMWM4YmU2ODQwM2VlMzIxZWUzZTliYjI0MTU1OTJmMzI=
9
+ YTQ1MDJmMTlkZTgxNDk0ZjdhNmRmMTcwNGVhYTlhM2EyZmI2YmY4MzM4ZjIz
10
+ YjY3MWU4ODIyNjY0OTdmZmM5YjIzMjcwNTNjOTRhM2NkNjM4NzdkMGQ1ZjQ5
11
+ ZDlhMDZkYTIzMmQ5NjU2NDZjMDE1ZGJjY2UxMmFhN2JkOGMyNGU=
12
12
  data.tar.gz: !binary |-
13
- YWI0ZTcwMGUwMWVlYzMzMDU3Zjc1NzQxZTQxODNmOWU3NjA3MjAwMWUwOGU1
14
- YThmMWNjZTg2MjM4NTI0ZjgxYmQ2OGZiMDhiZjhjZGZhZjZkZTM0ZjViZjBi
15
- NmE4Mzc3ZmNmNjY5MjU4NThhZTgxZDVkNWYyNWY3YTMzMDRkYTU=
13
+ OTBjNzZiMWVkZjJlNmQ1ZTY0NDMxNGMxOTc2YTliZThjNTkzMjU3YmNkN2Nl
14
+ NTljNTY5MTRhNmY4OTU5OWE2MjAwYzM3ZjZhNGY2ZjNhZGVhM2UzM2Q3OWNh
15
+ YmIzNzMxNWU4OGRhM2MxYmYyYjk1NTVlNWZlM2E1YzE1NjgyNTM=
@@ -84,6 +84,11 @@ so that ["system2"] at the end points to whatever label you gave it in the YAML
84
84
 
85
85
  == Release Notes
86
86
 
87
+ === What's new in 0.0.7
88
+
89
+ * Add support for JRuby by extending FFI::StructLayout::CharArrayProxy
90
+ * Fix #7 (error when reading timestamp value / BCD field)
91
+
87
92
  === What's new in 0.0.6
88
93
 
89
94
  * Add :blocking => true in attach_function to allow other threads to continue running (thanks Meatballs1[https://github.com/Meatballs1])
@@ -43,6 +43,7 @@ module NWRFC
43
43
 
44
44
  when :RFCTYPE_BCD
45
45
  size = metadata[:nucLength] + (metadata[:decimals] || 0)
46
+ size += 10 # Temporary fix for issue https://github.com/mydoghasworms/nwrfc/issues/7
46
47
  buf = FFI::MemoryPointer.new(:uchar, size*2)
47
48
  rc = NWRFCLib.get_chars(@handle, metadata[:name].cU, buf, size, @error.to_ptr)
48
49
  NWRFC.check_error(@error) if rc > 0
@@ -73,6 +73,17 @@ class FFI::StructLayout::CharArray
73
73
  end
74
74
  end
75
75
 
76
+ # Enhancement for JRuby to enable the same reading of strings as above, but for JRuby we must make
77
+ # the enhancement to FFI::StructLayout::CharArrayProxy
78
+ # TODO Perhaps we should make the alternate change (above) the other branch of the following if statement
79
+ if RUBY_PLATFORM == 'java'
80
+ class FFI::StructLayout::CharArrayProxy
81
+ def get_str
82
+ NWRFCLib::Cutf16le_to_utf8.iconv(self.to_ptr.read_string(self.size)).strip
83
+ end
84
+ end
85
+ end
86
+
76
87
  # Library wrapper around NW RFC SDK shared library using RUBY-FFI
77
88
  module NWRFCLib
78
89
 
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: nwrfc
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.6
4
+ version: 0.0.7
5
5
  platform: ruby
6
6
  authors:
7
7
  - Martin Ceronio
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-06-30 00:00:00.000000000 Z
11
+ date: 2014-09-08 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: ffi
@@ -16,14 +16,14 @@ dependencies:
16
16
  requirements:
17
17
  - - ! '>='
18
18
  - !ruby/object:Gem::Version
19
- version: 1.0.11
19
+ version: 1.9.3
20
20
  type: :runtime
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
24
  - - ! '>='
25
25
  - !ruby/object:Gem::Version
26
- version: 1.0.11
26
+ version: 1.9.3
27
27
  description: SAP Netweaver RFC Library Wrapper using Ruby-FFI
28
28
  email: martin.ceronio@infosize.co.za
29
29
  executables: []