pritunl_api_client 1.4.0 → 2.0.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: 9e7aab97574ccbc72cffee7ab7e38fff8d6cc087
4
- data.tar.gz: ff948fea79a2d01158132c87a66004dc56121066
3
+ metadata.gz: cf3194d492fc76ededeaef195f95530f862ddda1
4
+ data.tar.gz: a51ba95ceb9a4e1adb9823991996ac68d4c35915
5
5
  SHA512:
6
- metadata.gz: 93353f991868e733cf931697079040de1cec0de4e1c62a8ba95db34abc1d1ec2efb85f7228ee5f63b991c4b264457d5277fd092ec959b1d3dbabf709dfc15a56
7
- data.tar.gz: 91da34ec454609c5a5a23abe3a83f71446e24e5a2d7c0005f67133307ae1df5525b9b9bac84918f9989a9b488a0a1dfee89a6e939228c7dc48700a34ccb33a1a
6
+ metadata.gz: 7d792cef2845d559f7b16dc3978094937185c641540c8491b475e87266eb935f97419e300caa819e3413fd8284b641b3c23fed2f76048ec36f9c2298438edfc0
7
+ data.tar.gz: a2b5e5fa6841e60348450bfd179807051dc6c6f586a098939feb2b254226ef69559be0e4f0120bdb30e9e9370734e793fc36bee1666811a8d02432fd64e6807f
data/README.md CHANGED
@@ -3,7 +3,6 @@
3
3
  [![Gem Version](https://badge.fury.io/rb/pritunl_api_client.svg)](https://badge.fury.io/rb/pritunl_api_client)
4
4
  ![](http://ruby-gem-downloads-badge.herokuapp.com/pritunl_api_client?type=total)
5
5
  [![Inline docs](http://inch-ci.org/github/eterry1388/pritunl_api_client.svg?branch=master)](http://inch-ci.org/github/eterry1388/pritunl_api_client)
6
- [![Dependency Status](https://gemnasium.com/eterry1388/pritunl_api_client.svg)](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:9700',
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:9700' API_TOKEN='your-api-token' API_SECRET='your-api-secret' rspec
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]
@@ -1,3 +1,3 @@
1
1
  module PritunlApiClient
2
- VERSION = '1.4.0'
2
+ VERSION = '2.0.0'
3
3
  end
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: 1.4.0
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-02-18 00:00:00.000000000 Z
11
+ date: 2016-05-04 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rest-client