utorrent-webapi-ruby 0.0.1 → 0.0.2.1

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: e1ce4177d5fd69367b27da37146883c24496d6e7
4
- data.tar.gz: bb1d3c5272406c3e77c10e4b1402578fe21dafb8
3
+ metadata.gz: 00de944a6c2444043494de2a78c55a33bb0eb302
4
+ data.tar.gz: c61533c6524a044f02a4f7df686254b40488e63b
5
5
  SHA512:
6
- metadata.gz: 5d6b38c39b3f9c10af85bcc1c2b51bb35175bc826999f67a42b1ed35387344589eefa814e9c99a685794939f03eaa6db976f3eb63726cfcb091010a30f25f097
7
- data.tar.gz: bf068bdd3ee15df7cc36c8e220fb97c56137eef887b1b99aebd33599381d2f498e752274210e5b2ff43a3fd75938d1fe2929fa822d38b5393f505e5547520aac
6
+ metadata.gz: 70d2e31e475112a6b18e64ff642048a28df821e274be00872649ccef24c9d207e2149d82d28c842df1c49aa4c9241af4a4e3d8237eafbadcaac6fe105b56a38f
7
+ data.tar.gz: e8b9f40417d9a7fb3806a125a7563ce55f7261cd35b93d778cc01c739784991f99ca4832f49b4d368abed9bba25220941025934b27327191adeda9fd47405a76
data/README.md CHANGED
@@ -1,5 +1,8 @@
1
- # utorrent-webapi-ruby
1
+ # utorrent-webapi-ruby (BETA)
2
2
 
3
+ This gem is used to utilise the µTorrent 2.0 (or above) webapi
4
+
5
+ It uses the new [authentication mechanism](https://forum.utorrent.com/topic/49550-attention-webui-developers-support-token-authentication/), also you can find the [api reference](http://help.utorrent.com/customer/portal/topics/664593/articles).
3
6
 
4
7
  ## Installation
5
8
 
@@ -28,6 +31,7 @@ The current version only support the following actions
28
31
  * Querying files within a specific torrent [attributes](https://github.com/PeterWuMC/utorrent-webapi-ruby/blob/master/lib/u_torrent/file.rb#L10-L13)
29
32
  * Add new torrent using with url
30
33
  * Updating a file [priority](https://github.com/PeterWuMC/utorrent-webapi-ruby/blob/master/lib/u_torrent/file.rb#L3-L8)
34
+ * As of the current version, it does not have any error handling. Also the token is only valid for 30 minutes and it does not get automatically renewed.
31
35
 
32
36
  ## Usage
33
37
 
@@ -42,7 +42,9 @@ module UTorrent
42
42
  action: 'add-url',
43
43
  s: url
44
44
  )
45
- UTorrent::Torrent.all.detect {|torrent| torrent.queue_order == UTorrent::Torrent.all.map(&:queue_order).max}
45
+ all_torrents = UTorrent::Torrent.all
46
+ max_queue_order = all_torrents.map(&:queue_order).max
47
+ all_torrents.detect { |torrent| torrent.queue_order == max_queue_order }
46
48
  end
47
49
 
48
50
  def statuses
@@ -1,3 +1,3 @@
1
1
  module UTorrent
2
- VERSION = '0.0.1'.freeze
2
+ VERSION = '0.0.2.1'.freeze
3
3
  end
@@ -19,5 +19,5 @@ Gem::Specification.new do |spec|
19
19
  spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
20
20
  spec.require_paths = ['lib']
21
21
 
22
- spec.add_dependency 'nokogiri'
22
+ spec.add_dependency 'nokogiri', '~> 1.6.7.0'
23
23
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: utorrent-webapi-ruby
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.1
4
+ version: 0.0.2.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Peter Wu
@@ -14,16 +14,16 @@ dependencies:
14
14
  name: nokogiri
15
15
  requirement: !ruby/object:Gem::Requirement
16
16
  requirements:
17
- - - ">="
17
+ - - "~>"
18
18
  - !ruby/object:Gem::Version
19
- version: '0'
19
+ version: 1.6.7.0
20
20
  type: :runtime
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
- - - ">="
24
+ - - "~>"
25
25
  - !ruby/object:Gem::Version
26
- version: '0'
26
+ version: 1.6.7.0
27
27
  description: UTorrent webapi ruby library
28
28
  email:
29
29
  - petergenius@gmail.com