smpp_encoding 0.0.1 → 0.1.0

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.
@@ -28,5 +28,14 @@ module SmppEncoding
28
28
  message.encode('UTF-16BE').force_encoding('binary')
29
29
  end
30
30
  end
31
+
32
+ def enc coding, message
33
+ if coding == :auto
34
+ res = auto_encode(msg)
35
+ [res[:payload], res[:data_coding]]
36
+ else
37
+ [encode(coding, msg), coding]
38
+ end
39
+ end
31
40
  end
32
41
  end
@@ -1,3 +1,3 @@
1
1
  module SmppEncoding
2
- VERSION = "0.0.1"
2
+ VERSION = "0.1.0"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: smpp_encoding
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.1
4
+ version: 0.1.0
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,11 +9,11 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2011-11-10 00:00:00.000000000 Z
12
+ date: 2012-03-31 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: gsm_encoder
16
- requirement: &70093431418100 !ruby/object:Gem::Requirement
16
+ requirement: &70209864521840 !ruby/object:Gem::Requirement
17
17
  none: false
18
18
  requirements:
19
19
  - - ~>
@@ -21,7 +21,7 @@ dependencies:
21
21
  version: 0.1.0
22
22
  type: :runtime
23
23
  prerelease: false
24
- version_requirements: *70093431418100
24
+ version_requirements: *70209864521840
25
25
  description: Encodings for ruby-smpp gem
26
26
  email:
27
27
  - yury.korolev@gmail.com
@@ -56,7 +56,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
56
56
  version: '0'
57
57
  requirements: []
58
58
  rubyforge_project:
59
- rubygems_version: 1.8.11
59
+ rubygems_version: 1.8.17
60
60
  signing_key:
61
61
  specification_version: 3
62
62
  summary: Supports auto encoding messages to GSM and UNICODE