turboboost 0.0.11 → 0.0.12
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.gitignore +1 -0
- data/Appraisals +17 -0
- data/Gemfile +1 -1
- data/Gemfile.lock +6 -44
- data/README.md +36 -22
- data/Rakefile +2 -0
- data/app/assets/javascripts/turboboost.js.coffee +19 -7
- data/gemfiles/rails_3_2.gemfile +13 -0
- data/gemfiles/rails_3_2.gemfile.lock +135 -0
- data/gemfiles/rails_4_0.gemfile +12 -0
- data/gemfiles/rails_4_0.gemfile.lock +116 -0
- data/gemfiles/rails_4_1.gemfile +12 -0
- data/gemfiles/rails_4_1.gemfile.lock +121 -0
- data/gemfiles/rails_4_2.gemfile +13 -0
- data/gemfiles/rails_4_2.gemfile.lock +150 -0
- data/lib/turboboost.rb +2 -159
- data/lib/turboboost/controller.rb +111 -0
- data/lib/turboboost/form_helper.rb +46 -0
- data/lib/turboboost/version.rb +1 -1
- data/test/controller_test.rb +51 -88
- data/test/controllers/items_controller.rb +23 -0
- data/test/controllers/posts_controller.rb +27 -0
- data/test/controllers/users_controller.rb +32 -0
- data/test/locales/en.yml +4 -0
- data/test/test_helper.rb +27 -15
- data/test/view_test.rb +9 -11
- data/test/views/items/show.html.erb +1 -0
- metadata +24 -3
data/test/view_test.rb
CHANGED
@@ -1,7 +1,6 @@
|
|
1
1
|
require 'test_helper'
|
2
2
|
|
3
3
|
class PostViewTest < ActionView::TestCase
|
4
|
-
|
5
4
|
setup do
|
6
5
|
@post = Post.new
|
7
6
|
end
|
@@ -15,20 +14,19 @@ class PostViewTest < ActionView::TestCase
|
|
15
14
|
end
|
16
15
|
|
17
16
|
def test_form_for
|
18
|
-
with_concat_form_for(@post, turboboost: true, html: { data: { foo:
|
19
|
-
assert_select
|
20
|
-
assert_select
|
17
|
+
with_concat_form_for(@post, turboboost: true, html: { data: { foo: 'bar' } })
|
18
|
+
assert_select 'form[data-remote]'
|
19
|
+
assert_select 'form[data-turboboost]'
|
21
20
|
assert_select "form[data-foo='bar']"
|
22
|
-
assert_select
|
23
|
-
assert_select
|
21
|
+
assert_select 'form.new_post'
|
22
|
+
assert_select 'form#new_post'
|
24
23
|
end
|
25
24
|
|
26
25
|
def test_form_tag
|
27
|
-
with_concat_form_tag(
|
28
|
-
assert_select
|
29
|
-
assert_select
|
26
|
+
with_concat_form_tag('/posts', turboboost: true, class: 'post-form', data: { bar: 'baz' })
|
27
|
+
assert_select 'form[data-remote]'
|
28
|
+
assert_select 'form.post-form'
|
30
29
|
assert_select "form[data-bar='baz']"
|
31
|
-
assert_select
|
30
|
+
assert_select 'form[data-turboboost]'
|
32
31
|
end
|
33
|
-
|
34
32
|
end
|
@@ -0,0 +1 @@
|
|
1
|
+
<div id="item"><%= @item.name %></div>
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: turboboost
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.12
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Justin Talbott
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2015-02-15 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: railties
|
@@ -102,16 +102,32 @@ extensions: []
|
|
102
102
|
extra_rdoc_files: []
|
103
103
|
files:
|
104
104
|
- ".gitignore"
|
105
|
+
- Appraisals
|
105
106
|
- Gemfile
|
106
107
|
- Gemfile.lock
|
107
108
|
- README.md
|
108
109
|
- Rakefile
|
109
110
|
- app/assets/javascripts/turboboost.js.coffee
|
111
|
+
- gemfiles/rails_3_2.gemfile
|
112
|
+
- gemfiles/rails_3_2.gemfile.lock
|
113
|
+
- gemfiles/rails_4_0.gemfile
|
114
|
+
- gemfiles/rails_4_0.gemfile.lock
|
115
|
+
- gemfiles/rails_4_1.gemfile
|
116
|
+
- gemfiles/rails_4_1.gemfile.lock
|
117
|
+
- gemfiles/rails_4_2.gemfile
|
118
|
+
- gemfiles/rails_4_2.gemfile.lock
|
110
119
|
- lib/turboboost.rb
|
120
|
+
- lib/turboboost/controller.rb
|
121
|
+
- lib/turboboost/form_helper.rb
|
111
122
|
- lib/turboboost/version.rb
|
112
123
|
- test/controller_test.rb
|
124
|
+
- test/controllers/items_controller.rb
|
125
|
+
- test/controllers/posts_controller.rb
|
126
|
+
- test/controllers/users_controller.rb
|
127
|
+
- test/locales/en.yml
|
113
128
|
- test/test_helper.rb
|
114
129
|
- test/view_test.rb
|
130
|
+
- test/views/items/show.html.erb
|
115
131
|
- turboboost.gemspec
|
116
132
|
homepage: https://github.com/waymondo/turboboost
|
117
133
|
licenses:
|
@@ -133,12 +149,17 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
133
149
|
version: '0'
|
134
150
|
requirements: []
|
135
151
|
rubyforge_project:
|
136
|
-
rubygems_version: 2.
|
152
|
+
rubygems_version: 2.0.14
|
137
153
|
signing_key:
|
138
154
|
specification_version: 4
|
139
155
|
summary: Turboboost extends the power of Turbolinks into the forms of your Rails app
|
140
156
|
and provides additional convenient AJAX handlers for forms and links.
|
141
157
|
test_files:
|
142
158
|
- test/controller_test.rb
|
159
|
+
- test/controllers/items_controller.rb
|
160
|
+
- test/controllers/posts_controller.rb
|
161
|
+
- test/controllers/users_controller.rb
|
162
|
+
- test/locales/en.yml
|
143
163
|
- test/test_helper.rb
|
144
164
|
- test/view_test.rb
|
165
|
+
- test/views/items/show.html.erb
|