viewtastic 0.1.1 → 0.1.2

Sign up to get free protection for your applications and to get access to all the features.
data/History.txt ADDED
@@ -0,0 +1,5 @@
1
+ 0.1.2 - Holy smokes!
2
+ ====================
3
+
4
+ * FIX: properly add "app/presenters" to load_path
5
+ * FIX: Include Viewtastic::Activation in ActionController::Base to activate Viewtastic
data/lib/viewtastic.rb CHANGED
@@ -3,5 +3,5 @@ require File.dirname(__FILE__) + "/viewtastic/base"
3
3
  require File.dirname(__FILE__) + "/duck_punches/array/each_with_presenter"
4
4
 
5
5
  module Viewtastic
6
- VERSION = "0.1.1"
6
+ VERSION = "0.1.2"
7
7
  end
@@ -4,14 +4,6 @@ module Viewtastic
4
4
  # Borrowed from Authlogic.
5
5
  #
6
6
  def self.included(klass) # :nodoc:
7
- if defined?(::ApplicationController)
8
- raise "Viewtastic is trying to prepend a before_filter in ActionController::Base to active itself" +
9
- ", the problem is that ApplicationController has already been loaded meaning the before_filter won't get copied into your" +
10
- " application. Generally this is due to another gem or plugin requiring your ApplicationController prematurely, such as" +
11
- " the resource_controller plugin. The solution is to require Viewtastic before these other gems / plugins. Please require" +
12
- " viewtastic first to get rid of this error."
13
- end
14
-
15
7
  klass.prepend_before_filter :activate_viewtastic
16
8
  end
17
9
 
@@ -21,3 +13,4 @@ module Viewtastic
21
13
  end
22
14
  end
23
15
  end
16
+ ActionController::Base.send(:include, Viewtastic::Activation)
@@ -44,7 +44,7 @@ module Viewtastic
44
44
 
45
45
  presented.each do |name|
46
46
  define_method("#{name}_dom_id") do |*args|
47
- send(:dom_id, send(name), *args)
47
+ controller.send(:dom_id, send(name), *args)
48
48
  end
49
49
  end
50
50
  end
data/rails/init.rb ADDED
@@ -0,0 +1,2 @@
1
+ require File.join(File.dirname(__FILE__), *%w[.. lib viewtastic])
2
+ ActiveSupport::Dependencies.load_paths << File.join(Rails.root, *%w[app presenters])
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: viewtastic
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.1
4
+ version: 0.1.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Istvan Hoka
@@ -9,7 +9,7 @@ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
11
 
12
- date: 2009-12-01 00:00:00 +02:00
12
+ date: 2009-12-03 00:00:00 +02:00
13
13
  default_executable:
14
14
  dependencies: []
15
15
 
@@ -23,13 +23,14 @@ extra_rdoc_files:
23
23
  - LICENSE
24
24
  - README.md
25
25
  files:
26
+ - History.txt
26
27
  - LICENSE
27
- - init.rb
28
28
  - lib/duck_punches/array/each_with_presenter.rb
29
29
  - lib/viewtastic.rb
30
30
  - lib/viewtastic/activation.rb
31
31
  - lib/viewtastic/base.rb
32
32
  - lib/viewtastic/test_case.rb
33
+ - rails/init.rb
33
34
  - README.md
34
35
  has_rdoc: true
35
36
  homepage: http://github.com/ihoka/viewtastic
data/init.rb DELETED
@@ -1 +0,0 @@
1
- Rails.configuration.load_paths << "app/presenters"