sauce-jasmine 2.1.0

Sign up to get free protection for your applications and to get access to all the features.
data/.gitignore ADDED
@@ -0,0 +1,17 @@
1
+ *.gem
2
+ *.rbc
3
+ .bundle
4
+ .config
5
+ .yardoc
6
+ Gemfile.lock
7
+ InstalledFiles
8
+ _yardoc
9
+ coverage
10
+ doc/
11
+ lib/bundler/man
12
+ pkg
13
+ rdoc
14
+ spec/reports
15
+ test/tmp
16
+ test/version_tmp
17
+ tmp
data/README.md ADDED
@@ -0,0 +1,29 @@
1
+ # Sauce::Jasmine
2
+
3
+ TODO: Write a gem description
4
+
5
+ ## Installation
6
+
7
+ Add this line to your application's Gemfile:
8
+
9
+ gem 'sauce-jasmine'
10
+
11
+ And then execute:
12
+
13
+ $ bundle
14
+
15
+ Or install it yourself as:
16
+
17
+ $ gem install sauce-jasmine
18
+
19
+ ## Usage
20
+
21
+ TODO: Write usage instructions here
22
+
23
+ ## Contributing
24
+
25
+ 1. Fork it
26
+ 2. Create your feature branch (`git checkout -b my-new-feature`)
27
+ 3. Commit your changes (`git commit -am 'Added some feature'`)
28
+ 4. Push to the branch (`git push origin my-new-feature`)
29
+ 5. Create new Pull Request
data/Rakefile ADDED
@@ -0,0 +1,2 @@
1
+ #!/usr/bin/env rake
2
+ require "bundler/gem_tasks"
@@ -0,0 +1,35 @@
1
+ require 'jasmine'
2
+
3
+ module Sauce
4
+ module Jasmine
5
+ class Driver < ::Jasmine::SeleniumDriver
6
+ attr_reader :http_address, :driver, :browser
7
+
8
+ def initialize(browser, http_address)
9
+ @browser = browser
10
+ @http_address = http_address
11
+ @driver = Sauce::Selenium2.new(:browser => browser, :job_name => job_name)
12
+ puts "Starting job named: #{job_name}"
13
+ end
14
+
15
+ def job_name
16
+ "Jasmine Test Run #{Time.now.utc.to_i}"
17
+ end
18
+ end
19
+ end
20
+ end
21
+
22
+ module Jasmine
23
+ class Config
24
+ def jasmine_port
25
+ '3001'
26
+ end
27
+
28
+ def start
29
+ @client = Sauce::Jasmine::Driver.new(browser, "#{jasmine_host}:#{jasmine_port}/")
30
+ @client.connect
31
+ end
32
+ end
33
+ end
34
+
35
+
@@ -0,0 +1,47 @@
1
+ require 'jasmine'
2
+ require 'rspec/core/rake_task'
3
+
4
+ namespace :jasmine do
5
+ def run_jasmine_server
6
+ ENV['JASMINE_PORT'] = '3001'
7
+ Jasmine::Config.new.start_jasmine_server
8
+ end
9
+
10
+ desc "Execute Jasmine tests in a Chrome browser on Sauce Labs"
11
+ task :sauce do
12
+ run_jasmine_server
13
+ Rake::Task['jasmine:sauce:chrome'].execute
14
+ end
15
+
16
+ namespace :sauce do
17
+ desc "Execute Jasmine tests in Chrome, Firefox and Internet Explorer on Sauce Labs"
18
+ task :all do
19
+ run_jasmine_server
20
+ threads = []
21
+ [:firefox, :chrome, :iexplore].each do |browser|
22
+ t = Thread.new do
23
+ Rake::Task["jasmine:sauce:#{browser}"].invoke
24
+ end
25
+ t.abort_on_exception = true
26
+ threads << t
27
+ end
28
+
29
+ threads.each do |t|
30
+ t.join
31
+ end
32
+ end
33
+
34
+ [[:firefox, 8], [:chrome, nil], [:iexplore, 8]].each do |browser, version|
35
+ desc "Execute Jasmine tests in #{browser}"
36
+ RSpec::Core::RakeTask.new(browser) do |t|
37
+ ENV['SAUCE_BROWSER'] = browser.to_s
38
+ unless version.nil?
39
+ ENV['SAUCE_BROWSER_VERSION'] = version.to_s
40
+ end
41
+ t.rspec_opts = '--color'
42
+ t.pattern = [File.expand_path(File.dirname(__FILE__) + '/runner.rb')]
43
+ end
44
+ end
45
+ end
46
+ end
47
+
@@ -0,0 +1,4 @@
1
+ require 'sauce'
2
+ require 'sauce/jasmine'
3
+ ENV['JASMINE_PORT'] = '3001'
4
+ require 'jasmine/runner'
@@ -0,0 +1,17 @@
1
+ # -*- encoding: utf-8 -*-
2
+ require File.expand_path(File.dirname(__FILE__) + '/../../lib/sauce/version')
3
+
4
+ Gem::Specification.new do |gem|
5
+ gem.authors = ["R. Tyler Croy"]
6
+ gem.email = ["tyler@monkeypox.org"]
7
+ gem.description = ''
8
+ gem.summary = ''
9
+ gem.homepage = ""
10
+
11
+ gem.files = `git ls-files`.split($\)
12
+ gem.executables = gem.files.grep(%r{^bin/}).map{ |f| File.basename(f) }
13
+ gem.test_files = gem.files.grep(%r{^(test|spec|features)/})
14
+ gem.name = "sauce-jasmine"
15
+ gem.require_paths = ["lib"]
16
+ gem.version = "#{Sauce::MAJOR_VERSION}.0"
17
+ end
metadata ADDED
@@ -0,0 +1,72 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: sauce-jasmine
3
+ version: !ruby/object:Gem::Version
4
+ hash: 11
5
+ prerelease:
6
+ segments:
7
+ - 2
8
+ - 1
9
+ - 0
10
+ version: 2.1.0
11
+ platform: ruby
12
+ authors:
13
+ - R. Tyler Croy
14
+ autorequire:
15
+ bindir: bin
16
+ cert_chain: []
17
+
18
+ date: 2012-08-15 00:00:00 Z
19
+ dependencies: []
20
+
21
+ description: ""
22
+ email:
23
+ - tyler@monkeypox.org
24
+ executables: []
25
+
26
+ extensions: []
27
+
28
+ extra_rdoc_files: []
29
+
30
+ files:
31
+ - .gitignore
32
+ - README.md
33
+ - Rakefile
34
+ - lib/sauce/jasmine.rb
35
+ - lib/sauce/jasmine/rake.rb
36
+ - lib/sauce/jasmine/runner.rb
37
+ - sauce-jasmine.gemspec
38
+ homepage: ""
39
+ licenses: []
40
+
41
+ post_install_message:
42
+ rdoc_options: []
43
+
44
+ require_paths:
45
+ - lib
46
+ required_ruby_version: !ruby/object:Gem::Requirement
47
+ none: false
48
+ requirements:
49
+ - - ">="
50
+ - !ruby/object:Gem::Version
51
+ hash: 3
52
+ segments:
53
+ - 0
54
+ version: "0"
55
+ required_rubygems_version: !ruby/object:Gem::Requirement
56
+ none: false
57
+ requirements:
58
+ - - ">="
59
+ - !ruby/object:Gem::Version
60
+ hash: 3
61
+ segments:
62
+ - 0
63
+ version: "0"
64
+ requirements: []
65
+
66
+ rubyforge_project:
67
+ rubygems_version: 1.8.10
68
+ signing_key:
69
+ specification_version: 3
70
+ summary: ""
71
+ test_files: []
72
+