t411 0.0.8 → 0.0.9

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 6953a22077721492504d8aaa3aa058a29dd12db8
4
- data.tar.gz: c346e8a4be1ab932836dba67efa1e5e3eaf367ff
3
+ metadata.gz: f4695ec178205fc28e73444c78488c7d9112e700
4
+ data.tar.gz: 1e7dccddb4046414f1e076413f6568b97d304a26
5
5
  SHA512:
6
- metadata.gz: 18a312732d5cd0ca61bc1158d9650ab02da618ef3d7e0be806e6a9d60e823a6272e7dcbf6a54b33d2432ff55c8db144068f93f002dd852ba903032a4ed20e7ce
7
- data.tar.gz: 440e9f7f6d313d7169f289f8e79b6bd152076e764d738e3246c98bdc9a9cc6410c909433438ed91fe355a8577a0e053dc06a29608fa526c85d166f0485961a3c
6
+ metadata.gz: 7edd893983a68272e6e1dc9d5a3bff10aa8a62cea59b25dfd007fe62a368a0e1cdf0a530db0d9c24b80ee500b4428d888d9f86015bbc42f3ace6d097aaa3f379
7
+ data.tar.gz: 8782edd7bab6356c1a3b5335348d9f6bec439702dd89e692639be33fe44ba8a048c9b5d261b29bd33bd6f90afd533ea0edb722d5ebf005c0e39af2d0229348f8
data/README.md CHANGED
@@ -21,6 +21,7 @@ Or install it yourself as:
21
21
  ### Authenticate
22
22
 
23
23
  T411.authenticate(username,password)
24
+ T411.authenticated?
24
25
 
25
26
  ### User
26
27
 
@@ -22,7 +22,7 @@
22
22
  OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
23
23
  WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
24
24
 
25
- A Ruby wrapper for the t411.io API.
25
+ A Ruby wrapper for the t411.in API.
26
26
  Supports all API methods
27
27
  =end
28
28
 
@@ -42,5 +42,9 @@ module T411
42
42
  def authenticate(username,password)
43
43
  T411::Api.connect(username,password)
44
44
  end
45
+
46
+ def authenticated?
47
+ T411::Api.shared_token ? true : false
48
+ end
45
49
  end
46
- end
50
+ end
@@ -22,7 +22,7 @@ module T411
22
22
  end
23
23
 
24
24
  def self.download(id,path = Dir.pwd)
25
- File.open("#{path}/#{id}.torrent", 'a+') do |line|
25
+ File.open("#{path}/#{id}.torrent", 'ab+') do |line|
26
26
  line.puts T411::Api.request_data(URI.parse($t411_base_url + "/torrents/download/#{id}"))
27
27
  end
28
28
  end
@@ -1,3 +1,3 @@
1
1
  module T411
2
- VERSION = '0.0.8'
2
+ VERSION = '0.0.9'
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: t411
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.8
4
+ version: 0.0.9
5
5
  platform: ruby
6
6
  authors:
7
7
  - Christophe Augello
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-09-24 00:00:00.000000000 Z
11
+ date: 2015-11-04 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler