qor_test 1.0.0 → 1.0.1

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: 7c0c8f03dc91f44a8e315a315d06a5f61ff21591
4
- data.tar.gz: 7962c5733112bb11daf2e03c5ceceed87a4c8ecc
3
+ metadata.gz: 0f96d4a2d55e742beea56c201532e16d011c2f8b
4
+ data.tar.gz: b19cbf4c02bc074807ff11cb49e90aacded0c16b
5
5
  SHA512:
6
- metadata.gz: 2f8543fb90ed4dd46f3117df72d0f75b73a8a0db6e3e6626a07fe8190771cb8fb41130319d78f636e09953dadc235f70ed166890db73ec1f498c3697ebe4b165
7
- data.tar.gz: a2fe9220034c293248484d1f284dc32454f392ebba62ab7c24540a1218ab3007428df4955050e80d12b0b943a47ed095a27a07867efdd190ed90694aa8556d2f
6
+ metadata.gz: 2ad70acebd90012e83931a32d63d5cb6576f53125f549711a481df7de904eef7e42095191eaaf90a88af9c5cad251429f2428c79cc5d2781f0c8772e9f300e39
7
+ data.tar.gz: 1c0c8793a71db4267fa5596c49aeed5beb5f767015e5ed0d5abf65f9f26e98010669cd9631485d195702e6f34d04f89f879e003205de021a2945798d29e6c215
data/README.md CHANGED
@@ -1,8 +1,6 @@
1
- # Qor Test
1
+ # Qor Test - Make it easy to discovery compatibility issues!
2
2
 
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!
3
+ Qor Test is a tool to test your projects against different versions of gem dependencies and rubies (through rbenv or rvm)
6
4
 
7
5
  [![Build Status](https://secure.travis-ci.org/qor/qor_test.png?branch=master)](http://travis-ci.org/qor/qor_test)
8
6
  [![Dependency Status](https://gemnasium.com/qor/qor_test.png)](https://gemnasium.com/qor/qor_test)
@@ -27,7 +25,7 @@
27
25
  gem 'rails', [3.1, 3.2]
28
26
  end
29
27
 
30
- With the above configuration, Qor Test could generate 5 test scenes.
28
+ With above configuration, Qor Test will generate 5 test scenes.
31
29
 
32
30
  1, Test your project with Rails 3.1 and Ruby 2.0
33
31
  2, Test your project with Rails 3.2 and Ruby 2.0
@@ -39,13 +37,13 @@
39
37
 
40
38
  qor_test
41
39
 
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.
40
+ Of course, you could specify one scene when test your project, for example, use `qor_test -e '2.0'` to test your project only under ruby 2.0.
43
41
 
44
42
  ## Advanced Usage
45
43
 
46
44
  \* Dependencies defined outside would be shared in all scenes:
47
45
 
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)
46
+ So you could use below configuration to test your project with rails 3.1, 3.2 under ruby 1.8, 1.9, 2.0. (6 scenes)
49
47
 
50
48
  # config/qor/test.rb
51
49
  gem 'rails', [3.1, 3.2]
@@ -59,7 +57,7 @@
59
57
  gem 'factory_girl_rails', '1.3.0'
60
58
  end
61
59
 
62
- \* Gemfile options `git`, `branch`, `path` and so on is supported by Qor Test
60
+ \* Gemfile options `git`, `branch`, `path` and so on are supported by Qor Test
63
61
 
64
62
  # config/qor/test.rb
65
63
  ruby ['2.0', '1.9.3', '1.8.7']
@@ -70,10 +68,33 @@
70
68
 
71
69
  Qor Test will invoke `rake spec` to run tests for rspec projects.
72
70
 
73
- And you could even specify a test command by passing environment variable 'COMMAND'. For Example:
71
+ And you could even specify a test command by passing environment variable 'COMMAND'. e.g:
74
72
 
75
73
  COMMAND='ruby test/xxxx.rb' qor_test
76
74
 
75
+ \* Specify a configuration file
76
+
77
+ You can do it by passing environment variable `QOR_TEST_CONFIG`. e.g:
78
+
79
+ QOR_TEST_CONFIG=~/test.rb qor_test
80
+
81
+
82
+ ## Test Qor Test with Qor Test
83
+
84
+ #### Configuration
85
+
86
+ # config/qor/test.rb
87
+ env '1.9+' do
88
+ ruby ['1.9.3', '2.0']
89
+ end
90
+
91
+ env '1.8.7' do
92
+ ruby '1.8.7'
93
+ gem 'minitest', '4.3'
94
+ end
95
+
96
+ #### Screenshot
97
+ [![Qor Test](https://raw.github.com/qor/qor_test/master/test/screenshot.png)](https://raw.github.com/qor/qor_test/master/test/screenshot.png)
77
98
 
78
99
  ## Contributing
79
100
 
@@ -34,8 +34,8 @@ module Qor
34
34
 
35
35
  def run_with_gemfile(file)
36
36
  $case_num += 1
37
- scripts << "echo -n '\n\e[01;31m[ENV #{gemfile.group_name}] \e[0m'"
38
- scripts << "echo -n '\e[31mRunning case #{$case_num} with ruby '$(ruby -v)', '$[$total_cases_num-#{$case_num}]' cases left\e[0m\n'"
37
+ scripts << "echo -n '\n\e[01;31m[ENV #{gemfile.group_name}] \e[0m'" unless gemfile.group_name.nil?
38
+ scripts << "echo -n '\e[31mRunning case #{$case_num} with '$(ruby -v)', '$[$total_cases_num-#{$case_num}]' cases left\e[0m\n'"
39
39
 
40
40
  lock_file = "#{file}.lock"
41
41
  temp_file = "QorTest_" + File.basename(file)
@@ -1,5 +1,5 @@
1
1
  module Qor
2
2
  module Test
3
- VERSION = "1.0.0"
3
+ VERSION = "1.0.1"
4
4
  end
5
5
  end
@@ -26,7 +26,10 @@ describe Gem do
26
26
  end
27
27
 
28
28
  Qor::Test::Gem.parse(config.first("gem")).length.must_equal 2
29
- Qor::Test::Gem.parse(config.first("gem"))[0].to_s.must_equal 'gem "nokogiri", {:git=>"git://github.com/tenderlove/nokogiri.git", :branch=>"1.4"}'
29
+ # Don't test below case with ruby 1.8 due to hash is not ordered in 1.8
30
+ if RUBY_VERSION !~ /1.8/
31
+ Qor::Test::Gem.parse(config.first("gem"))[0].to_s.must_equal 'gem "nokogiri", {:git=>"git://github.com/tenderlove/nokogiri.git", :branch=>"1.4"}'
32
+ end
30
33
  Qor::Test::Gem.parse(config.first("gem"))[1].to_s.must_equal 'gem "nokogiri", {:git=>"git://github.com/tenderlove/nokogiri.git"}'
31
34
 
32
35
  # case 4
@@ -35,7 +38,9 @@ describe Gem do
35
38
  end
36
39
 
37
40
  Qor::Test::Gem.parse(config.first("gem")).length.must_equal 1
38
- Qor::Test::Gem.parse(config.first("gem"))[0].to_s.must_equal 'gem "nokogiri", {:git=>"git://github.com/tenderlove/nokogiri.git", :branch=>"1.4"}'
41
+ if RUBY_VERSION !~ /1.8/
42
+ Qor::Test::Gem.parse(config.first("gem"))[0].to_s.must_equal 'gem "nokogiri", {:git=>"git://github.com/tenderlove/nokogiri.git", :branch=>"1.4"}'
43
+ end
39
44
 
40
45
  # case 5
41
46
  config = Qor::Test::Configuration.load(nil, :force => true) do
@@ -63,7 +68,9 @@ describe Gem do
63
68
  end
64
69
 
65
70
  Qor::Test::Gem.parse(config.deep_find("gem")[0]).length.must_equal 1
66
- Qor::Test::Gem.parse(config.deep_find("gem")[0])[0].to_s.must_equal 'gem "nokogiri", {:git=>"git://github.com/tenderlove/nokogiri.git", :branch=>"1.4"}'
71
+ if RUBY_VERSION !~ /1.8/
72
+ Qor::Test::Gem.parse(config.deep_find("gem")[0])[0].to_s.must_equal 'gem "nokogiri", {:git=>"git://github.com/tenderlove/nokogiri.git", :branch=>"1.4"}'
73
+ end
67
74
 
68
75
  # case 8
69
76
  config = Qor::Test::Configuration.load(nil, :force => true) do
@@ -92,7 +99,9 @@ describe Gem do
92
99
  end
93
100
 
94
101
  Qor::Test::Gem.parse(config.deep_find("gem")[0]).length.must_equal 2
95
- Qor::Test::Gem.parse(config.deep_find("gem")[0])[0].to_s.must_equal 'gem "nokogiri", {:git=>"git://github.com/tenderlove/nokogiri.git", :branch=>"1.4"}'
96
- Qor::Test::Gem.parse(config.deep_find("gem")[0])[1].to_s.must_equal 'gem "nokogiri", {:git=>"git://github.com/tenderlove/nokogiri.git", :branch=>"2.0"}'
102
+ if RUBY_VERSION !~ /1.8/
103
+ Qor::Test::Gem.parse(config.deep_find("gem")[0])[0].to_s.must_equal 'gem "nokogiri", {:git=>"git://github.com/tenderlove/nokogiri.git", :branch=>"1.4"}'
104
+ Qor::Test::Gem.parse(config.deep_find("gem")[0])[1].to_s.must_equal 'gem "nokogiri", {:git=>"git://github.com/tenderlove/nokogiri.git", :branch=>"2.0"}'
105
+ end
97
106
  end
98
107
  end
Binary file
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: 1.0.0
4
+ version: 1.0.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jinzhu
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2013-08-28 00:00:00.000000000 Z
11
+ date: 2013-08-29 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: qor_dsl
@@ -40,6 +40,7 @@ files:
40
40
  - README.md
41
41
  - Rakefile
42
42
  - bin/qor_test.rb
43
+ - config/qor/test.rb
43
44
  - ext/qor_test/extconf.rb
44
45
  - ext/qor_test/qor_test
45
46
  - ext/qor_test/qor_test.c
@@ -52,6 +53,7 @@ files:
52
53
  - lib/qor_test/version.rb
53
54
  - qor_test.gemspec
54
55
  - test/gem_test.rb
56
+ - test/screenshot.png
55
57
  homepage: ''
56
58
  licenses: []
57
59
  metadata: {}
@@ -77,3 +79,4 @@ specification_version: 4
77
79
  summary: 'Qor Test: Make it easy to discovery compatibility issues!'
78
80
  test_files:
79
81
  - test/gem_test.rb
82
+ - test/screenshot.png