t411 0.0.10 → 0.0.11

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: a41fe118d272ad93ef2c79b2851a498ff7f8d130
4
- data.tar.gz: 6f58fac694224ca8cfcfb22f4b9fc61fd7e7a9b2
3
+ metadata.gz: ac7aa6c39ea2b817f2945654bd3f5018533a0bff
4
+ data.tar.gz: e18880ce74f4cf1ddb7fb9430bc93ca84e2176d7
5
5
  SHA512:
6
- metadata.gz: bc232c924285b8f7fd0d6549be12dc4134c9733205b836bd59ab9e43fc676a14458166f65421775ecf4b6a3f11841af3b6634314fb05ca4b8b4028f719c43889
7
- data.tar.gz: f629b0756d192fc93bc4b7e9ebbec34c00547e56c01fc9c2bb357f9bf344b9d45aa9bae4f0fb7e1d8554b6d496ca9daf7e6d642ae62cc26221273d0ab161b492
6
+ metadata.gz: cb19dc335f8e6aeb7300fa8dd717d3520b30fee4748bcc5d65149de37199ceb44db469e1e7e6eb45bac6779f51af4c49c0fe7bf941fb8d3dd3cbc4b442b6d1cc
7
+ data.tar.gz: 0f1be2f36293d2dca2b72cb3f52879087369ed32095acfd5dfa9b59e8e5e0a07fe80b43eba8f4c4e7bfbc947f2db12ce8e660cc04d6441f05c265c098d7301dd
@@ -6,7 +6,7 @@ module T411
6
6
  module Api
7
7
  extend self
8
8
  attr_accessor :token
9
- $t411_base_url = 'http://api.t411.ch'
9
+ $t411_base_url = ENV['T411_API_URL'] || 'https://api.t411.li'
10
10
 
11
11
  def self.connect(username,password)
12
12
  uri = URI.parse($t411_base_url + "/auth")
@@ -14,7 +14,7 @@ module T411
14
14
  options = {limit: 100, cid: nil}.merge(options)
15
15
  path = "/torrents/search/#{query.gsub(' ','+')}?&limit=#{options[:limit]}&cid=#{options[:cid]}" if options[:cid] != nil && options[:cid].is_a?(Integer) || path = "/torrents/search/#{query.gsub(' ','+')}?&limit=#{options[:limit]}"
16
16
  req = Net::HTTP::Get.new(path); req['Authorization'] = T411::Api.shared_token
17
- Net::HTTP.new($t411_base_url.gsub('http://','')).request(req).body
17
+ Net::HTTP.new($t411_base_url.gsub('https://','').gsub('http://','')).request(req).body
18
18
  end
19
19
 
20
20
  def self.details(id)
@@ -29,4 +29,3 @@ module T411
29
29
 
30
30
  end
31
31
  end
32
-
@@ -1,3 +1,3 @@
1
1
  module T411
2
- VERSION = '0.0.10'
2
+ VERSION = '0.0.11'
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.10
4
+ version: 0.0.11
5
5
  platform: ruby
6
6
  authors:
7
7
  - Christophe Augello
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-02-27 00:00:00.000000000 Z
11
+ date: 2017-03-04 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -77,7 +77,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
77
77
  version: '0'
78
78
  requirements: []
79
79
  rubyforge_project:
80
- rubygems_version: 2.4.8
80
+ rubygems_version: 2.2.2
81
81
  signing_key:
82
82
  specification_version: 4
83
83
  summary: Ruby wrapper for the t411.ch API