belly 0.5.1 → 0.5.2

Sign up to get free protection for your applications and to get access to all the features.
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.5.1
1
+ 0.5.2
@@ -5,7 +5,7 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = %q{belly}
8
- s.version = "0.5.1"
8
+ s.version = "0.5.2"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["Matt Wynne"]
@@ -19,9 +19,9 @@ module Belly
19
19
  end
20
20
 
21
21
  def run(ui)
22
- Belly.hub.get_failing_scenarios_for_project_named(Belly.config.project).each do |scenario|
23
- puts "#{scenario["file_name"]}:#{scenario["line_number"]}"
24
- end
22
+ scenarios = Belly.hub.get_failing_scenarios_for_project_named(Belly.config.project)
23
+ todos = scenarios.map { |scenario| "#{scenario["file_name"]}:#{scenario["line_number"]}" }
24
+ todos.sort.each { |todo| puts todo }
25
25
  end
26
26
  end
27
27
  end
@@ -12,7 +12,9 @@ module Belly::Client
12
12
 
13
13
  def get_failing_scenarios_for_project_named(project_name)
14
14
  project_id = get_project_id_by_name(project_name)
15
- response = request(:get, "/projects/#{project_id}/cucumber_scenarios.json?status=todo")
15
+ rerun_statuses = [:pending, :undefined, :failed]
16
+ status_querystring = rerun_statuses.map { |s| "status[]=#{s}"}.join("&")
17
+ response = request(:get, "/projects/#{project_id}/cucumber_scenarios.json?#{status_querystring}")
16
18
  JSON.parse(response)["cucumber_scenarios"]
17
19
  end
18
20
 
metadata CHANGED
@@ -5,8 +5,8 @@ version: !ruby/object:Gem::Version
5
5
  segments:
6
6
  - 0
7
7
  - 5
8
- - 1
9
- version: 0.5.1
8
+ - 2
9
+ version: 0.5.2
10
10
  platform: ruby
11
11
  authors:
12
12
  - Matt Wynne