billingsystem-remote-client 0.0.2 → 0.0.3
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/billingsystem-remote-client.rb +13 -4
- metadata +3 -3
@@ -2,7 +2,7 @@ $:.unshift(File.dirname(__FILE__)) unless
|
|
2
2
|
$:.include?(File.dirname(__FILE__)) || $:.include?(File.expand_path(File.dirname(__FILE__)))
|
3
3
|
|
4
4
|
module BillingsystemRemoteClient
|
5
|
-
VERSION = '0.0.
|
5
|
+
VERSION = '0.0.3'
|
6
6
|
end
|
7
7
|
|
8
8
|
require 'rubygems'
|
@@ -34,8 +34,8 @@ module BillingSystem
|
|
34
34
|
Frontend::User.password = password
|
35
35
|
end
|
36
36
|
|
37
|
-
#
|
38
|
-
def self.
|
37
|
+
# Build a user but don't save it.
|
38
|
+
def self.build_user(options = {})
|
39
39
|
OptionsChecker.check(options, [ :email, :password, :password_confirmation ])
|
40
40
|
email = options[:email]
|
41
41
|
password = options[:password]
|
@@ -43,7 +43,16 @@ module BillingSystem
|
|
43
43
|
# +_+ #
|
44
44
|
@user = Frontend::User.new( :email => email, :password => password, :password_confirmation => password_confirmation )
|
45
45
|
# return it!
|
46
|
-
@user
|
46
|
+
@user
|
47
|
+
end
|
48
|
+
|
49
|
+
# Create a user remotely. Will immediately save the user and return true/false depending on success.
|
50
|
+
def self.create_user(options = {})
|
51
|
+
@user = build_user(options)
|
52
|
+
# return it!
|
53
|
+
ret = @user.save
|
54
|
+
|
55
|
+
ret
|
47
56
|
end
|
48
57
|
end
|
49
58
|
end
|
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: billingsystem-remote-client
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 25
|
5
5
|
prerelease: false
|
6
6
|
segments:
|
7
7
|
- 0
|
8
8
|
- 0
|
9
|
-
-
|
10
|
-
version: 0.0.
|
9
|
+
- 3
|
10
|
+
version: 0.0.3
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- Commander Johnson
|