cells 3.3.3 → 3.3.4

Sign up to get free protection for your applications and to get access to all the features.
data/Gemfile ADDED
@@ -0,0 +1,4 @@
1
+ source :gemcutter
2
+ gem "rails", "~>2.3"
3
+ gem "shoulda"
4
+ gem "active_helper"
@@ -158,7 +158,7 @@ module Cells
158
158
  # just RAILS_ROOT/app/cells, but you might want to add e.g.
159
159
  # RAILS_ROOT/app/views.
160
160
  def add_view_path(path)
161
- path = ::Rails.root.join(path) if defined?(::Rails)
161
+ path = File.join(::Rails.root, path) if defined?(::Rails) and ::Rails.respond_to?(:root)
162
162
  self.view_paths << path unless self.view_paths.include?(path)
163
163
  end
164
164
 
data/lib/cells/version.rb CHANGED
@@ -1,5 +1,5 @@
1
1
  # encoding: utf-8
2
2
 
3
3
  module Cells
4
- VERSION = '3.3.3'
4
+ VERSION = '3.3.4'
5
5
  end
data/test/cells_test.rb CHANGED
@@ -128,6 +128,11 @@ class CellsTest < ActionController::TestCase
128
128
  end
129
129
  end
130
130
 
131
+ def test_add_view_path
132
+ Cell::Base.add_view_path 'now'
133
+ assert_kind_of ActionView::PathSet, Cell::Base.view_paths
134
+ end
135
+
131
136
 
132
137
  def test_controller_render_methods
133
138
  get :call_render_cell_with_strings # render_cell("test", "state")
data/test/test_helper.rb CHANGED
@@ -1,41 +1,14 @@
1
1
  # encoding: utf-8
2
2
  require 'rubygems'
3
+ require 'bundler'
4
+ Bundler.setup
3
5
 
4
- begin
5
- require 'test/unit'
6
- rescue
7
- gem 'test-unit', '1.2.3'
8
- require 'test/unit'
9
- end
10
-
11
- begin
12
- require 'active_support'
13
- rescue
14
- gem 'activesupport'
15
- require 'active_support'
16
- end
17
-
18
- begin
19
- require 'action_controller'
20
- rescue
21
- gem 'actionpack'
22
- require 'action_controller'
23
- end
24
-
25
- begin
26
- require 'action_view'
27
- rescue
28
- gem 'actionpack'
29
- require 'action_view'
30
- end
31
-
32
- begin
33
- require 'shoulda'
34
- rescue
35
- gem 'shoulda'
36
- require 'shoulda'
37
- end
38
6
 
7
+ require 'test/unit'
8
+ require 'active_support'
9
+ require 'action_controller'
10
+ require 'action_view'
11
+ require 'shoulda'
39
12
  require 'active_support/test_case'
40
13
 
41
14
  # Require app's test_helper.rb if such exists.
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: cells
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.3.3
4
+ version: 3.3.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Nick Sutterer
@@ -9,7 +9,7 @@ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
11
 
12
- date: 2010-04-17 00:00:00 +02:00
12
+ date: 2010-06-28 00:00:00 +02:00
13
13
  default_executable:
14
14
  dependencies: []
15
15
 
@@ -23,6 +23,7 @@ extra_rdoc_files:
23
23
  - README.rdoc
24
24
  files:
25
25
  - CHANGES
26
+ - Gemfile
26
27
  - MIT-LICENSE
27
28
  - README.rdoc
28
29
  - Rakefile