railhead_preheat 0.0.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA1:
3
+ metadata.gz: 3086a891f4f1b8a92d600016a71c4975c86cabda
4
+ data.tar.gz: 8c396659dd08b5d27fb8ad79bde36c4149d6207f
5
+ SHA512:
6
+ metadata.gz: ecd1d2a6a3bb2324979dc96e8828905db255ab010518ab4deb179c96bf06e54f32c6d2a5f075e11b55b5b4732169095a5fbce50eb588f11a428b07021cb162b0
7
+ data.tar.gz: 1c82364569b09994285b23cf2f652dc84e97ab91b3b2749f1c3fa0fcadaf4df88c801c9ac0d1299a490aaf04e80222d320fb7888d8e634dd8cc9320ca2e5f313
data/MIT-LICENSE ADDED
@@ -0,0 +1,20 @@
1
+ Copyright (c) 2008 [name of plugin creator]
2
+
3
+ Permission is hereby granted, free of charge, to any person obtaining
4
+ a copy of this software and associated documentation files (the
5
+ "Software"), to deal in the Software without restriction, including
6
+ without limitation the rights to use, copy, modify, merge, publish,
7
+ distribute, sublicense, and/or sell copies of the Software, and to
8
+ permit persons to whom the Software is furnished to do so, subject to
9
+ the following conditions:
10
+
11
+ The above copyright notice and this permission notice shall be
12
+ included in all copies or substantial portions of the Software.
13
+
14
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
15
+ EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
16
+ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
17
+ NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
18
+ LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
19
+ OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
20
+ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
data/README.rdoc ADDED
@@ -0,0 +1,19 @@
1
+ = RailheadPreheat
2
+
3
+ RailheadPreheat is a Ruby on Rails plugin that automatically caches partials from model.
4
+
5
+ == Installation
6
+
7
+ Add to your Gemfile:
8
+
9
+ gem 'railhead_preheat'
10
+
11
+ == Usage
12
+
13
+ Simply add to your model:
14
+
15
+ after_save :preheat
16
+
17
+ == License
18
+
19
+ Copyright (c) 2015 Bence Nagy (bence.nagy@gmail.com), released under the MIT license.
@@ -0,0 +1,22 @@
1
+ class RailheadPreheatController < ActionController::Metal
2
+ include AbstractController::Rendering
3
+ include AbstractController::Helpers
4
+ include ActionController::Caching
5
+ include ActionView::Layouts
6
+
7
+ def initialize(*args)
8
+ super()
9
+ lookup_context.view_paths = ApplicationController.view_paths
10
+ end
11
+ end
12
+
13
+
14
+ module RailheadPreheat
15
+
16
+ def preheat(locals = {})
17
+ RailheadPreheatController.new.render_to_string(self, locals: locals)
18
+ end
19
+ end
20
+
21
+
22
+ ActiveRecord::Base.send :include, RailheadPreheat
@@ -0,0 +1,16 @@
1
+ Gem::Specification.new do |s|
2
+ s.name = "railhead_preheat"
3
+ s.version = "0.0.1"
4
+ s.date = "2015-02-24"
5
+ s.summary = "RailheadPreheat is a Ruby on Rails plugin that automatically caches partials from model."
6
+ s.email = "bence.nagy@gmail.com"
7
+ s.homepage = "http://github.com/nagybence/railhead_preheat"
8
+ s.has_rdoc = true
9
+ s.authors = ["Bence Nagy"]
10
+ s.files = ["MIT-LICENSE",
11
+ "README.rdoc",
12
+ "railhead_preheat.gemspec",
13
+ "lib/railhead_preheat.rb"]
14
+ s.rdoc_options = ["--main", "README.rdoc"]
15
+ s.license = "MIT"
16
+ end
metadata ADDED
@@ -0,0 +1,50 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: railhead_preheat
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.0.1
5
+ platform: ruby
6
+ authors:
7
+ - Bence Nagy
8
+ autorequire:
9
+ bindir: bin
10
+ cert_chain: []
11
+ date: 2015-02-24 00:00:00.000000000 Z
12
+ dependencies: []
13
+ description:
14
+ email: bence.nagy@gmail.com
15
+ executables: []
16
+ extensions: []
17
+ extra_rdoc_files: []
18
+ files:
19
+ - MIT-LICENSE
20
+ - README.rdoc
21
+ - lib/railhead_preheat.rb
22
+ - railhead_preheat.gemspec
23
+ homepage: http://github.com/nagybence/railhead_preheat
24
+ licenses:
25
+ - MIT
26
+ metadata: {}
27
+ post_install_message:
28
+ rdoc_options:
29
+ - "--main"
30
+ - README.rdoc
31
+ require_paths:
32
+ - lib
33
+ required_ruby_version: !ruby/object:Gem::Requirement
34
+ requirements:
35
+ - - ">="
36
+ - !ruby/object:Gem::Version
37
+ version: '0'
38
+ required_rubygems_version: !ruby/object:Gem::Requirement
39
+ requirements:
40
+ - - ">="
41
+ - !ruby/object:Gem::Version
42
+ version: '0'
43
+ requirements: []
44
+ rubyforge_project:
45
+ rubygems_version: 2.4.6
46
+ signing_key:
47
+ specification_version: 4
48
+ summary: RailheadPreheat is a Ruby on Rails plugin that automatically caches partials
49
+ from model.
50
+ test_files: []