copypaste 0.9 → 0.9.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (6) hide show
  1. data/README +1 -1
  2. data/bin/rcopy +1 -1
  3. data/bin/rcut +1 -1
  4. data/bin/rpaste +1 -1
  5. data/lib/copypaste.rb +9 -5
  6. metadata +1 -1
data/README CHANGED
@@ -20,7 +20,7 @@ CopyPaste provides rcopy, rcut, rpaste unix tools that interact with a central q
20
20
 
21
21
 
22
22
  == Authors
23
- * Lucas Carlson from MOG (mailto:lucas@rufy.com)
23
+ * Lucas Carlson (mailto:lucas@rufy.com)
24
24
 
25
25
  This library is released under the terms of the BSD.
26
26
 
data/bin/rcopy CHANGED
@@ -6,7 +6,7 @@ require 'copypaste'
6
6
 
7
7
  case (queue = ARGV.shift)
8
8
  when "--setup"
9
- CopyPaste.setup
9
+ CopyPaste.setup(ARGV.shift)
10
10
  else
11
11
  puts CopyPaste.copy(queue, STDIN)
12
12
  end
data/bin/rcut CHANGED
@@ -6,7 +6,7 @@ require 'copypaste'
6
6
 
7
7
  case (queue = ARGV.shift)
8
8
  when "--setup"
9
- CopyPaste.setup
9
+ CopyPaste.setup(ARGV.shift)
10
10
  else
11
11
  CopyPaste.copy(queue, STDIN)
12
12
  end
data/bin/rpaste CHANGED
@@ -6,7 +6,7 @@ require 'copypaste'
6
6
 
7
7
  case (queue = ARGV.shift)
8
8
  when "--setup"
9
- CopyPaste.setup
9
+ CopyPaste.setup(ARGV.shift)
10
10
  else
11
11
  puts CopyPaste.paste(queue)
12
12
  end
@@ -6,7 +6,7 @@ require 'fileutils'
6
6
 
7
7
  class CopyPasteError < StandardError; end
8
8
  class CopyPaste
9
- VERSION = "0.9"
9
+ VERSION = "0.9.1"
10
10
  CONFIGURATION = "#{ENV['HOME']}/.copypaste"
11
11
 
12
12
  class << self
@@ -23,10 +23,14 @@ class CopyPaste
23
23
  server.get("copypaste-#{queue}")
24
24
  end
25
25
 
26
- def setup
27
- print "What is your starling server address (127.0.0.1:22122): "
28
- $stdout.flush
29
- server = gets.strip
26
+ def setup(value)
27
+ if value.to_s.empty?
28
+ print "What is your starling server address (127.0.0.1:22122): "
29
+ $stdout.flush
30
+ server = gets.strip
31
+ else
32
+ server = value
33
+ end
30
34
 
31
35
  if server.empty?
32
36
  server = "127.0.0.1:22122"
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: copypaste
3
3
  version: !ruby/object:Gem::Version
4
- version: "0.9"
4
+ version: 0.9.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Lucas Carlson