Commit bdfbacf0cd407fc97a1f9d3d987dde67d0c60ea9

Authored by Dan Croak
1 parent 2c6fa43d

removing semi formal

config/environments/test.rb
... ... @@ -30,7 +30,7 @@ config.gem 'jferris-mocha',
30 30 config.gem 'thoughtbot-factory_girl',
31 31 :lib => 'factory_girl',
32 32 :source => 'http://gems.github.com',
33   - :version => '>= 1.2.0'
  33 + :version => '>= 1.2.1'
34 34 config.gem 'thoughtbot-shoulda',
35 35 :lib => 'shoulda',
36 36 :source => 'http://gems.github.com',
... ...
vendor/plugins/semi_formal/MIT-LICENSE
... ... @@ -1,20 +0,0 @@
1   -Copyright (c) 2009 [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.
vendor/plugins/semi_formal/README.markdown
... ... @@ -1,57 +0,0 @@
1   -SemiFormal
2   -==========
3   -
4   -A FormBuilder meant to play well with [Blitz](http://github.com/dancroak/blitz) and [Evergreen](http://github.com/dancroak/evergreen).
5   -
6   -Examples
7   ---------
8   -
9   -I had been writing this:
10   -
11   - <% form_for :session, :url => session_path do |form| %>
12   - <fieldset class="inputs">
13   - <div class="string">
14   - <%= form.label :email %>
15   - <%= form.text_field :email %>
16   - </div>
17   - <div class="password">
18   - <%= form.label :password %>
19   - <%= form.password_field :password %>
20   - </div>
21   - <div class="boolean">
22   - <%= form.check_box :remember_me %>
23   - <%= form.label :remember_me %>
24   - </div>
25   - </fieldset>
26   - <fieldset class="buttons">
27   - <%= form.submit "Sign in", :disable_with => "Please wait..." %>
28   - </fieldset>
29   - <% end %>
30   -
31   -With SemiFormal, I write this:
32   -
33   - <% form_for :session, :url => session_path do |form| %>
34   - <fieldset class="inputs">
35   - <%= form.string :email %>
36   - <%= form.password :password %>
37   - <%= form.boolean :remember_me %>
38   - </fieldset>
39   - <fieldset class="buttons">
40   - <%= form.submit "Sign in", :disable_with => "Please wait..." %>
41   - </fieldset>
42   - <% end %>
43   -
44   -Hey, slightly better.
45   -
46   -Also available:
47   -
48   - form.text
49   - form.numeric
50   -
51   -numeric is also aliased as integer, decimal, and float to feel migration-like.
52   -
53   -Installation
54   -------------
55   -
56   - script/plugin install git://github.com/dancroak/semi_formal.git
57   -
vendor/plugins/semi_formal/Rakefile
... ... @@ -1,23 +0,0 @@
1   -require 'rake'
2   -require 'rake/testtask'
3   -require 'rake/rdoctask'
4   -
5   -desc 'Default: run unit tests.'
6   -task :default => :test
7   -
8   -desc 'Test the semi_formal plugin.'
9   -Rake::TestTask.new(:test) do |t|
10   - t.libs << 'lib'
11   - t.libs << 'test'
12   - t.pattern = 'test/**/*_test.rb'
13   - t.verbose = true
14   -end
15   -
16   -desc 'Generate documentation for the semi_formal plugin.'
17   -Rake::RDocTask.new(:rdoc) do |rdoc|
18   - rdoc.rdoc_dir = 'rdoc'
19   - rdoc.title = 'SemiFormal'
20   - rdoc.options << '--line-numbers' << '--inline-source'
21   - rdoc.rdoc_files.include('README')
22   - rdoc.rdoc_files.include('lib/**/*.rb')
23   -end
vendor/plugins/semi_formal/init.rb
... ... @@ -1,2 +0,0 @@
1   -require File.join(File.dirname(__FILE__), 'lib', 'semi_formal')
2   -
vendor/plugins/semi_formal/install.rb
... ... @@ -1,2 +0,0 @@
1   -puts IO.read(File.join(File.dirname(__FILE__), 'README.textile'))
2   -
vendor/plugins/semi_formal/lib/semi_formal.rb
... ... @@ -1,75 +0,0 @@
1   -class SemiFormal < ActionView::Helpers::FormBuilder
2   - def string(field, *args)
3   - options = args.extract_options!
4   - "<div class=\"string\">" +
5   - label(field, options[:label] || {}) +
6   - text_field(field, options[:text_field] || {}) +
7   - "</div>"
8   - end
9   -
10   - def password(field, *args)
11   - options = args.extract_options!
12   - "<div class=\"password\">" +
13   - label(field, options[:label] || {}) +
14   - password_field(field, options[:password_field] || {}) +
15   - "</div>"
16   - end
17   -
18   - def boolean(field, *args)
19   - options = args.extract_options!
20   - "<div class=\"boolean\">" +
21   - check_box(field, options[:check_box] || {}) +
22   - label(field, options[:label] || {}) +
23   - "</div>"
24   - end
25   -
26   - def numeric(field, *args)
27   - options = args.extract_options!
28   - "<div class=\"numeric\">" +
29   - label(field, options[:label] || {}) +
30   - text_field(field, options[:text_field] || {}) +
31   - "</div>"
32   - end
33   - alias :integer :numeric
34   - alias :float :numeric
35   - alias :decimal :numeric
36   -
37   - def text(field, *args)
38   - options = args.extract_options!
39   - "<div class=\"text\">" +
40   - label(field, options[:label] || {}) +
41   - text_area(field, options[:text_area] || {}) +
42   - "</div>"
43   - end
44   -
45   - # form.belongs_to :user
46   - #
47   - # returns a drop-down with value of User#id, text of User#to_s
48   - # includes blank
49   - #
50   - def belongs_to(association, *args)
51   - options = args.extract_options!
52   -
53   - reflection = @object.class.reflect_on_association(association)
54   - collection = reflection.klass.all.collect {|each| [each.to_s, each.id] }
55   -
56   - options[:select] ||= {}
57   - options[:select][:include_blank] = true
58   -
59   - field = "#{association}_id"
60   -
61   - "<div class=\"belongs_to\">" +
62   - label(field, options[:label] || {}) +
63   - select(field, collection, options[:select] || {}) +
64   - "<div>"
65   - end
66   -
67   - # has_many?
68   - # if [:has_many, :has_and_belongs_to_many].include?(reflection.macro)
69   - # html_options[:multiple] ||= true
70   - # html_options[:size] ||= 5
71   - # end
72   -end
73   -
74   -ActionView::Base.default_form_builder = SemiFormal
75   -
vendor/plugins/semi_formal/tasks/semi_formal_tasks.rake
... ... @@ -1,4 +0,0 @@
1   -# desc "Explaining what the task does"
2   -# task :semi_formal do
3   -# # Task goes here
4   -# end
vendor/plugins/semi_formal/test/semi_formal_test.rb
... ... @@ -1,8 +0,0 @@
1   -require 'test_helper'
2   -
3   -class SemiFormalTest < ActiveSupport::TestCase
4   - # Replace this with your real tests.
5   - test "the truth" do
6   - assert true
7   - end
8   -end
vendor/plugins/semi_formal/test/test_helper.rb
... ... @@ -1,3 +0,0 @@
1   -require 'rubygems'
2   -require 'active_support'
3   -require 'active_support/test_case'
4 0 \ No newline at end of file