webmoney 0.0.5 → 0.0.6

Sign up to get free protection for your applications and to get access to all the features.
data/ChangeLog CHANGED
@@ -1,32 +1,37 @@
1
1
  ChangeLog
2
2
 
3
+ Fri May 28 2010 11:24:40 +0400
4
+ ----------------------------
5
+ V 0.0.6
6
+ * Fix to compatibility with ruby 1.8.6 (Symbol#to_proc related)
7
+
3
8
  Fri Feb 12 2010 11:22:35 + 0400
4
9
  ----------------------------
5
10
  V 0.0.5
6
11
  * Using Nokogiri instead Hpricot+Builder, incompatible with libxml2 < 2.7.0
7
12
  * Using jeweler+rake-compiler
8
13
  * Complete parse attestat fields (X11)
9
- * Add X2 -Create transaction
14
+ * Add X2-Create transaction
10
15
 
11
16
  Sat Oct 03 2009 16:18:00 + 0400
12
17
  ----------------------------
13
18
  V 0.0.4.8
14
19
  * Refactor class Passport
15
20
 
16
- Wed Sep 30 2009 16:09:00 + 0400
21
+ Wed Sep 30 2009 16:09:00 +0400
17
22
  ----------------------------
18
23
  V 0.0.4.7
19
24
  * Class Webmoney refactor to module
20
25
  * Add find_wm (X8) interface
21
26
  * Add logger call when send message via simple queue
22
27
 
23
- Wed Aug 12 2009 20:31:00 + 0400
28
+ Wed Aug 12 2009 20:31:00 +0400
24
29
  ----------------------------
25
30
  V 0.0.4.6
26
31
  * Feature: path to certs directory
27
32
  * New CA certificates in bundle
28
33
 
29
- Thu Jun 11 2009 13:05:00 + 0400
34
+ Thu Jun 11 2009 13:05:00 +0400
30
35
  ----------------------------
31
36
  V 0.0.4.5
32
37
  * Fix unexistent WMID passport request error
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.0.5
1
+ 0.0.6
data/lib/messenger.rb CHANGED
@@ -18,7 +18,7 @@ module Webmoney
18
18
  logger.call(msg, result)
19
19
  # Requeue message on fail
20
20
  @queue.push(msg) unless result.kind_of?(Hash)
21
- rescue ResultError, ResponseError => e
21
+ rescue ResultError => e
22
22
  logger.call(msg, e)
23
23
  # Requeue message
24
24
  @queue.push(msg)
data/lib/webmoney.rb CHANGED
@@ -236,7 +236,7 @@ module Webmoney
236
236
  def check_libxml_version
237
237
  libxml = Nokogiri::VERSION_INFO['libxml']
238
238
  [libxml['compiled'], libxml['loaded']].each do |ver|
239
- major, minor = ver.match(/^(\d+)\.(\d+).*/).to_a[1,2].map(&:to_i)
239
+ major, minor = ver.match(/^(\d+)\.(\d+).*/).to_a[1,2].map{|i| i.to_i}
240
240
  return false if major < 2 or minor < 7
241
241
  end
242
242
  end
@@ -31,9 +31,13 @@ module Webmoney
31
31
  end
32
32
 
33
33
  it "should call request(:send_message) twice" do
34
+ # if spec failed here, increase sleep time
34
35
  @wm.should_receive(:request).
35
36
  with(:send_message, @params).twice().and_return({:test => 'test'})
36
37
  2.times {@wm.send_message(@params)}
38
+ # Don't take:
39
+ # @wm.messenger.thread.join
40
+ # this will create deadlock
37
41
  sleep(2)
38
42
  end
39
43
 
@@ -47,13 +47,14 @@ module Webmoney
47
47
  :nickname=>"Арбитр",
48
48
  :country=>"Россия",
49
49
  :inndoc=>"0",
50
+ :sex=>"0",
50
51
  :email=>"", :pdateMMDDYYYY => "", :pday => "", :pmonth => "", :pyear => "",
51
52
  :iname=>"", :inn=>"", :okonx=>"", :bik=>"", :pbywhom=>"", :phonemobile=>"", :rcountry=>"",
52
53
  :bmonth=>"", :jadres=>"", :okpo=>"", :bday=>"", :pnomer=>"", :bankname=>"", :pcountry=>"", :pcountryid=>"",
53
54
  :jcountryid=>"", :ks=>"", :infoopen=>"", :icq=>"", :byear=>"", :oname=>"", :osnovainfo=>"", :dirfio=>"",
54
55
  :pdate=>"", :bplace=>"", :rs=>"", :rcity=>"", :adres=>"", :phone=>"", :buhfio=>"", :radres=>"", :fname=>"",
55
56
  :phonehome=>"", :jcity=>"", :name=>"", :pcity=>"", :jstatus=>"", :fax=>"", :zipcode=>"", :rcountryid=>"",
56
- :web=>"", :jzipcode=>"", :jcountry=>""
57
+ :web=>"", :jzipcode=>"", :jcountry=>"", :jabberid=>""
57
58
  }
58
59
 
59
60
  # a1 = res[:userinfo].keys.map(&:to_s).sort
@@ -108,12 +109,16 @@ module Webmoney
108
109
  p.attestat[:attestat].should == Webmoney::Passport::REGISTRATOR
109
110
  p.attestat[:created_at].strftime('%Y-%m-%d %H:%M:%S').should == '2004-02-25 21:54:01'
110
111
  p.full_access.should be_false
111
-
112
+
112
113
  wmid = '370860915669'
113
114
  p = Passport.new(wmid)
114
115
  p.wmid.should == wmid
115
116
  p.attestat[:attestat].should == Webmoney::Passport::ALIAS
116
117
  p.attestat[:created_at].strftime('%Y-%m-%d %H:%M:%S').should == '2006-04-19 10:16:30'
118
+
119
+ wmid = '210971342927'
120
+ p = Passport.new(wmid)
121
+ p.attestat.should_not be_nil
117
122
  end
118
123
 
119
124
  it "should raise exception on bad WMID" do
@@ -125,6 +130,11 @@ module Webmoney
125
130
  lambda {@wm.request(:get_passport, :wmid => '012345678901')}.should raise_error(Webmoney::NonExistentWmidError)
126
131
  end
127
132
 
133
+ it "should raise exception on blank response" do
134
+ @wm.stub!(:http_request).and_return(nil)
135
+ lambda {@wm.request(:get_passport, :wmid => '012345678901')}.should raise_error(Webmoney::NonExistentWmidError)
136
+ end
137
+
128
138
  end
129
139
 
130
140
  end
data/webmoney.gemspec CHANGED
@@ -5,11 +5,11 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = %q{webmoney}
8
- s.version = "0.0.5"
8
+ s.version = "0.0.6"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["Alexander Oryol"]
12
- s.date = %q{2010-02-12}
12
+ s.date = %q{2010-05-28}
13
13
  s.email = %q{eagle.alex@gmail.com}
14
14
  s.extensions = ["ext/wmsigner/extconf.rb"]
15
15
  s.extra_rdoc_files = [
@@ -65,7 +65,7 @@ Gem::Specification.new do |s|
65
65
  s.rdoc_options = ["--charset=UTF-8"]
66
66
  s.require_paths = ["lib"]
67
67
  s.rubyforge_project = %q{webmoney}
68
- s.rubygems_version = %q{1.3.5}
68
+ s.rubygems_version = %q{1.3.7}
69
69
  s.summary = %q{Webmoney interfaces and native wmsigner}
70
70
  s.test_files = [
71
71
  "spec/unit/time_spec.rb",
@@ -82,7 +82,7 @@ Gem::Specification.new do |s|
82
82
  current_version = Gem::Specification::CURRENT_SPECIFICATION_VERSION
83
83
  s.specification_version = 3
84
84
 
85
- if Gem::Version.new(Gem::RubyGemsVersion) >= Gem::Version.new('1.2.0') then
85
+ if Gem::Version.new(Gem::VERSION) >= Gem::Version.new('1.2.0') then
86
86
  s.add_runtime_dependency(%q<nokogiri>, [">= 0"])
87
87
  else
88
88
  s.add_dependency(%q<nokogiri>, [">= 0"])
metadata CHANGED
@@ -1,7 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: webmoney
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.5
4
+ hash: 19
5
+ prerelease: false
6
+ segments:
7
+ - 0
8
+ - 0
9
+ - 6
10
+ version: 0.0.6
5
11
  platform: ruby
6
12
  authors:
7
13
  - Alexander Oryol
@@ -9,19 +15,23 @@ autorequire:
9
15
  bindir: bin
10
16
  cert_chain: []
11
17
 
12
- date: 2010-02-12 00:00:00 +03:00
18
+ date: 2010-05-28 00:00:00 +04:00
13
19
  default_executable:
14
20
  dependencies:
15
21
  - !ruby/object:Gem::Dependency
16
22
  name: nokogiri
17
- type: :runtime
18
- version_requirement:
19
- version_requirements: !ruby/object:Gem::Requirement
23
+ prerelease: false
24
+ requirement: &id001 !ruby/object:Gem::Requirement
25
+ none: false
20
26
  requirements:
21
27
  - - ">="
22
28
  - !ruby/object:Gem::Version
29
+ hash: 3
30
+ segments:
31
+ - 0
23
32
  version: "0"
24
- version:
33
+ type: :runtime
34
+ version_requirements: *id001
25
35
  description:
26
36
  email: eagle.alex@gmail.com
27
37
  executables: []
@@ -86,21 +96,27 @@ rdoc_options:
86
96
  require_paths:
87
97
  - lib
88
98
  required_ruby_version: !ruby/object:Gem::Requirement
99
+ none: false
89
100
  requirements:
90
101
  - - ">="
91
102
  - !ruby/object:Gem::Version
103
+ hash: 3
104
+ segments:
105
+ - 0
92
106
  version: "0"
93
- version:
94
107
  required_rubygems_version: !ruby/object:Gem::Requirement
108
+ none: false
95
109
  requirements:
96
110
  - - ">="
97
111
  - !ruby/object:Gem::Version
112
+ hash: 3
113
+ segments:
114
+ - 0
98
115
  version: "0"
99
- version:
100
116
  requirements: []
101
117
 
102
118
  rubyforge_project: webmoney
103
- rubygems_version: 1.3.5
119
+ rubygems_version: 1.3.7
104
120
  signing_key:
105
121
  specification_version: 3
106
122
  summary: Webmoney interfaces and native wmsigner