sprout 0.5.13 → 0.5.15

Sign up to get free protection for your applications and to get access to all the features.
data/bin/sprout CHANGED
@@ -10,8 +10,8 @@ rescue LoadError
10
10
  end
11
11
 
12
12
  require 'optparse'
13
- #require 'sprout'
14
- require File.dirname(__FILE__) + '/../lib/sprout'
13
+ require 'sprout'
14
+ #require File.dirname(__FILE__) + '/../lib/sprout'
15
15
  include PatternPark
16
16
 
17
17
  OPTIONS = {
@@ -8,7 +8,6 @@ module PatternPark
8
8
  :e
9
9
 
10
10
  def initialize(*command)
11
- require 'open3'
12
11
  @command = command
13
12
  @w, @r, @e = Open3.popen3(*@command)
14
13
  end
@@ -20,9 +20,6 @@ module PatternPark
20
20
  if(!file_name.nil?)
21
21
  return
22
22
  end
23
- if(url.nil? || url == '')
24
- return
25
- end
26
23
  @file_name = url.split('/').pop
27
24
  @downloaded_path = File.join(Sprout.cache, type, install_path, file_name)
28
25
  if(archive_type == 'txt' || archive_type == 'exe')
@@ -31,6 +28,11 @@ module PatternPark
31
28
  @install_path = File.join(Sprout.cache, type, install_path, archive_type)
32
29
  end
33
30
  @copy_path = File.join(install_path, archive_path)
31
+
32
+ if(url.nil? || url == '')
33
+ return
34
+ end
35
+
34
36
  loader = RemoteFileLoader.new
35
37
 
36
38
  if(Sprout.update || !File.exists?(downloaded_path))
@@ -2,7 +2,7 @@ module Sprout #:nodoc:
2
2
  module VERSION #:nodoc:
3
3
  MAJOR = 0
4
4
  MINOR = 5
5
- TINY = 14
5
+ TINY = 16
6
6
 
7
7
  STRING = [MAJOR, MINOR, TINY].join('.')
8
8
  end
data/lib/sprout.rb CHANGED
@@ -25,7 +25,8 @@ module PatternPark
25
25
  :config_cache,
26
26
  :config
27
27
 
28
- @@base_urls = ['http://projectsprouts.googlecode.com/svn/trunk/sprouts/',
28
+ @@base_urls = ['http://projectsprouts.googlecode.com/svn/branches/release/sprouts/',
29
+ 'http://projectsprouts.googlecode.com/svn/trunk/sprouts/',
29
30
  'http://www.projectsprouts.org/sprout/']
30
31
  @@default_rakefiles = ['rakefile', 'Rakefile', 'rakefile.rb', 'Rakefile.rb'].freeze
31
32
  @@universal = 'universal'
@@ -35,6 +36,7 @@ module PatternPark
35
36
  @@home = nil
36
37
  @@cache = nil
37
38
  @@project_path = nil
39
+ @@base_url = nil
38
40
 
39
41
  ##
40
42
  # Given a simple string @name, request that sprout
@@ -48,6 +50,7 @@ module PatternPark
48
50
  else
49
51
  @@base_urls.each do |url|
50
52
  begin
53
+ @@base_url = url
51
54
  loader = RemoteFileLoader.new
52
55
  loader.get_remote_file(url + name, local)
53
56
  sprout = Sprout.load_local(local)
@@ -89,6 +92,10 @@ module PatternPark
89
92
  @@update = update
90
93
  end
91
94
 
95
+ def Sprout.base_url
96
+ return @@base_url
97
+ end
98
+
92
99
  def Sprout.update
93
100
  return @@update
94
101
  end
@@ -195,7 +202,7 @@ module PatternPark
195
202
  end
196
203
 
197
204
  def Sprout.get_project_path(path)
198
- if(path.nil? || path == '/')
205
+ if(path.nil? || path == '/' || path.match(/[A-Z]\:\//))
199
206
  return nil
200
207
  end
201
208
  @@default_rakefiles.each do |file|
data/lib/user.rb CHANGED
@@ -81,6 +81,7 @@ module PatternPark
81
81
  class UnixUser
82
82
 
83
83
  def initialize
84
+ require 'open3'
84
85
  @home = nil
85
86
  end
86
87
 
@@ -191,6 +192,11 @@ module PatternPark
191
192
  @@LOCAL_SETTINGS = "Local\ Settings"
192
193
  @@APPLICATION_DATA = "Application\ Data"
193
194
 
195
+ def initialize
196
+ require 'win32/open3'
197
+ @home = nil
198
+ end
199
+
194
200
  def home
195
201
  usr = super
196
202
  if(usr.index "My Documents")
@@ -223,12 +229,19 @@ module PatternPark
223
229
  end
224
230
 
225
231
  class CygwinUser < WinUser
232
+
233
+ def initialize
234
+ require 'open3'
235
+ @home = nil
236
+ end
237
+
226
238
  def clean_path(path)
227
239
  if(path.index(' '))
228
240
  return %{'#{path}'}
229
241
  end
230
242
  return path
231
243
  end
244
+
232
245
  end
233
246
 
234
247
  class VistaUser < WinUser
metadata CHANGED
@@ -3,8 +3,8 @@ rubygems_version: 0.9.2
3
3
  specification_version: 1
4
4
  name: sprout
5
5
  version: !ruby/object:Gem::Version
6
- version: 0.5.13
7
- date: 2007-06-25 00:00:00 -07:00
6
+ version: 0.5.15
7
+ date: 2007-07-02 00:00:00 -07:00
8
8
  summary: "Sprouts is an open-source, cross-platform project generation and configuration
9
9
  tool."
10
10
  require_paths: