parsley_simple_form 0.0.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +15 -0
- data/MIT-LICENSE +20 -0
- data/README.rdoc +5 -0
- data/Rakefile +38 -0
- data/lib/parsley_simple_form/action_view_extensions/form_helper.rb +13 -0
- data/lib/parsley_simple_form/form_builder.rb +57 -0
- data/lib/parsley_simple_form/railtie.rb +7 -0
- data/lib/parsley_simple_form/version.rb +3 -0
- data/lib/parsley_simple_form.rb +3 -0
- data/lib/tasks/parsley_simple_form_tasks.rake +4 -0
- data/test/dummy/README.rdoc +261 -0
- data/test/dummy/Rakefile +7 -0
- data/test/dummy/app/assets/javascripts/application.js +15 -0
- data/test/dummy/app/assets/stylesheets/application.css +13 -0
- data/test/dummy/app/controllers/application_controller.rb +3 -0
- data/test/dummy/app/helpers/application_helper.rb +2 -0
- data/test/dummy/app/views/layouts/application.html.erb +14 -0
- data/test/dummy/config/application.rb +59 -0
- data/test/dummy/config/boot.rb +10 -0
- data/test/dummy/config/database.yml +25 -0
- data/test/dummy/config/environment.rb +5 -0
- data/test/dummy/config/environments/development.rb +37 -0
- data/test/dummy/config/environments/production.rb +67 -0
- data/test/dummy/config/environments/test.rb +37 -0
- data/test/dummy/config/initializers/backtrace_silencers.rb +7 -0
- data/test/dummy/config/initializers/inflections.rb +15 -0
- data/test/dummy/config/initializers/mime_types.rb +5 -0
- data/test/dummy/config/initializers/secret_token.rb +7 -0
- data/test/dummy/config/initializers/session_store.rb +8 -0
- data/test/dummy/config/initializers/wrap_parameters.rb +14 -0
- data/test/dummy/config/locales/en.yml +5 -0
- data/test/dummy/config/routes.rb +60 -0
- data/test/dummy/config.ru +4 -0
- data/test/dummy/db/test.sqlite3 +0 -0
- data/test/dummy/log/test.log +150 -0
- data/test/dummy/public/404.html +26 -0
- data/test/dummy/public/422.html +26 -0
- data/test/dummy/public/500.html +25 -0
- data/test/dummy/public/favicon.ico +0 -0
- data/test/dummy/script/rails +6 -0
- data/test/form_builder_test.rb +11 -0
- data/test/form_helper_test.rb +10 -0
- data/test/parsley_simple_form_test.rb +7 -0
- data/test/support/user.rb +116 -0
- data/test/test_helper.rb +63 -0
- metadata +178 -0
data/test/test_helper.rb
ADDED
@@ -0,0 +1,63 @@
|
|
1
|
+
# Configure Rails Environment
|
2
|
+
ENV["RAILS_ENV"] = "test"
|
3
|
+
|
4
|
+
require File.expand_path("../dummy/config/environment.rb", __FILE__)
|
5
|
+
require "rails/test_help"
|
6
|
+
|
7
|
+
require 'active_model'
|
8
|
+
require 'action_controller'
|
9
|
+
require 'action_view'
|
10
|
+
require 'action_view/template'
|
11
|
+
|
12
|
+
require 'action_view/test_case'
|
13
|
+
|
14
|
+
require "rails/generators/test_case"
|
15
|
+
|
16
|
+
require 'simple_form'
|
17
|
+
|
18
|
+
require_relative 'support/user'
|
19
|
+
|
20
|
+
module Rails
|
21
|
+
def self.env
|
22
|
+
ActiveSupport::StringInquirer.new("test")
|
23
|
+
end
|
24
|
+
end
|
25
|
+
|
26
|
+
Rails.backtrace_cleaner.remove_silencers!
|
27
|
+
|
28
|
+
# Load support files
|
29
|
+
Dir["#{File.dirname(__FILE__)}/support/**/*.rb"].each { |f| require f }
|
30
|
+
|
31
|
+
# Load fixtures from the engine
|
32
|
+
if ActiveSupport::TestCase.method_defined?(:fixture_path=)
|
33
|
+
ActiveSupport::TestCase.fixture_path = File.expand_path("../fixtures", __FILE__)
|
34
|
+
end
|
35
|
+
|
36
|
+
class ActionView::TestCase
|
37
|
+
include SimpleForm::ActionViewExtensions::FormHelper
|
38
|
+
include ParsleySimpleForm::ActionViewExtensions::FormHelper
|
39
|
+
|
40
|
+
setup :setup_users
|
41
|
+
|
42
|
+
def protect_against_forgery?
|
43
|
+
false
|
44
|
+
end
|
45
|
+
|
46
|
+
def user_path(*args)
|
47
|
+
'/users'
|
48
|
+
end
|
49
|
+
|
50
|
+
def company_user_path(*args)
|
51
|
+
'/company/users'
|
52
|
+
end
|
53
|
+
|
54
|
+
def setup_users(extra_attributes = {})
|
55
|
+
@user = User.build(extra_attributes)
|
56
|
+
end
|
57
|
+
|
58
|
+
alias :users_path :user_path
|
59
|
+
alias :super_user_path :user_path
|
60
|
+
alias :validating_user_path :user_path
|
61
|
+
alias :validating_users_path :user_path
|
62
|
+
alias :other_validating_user_path :user_path
|
63
|
+
end
|
metadata
ADDED
@@ -0,0 +1,178 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: parsley_simple_form
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.0.1
|
5
|
+
platform: ruby
|
6
|
+
authors:
|
7
|
+
- Guilherme Moretti
|
8
|
+
autorequire:
|
9
|
+
bindir: bin
|
10
|
+
cert_chain: []
|
11
|
+
date: 2013-10-09 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: 3.2.13
|
20
|
+
type: :runtime
|
21
|
+
prerelease: false
|
22
|
+
version_requirements: !ruby/object:Gem::Requirement
|
23
|
+
requirements:
|
24
|
+
- - ~>
|
25
|
+
- !ruby/object:Gem::Version
|
26
|
+
version: 3.2.13
|
27
|
+
- !ruby/object:Gem::Dependency
|
28
|
+
name: simple_form
|
29
|
+
requirement: !ruby/object:Gem::Requirement
|
30
|
+
requirements:
|
31
|
+
- - ! '>='
|
32
|
+
- !ruby/object:Gem::Version
|
33
|
+
version: '0'
|
34
|
+
type: :runtime
|
35
|
+
prerelease: false
|
36
|
+
version_requirements: !ruby/object:Gem::Requirement
|
37
|
+
requirements:
|
38
|
+
- - ! '>='
|
39
|
+
- !ruby/object:Gem::Version
|
40
|
+
version: '0'
|
41
|
+
- !ruby/object:Gem::Dependency
|
42
|
+
name: parsley-rails
|
43
|
+
requirement: !ruby/object:Gem::Requirement
|
44
|
+
requirements:
|
45
|
+
- - ! '>='
|
46
|
+
- !ruby/object:Gem::Version
|
47
|
+
version: '0'
|
48
|
+
type: :runtime
|
49
|
+
prerelease: false
|
50
|
+
version_requirements: !ruby/object:Gem::Requirement
|
51
|
+
requirements:
|
52
|
+
- - ! '>='
|
53
|
+
- !ruby/object:Gem::Version
|
54
|
+
version: '0'
|
55
|
+
- !ruby/object:Gem::Dependency
|
56
|
+
name: sqlite3
|
57
|
+
requirement: !ruby/object:Gem::Requirement
|
58
|
+
requirements:
|
59
|
+
- - ! '>='
|
60
|
+
- !ruby/object:Gem::Version
|
61
|
+
version: '0'
|
62
|
+
type: :development
|
63
|
+
prerelease: false
|
64
|
+
version_requirements: !ruby/object:Gem::Requirement
|
65
|
+
requirements:
|
66
|
+
- - ! '>='
|
67
|
+
- !ruby/object:Gem::Version
|
68
|
+
version: '0'
|
69
|
+
description: Client side validation with parsley and simple_form.
|
70
|
+
email:
|
71
|
+
- guilherme.moretti@innvent.com.br
|
72
|
+
executables: []
|
73
|
+
extensions: []
|
74
|
+
extra_rdoc_files: []
|
75
|
+
files:
|
76
|
+
- lib/tasks/parsley_simple_form_tasks.rake
|
77
|
+
- lib/parsley_simple_form.rb
|
78
|
+
- lib/parsley_simple_form/action_view_extensions/form_helper.rb
|
79
|
+
- lib/parsley_simple_form/form_builder.rb
|
80
|
+
- lib/parsley_simple_form/railtie.rb
|
81
|
+
- lib/parsley_simple_form/version.rb
|
82
|
+
- MIT-LICENSE
|
83
|
+
- Rakefile
|
84
|
+
- README.rdoc
|
85
|
+
- test/test_helper.rb
|
86
|
+
- test/parsley_simple_form_test.rb
|
87
|
+
- test/dummy/Rakefile
|
88
|
+
- test/dummy/db/test.sqlite3
|
89
|
+
- test/dummy/public/404.html
|
90
|
+
- test/dummy/public/500.html
|
91
|
+
- test/dummy/public/422.html
|
92
|
+
- test/dummy/public/favicon.ico
|
93
|
+
- test/dummy/log/test.log
|
94
|
+
- test/dummy/script/rails
|
95
|
+
- test/dummy/README.rdoc
|
96
|
+
- test/dummy/config.ru
|
97
|
+
- test/dummy/config/initializers/wrap_parameters.rb
|
98
|
+
- test/dummy/config/initializers/session_store.rb
|
99
|
+
- test/dummy/config/initializers/backtrace_silencers.rb
|
100
|
+
- test/dummy/config/initializers/inflections.rb
|
101
|
+
- test/dummy/config/initializers/mime_types.rb
|
102
|
+
- test/dummy/config/initializers/secret_token.rb
|
103
|
+
- test/dummy/config/database.yml
|
104
|
+
- test/dummy/config/environments/development.rb
|
105
|
+
- test/dummy/config/environments/production.rb
|
106
|
+
- test/dummy/config/environments/test.rb
|
107
|
+
- test/dummy/config/environment.rb
|
108
|
+
- test/dummy/config/application.rb
|
109
|
+
- test/dummy/config/locales/en.yml
|
110
|
+
- test/dummy/config/boot.rb
|
111
|
+
- test/dummy/config/routes.rb
|
112
|
+
- test/dummy/app/controllers/application_controller.rb
|
113
|
+
- test/dummy/app/helpers/application_helper.rb
|
114
|
+
- test/dummy/app/views/layouts/application.html.erb
|
115
|
+
- test/dummy/app/assets/stylesheets/application.css
|
116
|
+
- test/dummy/app/assets/javascripts/application.js
|
117
|
+
- test/support/user.rb
|
118
|
+
- test/form_builder_test.rb
|
119
|
+
- test/form_helper_test.rb
|
120
|
+
homepage: http://github.com/innvent/parsley_simple_form
|
121
|
+
licenses: []
|
122
|
+
metadata: {}
|
123
|
+
post_install_message:
|
124
|
+
rdoc_options: []
|
125
|
+
require_paths:
|
126
|
+
- lib
|
127
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
128
|
+
requirements:
|
129
|
+
- - ! '>='
|
130
|
+
- !ruby/object:Gem::Version
|
131
|
+
version: '0'
|
132
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
133
|
+
requirements:
|
134
|
+
- - ! '>='
|
135
|
+
- !ruby/object:Gem::Version
|
136
|
+
version: '0'
|
137
|
+
requirements: []
|
138
|
+
rubyforge_project:
|
139
|
+
rubygems_version: 2.0.3
|
140
|
+
signing_key:
|
141
|
+
specification_version: 4
|
142
|
+
summary: Client side validation with parsley and simple_form.
|
143
|
+
test_files:
|
144
|
+
- test/test_helper.rb
|
145
|
+
- test/parsley_simple_form_test.rb
|
146
|
+
- test/dummy/Rakefile
|
147
|
+
- test/dummy/db/test.sqlite3
|
148
|
+
- test/dummy/public/404.html
|
149
|
+
- test/dummy/public/500.html
|
150
|
+
- test/dummy/public/422.html
|
151
|
+
- test/dummy/public/favicon.ico
|
152
|
+
- test/dummy/log/test.log
|
153
|
+
- test/dummy/script/rails
|
154
|
+
- test/dummy/README.rdoc
|
155
|
+
- test/dummy/config.ru
|
156
|
+
- test/dummy/config/initializers/wrap_parameters.rb
|
157
|
+
- test/dummy/config/initializers/session_store.rb
|
158
|
+
- test/dummy/config/initializers/backtrace_silencers.rb
|
159
|
+
- test/dummy/config/initializers/inflections.rb
|
160
|
+
- test/dummy/config/initializers/mime_types.rb
|
161
|
+
- test/dummy/config/initializers/secret_token.rb
|
162
|
+
- test/dummy/config/database.yml
|
163
|
+
- test/dummy/config/environments/development.rb
|
164
|
+
- test/dummy/config/environments/production.rb
|
165
|
+
- test/dummy/config/environments/test.rb
|
166
|
+
- test/dummy/config/environment.rb
|
167
|
+
- test/dummy/config/application.rb
|
168
|
+
- test/dummy/config/locales/en.yml
|
169
|
+
- test/dummy/config/boot.rb
|
170
|
+
- test/dummy/config/routes.rb
|
171
|
+
- test/dummy/app/controllers/application_controller.rb
|
172
|
+
- test/dummy/app/helpers/application_helper.rb
|
173
|
+
- test/dummy/app/views/layouts/application.html.erb
|
174
|
+
- test/dummy/app/assets/stylesheets/application.css
|
175
|
+
- test/dummy/app/assets/javascripts/application.js
|
176
|
+
- test/support/user.rb
|
177
|
+
- test/form_builder_test.rb
|
178
|
+
- test/form_helper_test.rb
|