echoe 4.1 → 4.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (6) hide show
  1. data.tar.gz.sig +0 -0
  2. data/CHANGELOG +2 -0
  3. data/echoe.gemspec +2 -2
  4. data/lib/echoe.rb +30 -5
  5. metadata +2 -2
  6. metadata.gz.sig +0 -0
data.tar.gz.sig CHANGED
Binary file
data/CHANGELOG CHANGED
@@ -1,4 +1,6 @@
1
1
 
2
+ v4.2. Allow custom requirements (TylerRick); take advantage of .git_ignore (greatseth); only use -P MediumSecurity on install if it is the packaging machine.
3
+
2
4
  v4.1. Remove prompts until I can find a cursor library that's not GPL. Restore Rubyforge gem dependency, for the announce method.
3
5
 
4
6
  v4.0. Use gemcutter. Dump Rubyforge.
@@ -2,12 +2,12 @@
2
2
 
3
3
  Gem::Specification.new do |s|
4
4
  s.name = %q{echoe}
5
- s.version = "4.1"
5
+ s.version = "4.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-12-22}
10
+ s.date = %q{2010-02-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
13
  s.extra_rdoc_files = ["CHANGELOG", "LICENSE", "README", "TODO", "lib/echoe.rb", "lib/echoe/extensions.rb", "lib/echoe/platform.rb", "lib/echoe/rubygems.rb"]
@@ -124,6 +124,7 @@ Uncommon packaging options:
124
124
  * <tt>ruby_version</tt> - Version string for which Ruby to require (for example, <tt>'>= 1.8.4'</tt>.
125
125
  * <tt>eval</tt> - Accepts a proc to be evaluated in the context of the Gem::Specification object. This allows you to set more unusual gemspec options.
126
126
  * <tt>ignore_pattern</tt> - A filename array, glob array, or regex for pathnames that should be ignored when building the manifest.
127
+ * <tt>require_paths</tt> - Non-standard requirement paths to add to the gem definition.
127
128
  * <tt>executable_pattern</tt> - A filename array, glob array, or regex for files that should be installed as wrapped executables.
128
129
 
129
130
  Security options:
@@ -147,7 +148,7 @@ Documentation options:
147
148
  class Echoe
148
149
 
149
150
  # 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, :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
+ 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, :require_paths, :changelog, :rcov_options, :gemspec_format
151
152
 
152
153
  # best left alone
153
154
  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
@@ -167,8 +168,9 @@ class Echoe
167
168
  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
169
  self.test_pattern = File.exist?("test/test_all.rb") ? "test/test_all.rb" : ['test/**/test_*.rb', 'test/**/*_test.rb']
169
170
  self.spec_pattern = "spec/**/*_spec.rb"
171
+
170
172
  self.ignore_pattern = /^(pkg|doc)|\.svn|CVS|\.bzr|\.DS|\.git/
171
-
173
+
172
174
  self.changelog_patterns = {
173
175
  :version => [
174
176
  /^\s*v([\d\.]+)(\.|\s|$)/,
@@ -184,6 +186,7 @@ class Echoe
184
186
  self.summary = ""
185
187
  self.install_message = nil
186
188
  self.executable_pattern = /^bin\//
189
+ self.require_paths = nil
187
190
  self.has_rdoc = true
188
191
  self.use_sudo = !Platform.windows?
189
192
  self.gem_bin = "gem#{Platform.suffix}"
@@ -278,7 +281,10 @@ class Echoe
278
281
  self.summary = description if summary.empty?
279
282
  self.clean_pattern = apply_pattern(clean_pattern)
280
283
  self.extension_pattern = apply_pattern(extension_pattern, files)
284
+
281
285
  self.ignore_pattern = apply_pattern(ignore_pattern)
286
+ honor_gitignore! if File.exist?(".git")
287
+
282
288
  self.rdoc_pattern = apply_pattern(rdoc_pattern, files) - [manifest_name]
283
289
  self.executable_pattern = apply_pattern(executable_pattern, files)
284
290
  self.test_pattern = apply_pattern(test_pattern)
@@ -286,7 +292,22 @@ class Echoe
286
292
 
287
293
  define_tasks
288
294
  end
289
-
295
+
296
+ private
297
+ def honor_gitignore!
298
+ self.ignore_pattern += \
299
+ Dir["**/.gitignore"].inject([]) do |pattern,gitignore|
300
+ pattern.concat \
301
+ File.readlines(gitignore).
302
+ map { |line| line.strip }.
303
+ reject { |line| "" == line }.
304
+ map { |glob|
305
+ d = File.dirname(gitignore)
306
+ d == "." ? glob : File.join(d, glob)
307
+ }
308
+ end.flatten.uniq
309
+ end
310
+
290
311
  def apply_pattern(pattern, files = nil)
291
312
  files ||= Dir['**/**']
292
313
  case pattern
@@ -361,7 +382,11 @@ class Echoe
361
382
 
362
383
  dirs = Dir['{lib,ext}']
363
384
  s.extensions = extension_pattern if extension_pattern.any?
364
- s.require_paths = dirs unless dirs.empty?
385
+ if require_paths
386
+ s.require_paths = require_paths
387
+ else
388
+ s.require_paths = dirs unless dirs.empty?
389
+ end
365
390
  s.has_rdoc = has_rdoc
366
391
 
367
392
  if File.exist? "test/test_all.rb"
@@ -444,7 +469,7 @@ class Echoe
444
469
 
445
470
  desc 'Install the gem'
446
471
  task :install => [:clean, :package, :uninstall] do
447
- system "#{'sudo' if use_sudo} #{gem_bin} install pkg/*.gem -P MediumSecurity --no-update-sources"
472
+ system "#{'sudo' if use_sudo} #{gem_bin} install pkg/*.gem --no-update-sources #{'-P MediumSecurity' if private_key and File.exist?(private_key)}"
448
473
  end
449
474
 
450
475
  namespace :install do
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: "4.1"
4
+ version: "4.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-12-22 00:00:00 -05:00
33
+ date: 2010-02-18 00:00:00 -08:00
34
34
  default_executable:
35
35
  dependencies:
36
36
  - !ruby/object:Gem::Dependency
metadata.gz.sig CHANGED
Binary file