zfben_hanoi 0.0.3 → 0.0.4

Sign up to get free protection for your applications and to get access to all the features.
data/README.md CHANGED
@@ -7,7 +7,7 @@
7
7
  ## Crash Course
8
8
 
9
9
  zfben_hanoi # prepare the target directory
10
- rake test:js # run the tests
10
+ rake test:js # run the tests
11
11
 
12
12
  ## How To Use
13
13
 
@@ -23,7 +23,7 @@ You need a valid [Rake](http://rake.rubyforge.org/) installation to run your tes
23
23
 
24
24
  You can specify to run the test against one or more browsers:
25
25
 
26
- rake test:js BROWSERS=firefox,ie,safari
26
+ rake test:js BROWSERS=firefox,chromium
27
27
 
28
28
  You can specify to run only certain tests:
29
29
 
@@ -63,11 +63,12 @@ appending the `_test.js` suffix to each test case and the `_fixtures.html` to ea
63
63
  Example:
64
64
 
65
65
  src/
66
- directory_a/
67
- directory_b/
68
- file_3.js
69
- file_2.js
70
- file_1.js
66
+ javascript/
67
+ directory_a/
68
+ directory_b/
69
+ file_3.js
70
+ file_2.js
71
+ file_1.js
71
72
  test/
72
73
  javascript/
73
74
  directory_a/
@@ -91,8 +92,8 @@ You have probably noticed that `file_2_fixtures.html` is missing, this because *
91
92
 
92
93
  ### Browsers:
93
94
 
94
- * Chrome (Mac OS X and Windows)
95
95
  * Firefox
96
+ * Chromium
96
97
 
97
98
  ## Repository
98
99
 
data/lib/zfben_hanoi.rb CHANGED
@@ -3,6 +3,6 @@ require 'webrick'
3
3
  require 'rake/tasklib'
4
4
 
5
5
  path = File.realpath(File.join(File.dirname(__FILE__), 'zfben_hanoi'))
6
- ['webrick.rb', 'browser.rb', 'browsers/firefox.rb', 'test_case.rb', 'test_results.rb', 'test_suite_results.rb', 'javascript_test_task.rb'].each do |f|
6
+ ['webrick.rb', 'browser.rb', 'browsers/firefox.rb', 'browsers/chromium.rb', 'test_case.rb', 'test_results.rb', 'test_suite_results.rb', 'javascript_test_task.rb'].each do |f|
7
7
  require File.join(path, f)
8
8
  end
@@ -0,0 +1,13 @@
1
+ class Chromium < Browser
2
+ def name
3
+ 'chromium-browser'
4
+ end
5
+
6
+ def teardown
7
+ if macos?
8
+ system('killall ' + self.name)
9
+ end
10
+ end
11
+ end
12
+
13
+
@@ -1,11 +1,11 @@
1
1
  class Firefox < Browser
2
- def initialize(path = File.join(ENV['ProgramFiles'] || 'c:\Program Files', '\Mozilla Firefox\firefox.exe'))
3
- @path = path
2
+ def name
3
+ 'firefox'
4
4
  end
5
5
 
6
6
  def teardown
7
- if macos? || linux?
8
- system("killall firefox-bin")
7
+ if macos?
8
+ system('killall ' + self.name)
9
9
  end
10
10
  end
11
11
  end
@@ -1,5 +1,5 @@
1
1
  class JavaScriptTestTask < ::Rake::TaskLib
2
- BROWSERS = %w( firefox ).freeze
2
+ BROWSERS = %w( firefox chromium ).freeze
3
3
  attr_reader :sources_directory
4
4
 
5
5
  def initialize(name = :test)
@@ -92,6 +92,8 @@ class JavaScriptTestTask < ::Rake::TaskLib
92
92
  case(browser)
93
93
  when :firefox
94
94
  Firefox.new
95
+ when :chromium
96
+ Chromium.new
95
97
  else
96
98
  browser
97
99
  end
data/zfben_hanoi.gemspec CHANGED
@@ -3,14 +3,20 @@ $:.push File.expand_path("../lib", __FILE__)
3
3
 
4
4
  Gem::Specification.new do |s|
5
5
  s.name = "zfben_hanoi"
6
- s.version = '0.0.3'
6
+ s.version = '0.0.4'
7
7
  s.authors = ["Ben"]
8
8
  s.email = ["ben@zfben.com"]
9
9
  s.homepage = "https://github.com/benz303/zfben_hanoi"
10
10
  s.summary = %q{}
11
11
  s.description = %q{}
12
12
 
13
- s.rubyforge_project = "zfben_hanoi"
13
+ s.post_install_message =%q{********************************************************************************
14
+ Thank you for using zfben_libjs!
15
+
16
+ Please follow @zfben on Twitter for announcements, updates, and news.
17
+ https://twitter.com/zfben
18
+ ********************************************************************************
19
+ }
14
20
 
15
21
  s.files = `git ls-files`.split("\n")
16
22
  s.test_files = `git ls-files -- {test,spec,features}/*`.split("\n")
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: zfben_hanoi
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.3
4
+ version: 0.0.4
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: 2011-08-13 00:00:00.000000000Z
12
+ date: 2011-08-20 00:00:00.000000000Z
13
13
  dependencies: []
14
14
  description: ''
15
15
  email:
@@ -27,6 +27,7 @@ files:
27
27
  - bin/zfben_hanoi
28
28
  - lib/zfben_hanoi.rb
29
29
  - lib/zfben_hanoi/browser.rb
30
+ - lib/zfben_hanoi/browsers/chromium.rb
30
31
  - lib/zfben_hanoi/browsers/firefox.rb
31
32
  - lib/zfben_hanoi/javascript_test_task.rb
32
33
  - lib/zfben_hanoi/test_case.rb
@@ -50,7 +51,9 @@ files:
50
51
  - zfben_hanoi.gemspec
51
52
  homepage: https://github.com/benz303/zfben_hanoi
52
53
  licenses: []
53
- post_install_message:
54
+ post_install_message: ! "********************************************************************************\n
55
+ \ Thank you for using zfben_libjs!\n \n Please follow @zfben on Twitter for announcements,
56
+ updates, and news.\n https://twitter.com/zfben\n********************************************************************************\n"
54
57
  rdoc_options: []
55
58
  require_paths:
56
59
  - lib
@@ -67,7 +70,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
67
70
  - !ruby/object:Gem::Version
68
71
  version: '0'
69
72
  requirements: []
70
- rubyforge_project: zfben_hanoi
73
+ rubyforge_project:
71
74
  rubygems_version: 1.8.6
72
75
  signing_key:
73
76
  specification_version: 3