parallel_tests-extensions 0.0.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA1:
3
+ metadata.gz: 688cc9a9ccce803da762d32f15f8df7be0be16f6
4
+ data.tar.gz: 87c154d7f4b4bcc3b673bb37f0f1f7ee2881c553
5
+ SHA512:
6
+ metadata.gz: 49c2525ebe178be0322123a74c728af45038821382cc644f6f2d19beeb3e4266e574cb3609066b0d68d5e6db0b7e99a73891a60d57dc7219d3c81e33f159ab50
7
+ data.tar.gz: 3b6e9ac392c266a521fd8629a57eb1280f306f05c59f680c8a67d1b3aeea04466291859973c07c2c7de5b2c016fae9906b2ba2e7f951ee4f6843f2f9c9df4f61
data/.gitignore ADDED
@@ -0,0 +1,9 @@
1
+ /.bundle/
2
+ /.yardoc
3
+ /Gemfile.lock
4
+ /_yardoc/
5
+ /coverage/
6
+ /doc/
7
+ /pkg/
8
+ /spec/reports/
9
+ /tmp/
data/.travis.yml ADDED
@@ -0,0 +1,4 @@
1
+ language: ruby
2
+ rvm:
3
+ - 2.1.3
4
+ before_install: gem install bundler -v 1.10.6
data/Gemfile ADDED
@@ -0,0 +1,4 @@
1
+ source 'https://rubygems.org'
2
+
3
+ # Specify your gem's dependencies in parallel_tests-extensions.gemspec
4
+ gemspec
data/README.md ADDED
@@ -0,0 +1,20 @@
1
+ # ParallelTests::Extensions
2
+
3
+ helper methods for working with [parallel_tests](https://github.com/grosser/parallel_tests)
4
+
5
+ ## Installation
6
+
7
+ ```rb
8
+ gem 'parallel_tests-extensions'
9
+ ```
10
+
11
+ ## Usage
12
+
13
+ ```rb
14
+ require 'parallel_tests'
15
+ require 'parallel_tests/extensions'
16
+
17
+ if ParallelTests.is_running?
18
+ ParallelTests.after_tests { puts 'all done!' }
19
+ end
20
+ ```
data/Rakefile ADDED
@@ -0,0 +1,10 @@
1
+ require "bundler/gem_tasks"
2
+ require "rake/testtask"
3
+
4
+ Rake::TestTask.new(:test) do |t|
5
+ t.libs << "test"
6
+ t.libs << "lib"
7
+ t.test_files = FileList['test/**/*_test.rb']
8
+ end
9
+
10
+ task :default => :test
@@ -0,0 +1,36 @@
1
+ require 'parallel_tests/extensions/version'
2
+
3
+ module ParallelTests
4
+ module Extensions
5
+ # @example
6
+ # ParallelTests.is_running?
7
+ # @return whether or not parallel test is running
8
+ def is_running?
9
+ ENV.has_key?('TEST_ENV_NUMBER')
10
+ end
11
+
12
+ def after_tests(&block)
13
+ if is_running?
14
+ @afters ||= []
15
+ @afters << block
16
+ install_after_hook unless @after_hook_installed
17
+ end
18
+ end
19
+
20
+ private
21
+
22
+ def install_after_hook
23
+ @after_hook_installed = true
24
+ if first_process?
25
+ at_exit do
26
+ wait_for_other_processes_to_finish
27
+ @afters.each(&:call)
28
+ end
29
+ end
30
+ end
31
+ end
32
+ end
33
+
34
+ if defined?(ParallelTests)
35
+ ParallelTests.extend(ParallelTests::Extensions)
36
+ end
@@ -0,0 +1,5 @@
1
+ module ParallelTests
2
+ module Extensions
3
+ VERSION = '0.0.1'
4
+ end
5
+ end
@@ -0,0 +1,26 @@
1
+ # coding: utf-8
2
+ lib = File.expand_path('../lib', __FILE__)
3
+ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
4
+ require 'parallel_tests/extensions/version'
5
+
6
+ Gem::Specification.new do |spec|
7
+ spec.name = "parallel_tests-extensions"
8
+ spec.version = ParallelTests::Extensions::VERSION
9
+ spec.authors = ["Josh Bodah"]
10
+ spec.email = ["jb3689@yahoo.com"]
11
+
12
+ spec.summary = %q{helper methods for working with parallel_tests}
13
+ spec.description = %q{helper methods for working with parallel_tests. adds hooks and more user friendly boolean methods}
14
+ spec.homepage = "https://github.com/backupify/parallel_tests-extensions"
15
+
16
+ spec.files = `git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(test|spec|features)/}) }
17
+ spec.bindir = "exe"
18
+ spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
19
+ spec.require_paths = ["lib"]
20
+
21
+ spec.add_dependency 'parallel_tests'
22
+
23
+ spec.add_development_dependency "bundler", "~> 1.10"
24
+ spec.add_development_dependency "rake", "~> 10.0"
25
+ spec.add_development_dependency "minitest"
26
+ end
metadata ADDED
@@ -0,0 +1,109 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: parallel_tests-extensions
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.0.1
5
+ platform: ruby
6
+ authors:
7
+ - Josh Bodah
8
+ autorequire:
9
+ bindir: exe
10
+ cert_chain: []
11
+ date: 2015-11-30 00:00:00.000000000 Z
12
+ dependencies:
13
+ - !ruby/object:Gem::Dependency
14
+ name: parallel_tests
15
+ requirement: !ruby/object:Gem::Requirement
16
+ requirements:
17
+ - - ">="
18
+ - !ruby/object:Gem::Version
19
+ version: '0'
20
+ type: :runtime
21
+ prerelease: false
22
+ version_requirements: !ruby/object:Gem::Requirement
23
+ requirements:
24
+ - - ">="
25
+ - !ruby/object:Gem::Version
26
+ version: '0'
27
+ - !ruby/object:Gem::Dependency
28
+ name: bundler
29
+ requirement: !ruby/object:Gem::Requirement
30
+ requirements:
31
+ - - "~>"
32
+ - !ruby/object:Gem::Version
33
+ version: '1.10'
34
+ type: :development
35
+ prerelease: false
36
+ version_requirements: !ruby/object:Gem::Requirement
37
+ requirements:
38
+ - - "~>"
39
+ - !ruby/object:Gem::Version
40
+ version: '1.10'
41
+ - !ruby/object:Gem::Dependency
42
+ name: rake
43
+ requirement: !ruby/object:Gem::Requirement
44
+ requirements:
45
+ - - "~>"
46
+ - !ruby/object:Gem::Version
47
+ version: '10.0'
48
+ type: :development
49
+ prerelease: false
50
+ version_requirements: !ruby/object:Gem::Requirement
51
+ requirements:
52
+ - - "~>"
53
+ - !ruby/object:Gem::Version
54
+ version: '10.0'
55
+ - !ruby/object:Gem::Dependency
56
+ name: minitest
57
+ requirement: !ruby/object:Gem::Requirement
58
+ requirements:
59
+ - - ">="
60
+ - !ruby/object:Gem::Version
61
+ version: '0'
62
+ type: :development
63
+ prerelease: false
64
+ version_requirements: !ruby/object:Gem::Requirement
65
+ requirements:
66
+ - - ">="
67
+ - !ruby/object:Gem::Version
68
+ version: '0'
69
+ description: helper methods for working with parallel_tests. adds hooks and more user
70
+ friendly boolean methods
71
+ email:
72
+ - jb3689@yahoo.com
73
+ executables: []
74
+ extensions: []
75
+ extra_rdoc_files: []
76
+ files:
77
+ - ".gitignore"
78
+ - ".travis.yml"
79
+ - Gemfile
80
+ - README.md
81
+ - Rakefile
82
+ - lib/parallel_tests/extensions.rb
83
+ - lib/parallel_tests/extensions/version.rb
84
+ - parallel_tests-extensions.gemspec
85
+ homepage: https://github.com/backupify/parallel_tests-extensions
86
+ licenses: []
87
+ metadata: {}
88
+ post_install_message:
89
+ rdoc_options: []
90
+ require_paths:
91
+ - lib
92
+ required_ruby_version: !ruby/object:Gem::Requirement
93
+ requirements:
94
+ - - ">="
95
+ - !ruby/object:Gem::Version
96
+ version: '0'
97
+ required_rubygems_version: !ruby/object:Gem::Requirement
98
+ requirements:
99
+ - - ">="
100
+ - !ruby/object:Gem::Version
101
+ version: '0'
102
+ requirements: []
103
+ rubyforge_project:
104
+ rubygems_version: 2.4.8
105
+ signing_key:
106
+ specification_version: 4
107
+ summary: helper methods for working with parallel_tests
108
+ test_files: []
109
+ has_rdoc: