remotransmission 1.0.0 → 1.0.1

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,2 @@
1
+ pkg/
2
+ .bundle
data/Gemfile ADDED
@@ -0,0 +1,4 @@
1
+ source 'https://rubygems.org'
2
+
3
+ # gem dependencies in remotransmission.gemspec
4
+ gemspec
@@ -0,0 +1,21 @@
1
+ PATH
2
+ remote: .
3
+ specs:
4
+ remotransmission (1.0.0)
5
+ choice (~> 0.1)
6
+ json (~> 1.7)
7
+
8
+ GEM
9
+ remote: https://rubygems.org/
10
+ specs:
11
+ choice (0.1.6)
12
+ json (1.7.5)
13
+ rake (0.9.2.2)
14
+
15
+ PLATFORMS
16
+ ruby
17
+
18
+ DEPENDENCIES
19
+ bundler (~> 1.2.0)
20
+ rake
21
+ remotransmission!
@@ -0,0 +1,90 @@
1
+ RemoTransmission
2
+ ================
3
+
4
+ A command line interface for remote transmission.
5
+
6
+ Can add a torrent and list the current torrents with their percentage.
7
+
8
+ Install
9
+ -------
10
+
11
+ ```sh
12
+ $ gem install remotransmission
13
+ ```
14
+
15
+ Usage
16
+ -----
17
+
18
+ ```sh
19
+ $ remotransmission
20
+ Usage: remotransmission [options...] <command>
21
+
22
+ Commands:
23
+ -a, --add=URL Add a torrent by its URL
24
+ -l, --list List current torrents
25
+ --help Show this message
26
+ --version Show version
27
+
28
+ Options:
29
+ --host=IP The hostname or ip of the server to connect to (default "localhost")
30
+ --port=PORT The port to bind to (default 9091)
31
+ -u, --user=USER User to authenticate (default "freebox")
32
+ -p, --password=PASSWORD Password to authenticate
33
+ -d, --debug Enable debug mode (default false)
34
+ ```
35
+
36
+ Examples
37
+ --------
38
+
39
+ Adding a magnet URL with the default host and port and user (`192.168.0.254`,
40
+ `9091` and `freebox`) and specifying a password:
41
+
42
+ ```sh
43
+ $ remotransmission -p PaSsWord --add 'magnet://...'
44
+ success
45
+ ```
46
+
47
+ List all current torrents by specifying the hostname, user and password:
48
+
49
+ ```sh
50
+ $ remotransmission -u bob -p PaSsWord -s 214.512.12.20 --list
51
+ 100% - ubuntu-10.10-desktop-i386.iso
52
+ 80% - ubuntu-10.10-server-i386.iso
53
+ ```
54
+
55
+ Configuration file
56
+ ------------------
57
+
58
+ To set any global option you can create a `~/.config/remotransmission/settings.json`:
59
+
60
+ ```json
61
+ {
62
+ "host": "192.168.0.254",
63
+ "port": 9091,
64
+ "user": "freebox",
65
+ "password": "foobarspam",
66
+ "debug": true
67
+ }
68
+ ```
69
+
70
+ Development
71
+ -----------
72
+
73
+ Running remotransmission locally:
74
+
75
+ ```sh
76
+ $ bundle
77
+ $ bundle exec remotransmission
78
+ ```
79
+
80
+ Build, install and release the gem through rake tasks.
81
+
82
+ ```sh
83
+ $ rake -T
84
+ ```
85
+
86
+ Credit
87
+ ------
88
+
89
+ - Authors : Sunny Ripert <sunny@sunfox.org>
90
+ - License : [[MIT|http://opensource.org/licenses/MIT]]
@@ -0,0 +1 @@
1
+ require "bundler/gem_tasks"
@@ -8,7 +8,9 @@ require 'remotransmission'
8
8
  defaults = RemoTransmission::default_options("~/.config/remotransmission/settings.json")
9
9
 
10
10
  Choice.options do
11
- header ""
11
+ banner "RemoTransmission v#{RemoTransmission::VERSION}\n"
12
+ banner "Usage: remotransmission [options...] <command>"
13
+ header ''
12
14
  header 'Commands:'
13
15
  option :add do
14
16
  short '-a'
@@ -22,22 +24,8 @@ Choice.options do
22
24
  desc "List current torrents"
23
25
  end
24
26
 
25
- option :help do
26
- long '--help'
27
- desc 'Show this message'
28
- end
29
-
30
- option :version do
31
- long '--version'
32
- desc 'Show version'
33
- action do
34
- puts "RemoTransmission #{RemoTransmission::Version::STRING}"
35
- exit
36
- end
37
- end
38
-
39
27
  separator ""
40
- separator 'Common options:'
28
+ separator 'Options:'
41
29
  option :host do
42
30
  long '--host=IP'
43
31
  desc "The hostname or ip of the server to connect to (default #{defaults[:host].inspect})"
@@ -69,7 +57,7 @@ Choice.options do
69
57
  option :debug do
70
58
  short '-d'
71
59
  long '--debug'
72
- desc "Enable debug mode (default #{defaults[:debug].inspect})"
60
+ desc "Enable debug mode"
73
61
  default defaults[:debug]
74
62
  end
75
63
 
@@ -82,6 +70,7 @@ Choice.options do
82
70
  separator " 100% - ubuntu-10.10-server-i386.iso"
83
71
  end
84
72
 
73
+
85
74
  options = {
86
75
  host: Choice[:host],
87
76
  port: Choice[:port],
@@ -1,5 +1,8 @@
1
1
  require 'json'
2
2
  require 'net/http'
3
+ require 'remotransmission/version'
4
+ require 'remotransmission/remote'
5
+ require 'remotransmission/client'
3
6
 
4
7
  module RemoTransmission
5
8
  DEFAULT_OPTIONS = {
@@ -32,11 +35,5 @@ module RemoTransmission
32
35
 
33
36
  defaults
34
37
  end
35
-
36
- # :nodoc:
37
- class ShellError < StandardError; end
38
38
  end
39
39
 
40
- require 'remotransmission/version'
41
- require 'remotransmission/remote'
42
- require 'remotransmission/client'
@@ -1,8 +1,3 @@
1
1
  module RemoTransmission
2
- module Version #:nodoc:
3
- MAJOR = 1
4
- MINOR = 0
5
- TINY = 0
6
- STRING = [MAJOR, MINOR, TINY] * '.'
7
- end
2
+ VERSION = "1.0.1"
8
3
  end
@@ -0,0 +1,24 @@
1
+ # encoding: utf-8
2
+
3
+ require './lib/remotransmission/version'
4
+
5
+ Gem::Specification.new do |gem|
6
+ gem.name = 'remotransmission'
7
+ gem.version = RemoTransmission::VERSION
8
+
9
+ gem.authors = ['Sunny Ripert']
10
+ gem.email = ['sunny@sunfox.org']
11
+ gem.summary = "Remote Transmission"
12
+ gem.description = "A gem that can talk to remote Transmission demons"
13
+ gem.homepage = 'http://github.com/sunny/remotransmission'
14
+ gem.license = 'MIT'
15
+
16
+ gem.files = `git ls-files`.split("\n")
17
+ gem.test_files = `git ls-files -- {test,spec,features}/*`.split("\n")
18
+ gem.executables = `git ls-files -- bin/*`.split("\n").map{ |f| File.basename(f) }
19
+
20
+ gem.add_runtime_dependency "choice", "~> 0.1"
21
+ gem.add_runtime_dependency "json", "~> 1.7"
22
+
23
+ gem.add_development_dependency "rake"
24
+ end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: remotransmission
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.0
4
+ version: 1.0.1
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,12 +9,11 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2012-08-24 00:00:00.000000000 +02:00
13
- default_executable:
12
+ date: 2012-09-21 00:00:00.000000000 Z
14
13
  dependencies:
15
14
  - !ruby/object:Gem::Dependency
16
15
  name: choice
17
- requirement: &82533290 !ruby/object:Gem::Requirement
16
+ requirement: !ruby/object:Gem::Requirement
18
17
  none: false
19
18
  requirements:
20
19
  - - ~>
@@ -22,10 +21,15 @@ dependencies:
22
21
  version: '0.1'
23
22
  type: :runtime
24
23
  prerelease: false
25
- version_requirements: *82533290
24
+ version_requirements: !ruby/object:Gem::Requirement
25
+ none: false
26
+ requirements:
27
+ - - ~>
28
+ - !ruby/object:Gem::Version
29
+ version: '0.1'
26
30
  - !ruby/object:Gem::Dependency
27
31
  name: json
28
- requirement: &82533040 !ruby/object:Gem::Requirement
32
+ requirement: !ruby/object:Gem::Requirement
29
33
  none: false
30
34
  requirements:
31
35
  - - ~>
@@ -33,20 +37,47 @@ dependencies:
33
37
  version: '1.7'
34
38
  type: :runtime
35
39
  prerelease: false
36
- version_requirements: *82533040
40
+ version_requirements: !ruby/object:Gem::Requirement
41
+ none: false
42
+ requirements:
43
+ - - ~>
44
+ - !ruby/object:Gem::Version
45
+ version: '1.7'
46
+ - !ruby/object:Gem::Dependency
47
+ name: rake
48
+ requirement: !ruby/object:Gem::Requirement
49
+ none: false
50
+ requirements:
51
+ - - ! '>='
52
+ - !ruby/object:Gem::Version
53
+ version: '0'
54
+ type: :development
55
+ prerelease: false
56
+ version_requirements: !ruby/object:Gem::Requirement
57
+ none: false
58
+ requirements:
59
+ - - ! '>='
60
+ - !ruby/object:Gem::Version
61
+ version: '0'
37
62
  description: A gem that can talk to remote Transmission demons
38
- email: sunny@sunfox.org
63
+ email:
64
+ - sunny@sunfox.org
39
65
  executables:
40
66
  - remotransmission
41
67
  extensions: []
42
68
  extra_rdoc_files: []
43
69
  files:
70
+ - .gitignore
71
+ - Gemfile
72
+ - Gemfile.lock
73
+ - README.md
74
+ - Rakefile
75
+ - bin/remotransmission
44
76
  - lib/remotransmission.rb
45
77
  - lib/remotransmission/client.rb
46
78
  - lib/remotransmission/remote.rb
47
79
  - lib/remotransmission/version.rb
48
- - bin/remotransmission
49
- has_rdoc: true
80
+ - remotransmission.gemspec
50
81
  homepage: http://github.com/sunny/remotransmission
51
82
  licenses:
52
83
  - MIT
@@ -68,7 +99,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
68
99
  version: '0'
69
100
  requirements: []
70
101
  rubyforge_project:
71
- rubygems_version: 1.6.2
102
+ rubygems_version: 1.8.24
72
103
  signing_key:
73
104
  specification_version: 3
74
105
  summary: Remote Transmission