ully 0.1.1 → 0.2.0

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: 4a97f89996532048cfd94def85912a5e2878a9b6
4
- data.tar.gz: ae90535729cb2e4b8a24cc60e78aae9ccdf5d9a7
3
+ metadata.gz: 7f6a65977caadec7e3fac2534a3e1ded15a8a41d
4
+ data.tar.gz: 89665ffb6559be95266ec8365caa5017ca2712e7
5
5
  SHA512:
6
- metadata.gz: c54759bf64ca0756b4a705117ff94d48d82df0e82fb26e68a9e4aace10780814f62de0275492c1a9ae95a98c906703824309ea2498a168569cfde2c2ed0d8a65
7
- data.tar.gz: b352ef1956b07dd81b1d81a3f3a7819711d4fb79a94ee290b2354452a9896c55db00ec9c4d437cb6337d576f983c4c16f1b5b4496d626dd3d4ec77a5e25ee941
6
+ metadata.gz: 7ff291f70bacda7bf853fdf01df29731198259d5b3420ac1735764925801a90d5a0acb3c22b1f16a6b2f13c41739d7cac3ea1e2b45209fe5972b873ae7ad510a
7
+ data.tar.gz: 7be071b9b7b29bd4f4fddeb7ff4f423e928fca43d04f0fab6cded9a267ae54c88132344e26f4224d5d3e9a7b2e251fd2d91874e2f3e5648d13d24eb008bd5b26
data/CHANGELOG CHANGED
@@ -1,3 +1,12 @@
1
+ v0.2.0:
2
+ date: 2014-04-28
3
+ changes:
4
+ - Adding support for new Ully API
5
+ - Removing signup and forgot features
6
+ v0.1.1:
7
+ date: 2014-04-17
8
+ changes:
9
+ - Adding support for new Ully API
1
10
  v0.1.0:
2
11
  date: 2014-04-2
3
12
  changes:
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?("permissions")
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?("permissions")
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
@@ -5,5 +5,5 @@
5
5
  # Licensed under the BSD license.
6
6
 
7
7
  module Ully
8
- VERSION = "0.1.1"
8
+ VERSION = "0.2.0"
9
9
  end
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.1.1
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-18 00:00:00.000000000 Z
11
+ date: 2014-04-28 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: httparty