ully 0.1.1 → 0.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/CHANGELOG +9 -0
- data/README.md +0 -64
- data/lib/ully.rb +2 -14
- data/lib/ully/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 7f6a65977caadec7e3fac2534a3e1ded15a8a41d
|
4
|
+
data.tar.gz: 89665ffb6559be95266ec8365caa5017ca2712e7
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 7ff291f70bacda7bf853fdf01df29731198259d5b3420ac1735764925801a90d5a0acb3c22b1f16a6b2f13c41739d7cac3ea1e2b45209fe5972b873ae7ad510a
|
7
|
+
data.tar.gz: 7be071b9b7b29bd4f4fddeb7ff4f423e928fca43d04f0fab6cded9a267ae54c88132344e26f4224d5d3e9a7b2e251fd2d91874e2f3e5648d13d24eb008bd5b26
|
data/CHANGELOG
CHANGED
data/README.md
CHANGED
@@ -65,70 +65,6 @@ How to use this method
|
|
65
65
|
api.logged_in?
|
66
66
|
```
|
67
67
|
|
68
|
-
#### #signup(name, email, username, password, format=false)
|
69
|
-
|
70
|
-
|
71
|
-
**Parameter**: `name`
|
72
|
-
**Type**: `String`
|
73
|
-
**Example**: `myname`
|
74
|
-
|
75
|
-
|
76
|
-
**Parameter**: `email`
|
77
|
-
**Type**: `String`
|
78
|
-
**Example**: `example@example.com`
|
79
|
-
|
80
|
-
|
81
|
-
**Parameter**: `username`
|
82
|
-
**Type**: `String`
|
83
|
-
**Example**: `myusername`
|
84
|
-
|
85
|
-
|
86
|
-
**Parameter**: `password`
|
87
|
-
**Type**: `String`
|
88
|
-
**Example**: `123456test`
|
89
|
-
|
90
|
-
|
91
|
-
**Parameter**: `format`
|
92
|
-
**Type**: `String`
|
93
|
-
**Example**: `yaml`
|
94
|
-
|
95
|
-
|
96
|
-
The `signup` method is responsible for create accounts
|
97
|
-
|
98
|
-
How to use this method
|
99
|
-
|
100
|
-
```ruby
|
101
|
-
|
102
|
-
api.signup("myname", "email", "myusername", "123456test", "yaml")
|
103
|
-
```
|
104
|
-
|
105
|
-
#### #forgot(email, username, format=false)
|
106
|
-
|
107
|
-
|
108
|
-
**Parameter**: `email`
|
109
|
-
**Type**: `String`
|
110
|
-
**Example**: `example@example.com`
|
111
|
-
|
112
|
-
|
113
|
-
**Parameter**: `username`
|
114
|
-
**Type**: `String`
|
115
|
-
**Example**: `myusername`
|
116
|
-
|
117
|
-
|
118
|
-
**Parameter**: `format`
|
119
|
-
**Type**: `String`
|
120
|
-
**Example**: `yaml`
|
121
|
-
|
122
|
-
|
123
|
-
The `forgot` method is responsible for reset passwords
|
124
|
-
|
125
|
-
How to use this method
|
126
|
-
|
127
|
-
```ruby
|
128
|
-
|
129
|
-
api.forgot("example@example.com", "myusername", "yaml")
|
130
|
-
```
|
131
|
-
|
132
68
|
#### #stats(format=false)
|
133
69
|
|
134
70
|
|
data/lib/ully.rb
CHANGED
@@ -37,7 +37,7 @@ module Ully
|
|
37
37
|
response = self.class.post("/forgot/access_token", :body => {:email => email, :password => password})
|
38
38
|
json_response = JSON.parse(response.body)
|
39
39
|
config = json_response["response"]
|
40
|
-
if config.has_key?("access_token") && config.has_key?("
|
40
|
+
if config.has_key?("access_token") && config.has_key?("role")
|
41
41
|
File.open("ullyConfig.yml", "w"){ |f| f << config.to_yaml }
|
42
42
|
puts "Logged successfully!"
|
43
43
|
else
|
@@ -49,7 +49,7 @@ module Ully
|
|
49
49
|
def logged_in?
|
50
50
|
if File.exist?("ullyConfig.yml")
|
51
51
|
config = YAML.load_file("ullyConfig.yml")
|
52
|
-
if config.has_key?("access_token") && config.has_key?("
|
52
|
+
if config.has_key?("access_token") && config.has_key?("role")
|
53
53
|
true
|
54
54
|
else
|
55
55
|
false
|
@@ -59,18 +59,6 @@ module Ully
|
|
59
59
|
end
|
60
60
|
end
|
61
61
|
|
62
|
-
# Create accounts
|
63
|
-
def signup(name, email, username, password, format=false)
|
64
|
-
response = self.class.post("/signup", :body => {:name => name, :email => email, :username => username, :password => password})
|
65
|
-
self.class.pretty_response(response, format)
|
66
|
-
end
|
67
|
-
|
68
|
-
# Forgot password
|
69
|
-
def forgot(email, username, format=false)
|
70
|
-
response = self.class.post("/forgot", :body => {:email => email, :username => username})
|
71
|
-
self.class.pretty_response(response, format)
|
72
|
-
end
|
73
|
-
|
74
62
|
# Stats of Ully
|
75
63
|
def stats(format=false)
|
76
64
|
response = self.class.get("/stats")
|
data/lib/ully/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: ully
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.2.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Christopher EnyTC
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-04-
|
11
|
+
date: 2014-04-28 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: httparty
|