qor_test 0.1.1 → 1.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/README.md +37 -41
- data/bin/qor_test.rb +5 -1
- data/lib/qor_test/cli.rb +1 -1
- data/lib/qor_test/configuration.rb +2 -2
- data/lib/qor_test/version.rb +1 -1
- data/qor_test.gemspec +2 -2
- metadata +4 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 7c0c8f03dc91f44a8e315a315d06a5f61ff21591
|
4
|
+
data.tar.gz: 7962c5733112bb11daf2e03c5ceceed87a4c8ecc
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 2f8543fb90ed4dd46f3117df72d0f75b73a8a0db6e3e6626a07fe8190771cb8fb41130319d78f636e09953dadc235f70ed166890db73ec1f498c3697ebe4b165
|
7
|
+
data.tar.gz: a2fe9220034c293248484d1f284dc32454f392ebba62ab7c24540a1218ab3007428df4955050e80d12b0b943a47ed095a27a07867efdd190ed90694aa8556d2f
|
data/README.md
CHANGED
@@ -1,60 +1,57 @@
|
|
1
|
-
#
|
1
|
+
# Qor Test
|
2
2
|
|
3
|
-
|
3
|
+
Qor Test is the tool to test your library against different versions of gem dependencies and rubies (through rbenv or rvm)
|
4
|
+
|
5
|
+
Make it easy to discovery compatibility issues!
|
6
|
+
|
7
|
+
[](http://travis-ci.org/qor/qor_test)
|
8
|
+
[](https://gemnasium.com/qor/qor_test)
|
9
|
+
[](https://codeclimate.com/github/qor/qor_test)
|
4
10
|
|
5
11
|
## Installation
|
6
12
|
|
7
13
|
gem install qor_test
|
8
14
|
|
9
|
-
##
|
15
|
+
## Quick Start
|
10
16
|
|
11
|
-
|
17
|
+
Qor Test require a configuration file to know those dependencies and rubies you would like to test, Here is a sample configuration:
|
12
18
|
|
13
19
|
# config/qor/test.rb
|
14
20
|
env '2.0' do
|
15
21
|
ruby '2.0'
|
16
|
-
gem 'rails', [3.1, 3.2]
|
17
|
-
end
|
18
|
-
|
19
|
-
env '1.9.3' do
|
20
|
-
ruby '1.9.3'
|
21
|
-
gem 'rails', [3.1, 3.2]
|
22
|
+
gem 'rails', [3.1, 3.2, 4.0]
|
22
23
|
end
|
23
24
|
|
24
25
|
env '1.8.7' do
|
25
26
|
ruby '1.8.7'
|
26
|
-
gem 'factory_girl_rails', '1.3.0'
|
27
27
|
gem 'rails', [3.1, 3.2]
|
28
28
|
end
|
29
29
|
|
30
|
-
With above configuration,
|
30
|
+
With the above configuration, Qor Test could generate 5 test scenes.
|
31
|
+
|
32
|
+
1, Test your project with Rails 3.1 and Ruby 2.0
|
33
|
+
2, Test your project with Rails 3.2 and Ruby 2.0
|
34
|
+
3, Test your project with Rails 4.0 and Ruby 2.0
|
35
|
+
4, Test your project with Rails 3.1 and Ruby 1.8
|
36
|
+
5, Test your project with Rails 3.2 and Ruby 1.8
|
31
37
|
|
32
|
-
|
33
|
-
2, Run tests with Rails 3.2 and Ruby 2.0
|
34
|
-
3, Run tests with Rails 3.1 and Ruby 1.9
|
35
|
-
4, Run tests with Rails 3.2 and Ruby 1.9
|
36
|
-
5, Run tests with Rails 3.1 and Ruby 1.8
|
37
|
-
6, Run tests with Rails 3.2 and Ruby 1.8
|
38
|
+
In order to test your project in all above 5 scenes, You could simply run
|
38
39
|
|
39
|
-
|
40
|
+
qor_test
|
40
41
|
|
41
|
-
|
42
|
+
Of course, you could specify a scene to test your project, for example, use `qor_test -e '2.0'` to test your project only with ruby 2.0.
|
42
43
|
|
43
|
-
|
44
|
+
## Advanced Usage
|
44
45
|
|
45
|
-
|
46
|
+
\* Dependencies defined outside would be shared in all scenes:
|
46
47
|
|
47
|
-
|
48
|
+
So you could write below configuration to test your project with rails 3.1, 3.2 in ruby 1.8, 1.9, 2.0. (6 scenes)
|
48
49
|
|
49
50
|
# config/qor/test.rb
|
50
51
|
gem 'rails', [3.1, 3.2]
|
51
52
|
|
52
|
-
env '
|
53
|
-
ruby '2.0'
|
54
|
-
end
|
55
|
-
|
56
|
-
env '1.9.3' do
|
57
|
-
ruby '1.9.3'
|
53
|
+
env '1.9+' do
|
54
|
+
ruby ['1.9.3', '2.0']
|
58
55
|
end
|
59
56
|
|
60
57
|
env '1.8.7' do
|
@@ -62,24 +59,22 @@
|
|
62
59
|
gem 'factory_girl_rails', '1.3.0'
|
63
60
|
end
|
64
61
|
|
65
|
-
|
62
|
+
\* Gemfile options `git`, `branch`, `path` and so on is supported by Qor Test
|
66
63
|
|
67
64
|
# config/qor/test.rb
|
68
|
-
ruby '2.0'
|
69
|
-
ruby '1.9.3'
|
70
|
-
ruby '1.8.7'
|
71
|
-
|
65
|
+
ruby ['2.0', '1.9.3', '1.8.7']
|
72
66
|
gem 'paperclip', ['2.4.2', '3.3.0', {:git => "git@github.com:thoughtbot/paperclip.git", :branch => "master"}]
|
73
|
-
gem 'rails', [3.1, 3.2]
|
74
|
-
gem 'devise', [2.2.0, 2.1.0, 2.0.0]
|
67
|
+
gem 'rails', [3.1, 3.2, 4.0]
|
75
68
|
|
76
|
-
|
69
|
+
\* RSpec is supported
|
77
70
|
|
71
|
+
Qor Test will invoke `rake spec` to run tests for rspec projects.
|
78
72
|
|
79
|
-
|
73
|
+
And you could even specify a test command by passing environment variable 'COMMAND'. For Example:
|
80
74
|
|
81
75
|
COMMAND='ruby test/xxxx.rb' qor_test
|
82
76
|
|
77
|
+
|
83
78
|
## Contributing
|
84
79
|
|
85
80
|
1. Fork it
|
@@ -88,7 +83,8 @@
|
|
88
83
|
4. Push to the branch (`git push origin my-new-feature`)
|
89
84
|
5. Create new Pull Request
|
90
85
|
|
91
|
-
## Author ##
|
92
|
-
Jinzhu <http://github.com/jinzhu>
|
93
86
|
|
94
|
-
|
87
|
+
## Credits
|
88
|
+
#### Author: Jinzhu <http://github.com/jinzhu>
|
89
|
+
|
90
|
+
#### A Product From ThePlant <http://theplant.jp>
|
data/bin/qor_test.rb
CHANGED
@@ -69,7 +69,11 @@ scripts.push <<-EOF
|
|
69
69
|
echo "\e[31mTotal Cases: $total_cases_num, Passed Cases: $pass_cases_num\e[0m"
|
70
70
|
for name in ${failed_cases[@]}
|
71
71
|
do
|
72
|
-
|
72
|
+
if [[ $name =~ ^RUBY_VERSION ]]; then
|
73
|
+
echo "\e[33mFailed Case: (${name#RUBY_VERSION:})\e[0m"
|
74
|
+
else
|
75
|
+
echo "$name"
|
76
|
+
fi
|
73
77
|
done
|
74
78
|
EOF
|
75
79
|
|
data/lib/qor_test/cli.rb
CHANGED
@@ -52,7 +52,7 @@ module Qor
|
|
52
52
|
# Test commands
|
53
53
|
[
|
54
54
|
"bundle install --quiet",
|
55
|
-
"#{options[:command].sub(/^(bundle\s+exec\s+)?/, 'bundle exec ')} && pass_cases_num=$(($pass_cases_num+1)) || failed_cases=(\"${failed_cases[@]}\" \"#{file}\")"
|
55
|
+
"#{options[:command].sub(/^(bundle\s+exec\s+)?/, 'bundle exec ')} && pass_cases_num=$(($pass_cases_num+1)) || failed_cases=(\"${failed_cases[@]}\" \"RUBY_VERSION:$(ruby -v | sed 's/ /-/g') #{file}\")"
|
56
56
|
].map do |command|
|
57
57
|
scripts << "echo '>> #{command.sub(/ && .*$/,'')}'"
|
58
58
|
scripts << command unless options[:pretend]
|
@@ -52,8 +52,8 @@ module Qor
|
|
52
52
|
|
53
53
|
def self.ruby_versions(options)
|
54
54
|
[root_from_config, root_from_gemfile].map do |x|
|
55
|
-
x.deep_find('ruby', &find_block(options))
|
56
|
-
end.flatten.compact
|
55
|
+
x.deep_find('ruby', &find_block(options)).map(&:value)
|
56
|
+
end.flatten.compact
|
57
57
|
end
|
58
58
|
|
59
59
|
def self.envs(options={})
|
data/lib/qor_test/version.rb
CHANGED
data/qor_test.gemspec
CHANGED
@@ -6,8 +6,8 @@ require "qor_test/version"
|
|
6
6
|
Gem::Specification.new do |gem|
|
7
7
|
gem.authors = ["Jinzhu"]
|
8
8
|
gem.email = ["wosmvp@gmail.com"]
|
9
|
-
gem.description = %q{Qor Test: Make
|
10
|
-
gem.summary = %q{Qor Test: Make
|
9
|
+
gem.description = %q{Qor Test: Make it easy to discovery compatibility issues!}
|
10
|
+
gem.summary = %q{Qor Test: Make it easy to discovery compatibility issues!}
|
11
11
|
gem.homepage = ""
|
12
12
|
|
13
13
|
gem.files = `git ls-files`.split($\)
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: qor_test
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 1.0.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Jinzhu
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2013-
|
11
|
+
date: 2013-08-28 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: qor_dsl
|
@@ -24,7 +24,7 @@ dependencies:
|
|
24
24
|
- - '>='
|
25
25
|
- !ruby/object:Gem::Version
|
26
26
|
version: '0'
|
27
|
-
description: 'Qor Test: Make
|
27
|
+
description: 'Qor Test: Make it easy to discovery compatibility issues!'
|
28
28
|
email:
|
29
29
|
- wosmvp@gmail.com
|
30
30
|
executables:
|
@@ -74,6 +74,6 @@ rubyforge_project:
|
|
74
74
|
rubygems_version: 2.0.3
|
75
75
|
signing_key:
|
76
76
|
specification_version: 4
|
77
|
-
summary: 'Qor Test: Make
|
77
|
+
summary: 'Qor Test: Make it easy to discovery compatibility issues!'
|
78
78
|
test_files:
|
79
79
|
- test/gem_test.rb
|