wtforum 0.1.0 → 0.1.1
Sign up to get free protection for your applications and to get access to all the features.
- data/README.md +13 -4
- data/lib/wtforum/user.rb +4 -4
- data/lib/wtforum/version.rb +1 -1
- data/spec/integration/wtforum_user_spec.rb +1 -1
- metadata +3 -3
data/README.md
CHANGED
@@ -23,14 +23,23 @@ Or install it yourself as:
|
|
23
23
|
|
24
24
|
WTForum has the following features:
|
25
25
|
|
26
|
-
### CRUD
|
26
|
+
### CRUD user accounts
|
27
27
|
|
28
|
-
#
|
29
|
-
|
28
|
+
# Modeled after ActiveRecord API
|
29
|
+
|
30
|
+
# Create
|
30
31
|
user = WTForum::User.create username: "wtforum_test_user", email: "wtforum_test_user@example.com"
|
32
|
+
|
33
|
+
# Read
|
34
|
+
WTForum::User.count
|
31
35
|
user = WTForum::User.find(user.id)
|
32
|
-
|
36
|
+
user = WTForum::User.find_by_username(user.username)
|
37
|
+
|
38
|
+
# Update
|
33
39
|
user.update_attributes! username: "wtforum_test_user_2", email: "wtforum_test_user_2@example.com"
|
40
|
+
|
41
|
+
# Destroy
|
42
|
+
WTForum::User.destroy(user.id)
|
34
43
|
user.destroy
|
35
44
|
|
36
45
|
### Log in your user via their Single Sign On (SSO) API
|
data/lib/wtforum/user.rb
CHANGED
@@ -52,8 +52,8 @@ module WTForum
|
|
52
52
|
find(user_id).update_attributes!(attributes)
|
53
53
|
end
|
54
54
|
|
55
|
-
def self.
|
56
|
-
authorized_agent.get
|
55
|
+
def self.destroy user_id
|
56
|
+
authorized_agent.get destroy_uri(user_id)
|
57
57
|
true
|
58
58
|
end
|
59
59
|
|
@@ -86,7 +86,7 @@ module WTForum
|
|
86
86
|
end
|
87
87
|
|
88
88
|
def destroy
|
89
|
-
self.class.
|
89
|
+
self.class.destroy id
|
90
90
|
end
|
91
91
|
|
92
92
|
attr_accessor :id, :member, :email
|
@@ -167,7 +167,7 @@ module WTForum
|
|
167
167
|
uri
|
168
168
|
end
|
169
169
|
|
170
|
-
def self.
|
170
|
+
def self.destroy_uri user_id
|
171
171
|
uri = WTForum.base_uri
|
172
172
|
uri.path = "/register/delete"
|
173
173
|
uri.query = "mem_userid=#{user_id}"
|
data/lib/wtforum/version.rb
CHANGED
metadata
CHANGED
@@ -2,7 +2,7 @@
|
|
2
2
|
name: wtforum
|
3
3
|
version: !ruby/object:Gem::Version
|
4
4
|
prerelease:
|
5
|
-
version: 0.1.
|
5
|
+
version: 0.1.1
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
8
8
|
- Micah Geisel
|
@@ -155,7 +155,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
155
155
|
requirements:
|
156
156
|
- - ! '>='
|
157
157
|
- !ruby/object:Gem::Version
|
158
|
-
hash:
|
158
|
+
hash: 416699042937223265
|
159
159
|
segments:
|
160
160
|
- 0
|
161
161
|
version: '0'
|
@@ -164,7 +164,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
164
164
|
requirements:
|
165
165
|
- - ! '>='
|
166
166
|
- !ruby/object:Gem::Version
|
167
|
-
hash:
|
167
|
+
hash: 416699042937223265
|
168
168
|
segments:
|
169
169
|
- 0
|
170
170
|
version: '0'
|