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.
@@ -1,7 +1,8 @@
1
1
  #!/usr/bin/env ruby
2
2
 
3
3
  require 'rubygems'
4
- require 'svn-command'
4
+ require 'facets/core/kernel/require_local'
5
+ require_local '../lib/svn-command/svn_command'
5
6
 
6
7
  subcommands = (Subversion::SvnCommand.public_instance_methods - Object.methods).sort
7
8
 
data/bin/svn CHANGED
@@ -3,5 +3,5 @@
3
3
  require 'rubygems'
4
4
  gem 'facets', '>=1.8.20'
5
5
  require 'facets/core/kernel/require_local'
6
- require_local '../lib/svn_command.rb'
6
+ require_local '../lib/svn-command/svn_command.rb'
7
7
  Subversion::SvnCommand.execute
@@ -0,0 +1,6 @@
1
+ # This is the auto-require
2
+ require 'rubygems'
3
+ gem 'facets'
4
+ require 'facets/core/kernel/require_local'
5
+ require_local 'svn-command/subversion'
6
+ Subversion
@@ -1,4 +1,4 @@
1
- # Tested by: ../test/subversion_test.rb
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.3'
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
@@ -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 '../lib/subversion'
25
- require_local '../lib/subversion_extensions'
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: ../test/svn_command_test.rb
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, threshold = 2000) || ''
477
- print contents
478
- puts if contents[-1] && contents[-1].chr != "\n" # Make sure we end with a newline character
479
- puts "..." if contents.length >= threshold # So they know that there may be *more* to the file than what's shown
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:"
@@ -1,6 +1,6 @@
1
1
  $mock_subversion = true
2
2
  require File.dirname(__FILE__) + '/test_helper'
3
- require_local '../lib/svn_command.rb'
3
+ require_local '../lib/svn-command/svn_command.rb'
4
4
  require 'facets/core/string/to_re'
5
5
  require 'yaml'
6
6
 
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
- require 'subversion'
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.0
7
- date: 2007-03-30 00:00:00 -07:00
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/svn_command.rb
33
- - lib/subversion.rb
34
- - lib/subversion_extensions.rb
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