svn-command 0.1.0 → 0.1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/bin/command_completion_for_svn_command +2 -1
- data/bin/svn +1 -1
- data/lib/svn-command.rb +6 -0
- data/lib/{subversion.rb → svn-command/subversion.rb} +2 -2
- data/lib/{subversion_extensions.rb → svn-command/subversion_extensions.rb} +0 -0
- data/lib/{svn_command.rb → svn-command/svn_command.rb} +8 -7
- data/test/svn_command_test.rb +1 -1
- data/test/test_helper.rb +1 -2
- metadata +7 -6
data/bin/svn
CHANGED
data/lib/svn-command.rb
ADDED
@@ -1,4 +1,4 @@
|
|
1
|
-
# Tested by:
|
1
|
+
# Tested by: ../../test/subversion_test.rb
|
2
2
|
$loaded ||= {}; if !$loaded[File.expand_path(__FILE__)]; $loaded[File.expand_path(__FILE__)] = true;
|
3
3
|
|
4
4
|
require 'fileutils'
|
@@ -11,7 +11,7 @@ require 'facets/core/kernel/require_local'
|
|
11
11
|
require 'facets/core/enumerable/uniq_by'
|
12
12
|
require 'facets/core/kernel/silence_stream'
|
13
13
|
|
14
|
-
gem 'qualitysmith_extensions', '>=0.0.
|
14
|
+
gem 'qualitysmith_extensions', '>=0.0.7'
|
15
15
|
|
16
16
|
# Had a lot of trouble getting ActiveSupport to load without giving errors! Eventually gave up on that idea since I only needed it for mattr_accessor and Facets supplies that.
|
17
17
|
#gem 'activesupport' # mattr_accessor
|
File without changes
|
@@ -6,6 +6,7 @@ require 'facets/core/string/margin'
|
|
6
6
|
require 'facets/core/kernel/require_local'
|
7
7
|
require 'facets/core/array/select' # select!
|
8
8
|
require 'facets/core/kernel/with' # returning
|
9
|
+
require 'facets/core/string/lines'
|
9
10
|
|
10
11
|
gem 'qualitysmith_extensions', '>=0.0.3'
|
11
12
|
require 'qualitysmith_extensions/enumerable/enum'
|
@@ -21,8 +22,8 @@ require 'termios'
|
|
21
22
|
require 'stringio'
|
22
23
|
gem 'colored'
|
23
24
|
require 'colored' # Lets us do "a".white.bold instead of "\033[1ma\033[0m"
|
24
|
-
require_local '
|
25
|
-
require_local '
|
25
|
+
require_local 'subversion'
|
26
|
+
require_local 'subversion_extensions'
|
26
27
|
|
27
28
|
begin
|
28
29
|
# Set up termios so that it returns immediately when you press a key.
|
@@ -57,7 +58,7 @@ Subversion.extend(Subversion::Extensions)
|
|
57
58
|
Subversion::color = true
|
58
59
|
|
59
60
|
module Subversion
|
60
|
-
# Tested by:
|
61
|
+
# Tested by: ../../test/svn_command_test.rb
|
61
62
|
class SvnCommand < Console::Command
|
62
63
|
@@standard_remote_command_options = {
|
63
64
|
[:__username] => 1,
|
@@ -473,10 +474,10 @@ End
|
|
473
474
|
else
|
474
475
|
puts "File contents:"
|
475
476
|
# Only show the first x bytes so that we don't accidentally dump the contens of some 20 GB log file to screen...
|
476
|
-
contents = File.read(file,
|
477
|
-
|
478
|
-
|
479
|
-
puts "..." if contents.length >=
|
477
|
+
contents = File.read(file, bytes_threshold = 5000) || ''
|
478
|
+
max_lines = 55
|
479
|
+
contents.lines[0..max_lines].each {|line| puts line}
|
480
|
+
puts "..." if contents.length >= bytes_threshold # So they know that there may be *more* to the file than what's shown
|
480
481
|
end
|
481
482
|
elsif File.directory?(file)
|
482
483
|
puts "Directory contains:"
|
data/test/svn_command_test.rb
CHANGED
data/test/test_helper.rb
CHANGED
@@ -1,6 +1,5 @@
|
|
1
1
|
require 'test/unit'
|
2
2
|
require 'rubygems'
|
3
|
-
#require 'extensions/kernel'
|
4
3
|
require 'facets/core/kernel/require_local'
|
5
4
|
require 'facets/core/kernel/load_local'
|
6
5
|
require 'stubba'
|
@@ -12,7 +11,7 @@ require 'qualitysmith_extensions/test/assert_exception.rb'
|
|
12
11
|
require 'qualitysmith_extensions/kernel/capture_output.rb'
|
13
12
|
require 'qualitysmith_extensions/kernel/simulate_input.rb'
|
14
13
|
|
15
|
-
|
14
|
+
require_local '../lib/svn-command/subversion'
|
16
15
|
if $mock_subversion
|
17
16
|
module Subversion
|
18
17
|
def self.executable
|
metadata
CHANGED
@@ -3,8 +3,8 @@ rubygems_version: 0.9.2
|
|
3
3
|
specification_version: 1
|
4
4
|
name: svn-command
|
5
5
|
version: !ruby/object:Gem::Version
|
6
|
-
version: 0.1.
|
7
|
-
date: 2007-
|
6
|
+
version: 0.1.1
|
7
|
+
date: 2007-04-05 00:00:00 -07:00
|
8
8
|
summary: A nifty wrapper command for Subversion's command-line svn client
|
9
9
|
require_paths:
|
10
10
|
- lib
|
@@ -12,7 +12,7 @@ email: rubyforge.org@tylerrick.com
|
|
12
12
|
homepage: http://svn-command.rubyforge.org/
|
13
13
|
rubyforge_project: svn-command
|
14
14
|
description: This is a wrapper command for Subversion's command-line svn client that adds a few new subcommands.
|
15
|
-
autorequire:
|
15
|
+
autorequire: svn-command
|
16
16
|
default_executable:
|
17
17
|
bindir: bin
|
18
18
|
has_rdoc: true
|
@@ -29,9 +29,10 @@ post_install_message:
|
|
29
29
|
authors:
|
30
30
|
- Tyler Rick
|
31
31
|
files:
|
32
|
-
- lib/
|
33
|
-
- lib/
|
34
|
-
- lib/
|
32
|
+
- lib/svn-command.rb
|
33
|
+
- lib/svn-command/svn_command.rb
|
34
|
+
- lib/svn-command/subversion.rb
|
35
|
+
- lib/svn-command/subversion_extensions.rb
|
35
36
|
- test/test_helper.rb
|
36
37
|
- test/subversion_extensions_test.rb
|
37
38
|
- test/subversion_test.rb
|