rs.ge 0.1.3 → 0.1.4

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 4e92c7c10de982d301960f308210ebf122876c6a
4
- data.tar.gz: ad404d37bf1bdba378d2f4f3442b6930db093772
3
+ metadata.gz: 8848e7c233edf215bb5e22de3b30654f3b7d8169
4
+ data.tar.gz: 6a2702615b0872b8be648ee7dcd9508a1ff641eb
5
5
  SHA512:
6
- metadata.gz: 7f35c252ebb182108cdb8c9dba4d3da12e0d9e98643098aa0d7ba932d7e24c3a6391e03def4a4fc8aa0a3f479ecd60190cfa5f1b74252aa744c00e2a8813110c
7
- data.tar.gz: 1cc21bb7c6f1028703e8cf4e2879ea9eefdde93a8b213d19258c315c515b72309390ed5bea01e472836f4829b30e5cf5470a0a3b02395043ae99da9c4a449307
6
+ metadata.gz: 7e8442cc394639f06989d90c1b118d719861717ceb8162e9344c7903d66875997da11b9b232d24eb4940acbe91c852bee6961dd1c1d91689ae5494ffa6fd7e3b
7
+ data.tar.gz: b6602062cd001a5aa228b9fd38b528507209486259c665938e66141e8af952fe79288e4322b2c34816c0fdbf25ea8e9f8b95d5a981903c9b621b6ce68f30fa28
@@ -59,11 +59,11 @@ module RS
59
59
  # * `su` -- user login
60
60
  # * `sp` -- user's passwrod
61
61
  def update_user(opts)
62
- # validate_presence_of(opts, :username, :password, :ip, :name, :su, :sp)
63
- # response = waybill_client.request 'update_service_user' do
64
- # soap.body = {'user_name' => opts[:username], 'user_password' => opts[:password], 'ip' => opts[:ip], 'name' => opts[:name], 'su' => opts[:su], 'sp' => opts[:sp]}
65
- # end
66
- # response.to_hash[:update_service_user_response][:update_service_user_result]
62
+ validate_presence_of(opts, :username, :password, :ip, :name, :su, :sp)
63
+ response = waybill_client.request 'update_service_user' do
64
+ soap.body = {'user_name' => opts[:username], 'user_password' => opts[:password], 'ip' => opts[:ip], 'name' => opts[:name], 'su' => opts[:su], 'sp' => opts[:sp]}
65
+ end
66
+ response.to_hash[:update_service_user_response][:update_service_user_result]
67
67
  end
68
68
 
69
69
  # Check service user. Also used for getting user's ID and payer's ID.
data/lib/rs/version.rb CHANGED
@@ -1,4 +1,4 @@
1
1
  # -*- encoding : utf-8 -*-
2
2
  module RS
3
- VERSION = '0.1.3'
3
+ VERSION = '0.1.4'
4
4
  end
@@ -11,40 +11,40 @@ describe 'getting own IP address' do
11
11
  it { should match /([0-9]{1,3}\.){3}[0-9]{1,3}/ }
12
12
  end
13
13
 
14
- # describe 'working with service user' do
15
- # before(:all) do
16
- # @username = "user_#{Time.now.to_i}_#{rand(100)}"
17
- # @password = '123456'
18
- # @new_password = 'new_password_123456'
19
- # @ip = RS.sys.what_is_my_ip
20
- # @resp = RS.sys.create_user(USER01.merge(ip: @ip, name: 'test', su: @username, sp: @password))
21
- # end
22
- # subject { @resp }
23
- # it { should == true }
24
- # describe 'update service user' do
25
- # before(:all) do
26
- # @resp = RS.sys.update_user(USER01.merge(ip: @ip, name: 'test', su: @username, sp: @new_password))
27
- # end
28
- # subject { @resp }
29
- # it { should == true }
30
- # end
31
- # describe 'check service user: illegal user/password' do
32
- # before(:all) do
33
- # @resp = RS.sys.check_user(su: @username, sp: @password)
34
- # end
35
- # subject { @resp }
36
- # it { should be_nil }
37
- # end
38
- # describe 'check service user: legal user/password' do
39
- # before(:all) do
40
- # @resp = RS.sys.check_user(su: @username, sp: @new_password)
41
- # end
42
- # subject { @resp }
43
- # it { should_not be_nil }
44
- # specify { subject[:payer].should_not be_nil }
45
- # specify { subject[:user].should_not be_nil }
46
- # end
47
- # end
14
+ describe 'working with service user' do
15
+ before(:all) do
16
+ @username = "tbilisi"
17
+ @password = '123456'
18
+ @new_password = 'new_password_123456'
19
+ @ip = RS.sys.what_is_my_ip
20
+ # @resp = RS.sys.create_user(USER01.merge(ip: @ip, name: 'test', su: @username, sp: @password))
21
+ end
22
+ # subject { @resp }
23
+ # it { should == true }
24
+ describe 'update service user' do
25
+ before(:all) do
26
+ @resp = RS.sys.update_user(USER01.merge(ip: @ip, name: 'test', su: @username, sp: @new_password))
27
+ end
28
+ subject { @resp }
29
+ it { should == true }
30
+ end
31
+ describe 'check service user: illegal user/password' do
32
+ before(:all) do
33
+ @resp = RS.sys.check_user(su: @username, sp: @password)
34
+ end
35
+ subject { @resp }
36
+ it { should be_nil }
37
+ end
38
+ describe 'check service user: legal user/password' do
39
+ before(:all) do
40
+ @resp = RS.sys.check_user(su: @username, sp: @new_password)
41
+ end
42
+ subject { @resp }
43
+ it { should_not be_nil }
44
+ specify { subject[:payer].should_not be_nil }
45
+ specify { subject[:user].should_not be_nil }
46
+ end
47
+ end
48
48
 
49
49
  describe 'get error codes' do
50
50
  before(:all) do
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rs.ge
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.3
4
+ version: 0.1.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Dimitri Kurashvili