ajaxify_rails 0.2.1 → 0.5
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.
- data/.gitignore +4 -0
- data/.rspec +2 -0
- data/.travis.yml +5 -0
- data/README.md +4 -3
- data/Rakefile +13 -0
- data/ajaxify_rails.gemspec +11 -0
- data/lib/ajaxify_rails/version.rb +1 -1
- data/spec/ajaxify_test/Rakefile +7 -0
- data/spec/ajaxify_test/app/assets/images/ajax-loader-y.gif +0 -0
- data/spec/ajaxify_test/app/assets/images/ajax-loader.gif +0 -0
- data/spec/ajaxify_test/app/assets/javascripts/application.js +17 -0
- data/spec/ajaxify_test/app/assets/javascripts/home.js.coffee +16 -0
- data/spec/ajaxify_test/app/assets/javascripts/main.js.coffee +33 -0
- data/spec/ajaxify_test/app/assets/stylesheets/application.css +13 -0
- data/spec/ajaxify_test/app/assets/stylesheets/home.css.scss +93 -0
- data/spec/ajaxify_test/app/controllers/application_controller.rb +19 -0
- data/spec/ajaxify_test/app/controllers/home_controller.rb +34 -0
- data/spec/ajaxify_test/app/helpers/application_helper.rb +2 -0
- data/spec/ajaxify_test/app/helpers/home_helper.rb +2 -0
- data/spec/ajaxify_test/app/mailers/.gitkeep +0 -0
- data/spec/ajaxify_test/app/models/.gitkeep +0 -0
- data/spec/ajaxify_test/app/views/home/index.html.haml +1 -0
- data/spec/ajaxify_test/app/views/home/page1.html.haml +1 -0
- data/spec/ajaxify_test/app/views/home/page2.html.haml +10 -0
- data/spec/ajaxify_test/app/views/home/page3.html.haml +1 -0
- data/spec/ajaxify_test/app/views/layouts/application.html.haml +47 -0
- data/spec/ajaxify_test/config.ru +4 -0
- data/spec/ajaxify_test/config/application.rb +61 -0
- data/spec/ajaxify_test/config/boot.rb +19 -0
- data/spec/ajaxify_test/config/database.yml +25 -0
- data/spec/ajaxify_test/config/environment.rb +5 -0
- data/spec/ajaxify_test/config/environments/development.rb +37 -0
- data/spec/ajaxify_test/config/environments/production.rb +67 -0
- data/spec/ajaxify_test/config/environments/test.rb +34 -0
- data/spec/ajaxify_test/config/initializers/backtrace_silencers.rb +7 -0
- data/spec/ajaxify_test/config/initializers/inflections.rb +15 -0
- data/spec/ajaxify_test/config/initializers/mime_types.rb +5 -0
- data/spec/ajaxify_test/config/initializers/secret_token.rb +7 -0
- data/spec/ajaxify_test/config/initializers/session_store.rb +8 -0
- data/spec/ajaxify_test/config/initializers/wrap_parameters.rb +14 -0
- data/spec/ajaxify_test/config/locales/en.yml +5 -0
- data/spec/ajaxify_test/config/routes.rb +12 -0
- data/spec/ajaxify_test/db/development.sqlite3 +0 -0
- data/spec/ajaxify_test/db/seeds.rb +7 -0
- data/spec/ajaxify_test/db/test.sqlite3 +0 -0
- data/spec/ajaxify_test/lib/assets/.gitkeep +0 -0
- data/spec/ajaxify_test/lib/tasks/.gitkeep +0 -0
- data/spec/ajaxify_test/public/404.html +26 -0
- data/spec/ajaxify_test/public/422.html +26 -0
- data/spec/ajaxify_test/public/500.html +25 -0
- data/spec/ajaxify_test/public/favicon.ico +0 -0
- data/spec/ajaxify_test/public/robots.txt +5 -0
- data/spec/ajaxify_test/script/rails +6 -0
- data/spec/integration/ajaxify_rails_spec.rb +167 -0
- data/spec/spec_helper.rb +86 -0
- data/vendor/assets/javascripts/ajaxify_rails.js.coffee +103 -88
- metadata +252 -5
data/spec/spec_helper.rb
ADDED
@@ -0,0 +1,86 @@
|
|
1
|
+
# This file was generated by the `rspec --init` command. Conventionally, all
|
2
|
+
# specs live under a `spec` directory, which RSpec adds to the `$LOAD_PATH`.
|
3
|
+
# Require this file using `require "spec_helper.rb"` to ensure that it is only
|
4
|
+
# loaded once.
|
5
|
+
#
|
6
|
+
# See http://rubydoc.info/gems/rspec-core/RSpec/Core/Configuration
|
7
|
+
|
8
|
+
ENV["RAILS_ENV"] = 'test'
|
9
|
+
require_relative "ajaxify_test/config/environment"
|
10
|
+
|
11
|
+
require 'rspec/rails'
|
12
|
+
require 'rspec-steps'
|
13
|
+
require 'sqlite3'
|
14
|
+
|
15
|
+
require 'haml'
|
16
|
+
|
17
|
+
# Add this to load Capybara integration:
|
18
|
+
require 'capybara/rspec'
|
19
|
+
require 'capybara/rails'
|
20
|
+
|
21
|
+
# require 'capybara/poltergeist'
|
22
|
+
|
23
|
+
# Capybara.register_driver :poltergeist do |app|
|
24
|
+
# # Specifiying the phantomjs path only for RubyMine which fails to pick it up otherwise
|
25
|
+
# Capybara::Poltergeist::Driver.new(app, phantomjs: '/usr/local/bin/phantomjs') #, inspector: true
|
26
|
+
# end
|
27
|
+
|
28
|
+
# Capybara.javascript_driver = :poltergeist
|
29
|
+
# Capybara.current_driver = :poltergeist
|
30
|
+
|
31
|
+
Capybara.default_selector = :css
|
32
|
+
Capybara.default_wait_time = 3
|
33
|
+
|
34
|
+
RSpec.configure do |config|
|
35
|
+
config.treat_symbols_as_metadata_keys_with_true_values = true
|
36
|
+
#config.run_all_when_everything_filtered = true
|
37
|
+
config.include Capybara::DSL
|
38
|
+
end
|
39
|
+
|
40
|
+
|
41
|
+
def wait_until_gone css
|
42
|
+
page.should have_no_css(css)
|
43
|
+
end
|
44
|
+
|
45
|
+
def wait_for_ajaxify_loaded
|
46
|
+
wait_until_gone ".ajaxify_loader"
|
47
|
+
end
|
48
|
+
|
49
|
+
def click_browser_back_button
|
50
|
+
page.execute_script("window.history.back()")
|
51
|
+
end
|
52
|
+
|
53
|
+
def click_browser_forward_button
|
54
|
+
page.execute_script("window.history.forward()")
|
55
|
+
end
|
56
|
+
|
57
|
+
def ensure_layout_not_reloaded
|
58
|
+
find('body')['data-id'].to_s.should eq(@layout_id), "Layout has been reloaded but shouldn't"
|
59
|
+
end
|
60
|
+
|
61
|
+
def should_have_content content
|
62
|
+
page.should have_css('#main', text: content)
|
63
|
+
end
|
64
|
+
|
65
|
+
def should_have_notice notice
|
66
|
+
page.should have_css('#notice', text: notice)
|
67
|
+
end
|
68
|
+
|
69
|
+
def disable_push_state
|
70
|
+
page.execute_script("window.history.pushState = null;")
|
71
|
+
end
|
72
|
+
|
73
|
+
def current_hash
|
74
|
+
URI.parse(current_url).fragment.to_s
|
75
|
+
end
|
76
|
+
|
77
|
+
def hash_path_should_be path
|
78
|
+
current_hash.should == path
|
79
|
+
current_path.should == '/'
|
80
|
+
end
|
81
|
+
|
82
|
+
def push_state_path_should_be path
|
83
|
+
current_hash.should == ''
|
84
|
+
current_path.should == path
|
85
|
+
end
|
86
|
+
|
@@ -4,6 +4,7 @@ content_container = 'main'
|
|
4
4
|
base_paths = null
|
5
5
|
flash_types = ['notice']
|
6
6
|
dont_correct_url = false
|
7
|
+
push_state_enabled = true
|
7
8
|
|
8
9
|
ignore_hash_change = null
|
9
10
|
load_page_from_hash = null
|
@@ -16,6 +17,10 @@ initial_history_state =
|
|
16
17
|
base_path_regexp_cache = null
|
17
18
|
|
18
19
|
|
20
|
+
# --------------------------------------------------------------------------------------------------------------------
|
21
|
+
# public methods
|
22
|
+
# --------------------------------------------------------------------------------------------------------------------
|
23
|
+
|
19
24
|
activate = (new_active = true) ->
|
20
25
|
active = new_active
|
21
26
|
|
@@ -26,12 +31,20 @@ set_content_container = (new_content_container) ->
|
|
26
31
|
content_container = new_content_container
|
27
32
|
|
28
33
|
|
29
|
-
|
34
|
+
init = (options = {}) ->
|
35
|
+
base_paths = options.base_paths if 'base_paths' of options
|
36
|
+
flash_types = options.flash_types if 'flash_types' of options
|
37
|
+
push_state_enabled = options.push_state_enabled if 'push_state_enabled' of options
|
38
|
+
active = options.active if 'active' of options
|
39
|
+
content_container = options.content_container if 'content_container' of options
|
40
|
+
correct_url() unless $('meta[name="ajaxify:dont_correct_url"]').length > 0
|
30
41
|
|
42
|
+
|
43
|
+
ajaxify = ->
|
31
44
|
if active
|
32
45
|
|
33
|
-
if
|
34
|
-
|
46
|
+
if load_page_from_hash
|
47
|
+
load_page_from_hash = false
|
35
48
|
on_hash_change()
|
36
49
|
|
37
50
|
protocol_and_hostname = "#{window.location.protocol}//#{window.location.hostname}"
|
@@ -65,7 +78,6 @@ ajaxify = ->
|
|
65
78
|
|
66
79
|
false
|
67
80
|
|
68
|
-
|
69
81
|
# (history interface browsers only)
|
70
82
|
$(window).on 'popstate', (e) ->
|
71
83
|
e = e.originalEvent
|
@@ -73,7 +85,6 @@ ajaxify = ->
|
|
73
85
|
e.state.cache = false
|
74
86
|
load e.state, true
|
75
87
|
|
76
|
-
|
77
88
|
# (non history interface browsers only)
|
78
89
|
window.onhashchange = ->
|
79
90
|
unless ignore_hash_change
|
@@ -82,36 +93,8 @@ ajaxify = ->
|
|
82
93
|
ignore_hash_change = false
|
83
94
|
|
84
95
|
|
85
|
-
base_path_regexp = ->
|
86
|
-
return null unless base_paths
|
87
|
-
return base_path_regexp_cache if base_path_regexp_cache
|
88
|
-
# match starting and ending with base path, e.g. "^\/en$" (i.e. we are at the base path root) or
|
89
|
-
# starting with base path and continuing with '/', e.g. "^\/en\/" (i.e. we are NOT at the base path root) or
|
90
|
-
# starting with base path and continuing with '?', e.g. "^\/en\?" (i.e. we are at the base path root and have query params)
|
91
|
-
base_path_regexp_cache = new RegExp("^\/(#{ $.map(base_paths, (el) ->
|
92
|
-
el = regexp_escape el
|
93
|
-
"#{el}($|\/|\\?)"
|
94
|
-
).join('|')})", 'i')
|
95
|
-
|
96
|
-
|
97
|
-
# load content from url hash (non history interface browsers)
|
98
|
-
on_hash_change = ->
|
99
|
-
url = window.location.hash.replace(/#/, "")
|
100
|
-
|
101
|
-
if match = window.location.pathname.match(base_path_regexp())
|
102
|
-
url = match[0] + url
|
103
|
-
|
104
|
-
url = '/' if url == ''
|
105
|
-
hash_changed = true
|
106
|
-
|
107
|
-
load
|
108
|
-
url: url
|
109
|
-
, true
|
110
|
-
|
111
|
-
|
112
96
|
load = (options, pop_state = false) ->
|
113
|
-
|
114
|
-
unless Ajaxify.load_page_from_hash
|
97
|
+
unless load_page_from_hash
|
115
98
|
|
116
99
|
data = options.data || { ajaxified: true }
|
117
100
|
|
@@ -145,44 +128,9 @@ load = (options, pop_state = false) ->
|
|
145
128
|
on_ajaxify_success data, status, jqXHR, pop_state, options
|
146
129
|
|
147
130
|
|
148
|
-
|
149
|
-
|
150
|
-
|
151
|
-
$("##{this}").html flashes[this]
|
152
|
-
$("##{this}").show()
|
153
|
-
$(document).trigger 'ajaxify:flash_displayed', [this]
|
154
|
-
|
155
|
-
else
|
156
|
-
$("##{this}").hide()
|
157
|
-
|
158
|
-
|
159
|
-
on_ajaxify_success = (data, status, jqXHR, pop_state, options) ->
|
160
|
-
|
161
|
-
$("##{content_container}").html data
|
162
|
-
|
163
|
-
title = $('#ajaxify_content').data('page-title')
|
164
|
-
flashes = $('#ajaxify_content').data('flashes')
|
165
|
-
|
166
|
-
# Correct the url after a redirect and when it has the ajaxify param in it.
|
167
|
-
# The latter can happen e.g. for pagination links that are auto generated.
|
168
|
-
current_url = $('#ajaxify_content #ajaxify_location').html()
|
169
|
-
if options.url != current_url
|
170
|
-
options.url = current_url.replace(/(&|&|\?)ajaxify_redirect=true/,'')
|
171
|
-
options.type = 'GET'
|
172
|
-
|
173
|
-
update_url options, pop_state
|
174
|
-
|
175
|
-
$(document).trigger 'ajaxify:content_inserted'
|
176
|
-
|
177
|
-
$("##{content_container} #ajaxify_content").remove()
|
178
|
-
|
179
|
-
if title
|
180
|
-
document.title = title.replace /&/, '&' # Todo: need to figure out what else needs to be unescaped
|
181
|
-
|
182
|
-
show_flashes(flashes)
|
183
|
-
|
184
|
-
$(document).trigger('ajaxify:content_loaded', [data, status, jqXHR, options.url])
|
185
|
-
|
131
|
+
# --------------------------------------------------------------------------------------------------------------------
|
132
|
+
# private methods
|
133
|
+
# --------------------------------------------------------------------------------------------------------------------
|
186
134
|
|
187
135
|
update_url = (options, pop_state = false) ->
|
188
136
|
|
@@ -191,7 +139,7 @@ update_url = (options, pop_state = false) ->
|
|
191
139
|
# unless back/forward arrowing or request method is not 'get'
|
192
140
|
if !pop_state and get_request
|
193
141
|
|
194
|
-
if
|
142
|
+
if push_state()
|
195
143
|
|
196
144
|
if initial_history_state != ''
|
197
145
|
window.history.replaceState initial_history_state, ''
|
@@ -216,15 +164,41 @@ update_url = (options, pop_state = false) ->
|
|
216
164
|
window.location.hash = hash
|
217
165
|
|
218
166
|
|
167
|
+
on_ajaxify_success = (data, status, jqXHR, pop_state, options) ->
|
168
|
+
|
169
|
+
$("##{content_container}").html data
|
170
|
+
|
171
|
+
title = $('#ajaxify_content').data('page-title')
|
172
|
+
flashes = $('#ajaxify_content').data('flashes')
|
173
|
+
|
174
|
+
# Correct the url after a redirect and when it has the ajaxify param in it.
|
175
|
+
# The latter can happen e.g. for pagination links that are auto generated.
|
176
|
+
current_url = $('#ajaxify_content #ajaxify_location').html()
|
177
|
+
if options.url != current_url
|
178
|
+
options.url = current_url.replace(/(&|&|\?)ajaxify_redirect=true/,'')
|
179
|
+
options.type = 'GET'
|
180
|
+
|
181
|
+
update_url options, pop_state
|
182
|
+
|
183
|
+
$(document).trigger 'ajaxify:content_inserted'
|
184
|
+
|
185
|
+
$("##{content_container} #ajaxify_content").remove()
|
186
|
+
|
187
|
+
if title
|
188
|
+
document.title = title.replace /&/, '&' # Todo: need to figure out what else needs to be unescaped
|
189
|
+
|
190
|
+
show_flashes(flashes)
|
191
|
+
|
192
|
+
$(document).trigger('ajaxify:content_loaded', [data, status, jqXHR, options.url])
|
193
|
+
|
194
|
+
|
219
195
|
correct_url = ->
|
220
196
|
if active
|
221
|
-
|
222
197
|
if window.location.hash.indexOf('#') == 0 # if url has a '#' in it treat it as a non history interface hash based scheme url
|
223
|
-
|
224
198
|
return unless window.location.hash.match(/^#(\/|\?)/) # check hash format
|
225
199
|
|
226
|
-
if !
|
227
|
-
|
200
|
+
if !push_state()
|
201
|
+
load_page_from_hash = true # notify Ajaxify that a hash will be loaded and ignore all other calls to load until hash url is loaded
|
228
202
|
else
|
229
203
|
# load proper url in case browser supports history api
|
230
204
|
path = window.location.pathname
|
@@ -232,8 +206,7 @@ correct_url = ->
|
|
232
206
|
path = path + window.location.hash.replace(/#/, "")
|
233
207
|
window.location.href = "#{protocol_with_host()}#{path}"
|
234
208
|
|
235
|
-
else if !
|
236
|
-
|
209
|
+
else if !push_state() # move path behind '#' for browsers without history api
|
237
210
|
if base_path_regexp() and (match = window.location.pathname.match(base_path_regexp()))
|
238
211
|
if match[0] == window.location.pathname
|
239
212
|
if window.location.search == ''
|
@@ -251,30 +224,72 @@ correct_url = ->
|
|
251
224
|
|
252
225
|
window.location.href = "#{protocol_with_host()}#{path}#{window.location.search}"
|
253
226
|
|
254
|
-
init = (options = {}) ->
|
255
|
-
base_paths = options.base_paths if 'base_paths' of options
|
256
|
-
flash_types = options.flash_types if 'flash_types' of options
|
257
|
-
active = options.active if 'active' of options
|
258
|
-
content_container = options.content_container if 'content_container' of options
|
259
|
-
correct_url() unless $('meta[name="ajaxify:dont_correct_url"]').length > 0
|
260
227
|
|
261
|
-
|
262
|
-
|
263
|
-
|
228
|
+
show_flashes = (flashes) ->
|
229
|
+
$.each flash_types, ->
|
230
|
+
if flashes and flashes[this]
|
231
|
+
$("##{this}").html flashes[this]
|
232
|
+
$("##{this}").show()
|
233
|
+
$(document).trigger 'ajaxify:flash_displayed', [this]
|
234
|
+
|
235
|
+
else
|
236
|
+
$("##{this}").hide()
|
237
|
+
|
238
|
+
|
239
|
+
# load content from url hash (non history interface browsers)
|
240
|
+
on_hash_change = ->
|
241
|
+
url = window.location.hash.replace(/#/, "")
|
242
|
+
|
243
|
+
if match = window.location.pathname.match(base_path_regexp())
|
244
|
+
url = match[0] + url
|
245
|
+
|
246
|
+
url = '/' if url == ''
|
247
|
+
hash_changed = true
|
248
|
+
|
249
|
+
load
|
250
|
+
url: url
|
251
|
+
, true
|
252
|
+
|
253
|
+
|
254
|
+
base_path_regexp = ->
|
255
|
+
return null unless base_paths
|
256
|
+
return base_path_regexp_cache if base_path_regexp_cache
|
257
|
+
# match starting and ending with base path, e.g. "^\/en$" (i.e. we are at the base path root) or
|
258
|
+
# starting with base path and continuing with '/', e.g. "^\/en\/" (i.e. we are NOT at the base path root) or
|
259
|
+
# starting with base path and continuing with '?', e.g. "^\/en\?" (i.e. we are at the base path root and have query params)
|
260
|
+
base_path_regexp_cache = new RegExp("^\/(#{ $.map(base_paths, (el) ->
|
261
|
+
el = regexp_escape el
|
262
|
+
"#{el}($|\/|\\?)"
|
263
|
+
).join('|')})", 'i')
|
264
|
+
|
264
265
|
|
265
266
|
is_string = (variable) ->
|
266
267
|
Object.prototype.toString.call(variable) == '[object String]'
|
267
268
|
|
269
|
+
|
268
270
|
regexp_escape = (str) ->
|
269
271
|
str.replace new RegExp('[.\\\\+*?\\[\\^\\]$(){}=!<>|:\\-]', 'g'), '\\$&'
|
270
272
|
|
273
|
+
|
271
274
|
protocol_with_host = ->
|
272
275
|
loc = window.location
|
273
276
|
"#{loc.protocol}//#{loc.host}"
|
274
277
|
|
275
278
|
|
279
|
+
push_state = ->
|
280
|
+
push_state_enabled and window.history.pushState
|
281
|
+
|
282
|
+
|
283
|
+
# --------------------------------------------------------------------------------------------------------------------
|
284
|
+
# public interface
|
285
|
+
# --------------------------------------------------------------------------------------------------------------------
|
286
|
+
|
276
287
|
@Ajaxify = { init, ajaxify, load, update_url, activate, set_content_container, get_content_container }
|
277
288
|
|
278
289
|
|
290
|
+
# --------------------------------------------------------------------------------------------------------------------
|
291
|
+
# ajaxify page on dom ready
|
292
|
+
# --------------------------------------------------------------------------------------------------------------------
|
293
|
+
|
279
294
|
jQuery ->
|
280
295
|
Ajaxify.ajaxify()
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: ajaxify_rails
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: '0.5'
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2013-02-
|
12
|
+
date: 2013-02-22 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: rails
|
@@ -27,6 +27,150 @@ dependencies:
|
|
27
27
|
- - ! '>='
|
28
28
|
- !ruby/object:Gem::Version
|
29
29
|
version: 3.1.0
|
30
|
+
- !ruby/object:Gem::Dependency
|
31
|
+
name: jquery-rails
|
32
|
+
requirement: !ruby/object:Gem::Requirement
|
33
|
+
none: false
|
34
|
+
requirements:
|
35
|
+
- - ! '>='
|
36
|
+
- !ruby/object:Gem::Version
|
37
|
+
version: '0'
|
38
|
+
type: :development
|
39
|
+
prerelease: false
|
40
|
+
version_requirements: !ruby/object:Gem::Requirement
|
41
|
+
none: false
|
42
|
+
requirements:
|
43
|
+
- - ! '>='
|
44
|
+
- !ruby/object:Gem::Version
|
45
|
+
version: '0'
|
46
|
+
- !ruby/object:Gem::Dependency
|
47
|
+
name: rspec-rails
|
48
|
+
requirement: !ruby/object:Gem::Requirement
|
49
|
+
none: false
|
50
|
+
requirements:
|
51
|
+
- - '='
|
52
|
+
- !ruby/object:Gem::Version
|
53
|
+
version: '2.9'
|
54
|
+
type: :development
|
55
|
+
prerelease: false
|
56
|
+
version_requirements: !ruby/object:Gem::Requirement
|
57
|
+
none: false
|
58
|
+
requirements:
|
59
|
+
- - '='
|
60
|
+
- !ruby/object:Gem::Version
|
61
|
+
version: '2.9'
|
62
|
+
- !ruby/object:Gem::Dependency
|
63
|
+
name: rspec-steps
|
64
|
+
requirement: !ruby/object:Gem::Requirement
|
65
|
+
none: false
|
66
|
+
requirements:
|
67
|
+
- - ! '>='
|
68
|
+
- !ruby/object:Gem::Version
|
69
|
+
version: '0'
|
70
|
+
type: :development
|
71
|
+
prerelease: false
|
72
|
+
version_requirements: !ruby/object:Gem::Requirement
|
73
|
+
none: false
|
74
|
+
requirements:
|
75
|
+
- - ! '>='
|
76
|
+
- !ruby/object:Gem::Version
|
77
|
+
version: '0'
|
78
|
+
- !ruby/object:Gem::Dependency
|
79
|
+
name: capybara
|
80
|
+
requirement: !ruby/object:Gem::Requirement
|
81
|
+
none: false
|
82
|
+
requirements:
|
83
|
+
- - ! '>='
|
84
|
+
- !ruby/object:Gem::Version
|
85
|
+
version: '0'
|
86
|
+
type: :development
|
87
|
+
prerelease: false
|
88
|
+
version_requirements: !ruby/object:Gem::Requirement
|
89
|
+
none: false
|
90
|
+
requirements:
|
91
|
+
- - ! '>='
|
92
|
+
- !ruby/object:Gem::Version
|
93
|
+
version: '0'
|
94
|
+
- !ruby/object:Gem::Dependency
|
95
|
+
name: selenium-webdriver
|
96
|
+
requirement: !ruby/object:Gem::Requirement
|
97
|
+
none: false
|
98
|
+
requirements:
|
99
|
+
- - ! '>='
|
100
|
+
- !ruby/object:Gem::Version
|
101
|
+
version: 2.30.0
|
102
|
+
type: :development
|
103
|
+
prerelease: false
|
104
|
+
version_requirements: !ruby/object:Gem::Requirement
|
105
|
+
none: false
|
106
|
+
requirements:
|
107
|
+
- - ! '>='
|
108
|
+
- !ruby/object:Gem::Version
|
109
|
+
version: 2.30.0
|
110
|
+
- !ruby/object:Gem::Dependency
|
111
|
+
name: sqlite3
|
112
|
+
requirement: !ruby/object:Gem::Requirement
|
113
|
+
none: false
|
114
|
+
requirements:
|
115
|
+
- - ! '>='
|
116
|
+
- !ruby/object:Gem::Version
|
117
|
+
version: '0'
|
118
|
+
type: :development
|
119
|
+
prerelease: false
|
120
|
+
version_requirements: !ruby/object:Gem::Requirement
|
121
|
+
none: false
|
122
|
+
requirements:
|
123
|
+
- - ! '>='
|
124
|
+
- !ruby/object:Gem::Version
|
125
|
+
version: '0'
|
126
|
+
- !ruby/object:Gem::Dependency
|
127
|
+
name: haml
|
128
|
+
requirement: !ruby/object:Gem::Requirement
|
129
|
+
none: false
|
130
|
+
requirements:
|
131
|
+
- - ! '>='
|
132
|
+
- !ruby/object:Gem::Version
|
133
|
+
version: 3.1.5
|
134
|
+
type: :development
|
135
|
+
prerelease: false
|
136
|
+
version_requirements: !ruby/object:Gem::Requirement
|
137
|
+
none: false
|
138
|
+
requirements:
|
139
|
+
- - ! '>='
|
140
|
+
- !ruby/object:Gem::Version
|
141
|
+
version: 3.1.5
|
142
|
+
- !ruby/object:Gem::Dependency
|
143
|
+
name: sass-rails
|
144
|
+
requirement: !ruby/object:Gem::Requirement
|
145
|
+
none: false
|
146
|
+
requirements:
|
147
|
+
- - ~>
|
148
|
+
- !ruby/object:Gem::Version
|
149
|
+
version: 3.2.3
|
150
|
+
type: :development
|
151
|
+
prerelease: false
|
152
|
+
version_requirements: !ruby/object:Gem::Requirement
|
153
|
+
none: false
|
154
|
+
requirements:
|
155
|
+
- - ~>
|
156
|
+
- !ruby/object:Gem::Version
|
157
|
+
version: 3.2.3
|
158
|
+
- !ruby/object:Gem::Dependency
|
159
|
+
name: coffee-rails
|
160
|
+
requirement: !ruby/object:Gem::Requirement
|
161
|
+
none: false
|
162
|
+
requirements:
|
163
|
+
- - ~>
|
164
|
+
- !ruby/object:Gem::Version
|
165
|
+
version: 3.2.1
|
166
|
+
type: :development
|
167
|
+
prerelease: false
|
168
|
+
version_requirements: !ruby/object:Gem::Requirement
|
169
|
+
none: false
|
170
|
+
requirements:
|
171
|
+
- - ~>
|
172
|
+
- !ruby/object:Gem::Version
|
173
|
+
version: 3.2.1
|
30
174
|
description: ! "Automatically makes your Rails app loading content in the background
|
31
175
|
via ajax. Works by turning all internal links into\n ajax
|
32
176
|
links that trigger an update of the page's content area. Also form submissions are
|
@@ -43,6 +187,8 @@ extensions: []
|
|
43
187
|
extra_rdoc_files: []
|
44
188
|
files:
|
45
189
|
- .gitignore
|
190
|
+
- .rspec
|
191
|
+
- .travis.yml
|
46
192
|
- Gemfile
|
47
193
|
- LICENSE
|
48
194
|
- README.md
|
@@ -51,6 +197,54 @@ files:
|
|
51
197
|
- lib/ajaxify_rails.rb
|
52
198
|
- lib/ajaxify_rails/action_controller_additions.rb
|
53
199
|
- lib/ajaxify_rails/version.rb
|
200
|
+
- spec/ajaxify_test/Rakefile
|
201
|
+
- spec/ajaxify_test/app/assets/images/ajax-loader-y.gif
|
202
|
+
- spec/ajaxify_test/app/assets/images/ajax-loader.gif
|
203
|
+
- spec/ajaxify_test/app/assets/javascripts/application.js
|
204
|
+
- spec/ajaxify_test/app/assets/javascripts/home.js.coffee
|
205
|
+
- spec/ajaxify_test/app/assets/javascripts/main.js.coffee
|
206
|
+
- spec/ajaxify_test/app/assets/stylesheets/application.css
|
207
|
+
- spec/ajaxify_test/app/assets/stylesheets/home.css.scss
|
208
|
+
- spec/ajaxify_test/app/controllers/application_controller.rb
|
209
|
+
- spec/ajaxify_test/app/controllers/home_controller.rb
|
210
|
+
- spec/ajaxify_test/app/helpers/application_helper.rb
|
211
|
+
- spec/ajaxify_test/app/helpers/home_helper.rb
|
212
|
+
- spec/ajaxify_test/app/mailers/.gitkeep
|
213
|
+
- spec/ajaxify_test/app/models/.gitkeep
|
214
|
+
- spec/ajaxify_test/app/views/home/index.html.haml
|
215
|
+
- spec/ajaxify_test/app/views/home/page1.html.haml
|
216
|
+
- spec/ajaxify_test/app/views/home/page2.html.haml
|
217
|
+
- spec/ajaxify_test/app/views/home/page3.html.haml
|
218
|
+
- spec/ajaxify_test/app/views/layouts/application.html.haml
|
219
|
+
- spec/ajaxify_test/config.ru
|
220
|
+
- spec/ajaxify_test/config/application.rb
|
221
|
+
- spec/ajaxify_test/config/boot.rb
|
222
|
+
- spec/ajaxify_test/config/database.yml
|
223
|
+
- spec/ajaxify_test/config/environment.rb
|
224
|
+
- spec/ajaxify_test/config/environments/development.rb
|
225
|
+
- spec/ajaxify_test/config/environments/production.rb
|
226
|
+
- spec/ajaxify_test/config/environments/test.rb
|
227
|
+
- spec/ajaxify_test/config/initializers/backtrace_silencers.rb
|
228
|
+
- spec/ajaxify_test/config/initializers/inflections.rb
|
229
|
+
- spec/ajaxify_test/config/initializers/mime_types.rb
|
230
|
+
- spec/ajaxify_test/config/initializers/secret_token.rb
|
231
|
+
- spec/ajaxify_test/config/initializers/session_store.rb
|
232
|
+
- spec/ajaxify_test/config/initializers/wrap_parameters.rb
|
233
|
+
- spec/ajaxify_test/config/locales/en.yml
|
234
|
+
- spec/ajaxify_test/config/routes.rb
|
235
|
+
- spec/ajaxify_test/db/development.sqlite3
|
236
|
+
- spec/ajaxify_test/db/seeds.rb
|
237
|
+
- spec/ajaxify_test/db/test.sqlite3
|
238
|
+
- spec/ajaxify_test/lib/assets/.gitkeep
|
239
|
+
- spec/ajaxify_test/lib/tasks/.gitkeep
|
240
|
+
- spec/ajaxify_test/public/404.html
|
241
|
+
- spec/ajaxify_test/public/422.html
|
242
|
+
- spec/ajaxify_test/public/500.html
|
243
|
+
- spec/ajaxify_test/public/favicon.ico
|
244
|
+
- spec/ajaxify_test/public/robots.txt
|
245
|
+
- spec/ajaxify_test/script/rails
|
246
|
+
- spec/integration/ajaxify_rails_spec.rb
|
247
|
+
- spec/spec_helper.rb
|
54
248
|
- vendor/assets/javascripts/ajaxify_rails.js.coffee
|
55
249
|
homepage: https://github.com/ncri/ajaxify_rails
|
56
250
|
licenses: []
|
@@ -64,18 +258,71 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
64
258
|
- - ! '>='
|
65
259
|
- !ruby/object:Gem::Version
|
66
260
|
version: '0'
|
261
|
+
segments:
|
262
|
+
- 0
|
263
|
+
hash: 1291222513041922099
|
67
264
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
68
265
|
none: false
|
69
266
|
requirements:
|
70
267
|
- - ! '>='
|
71
268
|
- !ruby/object:Gem::Version
|
72
269
|
version: '0'
|
270
|
+
segments:
|
271
|
+
- 0
|
272
|
+
hash: 1291222513041922099
|
73
273
|
requirements: []
|
74
274
|
rubyforge_project:
|
75
|
-
rubygems_version: 1.8.
|
275
|
+
rubygems_version: 1.8.25
|
76
276
|
signing_key:
|
77
277
|
specification_version: 3
|
78
278
|
summary: Rails gem for automatically turning internal links/forms into ajax links/forms
|
79
279
|
that load content without a full page reload.
|
80
|
-
test_files:
|
81
|
-
|
280
|
+
test_files:
|
281
|
+
- spec/ajaxify_test/Rakefile
|
282
|
+
- spec/ajaxify_test/app/assets/images/ajax-loader-y.gif
|
283
|
+
- spec/ajaxify_test/app/assets/images/ajax-loader.gif
|
284
|
+
- spec/ajaxify_test/app/assets/javascripts/application.js
|
285
|
+
- spec/ajaxify_test/app/assets/javascripts/home.js.coffee
|
286
|
+
- spec/ajaxify_test/app/assets/javascripts/main.js.coffee
|
287
|
+
- spec/ajaxify_test/app/assets/stylesheets/application.css
|
288
|
+
- spec/ajaxify_test/app/assets/stylesheets/home.css.scss
|
289
|
+
- spec/ajaxify_test/app/controllers/application_controller.rb
|
290
|
+
- spec/ajaxify_test/app/controllers/home_controller.rb
|
291
|
+
- spec/ajaxify_test/app/helpers/application_helper.rb
|
292
|
+
- spec/ajaxify_test/app/helpers/home_helper.rb
|
293
|
+
- spec/ajaxify_test/app/mailers/.gitkeep
|
294
|
+
- spec/ajaxify_test/app/models/.gitkeep
|
295
|
+
- spec/ajaxify_test/app/views/home/index.html.haml
|
296
|
+
- spec/ajaxify_test/app/views/home/page1.html.haml
|
297
|
+
- spec/ajaxify_test/app/views/home/page2.html.haml
|
298
|
+
- spec/ajaxify_test/app/views/home/page3.html.haml
|
299
|
+
- spec/ajaxify_test/app/views/layouts/application.html.haml
|
300
|
+
- spec/ajaxify_test/config.ru
|
301
|
+
- spec/ajaxify_test/config/application.rb
|
302
|
+
- spec/ajaxify_test/config/boot.rb
|
303
|
+
- spec/ajaxify_test/config/database.yml
|
304
|
+
- spec/ajaxify_test/config/environment.rb
|
305
|
+
- spec/ajaxify_test/config/environments/development.rb
|
306
|
+
- spec/ajaxify_test/config/environments/production.rb
|
307
|
+
- spec/ajaxify_test/config/environments/test.rb
|
308
|
+
- spec/ajaxify_test/config/initializers/backtrace_silencers.rb
|
309
|
+
- spec/ajaxify_test/config/initializers/inflections.rb
|
310
|
+
- spec/ajaxify_test/config/initializers/mime_types.rb
|
311
|
+
- spec/ajaxify_test/config/initializers/secret_token.rb
|
312
|
+
- spec/ajaxify_test/config/initializers/session_store.rb
|
313
|
+
- spec/ajaxify_test/config/initializers/wrap_parameters.rb
|
314
|
+
- spec/ajaxify_test/config/locales/en.yml
|
315
|
+
- spec/ajaxify_test/config/routes.rb
|
316
|
+
- spec/ajaxify_test/db/development.sqlite3
|
317
|
+
- spec/ajaxify_test/db/seeds.rb
|
318
|
+
- spec/ajaxify_test/db/test.sqlite3
|
319
|
+
- spec/ajaxify_test/lib/assets/.gitkeep
|
320
|
+
- spec/ajaxify_test/lib/tasks/.gitkeep
|
321
|
+
- spec/ajaxify_test/public/404.html
|
322
|
+
- spec/ajaxify_test/public/422.html
|
323
|
+
- spec/ajaxify_test/public/500.html
|
324
|
+
- spec/ajaxify_test/public/favicon.ico
|
325
|
+
- spec/ajaxify_test/public/robots.txt
|
326
|
+
- spec/ajaxify_test/script/rails
|
327
|
+
- spec/integration/ajaxify_rails_spec.rb
|
328
|
+
- spec/spec_helper.rb
|