reap 4.4.0 → 4.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.
data/ProjectInfo CHANGED
@@ -2,7 +2,7 @@
2
2
 
3
3
  title : Reap
4
4
  name : reap
5
- version : '4.4.0'
5
+ version : '4.4.1'
6
6
  #date : '2006-04-01'
7
7
  created : '2004-04-01'
8
8
  status : 'beta/stable'
@@ -2,8 +2,7 @@
2
2
 
3
3
  TITLE : &title Your App's Title
4
4
  NAME : &pkg your_unix_name
5
- SERIES : '0.0.1'
6
- DATE : '2005-01-01'
5
+ VERSION : '0.0.1'
7
6
  STATUS : beta
8
7
 
9
8
  AUTHOR : Your Name
@@ -31,11 +30,10 @@ PACKAGE:
31
30
  DISTRIBUTE : [ gem, tar.bz2 ] # tgz zip deb
32
31
  DEPENDENCIES : []
33
32
  EXECUTABLES : []
34
- DIR: pkg
33
+ DIR: pkg # where to put dist packages
35
34
  INCLUDE:
36
35
  - '**/*'
37
- EXCLUDE:
38
- - InstalledFiles
36
+ EXCLUDE: []
39
37
 
40
38
  # PUBLISH:
41
39
  # - HOST: rubyforge
@@ -43,6 +41,14 @@ PACKAGE:
43
41
  # USERNAME: your_username
44
42
  # DIR: www
45
43
 
44
+ # RELEASE:
45
+ # host : rubyforge.org
46
+ # username : user_username_for_host
47
+ # project : *pkg
48
+ # groupid : 999 # group id
49
+ # package : Release-pacakge-name
50
+ # dir : pkg # where the dist packages are stored
51
+
46
52
  # RDOC:
47
53
  # TITLE: *title
48
54
  # DIR: 'rdoc' # 'web/rdoc'
@@ -70,9 +76,3 @@ PACKAGE:
70
76
  # - http://your_homepage.org
71
77
  # - http://other_links.com
72
78
 
73
- # TEST:
74
- # FILES:
75
- # - 'test/**/tc*.rb'
76
- # - 'test/**/test*.rb'
77
- # - 'test/**/*test.rb'
78
- # FIXTURE: []
@@ -2,8 +2,7 @@
2
2
 
3
3
  TITLE : &title Your App's Title
4
4
  NAME : &pkg your_unix_name
5
- SERIES : '0.0.1'
6
- DATE : '2005-01-01'
5
+ VERSION : '0.0.1'
7
6
  STATUS : beta
8
7
 
9
8
  AUTHOR : Your Name
@@ -31,11 +30,10 @@ PACKAGE:
31
30
  DISTRIBUTE : [ gem, tar.bz2 ] # tgz zip deb
32
31
  DEPENDENCIES : []
33
32
  EXECUTABLES : []
34
- DIR: pkg
33
+ DIR: pkg # where to put dist packages
35
34
  INCLUDE:
36
35
  - '**/*'
37
- EXCLUDE:
38
- - InstalledFiles
36
+ EXCLUDE: []
39
37
 
40
38
  # PUBLISH:
41
39
  # - HOST: rubyforge
@@ -43,6 +41,14 @@ PACKAGE:
43
41
  # USERNAME: your_username
44
42
  # DIR: www
45
43
 
44
+ # RELEASE:
45
+ # host : rubyforge.org
46
+ # username : user_username_for_host
47
+ # project : *pkg
48
+ # groupid : 999 # group id
49
+ # package : Release-pacakge-name
50
+ # dir : pkg # where the dist packages are stored
51
+
46
52
  # RDOC:
47
53
  # TITLE: *title
48
54
  # DIR: 'rdoc' # 'web/rdoc'
@@ -70,9 +76,3 @@ PACKAGE:
70
76
  # - http://your_homepage.org
71
77
  # - http://other_links.com
72
78
 
73
- # TEST:
74
- # FILES:
75
- # - 'test/**/tc*.rb'
76
- # - 'test/**/test*.rb'
77
- # - 'test/**/*test.rb'
78
- # FIXTURE: []
File without changes
data/lib/reap/bin/reap.rb CHANGED
@@ -6,6 +6,8 @@ require 'facets'
6
6
  require 'consoleapp'
7
7
  #require 'console/command'
8
8
 
9
+ require 'facet/gem/self/active'
10
+
9
11
  require 'reap/reap'
10
12
 
11
13
 
@@ -115,11 +117,15 @@ class ReapCommand < Console::Command
115
117
  f = nil
116
118
  if ::ProjectInfo::INFO_FILES.any?{ |f| File.exists?(f) }
117
119
  puts "Project file '#{f}' already exists."
118
- exit 0
120
+ return
119
121
  end
120
122
  filename = 'ProjectInfo'
121
- # need to add gems workaround
122
- dir = File.join( ::Config::CONFIG['datadir'], 'reap', 'scaffold', 'standard' )
123
+ # if using gems
124
+ if dir = Gem.gempath('reap')
125
+ dir = File.join( dir, 'data', 'reap', 'scaffold', 'standard' )
126
+ else
127
+ dir = File.join( ::Config::CONFIG['datadir'], 'reap', 'scaffold', 'standard' )
128
+ end
123
129
  f = File.join( dir, filename )
124
130
  raise "ProjectInfo template file #{f} is missing." unless File.file?( f )
125
131
  # copy
@@ -128,9 +134,10 @@ class ReapCommand < Console::Command
128
134
  exit 0
129
135
  end
130
136
 
131
- def scaffold( name, type=nil )
132
- if File.directory?(name) and not $FORCE
133
- puts "Directory already exists. Use -f option to force scaffoling."
137
+ def scaffold( type=nil )
138
+ content = Dir.entries('.') - [ '.', '..' ]
139
+ if not content.empty? and not $FORCE
140
+ puts "Directory already has content. Use -f option to force scaffolding."
134
141
  exit -1
135
142
  end
136
143
  case type
@@ -143,23 +150,24 @@ class ReapCommand < Console::Command
143
150
  exit -1
144
151
  end
145
152
  # need to add gems workaround
146
- dir = File.join( ::Config::CONFIG['datadir'], 'reap', 'scaffold', type )
153
+ if dir = Gem.gempath('reap')
154
+ dir = File.join( dir, 'data', 'reap', 'scaffold', 'standard', type )
155
+ else
156
+ dir = File.join( ::Config::CONFIG['datadir'], 'reap', 'scaffold', type )
157
+ end
147
158
  #FileUtils.mkdir_p( name )
148
- FileUtils.cp_r( dir, name )
149
- puts "Project #{name} created. Good luck with your new project!"
150
- exit 0
159
+ FileUtils.cp_r( File.join( dir, '.'), '.' )
160
+ puts "Project ready."
151
161
  end
152
162
 
153
163
  # Add all the reap tasks.
154
164
 
155
165
  if Reap.register
156
-
157
166
  Reap.tasks.each do |sym,taskclass|
158
167
  define_method(sym) do |*args|
159
168
  taskclass.new(*args).execute
160
169
  end
161
170
  end
162
-
163
171
  end
164
172
 
165
173
  end
@@ -187,11 +195,11 @@ HELP = <<-HERE
187
195
  Copies a ProjectInfo template into the current
188
196
  directory (if it does not already exist).
189
197
 
190
- scaffold [directory] [type]
191
- Builds a starter project directory. There are
192
- two types: 'standard' and 'subversion'. These can
193
- be abbreviated 'std' and 'svn', repectively. If
194
- no type is given then standard is used.
198
+ scaffold [type]
199
+ Builds a starter project in the current directory.
200
+ There are two types: 'standard' and 'subversion'.
201
+ These can be abbreviated 'std' and 'svn', repectively.
202
+ If no type is given then standard is used.
195
203
 
196
204
  OPTIONS:
197
205
 
@@ -32,7 +32,8 @@ class ProjectInfo
32
32
  if fpath
33
33
  new.read( fpath, report )
34
34
  else
35
- new.read( find, report )
35
+ fpath = find
36
+ new.read( fpath, report )
36
37
  end
37
38
  end
38
39
 
@@ -44,6 +45,7 @@ class ProjectInfo
44
45
  info_file = INFO_FILES.find{ |f| File.file?( File.join( info_dir, f ) ) }
45
46
  break if info_file
46
47
  end
48
+ return nil unless info_file
47
49
  return File.join( info_dir, info_file )
48
50
  end
49
51
 
@@ -73,7 +75,7 @@ class ProjectInfo
73
75
  @info = HashBuilder.new( &block ).to_h
74
76
  @info_stream = @info.to_yaml
75
77
 
76
- validate
78
+ #validate
77
79
  defaults
78
80
 
79
81
  self
@@ -94,7 +96,7 @@ class ProjectInfo
94
96
  puts "(in #{Dir.pwd})" #unless dir == Dir.pwd
95
97
  end
96
98
 
97
- validate
99
+ #validate
98
100
  defaults
99
101
 
100
102
  self
@@ -111,7 +113,7 @@ class ProjectInfo
111
113
  end
112
114
  @info_stream = @info.to_yaml
113
115
 
114
- validate
116
+ #validate
115
117
  defaults
116
118
 
117
119
  self
@@ -125,9 +127,11 @@ class ProjectInfo
125
127
 
126
128
  # Validate project information.
127
129
 
128
- def validate
129
- raise "NAME is a required piece of information" unless info['name']
130
- raise "VERSION is a required piece of informatiomn" unless info['version']
130
+ def validate #( *fields )
131
+ val = true
132
+ (puts "NAME is required in project information file."; val=false) unless info['name']
133
+ (puts "VERSION is required in project information file."; val=false) unless info['version']
134
+ exit -1 unless val
131
135
  end
132
136
 
133
137
  # Project information defaults.
data/lib/reap/reap.rb CHANGED
@@ -44,11 +44,10 @@ module Reap
44
44
 
45
45
  def self.register #( alternative_project_file=nil )
46
46
  $PROJECT_INFO = ProjectInfo.load( nil, true )
47
- $PROJECT_INFO.exists?
48
47
  end
49
48
 
50
49
  def self.projectfile?
51
- $PROJECT_INFO.exists?
50
+ $PROJECT_INFO #.exists?
52
51
  end
53
52
 
54
53
  # def self.initialize
@@ -83,13 +83,18 @@ class Reap::Release < Reap::Task
83
83
  package Package name
84
84
  groupid Group id number
85
85
  architecture Architecture (Any, i386, PPC, etc.)
86
- release Release name
86
+ release Release name (default is "%s")
87
87
  private Private release?
88
88
  changelog Change log file
89
89
  notelog Release notes file
90
90
  dir Distribution directory
91
91
  exclude Distribution types to exclude
92
92
 
93
+ The release option can be a template by using %s in the
94
+ string. The version number of your project will be sub'd
95
+ in for the %s. This saves you from having to update
96
+ the release name before every release.
97
+
93
98
  }
94
99
 
95
100
  alias_method :rel, :task
@@ -124,7 +129,7 @@ class Reap::Release < Reap::Task
124
129
  # do not inherit these
125
130
 
126
131
  rel.dir = section.dir || master.project.dir
127
- rel.release = section.release || master.version || rel.date
132
+ rel.release = (section.release || "%s") % (master.version || rel.date)
128
133
 
129
134
  # verify
130
135
 
metadata CHANGED
@@ -3,8 +3,8 @@ rubygems_version: 0.8.11
3
3
  specification_version: 1
4
4
  name: reap
5
5
  version: !ruby/object:Gem::Version
6
- version: 4.4.0
7
- date: 2006-04-20 00:00:00 -04:00
6
+ version: 4.4.1
7
+ date: 2006-04-21 00:00:00 -04:00
8
8
  summary: Tools for Ruby project testing, management and assistance.
9
9
  require_paths:
10
10
  - lib
@@ -39,7 +39,6 @@ files:
39
39
  - ProjectInfo
40
40
  - setup.rb
41
41
  - README
42
- - ProjectInfo.rb
43
42
  - package.rb
44
43
  - bin/reap
45
44
  - bin/rubytest
@@ -62,6 +61,7 @@ files:
62
61
  - doc/note/aRakefile
63
62
  - doc/note/Rakefile.htm
64
63
  - doc/note/scaffold.rb
64
+ - doc/note/ProjectInfo.rb
65
65
  - doc/note/interface/interface.rb
66
66
  - doc/note/interface/rubyforge.rb
67
67
  - data/reap