reap 9.3.0 → 9.3.1

Sign up to get free protection for your applications and to get access to all the features.
data/MANIFEST CHANGED
@@ -80,7 +80,9 @@ data/reap/base/test
80
80
  data/reap/base/test/template.rb
81
81
  data/reap/base/NOTES
82
82
  data/reap/base/CHANGES
83
- data/reap/base/README
83
+ data/reap/base/README.erb
84
+ data/reap/base/meta
85
+ data/reap/base/meta/unixname.erb
84
86
  data/reap/base/lib
85
87
  data/reap/base/data
86
88
  data/reap/base/bin
data/Rakefile CHANGED
@@ -41,17 +41,20 @@ class UberTask
41
41
  # TASK config
42
42
  #
43
43
 
44
- if File.exist?(Configure::FILENAME)
45
- desc "Reconfigure for your system."
46
- else
47
- desc "Configure for your system."
48
- end
49
-
50
- task :config do
44
+ desc "Configure for your system."
45
+ task :config => [:config_load] do
51
46
  config.quiet = Rake.application.options.silent
52
47
  config.exec_config
53
48
  end
54
49
 
50
+ if File.exist?(Configure::FILENAME)
51
+ desc "Reconfigure for your system."
52
+ task :reconfig do
53
+ config.quiet = Rake.application.options.silent
54
+ config.exec_config
55
+ end
56
+ end
57
+
55
58
  #
56
59
 
57
60
  task :config_load do
@@ -120,11 +123,20 @@ class UberTask
120
123
  # TODO: No shebang until it works at install time and doesn't overwrite the repo scripts.
121
124
 
122
125
  desc "Compile extensions." # update shebangs
123
- task :setup => [:config_load, :make] #, :shebang]
126
+ task :setup => [:config_load, :extconf, :make] #, :shebang]
127
+
128
+ task :extconf => [:config_load] do
129
+ config.extensions.each do |dir|
130
+ next if File.file?(File.join(dir, 'Makefile'))
131
+ Dir.chdir(dir) do
132
+ config.ruby('extconf.rb', config.configopt)
133
+ end
134
+ end
135
+ end
124
136
 
125
137
  task :make => [:config_load] do
126
- config.extensions.each do |ext|
127
- Dir.chdir(File.dirname(ext)) do
138
+ config.extensions.each do |dir|
139
+ Dir.chdir(dir) do
128
140
  config.make
129
141
  end
130
142
  end
@@ -143,8 +155,8 @@ class UberTask
143
155
  # TASK test
144
156
  #
145
157
 
146
- # You can provide a .test file to add options to
147
- # the testrb command.
158
+ # You can provide a test/suite.rb file to be run if
159
+ # by the testrb command, if you special testing requirements.
148
160
 
149
161
  desc "Run unit tests."
150
162
  task :test => [:config_load, :setup] do
@@ -153,22 +165,23 @@ class UberTask
153
165
  opt = []
154
166
  opt << " -v" if verbose?
155
167
  opt << " --runner #{runner}"
156
- if File.exist?('.test')
168
+ if File.file?('test/suite.rb')
157
169
  notests = false
158
- opt << File.read(".test").strip
170
+ opt << "test/suite.rb"
159
171
  else
160
172
  notests = Dir["test/**/*.rb"].empty?
161
- opt << "-Ilib"
162
- opt << " test/**/*.rb"
173
+ lib = ["lib"] + config.extensions.collect{ |d| File.dirname(d) }
174
+ opt << "-I" + lib.join(':')
175
+ opt << Dir["test/**/{test,tc}*.rb"]
163
176
  end
164
177
  opt = opt.flatten.join(' ').strip
165
178
  # run tests
166
179
  if notests
167
180
  $stderr.puts 'No tests.' #if verbose?
168
181
  else
169
- cmd = "#{config.rubyprog} -S testrb #{opt}"
182
+ cmd = "testrb #{opt}"
170
183
  $stderr.puts cmd if verbose?
171
- sh cmd
184
+ system cmd #config.ruby "-S tesrb", opt
172
185
  end
173
186
  end
174
187
 
@@ -242,8 +255,6 @@ class UberTask
242
255
 
243
256
  desc "Generate and install index docs."
244
257
  task :index => [:config_load] do
245
- #name = PACKAGE
246
-
247
258
  case config.installdirs
248
259
  when 'std'
249
260
  output = "--ri-system"
@@ -524,7 +535,7 @@ class Configure
524
535
  attr_accessor :installdirs
525
536
 
526
537
  # options to pass to extconfig.rb
527
- attr_accessor :config_opt
538
+ attr_accessor :configopt
528
539
 
529
540
  # do not compile/install ruby extentions
530
541
  attr_accessor :without_ext?
@@ -699,6 +710,7 @@ class Configure
699
710
  self.installdirs = 'site'
700
711
  self.rdoctemplate = 'html'
701
712
  self.testrunner = 'console'
713
+ self.configopt = ''
702
714
  end
703
715
 
704
716
  def show
@@ -713,7 +725,7 @@ class Configure
713
725
  def exec_config
714
726
  getenv
715
727
  save
716
- create_makefiles if compiles?
728
+ #create_makefiles if compiles?
717
729
  create_rakefile
718
730
  show unless quiet?
719
731
  puts "Configuration saved."
@@ -731,13 +743,13 @@ class Configure
731
743
  !extensions.empty?
732
744
  end
733
745
 
734
- def create_makefiles
735
- extensions.each do |dir|
736
- Dir.chdir(dir) do
737
- ruby File.basename(file), config_opt
738
- end
739
- end
740
- end
746
+ #def create_makefiles
747
+ # extensions.each do |dir|
748
+ # Dir.chdir(dir) do
749
+ # ruby('extconf.rb', configopt)
750
+ # end
751
+ # end
752
+ #end
741
753
 
742
754
  # Create rakefile, if it doesn't exist.
743
755
  def create_rakefile
@@ -748,20 +760,18 @@ class Configure
748
760
  end
749
761
  end
750
762
 
751
- private
752
-
753
- def ruby(*args)
754
- command rubyprog, *args
755
- end
763
+ def ruby(*args)
764
+ command rubyprog, *args
765
+ end
756
766
 
757
- def make(task = nil)
758
- command(*[makeprog, task].compact)
759
- end
767
+ def make(task = nil)
768
+ command(*[makeprog, task].compact)
769
+ end
760
770
 
761
- def command(*args)
762
- $stderr.puts args.join(' ') if $DEBUG
763
- system(*args) or raise RuntimeError, "system(#{args.map{|a| a.inspect }.join(' ')}) failed"
764
- end
771
+ def command(*args)
772
+ $stderr.puts args.join(' ') if $DEBUG
773
+ system(*args) or raise RuntimeError, "system(#{args.map{|a| a.inspect }.join(' ')}) failed"
774
+ end
765
775
 
766
776
  # Help output.
767
777
 
@@ -4,11 +4,9 @@
4
4
  # BUT I JUST WANTED TO GET SOMETHING FUNCITONAL
5
5
  # GOING FOR NOW. WILL FIX IT UP LATER.
6
6
 
7
- require 'reap/utilities/shellutils'
8
- require 'reap/utilities/fileutils'
7
+ require 'reap/utilities'
9
8
 
10
- include Reap::Utilities::ShellUtils
11
- include Reap::Utilities::FileUtils
9
+ include Reap::Utilities
12
10
 
13
11
  def dryrun?
14
12
  ARGV.include?('--dryrun')
@@ -0,0 +1,50 @@
1
+ = <%= title %>
2
+
3
+ <%= homepage %>
4
+
5
+
6
+ == INTRODUCTION
7
+
8
+ <%= description %>
9
+
10
+
11
+ == RELEASE NOTES
12
+
13
+ Please see NOTES file.
14
+
15
+
16
+ == RECENT CHANGES
17
+
18
+ Please see CHANGES file.
19
+
20
+
21
+ == HOW TO INSTALL
22
+
23
+ Describe your installation procedure here.
24
+
25
+ To install with RubyGems simply open a console and type:
26
+
27
+ gem install <%= project %>
28
+
29
+ To manually installation, download the tgz package and type:
30
+
31
+ tar -xvzf <%= project %>-x.y.z.tgz
32
+ cd <%= package %>-x.y.z.tgz
33
+ rake config
34
+ rake setup
35
+ rake install
36
+
37
+
38
+ == USAGE
39
+
40
+ Describe how to use your library or application here.
41
+
42
+
43
+ == LICENSE
44
+
45
+ Copyright (c) 2008 <%= author %>
46
+
47
+ This program is ditributed unser the terms of the <%= license %> license.
48
+
49
+ Please see COPYING file.
50
+
@@ -0,0 +1 @@
1
+ <%= package %>
@@ -544,6 +544,11 @@ class Project
544
544
  # end
545
545
  #end
546
546
 
547
+ # Access to binding for use with ERB.
548
+ def get_binding
549
+ binding
550
+ end
551
+
547
552
  private
548
553
 
549
554
  # Collect distribution files.
@@ -26,6 +26,8 @@ module Reap
26
26
 
27
27
  files = multiglob_r(*remove) - multiglob_r(exclude)
28
28
 
29
+ make_clean if compiles?
30
+
29
31
  return if files.empty?
30
32
 
31
33
  puts files.join("\n")
@@ -1,3 +1,5 @@
1
+ require 'erb'
2
+
1
3
  module Reap
2
4
 
3
5
  class Project
@@ -112,8 +114,15 @@ module Reap
112
114
  end
113
115
 
114
116
  files.each do |fname|
117
+ next if File.exist?(fname)
115
118
  file = File.join(dir, fname)
116
- cp(file, fname) unless File.exist?(fname)
119
+ if File.extname(file) == '.erb'
120
+ erb = ERB.new(File.read(file))
121
+ txt = erb.result(metadata.get_binding)
122
+ File.open(fname.chomp('.erb'), 'w'){ |f| f << txt }
123
+ else
124
+ cp(file, fname)
125
+ end
117
126
  end
118
127
 
119
128
  # A little extra love.
@@ -1 +1 @@
1
- 9.3.0 beta (2008-02-18)
1
+ 9.3.1 beta (2008-02-18)
@@ -14,7 +14,7 @@ slogan : Reap Your Rewards
14
14
  exclude : [ pkg, work, doc, site, ri ]
15
15
 
16
16
  dependency :
17
- - [facets, ">= 2.1.0"]
17
+ - [facets, ">= 2.3.0"]
18
18
 
19
19
  libpath: lib/reap
20
20
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: reap
3
3
  version: !ruby/object:Gem::Version
4
- version: 9.3.0
4
+ version: 9.3.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Thomas Sawyer <transfire@gmail.com>
@@ -19,7 +19,7 @@ dependencies:
19
19
  requirements:
20
20
  - - ">="
21
21
  - !ruby/object:Gem::Version
22
- version: 2.1.0
22
+ version: 2.3.0
23
23
  version:
24
24
  description: Reap is a Ruby project management system.
25
25
  email: transfire@gmail.com
@@ -152,7 +152,9 @@ files:
152
152
  - data/reap/base/test/template.rb
153
153
  - data/reap/base/NOTES
154
154
  - data/reap/base/CHANGES
155
- - data/reap/base/README
155
+ - data/reap/base/README.erb
156
+ - data/reap/base/meta
157
+ - data/reap/base/meta/unixname.erb
156
158
  - data/reap/base/lib
157
159
  - data/reap/base/data
158
160
  - data/reap/base/bin
@@ -1,29 +0,0 @@
1
- = YOUR PROJECT
2
-
3
- Tells us all about your project here.
4
-
5
- == How to Install
6
-
7
- Describe your installation procedure here.
8
-
9
- === RubyGems.
10
-
11
- gem install _package_name_
12
-
13
- === Manual installation.
14
-
15
- tar -xvvzf _package_name_-x.y.z,tgz
16
- cd _package_name_
17
- rake config
18
- rake setup
19
- rake install
20
-
21
- == Usage
22
-
23
- Desrbe how to use your library or application here.
24
-
25
- == License
26
-
27
- Copyright (c) 2008 Your Name
28
-
29
- GNU General Public Licence v3