echoe 3.1.1 → 3.2
Sign up to get free protection for your applications and to get access to all the features.
- data.tar.gz.sig +0 -0
- data/CHANGELOG +7 -0
- data/Manifest +8 -8
- data/Rakefile +0 -1
- data/echoe.gemspec +6 -7
- data/lib/echoe.rb +49 -18
- data/lib/echoe/platform.rb +27 -25
- metadata +17 -15
- metadata.gz.sig +0 -0
data.tar.gz.sig
CHANGED
Binary file
|
data/CHANGELOG
CHANGED
@@ -1,3 +1,10 @@
|
|
1
|
+
|
2
|
+
v3.2. Sort manifest.
|
3
|
+
|
4
|
+
v3.1.3. Removing Evan's keychain so GitHub can build the gem. Version bump to force GitHub to re-generate gem.
|
5
|
+
|
6
|
+
v3.1.2. Small bugfix. Version bump to force GitHub to re-generate gem.
|
7
|
+
|
1
8
|
v3.1.1. Remove Rake/contrib from the gem requirements and vendor it. Fix some load paths on Ruby 1.9.
|
2
9
|
|
3
10
|
v3.1. Fix some bugs; become Ruby 1.9 compatible.
|
data/Manifest
CHANGED
@@ -1,21 +1,21 @@
|
|
1
1
|
CHANGELOG
|
2
|
+
LICENSE
|
3
|
+
MIT-LICENSE
|
4
|
+
Manifest
|
5
|
+
README
|
6
|
+
Rakefile
|
7
|
+
TODO
|
2
8
|
echoe.gemspec
|
9
|
+
lib/echoe.rb
|
3
10
|
lib/echoe/client.rb
|
4
11
|
lib/echoe/extensions.rb
|
5
12
|
lib/echoe/net.rb
|
6
13
|
lib/echoe/platform.rb
|
7
14
|
lib/echoe/rubygems.rb
|
8
|
-
|
9
|
-
LICENSE
|
10
|
-
Manifest
|
11
|
-
MIT-LICENSE
|
12
|
-
Rakefile
|
13
|
-
README
|
14
|
-
TODO
|
15
|
+
vendor/rake/MIT-LICENSE
|
15
16
|
vendor/rake/lib/rake/contrib/compositepublisher.rb
|
16
17
|
vendor/rake/lib/rake/contrib/ftptools.rb
|
17
18
|
vendor/rake/lib/rake/contrib/publisher.rb
|
18
19
|
vendor/rake/lib/rake/contrib/rubyforgepublisher.rb
|
19
20
|
vendor/rake/lib/rake/contrib/sshpublisher.rb
|
20
21
|
vendor/rake/lib/rake/contrib/sys.rb
|
21
|
-
vendor/rake/MIT-LICENSE
|
data/Rakefile
CHANGED
data/echoe.gemspec
CHANGED
@@ -2,28 +2,27 @@
|
|
2
2
|
|
3
3
|
Gem::Specification.new do |s|
|
4
4
|
s.name = %q{echoe}
|
5
|
-
s.version = "3.
|
5
|
+
s.version = "3.2"
|
6
6
|
|
7
7
|
s.required_rubygems_version = Gem::Requirement.new(">= 1.2") if s.respond_to? :required_rubygems_version=
|
8
8
|
s.authors = ["Evan Weaver"]
|
9
9
|
s.cert_chain = ["/Users/eweaver/p/configuration/gem_certificates/evan_weaver-original-public_cert.pem"]
|
10
|
-
s.date = %q{2009-
|
10
|
+
s.date = %q{2009-11-18}
|
11
11
|
s.description = %q{A Rubygems packaging tool that provides Rake tasks for documentation, extension compiling, testing, and deployment.}
|
12
12
|
s.email = %q{}
|
13
|
-
s.extra_rdoc_files = ["CHANGELOG", "lib/echoe
|
14
|
-
s.files = ["CHANGELOG", "echoe.gemspec", "lib/echoe
|
15
|
-
s.has_rdoc = true
|
13
|
+
s.extra_rdoc_files = ["CHANGELOG", "LICENSE", "README", "TODO", "lib/echoe.rb", "lib/echoe/client.rb", "lib/echoe/extensions.rb", "lib/echoe/net.rb", "lib/echoe/platform.rb", "lib/echoe/rubygems.rb"]
|
14
|
+
s.files = ["CHANGELOG", "LICENSE", "MIT-LICENSE", "Manifest", "README", "Rakefile", "TODO", "echoe.gemspec", "lib/echoe.rb", "lib/echoe/client.rb", "lib/echoe/extensions.rb", "lib/echoe/net.rb", "lib/echoe/platform.rb", "lib/echoe/rubygems.rb", "vendor/rake/MIT-LICENSE", "vendor/rake/lib/rake/contrib/compositepublisher.rb", "vendor/rake/lib/rake/contrib/ftptools.rb", "vendor/rake/lib/rake/contrib/publisher.rb", "vendor/rake/lib/rake/contrib/rubyforgepublisher.rb", "vendor/rake/lib/rake/contrib/sshpublisher.rb", "vendor/rake/lib/rake/contrib/sys.rb"]
|
16
15
|
s.homepage = %q{http://blog.evanweaver.com/files/doc/fauna/echoe/}
|
17
16
|
s.rdoc_options = ["--line-numbers", "--inline-source", "--title", "Echoe", "--main", "README"]
|
18
17
|
s.require_paths = ["lib"]
|
19
18
|
s.rubyforge_project = %q{fauna}
|
20
|
-
s.rubygems_version = %q{1.3.
|
19
|
+
s.rubygems_version = %q{1.3.5}
|
21
20
|
s.signing_key = %q{/Users/eweaver/p/configuration/gem_certificates/evan_weaver-original-private_key.pem}
|
22
21
|
s.summary = %q{A Rubygems packaging tool that provides Rake tasks for documentation, extension compiling, testing, and deployment.}
|
23
22
|
|
24
23
|
if s.respond_to? :specification_version then
|
25
24
|
current_version = Gem::Specification::CURRENT_SPECIFICATION_VERSION
|
26
|
-
s.specification_version =
|
25
|
+
s.specification_version = 3
|
27
26
|
|
28
27
|
if Gem::Version.new(Gem::RubyGemsVersion) >= Gem::Version.new('1.2.0') then
|
29
28
|
s.add_runtime_dependency(%q<rubyforge>, [">= 1.0.2"])
|
data/lib/echoe.rb
CHANGED
@@ -1,7 +1,6 @@
|
|
1
1
|
|
2
2
|
$HERE = File.dirname(__FILE__)
|
3
3
|
require "#{$HERE}/echoe/platform"
|
4
|
-
require "#{$HERE}/echoe/extensions"
|
5
4
|
|
6
5
|
require 'rake'
|
7
6
|
require 'rake/clean'
|
@@ -10,9 +9,15 @@ require "#{$HERE}/../vendor/rake/lib/rake/contrib/sshpublisher"
|
|
10
9
|
require 'rake/gempackagetask'
|
11
10
|
require 'rake/rdoctask'
|
12
11
|
require 'rake/testtask'
|
12
|
+
begin
|
13
|
+
require 'spec/rake/spectask'
|
14
|
+
rescue LoadError
|
15
|
+
end
|
13
16
|
require 'rbconfig'
|
14
17
|
require 'open-uri'
|
15
18
|
|
19
|
+
require "#{$HERE}/echoe/extensions"
|
20
|
+
|
16
21
|
require 'rubygems'
|
17
22
|
require 'rubygems/specification'
|
18
23
|
require "#{$HERE}/echoe/rubygems"
|
@@ -68,8 +73,6 @@ Note that you can also set the key and certificate locations in the Rakefile its
|
|
68
73
|
|
69
74
|
Echoe does not force packages to depend on Echoe itself. Instead, it generates a <tt>gemspec</tt> from your <tt>Rakefile</tt> and includes that. Downstream repackagers can use the <tt>gemspec</tt> as-is to build new versions of your gem even without Echoe.
|
70
75
|
|
71
|
-
However, Echoe is added to the <tt>development_dependencies</tt> array so that users can automatically install it via <tt>gem install --development</tt> if they prefer. You can override this behavior by setting <tt>p.development_dependencies = []</tt>.
|
72
|
-
|
73
76
|
== Cross-packaging
|
74
77
|
|
75
78
|
Echoe supports platform Rake targets to allow you to cross-package your gems. Just write the spec assuming <tt>RUBY_PLATFORM</tt> will be what you need it to be for each architecture, and then invoke Rake with the platform name when you're cross-packaging.
|
@@ -110,6 +113,8 @@ Testing options:
|
|
110
113
|
|
111
114
|
* <tt>clean_pattern</tt> - A filename array, glob array, or regex for files that should be removed when <tt>rake clean</tt> is run.
|
112
115
|
* <tt>test_pattern</tt> - A filename array, glob array, or regex for test runners. Overridden by <tt>"test/test_all.rb"</tt>, if it exists.
|
116
|
+
|
117
|
+
* <tt>spec_pattern</tt> - A filename array, glob array, or regex for test runners.
|
113
118
|
* <tt>rcov_options</tt> - Any extra flags to pass to RCov when coverage reports are run.
|
114
119
|
|
115
120
|
Uncommon packaging options:
|
@@ -147,7 +152,7 @@ Documentation options:
|
|
147
152
|
class Echoe
|
148
153
|
|
149
154
|
# user-configurable
|
150
|
-
attr_accessor :author, :changes, :clean_pattern, :description, :email, :runtime_dependencies, :development_dependencies, :need_tgz, :need_tar_gz, :need_gem, :need_zip, :rdoc_pattern, :project, :summary, :test_pattern, :url, :version, :docs_host, :rdoc_template, :manifest_name, :install_message, :extension_pattern, :private_key, :certificate_chain, :require_signed, :ruby_version, :platform, :ignore_pattern, :executable_pattern, :changelog, :rcov_options, :gemspec_format
|
155
|
+
attr_accessor :author, :changes, :clean_pattern, :description, :email, :runtime_dependencies, :development_dependencies, :need_tgz, :need_tar_gz, :need_gem, :need_zip, :rdoc_pattern, :project, :summary, :test_pattern, :spec_pattern, :url, :version, :docs_host, :rdoc_template, :manifest_name, :install_message, :extension_pattern, :private_key, :certificate_chain, :require_signed, :ruby_version, :platform, :ignore_pattern, :executable_pattern, :changelog, :rcov_options, :gemspec_format
|
151
156
|
|
152
157
|
# best left alone
|
153
158
|
attr_accessor :name, :lib_files, :test_files, :bin_files, :spec, :rdoc_options, :rubyforge_name, :has_rdoc, :include_gemspec, :include_rakefile, :gemspec_name, :retain_gemspec, :rakefile_name, :eval, :files, :changelog_patterns, :rubygems_version, :use_sudo, :gem_bin
|
@@ -166,6 +171,7 @@ class Echoe
|
|
166
171
|
self.email = ""
|
167
172
|
self.clean_pattern = ["pkg", "doc", 'build/*', '**/coverage', '**/*.o', '**/*.so', '**/*.a', '**/*.log', "{ext,lib}/*.{bundle,so,obj,pdb,lib,def,exp}", "ext/Makefile", "{ext,lib}/**/*.{bundle,so,obj,pdb,lib,def,exp}", "ext/**/Makefile", "pkg", "*.gem", ".config"]
|
168
173
|
self.test_pattern = File.exist?("test/test_all.rb") ? "test/test_all.rb" : ['test/**/test_*.rb', 'test/**/*_test.rb']
|
174
|
+
self.spec_pattern = "spec/**/*_spec.rb"
|
169
175
|
self.ignore_pattern = /^(pkg|doc)|\.svn|CVS|\.bzr|\.DS|\.git/
|
170
176
|
|
171
177
|
self.changelog_patterns = {
|
@@ -229,7 +235,7 @@ class Echoe
|
|
229
235
|
|
230
236
|
# read manifest
|
231
237
|
begin
|
232
|
-
self.files = File.
|
238
|
+
self.files = File.readlines(manifest_name).map { |x| x.strip } +
|
233
239
|
[(gemspec_name if include_gemspec)] +
|
234
240
|
[(rakefile_name if include_rakefile)]
|
235
241
|
self.files = files.compact.uniq
|
@@ -258,14 +264,16 @@ class Echoe
|
|
258
264
|
end
|
259
265
|
end
|
260
266
|
|
261
|
-
self.changes
|
262
|
-
|
263
|
-
|
264
|
-
log
|
265
|
-
|
266
|
-
|
267
|
-
|
268
|
-
|
267
|
+
unless self.changes
|
268
|
+
self.changes = if File.exist? changelog
|
269
|
+
Array(changelog_patterns[:changes]).map do |pattern|
|
270
|
+
open(changelog) do |log|
|
271
|
+
log.read[pattern, 1]
|
272
|
+
end
|
273
|
+
end.compact.first or ""
|
274
|
+
else
|
275
|
+
""
|
276
|
+
end
|
269
277
|
end
|
270
278
|
|
271
279
|
# set some post-defaults
|
@@ -279,6 +287,7 @@ class Echoe
|
|
279
287
|
self.rdoc_pattern = apply_pattern(rdoc_pattern, files) - [manifest_name]
|
280
288
|
self.executable_pattern = apply_pattern(executable_pattern, files)
|
281
289
|
self.test_pattern = apply_pattern(test_pattern)
|
290
|
+
self.spec_pattern = apply_pattern(spec_pattern)
|
282
291
|
|
283
292
|
define_tasks
|
284
293
|
end
|
@@ -388,7 +397,8 @@ class Echoe
|
|
388
397
|
puts "#{var}: #{instance_variable_get(var).inspect}"
|
389
398
|
end
|
390
399
|
end
|
391
|
-
|
400
|
+
|
401
|
+
desc "Builds the .gemspec"
|
392
402
|
task :build_gemspec do
|
393
403
|
# Construct the gemspec file, if needed.
|
394
404
|
if include_gemspec
|
@@ -406,11 +416,15 @@ class Echoe
|
|
406
416
|
end
|
407
417
|
end
|
408
418
|
end
|
419
|
+
puts "Gemspec generated"
|
409
420
|
end
|
410
421
|
|
411
422
|
# Chain it to the gemspec task prerequisite
|
412
423
|
task gemspec_name.to_sym => [:build_gemspec]
|
413
424
|
|
425
|
+
desc "Generates manifest & gemspec in one go"
|
426
|
+
task :build => [:manifest, :build_gemspec]
|
427
|
+
|
414
428
|
task :package do
|
415
429
|
# Chain some cleanup tasks to the default :package task.
|
416
430
|
# Remove the gemfile if it wasn't actually requested.
|
@@ -509,7 +523,8 @@ class Echoe
|
|
509
523
|
end
|
510
524
|
end
|
511
525
|
|
512
|
-
task :test => [:compile]
|
526
|
+
task :test => [:compile] if test_pattern.any?
|
527
|
+
task :spec => :compile if spec_pattern.any?
|
513
528
|
|
514
529
|
end
|
515
530
|
|
@@ -589,7 +604,15 @@ class Echoe
|
|
589
604
|
File.open(filename, 'w') do |f|
|
590
605
|
f.write "Subject: #{name.capitalize} #{version}\n\n"
|
591
606
|
f.write "#{name.capitalize} has been updated to #{version}. #{name.capitalize} is #{summary.uncapitalize}\n\n"
|
592
|
-
|
607
|
+
unless changes.empty?
|
608
|
+
f.write "Changes in this version: "
|
609
|
+
if changes.include?("\n")
|
610
|
+
f.write(changes)
|
611
|
+
else
|
612
|
+
f.write(changes.sub(/^\s*[\w\d\.]+\s+/, '').uncapitalize)
|
613
|
+
end
|
614
|
+
f.write("\n\n")
|
615
|
+
end
|
593
616
|
f.write "More information is available at #{url} .\n\n" unless url.empty?
|
594
617
|
end
|
595
618
|
end
|
@@ -634,7 +657,7 @@ class Echoe
|
|
634
657
|
puts "Building Manifest"
|
635
658
|
old_files = files
|
636
659
|
files = []
|
637
|
-
Dir['**/**'].each do |file|
|
660
|
+
Dir['**/**'].sort.each do |file|
|
638
661
|
next unless file
|
639
662
|
next if ignore_pattern.include?(file)
|
640
663
|
next if File.directory?(file)
|
@@ -697,9 +720,17 @@ class Echoe
|
|
697
720
|
end
|
698
721
|
end
|
699
722
|
|
723
|
+
task :default => :test
|
700
724
|
end
|
701
725
|
|
702
|
-
|
726
|
+
if spec_pattern.any?
|
727
|
+
desc "Run the spec suite"
|
728
|
+
Spec::Rake::SpecTask.new('spec') do |t|
|
729
|
+
t.spec_files = spec_pattern
|
730
|
+
end
|
731
|
+
|
732
|
+
task :default => :spec
|
733
|
+
end
|
703
734
|
|
704
735
|
if defined? Rcov
|
705
736
|
Rcov::RcovTask.new(:coverage) do |t|
|
data/lib/echoe/platform.rb
CHANGED
@@ -1,36 +1,38 @@
|
|
1
1
|
|
2
2
|
### Platform check regexes
|
3
3
|
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
4
|
+
class Echoe
|
5
|
+
module Platform
|
6
|
+
def self.windows?
|
7
|
+
@windows ||= RUBY_PLATFORM =~ /djgpp|(cyg|ms|bcc)win|mingw/
|
8
|
+
!@windows.nil?
|
9
|
+
end
|
9
10
|
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
11
|
+
def self.gcc?
|
12
|
+
@gcc ||= RUBY_PLATFORM =~ /mingw/
|
13
|
+
!@gcc.nil?
|
14
|
+
end
|
14
15
|
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
16
|
+
def self.msvc?
|
17
|
+
@msvc ||= RUBY_PLATFORM =~ /mswin/
|
18
|
+
!@msvc.nil?
|
19
|
+
end
|
19
20
|
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
21
|
+
def self.java?
|
22
|
+
@java ||= RUBY_PLATFORM =~ /java/
|
23
|
+
!@java.nil?
|
24
|
+
end
|
24
25
|
|
25
|
-
|
26
|
-
|
27
|
-
|
26
|
+
def self.suffix
|
27
|
+
@suffix ||= Gem.default_exec_format[2..-1]
|
28
|
+
end
|
28
29
|
|
29
|
-
|
30
|
-
|
31
|
-
|
30
|
+
def self.rake
|
31
|
+
windows? ? "rake#{suffix}.bat" : "rake#{suffix}"
|
32
|
+
end
|
32
33
|
|
33
|
-
|
34
|
-
|
34
|
+
def self.make
|
35
|
+
msvc? ? 'nmake' : 'make'
|
36
|
+
end
|
35
37
|
end
|
36
38
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: echoe
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 3.
|
4
|
+
version: "3.2"
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Evan Weaver
|
@@ -30,7 +30,7 @@ cert_chain:
|
|
30
30
|
yZ0=
|
31
31
|
-----END CERTIFICATE-----
|
32
32
|
|
33
|
-
date: 2009-
|
33
|
+
date: 2009-11-18 00:00:00 -08:00
|
34
34
|
default_executable:
|
35
35
|
dependencies:
|
36
36
|
- !ruby/object:Gem::Dependency
|
@@ -61,39 +61,41 @@ extensions: []
|
|
61
61
|
|
62
62
|
extra_rdoc_files:
|
63
63
|
- CHANGELOG
|
64
|
+
- LICENSE
|
65
|
+
- README
|
66
|
+
- TODO
|
67
|
+
- lib/echoe.rb
|
64
68
|
- lib/echoe/client.rb
|
65
69
|
- lib/echoe/extensions.rb
|
66
70
|
- lib/echoe/net.rb
|
67
71
|
- lib/echoe/platform.rb
|
68
72
|
- lib/echoe/rubygems.rb
|
69
|
-
|
73
|
+
files:
|
74
|
+
- CHANGELOG
|
70
75
|
- LICENSE
|
76
|
+
- MIT-LICENSE
|
77
|
+
- Manifest
|
71
78
|
- README
|
79
|
+
- Rakefile
|
72
80
|
- TODO
|
73
|
-
files:
|
74
|
-
- CHANGELOG
|
75
81
|
- echoe.gemspec
|
82
|
+
- lib/echoe.rb
|
76
83
|
- lib/echoe/client.rb
|
77
84
|
- lib/echoe/extensions.rb
|
78
85
|
- lib/echoe/net.rb
|
79
86
|
- lib/echoe/platform.rb
|
80
87
|
- lib/echoe/rubygems.rb
|
81
|
-
-
|
82
|
-
- LICENSE
|
83
|
-
- Manifest
|
84
|
-
- MIT-LICENSE
|
85
|
-
- Rakefile
|
86
|
-
- README
|
87
|
-
- TODO
|
88
|
+
- vendor/rake/MIT-LICENSE
|
88
89
|
- vendor/rake/lib/rake/contrib/compositepublisher.rb
|
89
90
|
- vendor/rake/lib/rake/contrib/ftptools.rb
|
90
91
|
- vendor/rake/lib/rake/contrib/publisher.rb
|
91
92
|
- vendor/rake/lib/rake/contrib/rubyforgepublisher.rb
|
92
93
|
- vendor/rake/lib/rake/contrib/sshpublisher.rb
|
93
94
|
- vendor/rake/lib/rake/contrib/sys.rb
|
94
|
-
- vendor/rake/MIT-LICENSE
|
95
95
|
has_rdoc: true
|
96
96
|
homepage: http://blog.evanweaver.com/files/doc/fauna/echoe/
|
97
|
+
licenses: []
|
98
|
+
|
97
99
|
post_install_message:
|
98
100
|
rdoc_options:
|
99
101
|
- --line-numbers
|
@@ -119,9 +121,9 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
119
121
|
requirements: []
|
120
122
|
|
121
123
|
rubyforge_project: fauna
|
122
|
-
rubygems_version: 1.3.
|
124
|
+
rubygems_version: 1.3.5
|
123
125
|
signing_key:
|
124
|
-
specification_version:
|
126
|
+
specification_version: 3
|
125
127
|
summary: A Rubygems packaging tool that provides Rake tasks for documentation, extension compiling, testing, and deployment.
|
126
128
|
test_files: []
|
127
129
|
|
metadata.gz.sig
CHANGED
Binary file
|