jasmine-rails 0.12.4 → 0.12.5

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: e4d33d09fdec808e6f233a7f1637140fb2074ef6
4
- data.tar.gz: aa888f9f3a494f5eb06bec2910b58b47fc901a34
3
+ metadata.gz: c57bf43ee65e84f2e4e762a285a9bc636bdf6905
4
+ data.tar.gz: 7bd43be773b14ad9d67c267fcb39d32258c60cd7
5
5
  SHA512:
6
- metadata.gz: cc689125c50b6ce6769ecac1e1ddf38c3573ecd07879ae92e5ad51e2c571370f1e4334cca8f91a98b9562a148c08fb31b33302b6c145a7ada4cda54d68de545f
7
- data.tar.gz: 28ba53afe3708c3de9b86caf250ad6d0aca20bbfd69240007c27d7ff76f2ba6f0ff0478d7d89151125db772dda9d0ce24b6cf522984f018299ff2dfa896ee163
6
+ metadata.gz: 89c74b05485c65bc2697322e146da47e8eb07e218821aff6c457d2c0f50094621a5370810d9c983f4489c2b6c9383c16ee5354db93c9b18086a15bcaf24448a7
7
+ data.tar.gz: 454ab0c6cb3af564f36cf851cca726e3dfd6476d1da6eafdd21c6d3518d76417e000c7f0783d799fc15b7d4fa4579faad86208ebe9d9f209b8898cdafdad00e0
data/Rakefile CHANGED
@@ -1,68 +1,5 @@
1
1
  #!/usr/bin/env rake
2
- begin
3
- require 'bundler/setup'
4
- rescue LoadError
5
- puts 'You must `gem install bundler` and `bundle install` to run rake tasks'
6
- exit # bundler is required for testbeds
7
- end
8
2
 
9
- require 'testbeds/rake'
10
3
  require 'rspec/core/rake_task'
11
4
  Bundler::GemHelper.install_tasks
12
5
 
13
- if File.directory?(File.expand_path('spec/testbeds', File.dirname(__FILE__)))
14
- all_test_tasks = []
15
-
16
- each_testbed do |testbed| # namespace 'testbed:rails-3.2'
17
-
18
- desc "run specs with phantomjs in #{testbed.name}"
19
- task :run_jasmine_rake_in_dummy do
20
- p testbed.gemfile
21
- ENV['BUNDLE_GEMFILE'] = testbed.gemfile
22
- cmd = 'bundle exec rake testbed:current:spec:javascript'
23
- raise 'specs failed' unless system cmd
24
- end
25
-
26
- desc "run specs with browser in #{testbed.name}"
27
- task :run_browser_spec_in_dummy do
28
- p testbed.gemfile
29
- ENV['BUNDLE_GEMFILE'] = testbed.gemfile
30
- unless Rake::Task.task_defined?('_in_browser')
31
- RSpec::Core::RakeTask.new(:_in_browser) do |t|
32
- deps = testbed.dependencies
33
- t.pattern = "spec/jasmine_spec.rb"
34
- t.rspec_opts = deps.collect { |d| [ '-r', d ] }.flatten
35
- end
36
- end
37
- Rake::Task['_in_browser'].invoke
38
- Rake::Task['_in_browser'].reenable
39
- end
40
-
41
- desc "run all tests in #{testbed.name}"
42
- task :all => [
43
- "#{testbed.namespace}:run_jasmine_rake_in_dummy",
44
- "#{testbed.namespace}:run_browser_spec_in_dummy"
45
- ]
46
-
47
- all_test_tasks << "#{testbed.namespace}:all"
48
- end
49
-
50
- desc "run all tests"
51
- task :default => all_test_tasks
52
- else
53
- desc "run all tests"
54
- task :default do
55
- puts "To run tests, you must generate testbeds:"
56
- puts
57
- puts "1. Install bundle for each file in gemfiles/*:"
58
- Dir['gemfiles/*'].each do |dir|
59
- next if dir['.lock']
60
- puts " BUNDLE_GEMFILE=#{dir} bundle install"
61
- end
62
- puts
63
- puts "2. Execute `generate-testbeds` to generate testbed apps."
64
- puts " (Don't use `bundle exec` for this.)"
65
- puts
66
- puts "3. Run `rake` again."
67
- end
68
- end
@@ -91,7 +91,16 @@
91
91
  var address = args[1];
92
92
  console.log('Running: ' + address);
93
93
  page.open(address, function(status) {
94
- if (status !== "success") {
94
+ if (status === "success") {
95
+ // PhantomJS 2 has a memory consumption problem. This works around it.
96
+ //
97
+ // http://stackoverflow.com/questions/24436460
98
+ // https://github.com/ariya/phantomjs/issues/10357
99
+ // https://github.com/ariya/phantomjs/commit/5768b705a0
100
+ if (page.clearMemoryCache) {
101
+ setInterval(page.clearMemoryCache, 500)
102
+ }
103
+ } else {
95
104
  console.log("can't load the address!");
96
105
  return phantom.exit(1);
97
106
  }
@@ -1,3 +1,3 @@
1
1
  module JasmineRails
2
- VERSION = "0.12.4"
2
+ VERSION = "0.12.5"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: jasmine-rails
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.12.4
4
+ version: 0.12.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Justin Searls
@@ -10,7 +10,7 @@ authors:
10
10
  autorequire:
11
11
  bindir: bin
12
12
  cert_chain: []
13
- date: 2016-04-07 00:00:00.000000000 Z
13
+ date: 2016-06-22 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: railties
@@ -74,20 +74,6 @@ dependencies:
74
74
  - - ">="
75
75
  - !ruby/object:Gem::Version
76
76
  version: '1.9'
77
- - !ruby/object:Gem::Dependency
78
- name: testbeds
79
- requirement: !ruby/object:Gem::Requirement
80
- requirements:
81
- - - ">="
82
- - !ruby/object:Gem::Version
83
- version: '0'
84
- type: :development
85
- prerelease: false
86
- version_requirements: !ruby/object:Gem::Requirement
87
- requirements:
88
- - - ">="
89
- - !ruby/object:Gem::Version
90
- version: '0'
91
77
  description: Provides a Jasmine Spec Runner that plays nicely with Rails 3.2 assets
92
78
  and sets up jasmine-headless-webkit
93
79
  email:
@@ -143,7 +129,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
143
129
  version: '0'
144
130
  requirements: []
145
131
  rubyforge_project:
146
- rubygems_version: 2.4.5.1
132
+ rubygems_version: 2.5.1
147
133
  signing_key:
148
134
  specification_version: 4
149
135
  summary: Makes Jasmine easier on Rails 3.2 & up