plugems 1.1.5 → 1.1.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (3) hide show
  1. data/lib/plugems.rb +2 -2
  2. data/lib/plugems/loader.rb +11 -1
  3. metadata +9 -9
@@ -1,5 +1,5 @@
1
1
  module RailsVersionVerifier
2
- ver = Rails::VERSION::STRING.split('.').collect(&:to_i).extend(Comparable)
2
+ ver = Rails::VERSION::STRING.split('.').collect{ |n| n.to_i }.extend(Comparable)
3
3
  fail("The rails version #{ Rails::VERSION::STRING } is not supported by plugems") unless (ver >= [1,1,6] && ver <= [1,2,3])
4
4
  end
5
5
  # Rails 1.1.16 is not very extensible in how it loads rake tasks.
@@ -45,4 +45,4 @@ module Gem
45
45
 
46
46
  end
47
47
 
48
- end
48
+ end
@@ -67,6 +67,16 @@ module Plugems
67
67
 
68
68
  def load_plugem(name, version)
69
69
  return if @@loaded_plugems.include?(name)
70
+
71
+ # check if rails is frozen and skip all rails gems
72
+ if (name == "rails" or name == "plugems") and File.exist?("#{RAILS_ROOT}/vendor/rails")
73
+ if name == "plugems"
74
+ require "#{RAILS_ROOT}/vendor/rails/plugems/lib/plugems/manifest"
75
+ require "#{RAILS_ROOT}/vendor/rails/plugems/lib/plugems/plugem_view_support"
76
+ end
77
+ return
78
+ end
79
+
70
80
  debug " Looking for #{name} with #{version}..."
71
81
  if plugin?(name)
72
82
  load_as_plugin(name)
@@ -87,7 +97,7 @@ module Plugems
87
97
 
88
98
  def plugin_path(gem_or_plugin)
89
99
  name = gem_or_plugin.respond_to?(:name) ? gem_or_plugin.name : gem_or_plugin
90
- plugin_lib_paths.grep(/\/#{name}$/).first
100
+ plugin_lib_paths.grep(/\/#{name}(-([\.0-9])+)?$/).first
91
101
  end
92
102
 
93
103
  def process_plugin_manifest(path)
metadata CHANGED
@@ -1,10 +1,10 @@
1
1
  --- !ruby/object:Gem::Specification
2
- rubygems_version: 0.9.2
2
+ rubygems_version: 0.9.4
3
3
  specification_version: 1
4
4
  name: plugems
5
5
  version: !ruby/object:Gem::Version
6
- version: 1.1.5
7
- date: 2007-06-12 00:00:00 -04:00
6
+ version: 1.1.6
7
+ date: 2007-06-22 00:00:00 -04:00
8
8
  summary: Dependency-management framework built on top of Ruby On Rails
9
9
  require_paths:
10
10
  - lib
@@ -30,15 +30,15 @@ authors:
30
30
  - RHG Team
31
31
  files:
32
32
  - init.rb
33
- - lib/plugems
34
- - lib/plugems.rb
35
33
  - lib/tasks
36
- - lib/plugems/loader.rb
37
- - lib/plugems/manifest.rb
38
- - lib/plugems/plugem_view_support.rb
34
+ - lib/plugems.rb
35
+ - lib/plugems
36
+ - lib/tasks/rails.rb
39
37
  - lib/plugems/tasks
38
+ - lib/plugems/plugem_view_support.rb
39
+ - lib/plugems/manifest.rb
40
+ - lib/plugems/loader.rb
40
41
  - lib/plugems/tasks/loader.rb
41
- - lib/tasks/rails.rb
42
42
  - config/manifest.yml
43
43
  - README
44
44
  - MIT-LICENSE