noodall-form-builder 0.0.1
Sign up to get free protection for your applications and to get access to all the features.
- data/.gitignore +7 -0
- data/Gemfile +24 -0
- data/Gemfile.lock +202 -0
- data/MIT-LICENSE +20 -0
- data/README.rdoc +3 -0
- data/Rakefile +39 -0
- data/app/controllers/noodall/admin/fields_controller.rb +21 -0
- data/app/controllers/noodall/admin/form_responses_controller.rb +75 -0
- data/app/controllers/noodall/admin/forms_controller.rb +97 -0
- data/app/controllers/noodall/form_responses_controller.rb +39 -0
- data/app/helpers/admin/forms_helper.rb +2 -0
- data/app/helpers/forms_helper.rb +11 -0
- data/app/mailers/form_mailer.rb +21 -0
- data/app/models/contact_form.rb +16 -0
- data/app/models/noodall/check_box.rb +5 -0
- data/app/models/noodall/field.rb +25 -0
- data/app/models/noodall/form.rb +38 -0
- data/app/models/noodall/form_response.rb +88 -0
- data/app/models/noodall/radio.rb +4 -0
- data/app/models/noodall/select.rb +5 -0
- data/app/models/noodall/text_field.rb +12 -0
- data/app/views/admin/components/_contact_form.html.erb +11 -0
- data/app/views/components/_contact_form.html.erb +8 -0
- data/app/views/form_mailer/_form_response_fields.html.erb +3 -0
- data/app/views/form_mailer/form_response.html.erb +5 -0
- data/app/views/form_mailer/form_response_thankyou.html.erb +19 -0
- data/app/views/noodall/admin/fields/_check_box.html.erb +14 -0
- data/app/views/noodall/admin/fields/_radio.html.erb +14 -0
- data/app/views/noodall/admin/fields/_select.html.erb +14 -0
- data/app/views/noodall/admin/fields/_text_field.html.erb +26 -0
- data/app/views/noodall/admin/form_responses/index.csv.csvbuilder +12 -0
- data/app/views/noodall/admin/form_responses/index.html.erb +41 -0
- data/app/views/noodall/admin/forms/_field_select.html.erb +11 -0
- data/app/views/noodall/admin/forms/index.html.erb +41 -0
- data/app/views/noodall/admin/forms/show.html.erb +138 -0
- data/app/views/noodall/form_responses/_form.html.erb +45 -0
- data/app/views/noodall/form_responses/create.html.erb +5 -0
- data/app/views/noodall/form_responses/new.html.erb +5 -0
- data/app/views/noodall/forms/edit.html.erb +12 -0
- data/app/views/noodall/forms/index.html.erb +18 -0
- data/app/views/noodall/forms/new.html.erb +11 -0
- data/app/views/noodall/forms/show.html.erb +3 -0
- data/cucumber.yml +8 -0
- data/features/form_builder.feature +54 -0
- data/features/form_module.feature +40 -0
- data/features/step_definitions/cms_node_steps.rb +126 -0
- data/features/step_definitions/component_steps.rb +138 -0
- data/features/step_definitions/email_steps.rb +182 -0
- data/features/step_definitions/form_builder_steps.rb +247 -0
- data/features/step_definitions/sign_in_steps.rb +48 -0
- data/features/step_definitions/web_steps.rb +219 -0
- data/features/support/defensio_mock.rb +6 -0
- data/features/support/env.rb +52 -0
- data/features/support/paths.rb +60 -0
- data/lib/noodall/form_builder/engine.rb +13 -0
- data/lib/noodall/form_builder/routes.rb +35 -0
- data/lib/noodall/form_builder/version.rb +5 -0
- data/lib/noodall-form-builder.rb +1 -0
- data/noodall-form-builder.gemspec +23 -0
- data/public/images/admin/spam.png +0 -0
- data/public/javascripts/admin/formbuilder.js +52 -0
- data/spec/dummy/Rakefile +7 -0
- data/spec/dummy/app/controllers/application_controller.rb +22 -0
- data/spec/dummy/app/helpers/application_helper.rb +8 -0
- data/spec/dummy/app/models/page_a.rb +8 -0
- data/spec/dummy/app/models/user.rb +14 -0
- data/spec/dummy/app/views/admin/nodes/_page_a.html.erb +47 -0
- data/spec/dummy/app/views/layouts/application.html.erb +14 -0
- data/spec/dummy/app/views/nodes/page_a.html.erb +14 -0
- data/spec/dummy/config/application.rb +46 -0
- data/spec/dummy/config/boot.rb +10 -0
- data/spec/dummy/config/database.yml +12 -0
- data/spec/dummy/config/defensio.yml +16 -0
- data/spec/dummy/config/environment.rb +5 -0
- data/spec/dummy/config/environments/development.rb +26 -0
- data/spec/dummy/config/environments/production.rb +49 -0
- data/spec/dummy/config/environments/test.rb +35 -0
- data/spec/dummy/config/initializers/backtrace_silencers.rb +7 -0
- data/spec/dummy/config/initializers/dragonfly.rb +1 -0
- data/spec/dummy/config/initializers/inflections.rb +10 -0
- data/spec/dummy/config/initializers/mime_types.rb +5 -0
- data/spec/dummy/config/initializers/mongo_mapper.rb +13 -0
- data/spec/dummy/config/initializers/noodall.rb +5 -0
- data/spec/dummy/config/initializers/secret_token.rb +7 -0
- data/spec/dummy/config/initializers/session_store.rb +8 -0
- data/spec/dummy/config/locales/en.yml +5 -0
- data/spec/dummy/config/routes.rb +4 -0
- data/spec/dummy/config.ru +4 -0
- data/spec/dummy/public/404.html +26 -0
- data/spec/dummy/public/422.html +26 -0
- data/spec/dummy/public/500.html +26 -0
- data/spec/dummy/public/favicon.ico +0 -0
- data/spec/dummy/public/javascripts/application.js +2 -0
- data/spec/dummy/public/stylesheets/.gitkeep +0 -0
- data/spec/dummy/script/rails +6 -0
- data/spec/factories/asset.rb +6 -0
- data/spec/factories/contact_form.rb +3 -0
- data/spec/factories/field.rb +15 -0
- data/spec/factories/form.rb +13 -0
- data/spec/factories/node.rb +5 -0
- data/spec/factories/response.rb +7 -0
- data/spec/factories/user.rb +15 -0
- data/spec/files/beef.png +0 -0
- data/spec/integration/navigation_spec.rb +9 -0
- data/spec/noodall_form_builder_spec.rb +7 -0
- data/spec/spec_helper.rb +30 -0
- metadata +204 -0
@@ -0,0 +1,13 @@
|
|
1
|
+
Factory.define :form, :class => Noodall::Form do |form|
|
2
|
+
form.title "A Form"
|
3
|
+
form.email "hello@wearebeef.co.uk"
|
4
|
+
|
5
|
+
form.fields do
|
6
|
+
fields = [Factory(:text_field, :name => 'Name', :required => true), Factory(:text_field, :name => 'Email', :required => true)]
|
7
|
+
5.times do
|
8
|
+
fields << Factory(:text_field)
|
9
|
+
end
|
10
|
+
|
11
|
+
fields
|
12
|
+
end
|
13
|
+
end
|
@@ -0,0 +1,15 @@
|
|
1
|
+
Factory.define :user do |user|
|
2
|
+
user.email { |u| Faker::Internet.email(u.name) }
|
3
|
+
user.name { Faker::Name.name }
|
4
|
+
user.password { "password" }
|
5
|
+
user.password_confirmation { "password" }
|
6
|
+
end
|
7
|
+
|
8
|
+
Factory.define :website_editor, :parent => :user do |user|
|
9
|
+
user.groups [ "editor" ]
|
10
|
+
end
|
11
|
+
|
12
|
+
Factory.define :website_administrator, :parent => :user do |user|
|
13
|
+
user.groups [ "admin" ]
|
14
|
+
end
|
15
|
+
|
data/spec/files/beef.png
ADDED
Binary file
|
data/spec/spec_helper.rb
ADDED
@@ -0,0 +1,30 @@
|
|
1
|
+
# Configure Rails Envinronment
|
2
|
+
ENV["RAILS_ENV"] = "test"
|
3
|
+
|
4
|
+
require File.expand_path("../dummy/config/environment.rb", __FILE__)
|
5
|
+
require "rails/test_help"
|
6
|
+
require "rspec/rails"
|
7
|
+
|
8
|
+
ActionMailer::Base.delivery_method = :test
|
9
|
+
ActionMailer::Base.perform_deliveries = true
|
10
|
+
ActionMailer::Base.default_url_options[:host] = "test.com"
|
11
|
+
|
12
|
+
Rails.backtrace_cleaner.remove_silencers!
|
13
|
+
|
14
|
+
# Configure capybara for integration testing
|
15
|
+
require "capybara/rails"
|
16
|
+
Capybara.default_driver = :rack_test
|
17
|
+
Capybara.default_selector = :css
|
18
|
+
|
19
|
+
# Load support files
|
20
|
+
Dir["#{File.dirname(__FILE__)}/support/**/*.rb"].each { |f| require f }
|
21
|
+
|
22
|
+
Rspec.configure do |config|
|
23
|
+
# Remove this line if you don't want Rspec's should and should_not
|
24
|
+
# methods or matchers
|
25
|
+
require 'rspec/expectations'
|
26
|
+
config.include Rspec::Matchers
|
27
|
+
|
28
|
+
# == Mock Framework
|
29
|
+
config.mock_with :rspec
|
30
|
+
end
|
metadata
ADDED
@@ -0,0 +1,204 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: noodall-form-builder
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
hash: 29
|
5
|
+
prerelease: false
|
6
|
+
segments:
|
7
|
+
- 0
|
8
|
+
- 0
|
9
|
+
- 1
|
10
|
+
version: 0.0.1
|
11
|
+
platform: ruby
|
12
|
+
authors: []
|
13
|
+
|
14
|
+
autorequire:
|
15
|
+
bindir: bin
|
16
|
+
cert_chain: []
|
17
|
+
|
18
|
+
date: 2010-12-08 00:00:00 +00:00
|
19
|
+
default_executable:
|
20
|
+
dependencies:
|
21
|
+
- !ruby/object:Gem::Dependency
|
22
|
+
version_requirements: &id001 !ruby/object:Gem::Requirement
|
23
|
+
none: false
|
24
|
+
requirements:
|
25
|
+
- - ">="
|
26
|
+
- !ruby/object:Gem::Version
|
27
|
+
hash: 23
|
28
|
+
segments:
|
29
|
+
- 1
|
30
|
+
- 0
|
31
|
+
- 0
|
32
|
+
version: 1.0.0
|
33
|
+
requirement: *id001
|
34
|
+
type: :development
|
35
|
+
name: bundler
|
36
|
+
prerelease: false
|
37
|
+
- !ruby/object:Gem::Dependency
|
38
|
+
version_requirements: &id002 !ruby/object:Gem::Requirement
|
39
|
+
none: false
|
40
|
+
requirements:
|
41
|
+
- - ">="
|
42
|
+
- !ruby/object:Gem::Version
|
43
|
+
hash: 3
|
44
|
+
segments:
|
45
|
+
- 0
|
46
|
+
version: "0"
|
47
|
+
requirement: *id002
|
48
|
+
type: :runtime
|
49
|
+
name: noodall-core
|
50
|
+
prerelease: false
|
51
|
+
description: Functionality for building custom forms
|
52
|
+
email: []
|
53
|
+
|
54
|
+
executables: []
|
55
|
+
|
56
|
+
extensions: []
|
57
|
+
|
58
|
+
extra_rdoc_files: []
|
59
|
+
|
60
|
+
files:
|
61
|
+
- .gitignore
|
62
|
+
- Gemfile
|
63
|
+
- Gemfile.lock
|
64
|
+
- MIT-LICENSE
|
65
|
+
- README.rdoc
|
66
|
+
- Rakefile
|
67
|
+
- app/controllers/noodall/admin/fields_controller.rb
|
68
|
+
- app/controllers/noodall/admin/form_responses_controller.rb
|
69
|
+
- app/controllers/noodall/admin/forms_controller.rb
|
70
|
+
- app/controllers/noodall/form_responses_controller.rb
|
71
|
+
- app/helpers/admin/forms_helper.rb
|
72
|
+
- app/helpers/forms_helper.rb
|
73
|
+
- app/mailers/form_mailer.rb
|
74
|
+
- app/models/contact_form.rb
|
75
|
+
- app/models/noodall/check_box.rb
|
76
|
+
- app/models/noodall/field.rb
|
77
|
+
- app/models/noodall/form.rb
|
78
|
+
- app/models/noodall/form_response.rb
|
79
|
+
- app/models/noodall/radio.rb
|
80
|
+
- app/models/noodall/select.rb
|
81
|
+
- app/models/noodall/text_field.rb
|
82
|
+
- app/views/admin/components/_contact_form.html.erb
|
83
|
+
- app/views/components/_contact_form.html.erb
|
84
|
+
- app/views/form_mailer/_form_response_fields.html.erb
|
85
|
+
- app/views/form_mailer/form_response.html.erb
|
86
|
+
- app/views/form_mailer/form_response_thankyou.html.erb
|
87
|
+
- app/views/noodall/admin/fields/_check_box.html.erb
|
88
|
+
- app/views/noodall/admin/fields/_radio.html.erb
|
89
|
+
- app/views/noodall/admin/fields/_select.html.erb
|
90
|
+
- app/views/noodall/admin/fields/_text_field.html.erb
|
91
|
+
- app/views/noodall/admin/form_responses/index.csv.csvbuilder
|
92
|
+
- app/views/noodall/admin/form_responses/index.html.erb
|
93
|
+
- app/views/noodall/admin/forms/_field_select.html.erb
|
94
|
+
- app/views/noodall/admin/forms/index.html.erb
|
95
|
+
- app/views/noodall/admin/forms/show.html.erb
|
96
|
+
- app/views/noodall/form_responses/_form.html.erb
|
97
|
+
- app/views/noodall/form_responses/create.html.erb
|
98
|
+
- app/views/noodall/form_responses/new.html.erb
|
99
|
+
- app/views/noodall/forms/edit.html.erb
|
100
|
+
- app/views/noodall/forms/index.html.erb
|
101
|
+
- app/views/noodall/forms/new.html.erb
|
102
|
+
- app/views/noodall/forms/show.html.erb
|
103
|
+
- cucumber.yml
|
104
|
+
- features/form_builder.feature
|
105
|
+
- features/form_module.feature
|
106
|
+
- features/step_definitions/cms_node_steps.rb
|
107
|
+
- features/step_definitions/component_steps.rb
|
108
|
+
- features/step_definitions/email_steps.rb
|
109
|
+
- features/step_definitions/form_builder_steps.rb
|
110
|
+
- features/step_definitions/sign_in_steps.rb
|
111
|
+
- features/step_definitions/web_steps.rb
|
112
|
+
- features/support/defensio_mock.rb
|
113
|
+
- features/support/env.rb
|
114
|
+
- features/support/paths.rb
|
115
|
+
- lib/noodall-form-builder.rb
|
116
|
+
- lib/noodall/form_builder/engine.rb
|
117
|
+
- lib/noodall/form_builder/routes.rb
|
118
|
+
- lib/noodall/form_builder/version.rb
|
119
|
+
- noodall-form-builder.gemspec
|
120
|
+
- public/images/admin/spam.png
|
121
|
+
- public/javascripts/admin/formbuilder.js
|
122
|
+
- spec/dummy/Rakefile
|
123
|
+
- spec/dummy/app/controllers/application_controller.rb
|
124
|
+
- spec/dummy/app/helpers/application_helper.rb
|
125
|
+
- spec/dummy/app/models/page_a.rb
|
126
|
+
- spec/dummy/app/models/user.rb
|
127
|
+
- spec/dummy/app/views/admin/nodes/_page_a.html.erb
|
128
|
+
- spec/dummy/app/views/layouts/application.html.erb
|
129
|
+
- spec/dummy/app/views/nodes/page_a.html.erb
|
130
|
+
- spec/dummy/config.ru
|
131
|
+
- spec/dummy/config/application.rb
|
132
|
+
- spec/dummy/config/boot.rb
|
133
|
+
- spec/dummy/config/database.yml
|
134
|
+
- spec/dummy/config/defensio.yml
|
135
|
+
- spec/dummy/config/environment.rb
|
136
|
+
- spec/dummy/config/environments/development.rb
|
137
|
+
- spec/dummy/config/environments/production.rb
|
138
|
+
- spec/dummy/config/environments/test.rb
|
139
|
+
- spec/dummy/config/initializers/backtrace_silencers.rb
|
140
|
+
- spec/dummy/config/initializers/dragonfly.rb
|
141
|
+
- spec/dummy/config/initializers/inflections.rb
|
142
|
+
- spec/dummy/config/initializers/mime_types.rb
|
143
|
+
- spec/dummy/config/initializers/mongo_mapper.rb
|
144
|
+
- spec/dummy/config/initializers/noodall.rb
|
145
|
+
- spec/dummy/config/initializers/secret_token.rb
|
146
|
+
- spec/dummy/config/initializers/session_store.rb
|
147
|
+
- spec/dummy/config/locales/en.yml
|
148
|
+
- spec/dummy/config/routes.rb
|
149
|
+
- spec/dummy/public/404.html
|
150
|
+
- spec/dummy/public/422.html
|
151
|
+
- spec/dummy/public/500.html
|
152
|
+
- spec/dummy/public/favicon.ico
|
153
|
+
- spec/dummy/public/javascripts/application.js
|
154
|
+
- spec/dummy/public/stylesheets/.gitkeep
|
155
|
+
- spec/dummy/script/rails
|
156
|
+
- spec/factories/asset.rb
|
157
|
+
- spec/factories/contact_form.rb
|
158
|
+
- spec/factories/field.rb
|
159
|
+
- spec/factories/form.rb
|
160
|
+
- spec/factories/node.rb
|
161
|
+
- spec/factories/response.rb
|
162
|
+
- spec/factories/user.rb
|
163
|
+
- spec/files/beef.png
|
164
|
+
- spec/integration/navigation_spec.rb
|
165
|
+
- spec/noodall_form_builder_spec.rb
|
166
|
+
- spec/spec_helper.rb
|
167
|
+
has_rdoc: true
|
168
|
+
homepage: http://rubygems.org/gems/noodall-form-builder
|
169
|
+
licenses: []
|
170
|
+
|
171
|
+
post_install_message:
|
172
|
+
rdoc_options: []
|
173
|
+
|
174
|
+
require_paths:
|
175
|
+
- lib
|
176
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
177
|
+
none: false
|
178
|
+
requirements:
|
179
|
+
- - ">="
|
180
|
+
- !ruby/object:Gem::Version
|
181
|
+
hash: 3
|
182
|
+
segments:
|
183
|
+
- 0
|
184
|
+
version: "0"
|
185
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
186
|
+
none: false
|
187
|
+
requirements:
|
188
|
+
- - ">="
|
189
|
+
- !ruby/object:Gem::Version
|
190
|
+
hash: 23
|
191
|
+
segments:
|
192
|
+
- 1
|
193
|
+
- 3
|
194
|
+
- 6
|
195
|
+
version: 1.3.6
|
196
|
+
requirements: []
|
197
|
+
|
198
|
+
rubyforge_project:
|
199
|
+
rubygems_version: 1.3.7
|
200
|
+
signing_key:
|
201
|
+
specification_version: 3
|
202
|
+
summary: Noodall Form Builder
|
203
|
+
test_files: []
|
204
|
+
|