geminstaller 0.4.5 → 0.5.0

Sign up to get free protection for your applications and to get access to all the features.
data/History.txt CHANGED
@@ -1,3 +1,6 @@
1
+ == 0.5.0 / 2009-02-03
2
+ * change default processing order of gems from alpha-version-platform to be order found in file (last config file wins). Fixes http://thewoolleyweb.lighthouseapp.com/projects/11580/tickets/15-provide-a-way-to-specify-gem-processing-order . Thanks to Brian Jenkins for helping!
3
+
1
4
  == 0.4.5 / 2008-09-26
2
5
  * Re-release without Hoe as a dependency, since it snuck itself in as a dependency in 0.4.4
3
6
 
data/Manifest.txt CHANGED
@@ -60,11 +60,14 @@ start_local_gem_server.sh
60
60
  test/test_all.rb
61
61
  test/test_all_smoketests.rb
62
62
  website/config.yaml
63
- website/metainfo.yaml
64
63
  website/src/analytics.page
64
+ website/src/code/ci.virtual
65
+ website/src/code/coverage/index.virtual
65
66
  website/src/code/index.page
67
+ website/src/code/rdoc/index.virtual
66
68
  website/src/community/index.page
67
69
  website/src/community/links.page
70
+ website/src/community/rubyforge.virtual
68
71
  website/src/default.css
69
72
  website/src/default.template
70
73
  website/src/documentation/documentation.page
@@ -73,3 +76,5 @@ website/src/documentation/tutorials.page
73
76
  website/src/download.page
74
77
  website/src/faq.page
75
78
  website/src/index.page
79
+ website/src/metainfo
80
+ website/src/webgen.css
data/Rakefile CHANGED
@@ -23,7 +23,9 @@ IndependentHoe.new('geminstaller', GemInstaller.version) do |p|
23
23
  p.url = p.paragraphs_of('README.txt', 0).first.split(/\n/)[1..-1]
24
24
  p.changes = p.paragraphs_of('History.txt', 0..1).join("\n\n")
25
25
  p.clean_globs << 'coverage'
26
+ p.clean_globs << 'website/out'
26
27
  p.clean_globs << 'website/output'
28
+ p.clean_globs << '**/webgen.cache'
27
29
  p.extra_deps = []
28
30
  end
29
31
 
@@ -41,9 +43,9 @@ end
41
43
 
42
44
  task :coverage do
43
45
  rm_rf "coverage"
44
- rm_rf "website/output/code/coverage"
45
- sh "mkdir -p website/output/code"
46
- sh "rcov -o website/output/code/coverage test/test_all.rb"
46
+ rm_rf "website/out/code/coverage"
47
+ sh "mkdir -p website/out/code"
48
+ sh "rcov -o website/out/code/coverage test/test_all.rb"
47
49
  end
48
50
 
49
51
  task :coverage_no_fail do
@@ -65,8 +67,8 @@ task :diff_manifest => :clean do
65
67
  next if path =~ /\.\/nbproject/
66
68
  next if path =~ /\.\/spec/
67
69
  next if path =~ /\.\/pkg/
68
- next if path =~ /\.\/output/
69
- next if path =~ /\.\/website\/output/
70
+ next if path =~ /\.\/out/
71
+ next if path =~ /\.\/website\/out/
70
72
  files << path[2..-1]
71
73
  end
72
74
  files = files.sort.join "\n"
@@ -82,15 +84,22 @@ end
82
84
 
83
85
  desc "Run Webgen to generate website"
84
86
  task :webgen do
85
- # rm_rf "website/output"
86
- sh "webgen -d website"
87
+ # rm_rf "website/out"
88
+ rm_rf "website/webgen.cache"
89
+ # Use webgen/RedCloth versions from GemInstaller config
90
+ # require 'geminstaller'
91
+ # GemInstaller.autogem
92
+ # ARGV.clear
93
+ # ARGV.concat(['-d','website'])
94
+ # load 'webgen'
95
+ sh 'webgen -d website'
87
96
  end
88
97
 
89
98
  desc "Move ri docs to website"
90
99
  task :website_rdocs => :docs do
91
- rm_rf "website/output/code/rdoc"
92
- sh "mkdir -p website/output/code/"
93
- mv "doc", "website/output/code/rdoc"
100
+ rm_rf "website/out/code/rdoc"
101
+ sh "mkdir -p website/out/code/"
102
+ mv "doc", "website/out/code/rdoc"
94
103
  end
95
104
 
96
105
  desc "Generate website, including rdoc and coverage"
@@ -109,7 +118,7 @@ desc 'Upload website (should already be clean and generated)'
109
118
  task :upload_website do
110
119
  host = "thewoolleyman@rubyforge.org"
111
120
  remote_dir = "/var/www/gforge-projects/geminstaller"
112
- local_dir = 'website/output'
121
+ local_dir = 'website/out'
113
122
  sh %{rsync -av --delete --exclude=statsvn #{local_dir}/ #{host}:#{remote_dir}}
114
123
  end
115
124
 
data/TODO.txt CHANGED
@@ -13,10 +13,10 @@
13
13
  * geminstaller_merb_example_app
14
14
  * geminstaller_rails_example_app
15
15
  * Update Rails tutorial link with link to example app
16
- ================ 0.4.0 release ===================
16
+ ================ 0.6.0 release ===================
17
17
  * fix smoke tests on CI
18
18
  * Investigate error when installing and loading gem in same session (like rails preinitializer) - Not reproducible - fixed in >1.1.0???
19
- ================ 0.5.0 release ===================
19
+ ================ 0.7.0 release ===================
20
20
  * If permission error, auto-install under writable_gem_home ~/gems/1.8 (configurable), Gem.clear_paths, set ENV['GEM_HOME'] and ENV['GEM_PATH'] to ENV['HOME']pathsepGem::ConfigMap[:ruby_version], and issue warning (saying in order to prevent warning, a) set gem_home and gem_path: in ~/.gemrc, b) invoke via sudo (only if command line), c) make (and keep) current Gem.dir writeable, or d) add geminstaller (and ruby?) to sudoers file (security hole). Properties: "[no_]use_writable_gem_home" and "writable_gem_home".
21
21
  * For RubyGems >=1.0.1, look at using Gem::SourceInfoCache instead of SourceIndex or --list command
22
22
  * Move classes which are unused against current RubyGems into Legacy module.
data/geminstaller.yml CHANGED
@@ -16,15 +16,18 @@ gems:
16
16
  version: '>= 0.7.0.1'
17
17
  platform: <%= RUBY_PLATFORM =~ /mswin/ ? 'mswin32' : 'ruby'%>
18
18
  - name: RedCloth
19
- version: '>= 3.0.4'
19
+ # version: '= 3.0.4'
20
+ version: '= 4.0.4'
20
21
  - name: rspec
21
- version: '>= 1.1.1'
22
+ version: '>= 1.1.12'
22
23
  - name: cmdparse
23
24
  version: '>= 2.0.2'
24
25
  - name: ruby-debug
25
26
  version: '>= 0.9.3'
26
27
  - name: webgen
27
- version: '= 0.4.2'
28
+ version: '= 0.5.5'
29
+ # - name: gettalong-webgen
30
+ # version: '>= 0.5.5.20081001'
28
31
  <% if RUBY_PLATFORM =~ /mswin/ %>
29
32
  - name: win32-process
30
33
  version: '>= 0.5.5'
@@ -32,8 +32,14 @@ module GemInstaller
32
32
  if GemInstaller::RubyGemsVersionChecker.matches?('< 0.9')
33
33
  require_gem(name, version)
34
34
  else
35
- # TODO: check true/false result of gem method, print debug message if false (already loaded)
36
- result = gem(name, version)
35
+ begin
36
+ result = gem(name, version)
37
+ rescue Gem::Exception => e
38
+ exception_message = e.message
39
+ exception_message.strip!
40
+ error_message = "Error: GemInstaller failed to actiate gem '#{name}', version '#{version}'. This is probably because GemInstaller processes gems in order (was alphabetical prior to 0.5.0), and an earlier gem in your geminstaller.yml config already activated another version. Use the 'gem dependency [-R]' command to track this down, and reorder/edit your config as necessary. Original Gem::Exception was: '#{exception_message}'"
41
+ raise GemInstaller::GemInstallerError.new(error_message)
42
+ end
37
43
  end
38
44
  end
39
45
  end
@@ -51,7 +51,6 @@ module GemInstaller
51
51
  :fix_dependencies => fix_dependencies)
52
52
  gems << gem
53
53
  end
54
- gems.sort!
55
54
  return gems
56
55
  end
57
56
 
@@ -13,9 +13,10 @@ module GemInstaller
13
13
  def build_config
14
14
  @config_file_paths_array = @config_file_paths ? @config_file_paths.split(",") : @default_config_file_paths_array
15
15
  merged_defaults = {}
16
- merged_gems = {}
16
+ merged_gems_in_order = []
17
+ merged_gems_by_key = {}
17
18
  file_found = false
18
- @config_file_paths_array.each do |path|
19
+ @config_file_paths_array.reverse.each do |path| # reverse because last config files win
19
20
  if File.exists?(path)
20
21
  file_found = true
21
22
  else
@@ -34,15 +35,19 @@ module GemInstaller
34
35
  yaml = @yaml_loader.load(erb_result)
35
36
  merged_defaults.merge!(yaml['defaults']) unless yaml['defaults'].nil?
36
37
  next unless yaml['gems']
37
- yaml['gems'].each do |gem|
38
- gem_key = [gem['name'],gem['version'],gem['platform']].join('-')
39
- merged_gems[gem_key] = gem
38
+ yaml['gems'].each do |new_gem|
39
+ gem_key = [new_gem['name'],new_gem['version'],new_gem['platform']].join('-')
40
+ existing_gem = merged_gems_by_key[gem_key]
41
+ unless existing_gem
42
+ merged_gems_in_order << new_gem
43
+ merged_gems_by_key[gem_key] = new_gem
44
+ end
40
45
  end
41
46
  end
42
47
  raise GemInstaller::MissingFileError.new("No config files found at any of these paths: #{@config_file_paths_array.join(', ')}") unless file_found
43
48
  merged_yaml = {}
44
49
  merged_yaml['defaults'] = merged_defaults
45
- merged_yaml['gems'] = merged_gems.values
50
+ merged_yaml['gems'] = merged_gems_in_order
46
51
  config = GemInstaller::Config.new(merged_yaml)
47
52
  config
48
53
  end
@@ -45,7 +45,7 @@ module GemInstaller
45
45
  def <=>(other)
46
46
  compare = @name <=> other.name
47
47
  return compare if compare != 0
48
- compare = @version <=> other.version
48
+ compare = @version <=> other.version # TODO: this should use rubygems version comparison, not string comparison
49
49
  return compare if compare != 0
50
50
  return 0 if (@platform == nil && other.platform == nil)
51
51
  return @platform <=> other.platform
data/lib/geminstaller.rb CHANGED
@@ -34,7 +34,7 @@ module GemInstaller
34
34
  end
35
35
 
36
36
  def self.version
37
- "0.4.5"
37
+ "0.5.0"
38
38
  end
39
39
 
40
40
  def self.create_application(args = [], registry = nil)
data/test/test_all.rb CHANGED
@@ -26,7 +26,7 @@ ARGV.concat(args)
26
26
  success = false
27
27
  begin
28
28
  require 'spec'
29
- success = ::Spec::Runner::CommandLine.run(rspec_options)
29
+ success = ::Spec::Runner::CommandLine.run
30
30
  ensure
31
31
  GemInstaller::TestGemHome.reset
32
32
  end
data/website/config.yaml CHANGED
@@ -1,2 +1,11 @@
1
1
  # Configuration file for webgen
2
2
  # Used to set the parameters of the plugins
3
+ default_meta_info:
4
+ Page:
5
+ blocks:
6
+ default: {pipeline: tags,redcloth,blocks}
7
+ Template:
8
+ blocks:
9
+ default: {pipeline: tags,redcloth,blocks}
10
+ tag.menu.show_current_subtree_only: true
11
+ tag.menu.nested: false
@@ -0,0 +1,5 @@
1
+ ci.html:
2
+ title: CI
3
+ url: http://ci.thewoolleyweb.com
4
+ in_menu: true
5
+ sort_info: 20
@@ -0,0 +1,5 @@
1
+ index.html:
2
+ title: Coverage
3
+ url: index.html
4
+ in_menu: true
5
+ sort_info: 40
@@ -1,7 +1,6 @@
1
1
  ---
2
2
  title: Design
3
3
  ---
4
- <span id="release_process"/>
5
4
  h1. Design Notes
6
5
 
7
6
  These are some notes on the underlying design of GemInstaller, and the current state of development:
@@ -30,6 +29,7 @@ These are some notes on the underlying design of GemInstaller, and the current s
30
29
  * One of my motivations for creating GemInstaller was as an exercise to help me learn Ruby better. If you see me doing anything obviously dumb or inefficient in the code or design, please let me know. Some of them I already know about, but haven't fixed, most I'm probably not aware of :)
31
30
 
32
31
  <span id="rubygems_compatibility"/>
32
+
33
33
  h1. Maintaining forward and backward compatibility with multiple RubyGems versions
34
34
 
35
35
  * I've put a lot of effort into ensuring that GemInstaller works with older versions of RubyGems, and run automated tests against several recent versions on Continuous Integration.
@@ -47,6 +47,7 @@ h1. Maintaining forward and backward compatibility with multiple RubyGems versio
47
47
  ** The "<code>prefer_binary_platform</code> config property":../documentation/documentation.html#prefer_binary_platform_config_property no longer applies, and has no effect.
48
48
 
49
49
  <span id="release_process"/>
50
+
50
51
  h1. Release Process
51
52
 
52
53
  Yeah, it's too manual. Notes for improvement below.
@@ -73,13 +74,14 @@ Here's the improvements I need to make to the release process:
73
74
  * Rake task to automatically tag and release latest build from CI and tag
74
75
 
75
76
  <span id="rubygems_upgrade_process"/>
77
+
76
78
  h1. Rubygems Upgrade Process
77
79
 
78
80
  Process to test against new rubygems release.
79
81
 
80
- <pre>
82
+ <pre><code>
81
83
  svn export http://rubygems.rubyforge.org/svn/tags/REL_X_Y_Z spec/fixture/rubygems_dist/rubygems-X.Y.Z
82
- </pre>
84
+ </code></pre>
83
85
 
84
86
  * add spec/fixture/rubygems_dist/rubytems-X.Y.Z
85
87
  * checkin
@@ -0,0 +1,6 @@
1
+ index.html:
2
+ title: Rdoc
3
+ url: index.html
4
+ in_menu: true
5
+ sort_info: 30
6
+
@@ -0,0 +1,4 @@
1
+ rubyforge.html:
2
+ title: Rubyforge
3
+ url: http://rubyforge.org/projects/geminstaller
4
+ in_menu: true
@@ -7,17 +7,19 @@ font:90% Verdana,Tahoma,Arial,sans-serif;
7
7
  margin:0;
8
8
  padding:0;
9
9
  text-align:center;
10
- }s
10
+ }
11
11
 
12
12
  a {
13
- color:#505050;
13
+ color:#3A5FCD;
14
14
  font-weight:bold;
15
- text-decoration:none;
15
+ }
16
+
17
+ a:visited {
18
+ color:#551A8B;
16
19
  }
17
20
 
18
21
  a:hover {
19
22
  color:#808080;
20
- text-decoration:underline;
21
23
  }
22
24
 
23
25
  p {
@@ -25,7 +27,7 @@ line-height:1.5em;
25
27
  margin:0 0 15px;
26
28
  }
27
29
 
28
- code,pre {
30
+ code {
29
31
  font-size:1.3em;
30
32
  }
31
33
 
@@ -165,4 +167,9 @@ font-weight:bold;
165
167
  }
166
168
 
167
169
 
170
+ /* START webgen horizontal menu style */
171
+ .webgen-menu-horiz ul { display: block; }
172
+ .webgen-menu-horiz li { display: inline; }
173
+ /* STOP webgen horizontal menu style */
174
+
168
175
  /*** End of file ***/
@@ -1,4 +1,4 @@
1
- --- content, html
1
+ --- pipeline:tags,blocks
2
2
  <?xml version="1.0" encoding="UTF-8"?>
3
3
  <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
4
4
  <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="{lang:}">
@@ -9,7 +9,6 @@
9
9
  <meta name="author" content="Chad Woolley / Original design by Andreas Viklund - http://andreasviklund.com" />
10
10
  <meta name="generator" content="webgen - http://webgen.rubyforge.org" />
11
11
  <link rel="stylesheet" href="{relocatable: default.css}" type="text/css" media="screen" />
12
- <link rel="stylesheet" href="{resource: webgen-css}" type="text/css" media="screen" />
13
12
  <title>{title:}</title>
14
13
  </head>
15
14
 
@@ -24,20 +23,20 @@
24
23
  </div>
25
24
 
26
25
  <div id="navigation">
27
- {menu: {menuStyle: horizontal}}
26
+ {menu:}
28
27
  </div>
29
28
 
30
29
  <div id="wrap">
31
30
 
32
31
  <div id="content">
33
- {block:}
32
+ <webgen:block name="content" />
34
33
  </div>
35
34
 
36
35
  </div>
37
36
  </div>
38
37
 
39
38
  <div id="footer">&copy; 2008 Chad Woolley | Generated by <a href="http://webgen.rubyforge.org">webgen</a></div>
40
- {includeFile: {filename: analytics.page, escapeHTML: false, processOutput: false}}
39
+ {include_file: {filename: src/analytics.page, escape_html: false, process_output: false}}
41
40
 
42
41
  </body>
43
42
  </html>