portatext 1.1.0 → 1.1.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +1 -1
- data/lib/portatext/command/api/my_password.rb +40 -0
- data/lib/portatext.rb +1 -0
- data/portatext.gemspec +1 -1
- metadata +3 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: a8ef581d57fc7b2b4a813b6522661766edc4388b
|
4
|
+
data.tar.gz: 4dddcf5fd947ddd806cb5d2a7fb6090720e12257
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 576c63568bd6bc6b8c6370af7d0a6302cafccf7b642a40997260d5984031adea3003f7c573c1e58d5e937f499bf2e2a5d1522034f0b6ebdc48ef14ccab06c8ef
|
7
|
+
data.tar.gz: e66e7fefa293cbb06b75b62ddd39f60bb9f616de78aefff46b0805caf86707d9d45cdd983ec4ff748af81974b7cac434caf14120565c0430721503931890dcdf
|
data/README.md
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
[![License](http://img.shields.io/badge/license-APACHE2-blue.svg)](http://img.shields.io/badge/license-APACHE2-blue.svg)
|
2
2
|
[![Gem Version](https://badge.fury.io/rb/portatext.svg)](https://badge.fury.io/rb/portatext)
|
3
|
-
[![Yard Docs](http://img.shields.io/badge/yard-docs-blue.svg)](http://www.rubydoc.info/github/portatext/ruby-sdk
|
3
|
+
[![Yard Docs](http://img.shields.io/badge/yard-docs-blue.svg)](http://www.rubydoc.info/github/portatext/ruby-sdk)
|
4
4
|
|
5
5
|
[![Build Status](https://travis-ci.org/PortaText/ruby-sdk.svg)](https://travis-ci.org/PortaText/ruby-sdk)
|
6
6
|
[![Coverage Status](https://coveralls.io/repos/PortaText/ruby-sdk/badge.svg?branch=master&service=github)](https://coveralls.io/github/PortaText/ruby-sdk?branch=master)
|
@@ -0,0 +1,40 @@
|
|
1
|
+
module PortaText
|
2
|
+
module Command
|
3
|
+
module Api
|
4
|
+
# The me/password endpoint.
|
5
|
+
# https://github.com/PortaText/docs/wiki/REST-API#api_me_password
|
6
|
+
#
|
7
|
+
# Author:: Marcelo Gornstein (mailto:marcelog@portatext.com)
|
8
|
+
# Copyright:: Copyright (c) 2015 PortaText
|
9
|
+
# License:: Apache-2.0
|
10
|
+
class MyPassword < Base
|
11
|
+
def reset
|
12
|
+
set :reset, true
|
13
|
+
end
|
14
|
+
|
15
|
+
def for_email(email)
|
16
|
+
set :email, email
|
17
|
+
end
|
18
|
+
|
19
|
+
def with_nonce(nonce, new_password)
|
20
|
+
set :nonce, nonce
|
21
|
+
set :new_password, new_password
|
22
|
+
end
|
23
|
+
|
24
|
+
def change(old_password, new_password)
|
25
|
+
set :old_password, old_password
|
26
|
+
set :new_password, new_password
|
27
|
+
end
|
28
|
+
|
29
|
+
def endpoint(_method)
|
30
|
+
return 'me/password' if @args[:reset].nil?
|
31
|
+
@args.delete :reset
|
32
|
+
return 'me/password/reset' if @args[:nonce].nil?
|
33
|
+
nonce = @args[:nonce]
|
34
|
+
@args.delete :nonce
|
35
|
+
"me/password/reset/#{nonce}"
|
36
|
+
end
|
37
|
+
end
|
38
|
+
end
|
39
|
+
end
|
40
|
+
end
|
data/lib/portatext.rb
CHANGED
@@ -32,6 +32,7 @@ require_relative 'portatext/command/api/blacklist'
|
|
32
32
|
require_relative 'portatext/command/api/campaigns'
|
33
33
|
require_relative 'portatext/command/api/sms_campaign'
|
34
34
|
require_relative 'portatext/command/api/campaign_lifecycle'
|
35
|
+
require_relative 'portatext/command/api/my_password'
|
35
36
|
|
36
37
|
# The PortaText namespace.
|
37
38
|
#
|
data/portatext.gemspec
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: portatext
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.1.
|
4
|
+
version: 1.1.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- PortaText
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2016-01-05 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: simplecov
|
@@ -151,6 +151,7 @@ files:
|
|
151
151
|
- lib/portatext/command/api/email_verify.rb
|
152
152
|
- lib/portatext/command/api/jobs.rb
|
153
153
|
- lib/portatext/command/api/me.rb
|
154
|
+
- lib/portatext/command/api/my_password.rb
|
154
155
|
- lib/portatext/command/api/recharge.rb
|
155
156
|
- lib/portatext/command/api/settings.rb
|
156
157
|
- lib/portatext/command/api/sms.rb
|