form_factor 1.0.2 → 1.0.3
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.
- data/CHANGELOG +1 -0
- data/Rakefile +2 -1
- data/form_factor.gemspec +5 -5
- data/generators/form_factor/USAGE +8 -0
- data/generators/form_factor/form_factor_generator.rb +26 -0
- data.tar.gz.sig +4 -1
- metadata +16 -16
- metadata.gz.sig +0 -0
- /data/{lib/templates/erb/scaffold → generators/form_factor/templates}/_form.html.erb +0 -0
- /data/{lib/templates/erb/scaffold → generators/form_factor/templates}/edit.html.erb +0 -0
- /data/{lib/templates/erb/scaffold → generators/form_factor/templates}/index.html.erb +0 -0
- /data/{lib/templates/erb/scaffold → generators/form_factor/templates}/new.html.erb +0 -0
- /data/{lib/templates/erb/scaffold → generators/form_factor/templates}/show.html.erb +0 -0
data/CHANGELOG
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
0.0.1 First Version.
|
data/Rakefile
CHANGED
@@ -2,7 +2,7 @@ require 'rubygems'
|
|
2
2
|
require 'rake'
|
3
3
|
require 'echoe'
|
4
4
|
|
5
|
-
Echoe.new('form_factor', '1.0.
|
5
|
+
Echoe.new('form_factor', '1.0.3') do |g|
|
6
6
|
g.summary = "Abstract builder of form structure with pluggable templates"
|
7
7
|
g.description = <<-EOF
|
8
8
|
Form Factor is a miniature abstraction layer for view generation.
|
@@ -21,4 +21,5 @@ EOF
|
|
21
21
|
g.email = "jeffrey.j.schmitz@nospam.gmail.com"
|
22
22
|
g.ignore_pattern = ["tmp/*", "script/*"]
|
23
23
|
g.development_dependencies = []
|
24
|
+
g.require_paths = ["lib/form_factor", "app/helpers", "lib/generators"]
|
24
25
|
end
|
data/form_factor.gemspec
CHANGED
@@ -2,12 +2,12 @@
|
|
2
2
|
|
3
3
|
Gem::Specification.new do |s|
|
4
4
|
s.name = %q{form_factor}
|
5
|
-
s.version = "1.0.
|
5
|
+
s.version = "1.0.3"
|
6
6
|
|
7
7
|
s.required_rubygems_version = Gem::Requirement.new(">= 1.2") if s.respond_to? :required_rubygems_version=
|
8
8
|
s.authors = ["Jeff Schmitz @iamtheschmitzer"]
|
9
9
|
s.cert_chain = ["/export/home/jeff/.ssh/gem-public_cert.pem"]
|
10
|
-
s.date = %q{2010-09-
|
10
|
+
s.date = %q{2010-09-28}
|
11
11
|
s.description = %q{ Form Factor is a miniature abstraction layer for view generation.
|
12
12
|
Form Factor breaks the coupling between a view element and the structural
|
13
13
|
markup generated, in order to make the generation more flexible.
|
@@ -20,11 +20,11 @@ Gem::Specification.new do |s|
|
|
20
20
|
of controller code, giving your site a different look and feel.
|
21
21
|
}
|
22
22
|
s.email = %q{jeffrey.j.schmitz@nospam.gmail.com}
|
23
|
-
s.extra_rdoc_files = ["lib/form_factor/form_factor.rb", "lib/form_factor/scaffold_template.rb"
|
24
|
-
s.files = ["Rakefile", "app/helpers/form_factor_helper.rb", "
|
23
|
+
s.extra_rdoc_files = ["CHANGELOG", "lib/form_factor/form_factor.rb", "lib/form_factor/scaffold_template.rb"]
|
24
|
+
s.files = ["CHANGELOG", "Manifest", "Rakefile", "app/helpers/form_factor_helper.rb", "form_factor.gemspec", "generators/form_factor/USAGE", "generators/form_factor/form_factor_generator.rb", "generators/form_factor/templates/_form.html.erb", "generators/form_factor/templates/edit.html.erb", "generators/form_factor/templates/index.html.erb", "generators/form_factor/templates/new.html.erb", "generators/form_factor/templates/show.html.erb", "lib/form_factor/form_factor.rb", "lib/form_factor/scaffold_template.rb"]
|
25
25
|
s.homepage = %q{http://www.ociweb.com/products/formfactor}
|
26
26
|
s.rdoc_options = ["--line-numbers", "--inline-source", "--title", "Form_factor"]
|
27
|
-
s.require_paths = ["lib/form_factor", "app/helpers"]
|
27
|
+
s.require_paths = ["lib/form_factor", "app/helpers", "lib/generators"]
|
28
28
|
s.rubyforge_project = %q{form_factor}
|
29
29
|
s.rubygems_version = %q{1.3.7}
|
30
30
|
s.signing_key = %q{/export/home/jeff/.ssh/gem-private_key.pem}
|
@@ -0,0 +1,26 @@
|
|
1
|
+
require 'rails/generators/erb'
|
2
|
+
require 'rails/generators/resource_helpers'
|
3
|
+
|
4
|
+
class FormFactorGenerator < Erb::Generators::Base
|
5
|
+
include Rails::Generators::ResourceHelpers
|
6
|
+
source_root File.expand_path('../templates', __FILE__)
|
7
|
+
|
8
|
+
argument :attributes, :type => :array, :default => [], :banner => "field:type field:type"
|
9
|
+
|
10
|
+
def create_root_folder
|
11
|
+
empty_directory File.join("app/views", controller_file_path)
|
12
|
+
end
|
13
|
+
|
14
|
+
def copy_view_files
|
15
|
+
available_views.each do |view|
|
16
|
+
filename = filename_with_extensions(view)
|
17
|
+
template filename, File.join("app/views", controller_file_path, filename)
|
18
|
+
end
|
19
|
+
end
|
20
|
+
|
21
|
+
protected
|
22
|
+
|
23
|
+
def available_views
|
24
|
+
%w(index edit show new _form)
|
25
|
+
end
|
26
|
+
end
|
data.tar.gz.sig
CHANGED
@@ -1 +1,4 @@
|
|
1
|
-
|
1
|
+
+Nr��T�-B�,���A��\�F����
|
2
|
+
�]���4��4�4�Rv���ч��ۼ
|
3
|
+
�����dž-jn�%0��>�ѿ�\T�&)�g�q�zLӒI8c�<?}�N_�8̬�c�_�R7ڿ�ô�|S��nyj����J���eT"�"�e���p�_�!�qqq�dє�?�}պ�pj���
|
4
|
+
1��)k�p8�ү�l�H����j)W�����@k`Z����R,�a^�����K_�,��M�j��e
|
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: form_factor
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 17
|
5
5
|
prerelease: false
|
6
6
|
segments:
|
7
7
|
- 1
|
8
8
|
- 0
|
9
|
-
-
|
10
|
-
version: 1.0.
|
9
|
+
- 3
|
10
|
+
version: 1.0.3
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- Jeff Schmitz @iamtheschmitzer
|
@@ -36,7 +36,7 @@ cert_chain:
|
|
36
36
|
10tIJEmcBVwFuldQmoNCwpfCheLz8tPA
|
37
37
|
-----END CERTIFICATE-----
|
38
38
|
|
39
|
-
date: 2010-09-
|
39
|
+
date: 2010-09-28 00:00:00 -05:00
|
40
40
|
default_executable:
|
41
41
|
dependencies: []
|
42
42
|
|
@@ -47,25 +47,24 @@ executables: []
|
|
47
47
|
extensions: []
|
48
48
|
|
49
49
|
extra_rdoc_files:
|
50
|
+
- CHANGELOG
|
50
51
|
- lib/form_factor/form_factor.rb
|
51
52
|
- lib/form_factor/scaffold_template.rb
|
52
|
-
- lib/templates/erb/scaffold/_form.html.erb
|
53
|
-
- lib/templates/erb/scaffold/edit.html.erb
|
54
|
-
- lib/templates/erb/scaffold/index.html.erb
|
55
|
-
- lib/templates/erb/scaffold/new.html.erb
|
56
|
-
- lib/templates/erb/scaffold/show.html.erb
|
57
53
|
files:
|
54
|
+
- CHANGELOG
|
55
|
+
- Manifest
|
58
56
|
- Rakefile
|
59
57
|
- app/helpers/form_factor_helper.rb
|
58
|
+
- form_factor.gemspec
|
59
|
+
- generators/form_factor/USAGE
|
60
|
+
- generators/form_factor/form_factor_generator.rb
|
61
|
+
- generators/form_factor/templates/_form.html.erb
|
62
|
+
- generators/form_factor/templates/edit.html.erb
|
63
|
+
- generators/form_factor/templates/index.html.erb
|
64
|
+
- generators/form_factor/templates/new.html.erb
|
65
|
+
- generators/form_factor/templates/show.html.erb
|
60
66
|
- lib/form_factor/form_factor.rb
|
61
67
|
- lib/form_factor/scaffold_template.rb
|
62
|
-
- lib/templates/erb/scaffold/_form.html.erb
|
63
|
-
- lib/templates/erb/scaffold/edit.html.erb
|
64
|
-
- lib/templates/erb/scaffold/index.html.erb
|
65
|
-
- lib/templates/erb/scaffold/new.html.erb
|
66
|
-
- lib/templates/erb/scaffold/show.html.erb
|
67
|
-
- Manifest
|
68
|
-
- form_factor.gemspec
|
69
68
|
has_rdoc: true
|
70
69
|
homepage: http://www.ociweb.com/products/formfactor
|
71
70
|
licenses: []
|
@@ -79,6 +78,7 @@ rdoc_options:
|
|
79
78
|
require_paths:
|
80
79
|
- lib/form_factor
|
81
80
|
- app/helpers
|
81
|
+
- lib/generators
|
82
82
|
required_ruby_version: !ruby/object:Gem::Requirement
|
83
83
|
none: false
|
84
84
|
requirements:
|
metadata.gz.sig
CHANGED
Binary file
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|