jorp 1.0.0 → 1.0.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (3) hide show
  1. data/jorp.gemspec +1 -1
  2. data/lib/jorp.rb +9 -13
  3. metadata +2 -2
@@ -1,7 +1,7 @@
1
1
 
2
2
  Gem::Specification.new do |s|
3
3
  s.name = 'jorp'
4
- s.version = '1.0.0'
4
+ s.version = '1.0.1'
5
5
  s.date = '2012-10-16'
6
6
  s.summary = 'A SSH wrapper for local text editors'
7
7
  s.description = 'Jorp lets you edit remote files using local editors'
@@ -1,11 +1,15 @@
1
1
  # encoding: utf-8
2
2
 
3
3
  require 'bundler/setup'
4
+ # Bundler.setup
5
+
4
6
  require 'optparse'
5
7
  require 'jorp/sudo_adaptor'
6
8
  require 'jorp/basic_adaptor'
7
9
  require 'jorp/remote_adaptor'
8
10
 
11
+
12
+
9
13
  module Jorp
10
14
 
11
15
  DEFAULT_OPTIONS = {
@@ -43,20 +47,12 @@ module Jorp
43
47
  @options[:path] = args[0]
44
48
  end
45
49
 
46
- def run
47
- if @options[:hostname].nil?
48
- if @options[:sudo]
49
- @adaptor = SudoAdaptor.new(@options[:path])
50
- else
51
- @adaptor = BasicAdaptor.new(@options[:path])
52
- end
50
+ def run
51
+ puts "Using remote host: \"#{@options[:hostname]}\""
52
+ if @options[:sudo]
53
+ @adaptor = RemoteAdaptor.new(@options[:hostname], @options[:path], @options[:username])
53
54
  else
54
- puts "Using remote host: \"#{@options[:hostname]}\""
55
- if @options[:sudo]
56
- @adaptor = RemoteAdaptor.new(@options[:hostname], @options[:path], @options[:username])
57
- else
58
- @adaptor = RemoteAdaptor.new(@options[:hostname], @options[:path], @options[:username])
59
- end
55
+ @adaptor = RemoteAdaptor.new(@options[:hostname], @options[:path], @options[:username])
60
56
  end
61
57
  @adaptor.connect
62
58
  system("#{@options[:editor]} \"#{@adaptor.proxy_path}\"")
metadata CHANGED
@@ -5,8 +5,8 @@ version: !ruby/object:Gem::Version
5
5
  segments:
6
6
  - 1
7
7
  - 0
8
- - 0
9
- version: 1.0.0
8
+ - 1
9
+ version: 1.0.1
10
10
  platform: ruby
11
11
  authors:
12
12
  - Stewart Ulm