bootstrap_helper 2.1.2.2.beta → 2.2.0
Sign up to get free protection for your applications and to get access to all the features.
- data/Gemfile +1 -4
- data/bootstrap_helper.gemspec +3 -3
- data/lib/bootstrap_helper/helper.rb +16 -9
- data/lib/bootstrap_helper/version.rb +1 -1
- data/spec/dummy/config/application.rb +2 -1
- data/spec/dummy/config/environments/development.rb +3 -2
- data/spec/dummy/config/environments/production.rb +0 -1
- data/spec/dummy/config/environments/test.rb +6 -2
- data/spec/dummy/config/initializers/secret_token.rb +1 -1
- data/spec/dummy/log/test.log +415 -0
- data/spec/helpers/application_helper_spec.rb +2 -2
- data/spec/spec_helper.rb +0 -1
- metadata +19 -32
data/Gemfile
CHANGED
data/bootstrap_helper.gemspec
CHANGED
@@ -15,14 +15,14 @@ Gem::Specification.new do |gem|
|
|
15
15
|
gem.require_paths = ["lib"]
|
16
16
|
gem.version = BootstrapHelper::Rails::VERSION
|
17
17
|
|
18
|
-
gem.add_dependency "railties",
|
18
|
+
gem.add_dependency "railties", "~> 3.0"
|
19
19
|
gem.add_dependency "thor", "~> 0.14"
|
20
|
-
gem.add_dependency "simple_form", "
|
20
|
+
gem.add_dependency "simple_form", "~> 2.0.2"
|
21
21
|
gem.add_dependency "will_paginate", '>= 3.0.3'
|
22
22
|
gem.add_development_dependency("rspec-rails")
|
23
23
|
gem.add_development_dependency("capybara", ">= 0.4.0")
|
24
24
|
gem.add_development_dependency("sqlite3")
|
25
25
|
gem.add_development_dependency "bundler", ">= 1.0.0"
|
26
|
-
gem.add_development_dependency "rails",
|
26
|
+
gem.add_development_dependency "rails", "~> 3.0"
|
27
27
|
end
|
28
28
|
|
@@ -1,6 +1,6 @@
|
|
1
1
|
# coding: utf-8
|
2
2
|
module BootstrapHelper
|
3
|
-
|
3
|
+
|
4
4
|
module Helper
|
5
5
|
def yield_or_default(message, default_message = "")
|
6
6
|
message.nil? ? default_message : message
|
@@ -25,8 +25,8 @@ module BootstrapHelper
|
|
25
25
|
<!--<![endif]-->|)
|
26
26
|
|
27
27
|
end
|
28
|
-
|
29
|
-
|
28
|
+
|
29
|
+
|
30
30
|
def notice_message
|
31
31
|
flash_messages = []
|
32
32
|
flash.each do |type, message|
|
@@ -48,18 +48,19 @@ module BootstrapHelper
|
|
48
48
|
:has_row_info => false,
|
49
49
|
:caption => "",
|
50
50
|
:id => nil,
|
51
|
-
:class_name => "auto"
|
51
|
+
:class_name => "auto",
|
52
|
+
:blank_message => "No results available."
|
52
53
|
}.merge(table_options)
|
53
54
|
|
54
55
|
table_tag_options = table_options[:id] ? { :id => table_options[:id], :class => table_options[:class_name] } : { :class => table_options[:class_name] }
|
55
56
|
|
56
57
|
table = TagNode.new('table', table_tag_options)
|
57
|
-
|
58
|
+
|
58
59
|
if !table_options[:caption].blank?
|
59
60
|
table << caption = TagNode.new(:caption)
|
60
61
|
caption << table_options[:caption]
|
61
62
|
end
|
62
|
-
|
63
|
+
|
63
64
|
if table_options[:has_header] == true
|
64
65
|
table << thead = TagNode.new(:thead)
|
65
66
|
thead << tr = TagNode.new(:tr, :class => 'odd')
|
@@ -91,6 +92,12 @@ module BootstrapHelper
|
|
91
92
|
end
|
92
93
|
end
|
93
94
|
|
95
|
+
if rows.length <= 0 && table_options[:blank_message] != false
|
96
|
+
tbody << tr = TagNode.new('tr', :class => "no-record" )
|
97
|
+
tr << td = TagNode.new('td', :colspan => renderrers.length)
|
98
|
+
td << table_options[:blank_message]
|
99
|
+
end
|
100
|
+
|
94
101
|
return table.to_s
|
95
102
|
end
|
96
103
|
|
@@ -103,10 +110,10 @@ module BootstrapHelper
|
|
103
110
|
end
|
104
111
|
|
105
112
|
yield(list) if block_given?
|
106
|
-
|
113
|
+
|
107
114
|
list_type ||= "ul"
|
108
|
-
|
109
|
-
if options[:type]
|
115
|
+
|
116
|
+
if options[:type]
|
110
117
|
if ["ul", "dl", "ol"].include?(options[:type])
|
111
118
|
list_type = options[:type]
|
112
119
|
end
|
@@ -4,7 +4,7 @@ require File.expand_path('../boot', __FILE__)
|
|
4
4
|
require "active_record/railtie"
|
5
5
|
require "action_controller/railtie"
|
6
6
|
require "action_mailer/railtie"
|
7
|
-
|
7
|
+
require "active_resource/railtie"
|
8
8
|
require "sprockets/railtie"
|
9
9
|
# require "rails/test_unit/railtie"
|
10
10
|
|
@@ -53,6 +53,7 @@ module Dummy
|
|
53
53
|
# This will create an empty whitelist of attributes available for mass-assignment for all models
|
54
54
|
# in your app. As such, your models will need to explicitly whitelist or blacklist accessible
|
55
55
|
# parameters by using an attr_accessible or attr_protected declaration.
|
56
|
+
config.active_record.whitelist_attributes = true
|
56
57
|
|
57
58
|
# Enable the asset pipeline
|
58
59
|
config.assets.enabled = true
|
@@ -22,6 +22,9 @@ Dummy::Application.configure do
|
|
22
22
|
# Only use best-standards-support built into browsers
|
23
23
|
config.action_dispatch.best_standards_support = :builtin
|
24
24
|
|
25
|
+
# Raise exception on mass assignment protection for Active Record models
|
26
|
+
config.active_record.mass_assignment_sanitizer = :strict
|
27
|
+
|
25
28
|
# Log the query plan for queries taking more than this (works
|
26
29
|
# with SQLite, MySQL, and PostgreSQL)
|
27
30
|
config.active_record.auto_explain_threshold_in_seconds = 0.5
|
@@ -31,6 +34,4 @@ Dummy::Application.configure do
|
|
31
34
|
|
32
35
|
# Expands the lines which load the assets
|
33
36
|
config.assets.debug = true
|
34
|
-
|
35
|
-
config.eager_load = false
|
36
37
|
end
|
@@ -11,6 +11,9 @@ Dummy::Application.configure do
|
|
11
11
|
config.serve_static_assets = true
|
12
12
|
config.static_cache_control = "public, max-age=3600"
|
13
13
|
|
14
|
+
# Log error messages when you accidentally call methods on nil
|
15
|
+
config.whiny_nils = true
|
16
|
+
|
14
17
|
# Show full error reports and disable caching
|
15
18
|
config.consider_all_requests_local = true
|
16
19
|
config.action_controller.perform_caching = false
|
@@ -26,8 +29,9 @@ Dummy::Application.configure do
|
|
26
29
|
# ActionMailer::Base.deliveries array.
|
27
30
|
config.action_mailer.delivery_method = :test
|
28
31
|
|
32
|
+
# Raise exception on mass assignment protection for Active Record models
|
33
|
+
config.active_record.mass_assignment_sanitizer = :strict
|
34
|
+
|
29
35
|
# Print deprecation notices to the stderr
|
30
36
|
config.active_support.deprecation = :stderr
|
31
|
-
|
32
|
-
config.eager_load = true
|
33
37
|
end
|
@@ -4,4 +4,4 @@
|
|
4
4
|
# If you change this key, all old signed cookies will become invalid!
|
5
5
|
# Make sure the secret is at least 30 characters and all random,
|
6
6
|
# no regular words or you'll be exposed to dictionary attacks.
|
7
|
-
Dummy::Application.config.
|
7
|
+
Dummy::Application.config.secret_token = 'd76c4299582c60a1f8c040c6f68285a585a2950c167cfd3a853a0429056c383ff6d4b87dbaa32e90416976b22fed944f42d4c1e6f8eaf0f9fb308820aa65083f'
|
@@ -0,0 +1,415 @@
|
|
1
|
+
Connecting to database specified by database.yml
|
2
|
+
Connecting to database specified by database.yml
|
3
|
+
Connecting to database specified by database.yml
|
4
|
+
Connecting to database specified by database.yml
|
5
|
+
Connecting to database specified by database.yml
|
6
|
+
Connecting to database specified by database.yml
|
7
|
+
[1m[36m (0.3ms)[0m [1mbegin transaction[0m
|
8
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
9
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
10
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
11
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
12
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
13
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
14
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
15
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
16
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
17
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
18
|
+
[1m[35m (0.1ms)[0m rollback transaction
|
19
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
20
|
+
[1m[35m (0.1ms)[0m rollback transaction
|
21
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
22
|
+
[1m[35m (0.1ms)[0m rollback transaction
|
23
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
24
|
+
[1m[35m (0.1ms)[0m rollback transaction
|
25
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
26
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
27
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
28
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
29
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
30
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
31
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
32
|
+
[1m[35m (0.1ms)[0m rollback transaction
|
33
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
34
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
35
|
+
Connecting to database specified by database.yml
|
36
|
+
[1m[36m (0.3ms)[0m [1mbegin transaction[0m
|
37
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
38
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
39
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
40
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
41
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
42
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
43
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
44
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
45
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
46
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
47
|
+
[1m[35m (0.1ms)[0m rollback transaction
|
48
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
49
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
50
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
51
|
+
[1m[35m (0.1ms)[0m rollback transaction
|
52
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
53
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
54
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
55
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
56
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
57
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
58
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
59
|
+
[1m[35m (0.1ms)[0m rollback transaction
|
60
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
61
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
62
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
63
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
64
|
+
Connecting to database specified by database.yml
|
65
|
+
Connecting to database specified by database.yml
|
66
|
+
[1m[36m (0.3ms)[0m [1mbegin transaction[0m
|
67
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
68
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
69
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
70
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
71
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
72
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
73
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
74
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
75
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
76
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
77
|
+
[1m[35m (0.1ms)[0m rollback transaction
|
78
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
79
|
+
[1m[35m (0.1ms)[0m rollback transaction
|
80
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
81
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
82
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
83
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
84
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
85
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
86
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
87
|
+
[1m[35m (0.1ms)[0m rollback transaction
|
88
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
89
|
+
[1m[35m (0.1ms)[0m rollback transaction
|
90
|
+
Connecting to database specified by database.yml
|
91
|
+
[1m[36m (0.3ms)[0m [1mbegin transaction[0m
|
92
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
93
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
94
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
95
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
96
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
97
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
98
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
99
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
100
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
101
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
102
|
+
[1m[35m (0.1ms)[0m rollback transaction
|
103
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
104
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
105
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
106
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
107
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
108
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
109
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
110
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
111
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
112
|
+
[1m[35m (0.1ms)[0m rollback transaction
|
113
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
114
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
115
|
+
Connecting to database specified by database.yml
|
116
|
+
[1m[36m (0.3ms)[0m [1mbegin transaction[0m
|
117
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
118
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
119
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
120
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
121
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
122
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
123
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
124
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
125
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
126
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
127
|
+
[1m[35m (0.1ms)[0m rollback transaction
|
128
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
129
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
130
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
131
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
132
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
133
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
134
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
135
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
136
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
137
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
138
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
139
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
140
|
+
Connecting to database specified by database.yml
|
141
|
+
[1m[36m (0.3ms)[0m [1mbegin transaction[0m
|
142
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
143
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
144
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
145
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
146
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
147
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
148
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
149
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
150
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
151
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
152
|
+
[1m[35m (0.1ms)[0m rollback transaction
|
153
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
154
|
+
[1m[35m (0.1ms)[0m rollback transaction
|
155
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
156
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
157
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
158
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
159
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
160
|
+
[1m[35m (0.1ms)[0m rollback transaction
|
161
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
162
|
+
[1m[35m (0.1ms)[0m rollback transaction
|
163
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
164
|
+
[1m[35m (0.1ms)[0m rollback transaction
|
165
|
+
Connecting to database specified by database.yml
|
166
|
+
[1m[36m (0.3ms)[0m [1mbegin transaction[0m
|
167
|
+
[1m[35m (0.1ms)[0m rollback transaction
|
168
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
169
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
170
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
171
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
172
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
173
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
174
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
175
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
176
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
177
|
+
[1m[35m (0.1ms)[0m rollback transaction
|
178
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
179
|
+
[1m[35m (0.1ms)[0m rollback transaction
|
180
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
181
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
182
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
183
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
184
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
185
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
186
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
187
|
+
[1m[35m (0.1ms)[0m rollback transaction
|
188
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
189
|
+
[1m[35m (0.1ms)[0m rollback transaction
|
190
|
+
Connecting to database specified by database.yml
|
191
|
+
[1m[36m (0.3ms)[0m [1mbegin transaction[0m
|
192
|
+
[1m[35m (0.1ms)[0m rollback transaction
|
193
|
+
Connecting to database specified by database.yml
|
194
|
+
[1m[36m (0.3ms)[0m [1mbegin transaction[0m
|
195
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
196
|
+
Connecting to database specified by database.yml
|
197
|
+
[1m[36m (0.3ms)[0m [1mbegin transaction[0m
|
198
|
+
Processing by WelcomeController#index as HTML
|
199
|
+
Rendered welcome/index.html.erb within layouts/application (7.1ms)
|
200
|
+
Completed 200 OK in 61ms (Views: 60.9ms | ActiveRecord: 0.0ms)
|
201
|
+
[1m[35m (0.1ms)[0m rollback transaction
|
202
|
+
Connecting to database specified by database.yml
|
203
|
+
[1m[36m (0.3ms)[0m [1mbegin transaction[0m
|
204
|
+
Processing by WelcomeController#index as HTML
|
205
|
+
Rendered welcome/index.html.erb within layouts/application (38.3ms)
|
206
|
+
Completed 200 OK in 54ms (Views: 53.5ms | ActiveRecord: 0.0ms)
|
207
|
+
[1m[35m (0.1ms)[0m rollback transaction
|
208
|
+
Connecting to database specified by database.yml
|
209
|
+
[1m[36m (0.3ms)[0m [1mbegin transaction[0m
|
210
|
+
[1m[35m (0.1ms)[0m rollback transaction
|
211
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
212
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
213
|
+
Connecting to database specified by database.yml
|
214
|
+
[1m[36m (0.3ms)[0m [1mbegin transaction[0m
|
215
|
+
[1m[35m (0.1ms)[0m rollback transaction
|
216
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
217
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
218
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
219
|
+
[1m[35m (0.1ms)[0m rollback transaction
|
220
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
221
|
+
[1m[35m (0.1ms)[0m rollback transaction
|
222
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
223
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
224
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
225
|
+
[1m[35m (0.1ms)[0m rollback transaction
|
226
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
227
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
228
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
229
|
+
[1m[35m (0.1ms)[0m rollback transaction
|
230
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
231
|
+
[1m[35m (0.1ms)[0m rollback transaction
|
232
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
233
|
+
[1m[35m (0.1ms)[0m rollback transaction
|
234
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
235
|
+
[1m[35m (0.1ms)[0m rollback transaction
|
236
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
237
|
+
[1m[35m (0.1ms)[0m rollback transaction
|
238
|
+
Connecting to database specified by database.yml
|
239
|
+
[1m[36m (0.3ms)[0m [1mbegin transaction[0m
|
240
|
+
Processing by WelcomeController#index as HTML
|
241
|
+
Rendered welcome/index.html.erb within layouts/application (37.5ms)
|
242
|
+
Completed 200 OK in 53ms (Views: 52.9ms | ActiveRecord: 0.0ms)
|
243
|
+
[1m[35m (0.1ms)[0m rollback transaction
|
244
|
+
Connecting to database specified by database.yml
|
245
|
+
[1m[36m (0.3ms)[0m [1mbegin transaction[0m
|
246
|
+
[1m[35m (0.1ms)[0m rollback transaction
|
247
|
+
[1m[36m (0.0ms)[0m [1mbegin transaction[0m
|
248
|
+
Processing by WelcomeController#index as HTML
|
249
|
+
Completed 200 OK in 53ms (Views: 52.1ms | ActiveRecord: 0.0ms)
|
250
|
+
[1m[35m (0.1ms)[0m rollback transaction
|
251
|
+
Connecting to database specified by database.yml
|
252
|
+
[1m[36m (0.3ms)[0m [1mbegin transaction[0m
|
253
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
254
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
255
|
+
Processing by WelcomeController#index as HTML
|
256
|
+
Completed 200 OK in 56ms (Views: 55.5ms | ActiveRecord: 0.0ms)
|
257
|
+
[1m[35m (0.1ms)[0m rollback transaction
|
258
|
+
Connecting to database specified by database.yml
|
259
|
+
[1m[36m (0.3ms)[0m [1mbegin transaction[0m
|
260
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
261
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
262
|
+
Processing by WelcomeController#index as HTML
|
263
|
+
Completed 200 OK in 54ms (Views: 53.2ms | ActiveRecord: 0.0ms)
|
264
|
+
[1m[35m (0.1ms)[0m rollback transaction
|
265
|
+
Connecting to database specified by database.yml
|
266
|
+
[1m[36m (0.3ms)[0m [1mbegin transaction[0m
|
267
|
+
[1m[35m (0.1ms)[0m rollback transaction
|
268
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
269
|
+
Processing by WelcomeController#index as HTML
|
270
|
+
Completed 200 OK in 53ms (Views: 52.6ms | ActiveRecord: 0.0ms)
|
271
|
+
[1m[35m (0.1ms)[0m rollback transaction
|
272
|
+
Connecting to database specified by database.yml
|
273
|
+
[1m[36m (0.3ms)[0m [1mbegin transaction[0m
|
274
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
275
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
276
|
+
Processing by WelcomeController#index as HTML
|
277
|
+
Completed 200 OK in 53ms (Views: 52.4ms | ActiveRecord: 0.0ms)
|
278
|
+
[1m[35m (0.1ms)[0m rollback transaction
|
279
|
+
Connecting to database specified by database.yml
|
280
|
+
[1m[36m (0.3ms)[0m [1mbegin transaction[0m
|
281
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
282
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
283
|
+
Processing by WelcomeController#index as HTML
|
284
|
+
Completed 200 OK in 53ms (Views: 52.3ms | ActiveRecord: 0.0ms)
|
285
|
+
[1m[35m (0.1ms)[0m rollback transaction
|
286
|
+
Connecting to database specified by database.yml
|
287
|
+
[1m[36m (0.3ms)[0m [1mbegin transaction[0m
|
288
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
289
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
290
|
+
Processing by WelcomeController#index as HTML
|
291
|
+
Completed 200 OK in 54ms (Views: 53.1ms | ActiveRecord: 0.0ms)
|
292
|
+
[1m[35m (0.1ms)[0m rollback transaction
|
293
|
+
Connecting to database specified by database.yml
|
294
|
+
[1m[36m (0.3ms)[0m [1mbegin transaction[0m
|
295
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
296
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
297
|
+
Processing by WelcomeController#index as HTML
|
298
|
+
Completed 200 OK in 53ms (Views: 52.6ms | ActiveRecord: 0.0ms)
|
299
|
+
[1m[35m (0.1ms)[0m rollback transaction
|
300
|
+
Connecting to database specified by database.yml
|
301
|
+
[1m[36m (0.3ms)[0m [1mbegin transaction[0m
|
302
|
+
[1m[35m (0.1ms)[0m rollback transaction
|
303
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
304
|
+
Processing by WelcomeController#index as HTML
|
305
|
+
Completed 200 OK in 57ms (Views: 56.1ms | ActiveRecord: 0.0ms)
|
306
|
+
[1m[35m (0.1ms)[0m rollback transaction
|
307
|
+
Connecting to database specified by database.yml
|
308
|
+
[1m[36m (0.3ms)[0m [1mbegin transaction[0m
|
309
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
310
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
311
|
+
Processing by WelcomeController#index as HTML
|
312
|
+
Completed 200 OK in 54ms (Views: 53.7ms | ActiveRecord: 0.0ms)
|
313
|
+
[1m[35m (0.1ms)[0m rollback transaction
|
314
|
+
Connecting to database specified by database.yml
|
315
|
+
[1m[36m (0.3ms)[0m [1mbegin transaction[0m
|
316
|
+
[1m[35m (0.1ms)[0m rollback transaction
|
317
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
318
|
+
Processing by WelcomeController#index as HTML
|
319
|
+
Completed 200 OK in 53ms (Views: 52.4ms | ActiveRecord: 0.0ms)
|
320
|
+
[1m[35m (0.1ms)[0m rollback transaction
|
321
|
+
Connecting to database specified by database.yml
|
322
|
+
Connecting to database specified by database.yml
|
323
|
+
[1m[36m (0.3ms)[0m [1mbegin transaction[0m
|
324
|
+
|
325
|
+
|
326
|
+
Started GET "/" for 127.0.0.1 at 2012-10-14 01:06:48 +0800
|
327
|
+
Processing by WelcomeController#index as HTML
|
328
|
+
Rendered welcome/index.html.erb within layouts/application (3.1ms)
|
329
|
+
Completed 200 OK in 67ms (Views: 66.6ms | ActiveRecord: 0.0ms)
|
330
|
+
[1m[35m (0.1ms)[0m rollback transaction
|
331
|
+
Connecting to database specified by database.yml
|
332
|
+
[1m[36m (0.3ms)[0m [1mbegin transaction[0m
|
333
|
+
[1m[35m (0.0ms)[0m rollback transaction
|
334
|
+
Connecting to database specified by database.yml
|
335
|
+
[1m[36m (0.3ms)[0m [1mbegin transaction[0m
|
336
|
+
|
337
|
+
|
338
|
+
Started GET "/" for 127.0.0.1 at 2012-10-14 01:08:13 +0800
|
339
|
+
Processing by WelcomeController#index as HTML
|
340
|
+
Rendered welcome/index.html.erb within layouts/application (3.0ms)
|
341
|
+
Completed 200 OK in 63ms (Views: 62.7ms | ActiveRecord: 0.0ms)
|
342
|
+
[1m[35m (0.1ms)[0m rollback transaction
|
343
|
+
Connecting to database specified by database.yml
|
344
|
+
[1m[36m (0.3ms)[0m [1mbegin transaction[0m
|
345
|
+
|
346
|
+
|
347
|
+
Started GET "/" for 127.0.0.1 at 2012-10-14 01:08:32 +0800
|
348
|
+
Processing by WelcomeController#index as HTML
|
349
|
+
Rendered welcome/index.html.erb within layouts/application (3.2ms)
|
350
|
+
Completed 200 OK in 64ms (Views: 63.2ms | ActiveRecord: 0.0ms)
|
351
|
+
[1m[35m (0.1ms)[0m rollback transaction
|
352
|
+
Connecting to database specified by database.yml
|
353
|
+
[1m[36m (0.3ms)[0m [1mbegin transaction[0m
|
354
|
+
|
355
|
+
|
356
|
+
Started GET "/" for 127.0.0.1 at 2012-10-14 01:09:02 +0800
|
357
|
+
Processing by WelcomeController#index as HTML
|
358
|
+
Rendered welcome/index.html.erb within layouts/application (3.1ms)
|
359
|
+
Completed 200 OK in 66ms (Views: 65.0ms | ActiveRecord: 0.0ms)
|
360
|
+
[1m[35m (0.1ms)[0m rollback transaction
|
361
|
+
Connecting to database specified by database.yml
|
362
|
+
[1m[36m (0.3ms)[0m [1mbegin transaction[0m
|
363
|
+
|
364
|
+
|
365
|
+
Started GET "/" for 127.0.0.1 at 2012-10-14 01:09:57 +0800
|
366
|
+
Processing by WelcomeController#index as HTML
|
367
|
+
Rendered welcome/index.html.erb within layouts/application (3.1ms)
|
368
|
+
Completed 200 OK in 64ms (Views: 63.7ms | ActiveRecord: 0.0ms)
|
369
|
+
[1m[35m (0.1ms)[0m rollback transaction
|
370
|
+
Connecting to database specified by database.yml
|
371
|
+
[1m[36m (0.3ms)[0m [1mbegin transaction[0m
|
372
|
+
|
373
|
+
|
374
|
+
Started GET "/" for 127.0.0.1 at 2012-10-14 01:10:52 +0800
|
375
|
+
Processing by WelcomeController#index as HTML
|
376
|
+
Rendered welcome/index.html.erb within layouts/application (3.1ms)
|
377
|
+
Completed 200 OK in 74ms (Views: 73.7ms | ActiveRecord: 0.0ms)
|
378
|
+
[1m[35m (0.1ms)[0m rollback transaction
|
379
|
+
Connecting to database specified by database.yml
|
380
|
+
[1m[36m (0.3ms)[0m [1mbegin transaction[0m
|
381
|
+
|
382
|
+
|
383
|
+
Started GET "/" for 127.0.0.1 at 2012-10-14 01:14:50 +0800
|
384
|
+
Processing by WelcomeController#index as HTML
|
385
|
+
Rendered welcome/index.html.erb within layouts/application (3.7ms)
|
386
|
+
Completed 200 OK in 67ms (Views: 66.1ms | ActiveRecord: 0.0ms)
|
387
|
+
[1m[35m (0.1ms)[0m rollback transaction
|
388
|
+
Connecting to database specified by database.yml
|
389
|
+
[1m[36m (0.3ms)[0m [1mbegin transaction[0m
|
390
|
+
|
391
|
+
|
392
|
+
Started GET "/" for 127.0.0.1 at 2012-10-14 01:15:19 +0800
|
393
|
+
Processing by WelcomeController#index as HTML
|
394
|
+
Rendered welcome/index.html.erb within layouts/application (3.2ms)
|
395
|
+
Completed 200 OK in 67ms (Views: 66.9ms | ActiveRecord: 0.0ms)
|
396
|
+
[1m[35m (0.1ms)[0m rollback transaction
|
397
|
+
Connecting to database specified by database.yml
|
398
|
+
[1m[36m (0.3ms)[0m [1mbegin transaction[0m
|
399
|
+
|
400
|
+
|
401
|
+
Started GET "/" for 127.0.0.1 at 2012-10-14 01:15:45 +0800
|
402
|
+
Processing by WelcomeController#index as HTML
|
403
|
+
Rendered welcome/index.html.erb within layouts/application (3.1ms)
|
404
|
+
Completed 200 OK in 65ms (Views: 64.4ms | ActiveRecord: 0.0ms)
|
405
|
+
[1m[35m (0.1ms)[0m rollback transaction
|
406
|
+
Connecting to database specified by database.yml
|
407
|
+
Connecting to database specified by database.yml
|
408
|
+
Connecting to database specified by database.yml
|
409
|
+
Connecting to database specified by database.yml
|
410
|
+
[1m[36m (0.3ms)[0m [1mbegin transaction[0m
|
411
|
+
[1m[35m (0.1ms)[0m rollback transaction
|
412
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
413
|
+
Processing by WelcomeController#index as HTML
|
414
|
+
Completed 200 OK in 34ms (Views: 33.9ms | ActiveRecord: 0.0ms)
|
415
|
+
[1m[35m (0.1ms)[0m rollback transaction
|
@@ -33,12 +33,12 @@ describe ApplicationHelper do
|
|
33
33
|
|
34
34
|
it "should return flash message" do
|
35
35
|
stub!(:flash).and_return({:warning => "Update Success!"})
|
36
|
-
notice_message.should == "<div class=\"alert fade in alert-warning\"><a class=\"close\" data-dismiss=\"alert\"
|
36
|
+
notice_message.should == "<div class=\"alert fade in alert-warning\"><a href=\"#\" class=\"close\" data-dismiss=\"alert\">x</a>Update Success!</div>"
|
37
37
|
end
|
38
38
|
|
39
39
|
it "should return alert-success message when use notice message" do
|
40
40
|
stub!(:flash).and_return({:notice => "Update Success!"})
|
41
|
-
notice_message.should ==
|
41
|
+
notice_message.should == "<div class=\"alert fade in alert-success\"><a href=\"#\" class=\"close\" data-dismiss=\"alert\">x</a>Update Success!</div>"
|
42
42
|
end
|
43
43
|
|
44
44
|
end
|
data/spec/spec_helper.rb
CHANGED
@@ -21,7 +21,6 @@ RSpec.configure do |config|
|
|
21
21
|
# config.mock_with :mocha
|
22
22
|
# config.mock_with :flexmock
|
23
23
|
# config.mock_with :rr
|
24
|
-
config.include Capybara::DSL
|
25
24
|
|
26
25
|
# Remove this line if you're not using ActiveRecord or ActiveRecord fixtures
|
27
26
|
config.fixture_path = "#{::Rails.root}/spec/fixtures"
|
metadata
CHANGED
@@ -1,38 +1,32 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: bootstrap_helper
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.
|
5
|
-
prerelease:
|
4
|
+
version: 2.2.0
|
5
|
+
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
8
8
|
- xdite
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2013-
|
12
|
+
date: 2013-04-25 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: railties
|
16
16
|
requirement: !ruby/object:Gem::Requirement
|
17
17
|
none: false
|
18
18
|
requirements:
|
19
|
-
- -
|
20
|
-
- !ruby/object:Gem::Version
|
21
|
-
version: 4.1.0
|
22
|
-
- - ! '>='
|
19
|
+
- - ~>
|
23
20
|
- !ruby/object:Gem::Version
|
24
|
-
version:
|
21
|
+
version: '3.0'
|
25
22
|
type: :runtime
|
26
23
|
prerelease: false
|
27
24
|
version_requirements: !ruby/object:Gem::Requirement
|
28
25
|
none: false
|
29
26
|
requirements:
|
30
|
-
- -
|
31
|
-
- !ruby/object:Gem::Version
|
32
|
-
version: 4.1.0
|
33
|
-
- - ! '>='
|
27
|
+
- - ~>
|
34
28
|
- !ruby/object:Gem::Version
|
35
|
-
version:
|
29
|
+
version: '3.0'
|
36
30
|
- !ruby/object:Gem::Dependency
|
37
31
|
name: thor
|
38
32
|
requirement: !ruby/object:Gem::Requirement
|
@@ -54,17 +48,17 @@ dependencies:
|
|
54
48
|
requirement: !ruby/object:Gem::Requirement
|
55
49
|
none: false
|
56
50
|
requirements:
|
57
|
-
- -
|
51
|
+
- - ~>
|
58
52
|
- !ruby/object:Gem::Version
|
59
|
-
version:
|
53
|
+
version: 2.0.2
|
60
54
|
type: :runtime
|
61
55
|
prerelease: false
|
62
56
|
version_requirements: !ruby/object:Gem::Requirement
|
63
57
|
none: false
|
64
58
|
requirements:
|
65
|
-
- -
|
59
|
+
- - ~>
|
66
60
|
- !ruby/object:Gem::Version
|
67
|
-
version:
|
61
|
+
version: 2.0.2
|
68
62
|
- !ruby/object:Gem::Dependency
|
69
63
|
name: will_paginate
|
70
64
|
requirement: !ruby/object:Gem::Requirement
|
@@ -150,23 +144,17 @@ dependencies:
|
|
150
144
|
requirement: !ruby/object:Gem::Requirement
|
151
145
|
none: false
|
152
146
|
requirements:
|
153
|
-
- -
|
154
|
-
- !ruby/object:Gem::Version
|
155
|
-
version: 4.1.0
|
156
|
-
- - ! '>='
|
147
|
+
- - ~>
|
157
148
|
- !ruby/object:Gem::Version
|
158
|
-
version:
|
149
|
+
version: '3.0'
|
159
150
|
type: :development
|
160
151
|
prerelease: false
|
161
152
|
version_requirements: !ruby/object:Gem::Requirement
|
162
153
|
none: false
|
163
154
|
requirements:
|
164
|
-
- -
|
165
|
-
- !ruby/object:Gem::Version
|
166
|
-
version: 4.1.0
|
167
|
-
- - ! '>='
|
155
|
+
- - ~>
|
168
156
|
- !ruby/object:Gem::Version
|
169
|
-
version:
|
157
|
+
version: '3.0'
|
170
158
|
description: Twitter Bootstrap HTML Helper
|
171
159
|
email:
|
172
160
|
- xuite.joke@gmail.com
|
@@ -222,6 +210,7 @@ files:
|
|
222
210
|
- spec/dummy/lib/assets/.gitkeep
|
223
211
|
- spec/dummy/log/.gitkeep
|
224
212
|
- spec/dummy/log/development.log
|
213
|
+
- spec/dummy/log/test.log
|
225
214
|
- spec/dummy/public/404.html
|
226
215
|
- spec/dummy/public/422.html
|
227
216
|
- spec/dummy/public/500.html
|
@@ -242,15 +231,12 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
242
231
|
- - ! '>='
|
243
232
|
- !ruby/object:Gem::Version
|
244
233
|
version: '0'
|
245
|
-
segments:
|
246
|
-
- 0
|
247
|
-
hash: -613026026600190901
|
248
234
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
249
235
|
none: false
|
250
236
|
requirements:
|
251
|
-
- - ! '
|
237
|
+
- - ! '>='
|
252
238
|
- !ruby/object:Gem::Version
|
253
|
-
version:
|
239
|
+
version: '0'
|
254
240
|
requirements: []
|
255
241
|
rubyforge_project:
|
256
242
|
rubygems_version: 1.8.25
|
@@ -290,6 +276,7 @@ test_files:
|
|
290
276
|
- spec/dummy/lib/assets/.gitkeep
|
291
277
|
- spec/dummy/log/.gitkeep
|
292
278
|
- spec/dummy/log/development.log
|
279
|
+
- spec/dummy/log/test.log
|
293
280
|
- spec/dummy/public/404.html
|
294
281
|
- spec/dummy/public/422.html
|
295
282
|
- spec/dummy/public/500.html
|