formatted_form 2.1.1 → 2.1.2
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.
- checksums.yaml +7 -0
- data/.gitignore +7 -0
- data/Gemfile +1 -5
- data/LICENSE +1 -1
- data/README.md +1 -0
- data/Rakefile +7 -28
- data/app/views/formatted_form/_url_field.html.erb +1 -0
- data/formatted_form.gemspec +18 -111
- data/lib/formatted_form.rb +1 -0
- data/lib/formatted_form/engine.rb +1 -0
- data/lib/formatted_form/form_builder.rb +14 -3
- data/lib/formatted_form/version.rb +3 -0
- data/test/dummy/README.rdoc +15 -248
- data/test/dummy/Rakefile +0 -1
- data/test/dummy/app/{mailers/.gitkeep → assets/images/.keep} +0 -0
- data/test/dummy/app/assets/javascripts/application.js +3 -3
- data/test/dummy/app/controllers/application_controller.rb +0 -17
- data/test/dummy/app/models/{.gitkeep → .keep} +0 -0
- data/test/dummy/app/models/user.rb +16 -0
- data/test/dummy/bin/bundle +3 -0
- data/test/dummy/bin/rails +4 -0
- data/test/dummy/bin/rake +4 -0
- data/test/dummy/config.ru +1 -1
- data/test/dummy/config/application.rb +2 -38
- data/test/dummy/config/boot.rb +4 -9
- data/test/dummy/config/environment.rb +2 -2
- data/test/dummy/config/environments/development.rb +9 -13
- data/test/dummy/config/environments/production.rb +40 -24
- data/test/dummy/config/environments/test.rb +13 -12
- data/test/dummy/config/initializers/filter_parameter_logging.rb +4 -0
- data/test/dummy/config/initializers/inflections.rb +6 -5
- data/test/dummy/config/initializers/secret_token.rb +7 -2
- data/test/dummy/config/initializers/session_store.rb +0 -5
- data/test/dummy/config/initializers/wrap_parameters.rb +2 -3
- data/test/dummy/config/routes.rb +0 -56
- data/test/form_builder_test.rb +8 -2
- data/test/test_helper.rb +1 -1
- metadata +22 -49
- data/VERSION +0 -1
- data/test/dummy/app/helpers/application_helper.rb +0 -2
- data/test/dummy/config/locales/en.yml +0 -5
- data/test/dummy/lib/assets/.gitkeep +0 -0
- data/test/dummy/log/.gitkeep +0 -0
- data/test/dummy/public/404.html +0 -26
- data/test/dummy/public/422.html +0 -26
- data/test/dummy/public/500.html +0 -25
- data/test/dummy/public/favicon.ico +0 -0
- data/test/dummy/script/rails +0 -6
data/test/form_builder_test.rb
CHANGED
@@ -99,7 +99,7 @@ class FormBuilderTest < ActionView::TestCase
|
|
99
99
|
assert_select "div[class='control-group error']" do
|
100
100
|
assert_select "div[class='controls']" do
|
101
101
|
assert_select "input[type='text'][id='user_name'][name='user[name]']"
|
102
|
-
assert_select "span[class='help-block']", "can&#
|
102
|
+
assert_select "span[class='help-block']", "can't be blank"
|
103
103
|
end
|
104
104
|
end
|
105
105
|
end
|
@@ -360,5 +360,11 @@ class FormBuilderTest < ActionView::TestCase
|
|
360
360
|
assert_select "select[id='user_timestamp'][name='user[timestamp]']"
|
361
361
|
end
|
362
362
|
end
|
363
|
-
|
363
|
+
|
364
|
+
def test_url_field
|
365
|
+
with_url_field :url
|
366
|
+
assert_select "div[class='controls']" do
|
367
|
+
assert_select "input[type='url'][id='user_url'][name='user[url]']"
|
368
|
+
end
|
369
|
+
end
|
364
370
|
end
|
data/test/test_helper.rb
CHANGED
@@ -14,7 +14,7 @@ class User
|
|
14
14
|
include ActiveModel::Validations
|
15
15
|
include ActiveModel::Conversion
|
16
16
|
|
17
|
-
attr_accessor :id, :name, :twitter, :role, :colors, :timestamp
|
17
|
+
attr_accessor :id, :name, :twitter, :role, :colors, :timestamp, :url
|
18
18
|
|
19
19
|
validates :name, :presence => true
|
20
20
|
|
metadata
CHANGED
@@ -1,8 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: formatted_form
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.1.
|
5
|
-
prerelease:
|
4
|
+
version: 2.1.2
|
6
5
|
platform: ruby
|
7
6
|
authors:
|
8
7
|
- Jack Neto
|
@@ -11,53 +10,34 @@ authors:
|
|
11
10
|
autorequire:
|
12
11
|
bindir: bin
|
13
12
|
cert_chain: []
|
14
|
-
date: 2013-
|
13
|
+
date: 2013-10-25 00:00:00.000000000 Z
|
15
14
|
dependencies:
|
16
15
|
- !ruby/object:Gem::Dependency
|
17
16
|
name: rails
|
18
17
|
requirement: !ruby/object:Gem::Requirement
|
19
|
-
none: false
|
20
18
|
requirements:
|
21
19
|
- - ! '>='
|
22
20
|
- !ruby/object:Gem::Version
|
23
|
-
version: 3.1
|
21
|
+
version: '3.1'
|
24
22
|
type: :runtime
|
25
23
|
prerelease: false
|
26
24
|
version_requirements: !ruby/object:Gem::Requirement
|
27
|
-
none: false
|
28
25
|
requirements:
|
29
26
|
- - ! '>='
|
30
27
|
- !ruby/object:Gem::Version
|
31
|
-
version: 3.1
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
none: false
|
36
|
-
requirements:
|
37
|
-
- - ! '>='
|
38
|
-
- !ruby/object:Gem::Version
|
39
|
-
version: '0'
|
40
|
-
type: :development
|
41
|
-
prerelease: false
|
42
|
-
version_requirements: !ruby/object:Gem::Requirement
|
43
|
-
none: false
|
44
|
-
requirements:
|
45
|
-
- - ! '>='
|
46
|
-
- !ruby/object:Gem::Version
|
47
|
-
version: '0'
|
48
|
-
description: ''
|
49
|
-
email: jack@twg.ca
|
28
|
+
version: '3.1'
|
29
|
+
description: Rails form helper the generates Bootstrap 2 markup
|
30
|
+
email:
|
31
|
+
- jack@twg.ca
|
50
32
|
executables: []
|
51
33
|
extensions: []
|
52
|
-
extra_rdoc_files:
|
53
|
-
- LICENSE
|
54
|
-
- README.md
|
34
|
+
extra_rdoc_files: []
|
55
35
|
files:
|
36
|
+
- .gitignore
|
56
37
|
- Gemfile
|
57
38
|
- LICENSE
|
58
39
|
- README.md
|
59
40
|
- Rakefile
|
60
|
-
- VERSION
|
61
41
|
- app/assets/javascripts/formatted_form.js
|
62
42
|
- app/assets/stylesheets/formatted_form.css
|
63
43
|
- app/views/formatted_form/_check_box.html.erb
|
@@ -79,6 +59,7 @@ files:
|
|
79
59
|
- app/views/formatted_form/_text_field.html.erb
|
80
60
|
- app/views/formatted_form/_time_select.html.erb
|
81
61
|
- app/views/formatted_form/_time_zone_select.html.erb
|
62
|
+
- app/views/formatted_form/_url_field.html.erb
|
82
63
|
- app/views/formatted_form/templates/_choices.html.erb
|
83
64
|
- app/views/formatted_form/templates/_choices_block.html.erb
|
84
65
|
- app/views/formatted_form/templates/_choices_inline.html.erb
|
@@ -90,18 +71,22 @@ files:
|
|
90
71
|
- lib/formatted_form.rb
|
91
72
|
- lib/formatted_form/engine.rb
|
92
73
|
- lib/formatted_form/form_builder.rb
|
74
|
+
- lib/formatted_form/version.rb
|
93
75
|
- lib/formatted_form/view_helper.rb
|
94
76
|
- test/dummy/README.rdoc
|
95
77
|
- test/dummy/Rakefile
|
78
|
+
- test/dummy/app/assets/images/.keep
|
96
79
|
- test/dummy/app/assets/javascripts/application.js
|
97
80
|
- test/dummy/app/assets/stylesheets/application.css
|
98
81
|
- test/dummy/app/assets/stylesheets/bootstrap.css
|
99
82
|
- test/dummy/app/controllers/application_controller.rb
|
100
|
-
- test/dummy/app/
|
101
|
-
- test/dummy/app/
|
102
|
-
- test/dummy/app/models/.gitkeep
|
83
|
+
- test/dummy/app/models/.keep
|
84
|
+
- test/dummy/app/models/user.rb
|
103
85
|
- test/dummy/app/views/application/test.html.erb
|
104
86
|
- test/dummy/app/views/layouts/application.html.erb
|
87
|
+
- test/dummy/bin/bundle
|
88
|
+
- test/dummy/bin/rails
|
89
|
+
- test/dummy/bin/rake
|
105
90
|
- test/dummy/config.ru
|
106
91
|
- test/dummy/config/application.rb
|
107
92
|
- test/dummy/config/boot.rb
|
@@ -110,49 +95,37 @@ files:
|
|
110
95
|
- test/dummy/config/environments/production.rb
|
111
96
|
- test/dummy/config/environments/test.rb
|
112
97
|
- test/dummy/config/initializers/backtrace_silencers.rb
|
98
|
+
- test/dummy/config/initializers/filter_parameter_logging.rb
|
113
99
|
- test/dummy/config/initializers/inflections.rb
|
114
100
|
- test/dummy/config/initializers/mime_types.rb
|
115
101
|
- test/dummy/config/initializers/secret_token.rb
|
116
102
|
- test/dummy/config/initializers/session_store.rb
|
117
103
|
- test/dummy/config/initializers/wrap_parameters.rb
|
118
|
-
- test/dummy/config/locales/en.yml
|
119
104
|
- test/dummy/config/routes.rb
|
120
|
-
- test/dummy/lib/assets/.gitkeep
|
121
|
-
- test/dummy/log/.gitkeep
|
122
|
-
- test/dummy/public/404.html
|
123
|
-
- test/dummy/public/422.html
|
124
|
-
- test/dummy/public/500.html
|
125
|
-
- test/dummy/public/favicon.ico
|
126
|
-
- test/dummy/script/rails
|
127
105
|
- test/form_builder_test.rb
|
128
106
|
- test/test_helper.rb
|
129
107
|
homepage: http://github.com/twg/formatted_form
|
130
108
|
licenses:
|
131
109
|
- MIT
|
110
|
+
metadata: {}
|
132
111
|
post_install_message:
|
133
112
|
rdoc_options: []
|
134
113
|
require_paths:
|
135
114
|
- lib
|
136
115
|
required_ruby_version: !ruby/object:Gem::Requirement
|
137
|
-
none: false
|
138
116
|
requirements:
|
139
117
|
- - ! '>='
|
140
118
|
- !ruby/object:Gem::Version
|
141
119
|
version: '0'
|
142
|
-
segments:
|
143
|
-
- 0
|
144
|
-
hash: -4168114902815439025
|
145
120
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
146
|
-
none: false
|
147
121
|
requirements:
|
148
122
|
- - ! '>='
|
149
123
|
- !ruby/object:Gem::Version
|
150
124
|
version: '0'
|
151
125
|
requirements: []
|
152
126
|
rubyforge_project:
|
153
|
-
rubygems_version:
|
127
|
+
rubygems_version: 2.0.3
|
154
128
|
signing_key:
|
155
|
-
specification_version:
|
156
|
-
summary:
|
157
|
-
your code clean
|
129
|
+
specification_version: 4
|
130
|
+
summary: Rails form helper the generates Bootstrap 2 markup
|
158
131
|
test_files: []
|
data/VERSION
DELETED
@@ -1 +0,0 @@
|
|
1
|
-
2.1.1
|
File without changes
|
data/test/dummy/log/.gitkeep
DELETED
File without changes
|
data/test/dummy/public/404.html
DELETED
@@ -1,26 +0,0 @@
|
|
1
|
-
<!DOCTYPE html>
|
2
|
-
<html>
|
3
|
-
<head>
|
4
|
-
<title>The page you were looking for doesn't exist (404)</title>
|
5
|
-
<style type="text/css">
|
6
|
-
body { background-color: #fff; color: #666; text-align: center; font-family: arial, sans-serif; }
|
7
|
-
div.dialog {
|
8
|
-
width: 25em;
|
9
|
-
padding: 0 4em;
|
10
|
-
margin: 4em auto 0 auto;
|
11
|
-
border: 1px solid #ccc;
|
12
|
-
border-right-color: #999;
|
13
|
-
border-bottom-color: #999;
|
14
|
-
}
|
15
|
-
h1 { font-size: 100%; color: #f00; line-height: 1.5em; }
|
16
|
-
</style>
|
17
|
-
</head>
|
18
|
-
|
19
|
-
<body>
|
20
|
-
<!-- This file lives in public/404.html -->
|
21
|
-
<div class="dialog">
|
22
|
-
<h1>The page you were looking for doesn't exist.</h1>
|
23
|
-
<p>You may have mistyped the address or the page may have moved.</p>
|
24
|
-
</div>
|
25
|
-
</body>
|
26
|
-
</html>
|
data/test/dummy/public/422.html
DELETED
@@ -1,26 +0,0 @@
|
|
1
|
-
<!DOCTYPE html>
|
2
|
-
<html>
|
3
|
-
<head>
|
4
|
-
<title>The change you wanted was rejected (422)</title>
|
5
|
-
<style type="text/css">
|
6
|
-
body { background-color: #fff; color: #666; text-align: center; font-family: arial, sans-serif; }
|
7
|
-
div.dialog {
|
8
|
-
width: 25em;
|
9
|
-
padding: 0 4em;
|
10
|
-
margin: 4em auto 0 auto;
|
11
|
-
border: 1px solid #ccc;
|
12
|
-
border-right-color: #999;
|
13
|
-
border-bottom-color: #999;
|
14
|
-
}
|
15
|
-
h1 { font-size: 100%; color: #f00; line-height: 1.5em; }
|
16
|
-
</style>
|
17
|
-
</head>
|
18
|
-
|
19
|
-
<body>
|
20
|
-
<!-- This file lives in public/422.html -->
|
21
|
-
<div class="dialog">
|
22
|
-
<h1>The change you wanted was rejected.</h1>
|
23
|
-
<p>Maybe you tried to change something you didn't have access to.</p>
|
24
|
-
</div>
|
25
|
-
</body>
|
26
|
-
</html>
|
data/test/dummy/public/500.html
DELETED
@@ -1,25 +0,0 @@
|
|
1
|
-
<!DOCTYPE html>
|
2
|
-
<html>
|
3
|
-
<head>
|
4
|
-
<title>We're sorry, but something went wrong (500)</title>
|
5
|
-
<style type="text/css">
|
6
|
-
body { background-color: #fff; color: #666; text-align: center; font-family: arial, sans-serif; }
|
7
|
-
div.dialog {
|
8
|
-
width: 25em;
|
9
|
-
padding: 0 4em;
|
10
|
-
margin: 4em auto 0 auto;
|
11
|
-
border: 1px solid #ccc;
|
12
|
-
border-right-color: #999;
|
13
|
-
border-bottom-color: #999;
|
14
|
-
}
|
15
|
-
h1 { font-size: 100%; color: #f00; line-height: 1.5em; }
|
16
|
-
</style>
|
17
|
-
</head>
|
18
|
-
|
19
|
-
<body>
|
20
|
-
<!-- This file lives in public/500.html -->
|
21
|
-
<div class="dialog">
|
22
|
-
<h1>We're sorry, but something went wrong.</h1>
|
23
|
-
</div>
|
24
|
-
</body>
|
25
|
-
</html>
|
File without changes
|
data/test/dummy/script/rails
DELETED
@@ -1,6 +0,0 @@
|
|
1
|
-
#!/usr/bin/env ruby
|
2
|
-
# This command will automatically be run when you run "rails" with Rails 3 gems installed from the root of your application.
|
3
|
-
|
4
|
-
APP_PATH = File.expand_path('../../config/application', __FILE__)
|
5
|
-
require File.expand_path('../../config/boot', __FILE__)
|
6
|
-
require 'rails/commands'
|