serve 0.11.5 → 0.11.6

Sign up to get free protection for your applications and to get access to all the features.
data/Gemfile ADDED
@@ -0,0 +1,14 @@
1
+ source "http://gemcutter.org"
2
+
3
+ gem "jeweler"
4
+ gem "rake"
5
+ gem "rspec", "1.3.0"
6
+ gem "rack", "1.1.0"
7
+
8
+ # activesupport 2.x
9
+ # gem "activesupport", "2.3.5"
10
+
11
+ # activesupport 3.x
12
+ gem "activesupport", ">= 3.0.0.beta"
13
+ gem "tzinfo"
14
+ gem "i18n"
data/Gemfile.lock ADDED
@@ -0,0 +1,31 @@
1
+ GEM
2
+ remote: http://gemcutter.org/
3
+ specs:
4
+ activesupport (3.0.0.beta4)
5
+ gemcutter (0.5.0)
6
+ json_pure
7
+ git (1.2.5)
8
+ i18n (0.4.1)
9
+ jeweler (1.4.0)
10
+ gemcutter (>= 0.1.0)
11
+ git (>= 1.2.5)
12
+ rubyforge (>= 2.0.0)
13
+ json_pure (1.4.3)
14
+ rack (1.1.0)
15
+ rake (0.8.7)
16
+ rspec (1.3.0)
17
+ rubyforge (2.0.4)
18
+ json_pure (>= 1.1.7)
19
+ tzinfo (0.3.22)
20
+
21
+ PLATFORMS
22
+ ruby
23
+
24
+ DEPENDENCIES
25
+ activesupport (>= 3.0.0.beta)
26
+ i18n
27
+ jeweler
28
+ rack (= 1.1.0)
29
+ rake
30
+ rspec (= 1.3.0)
31
+ tzinfo
data/README.rdoc CHANGED
@@ -95,7 +95,7 @@ Here is an example "config.ru" file:
95
95
 
96
96
  #\ -p 4000
97
97
 
98
- gem 'activesupport', '2.3.5'
98
+ gem 'activesupport/all'
99
99
  gem 'serve'
100
100
 
101
101
  require 'serve'
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.11.5
1
+ 0.11.6
data/bin/serve CHANGED
@@ -2,8 +2,8 @@
2
2
  lib = File.dirname(__FILE__) + '/../lib'
3
3
  require 'rubygems'
4
4
 
5
- gem 'activesupport', '= 2.3.5'
6
- require 'active_support'
5
+ gem 'activesupport'
6
+ require 'active_support/all'
7
7
 
8
8
  if File.file?(lib + '/serve/version.rb')
9
9
  $LOAD_PATH << lib
data/lib/serve.rb CHANGED
@@ -1,4 +1,11 @@
1
- require 'active_support'
1
+ require 'active_support/all'
2
+
3
+ module Kernel
4
+ # Returns the object's singleton class.
5
+ def singleton_class
6
+ metaclass
7
+ end if !respond_to?(:singleton_class) && respond_to?(:metaclass) # exists in active_support 3.x but not 2.3.5
8
+ end
2
9
 
3
10
  require 'serve/version'
4
11
  require 'serve/file_resolver'
@@ -1,4 +1,4 @@
1
- require 'active_support'
1
+ require 'active_support/all'
2
2
  require 'serve/rack'
3
3
 
4
4
  module Serve
@@ -40,7 +40,7 @@ module Serve #:nodoc:
40
40
  def install_view_helpers(context)
41
41
  view_helpers_file_path = @root_path + '/view_helpers.rb'
42
42
  if File.file?(view_helpers_file_path)
43
- context.metaclass.module_eval(File.read(view_helpers_file_path) + "\ninclude ViewHelpers", view_helpers_file_path)
43
+ context.singleton_class.module_eval(File.read(view_helpers_file_path) + "\ninclude ViewHelpers", view_helpers_file_path)
44
44
  end
45
45
  end
46
46
 
data/lib/serve/rack.rb CHANGED
@@ -1,4 +1,4 @@
1
- require 'active_support'
1
+ require 'active_support/all'
2
2
  require 'rack'
3
3
 
4
4
  module Serve
@@ -19,7 +19,7 @@ module Serve # :nodoc:
19
19
  end
20
20
 
21
21
  def define_find_cache(&block)
22
- metaclass.module_eval do
22
+ singleton_class.module_eval do
23
23
  define_method :find_cache, &block
24
24
  end
25
25
  end
@@ -37,7 +37,7 @@ module Serve
37
37
  #
38
38
  def install_view_helpers(handler, view_helpers)
39
39
  controller = self
40
- handler.metaclass.module_eval do
40
+ handler.singleton_class.module_eval do
41
41
  define_method :install_view_helpers do |context|
42
42
  super(context)
43
43
  # Make available to view helpers
data/spec/spec_helper.rb CHANGED
@@ -1,7 +1,7 @@
1
1
  $LOAD_PATH.unshift(File.join(File.dirname(__FILE__), '..', 'lib'))
2
2
 
3
3
  require 'rubygems'
4
- gem 'activesupport', '= 2.3.5'
4
+ gem 'activesupport'
5
5
 
6
6
  require 'serve'
7
7
  require 'spec'
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: serve
3
3
  version: !ruby/object:Gem::Version
4
- hash: 57
4
+ hash: 63
5
5
  prerelease: false
6
6
  segments:
7
7
  - 0
8
8
  - 11
9
- - 5
10
- version: 0.11.5
9
+ - 6
10
+ version: 0.11.6
11
11
  platform: ruby
12
12
  authors:
13
13
  - John W. Long
@@ -16,7 +16,7 @@ autorequire:
16
16
  bindir: bin
17
17
  cert_chain: []
18
18
 
19
- date: 2010-06-05 00:00:00 -04:00
19
+ date: 2010-06-13 00:00:00 -04:00
20
20
  default_executable: serve
21
21
  dependencies:
22
22
  - !ruby/object:Gem::Dependency
@@ -41,7 +41,7 @@ dependencies:
41
41
  requirement: &id002 !ruby/object:Gem::Requirement
42
42
  none: false
43
43
  requirements:
44
- - - "="
44
+ - - ">="
45
45
  - !ruby/object:Gem::Version
46
46
  hash: 9
47
47
  segments:
@@ -78,6 +78,8 @@ extra_rdoc_files:
78
78
  - README.rdoc
79
79
  files:
80
80
  - CHANGELOG.rdoc
81
+ - Gemfile
82
+ - Gemfile.lock
81
83
  - LICENSE
82
84
  - QUICKSTART.rdoc
83
85
  - README.rdoc