with_template 0.0.1

Sign up to get free protection for your applications and to get access to all the features.
data/.document ADDED
@@ -0,0 +1,5 @@
1
+ lib/**/*.rb
2
+ bin/*
3
+ -
4
+ features/**/*.feature
5
+ LICENSE.txt
data/.ruby-gemset ADDED
@@ -0,0 +1 @@
1
+ use_template
data/.ruby-version ADDED
@@ -0,0 +1 @@
1
+ 1.9.3
data/Gemfile ADDED
@@ -0,0 +1,12 @@
1
+ source 'http://rubygems.org'
2
+
3
+ gem 'blocks', '~> 2.4.0'
4
+ gem 'rails', '>= 3.0.0'
5
+
6
+ group :development do
7
+ gem 'bundler'
8
+ gem 'jeweler'
9
+ gem 'simplecov'
10
+ gem 'shoulda'
11
+ gem 'mocha'
12
+ end
data/Gemfile.lock ADDED
@@ -0,0 +1,109 @@
1
+ GEM
2
+ remote: http://rubygems.org/
3
+ specs:
4
+ actionmailer (4.0.0)
5
+ actionpack (= 4.0.0)
6
+ mail (~> 2.5.3)
7
+ actionpack (4.0.0)
8
+ activesupport (= 4.0.0)
9
+ builder (~> 3.1.0)
10
+ erubis (~> 2.7.0)
11
+ rack (~> 1.5.2)
12
+ rack-test (~> 0.6.2)
13
+ activemodel (4.0.0)
14
+ activesupport (= 4.0.0)
15
+ builder (~> 3.1.0)
16
+ activerecord (4.0.0)
17
+ activemodel (= 4.0.0)
18
+ activerecord-deprecated_finders (~> 1.0.2)
19
+ activesupport (= 4.0.0)
20
+ arel (~> 4.0.0)
21
+ activerecord-deprecated_finders (1.0.3)
22
+ activesupport (4.0.0)
23
+ i18n (~> 0.6, >= 0.6.4)
24
+ minitest (~> 4.2)
25
+ multi_json (~> 1.3)
26
+ thread_safe (~> 0.1)
27
+ tzinfo (~> 0.3.37)
28
+ arel (4.0.0)
29
+ atomic (1.1.13)
30
+ blocks (2.4.0)
31
+ call_with_params
32
+ rails (>= 3.0.0)
33
+ builder (3.1.4)
34
+ call_with_params (0.0.1)
35
+ activesupport (>= 3.0.0)
36
+ erubis (2.7.0)
37
+ git (1.2.6)
38
+ hike (1.2.3)
39
+ i18n (0.6.5)
40
+ jeweler (1.6.4)
41
+ bundler (~> 1.0)
42
+ git (>= 1.2.5)
43
+ rake
44
+ mail (2.5.4)
45
+ mime-types (~> 1.16)
46
+ treetop (~> 1.4.8)
47
+ metaclass (0.0.1)
48
+ mime-types (1.25)
49
+ minitest (4.7.5)
50
+ mocha (0.14.0)
51
+ metaclass (~> 0.0.1)
52
+ multi_json (1.7.9)
53
+ polyglot (0.3.3)
54
+ rack (1.5.2)
55
+ rack-test (0.6.2)
56
+ rack (>= 1.0)
57
+ rails (4.0.0)
58
+ actionmailer (= 4.0.0)
59
+ actionpack (= 4.0.0)
60
+ activerecord (= 4.0.0)
61
+ activesupport (= 4.0.0)
62
+ bundler (>= 1.3.0, < 2.0)
63
+ railties (= 4.0.0)
64
+ sprockets-rails (~> 2.0.0)
65
+ railties (4.0.0)
66
+ actionpack (= 4.0.0)
67
+ activesupport (= 4.0.0)
68
+ rake (>= 0.8.7)
69
+ thor (>= 0.18.1, < 2.0)
70
+ rake (10.1.0)
71
+ shoulda (3.5.0)
72
+ shoulda-context (~> 1.0, >= 1.0.1)
73
+ shoulda-matchers (>= 1.4.1, < 3.0)
74
+ shoulda-context (1.1.5)
75
+ shoulda-matchers (2.3.0)
76
+ activesupport (>= 3.0.0)
77
+ simplecov (0.7.1)
78
+ multi_json (~> 1.0)
79
+ simplecov-html (~> 0.7.1)
80
+ simplecov-html (0.7.1)
81
+ sprockets (2.10.0)
82
+ hike (~> 1.2)
83
+ multi_json (~> 1.0)
84
+ rack (~> 1.0)
85
+ tilt (~> 1.1, != 1.3.0)
86
+ sprockets-rails (2.0.0)
87
+ actionpack (>= 3.0)
88
+ activesupport (>= 3.0)
89
+ sprockets (~> 2.8)
90
+ thor (0.18.1)
91
+ thread_safe (0.1.2)
92
+ atomic
93
+ tilt (1.4.1)
94
+ treetop (1.4.15)
95
+ polyglot
96
+ polyglot (>= 0.3.1)
97
+ tzinfo (0.3.37)
98
+
99
+ PLATFORMS
100
+ ruby
101
+
102
+ DEPENDENCIES
103
+ blocks (~> 2.4.0)
104
+ bundler
105
+ jeweler
106
+ mocha
107
+ rails (>= 3.0.0)
108
+ shoulda
109
+ simplecov
data/LICENSE.txt ADDED
@@ -0,0 +1,20 @@
1
+ Copyright (c) 2013 Andrew Hunter
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,14 @@
1
+ = with_template
2
+
3
+ Render a template (partial) and easily override any of the components of the template.
4
+
5
+ == Installation
6
+
7
+ To install, add the following to the Gemfile:
8
+ gem install 'with_template'
9
+
10
+ == Copyright
11
+
12
+ Copyright (c) 2013 Andrew Hunter. See LICENSE.txt for
13
+ further details.
14
+
data/Rakefile ADDED
@@ -0,0 +1,44 @@
1
+ # encoding: utf-8
2
+
3
+ require 'rubygems'
4
+ require 'bundler'
5
+ begin
6
+ Bundler.setup(:default, :development)
7
+ rescue Bundler::BundlerError => e
8
+ $stderr.puts e.message
9
+ $stderr.puts "Run `bundle install` to install missing gems"
10
+ exit e.status_code
11
+ end
12
+ require 'rake'
13
+
14
+ require 'jeweler'
15
+ Jeweler::Tasks.new do |gem|
16
+ # gem is a Gem::Specification... see http://docs.rubygems.org/read/chapter/20 for more options
17
+ gem.name = "with_template"
18
+ gem.homepage = "http://github.com/hunterae/with_template"
19
+ gem.license = "MIT"
20
+ gem.summary = %Q{Render a template (partial) and easily override any of the components of the template}
21
+ gem.description = %Q{Render a template (partial) and easily override any of the components of the template}
22
+ gem.email = "hunterae@gmail.com"
23
+ gem.authors = ["Andrew Hunter"]
24
+ # dependencies defined in Gemfile
25
+ end
26
+ Jeweler::RubygemsDotOrgTasks.new
27
+
28
+ require 'rake/testtask'
29
+ Rake::TestTask.new(:test) do |test|
30
+ test.libs << 'lib' << 'test'
31
+ test.pattern = 'test/**/*_test.rb'
32
+ test.verbose = true
33
+ end
34
+ task :default => :test
35
+
36
+ require 'rdoc/task'
37
+ Rake::RDocTask.new do |rdoc|
38
+ version = File.exist?('VERSION') ? File.read('VERSION') : ""
39
+
40
+ rdoc.rdoc_dir = 'rdoc'
41
+ rdoc.title = "with_template #{version}"
42
+ rdoc.rdoc_files.include('README*')
43
+ rdoc.rdoc_files.include('lib/**/*.rb')
44
+ end
data/VERSION ADDED
@@ -0,0 +1 @@
1
+ 0.0.1
@@ -0,0 +1,124 @@
1
+ module WithTemplate
2
+ class Base < Blocks::Base
3
+ # Array of Blocks::Container objects, storing the order of blocks as they were queued
4
+ attr_accessor :queued_blocks
5
+
6
+ # A Hash of queued_blocks arrays; a new array is started when method_missing is invoked
7
+ attr_accessor :block_groups
8
+
9
+ # Render a partial, treating it as a template, and any code in the block argument will impact how the template renders
10
+ # <%= WithTemplate::Base.new(self).render_template("shared/wizard") do |blocks| %>
11
+ # <% blocks.queue :step1 %>
12
+ # <% blocks.queue :step2 do %>
13
+ # My overridden Step 2 |
14
+ # <% end %>
15
+ # <% blocks.queue :step3 %>
16
+ # <% blocks.queue do %>
17
+ # | Anonymous Step 4
18
+ # <% end %>
19
+ # <% end %>
20
+ #
21
+ # <!-- In /app/views/shared/wizard -->
22
+ # <% blocks.define :step1 do %>
23
+ # Step 1 |
24
+ # <% end %>
25
+ #
26
+ # <% blocks.define :step2 do %>
27
+ # Step 2 |
28
+ # <% end %>
29
+ #
30
+ # <% blocks.define :step3 do %>
31
+ # Step 3
32
+ # <% end %>
33
+ #
34
+ # <% blocks.queued_blocks.each do |block| %>
35
+ # <%= blocks.render block %>
36
+ # <% end %>
37
+ #
38
+ # <!-- Will render: Step 1 | My overridden Step 2 | Step 3 | Anonymous Step 4-->
39
+ # Options:
40
+ # [+partial+]
41
+ # The partial to render as a template
42
+ # [+block+]
43
+ # An optional block with code that affects how the template renders
44
+ def render_template(partial, &block)
45
+ render_options = global_options.clone
46
+ render_options[self.variable] = self
47
+ render_options[:captured_block] = view.capture(self, &block) if block_given?
48
+
49
+ view.render partial, render_options
50
+ end
51
+
52
+ # Queue a block for later rendering, such as within a template.
53
+ # <%= UseTemplate::Base.new(self).render_template("shared/wizard") do |template| %>
54
+ # <% template.queue :step1 %>
55
+ # <% template.queue :step2 do %>
56
+ # My overridden Step 2 |
57
+ # <% end %>
58
+ # <% template.queue :step3 %>
59
+ # <% template.queue do %>
60
+ # | Anonymous Step 4
61
+ # <% end %>
62
+ # <% end %>
63
+ #
64
+ # <!-- In /app/views/shared/wizard -->
65
+ # <% template.define :step1 do %>
66
+ # Step 1 |
67
+ # <% end %>
68
+ #
69
+ # <% template.define :step2 do %>
70
+ # Step 2 |
71
+ # <% end %>
72
+ #
73
+ # <% template.define :step3 do %>
74
+ # Step 3
75
+ # <% end %>
76
+ #
77
+ # <% template.queued_blocks.each do |block| %>
78
+ # <%= template.render block %>
79
+ # <% end %>
80
+ #
81
+ # <!-- Will render: Step 1 | My overridden Step 2 | Step 3 | Anonymous Step 4-->
82
+ # Options:
83
+ # [+*args+]
84
+ # The options to pass in when this block is rendered. These will override any options provided to the actual block
85
+ # definition. Any or all of these options may be overriden by whoever calls "blocks.render" on this block.
86
+ # Usually the first of these args will be the name of the block being queued (either a string or a symbol)
87
+ # [+block+]
88
+ # The optional block definition to render when the queued block is rendered
89
+ def queue(*args, &block)
90
+ self.queued_blocks << self.define_block_container(*args, &block)
91
+ nil
92
+ end
93
+
94
+ protected
95
+
96
+ def initialize(view, options={})
97
+ self.queued_blocks = []
98
+ self.block_groups = {}
99
+ super(view, options.reverse_merge(:variable => :template))
100
+ end
101
+
102
+ # If a method is missing, we'll assume the user is starting a new block group by that missing method name
103
+ def method_missing(m, *args, &block)
104
+ options = args.extract_options!
105
+
106
+ # If the specified block group has already been defined, it is simply returned here for iteration.
107
+ # It will consist of all the blocks used in this block group that have yet to be rendered,
108
+ # as the call for their use occurred before the template was rendered (where their definitions likely occurred)
109
+ return self.block_groups[m] unless self.block_groups[m].nil?
110
+
111
+ # Allows for nested block groups, store the current block positions array and start a new one
112
+ original_queued_blocks = self.queued_blocks
113
+ self.queued_blocks = []
114
+ self.block_groups[m] = self.queued_blocks
115
+
116
+ # Capture the contents of the block group (this will only capture block definitions and block renders; it will ignore anything else)
117
+ view.capture(global_options.merge(options), &block) if block_given?
118
+
119
+ # restore the original block positions array
120
+ self.queued_blocks = original_queued_blocks
121
+ nil
122
+ end
123
+ end
124
+ end
@@ -0,0 +1,9 @@
1
+ module WithTemplate
2
+ module ViewAdditions
3
+ module ClassMethods
4
+ def with_template(template, &block)
5
+ WithTemplate::Base.new(self).render_template(template, &block)
6
+ end
7
+ end
8
+ end
9
+ end
@@ -0,0 +1,8 @@
1
+ require "action_view"
2
+
3
+ module WithTemplate
4
+ autoload :Base, "with_template/base"
5
+ autoload :ViewAdditions, "with_template/view_additions"
6
+ end
7
+
8
+ ActionView::Base.send :include, WithTemplate::ViewAdditions::ClassMethods
data/test/base_test.rb ADDED
@@ -0,0 +1,118 @@
1
+ require 'helper'
2
+
3
+ class WithTemplate::BaseTest < Test::Unit::TestCase
4
+ def setup
5
+ @view = ActionView::Base.new
6
+ @builder = WithTemplate::Base.new(@view)
7
+ end
8
+
9
+ context "render_template" do
10
+ should "attempt to render a partial specified as the :template parameter" do
11
+ @view.expects(:render).with{ |template, options| template == "my_template"}
12
+ @builder.render_template("my_template")
13
+ end
14
+
15
+ should "set all of the global options as local variables to the partial it renders" do
16
+ @view.expects(:render).with { |template, options| template == 'some_template' && options[:template] == @builder }
17
+ @builder.render_template("some_template")
18
+ end
19
+
20
+ should "capture the data of a block if a block has been specified" do
21
+ block = Proc.new { |options| "my captured block" }
22
+ @view.expects(:render).with { |tempate, options| options[:captured_block] == "my captured block" }
23
+ @builder.render_template("template", &block)
24
+ end
25
+
26
+ should "add a variable to the partial called 'template' as a pointer to the WithTemplate::Base instance" do
27
+ @view.expects(:render).with { |template, options| options[:template] == @builder }
28
+ @builder.render_template("some_template")
29
+ end
30
+
31
+ should "add allow the variable in the partial to be overridden" do
32
+ builder = WithTemplate::Base.new(@view, :variable => :new_template_variable)
33
+ @view.expects(:render).with { |template, options| options[:new_template_variable] == builder }
34
+ builder.render_template("some_template")
35
+ end
36
+ end
37
+
38
+ context "queue" do
39
+ should "store all queued blocks in the queued_blocks array" do
40
+ assert @builder.queued_blocks.empty?
41
+ @builder.queue :test_block
42
+ assert_equal 1, @builder.queued_blocks.length
43
+ assert_equal :test_block, @builder.queued_blocks.map(&:name).first
44
+ end
45
+
46
+ should "convert a string block name to a symbol" do
47
+ @builder.queue "test_block"
48
+ assert_equal :test_block, @builder.queued_blocks.map(&:name).first
49
+ end
50
+
51
+ should "queue blocks as Blocks::Container objects" do
52
+ @builder.queue :test_block, :a => 1, :b => 2, :c => 3
53
+ container = @builder.queued_blocks.first
54
+ assert container.is_a?(Blocks::Container)
55
+ assert_equal :test_block, container.name
56
+ assert_equal ({:a => 1, :b => 2, :c => 3}), container.options
57
+ end
58
+
59
+ should "not require a name for the block being queued" do
60
+ @builder.queue
61
+ @builder.queue
62
+ assert_equal 2, @builder.queued_blocks.length
63
+ assert_equal :block_1, @builder.queued_blocks.map(&:name).first
64
+ assert_equal :block_2, @builder.queued_blocks.map(&:name).second
65
+ end
66
+
67
+ should "anonymously define the name of a block if not specified" do
68
+ @builder.queue
69
+ @builder.queue :my_block
70
+ @builder.queue
71
+ assert_equal :block_1, @builder.queued_blocks.map(&:name).first
72
+ assert_equal :my_block, @builder.queued_blocks.map(&:name).second
73
+ assert_equal :block_2, @builder.queued_blocks.map(&:name).third
74
+ end
75
+
76
+ should "store queued blocks in the order in which they are queued" do
77
+ @builder.queue :block1
78
+ @builder.queue :block3
79
+ @builder.queue :block2
80
+ assert_equal :block1, @builder.queued_blocks.map(&:name).first
81
+ assert_equal :block3, @builder.queued_blocks.map(&:name).second
82
+ assert_equal :block2, @builder.queued_blocks.map(&:name).third
83
+ end
84
+
85
+ should "allow a definition to be provided for a queued block" do
86
+ block = Proc.new do |options| end
87
+ @builder.queue :test_block, &block
88
+ container = @builder.queued_blocks.first
89
+ assert_equal block, container.block
90
+ end
91
+ end
92
+
93
+ context "method_missing" do
94
+ should "start a new block group if a method is missing" do
95
+ @builder.some_method
96
+ queued_blocks = @builder.block_groups[:some_method]
97
+ assert_equal [], queued_blocks
98
+ end
99
+
100
+ should "add items to a queue when a new block group is started" do
101
+ @builder.some_method do
102
+ @builder.queue :myblock1
103
+ @builder.queue :myblock2
104
+ end
105
+ @builder.some_method2 do
106
+ @builder.queue :myblock3
107
+ end
108
+ queued_blocks = @builder.block_groups[:some_method]
109
+ assert_equal 2, queued_blocks.length
110
+ assert_equal :myblock1, queued_blocks.first.name
111
+ assert_equal :myblock2, queued_blocks.second.name
112
+ queued_blocks = @builder.block_groups[:some_method2]
113
+ assert_equal 1, queued_blocks.length
114
+ assert_equal :myblock3, queued_blocks.first.name
115
+ assert_equal [], @builder.queued_blocks
116
+ end
117
+ end
118
+ end
data/test/helper.rb ADDED
@@ -0,0 +1,20 @@
1
+ require 'rubygems'
2
+ require 'bundler'
3
+ begin
4
+ Bundler.setup(:default, :development)
5
+ rescue Bundler::BundlerError => e
6
+ $stderr.puts e.message
7
+ $stderr.puts "Run `bundle install` to install missing gems"
8
+ exit e.status_code
9
+ end
10
+ require 'test/unit'
11
+
12
+ $LOAD_PATH.unshift(File.join(File.dirname(__FILE__), '..', 'lib'))
13
+ $LOAD_PATH.unshift(File.dirname(__FILE__))
14
+ require 'shoulda'
15
+ require 'mocha'
16
+ require 'active_support/core_ext'
17
+ require 'blocks'
18
+ require 'with_template'
19
+
20
+ ActiveSupport::Deprecation.silenced = true
@@ -0,0 +1,72 @@
1
+ # Generated by jeweler
2
+ # DO NOT EDIT THIS FILE DIRECTLY
3
+ # Instead, edit Jeweler::Tasks in Rakefile, and run 'rake gemspec'
4
+ # -*- encoding: utf-8 -*-
5
+
6
+ Gem::Specification.new do |s|
7
+ s.name = "with_template"
8
+ s.version = "0.0.1"
9
+
10
+ s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
+ s.authors = ["Andrew Hunter"]
12
+ s.date = "2013-09-05"
13
+ s.description = "Render a template (partial) and easily override any of the components of the template"
14
+ s.email = "hunterae@gmail.com"
15
+ s.extra_rdoc_files = [
16
+ "LICENSE.txt",
17
+ "README.rdoc"
18
+ ]
19
+ s.files = [
20
+ ".document",
21
+ ".ruby-gemset",
22
+ ".ruby-version",
23
+ "Gemfile",
24
+ "Gemfile.lock",
25
+ "LICENSE.txt",
26
+ "README.rdoc",
27
+ "Rakefile",
28
+ "VERSION",
29
+ "lib/with_template.rb",
30
+ "lib/with_template/base.rb",
31
+ "lib/with_template/view_additions.rb",
32
+ "test/base_test.rb",
33
+ "test/helper.rb",
34
+ "with_template.gemspec"
35
+ ]
36
+ s.homepage = "http://github.com/hunterae/with_template"
37
+ s.licenses = ["MIT"]
38
+ s.require_paths = ["lib"]
39
+ s.rubygems_version = "1.8.25"
40
+ s.summary = "Render a template (partial) and easily override any of the components of the template"
41
+
42
+ if s.respond_to? :specification_version then
43
+ s.specification_version = 3
44
+
45
+ if Gem::Version.new(Gem::VERSION) >= Gem::Version.new('1.2.0') then
46
+ s.add_runtime_dependency(%q<blocks>, ["~> 2.4.0"])
47
+ s.add_runtime_dependency(%q<rails>, [">= 3.0.0"])
48
+ s.add_development_dependency(%q<bundler>, [">= 0"])
49
+ s.add_development_dependency(%q<jeweler>, [">= 0"])
50
+ s.add_development_dependency(%q<simplecov>, [">= 0"])
51
+ s.add_development_dependency(%q<shoulda>, [">= 0"])
52
+ s.add_development_dependency(%q<mocha>, [">= 0"])
53
+ else
54
+ s.add_dependency(%q<blocks>, ["~> 2.4.0"])
55
+ s.add_dependency(%q<rails>, [">= 3.0.0"])
56
+ s.add_dependency(%q<bundler>, [">= 0"])
57
+ s.add_dependency(%q<jeweler>, [">= 0"])
58
+ s.add_dependency(%q<simplecov>, [">= 0"])
59
+ s.add_dependency(%q<shoulda>, [">= 0"])
60
+ s.add_dependency(%q<mocha>, [">= 0"])
61
+ end
62
+ else
63
+ s.add_dependency(%q<blocks>, ["~> 2.4.0"])
64
+ s.add_dependency(%q<rails>, [">= 3.0.0"])
65
+ s.add_dependency(%q<bundler>, [">= 0"])
66
+ s.add_dependency(%q<jeweler>, [">= 0"])
67
+ s.add_dependency(%q<simplecov>, [">= 0"])
68
+ s.add_dependency(%q<shoulda>, [">= 0"])
69
+ s.add_dependency(%q<mocha>, [">= 0"])
70
+ end
71
+ end
72
+
metadata ADDED
@@ -0,0 +1,179 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: with_template
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.0.1
5
+ prerelease:
6
+ platform: ruby
7
+ authors:
8
+ - Andrew Hunter
9
+ autorequire:
10
+ bindir: bin
11
+ cert_chain: []
12
+ date: 2013-09-05 00:00:00.000000000 Z
13
+ dependencies:
14
+ - !ruby/object:Gem::Dependency
15
+ name: blocks
16
+ requirement: !ruby/object:Gem::Requirement
17
+ none: false
18
+ requirements:
19
+ - - ~>
20
+ - !ruby/object:Gem::Version
21
+ version: 2.4.0
22
+ type: :runtime
23
+ prerelease: false
24
+ version_requirements: !ruby/object:Gem::Requirement
25
+ none: false
26
+ requirements:
27
+ - - ~>
28
+ - !ruby/object:Gem::Version
29
+ version: 2.4.0
30
+ - !ruby/object:Gem::Dependency
31
+ name: rails
32
+ requirement: !ruby/object:Gem::Requirement
33
+ none: false
34
+ requirements:
35
+ - - ! '>='
36
+ - !ruby/object:Gem::Version
37
+ version: 3.0.0
38
+ type: :runtime
39
+ prerelease: false
40
+ version_requirements: !ruby/object:Gem::Requirement
41
+ none: false
42
+ requirements:
43
+ - - ! '>='
44
+ - !ruby/object:Gem::Version
45
+ version: 3.0.0
46
+ - !ruby/object:Gem::Dependency
47
+ name: bundler
48
+ requirement: !ruby/object:Gem::Requirement
49
+ none: false
50
+ requirements:
51
+ - - ! '>='
52
+ - !ruby/object:Gem::Version
53
+ version: '0'
54
+ type: :development
55
+ prerelease: false
56
+ version_requirements: !ruby/object:Gem::Requirement
57
+ none: false
58
+ requirements:
59
+ - - ! '>='
60
+ - !ruby/object:Gem::Version
61
+ version: '0'
62
+ - !ruby/object:Gem::Dependency
63
+ name: jeweler
64
+ requirement: !ruby/object:Gem::Requirement
65
+ none: false
66
+ requirements:
67
+ - - ! '>='
68
+ - !ruby/object:Gem::Version
69
+ version: '0'
70
+ type: :development
71
+ prerelease: false
72
+ version_requirements: !ruby/object:Gem::Requirement
73
+ none: false
74
+ requirements:
75
+ - - ! '>='
76
+ - !ruby/object:Gem::Version
77
+ version: '0'
78
+ - !ruby/object:Gem::Dependency
79
+ name: simplecov
80
+ requirement: !ruby/object:Gem::Requirement
81
+ none: false
82
+ requirements:
83
+ - - ! '>='
84
+ - !ruby/object:Gem::Version
85
+ version: '0'
86
+ type: :development
87
+ prerelease: false
88
+ version_requirements: !ruby/object:Gem::Requirement
89
+ none: false
90
+ requirements:
91
+ - - ! '>='
92
+ - !ruby/object:Gem::Version
93
+ version: '0'
94
+ - !ruby/object:Gem::Dependency
95
+ name: shoulda
96
+ requirement: !ruby/object:Gem::Requirement
97
+ none: false
98
+ requirements:
99
+ - - ! '>='
100
+ - !ruby/object:Gem::Version
101
+ version: '0'
102
+ type: :development
103
+ prerelease: false
104
+ version_requirements: !ruby/object:Gem::Requirement
105
+ none: false
106
+ requirements:
107
+ - - ! '>='
108
+ - !ruby/object:Gem::Version
109
+ version: '0'
110
+ - !ruby/object:Gem::Dependency
111
+ name: mocha
112
+ requirement: !ruby/object:Gem::Requirement
113
+ none: false
114
+ requirements:
115
+ - - ! '>='
116
+ - !ruby/object:Gem::Version
117
+ version: '0'
118
+ type: :development
119
+ prerelease: false
120
+ version_requirements: !ruby/object:Gem::Requirement
121
+ none: false
122
+ requirements:
123
+ - - ! '>='
124
+ - !ruby/object:Gem::Version
125
+ version: '0'
126
+ description: Render a template (partial) and easily override any of the components
127
+ of the template
128
+ email: hunterae@gmail.com
129
+ executables: []
130
+ extensions: []
131
+ extra_rdoc_files:
132
+ - LICENSE.txt
133
+ - README.rdoc
134
+ files:
135
+ - .document
136
+ - .ruby-gemset
137
+ - .ruby-version
138
+ - Gemfile
139
+ - Gemfile.lock
140
+ - LICENSE.txt
141
+ - README.rdoc
142
+ - Rakefile
143
+ - VERSION
144
+ - lib/with_template.rb
145
+ - lib/with_template/base.rb
146
+ - lib/with_template/view_additions.rb
147
+ - test/base_test.rb
148
+ - test/helper.rb
149
+ - with_template.gemspec
150
+ homepage: http://github.com/hunterae/with_template
151
+ licenses:
152
+ - MIT
153
+ post_install_message:
154
+ rdoc_options: []
155
+ require_paths:
156
+ - lib
157
+ required_ruby_version: !ruby/object:Gem::Requirement
158
+ none: false
159
+ requirements:
160
+ - - ! '>='
161
+ - !ruby/object:Gem::Version
162
+ version: '0'
163
+ segments:
164
+ - 0
165
+ hash: 1131662760189326774
166
+ required_rubygems_version: !ruby/object:Gem::Requirement
167
+ none: false
168
+ requirements:
169
+ - - ! '>='
170
+ - !ruby/object:Gem::Version
171
+ version: '0'
172
+ requirements: []
173
+ rubyforge_project:
174
+ rubygems_version: 1.8.25
175
+ signing_key:
176
+ specification_version: 3
177
+ summary: Render a template (partial) and easily override any of the components of
178
+ the template
179
+ test_files: []