humpyard_form 0.0.2 → 0.0.4

Sign up to get free protection for your applications and to get access to all the features.
data/Gemfile CHANGED
@@ -1,19 +1,19 @@
1
- source 'http://gemcutter.org'
1
+ source 'http://rubygems.org'
2
2
 
3
- gem "rails", '>= 3.0.0.beta3'
4
- gem 'haml', '>= 3.0.0.rc.4'
5
- gem 'compass', '>= 0.10.0.rc5'
3
+ gem "rails", '>=3.0.0'
4
+ gem 'haml', '>=3.0.0'
5
+ gem 'compass', '>=0.10.0'
6
+ gem 'globalize3', '>=0.0.7'
6
7
 
7
8
  group :test do
8
9
  gem 'test-unit'
9
- gem 'rspec-rails', '>= 2.0.0.beta.8'
10
- gem 'capybara', '>= 0.3.7'
11
- gem 'database_cleaner', '>= 0.5.2'
12
- gem 'cucumber-rails'
13
- gem 'cucumber', '0.7.2'
14
- gem 'pickle', '>= 0.2.4'
15
- gem 'capybara', '>= 0.3.5'
16
- gem 'factory_girl', '>= 1.2.3'
10
+ gem 'rspec-rails', '>=2.0.0.beta.22'
11
+ gem 'capybara', '>=0.3.7'
12
+ gem 'database_cleaner', '>=0.5.2'
13
+ gem 'cucumber', '>=0.8.5'
14
+ gem 'cucumber-rails', '>=0.3.2'
15
+ gem 'pickle', '>= 0.4.2'
16
+ gem 'factory_girl', '>= 1.3.2'
17
17
  gem 'markup_validity', '>= 1.1.0'
18
18
  gem 'sqlite3-ruby', :require => 'sqlite3'
19
19
  gem 'thin'
data/README.rdoc CHANGED
@@ -1,6 +1,6 @@
1
1
  = humpyard_form
2
2
 
3
- A HumpyardForm is doing fare control. So HumpyardForm is an authentication system for Rails 3 applications.
3
+ A HumpyardForm is a form builder spun off from humpyard.
4
4
 
5
5
  == Installation
6
6
 
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.0.2
1
+ 0.0.4
@@ -1 +1,2 @@
1
+ %input{:type => "hidden", :name => "#{form.namespace}[#{name}]", :value => 0}
1
2
  %input{:type => "checkbox", :name => "#{form.namespace}[#{name}]", :value => "#{options[:value] || 1}", :class => "boolean ui-widget-content ui-corner-all field-highlight", :checked => form.object.send(name) ? 'checked' : false, :required => options[:required] ? true : false}
@@ -3,7 +3,7 @@
3
3
  - style = form.object.send(name).styles[:thumb]
4
4
  = image_tag form.object.send(name).url(:thumb), :size => style.geometry.match(/(\d+x\d+)/)[1]
5
5
  - else
6
- = image_tag form.object.send(name).ur
6
+ = image_tag form.object.send(name).url
7
7
  [
8
8
  = form.object.send("#{name}_file_name")
9
9
  = form.object.send("#{name}_file_size")
@@ -1,6 +1,6 @@
1
1
  en:
2
2
  humpyard_form:
3
- start: 'Loading HumpyardForm {{version}}'
3
+ start: 'Loading HumpyardForm %{version}'
4
4
  buttons:
5
- create: "Create {{model}}"
6
- update: "Update {{model}}"
5
+ create: "Create %{model}"
6
+ update: "Update %{model}"
data/lib/humpyard_form.rb CHANGED
@@ -42,9 +42,11 @@ end
42
42
  require File.expand_path('../humpyard_form/config', __FILE__)
43
43
  require File.expand_path('../humpyard_form/engine', __FILE__)
44
44
  require File.expand_path('../humpyard_form/compass', __FILE__)
45
+ require File.expand_path('../humpyard_form/form_builder', __FILE__)
45
46
 
46
47
  require 'i18n'
47
48
  I18n.load_path += Dir.glob("#{File.dirname(__FILE__)}/../config/locales/*.yml")
49
+ I18n.backend.reload!
48
50
  puts "=> #{I18n.t 'humpyard_form.start', :version => HumpyardForm::VERSION}"
49
51
 
50
52
  require File.expand_path('../humpyard_form/action_controller/base', __FILE__)
@@ -1,7 +1,7 @@
1
1
  module HumpyardForm
2
2
  ####
3
3
  # HumpyardForm::FormHelper is a helper for forms
4
- class FormBuilder
4
+ class FormBuilder < ::ActionView::Helpers::FormBuilder
5
5
  attr_reader :object, :options, :html_options, :url, :form_type
6
6
 
7
7
  @@file_methods = [ :file?, :public_filename ]
@@ -25,7 +25,7 @@ module HumpyardForm
25
25
  @html_options[:method] = :post
26
26
  end
27
27
  end
28
-
28
+
29
29
  def namespace
30
30
  if @options[:as]
31
31
  @options[:as]
@@ -53,7 +53,7 @@ module HumpyardForm
53
53
 
54
54
  def translation_info(method) #:nodoc:
55
55
  if @object.respond_to?(:translated_attribute_names) and @object.translated_attribute_names.include?(method)
56
- tmp = @object.translation_class.new
56
+ tmp = @object.class.translation_class.new
57
57
  if tmp
58
58
  column = tmp.column_for_attribute(method) if tmp.respond_to?(:column_for_attribute)
59
59
  if column
@@ -222,6 +222,10 @@ module HumpyardForm
222
222
  raise "Cannot infer group association for #{method} grouped by #{group_by}, there were #{possible_associations.empty? ? 'no' : possible_associations.size} possible associations. Please specify using :group_association"
223
223
  end
224
224
 
225
+
226
+
227
+
228
+
225
229
  # Returns a hash to be used by radio and select inputs when a boolean field
226
230
  # is provided.
227
231
  #
metadata CHANGED
@@ -5,8 +5,8 @@ version: !ruby/object:Gem::Version
5
5
  segments:
6
6
  - 0
7
7
  - 0
8
- - 2
9
- version: 0.0.2
8
+ - 4
9
+ version: 0.0.4
10
10
  platform: ruby
11
11
  authors:
12
12
  - Sven G. Broenstrup
@@ -15,7 +15,7 @@ autorequire:
15
15
  bindir: bin
16
16
  cert_chain: []
17
17
 
18
- date: 2010-05-07 00:00:00 +02:00
18
+ date: 2010-09-18 00:00:00 +02:00
19
19
  default_executable:
20
20
  dependencies:
21
21
  - !ruby/object:Gem::Dependency
@@ -41,8 +41,7 @@ dependencies:
41
41
  - 3
42
42
  - 0
43
43
  - 0
44
- - beta3
45
- version: 3.0.0.beta3
44
+ version: 3.0.0
46
45
  requirement: *id002
47
46
  prerelease: false
48
47
  - !ruby/object:Gem::Dependency
@@ -56,9 +55,7 @@ dependencies:
56
55
  - 3
57
56
  - 0
58
57
  - 0
59
- - rc
60
- - 4
61
- version: 3.0.0.rc.4
58
+ version: 3.0.0
62
59
  requirement: *id003
63
60
  prerelease: false
64
61
  - !ruby/object:Gem::Dependency
@@ -72,37 +69,22 @@ dependencies:
72
69
  - 0
73
70
  - 10
74
71
  - 0
75
- - rc5
76
- version: 0.10.0.rc5
72
+ version: 0.10.0
77
73
  requirement: *id004
78
74
  prerelease: false
79
75
  - !ruby/object:Gem::Dependency
80
76
  type: :runtime
81
- name: cancan
77
+ name: globalize3
82
78
  version_requirements: &id005 !ruby/object:Gem::Requirement
83
- requirements:
84
- - - ">="
85
- - !ruby/object:Gem::Version
86
- segments:
87
- - 1
88
- - 1
89
- - 1
90
- version: 1.1.1
91
- requirement: *id005
92
- prerelease: false
93
- - !ruby/object:Gem::Dependency
94
- type: :runtime
95
- name: globalize2
96
- version_requirements: &id006 !ruby/object:Gem::Requirement
97
79
  requirements:
98
80
  - - ">="
99
81
  - !ruby/object:Gem::Version
100
82
  segments:
101
83
  - 0
102
- - 2
103
84
  - 0
104
- version: 0.2.0
105
- requirement: *id006
85
+ - 7
86
+ version: 0.0.7
87
+ requirement: *id005
106
88
  prerelease: false
107
89
  description: HumpyardForm is an form builder for Rails 3 applications. It is developed as part of the humpyard cms
108
90
  email: info@humpyard.org