pritunl_api_client 1.4.0 → 2.0.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/README.md +6 -3
- data/lib/pritunl_api_client/key.rb +3 -2
- data/lib/pritunl_api_client/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: cf3194d492fc76ededeaef195f95530f862ddda1
|
|
4
|
+
data.tar.gz: a51ba95ceb9a4e1adb9823991996ac68d4c35915
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 7d792cef2845d559f7b16dc3978094937185c641540c8491b475e87266eb935f97419e300caa819e3413fd8284b641b3c23fed2f76048ec36f9c2298438edfc0
|
|
7
|
+
data.tar.gz: a2b5e5fa6841e60348450bfd179807051dc6c6f586a098939feb2b254226ef69559be0e4f0120bdb30e9e9370734e793fc36bee1666811a8d02432fd64e6807f
|
data/README.md
CHANGED
|
@@ -3,7 +3,6 @@
|
|
|
3
3
|
[](https://badge.fury.io/rb/pritunl_api_client)
|
|
4
4
|

|
|
5
5
|
[](http://inch-ci.org/github/eterry1388/pritunl_api_client)
|
|
6
|
-
[](https://gemnasium.com/eterry1388/pritunl_api_client)
|
|
7
6
|
|
|
8
7
|
API client for Pritunl written in Ruby.
|
|
9
8
|
|
|
@@ -24,7 +23,7 @@ gem install pritunl_api_client
|
|
|
24
23
|
require 'pritunl_api_client'
|
|
25
24
|
|
|
26
25
|
@pritunl = PritunlApiClient::Client.new(
|
|
27
|
-
base_url: 'https://localhost
|
|
26
|
+
base_url: 'https://localhost',
|
|
28
27
|
api_token: 'p7g444S3IZ5wmFvmzWmx14qACXdzQ25b',
|
|
29
28
|
api_secret: 'OpS9fjxkPI3DclkdKDDr6mqYVd0DJh4i',
|
|
30
29
|
verify_ssl: false
|
|
@@ -323,6 +322,10 @@ from the method rather than to a downloaded file.
|
|
|
323
322
|
|
|
324
323
|
### Download a users key.
|
|
325
324
|
|
|
325
|
+
**Deprecated:** This method of downloading the OVPN file is not reliable. Use `#download_tar` or `#download_zip` instead.
|
|
326
|
+
|
|
327
|
+
User organization must be attached to a server AND user must be enabled and NOT connected!
|
|
328
|
+
|
|
326
329
|
```ruby
|
|
327
330
|
@pritunl.key.download( organization_id: org['id'], user_id: user['id'], path: 'output.ovpn' )
|
|
328
331
|
```
|
|
@@ -537,7 +540,7 @@ server up and running when executing the tests.
|
|
|
537
540
|
### How to run system tests
|
|
538
541
|
|
|
539
542
|
```bash
|
|
540
|
-
BASE_URL='https://your-ip-address
|
|
543
|
+
BASE_URL='https://your-ip-address' API_TOKEN='your-api-token' API_SECRET='your-api-secret' rspec
|
|
541
544
|
```
|
|
542
545
|
|
|
543
546
|
The output should look something like this:
|
|
@@ -10,7 +10,8 @@ module PritunlApiClient
|
|
|
10
10
|
|
|
11
11
|
# Download a users key
|
|
12
12
|
#
|
|
13
|
-
# @note User organization must be attached to a server
|
|
13
|
+
# @note User organization must be attached to a server AND user must be enabled and NOT connected!
|
|
14
|
+
# @deprecated This method of downloading the OVPN file is not reliable. Use {#download_tar} or {#download_zip} instead.
|
|
14
15
|
# @param organization_id [String]
|
|
15
16
|
# @param user_id [String]
|
|
16
17
|
# @param path [String] Local path to save downloaded file (if omitted, file content fill be returned)
|
|
@@ -69,7 +70,7 @@ module PritunlApiClient
|
|
|
69
70
|
path
|
|
70
71
|
end
|
|
71
72
|
|
|
72
|
-
# Generate a temporary url to download a users key archive
|
|
73
|
+
# Generate a temporary url to download a users key archive
|
|
73
74
|
#
|
|
74
75
|
# @param organization_id [String]
|
|
75
76
|
# @param user_id [String]
|
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: pritunl_api_client
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version:
|
|
4
|
+
version: 2.0.0
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Eric Terry
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2016-
|
|
11
|
+
date: 2016-05-04 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: rest-client
|