gem_suit 0.1.2 → 0.1.3

Sign up to get free protection for your applications and to get access to all the features.
data/CHANGELOG.rdoc CHANGED
@@ -1,5 +1,11 @@
1
1
  = GemSuit CHANGELOG
2
2
 
3
+ == Version 0.1.3 (May 15, 2011)
4
+
5
+ * Solved running suit tests within command line when using Ruby 1.9.2
6
+ * Corrected matching test summaries within Ruby 1.9.2
7
+ * Using Rich-Support v0.1.2
8
+
3
9
  == Version 0.1.2 (May 11, 2011)
4
10
 
5
11
  * Made GemSuit Ruby 1.9.2 compatible
data/README.textile CHANGED
@@ -97,12 +97,12 @@ h3. Making your gem development mobile
97
97
 
98
98
  It is possible that you will have to develop your gem on another computer or that there are multiple developers (and thus coping with different computers). As mentioned in the previous section, everything is added to the Git repository. The only pitfall can be that the computer is not prepped for the gem development. Think of not having all the gem dependecies installed.
99
99
 
100
- Just check out the gem Git repository and "fit the GemSuit" with @suit fit@. With "Rich-CMS":https://github.com/archan937/rich_cms/tree/edge as example, run the following:
100
+ Just check out the gem Git repository, install GemSuit and "fit the GemSuit" with @suit fit@. With "Rich-CMS":https://github.com/archan937/rich_cms/tree/edge as example, run the following:
101
101
 
102
102
  <pre>
103
103
  $ git clone https://github.com/archan937/rich_cms.git
104
104
  $ cd rich_cms
105
- $ suit fit -v
105
+ $ gem install gem_suit && suit fit -v
106
106
  </pre>
107
107
 
108
108
  h2. Testing with GemSuit
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.1.2
1
+ 0.1.3
data/gem_suit.gemspec CHANGED
@@ -19,7 +19,7 @@ Gem::Specification.new do |s|
19
19
  s.executables = `git ls-files -- bin/*`.split("\n").map{ |f| File.basename(f) }
20
20
  s.require_paths = ["lib"]
21
21
 
22
- s.add_dependency "rich_support", "~> 0.1.1"
22
+ s.add_dependency "rich_support", "~> 0.1.2"
23
23
  s.add_dependency "thor" , "~> 0.14.6"
24
24
  s.add_dependency "capybara" , "~> 0.4.1.2"
25
25
  s.add_dependency "launchy" , "~> 0.4.0"
data/lib/gem_suit/cli.rb CHANGED
@@ -111,7 +111,7 @@ module GemSuit
111
111
  desc "test [SECTION] [FILES]", "Run GemSuit (suit, unit, functional, integration) tests"
112
112
  method_options [:rails_versions, "-r"] => :array, [:verbose, "-v"] => false, [:very_verbose, "-w"] => false
113
113
  def test(section = "suit", file_or_pattern = nil)
114
- if Application::InstanceMethods.instance_methods.include?(method = "test_#{section}")
114
+ if Application::InstanceMethods.instance_methods.collect(&:to_s).include?(method = "test_#{section}")
115
115
  send method, file_or_pattern
116
116
  elsif file_or_pattern.nil?
117
117
  test_suit section
@@ -17,6 +17,18 @@ module GemSuit
17
17
  test_suit
18
18
  end
19
19
 
20
+ def test_unit(file_or_pattern = nil)
21
+ run_tests :unit, file_or_pattern
22
+ end
23
+
24
+ def test_functional(file_or_pattern = nil)
25
+ run_tests :functional, file_or_pattern
26
+ end
27
+
28
+ def test_integration(file_or_pattern = nil)
29
+ run_tests :integration, file_or_pattern
30
+ end
31
+
20
32
  def test_suit(file_or_pattern = nil)
21
33
  assert_suit_dir
22
34
 
@@ -35,18 +47,6 @@ module GemSuit
35
47
  print_test_results "Suit", data
36
48
  end
37
49
 
38
- def test_unit(file_or_pattern = nil)
39
- run_tests :unit, file_or_pattern
40
- end
41
-
42
- def test_functional(file_or_pattern = nil)
43
- run_tests :functional, file_or_pattern
44
- end
45
-
46
- def test_integration(file_or_pattern = nil)
47
- run_tests :integration, file_or_pattern
48
- end
49
-
50
50
  private
51
51
 
52
52
  def run_tests(type, file_or_pattern)
@@ -123,7 +123,7 @@ module GemSuit
123
123
  LOAD_MATCH = /^Loaded suite suit\/rails-(\d+)\/dummy\/test\/integration\/suit\/(.*)$/
124
124
  GEM_SUIT_MATCH = /^GemSuit: (.*)$/
125
125
  TIME_MATCH = /^Finished in (.*)\.$/
126
- SUMMARY_MATCH = /^(\d+) (\w+), (\d+) (\w+), (\d+) (\w+), (\d+) (\w+)$/
126
+ SUMMARY_MATCH = /^(\d+ \w+(, )?)+$/
127
127
 
128
128
  def print_test_results(section, data)
129
129
  return if (suit_tests = extract_test_results(data)).empty?
@@ -159,11 +159,11 @@ module GemSuit
159
159
  result.last[:time] = $1
160
160
  end
161
161
  if line.match(SUMMARY_MATCH)
162
- result.last[:summary ] = line
163
- result.last[$2.to_sym] = $1
164
- result.last[$4.to_sym] = $3
165
- result.last[$6.to_sym] = $5
166
- result.last[$8.to_sym] = $7
162
+ result.last[:summary] = line
163
+ line.scan(/\d+ \w+/).each do |match|
164
+ amount, type = match.split " "
165
+ result.last[type.to_sym] = amount
166
+ end
167
167
  result << {}
168
168
  end
169
169
  end
@@ -1,6 +1,6 @@
1
1
  ENV["RAILS_ENV"] = "test"
2
2
 
3
- caller_dir = File.dirname(caller.detect{|x| !x.include? "custom_require.rb"})
3
+ caller_dir = File.dirname(caller.detect{|x| !x.include?("custom_require.rb") && !x.include?("lib/gem_suit")})
4
4
  rails_root = File.expand_path "..", caller_dir
5
5
  rails_root = File.expand_path Dir["#{caller_dir}/../../rails-*/dummy"].last unless File.exists? "#{rails_root}/config/environment.rb"
6
6
  gem_dir = File.expand_path "../../..", rails_root
@@ -2,7 +2,7 @@ module GemSuit
2
2
  module VERSION
3
3
  MAJOR = 0
4
4
  MINOR = 1
5
- TINY = 2
5
+ TINY = 3
6
6
 
7
7
  STRING = [MAJOR, MINOR, TINY].join(".")
8
8
  end
metadata CHANGED
@@ -1,13 +1,8 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: gem_suit
3
3
  version: !ruby/object:Gem::Version
4
- hash: 31
5
4
  prerelease:
6
- segments:
7
- - 0
8
- - 1
9
- - 2
10
- version: 0.1.2
5
+ version: 0.1.3
11
6
  platform: ruby
12
7
  authors:
13
8
  - Paul Engel
@@ -15,7 +10,8 @@ autorequire:
15
10
  bindir: bin
16
11
  cert_chain: []
17
12
 
18
- date: 2011-05-10 00:00:00 Z
13
+ date: 2011-05-15 00:00:00 +02:00
14
+ default_executable:
19
15
  dependencies:
20
16
  - !ruby/object:Gem::Dependency
21
17
  name: rich_support
@@ -25,12 +21,7 @@ dependencies:
25
21
  requirements:
26
22
  - - ~>
27
23
  - !ruby/object:Gem::Version
28
- hash: 25
29
- segments:
30
- - 0
31
- - 1
32
- - 1
33
- version: 0.1.1
24
+ version: 0.1.2
34
25
  type: :runtime
35
26
  version_requirements: *id001
36
27
  - !ruby/object:Gem::Dependency
@@ -41,11 +32,6 @@ dependencies:
41
32
  requirements:
42
33
  - - ~>
43
34
  - !ruby/object:Gem::Version
44
- hash: 43
45
- segments:
46
- - 0
47
- - 14
48
- - 6
49
35
  version: 0.14.6
50
36
  type: :runtime
51
37
  version_requirements: *id002
@@ -57,12 +43,6 @@ dependencies:
57
43
  requirements:
58
44
  - - ~>
59
45
  - !ruby/object:Gem::Version
60
- hash: 111
61
- segments:
62
- - 0
63
- - 4
64
- - 1
65
- - 2
66
46
  version: 0.4.1.2
67
47
  type: :runtime
68
48
  version_requirements: *id003
@@ -74,11 +54,6 @@ dependencies:
74
54
  requirements:
75
55
  - - ~>
76
56
  - !ruby/object:Gem::Version
77
- hash: 15
78
- segments:
79
- - 0
80
- - 4
81
- - 0
82
57
  version: 0.4.0
83
58
  type: :runtime
84
59
  version_requirements: *id004
@@ -149,6 +124,7 @@ files:
149
124
  - templates/static/suit/shared/test/unit/.gitkeep
150
125
  - templates/static/suit/templates/shared/config/initializers/.gitkeep
151
126
  - templates/static/suit/templates/shared/db/schema.rb
127
+ has_rdoc: true
152
128
  homepage: https://github.com/archan937/gem_suit
153
129
  licenses: []
154
130
 
@@ -162,23 +138,17 @@ required_ruby_version: !ruby/object:Gem::Requirement
162
138
  requirements:
163
139
  - - ">="
164
140
  - !ruby/object:Gem::Version
165
- hash: 3
166
- segments:
167
- - 0
168
141
  version: "0"
169
142
  required_rubygems_version: !ruby/object:Gem::Requirement
170
143
  none: false
171
144
  requirements:
172
145
  - - ">="
173
146
  - !ruby/object:Gem::Version
174
- hash: 3
175
- segments:
176
- - 0
177
147
  version: "0"
178
148
  requirements: []
179
149
 
180
150
  rubyforge_project: gem_suit
181
- rubygems_version: 1.7.2
151
+ rubygems_version: 1.6.2
182
152
  signing_key:
183
153
  specification_version: 3
184
154
  summary: Test the entire usage workflow (including the generators) of your newly generated or existing gem within Rails 2 and 3 and make the gem development mobile