tmpl 1.0.0.pre1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +7 -0
- data/.autotest +25 -0
- data/.gemtest +0 -0
- data/History.txt +6 -0
- data/Manifest.txt +12 -0
- data/README.txt +130 -0
- data/Rakefile +21 -0
- data/lib/tmpl.rb +5 -0
- data/lib/tmpl/action_view_extension.rb +53 -0
- data/lib/tmpl/engine.rb +4 -0
- data/lib/tmpl/railtie.rb +9 -0
- data/test/test_helper.rb +19 -0
- data/test/test_tmpl.rb +60 -0
- data/vendor/assets/javascripts/tmpl.js +132 -0
- metadata +148 -0
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA1:
|
3
|
+
metadata.gz: e400aa903cf908cf5c9e5d3dfcf7aecd6b227ef0
|
4
|
+
data.tar.gz: 97ce01944e438719735c4c4f394cb5515ef6c428
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: 7fa0c337b093afce2a9e09c24a8c8e57006f4be9a9c549ba02cfe66c35cddd858c65da1a7ecc6d441828b337557c3cab0b7505181be130b02c9b7a7f641d3345
|
7
|
+
data.tar.gz: 7b7224201984273e89618911763748bca20eddbd4c65f06182d5f68a987e3e11142ba7dad4ebd172463d7794f8c2c269d7b40aa2e424b65ee75739207733b70c
|
data/.autotest
ADDED
@@ -0,0 +1,25 @@
|
|
1
|
+
# -*- ruby -*-
|
2
|
+
|
3
|
+
require "autotest/restart"
|
4
|
+
|
5
|
+
# Autotest.add_hook :initialize do |at|
|
6
|
+
# at.testlib = "minitest/unit"
|
7
|
+
#
|
8
|
+
# at.extra_files << "../some/external/dependency.rb"
|
9
|
+
#
|
10
|
+
# at.libs << ":../some/external"
|
11
|
+
#
|
12
|
+
# at.add_exception "vendor"
|
13
|
+
#
|
14
|
+
# at.add_mapping(/dependency.rb/) do |f, _|
|
15
|
+
# at.files_matching(/test_.*rb$/)
|
16
|
+
# end
|
17
|
+
#
|
18
|
+
# %w(TestA TestB).each do |klass|
|
19
|
+
# at.extra_class_map[klass] = "test/test_misc.rb"
|
20
|
+
# end
|
21
|
+
# end
|
22
|
+
|
23
|
+
# Autotest.add_hook :run_command do |at|
|
24
|
+
# system "rake build"
|
25
|
+
# end
|
data/.gemtest
ADDED
File without changes
|
data/History.txt
ADDED
data/Manifest.txt
ADDED
data/README.txt
ADDED
@@ -0,0 +1,130 @@
|
|
1
|
+
= tmpl
|
2
|
+
|
3
|
+
* https://github.com/nearapogee/tmpl
|
4
|
+
* https://github.com/nearapogee/tmpl-example-app
|
5
|
+
|
6
|
+
== DESCRIPTION:
|
7
|
+
|
8
|
+
An agnostic approach to handle dynamic forms in rails.
|
9
|
+
|
10
|
+
== FEATURES/PROBLEMS:
|
11
|
+
|
12
|
+
* Simple: Build a template, multiply that template.
|
13
|
+
* Minimal view duplication.
|
14
|
+
* Works with deeply nested forms.
|
15
|
+
* Built minimal and light.
|
16
|
+
* Low coupling.
|
17
|
+
* No magic.
|
18
|
+
|
19
|
+
== SYNOPSIS:
|
20
|
+
|
21
|
+
(abbreviated deeply nested example)
|
22
|
+
|
23
|
+
# app/views/book/_form.html.erb
|
24
|
+
<%= form_for(@book) do |f| %>
|
25
|
+
<div class="field">
|
26
|
+
<%= f.label :name %><br>
|
27
|
+
<%= f.text_field :name %>
|
28
|
+
</div>
|
29
|
+
|
30
|
+
<% tmpl_build :chapter, key: 'chapters_attributes' do %>
|
31
|
+
<%= f.fields_for :chapters, Chapter.new do |chapter_fields| %>
|
32
|
+
<%= render 'chapter', chapter_fields: chapter_fields, index: 0 %>
|
33
|
+
<% end %>
|
34
|
+
<% end %>
|
35
|
+
|
36
|
+
<%= tmpl_add_link "Add Chapter", :chapter, container: '.tmpl-container-chapter' %>
|
37
|
+
|
38
|
+
<div class="actions">
|
39
|
+
<%= f.submit %>
|
40
|
+
</div>
|
41
|
+
<% end %>
|
42
|
+
|
43
|
+
<%= tmpl :chapter %>
|
44
|
+
<%= tmpl :heading %>
|
45
|
+
|
46
|
+
# app/views/book/_chapter.html.erb
|
47
|
+
<div class="tmpl">
|
48
|
+
<div class="field">
|
49
|
+
<%= chapter_fields.label :title %><br>
|
50
|
+
<%= chapter_fields.text_field :title %>
|
51
|
+
</div>
|
52
|
+
<%= chapter_fields.hidden_field :_destroy %>
|
53
|
+
|
54
|
+
<div class="tmpl-container-heading-<%= index %>">
|
55
|
+
<%= chapter_fields.fields_for :headings do |heading_fields| %>
|
56
|
+
<%= render 'heading', heading_fields: heading_fields %>
|
57
|
+
<% end %>
|
58
|
+
</div>
|
59
|
+
|
60
|
+
<% tmpl_build :heading, key: 'headings_attributes' do %>
|
61
|
+
<%= chapter_fields.fields_for :headings, Heading.new do |heading_fields| %>
|
62
|
+
<%= render 'heading', heading_fields: heading_fields %>
|
63
|
+
<% end %>
|
64
|
+
<% end %>
|
65
|
+
|
66
|
+
<%= tmpl_add_link 'Add Heading', :heading, container: ".tmpl-container-heading-#{index}" %>
|
67
|
+
<%= tmpl_remove_link 'Remove Chapter' %>
|
68
|
+
</div>
|
69
|
+
|
70
|
+
# app/views/book/_heading.html.erb
|
71
|
+
<div class="tmpl">
|
72
|
+
<div class="field">
|
73
|
+
<%= heading_fields.label :text %><br>
|
74
|
+
<%= heading_fields.text_field :text %>
|
75
|
+
</div>
|
76
|
+
<%= heading_fields.hidden_field :_destroy %>
|
77
|
+
|
78
|
+
<%= tmpl_remove_link 'Remove Heading' %>
|
79
|
+
</div>
|
80
|
+
|
81
|
+
|
82
|
+
== REQUIREMENTS:
|
83
|
+
|
84
|
+
* rails
|
85
|
+
* jquery-rails
|
86
|
+
|
87
|
+
== INSTALL:
|
88
|
+
|
89
|
+
* Add to Gemfile:
|
90
|
+
gem 'tmpl'
|
91
|
+
|
92
|
+
* Run:
|
93
|
+
bundle
|
94
|
+
|
95
|
+
* Add to application.js manifest:
|
96
|
+
//= require tmpl
|
97
|
+
|
98
|
+
== DEVELOPERS:
|
99
|
+
|
100
|
+
After checking out the source, run:
|
101
|
+
|
102
|
+
$ rake newb
|
103
|
+
|
104
|
+
This task will install any missing dependencies, run the tests/specs,
|
105
|
+
and generate the RDoc.
|
106
|
+
|
107
|
+
== LICENSE:
|
108
|
+
|
109
|
+
(The MIT License)
|
110
|
+
|
111
|
+
Copyright (c) 2014 Matthew C. Smith
|
112
|
+
|
113
|
+
Permission is hereby granted, free of charge, to any person obtaining
|
114
|
+
a copy of this software and associated documentation files (the
|
115
|
+
'Software'), to deal in the Software without restriction, including
|
116
|
+
without limitation the rights to use, copy, modify, merge, publish,
|
117
|
+
distribute, sublicense, and/or sell copies of the Software, and to
|
118
|
+
permit persons to whom the Software is furnished to do so, subject to
|
119
|
+
the following conditions:
|
120
|
+
|
121
|
+
The above copyright notice and this permission notice shall be
|
122
|
+
included in all copies or substantial portions of the Software.
|
123
|
+
|
124
|
+
THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND,
|
125
|
+
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
126
|
+
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
|
127
|
+
IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
|
128
|
+
CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
|
129
|
+
TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
|
130
|
+
SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
data/Rakefile
ADDED
@@ -0,0 +1,21 @@
|
|
1
|
+
# -*- ruby -*-
|
2
|
+
|
3
|
+
require "rubygems"
|
4
|
+
require "hoe"
|
5
|
+
|
6
|
+
Hoe.plugin :minitest
|
7
|
+
Hoe.plugin :git
|
8
|
+
Hoe.plugin :isolate
|
9
|
+
|
10
|
+
Hoe.spec "tmpl" do
|
11
|
+
developer("Matt Smith", "matt@nearapogee.com")
|
12
|
+
|
13
|
+
dependency('rails', '> 1.0.0')
|
14
|
+
dependency('hoe-git', '~> 1.6.0', :dev)
|
15
|
+
dependency('isolate', '~> 3.2.4', :dev)
|
16
|
+
dependency('minitest', '~> 4.7.5', :dev)
|
17
|
+
|
18
|
+
license "MIT"
|
19
|
+
end
|
20
|
+
|
21
|
+
# vim: syntax=ruby
|
data/lib/tmpl.rb
ADDED
@@ -0,0 +1,53 @@
|
|
1
|
+
module Tmpl
|
2
|
+
module ActionViewExtension
|
3
|
+
|
4
|
+
# Add key option for deeply nested models.
|
5
|
+
#
|
6
|
+
def tmpl_build(tmpl, options={}, &block)
|
7
|
+
return if content_for?(:"#{tmpl}_tmpl").present?
|
8
|
+
if options.has_key? :key
|
9
|
+
options.merge!(:"data-tmpl-key" => options.delete(:key))
|
10
|
+
end
|
11
|
+
options.merge!(id: "#{tmpl}_tmpl", style: "display: none;")
|
12
|
+
content_for :"#{tmpl}_tmpl" do
|
13
|
+
content_tag(:div, options) { block.call }
|
14
|
+
end
|
15
|
+
end
|
16
|
+
|
17
|
+
def tmpl(tmpl)
|
18
|
+
content_for :"#{tmpl}_tmpl"
|
19
|
+
end
|
20
|
+
|
21
|
+
# Add container option if you want the add link outside of the template.
|
22
|
+
#
|
23
|
+
def tmpl_add_link(*args)
|
24
|
+
options = args.extract_options!
|
25
|
+
body, tmpl = args[-2], args[-1]
|
26
|
+
if options.has_key? :container
|
27
|
+
options.merge!(:"data-tmpl-container" => options.delete(:container))
|
28
|
+
end
|
29
|
+
options[:class] = options[:class].to_s.split(' ').tap { |classes|
|
30
|
+
classes << 'tmpl-add'
|
31
|
+
}.join(' ')
|
32
|
+
options.merge!(:"data-tmpl" => tmpl)
|
33
|
+
if block_given?
|
34
|
+
link_to("javascript:void(0)", options) { yield }
|
35
|
+
else
|
36
|
+
link_to( body, "javascript:void(0)", options)
|
37
|
+
end
|
38
|
+
end
|
39
|
+
|
40
|
+
def tmpl_remove_link(*args)
|
41
|
+
options = args.extract_options!
|
42
|
+
body = args[-1]
|
43
|
+
options[:class] = options[:class].to_s.split(' ').tap { |classes|
|
44
|
+
classes << 'tmpl-remove'
|
45
|
+
}.join(' ')
|
46
|
+
if block_given?
|
47
|
+
link_to("javascript:void(0)", options) { yield }
|
48
|
+
else
|
49
|
+
link_to(body, "javascript:void(0)", options)
|
50
|
+
end
|
51
|
+
end
|
52
|
+
end
|
53
|
+
end
|
data/lib/tmpl/engine.rb
ADDED
data/lib/tmpl/railtie.rb
ADDED
data/test/test_helper.rb
ADDED
@@ -0,0 +1,19 @@
|
|
1
|
+
require "minitest/autorun"
|
2
|
+
require "rails"
|
3
|
+
require "action_view"
|
4
|
+
require "tmpl"
|
5
|
+
|
6
|
+
class Tmpl::Application < Rails::Application
|
7
|
+
config.secret_key_base = "0000"
|
8
|
+
end
|
9
|
+
|
10
|
+
ActionView::TestCase::TestController.instance_eval do
|
11
|
+
helper Rails.application.routes.url_helpers
|
12
|
+
end
|
13
|
+
|
14
|
+
ActionView::TestCase::TestController.class_eval do
|
15
|
+
def _routes
|
16
|
+
Rails.application.routes
|
17
|
+
end
|
18
|
+
end
|
19
|
+
|
data/test/test_tmpl.rb
ADDED
@@ -0,0 +1,60 @@
|
|
1
|
+
require "test_helper"
|
2
|
+
|
3
|
+
class TestTmpl < ActionView::TestCase
|
4
|
+
include Tmpl::ActionViewExtension
|
5
|
+
|
6
|
+
def setup
|
7
|
+
@view_flow = ActionView::OutputFlow.new
|
8
|
+
end
|
9
|
+
|
10
|
+
def test_tmpl_add_link
|
11
|
+
link = tmpl_add_link("Add", :chapter)
|
12
|
+
assert_select HTML::Document.new(link.to_s).root,
|
13
|
+
'a[class=tmpl-add][data-tmpl=chapter][href="javascript:void(0)"]',
|
14
|
+
'Add'
|
15
|
+
end
|
16
|
+
|
17
|
+
def test_tmpl_add_link_with_container
|
18
|
+
link = tmpl_add_link("Add", :chapter, container: '.tmpl-ctn')
|
19
|
+
assert_select HTML::Document.new(link.to_s).root,
|
20
|
+
'a[class="tmpl-add"][data-tmpl-container=".tmpl-ctn"]'
|
21
|
+
end
|
22
|
+
|
23
|
+
def test_tmpl_add_link_with_class
|
24
|
+
link = tmpl_add_link("Add", :chapter, class: 'my-cls')
|
25
|
+
assert_select HTML::Document.new(link.to_s).root,
|
26
|
+
'a[class="my-cls tmpl-add"]'
|
27
|
+
end
|
28
|
+
|
29
|
+
def test_tmpl_remove_link
|
30
|
+
link = tmpl_remove_link("Remove")
|
31
|
+
assert_select HTML::Document.new(link.to_s).root,
|
32
|
+
'a[class=tmpl-remove][href="javascript:void(0)"]',
|
33
|
+
'Remove'
|
34
|
+
end
|
35
|
+
|
36
|
+
def test_tmpl_remove_link_with_class
|
37
|
+
link = tmpl_remove_link("Remove", class: 'my-cls')
|
38
|
+
assert_select HTML::Document.new(link.to_s).root,
|
39
|
+
'a[class="my-cls tmpl-remove"]'
|
40
|
+
end
|
41
|
+
|
42
|
+
def test_tmpl_build
|
43
|
+
tmpl_build(:chapter) do
|
44
|
+
content_tag(:span, 'Template Content')
|
45
|
+
end
|
46
|
+
template = tmpl(:chapter)
|
47
|
+
assert_select HTML::Document.new(template.to_s).root,
|
48
|
+
'div[id=chapter_tmpl][style="display: none;"]' do
|
49
|
+
assert_select 'span', 'Template Content'
|
50
|
+
end
|
51
|
+
end
|
52
|
+
|
53
|
+
def test_tmpl_build_with_key
|
54
|
+
tmpl_build(:chapter, key: 'my-key') {}
|
55
|
+
template = tmpl(:chapter)
|
56
|
+
assert_select HTML::Document.new(template.to_s).root,
|
57
|
+
'div[id=chapter_tmpl][data-tmpl-key=my-key]'
|
58
|
+
end
|
59
|
+
|
60
|
+
end
|
@@ -0,0 +1,132 @@
|
|
1
|
+
$(document).ready(function() {
|
2
|
+
|
3
|
+
function TmplContainerNotDefinedError() {
|
4
|
+
this.name = "TmplContainerNotDefined Error";
|
5
|
+
this.message = "Tmpl could not locate a container.";
|
6
|
+
}
|
7
|
+
TmplContainerNotDefinedError.prototype = new Error();
|
8
|
+
TmplContainerNotDefinedError.prototype.constructor = TmplContainerNotDefinedError;
|
9
|
+
|
10
|
+
function TmplTmplNotFoundError() {
|
11
|
+
this.name = "TmplTmplNotFound Error";
|
12
|
+
this.message = "Tmpl could not find a .tmpl element.";
|
13
|
+
}
|
14
|
+
TmplTmplNotFoundError.prototype = new Error();
|
15
|
+
TmplTmplNotFoundError.prototype.constructor = TmplTmplNotFoundError;
|
16
|
+
|
17
|
+
function TmplKeyNotFoundError(key) {
|
18
|
+
this.name = "TmplContainerNotFound Error";
|
19
|
+
this.message = 'Tmpl could not find a key matching: \'' + key + '\'';
|
20
|
+
}
|
21
|
+
TmplKeyNotFoundError.prototype = new Error();
|
22
|
+
TmplKeyNotFoundError.prototype.constructor = TmplKeyNotFoundError;
|
23
|
+
|
24
|
+
$(document).on('click', 'form .tmpl-add', function() {
|
25
|
+
var $this = $(this); // link clicked
|
26
|
+
var time = new Date().getTime(); // current time
|
27
|
+
var template = $this.data('tmpl'); // template name
|
28
|
+
var $template = $('#' + template + '_tmpl'); // template
|
29
|
+
var $content = $($template.html().trim()); // parsed template content
|
30
|
+
|
31
|
+
// $ container (to add elements to)
|
32
|
+
if ($this.data('tmpl-container') !== undefined) {
|
33
|
+
var $container = $($this.data('tmpl-container') + ':visible'); // from container option
|
34
|
+
} else {
|
35
|
+
var $container = $($this.parents('.tmpl-container')[0]); // if link is within container
|
36
|
+
}
|
37
|
+
if ($container.length === 0) throw new TmplContainerNotDefinedError();
|
38
|
+
|
39
|
+
var key = '\\w+_attributes'; // default key - RegExp escaping
|
40
|
+
if ($template.data('tmpl-key') !== undefined) {
|
41
|
+
key = $template.data('tmpl-key'); // key from template option
|
42
|
+
}
|
43
|
+
var keyRegExp = new RegExp('.*\\[' + key + '\\]\\[\\d*\\]');
|
44
|
+
|
45
|
+
// $ tmpl
|
46
|
+
var _match = null;
|
47
|
+
var indexRegExp = new RegExp('\\[(\\w+)\\]\\[(\\d+)\\]', 'g');
|
48
|
+
var stemIndexes = {};
|
49
|
+
var indexes = {};
|
50
|
+
var $tmpl = $($container.parents('.tmpl')[0]).data('index', true);
|
51
|
+
var $templateTmpl = $template.find('.tmpl:first');
|
52
|
+
if ($tmpl.length === 0) {
|
53
|
+
$tmpl = $templateTmpl;
|
54
|
+
$tmpl.removeData('index');
|
55
|
+
}
|
56
|
+
if ($tmpl.length === 0) throw new TmplTmplNotFoundError();
|
57
|
+
|
58
|
+
var $context = $($tmpl.find('input,select,textarea')[0]); // context element
|
59
|
+
var context = $context.prop('name'); // context element name
|
60
|
+
if ($tmpl.data('index')) {
|
61
|
+
_match = null;
|
62
|
+
while((_match = indexRegExp.exec(context)) !== null) {
|
63
|
+
indexes[_match[1]] = _match;
|
64
|
+
}
|
65
|
+
}
|
66
|
+
|
67
|
+
var $templateContext = $($templateTmpl.find('input,select,textarea')[0]); // template context element
|
68
|
+
var templateContext = $templateContext.prop('name'); // template context element name
|
69
|
+
var keyMatch = templateContext.match(keyRegExp); // match of key with index
|
70
|
+
if (keyMatch === null) throw new TmplKeyNotFoundError(key);
|
71
|
+
var stem = keyMatch[0];
|
72
|
+
|
73
|
+
// find all stem indexes
|
74
|
+
_match = null;
|
75
|
+
while((_match = indexRegExp.exec(stem)) !== null) {
|
76
|
+
stemIndexes[_match[1]] = _match;
|
77
|
+
}
|
78
|
+
|
79
|
+
// replace all indexes with either value from indexes obj or time.
|
80
|
+
for (var _key in stemIndexes) {
|
81
|
+
var stemMatch = stemIndexes[_key];
|
82
|
+
var indexMatch = indexes[_key];
|
83
|
+
var index = (indexMatch) ? indexMatch[2] : time;
|
84
|
+
var match = '[' + stemMatch[1] + '][' + index + ']';
|
85
|
+
stem = stem.replace(stemMatch[0], match);
|
86
|
+
}
|
87
|
+
|
88
|
+
var $inputs = $content.find('input[name],textarea[name],select[name]');
|
89
|
+
$inputs.each(function(idx, element){
|
90
|
+
var $element = $(element);
|
91
|
+
var name = $element.prop('name');
|
92
|
+
var tail = name.match(new RegExp('\\[' + key + '\\]\\[\\d+\\](.*)'))[1];
|
93
|
+
name = stem + tail;
|
94
|
+
var id = name.replace(/]/g, '').replace(/\[/g, '_');
|
95
|
+
$element.prop('name', name);
|
96
|
+
$element.prop('id', id);
|
97
|
+
// TODO also replace label for
|
98
|
+
});
|
99
|
+
|
100
|
+
$content.find('[class^=tmpl-container-]').each(function(idx, element){
|
101
|
+
var $element = $(element);
|
102
|
+
$.each($element.prop('class').split(' '), function(idx, cls) {
|
103
|
+
var match = cls.match(new RegExp('^tmpl-container-(.*)-\\d+$'));
|
104
|
+
if (match !== null) {
|
105
|
+
$element.removeClass(cls);
|
106
|
+
$element.addClass('tmpl-container-' + match[1] + '-' + time);
|
107
|
+
}
|
108
|
+
});
|
109
|
+
});
|
110
|
+
$content.find('a.tmpl-add[data-tmpl-container^=".tmpl-container-"]').each(function(idx, element){
|
111
|
+
var $element = $(element);
|
112
|
+
dataContainer = $element.data('tmpl-container');
|
113
|
+
var match = dataContainer.match(new RegExp('^\.tmpl-container-(.*)-\\d+$'));
|
114
|
+
if (match !== null) {
|
115
|
+
var newDataContainer = '.tmpl-container-' + match[1] + '-' + time;
|
116
|
+
$element.attr('data-tmpl-container', newDataContainer);
|
117
|
+
$element.data('tmpl-container', newDataContainer);
|
118
|
+
}
|
119
|
+
});
|
120
|
+
|
121
|
+
$container.append($content);
|
122
|
+
});
|
123
|
+
|
124
|
+
$(document).on('click', 'form .tmpl-remove', function() {
|
125
|
+
var $this = $(this);
|
126
|
+
var $tmpl = $($this.parents('.tmpl')[0]);
|
127
|
+
var $destroy = $($tmpl.find('input[type=hidden][name$="[_destroy]"]')[0]);
|
128
|
+
if ($destroy.length > 0) $destroy.val('1').change();
|
129
|
+
$tmpl.hide();
|
130
|
+
});
|
131
|
+
|
132
|
+
});
|
metadata
ADDED
@@ -0,0 +1,148 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: tmpl
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 1.0.0.pre1
|
5
|
+
platform: ruby
|
6
|
+
authors:
|
7
|
+
- Matt Smith
|
8
|
+
autorequire:
|
9
|
+
bindir: bin
|
10
|
+
cert_chain: []
|
11
|
+
date: 2014-02-17 00:00:00.000000000 Z
|
12
|
+
dependencies:
|
13
|
+
- !ruby/object:Gem::Dependency
|
14
|
+
name: rails
|
15
|
+
requirement: !ruby/object:Gem::Requirement
|
16
|
+
requirements:
|
17
|
+
- - ">"
|
18
|
+
- !ruby/object:Gem::Version
|
19
|
+
version: 1.0.0
|
20
|
+
type: :runtime
|
21
|
+
prerelease: false
|
22
|
+
version_requirements: !ruby/object:Gem::Requirement
|
23
|
+
requirements:
|
24
|
+
- - ">"
|
25
|
+
- !ruby/object:Gem::Version
|
26
|
+
version: 1.0.0
|
27
|
+
- !ruby/object:Gem::Dependency
|
28
|
+
name: minitest
|
29
|
+
requirement: !ruby/object:Gem::Requirement
|
30
|
+
requirements:
|
31
|
+
- - "~>"
|
32
|
+
- !ruby/object:Gem::Version
|
33
|
+
version: '5.2'
|
34
|
+
type: :development
|
35
|
+
prerelease: false
|
36
|
+
version_requirements: !ruby/object:Gem::Requirement
|
37
|
+
requirements:
|
38
|
+
- - "~>"
|
39
|
+
- !ruby/object:Gem::Version
|
40
|
+
version: '5.2'
|
41
|
+
- !ruby/object:Gem::Dependency
|
42
|
+
name: rdoc
|
43
|
+
requirement: !ruby/object:Gem::Requirement
|
44
|
+
requirements:
|
45
|
+
- - "~>"
|
46
|
+
- !ruby/object:Gem::Version
|
47
|
+
version: '4.0'
|
48
|
+
type: :development
|
49
|
+
prerelease: false
|
50
|
+
version_requirements: !ruby/object:Gem::Requirement
|
51
|
+
requirements:
|
52
|
+
- - "~>"
|
53
|
+
- !ruby/object:Gem::Version
|
54
|
+
version: '4.0'
|
55
|
+
- !ruby/object:Gem::Dependency
|
56
|
+
name: hoe-git
|
57
|
+
requirement: !ruby/object:Gem::Requirement
|
58
|
+
requirements:
|
59
|
+
- - "~>"
|
60
|
+
- !ruby/object:Gem::Version
|
61
|
+
version: 1.6.0
|
62
|
+
type: :development
|
63
|
+
prerelease: false
|
64
|
+
version_requirements: !ruby/object:Gem::Requirement
|
65
|
+
requirements:
|
66
|
+
- - "~>"
|
67
|
+
- !ruby/object:Gem::Version
|
68
|
+
version: 1.6.0
|
69
|
+
- !ruby/object:Gem::Dependency
|
70
|
+
name: isolate
|
71
|
+
requirement: !ruby/object:Gem::Requirement
|
72
|
+
requirements:
|
73
|
+
- - "~>"
|
74
|
+
- !ruby/object:Gem::Version
|
75
|
+
version: 3.2.4
|
76
|
+
type: :development
|
77
|
+
prerelease: false
|
78
|
+
version_requirements: !ruby/object:Gem::Requirement
|
79
|
+
requirements:
|
80
|
+
- - "~>"
|
81
|
+
- !ruby/object:Gem::Version
|
82
|
+
version: 3.2.4
|
83
|
+
- !ruby/object:Gem::Dependency
|
84
|
+
name: hoe
|
85
|
+
requirement: !ruby/object:Gem::Requirement
|
86
|
+
requirements:
|
87
|
+
- - "~>"
|
88
|
+
- !ruby/object:Gem::Version
|
89
|
+
version: '3.9'
|
90
|
+
type: :development
|
91
|
+
prerelease: false
|
92
|
+
version_requirements: !ruby/object:Gem::Requirement
|
93
|
+
requirements:
|
94
|
+
- - "~>"
|
95
|
+
- !ruby/object:Gem::Version
|
96
|
+
version: '3.9'
|
97
|
+
description: An agnostic approach to handle dynamic forms in rails.
|
98
|
+
email:
|
99
|
+
- matt@nearapogee.com
|
100
|
+
executables: []
|
101
|
+
extensions: []
|
102
|
+
extra_rdoc_files:
|
103
|
+
- History.txt
|
104
|
+
- Manifest.txt
|
105
|
+
- README.txt
|
106
|
+
files:
|
107
|
+
- ".autotest"
|
108
|
+
- ".gemtest"
|
109
|
+
- History.txt
|
110
|
+
- Manifest.txt
|
111
|
+
- README.txt
|
112
|
+
- Rakefile
|
113
|
+
- lib/tmpl.rb
|
114
|
+
- lib/tmpl/action_view_extension.rb
|
115
|
+
- lib/tmpl/engine.rb
|
116
|
+
- lib/tmpl/railtie.rb
|
117
|
+
- test/test_helper.rb
|
118
|
+
- test/test_tmpl.rb
|
119
|
+
- vendor/assets/javascripts/tmpl.js
|
120
|
+
homepage: https://github.com/nearapogee/tmpl
|
121
|
+
licenses:
|
122
|
+
- MIT
|
123
|
+
metadata: {}
|
124
|
+
post_install_message:
|
125
|
+
rdoc_options:
|
126
|
+
- "--main"
|
127
|
+
- README.txt
|
128
|
+
require_paths:
|
129
|
+
- lib
|
130
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
131
|
+
requirements:
|
132
|
+
- - ">="
|
133
|
+
- !ruby/object:Gem::Version
|
134
|
+
version: '0'
|
135
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
136
|
+
requirements:
|
137
|
+
- - ">"
|
138
|
+
- !ruby/object:Gem::Version
|
139
|
+
version: 1.3.1
|
140
|
+
requirements: []
|
141
|
+
rubyforge_project: tmpl
|
142
|
+
rubygems_version: 2.2.0
|
143
|
+
signing_key:
|
144
|
+
specification_version: 4
|
145
|
+
summary: An agnostic approach to handle dynamic forms in rails.
|
146
|
+
test_files:
|
147
|
+
- test/test_helper.rb
|
148
|
+
- test/test_tmpl.rb
|