transactional_capybara 0.1.0.pre.3 → 0.1.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,23 @@
1
+ <div ng-app="ajaxApp">
2
+ <div ng-controller="AjaxController as ctrl">
3
+ <p class="message">{{ctrl.message}}</p>
4
+ <a href="#" ng-click="ctrl.doAjax()">Do AJAX</a>
5
+
6
+ <script src="/angular.js"></script>
7
+ <script>
8
+ angular.module('ajaxApp', [])
9
+ .controller('AjaxController', function($http) {
10
+ var self = this;
11
+
12
+ self.message = "Hello";
13
+
14
+ self.doAjax = function() {
15
+ $http.get("/ajax/endpoint").then(function(response) {
16
+ self.message = response.data;
17
+ });
18
+ };
19
+ });
20
+ </script>
21
+ </div>
22
+ </div>
23
+
@@ -0,0 +1,16 @@
1
+ <p class="message">Nothing to see</p>
2
+ <a href="#" class="do-ajax">Do AJAX</a>
3
+
4
+ <script src="/jquery.js"></script>
5
+ <script>
6
+ jQuery(function() {
7
+ jQuery(".do-ajax").click(function() {
8
+ jQuery.ajax('/ajax/endpoint', {
9
+ success: function(data) {
10
+ jQuery(".message").text(data);
11
+ }
12
+ });
13
+ });
14
+ jQuery(".message").text("Hello!");
15
+ });
16
+ </script>
@@ -30,4 +30,5 @@ Gem::Specification.new do |spec|
30
30
  spec.add_development_dependency "pg"
31
31
  spec.add_development_dependency "selenium-webdriver"
32
32
  spec.add_development_dependency "capybara-webkit"
33
+ spec.add_development_dependency "poltergeist"
33
34
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: transactional_capybara
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0.pre.3
4
+ version: 0.1.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ian Young
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-08-27 00:00:00.000000000 Z
11
+ date: 2016-09-09 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: capybara
@@ -164,6 +164,20 @@ dependencies:
164
164
  - - ">="
165
165
  - !ruby/object:Gem::Version
166
166
  version: '0'
167
+ - !ruby/object:Gem::Dependency
168
+ name: poltergeist
169
+ requirement: !ruby/object:Gem::Requirement
170
+ requirements:
171
+ - - ">="
172
+ - !ruby/object:Gem::Version
173
+ version: '0'
174
+ type: :development
175
+ prerelease: false
176
+ version_requirements: !ruby/object:Gem::Requirement
177
+ requirements:
178
+ - - ">="
179
+ - !ruby/object:Gem::Version
180
+ version: '0'
167
181
  description: Support for DB transactions with Capybara
168
182
  email:
169
183
  - ian@iangreenleaf.com
@@ -176,6 +190,7 @@ files:
176
190
  - ".ruby-version"
177
191
  - ".travis.yml"
178
192
  - Gemfile
193
+ - Gemfile.lock
179
194
  - LICENSE.txt
180
195
  - README.md
181
196
  - Rakefile
@@ -192,8 +207,11 @@ files:
192
207
  - spec/support/model.rb
193
208
  - spec/support/schema.rb
194
209
  - spec/support/server.rb
210
+ - spec/support/vendor/angular.js
211
+ - spec/support/vendor/jquery.js
212
+ - spec/support/views/angular.erb
195
213
  - spec/support/views/basic.erb
196
- - spec/support/views/page_with_ajax.erb
214
+ - spec/support/views/jquery.erb
197
215
  - transactional_capybara.gemspec
198
216
  homepage: ''
199
217
  licenses:
@@ -210,12 +228,12 @@ required_ruby_version: !ruby/object:Gem::Requirement
210
228
  version: '0'
211
229
  required_rubygems_version: !ruby/object:Gem::Requirement
212
230
  requirements:
213
- - - ">"
231
+ - - ">="
214
232
  - !ruby/object:Gem::Version
215
- version: 1.3.1
233
+ version: '0'
216
234
  requirements: []
217
235
  rubyforge_project:
218
- rubygems_version: 2.4.5
236
+ rubygems_version: 2.5.1
219
237
  signing_key:
220
238
  specification_version: 4
221
239
  summary: Speed up your test suite with database transactions, without losing your
@@ -230,5 +248,8 @@ test_files:
230
248
  - spec/support/model.rb
231
249
  - spec/support/schema.rb
232
250
  - spec/support/server.rb
251
+ - spec/support/vendor/angular.js
252
+ - spec/support/vendor/jquery.js
253
+ - spec/support/views/angular.erb
233
254
  - spec/support/views/basic.erb
234
- - spec/support/views/page_with_ajax.erb
255
+ - spec/support/views/jquery.erb
@@ -1,14 +0,0 @@
1
- <p class="message">Nothing to see</p>
2
-
3
- <script src="//ajax.googleapis.com/ajax/libs/jquery/1.11.2/jquery.js"></script>
4
- <script>window.jQuery || document.write('<script src="js/vendor/jquery-1.11.2.js"><\/script>')</script>
5
- <script>
6
- jQuery(function() {
7
- jQuery.ajax('/ajax_endpoint', {
8
- success: function(data) {
9
- jQuery(".message").text(data);
10
- }
11
- });
12
- jQuery(".message").text("Hello!");
13
- });
14
- </script>