aspsms 0.98 → 0.99
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 +7 -0
- data/LICENSE +0 -3
- data/README +1 -1
- data/bin/aspsms +2 -2
- data/lib/aspsms.rb +10 -7
- metadata +21 -41
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA1:
|
3
|
+
metadata.gz: 462fb4abb41103cb377961fc43a4a686134da722
|
4
|
+
data.tar.gz: 3490780ca3be0ebe89984125901158ace57bfbe5
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: 664ed26ccc185f8ebc8d290aa002ba9f6acab541f2b465bbfb747df018e8a25d4afe74e5e1ca0322865e466376b9b6f316dc2fb51ca3175b3bff515c94e1ca6f
|
7
|
+
data.tar.gz: 90c36219ff4b466431bc51b540ce02d01e3b350a3362e6fa3870e90944fe59654f55f8a9eae57435f63fa5d6b94fce0acaf21d7187e2ffe7765fed646f9a9f48
|
data/LICENSE
CHANGED
@@ -1,6 +1,3 @@
|
|
1
|
-
Copyright (C) 2005-2012, Daniel Roethlisberger <daniel@roe.ch>
|
2
|
-
All rights reserved.
|
3
|
-
|
4
1
|
Redistribution and use, with or without modification, are permitted
|
5
2
|
provided that the following conditions are met:
|
6
3
|
1. Redistributions must retain the above copyright notice, this list of
|
data/README
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
Ruby ASPSMS -- aspsms.com short message service gateway library and client
|
2
2
|
http://www.roe.ch/ASPSMS
|
3
3
|
|
4
|
-
Copyright (C) 2005-
|
4
|
+
Copyright (C) 2005-2015, Daniel Roethlisberger <daniel@roe.ch>
|
5
5
|
All rights reserved.
|
6
6
|
|
7
7
|
Ruby ASPSMS is both a ruby library and a command line client for painfree,
|
data/bin/aspsms
CHANGED
@@ -4,7 +4,7 @@
|
|
4
4
|
# Ruby ASPSMS -- aspsms.com short message service gateway library and client
|
5
5
|
# http://www.roe.ch/ASPSMS
|
6
6
|
#
|
7
|
-
# Copyright (C) 2005-
|
7
|
+
# Copyright (C) 2005-2015, Daniel Roethlisberger <daniel@roe.ch>
|
8
8
|
# All rights reserved.
|
9
9
|
#
|
10
10
|
# Redistribution and use, with or without modification, are permitted
|
@@ -94,7 +94,7 @@ begin
|
|
94
94
|
exit 0
|
95
95
|
when '-V'
|
96
96
|
puts "#{$bn}: Ruby ASPSMS"
|
97
|
-
puts "Copyright (C) 2005-
|
97
|
+
puts "Copyright (C) 2005-2015, Daniel Roethlisberger <daniel@roe.ch>"
|
98
98
|
puts "http://www.roe.ch/ASPSMS"
|
99
99
|
exit 0
|
100
100
|
when '-M'
|
data/lib/aspsms.rb
CHANGED
@@ -4,7 +4,7 @@
|
|
4
4
|
# Ruby ASPSMS -- aspsms.com short message service gateway library and client
|
5
5
|
# http://www.roe.ch/ASPSMS
|
6
6
|
#
|
7
|
-
# Copyright (C) 2005-
|
7
|
+
# Copyright (C) 2005-2015, Daniel Roethlisberger <daniel@roe.ch>
|
8
8
|
# All rights reserved.
|
9
9
|
#
|
10
10
|
# Redistribution and use, with or without modification, are permitted
|
@@ -28,21 +28,21 @@
|
|
28
28
|
require 'rexml/document'
|
29
29
|
require 'net/http'
|
30
30
|
require 'uri'
|
31
|
-
require 'iconv'
|
32
31
|
|
33
32
|
module ASPSMS
|
34
33
|
FILES = [ "#{ENV['HOME']}/.aspsms", '/etc/aspsms', '/usr/local/etc/aspsms' ]
|
35
|
-
CHARSET = 'latin1'
|
36
34
|
|
37
35
|
# Represents a configuration, file based or hash based.
|
38
36
|
class Config
|
37
|
+
# Determine the charset to convert from for stdin or argv from the locale;
|
38
|
+
# if unset, default to UTF-8, which is compatible with 7 bit ASCII.
|
39
39
|
def self.charset_from_environment
|
40
40
|
['LC_ALL', 'LC_CTYPE', 'LANG'].each do |key|
|
41
41
|
if ENV.has_key?(key)
|
42
|
-
return ENV[key].match(/\./) ? ENV[key].sub(/^.*\./, '') :
|
42
|
+
return ENV[key].match(/\./) ? ENV[key].sub(/^.*\./, '') : 'utf-8'
|
43
43
|
end
|
44
44
|
end
|
45
|
-
return
|
45
|
+
return 'utf-8'
|
46
46
|
end
|
47
47
|
|
48
48
|
@password, @userkey, @originator, @gateway, @charset = nil,nil,nil,nil,nil
|
@@ -141,8 +141,11 @@ module ASPSMS
|
|
141
141
|
end
|
142
142
|
|
143
143
|
def utf8(str)
|
144
|
-
unless @charset.match(
|
145
|
-
return
|
144
|
+
unless @charset.match(/^UTF-?8$/i)
|
145
|
+
return str.encode('UTF-8', @charset, {
|
146
|
+
:invalid => :replace,
|
147
|
+
:undef => :replace,
|
148
|
+
:replace => "?"})
|
146
149
|
else
|
147
150
|
return str
|
148
151
|
end
|
metadata
CHANGED
@@ -1,67 +1,47 @@
|
|
1
|
-
--- !ruby/object:Gem::Specification
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
2
|
name: aspsms
|
3
|
-
version: !ruby/object:Gem::Version
|
4
|
-
|
5
|
-
prerelease:
|
6
|
-
segments:
|
7
|
-
- 0
|
8
|
-
- 98
|
9
|
-
version: "0.98"
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: '0.99'
|
10
5
|
platform: ruby
|
11
|
-
authors:
|
6
|
+
authors:
|
12
7
|
- Daniel Roethlisberger
|
13
8
|
autorequire:
|
14
9
|
bindir: bin
|
15
10
|
cert_chain: []
|
16
|
-
|
17
|
-
date: 2012-09-16 00:00:00 Z
|
11
|
+
date: 2015-01-18 00:00:00.000000000 Z
|
18
12
|
dependencies: []
|
19
|
-
|
20
13
|
description: aspsms.com SMS gateway library and client
|
21
14
|
email: daniel@roe.ch
|
22
|
-
executables:
|
15
|
+
executables:
|
23
16
|
- aspsms
|
24
17
|
extensions: []
|
25
|
-
|
26
18
|
extra_rdoc_files: []
|
27
|
-
|
28
|
-
files:
|
19
|
+
files:
|
29
20
|
- README
|
30
21
|
- LICENSE
|
31
22
|
- lib/aspsms.rb
|
32
23
|
- bin/aspsms
|
33
24
|
homepage: http://www.roe.ch/ASPSMS
|
34
25
|
licenses: []
|
35
|
-
|
26
|
+
metadata: {}
|
36
27
|
post_install_message:
|
37
28
|
rdoc_options: []
|
38
|
-
|
39
|
-
require_paths:
|
29
|
+
require_paths:
|
40
30
|
- lib
|
41
|
-
required_ruby_version: !ruby/object:Gem::Requirement
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
none: false
|
52
|
-
requirements:
|
53
|
-
- - ">="
|
54
|
-
- !ruby/object:Gem::Version
|
55
|
-
hash: 3
|
56
|
-
segments:
|
57
|
-
- 0
|
58
|
-
version: "0"
|
31
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
32
|
+
requirements:
|
33
|
+
- - '>='
|
34
|
+
- !ruby/object:Gem::Version
|
35
|
+
version: '1.9'
|
36
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
37
|
+
requirements:
|
38
|
+
- - '>='
|
39
|
+
- !ruby/object:Gem::Version
|
40
|
+
version: '0'
|
59
41
|
requirements: []
|
60
|
-
|
61
42
|
rubyforge_project:
|
62
|
-
rubygems_version:
|
43
|
+
rubygems_version: 2.0.14
|
63
44
|
signing_key:
|
64
|
-
specification_version:
|
45
|
+
specification_version: 4
|
65
46
|
summary: aspsms.com SMS gateway library and client
|
66
47
|
test_files: []
|
67
|
-
|