trackman 0.6.5 → 0.6.6

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,7 +1,6 @@
1
1
  class <%= controller_name.camelize %>Controller < ApplicationController
2
2
  include Trackman::Scaffold::ContentSaver
3
- after_filter :save_filters if Rails.env.development?
4
- after_filter :render_filters
3
+ after_filter :render_content if Rails.env.development?
5
4
 
6
5
  # ContentSaver defines two class methods for filtering the ouput of your pages
7
6
  #
@@ -58,21 +58,12 @@ module Trackman
58
58
  xslt.apply_to(html).to_s
59
59
  end
60
60
 
61
- def cache key
62
- @cache ||= {}
63
- @cache[key] || yield
64
- end
65
-
66
- def render_filters
67
- response.body = cache(params[:action]) { new_content }
68
- end
69
-
70
- def save_filters
61
+ def render_content
62
+ response.body = new_content
71
63
  to_write = self.class.mappings[params[:action].to_sym]
72
64
  unless to_write.nil?
73
65
  path = "/public/#{to_write}.html"
74
- result = cache(params[:action]) { new_content }
75
- File.open(Rails.root.to_s + path, 'w') { |f| f.write(result) }
66
+ File.open(Rails.root.to_s + path, 'w') { |f| f.write(response.body) }
76
67
  end
77
68
  end
78
69
  end
@@ -1,3 +1,3 @@
1
1
  module Trackman
2
- VERSION = "0.6.5"
2
+ VERSION = "0.6.6"
3
3
  end
@@ -1,7 +1,6 @@
1
1
  class <%= controller_name.camelize %>Controller < ApplicationController
2
2
  include Trackman::Scaffold::ContentSaver
3
- after_filter :save_filters if Rails.env.development?
4
- after_filter :render_filters
3
+ after_filter :render_content if Rails.env.development?
5
4
  # ContentSaver defines two class methods for filtering the ouput of your pages
6
5
  #
7
6
  # Note that it uses nokogiri to parse the output.
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: trackman
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.6.5
4
+ version: 0.6.6
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors: