echoe 2.7.13 → 3

Sign up to get free protection for your applications and to get access to all the features.
data.tar.gz.sig CHANGED
Binary file
data/CHANGELOG CHANGED
@@ -1,4 +1,6 @@
1
1
 
2
+ v3. Compatibility with Rubyforge 1.0.0 and Rubygems 1.2.
3
+
2
4
  v2.7.13. Avoid Rubyforge 1.0.0 which seems broken.
3
5
 
4
6
  v2.7.12. Respect system EDITOR setting (osteele).
data/Manifest CHANGED
@@ -1,4 +1,5 @@
1
1
  CHANGELOG
2
+ lib/echoe/client.rb
2
3
  lib/echoe/extensions.rb
3
4
  lib/echoe/platform.rb
4
5
  lib/echoe.rb
data/README CHANGED
@@ -24,7 +24,12 @@ If you use this software, please {make a donation}[http://blog.evanweaver.com/do
24
24
 
25
25
  == Installation
26
26
 
27
+ Install the gem:
27
28
  sudo gem install echoe
29
+
30
+ If you haven't already, make sure Rubyforge is configured locally and your password is correctly set:
31
+ rubyforge setup
32
+ rubyforge config
28
33
 
29
34
  == Project configuration
30
35
 
@@ -57,9 +62,7 @@ More advanced configuration is described in the Echoe class.
57
62
 
58
63
  == Deploying your gem
59
64
 
60
- First, run <tt>rubyforge setup</tt> and <tt>rubyforge config</tt> if you haven't already. Make sure your Rubyforge password is correctly set.
61
-
62
- Now, to deploy the gem and documentation:
65
+ To deploy the gem and documentation:
63
66
 
64
67
  rake manifest
65
68
  rake release
data/Rakefile CHANGED
@@ -7,12 +7,8 @@ Echoe.new('echoe') do |p|
7
7
  p.summary = 'A Rubygems packaging tool that provides Rake tasks for documentation, extension compiling, testing, and deployment.'
8
8
  p.url = 'http://blog.evanweaver.com/files/doc/fauna/echoe/'
9
9
  p.docs_host = 'blog.evanweaver.com:~/www/bax/public/files/doc/'
10
- p.dependencies = ['rake', 'rubyforge =0.4.5', 'highline']
10
+ p.runtime_dependencies = ['rake', 'rubyforge >=1.0.0', 'highline']
11
+ p.development_dependencies = []
11
12
  p.require_signed = true
12
- p.rubygems_version = '>= 0.9.4.5'
13
-
14
- # Echoe is self-dependent
15
- p.include_gemspec = false
16
- p.include_rakefile = true
17
13
  end
18
14
 
@@ -0,0 +1,105 @@
1
+
2
+ # Gem::Specification for Echoe-3
3
+ # Originally generated by Echoe
4
+
5
+ --- !ruby/object:Gem::Specification
6
+ name: echoe
7
+ version: !ruby/object:Gem::Version
8
+ version: "3"
9
+ platform: ruby
10
+ authors:
11
+ - Evan Weaver
12
+ autorequire:
13
+ bindir: bin
14
+ date: 2008-06-23 00:00:00 -04:00
15
+ default_executable:
16
+ dependencies:
17
+ - !ruby/object:Gem::Dependency
18
+ name: rake
19
+ type: :runtime
20
+ version_requirement:
21
+ version_requirements: !ruby/object:Gem::Requirement
22
+ requirements:
23
+ - - ">="
24
+ - !ruby/object:Gem::Version
25
+ version: "0"
26
+ version:
27
+ - !ruby/object:Gem::Dependency
28
+ name: rubyforge
29
+ type: :runtime
30
+ version_requirement:
31
+ version_requirements: !ruby/object:Gem::Requirement
32
+ requirements:
33
+ - - ">="
34
+ - !ruby/object:Gem::Version
35
+ version: 1.0.0
36
+ version:
37
+ - !ruby/object:Gem::Dependency
38
+ name: highline
39
+ type: :runtime
40
+ version_requirement:
41
+ version_requirements: !ruby/object:Gem::Requirement
42
+ requirements:
43
+ - - ">="
44
+ - !ruby/object:Gem::Version
45
+ version: "0"
46
+ version:
47
+ description: A Rubygems packaging tool that provides Rake tasks for documentation, extension compiling, testing, and deployment.
48
+ email: ""
49
+ executables: []
50
+
51
+ extensions: []
52
+
53
+ extra_rdoc_files:
54
+ - CHANGELOG
55
+ - lib/echoe/client.rb
56
+ - lib/echoe/extensions.rb
57
+ - lib/echoe/platform.rb
58
+ - lib/echoe.rb
59
+ - LICENSE
60
+ - README
61
+ - TODO
62
+ files:
63
+ - CHANGELOG
64
+ - lib/echoe/client.rb
65
+ - lib/echoe/extensions.rb
66
+ - lib/echoe/platform.rb
67
+ - lib/echoe.rb
68
+ - LICENSE
69
+ - Manifest
70
+ - MIT-LICENSE
71
+ - Rakefile
72
+ - README
73
+ - TODO
74
+ - echoe.gemspec
75
+ has_rdoc: true
76
+ homepage: http://blog.evanweaver.com/files/doc/fauna/echoe/
77
+ post_install_message:
78
+ rdoc_options:
79
+ - --line-numbers
80
+ - --inline-source
81
+ - --title
82
+ - Echoe
83
+ - --main
84
+ - README
85
+ require_paths:
86
+ - lib
87
+ required_ruby_version: !ruby/object:Gem::Requirement
88
+ requirements:
89
+ - - ">="
90
+ - !ruby/object:Gem::Version
91
+ version: "0"
92
+ version:
93
+ required_rubygems_version: !ruby/object:Gem::Requirement
94
+ requirements:
95
+ - - "="
96
+ - !ruby/object:Gem::Version
97
+ version: "1.2"
98
+ version:
99
+ requirements: []
100
+
101
+ rubyforge_project: fauna
102
+ rubygems_version: 1.2.0
103
+ specification_version: 2
104
+ summary: A Rubygems packaging tool that provides Rake tasks for documentation, extension compiling, testing, and deployment.
105
+ test_files: []
@@ -1,7 +1,6 @@
1
1
 
2
2
  require 'rubygems'
3
3
 
4
- gem 'rubyforge', '=0.4.5'
5
4
  require 'rubyforge'
6
5
 
7
6
  require 'rake'
@@ -20,7 +19,6 @@ rescue LoadError
20
19
  end
21
20
 
22
21
  begin
23
- gem 'hoe', '<= 1.5.0'
24
22
  require 'load_multi_rails_rake_tasks'
25
23
  rescue LoadError
26
24
  end
@@ -28,6 +26,7 @@ end
28
26
  $LOAD_PATH << File.dirname(__FILE__)
29
27
  require 'echoe/platform'
30
28
  require 'echoe/extensions'
29
+ require 'echoe/client'
31
30
 
32
31
  =begin rdoc
33
32
 
@@ -42,7 +41,7 @@ For example, a simple <tt>Rakefile</tt> might look like this:
42
41
  p.summary = "A library that uncapitalizes strings. It's awesome."
43
42
  p.url = "http://www.uncapitalizer.com"
44
43
  p.docs_host = "uncapitalizer.com:~/www/files/doc/"
45
- p.dependencies = ["string_tools >=1.4.0"]
44
+ p.runtime_dependencies = ["string_tools >=1.4.0"]
46
45
  end
47
46
 
48
47
  See below for the full list.
@@ -69,9 +68,9 @@ Note that you can also set the key and certificate locations in the Rakefile its
69
68
 
70
69
  == Metadependencies
71
70
 
72
- 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, along with a comment containing the original <tt>Rakefile</tt> source. Downstream repackagers can use the <tt>gemspec</tt> as-is to build new versions of your gem. This way no dependencies are added, but no contents are lost.
71
+ 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.
73
72
 
74
- If you do want metadependencies, add <tt>'echoe'</tt> to the <tt>p.dependencies</tt> array, and set <tt>p.include_rakefile = true</tt> and <tt>p.include_gemspec = false</tt>.
73
+ 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>.
75
74
 
76
75
  == Cross-packaging
77
76
 
@@ -105,7 +104,8 @@ Versioning options:
105
104
 
106
105
  Common packaging options:
107
106
 
108
- * <tt>dependencies</tt> - An array of dependencies for this gem. For example, <tt>['mongrel', 'rake >=0.7.1']</tt>.
107
+ * <tt>runtime_dependencies</tt> - An array of runtime dependencies for this gem. For example, <tt>['mongrel', 'activesupport >= 2.0.2']</tt>.
108
+ * <tt>development_dependencies</tt> - An array of development dependencies for this gem. For example, <tt>['rake >=0.7.1']</tt>.
109
109
  * <tt>extension_pattern</tt> - A filename array, glob array, or regex for extension files that need to be run at install time. Defaults to <tt>"ext/**/extconf.rb"</tt>.
110
110
 
111
111
  Testing options:
@@ -121,7 +121,7 @@ Uncommon packaging options:
121
121
  * <tt>need_tar_gz</tt> - Whether to generate a <tt>.tar.gz</tt> package. Defaults to <tt>true</tt>.
122
122
  * <tt>need_tgz</tt> - Whether to generate a <tt>.tgz</tt> package. Defaults to <tt>false</tt>.
123
123
  * <tt>need_zip</tt> - Whether to generate a <tt>.zip</tt> package. Defaults to <tt>false</tt>.
124
- * <tt>include_rakefile</tt> - Include the Rakefile directly within the package. Defaults to <tt>false</tt>.
124
+ * <tt>include_rakefile</tt> - Include the Rakefile directly within the package. Defaults to <tt>true</tt>.
125
125
  * <tt>include_gemspec</tt> - Include the generated gemspec file within the package. Defaults to <tt>true</tt>.
126
126
  * <tt>ruby_version</tt> - Version string for which Ruby to require (for example, <tt>'>= 1.8.4'</tt>.
127
127
  * <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.
@@ -149,13 +149,13 @@ Documentation options:
149
149
  class Echoe
150
150
 
151
151
  # user-configurable
152
- attr_accessor :author, :changes, :clean_pattern, :description, :email, :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
152
+ 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
153
153
 
154
154
  # best left alone
155
155
  attr_accessor :name, :lib_files, :test_files, :bin_files, :spec, :rdoc_options, :rubyforge_name, :has_rdoc, :include_gemspec, :include_rakefile, :gemspec_name, :eval, :files, :changelog_patterns, :rubygems_version, :use_sudo
156
156
 
157
157
  # legacy
158
- attr_accessor :extra_deps, :rdoc_files, :extensions
158
+ attr_accessor :extra_deps, :rdoc_files, :extensions, :dependencies
159
159
 
160
160
  def initialize(name, _version = nil)
161
161
  # Defaults
@@ -196,7 +196,8 @@ class Echoe
196
196
  readme = Dir['*'].detect { |filename| filename =~ /^readme/i }
197
197
  self.rdoc_options += ['--main', readme] if readme
198
198
 
199
- self.dependencies = []
199
+ self.runtime_dependencies = []
200
+ self.development_dependencies = ["echoe"]
200
201
  self.manifest_name = "Manifest"
201
202
  self.extension_pattern = ["ext/**/extconf.rb", "ext/extconf.rb"]
202
203
  self.private_key = ENV['GEM_PRIVATE_KEY']
@@ -209,14 +210,16 @@ class Echoe
209
210
  self.need_zip = false
210
211
  self.platform = $platform
211
212
 
212
- self.include_rakefile = false
213
+ self.include_rakefile = true
213
214
  self.include_gemspec = true
214
215
  self.gemspec_name = "#{name}.gemspec"
216
+ self.rubygems_version = "1.2"
215
217
 
216
218
  yield self if block_given?
217
219
 
218
220
  # legacy compatibility
219
- self.dependencies = extra_deps if extra_deps and dependencies.empty?
221
+ self.runtime_dependencies = dependencies if dependencies and runtime_dependencies.empty?
222
+ self.runtime_dependencies = extra_deps if extra_deps and runtime_dependencies.empty?
220
223
  self.project = rubyforge_name if rubyforge_name
221
224
  self.rdoc_pattern = rdoc_files if rdoc_files
222
225
  self.extension_pattern = extensions if extensions
@@ -300,6 +303,7 @@ class Echoe
300
303
  self.spec = Gem::Specification.new do |s|
301
304
  s.name = name
302
305
  s.version = version
306
+ # s.specification_version = 3
303
307
  s.summary = summary
304
308
  s.author = Array(author).join(", ")
305
309
  s.email = email
@@ -318,9 +322,14 @@ class Echoe
318
322
  s.cert_chain = certificate_chain
319
323
  end
320
324
 
321
- dependencies.each do |dep|
325
+ runtime_dependencies.each do |dep|
322
326
  dep = dep.split(" ") if dep.is_a? String
323
- s.add_dependency(*dep)
327
+ s.add_runtime_dependency(*dep)
328
+ end
329
+
330
+ development_dependencies.each do |dep|
331
+ dep = dep.split(" ") if dep.is_a? String
332
+ s.add_development_dependency(*dep)
324
333
  end
325
334
 
326
335
  s.files = files
@@ -367,16 +376,10 @@ class Echoe
367
376
  if include_gemspec
368
377
  File.open(gemspec_name, 'w') do |f|
369
378
  f.puts "\n# Gem::Specification for #{name.capitalize}-#{version}\n# Originally generated by Echoe\n\n"
370
- spec.to_ruby.split("\n").each do |line|
379
+ spec.to_yaml.split("\n").each do |line|
371
380
  # Don't publish any information about the private key or certificate chain
372
381
  f.puts line unless line =~ /signing_key|cert_chain|\.pem/
373
- end
374
-
375
- f.puts "\n\n# # Original Rakefile source (requires the Echoe gem):\n# \n"
376
- File.open("Rakefile").readlines.each do |line|
377
- # Ditto
378
- f.write "# #{line}" unless line =~ /private_key|certificate_chain|\.pem/
379
- end
382
+ end
380
383
  end
381
384
  end
382
385
  end
@@ -410,6 +413,13 @@ class Echoe
410
413
  task :install => [:clean, :package, :uninstall] do
411
414
  system "#{'sudo' if use_sudo} gem install pkg/*.gem -P MediumSecurity --no-update-sources"
412
415
  end
416
+
417
+ namespace :install do
418
+ desc 'Install the gem including development dependencies'
419
+ task :development => [:clean, :package, :uninstall] do
420
+ system "#{'sudo' if use_sudo} gem install pkg/*.gem -P MediumSecurity --no-update-sources --development"
421
+ end
422
+ end
413
423
 
414
424
  desc 'Uninstall the gem'
415
425
  task :uninstall do
@@ -427,7 +437,7 @@ class Echoe
427
437
  pkg_tar_gz = pkg + ".tar.gz"
428
438
  pkg_zip = pkg + ".zip"
429
439
 
430
- rf = RubyForge.new
440
+ rf = RubyForge.new.configure
431
441
  puts "Logging in"
432
442
  rf.login
433
443
 
@@ -572,7 +582,7 @@ class Echoe
572
582
 
573
583
  body = File.open(filename).readlines.reject { |line| line =~ /Subject: / }.join.gsub("\n\n\n", "\n\n")
574
584
 
575
- rf = RubyForge.new
585
+ rf = RubyForge.new.configure
576
586
  rf.login
577
587
  rf.post_news(project, subject, body)
578
588
  puts "Published."
@@ -615,6 +625,7 @@ class Echoe
615
625
  File.open(manifest_name, 'w').puts(files)
616
626
 
617
627
  (files | old_files).sort.each do |file|
628
+ next if file == gemspec_name
618
629
  sign = " "
619
630
  if old_files.include?(file) and !files.include?(file)
620
631
  sign = "-"
@@ -0,0 +1,25 @@
1
+ # Fixes for Rubyforge 1.0.0 client.rb
2
+
3
+ class RubyForge::Client
4
+ def boundary_data_for(boundary, parameters)
5
+ parameters.sort_by {|k,v| k.to_s }.map { |k,v|
6
+ parameter = "--#{boundary}\r\nContent-Disposition: form-data; name=\"" +
7
+ WEBrick::HTTPUtils.escape_form(k.to_s) + "\""
8
+
9
+ if v.respond_to?(:path)
10
+ parameter += "; filename=\"#{File.basename(v.path)}\"\r\n"
11
+ parameter += "Content-Transfer-Encoding: binary\r\n"
12
+ parameter += "Content-Type: text/plain"
13
+ end
14
+ parameter += "\r\n\r\n"
15
+
16
+ if v.respond_to?(:path)
17
+ parameter += v.read
18
+ elsif
19
+ parameter += v.to_s
20
+ end
21
+
22
+ parameter
23
+ }.join("\r\n") + "\r\n--#{boundary}--\r\n"
24
+ end
25
+ 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: 2.7.13
4
+ version: "3"
5
5
  platform: ruby
6
6
  authors:
7
7
  - Evan Weaver
@@ -30,11 +30,12 @@ cert_chain:
30
30
  yZ0=
31
31
  -----END CERTIFICATE-----
32
32
 
33
- date: 2008-05-26 00:00:00 -04:00
33
+ date: 2008-06-23 00:00:00 -04:00
34
34
  default_executable:
35
35
  dependencies:
36
36
  - !ruby/object:Gem::Dependency
37
37
  name: rake
38
+ type: :runtime
38
39
  version_requirement:
39
40
  version_requirements: !ruby/object:Gem::Requirement
40
41
  requirements:
@@ -44,15 +45,17 @@ dependencies:
44
45
  version:
45
46
  - !ruby/object:Gem::Dependency
46
47
  name: rubyforge
48
+ type: :runtime
47
49
  version_requirement:
48
50
  version_requirements: !ruby/object:Gem::Requirement
49
51
  requirements:
50
- - - "="
52
+ - - ">="
51
53
  - !ruby/object:Gem::Version
52
- version: 0.4.5
54
+ version: 1.0.0
53
55
  version:
54
56
  - !ruby/object:Gem::Dependency
55
57
  name: highline
58
+ type: :runtime
56
59
  version_requirement:
57
60
  version_requirements: !ruby/object:Gem::Requirement
58
61
  requirements:
@@ -68,6 +71,7 @@ extensions: []
68
71
 
69
72
  extra_rdoc_files:
70
73
  - CHANGELOG
74
+ - lib/echoe/client.rb
71
75
  - lib/echoe/extensions.rb
72
76
  - lib/echoe/platform.rb
73
77
  - lib/echoe.rb
@@ -76,6 +80,7 @@ extra_rdoc_files:
76
80
  - TODO
77
81
  files:
78
82
  - CHANGELOG
83
+ - lib/echoe/client.rb
79
84
  - lib/echoe/extensions.rb
80
85
  - lib/echoe/platform.rb
81
86
  - lib/echoe.rb
@@ -85,6 +90,7 @@ files:
85
90
  - Rakefile
86
91
  - README
87
92
  - TODO
93
+ - echoe.gemspec
88
94
  has_rdoc: true
89
95
  homepage: http://blog.evanweaver.com/files/doc/fauna/echoe/
90
96
  post_install_message:
@@ -105,14 +111,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
105
111
  version:
106
112
  required_rubygems_version: !ruby/object:Gem::Requirement
107
113
  requirements:
108
- - - ">="
114
+ - - "="
109
115
  - !ruby/object:Gem::Version
110
- version: 0.9.4.5
116
+ version: "1.2"
111
117
  version:
112
118
  requirements: []
113
119
 
114
120
  rubyforge_project: fauna
115
- rubygems_version: 1.1.1
121
+ rubygems_version: 1.2.0
116
122
  signing_key:
117
123
  specification_version: 2
118
124
  summary: A Rubygems packaging tool that provides Rake tasks for documentation, extension compiling, testing, and deployment.
metadata.gz.sig CHANGED
Binary file