sub 0.4.0 → 0.4.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.
Files changed (3) hide show
  1. data/lib/sub/app.rb +9 -4
  2. data/lib/sub/version.rb +1 -1
  3. metadata +3 -3
@@ -75,7 +75,8 @@ class Sub
75
75
  end
76
76
 
77
77
  def execute
78
- puts self.send(@command)
78
+ result = self.send(@command)
79
+ puts result unless result.nil?
79
80
  end
80
81
 
81
82
  # commands
@@ -84,7 +85,7 @@ class Sub
84
85
  @args = [`pwd`.chomp]
85
86
  end
86
87
  update_many(@args)
87
- "Update complete."
88
+ verbosity == QUIET ? nil : "Update complete."
88
89
  end
89
90
 
90
91
  def co
@@ -95,7 +96,7 @@ class Sub
95
96
  project = args.shift
96
97
  dir_name = args.shift || project
97
98
  svn("co #{base}/#{project}/trunk #{dir_name}")
98
- "Checkout complete."
99
+ verbosity == QUIET ? nil : "Checkout complete."
99
100
  end
100
101
 
101
102
  def base
@@ -109,12 +110,16 @@ class Sub
109
110
  External.externals_of(dir).join("\n")
110
111
  else
111
112
  old_external = get_external(dir, external_name)
112
- if url || revision
113
+ if old_external.nil?
114
+ "No external found named #{external_name} in directory #{dir}" +
115
+ ((dir == '.') ? "\nDid you mean to use the --dir parameter?" : "")
116
+ elsif url || revision
113
117
  revision_to_set = revision == 'HEAD' ? nil : revision
114
118
  set_external(dir, external_name, url || old_external.url, revision_to_set)
115
119
  else
116
120
  old_external
117
121
  end
122
+
118
123
  end
119
124
  end
120
125
 
@@ -2,7 +2,7 @@ class Sub #:nodoc:
2
2
  module VERSION #:nodoc:
3
3
  MAJOR = 0
4
4
  MINOR = 4
5
- TINY = 0
5
+ TINY = 1
6
6
 
7
7
  STRING = [MAJOR, MINOR, TINY].join('.')
8
8
  end
metadata CHANGED
@@ -1,10 +1,10 @@
1
1
  --- !ruby/object:Gem::Specification
2
- rubygems_version: 0.9.0
2
+ rubygems_version: 0.9.2
3
3
  specification_version: 1
4
4
  name: sub
5
5
  version: !ruby/object:Gem::Version
6
- version: 0.4.0
7
- date: 2007-11-18 00:00:00 -08:00
6
+ version: 0.4.1
7
+ date: 2007-11-19 00:00:00 -08:00
8
8
  summary: sub is a wrapper for svn that adds faster/safer updates, easy trunk checkout, etc.
9
9
  require_paths:
10
10
  - lib