gemsonrails 0.6.4 → 0.7.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,8 @@
1
+ == 0.7.0 2007-07-04
2
+
3
+ * Fixed the gems:freeze/link issue for gems like net-ssh, net-sftp (you'll need to refreeze these gems after rerunning gemsonrails)
4
+ * Gems loaded in alphabetic, deterministic order [thx Jodi Showers]
5
+
1
6
  == 0.6.4 2007-06-11
2
7
 
3
8
  * 1 critical bugfix:
data/Rakefile CHANGED
@@ -13,7 +13,10 @@ require File.join(File.dirname(__FILE__), 'lib', 'gemsonrails', 'version')
13
13
 
14
14
  AUTHOR = 'nicwilliams' # can also be an array of Authors
15
15
  EMAIL = "your contact email for bug fixes and info"
16
- DESCRIPTION = "Link or freeze RubyGems into your rails apps, instead of plugins"
16
+ DESCRIPTION = <<-EOS
17
+ Link or freeze RubyGems into your rails apps, instead of plugins
18
+ To reinstall, run "gemsonrails" in rails app folder.
19
+ EOS
17
20
  GEM_NAME = 'gemsonrails' # what ppl will type to install your gem
18
21
  config = YAML.load(File.read(File.expand_path("~/.rubyforge/user-config.yml")))
19
22
  RUBYFORGE_USERNAME = config["username"]
@@ -47,7 +50,7 @@ hoe = Hoe.new(GEM_NAME, VERS) do |p|
47
50
  p.url = HOMEPATH
48
51
  p.rubyforge_name = RUBYFORGE_PROJECT if RUBYFORGE_PROJECT
49
52
  p.test_globs = ["test/**/test_*.rb"]
50
- p.clean_globs = CLEAN #An array of file patterns to delete on clean.
53
+ p.clean_globs |= CLEAN #An array of file patterns to delete on clean.
51
54
 
52
55
  # == Optional
53
56
  p.changes = p.paragraphs_of("History.txt", 0..1).join("\n\n")
@@ -76,10 +79,10 @@ task :website_upload do
76
79
  end
77
80
 
78
81
  desc 'Generate and upload website files'
79
- task :website => [:website_generate, :website_upload]
82
+ task :website => [:website_generate, :website_upload, :publish_docs]
80
83
 
81
84
  desc 'Release the website and new gem version'
82
- task :deploy => [:check_version, :website, :publish_docs, :release] do
85
+ task :deploy => [:check_version, :website, :release] do
83
86
  puts "Remember to create SVN tag:"
84
87
  puts "svn copy svn+ssh://#{RUBYFORGE_USERNAME}@rubyforge.org/var/svn/#{PATH}/trunk " +
85
88
  "svn+ssh://#{RUBYFORGE_USERNAME}@rubyforge.org/var/svn/#{PATH}/tags/REL-#{VERS} "
@@ -1,8 +1,8 @@
1
1
  module GemsOnRails #:nodoc:
2
2
  module VERSION #:nodoc:
3
3
  MAJOR = 0
4
- MINOR = 6
5
- TINY = 4
4
+ MINOR = 7
5
+ TINY = 0
6
6
 
7
7
  STRING = [MAJOR, MINOR, TINY].join('.')
8
8
  end
data/templates/init.rb CHANGED
@@ -1,6 +1,6 @@
1
1
  gems = Dir[File.join(RAILS_ROOT, "vendor/gems/*")]
2
2
  if gems.any?
3
- gems.each do |dir|
3
+ gems.sort.each do |dir|
4
4
  lib = File.join(dir, 'lib')
5
5
  $LOAD_PATH.unshift(lib) if File.directory?(lib)
6
6
  init_rb = File.join(dir, 'init.rb')
@@ -19,6 +19,7 @@ ENV['RAILS_ENV'] ||= 'development'
19
19
  if %w[#{only_list.join(' ')}].include?(ENV['RAILS_ENV'])
20
20
  EOS
21
21
  only_if_end = only_list.size == 0 ? "" : "end"
22
+ only_if_tab = only_list.size == 0 ? "" : " "
22
23
 
23
24
  require 'rubygems'
24
25
  Gem.manage_gems
@@ -49,11 +50,23 @@ if %w[#{only_list.join(' ')}].include?(ENV['RAILS_ENV'])
49
50
  chdir target_dir, :verbose => false do
50
51
  if !File.exists?('init.rb')
51
52
  File.open('init.rb', 'w') do |file|
53
+ path_options = [gem_name, gem_name.split('-').join('/')].uniq
54
+ code = <<-eos
55
+ require_options = #{path_options.inspect}
56
+ if require_lib = require_options.find { |path| File.directory?(File.join(File.dirname(__FILE__), 'lib', path)) }
57
+ require File.join(File.dirname(__FILE__), 'lib', require_lib)
58
+ else
59
+ puts msg = "ERROR: Please update \#{File.expand_path __FILE__} with the require path for linked RubyGem #{gem_name}"
60
+ exit
61
+ end
62
+ eos
63
+ tabbed_code = code.split("\n").map { |line| line = "#{only_if_tab}#{line}" }.join("\n")
64
+
52
65
  file << <<-eos
53
66
  #{only_if_begin}
54
- require File.join(File.dirname(__FILE__), 'lib', '#{gem_name}')
67
+ #{tabbed_code}
55
68
  #{only_if_end}
56
- eos
69
+ eos
57
70
  end
58
71
  end
59
72
  end
@@ -18,9 +18,11 @@ ENV['RAILS_ENV'] ||= 'development'
18
18
  if %w[#{only_list.join(' ')}].include?(ENV['RAILS_ENV'])
19
19
  EOS
20
20
  only_if_end = only_list.size == 0 ? "" : "end"
21
+ only_if_tab = only_list.size == 0 ? "" : " "
21
22
 
22
23
  require 'rubygems'
23
24
  Gem.manage_gems
25
+ Gem::CommandManager.new
24
26
 
25
27
  gem = Gem.cache.search(gem_name).sort_by { |g| g.version }.last
26
28
  version ||= gem.version.version rescue nil
@@ -40,16 +42,31 @@ if %w[#{only_list.join(' ')}].include?(ENV['RAILS_ENV'])
40
42
  mkdir_p target_dir + '/tasks', :verbose => false
41
43
  chdir target_dir, :verbose => false do
42
44
  File.open('init.rb', 'w') do |file|
45
+ path_options = [gem_name, gem_name.split('-').join('/')].uniq
46
+ code = <<-eos
47
+ require 'rubygems'
48
+ Gem.manage_gems
49
+ gem = Gem.cache.search('#{gem.name}').sort_by { |g| g.version }.last
50
+ if gem.autorequire
51
+ require gem.autorequire
52
+ else
53
+ require_options = #{path_options.inspect}
54
+ unless require_options.find do |path|
55
+ begin
56
+ require path
57
+ rescue MissingSourceFile
58
+ nil
59
+ end
60
+ end
61
+ puts msg = "ERROR: Please update \#{File.expand_path __FILE__} with the require path for linked RubyGem #{gem_name}"
62
+ exit
63
+ end
64
+ end
65
+ eos
66
+ tabbed_code = code.split("\n").map { |line| line = "#{only_if_tab}#{line}" }.join("\n")
43
67
  file << <<-eos
44
68
  #{only_if_begin}
45
- require 'rubygems'
46
- Gem.manage_gems
47
- gem = Gem.cache.search('#{gem.name}').sort_by { |g| g.version }.last
48
- if gem.autorequire
49
- require gem.autorequire
50
- else
51
- require '#{gem.name}'
52
- end
69
+ #{tabbed_code}
53
70
  #{only_if_end}
54
71
  eos
55
72
  end
data/website/index.html CHANGED
@@ -33,7 +33,7 @@
33
33
  <h1>Gems On Rails</h1>
34
34
  <div id="version" class="clickable" onclick='document.location = "http://rubyforge.org/projects/gemsonrails"; return false'>
35
35
  Get Version
36
- <a href="http://rubyforge.org/projects/gemsonrails" class="numbers">0.6.4</a>
36
+ <a href="http://rubyforge.org/projects/gemsonrails" class="numbers">0.7.0</a>
37
37
  </div>
38
38
  <h1>&#x2192; &#8216;gemsonrails&#8217;</h1>
39
39
 
metadata CHANGED
@@ -1,17 +1,17 @@
1
1
  --- !ruby/object:Gem::Specification
2
- rubygems_version: 0.9.4.1
2
+ rubygems_version: 0.9.4.3
3
3
  specification_version: 1
4
4
  name: gemsonrails
5
5
  version: !ruby/object:Gem::Version
6
- version: 0.6.4
7
- date: 2007-06-11 00:00:00 +02:00
8
- summary: Link or freeze RubyGems into your rails apps, instead of plugins
6
+ version: 0.7.0
7
+ date: 2007-07-04 00:00:00 +02:00
8
+ summary: Link or freeze RubyGems into your rails apps, instead of plugins To reinstall, run "gemsonrails" in rails app folder.
9
9
  require_paths:
10
10
  - lib
11
11
  email: your contact email for bug fixes and info
12
12
  homepage: http://gemsonrails.rubyforge.org
13
13
  rubyforge_project: gemsonrails
14
- description: Link or freeze RubyGems into your rails apps, instead of plugins
14
+ description: Link or freeze RubyGems into your rails apps, instead of plugins To reinstall, run "gemsonrails" in rails app folder.
15
15
  autorequire:
16
16
  default_executable:
17
17
  bindir: bin