rumeme 0.1.7 → 0.2.0

Sign up to get free protection for your applications and to get access to all the features.
data/CHANGELOG CHANGED
@@ -1,3 +1,11 @@
1
+ Version 0.2.0 - 2010-08-18
2
+ ===============================================================================
3
+
4
+ antlypls (2):
5
+ minor
6
+ remove nokogiri usage, use regex to parse MM data
7
+
8
+
1
9
  Version 0.1.7 - 2010-03-16
2
10
  ===============================================================================
3
11
 
@@ -68,3 +76,4 @@ antlypls (5):
68
76
 
69
77
 
70
78
 
79
+
data/Rakefile CHANGED
@@ -69,6 +69,7 @@ task :bump, :part do |t, args|
69
69
  patch += 1
70
70
  else
71
71
  abort
72
+ abort
72
73
  end
73
74
 
74
75
  version = [major, minor, patch].compact.join('.')
@@ -180,10 +180,18 @@ module Rumeme
180
180
 
181
181
  raise BadServerResponse.new('http response code != 200') if resp.code.to_i != 200
182
182
 
183
- doc = Nokogiri::HTML(data)
184
- raise BadServerResponse.new('bad title') if doc.xpath('//title').text != "M4U SMSMASTER"
183
+ #parsed_title, parsed_body = nil, nil
185
184
 
186
- response_message = doc.xpath('//body').text.strip
185
+ if data =~ /^.+<TITLE>(.+)<\/TITLE>.+<BODY>(.+)<\/BODY>.+/m
186
+ parsed_title, parsed_body = $1, $2
187
+ else
188
+ raise BadServerResponse.new('not html')
189
+ end
190
+
191
+ #doc = Nokogiri::HTML(data)
192
+ raise BadServerResponse.new('bad title') if parsed_title != "M4U SMSMASTER"
193
+
194
+ response_message = parsed_body.strip
187
195
 
188
196
  response_message.match /^(\d+)\s+/
189
197
  response_code = $1.to_i
@@ -1,3 +1,3 @@
1
1
  module Rumeme
2
- VERSION = "0.1.7".freeze
2
+ VERSION = "0.2.0".freeze
3
3
  end
metadata CHANGED
@@ -1,12 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rumeme
3
3
  version: !ruby/object:Gem::Version
4
+ hash: 23
4
5
  prerelease: false
5
6
  segments:
6
7
  - 0
7
- - 1
8
- - 7
9
- version: 0.1.7
8
+ - 2
9
+ - 0
10
+ version: 0.2.0
10
11
  platform: ruby
11
12
  authors:
12
13
  - antlypls
@@ -14,16 +15,18 @@ autorequire:
14
15
  bindir: bin
15
16
  cert_chain: []
16
17
 
17
- date: 2010-03-16 00:00:00 +04:00
18
+ date: 2010-08-18 00:00:00 +04:00
18
19
  default_executable:
19
20
  dependencies:
20
21
  - !ruby/object:Gem::Dependency
21
22
  name: nokogiri
22
23
  prerelease: false
23
24
  requirement: &id001 !ruby/object:Gem::Requirement
25
+ none: false
24
26
  requirements:
25
27
  - - "="
26
28
  - !ruby/object:Gem::Version
29
+ hash: 5
27
30
  segments:
28
31
  - 1
29
32
  - 4
@@ -35,9 +38,11 @@ dependencies:
35
38
  name: shoulda
36
39
  prerelease: false
37
40
  requirement: &id002 !ruby/object:Gem::Requirement
41
+ none: false
38
42
  requirements:
39
43
  - - ">="
40
44
  - !ruby/object:Gem::Version
45
+ hash: 3
41
46
  segments:
42
47
  - 0
43
48
  version: "0"
@@ -75,23 +80,27 @@ rdoc_options:
75
80
  require_paths:
76
81
  - lib
77
82
  required_ruby_version: !ruby/object:Gem::Requirement
83
+ none: false
78
84
  requirements:
79
85
  - - ">="
80
86
  - !ruby/object:Gem::Version
87
+ hash: 3
81
88
  segments:
82
89
  - 0
83
90
  version: "0"
84
91
  required_rubygems_version: !ruby/object:Gem::Requirement
92
+ none: false
85
93
  requirements:
86
94
  - - ">="
87
95
  - !ruby/object:Gem::Version
96
+ hash: 3
88
97
  segments:
89
98
  - 0
90
99
  version: "0"
91
100
  requirements: []
92
101
 
93
102
  rubyforge_project:
94
- rubygems_version: 1.3.6
103
+ rubygems_version: 1.3.7
95
104
  signing_key:
96
105
  specification_version: 3
97
106
  summary: Ruby SDK for Message Media SMS Gateway API