Skip to content

Commit 4e9a76a

Browse files
committed
Add additional tasks, some grammar fixes, main readme file
1 parent c0d1127 commit 4e9a76a

File tree

11 files changed

+61
-35
lines changed

11 files changed

+61
-35
lines changed

README.md

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
# Allure ruby
2+
3+
Ruby testing framework adaptors for generating allure compatible test reports
4+
5+
## allure-ruby-commons
6+
7+
```ruby
8+
gem "allure-ruby-commons"
9+
```
10+
11+
## allure-cucumber
12+
13+
```ruby
14+
gem "allure-cucumber
15+
```

Rakefile

Lines changed: 4 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,13 @@
11
# frozen_string_literal: true
22

3+
require_relative "tasks/test"
34
require_relative "tasks/release"
45

6+
desc "Run all tests by default"
7+
task default: :test
8+
59
desc "Build gem files for all projects"
610
task build: "all:build"
711

812
desc "Release all gems to rubygems"
913
task release: "all:push"
10-
11-
desc "Run all tests by default"
12-
task default: :test
13-
14-
%w[test rubocop gem].each do |task_name|
15-
desc "Run #{task_name} for all projects"
16-
task task_name do
17-
errors = FRAMEWORKS.each_with_object([]) do |project, a|
18-
system(%(cd #{project} && #{$PROGRAM_NAME} #{task_name} --trace)) || a << project
19-
end
20-
raise Exception.new("Errors in #{errors.join(', ')}") unless errors.empty?
21-
end
22-
end

allure-cucumber/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,4 +89,4 @@ Allure.add_link("Custom Url", "http://www.github.com")
8989
```
9090

9191
## How to generate report
92-
This adapter only generates json files containing information about tests. See [wiki section](https://docs.qameta.io/allure/#_reporting) on how to generate report.
92+
This adaptor only generates json files containing information about tests. See [wiki section](https://docs.qameta.io/allure/#_reporting) on how to generate report.

allure-cucumber/Rakefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ require "rspec/core/rake_task"
44
require "rubocop/rake_task"
55

66
RSpec::Core::RakeTask.new(:test) do |t|
7-
t.rspec_opts = "--color --require spec_helper --format documentation --tag ~integration"
7+
t.rspec_opts = "--color --require spec_helper"
88
end
99

1010
RuboCop::RakeTask.new(:rubocop) do |task|

allure-cucumber/allure-cucumber.gemspec

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@ Gem::Specification.new do |s|
66
s.platform = Gem::Platform::RUBY
77
s.name = "allure-cucumber"
88
s.version = version
9-
s.summary = "Allure cucumber ruby adapter"
10-
s.description = "Cucumber adapter to generate rich allure test reports"
9+
s.summary = "Allure cucumber ruby adaptor"
10+
s.description = "Cucumber adaptor to generate rich allure test reports"
1111

1212
s.required_ruby_version = ">= 2.5.0"
1313

allure-ruby-commons/Rakefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ require "rspec/core/rake_task"
44
require "rubocop/rake_task"
55

66
RSpec::Core::RakeTask.new(:test) do |t|
7-
t.rspec_opts = "--color --require spec_helper --format documentation --tag ~integration"
7+
t.rspec_opts = "--color --require spec_helper --tag ~integration"
88
end
99

1010
RuboCop::RakeTask.new(:rubocop) do |task|

allure-ruby-commons/lib/allure-ruby-commons.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
require "uuid"
66
require_rel "allure_ruby_commons/**/*rb"
77

8-
# Namespace for classes that handle allure report generation and different framework adapters
8+
# Namespace for classes that handle allure report generation and different framework adaptors
99
module Allure
1010
class << self
1111
# Get thread specific allure lifecycle object

allure-ruby-commons/lib/allure_ruby_commons/util.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ class << self
1414
# Download allure bin if appropriate version is not in path
1515
# @return [String] allure executable
1616
def allure_cli
17-
return "allure" if Version::ALLURE == `allure --version`.chomp
17+
return "allure" if ALLURE_CLI_VERSION == `allure --version`.chomp
1818

1919
cli_dir = File.join(".allure", "allure-#{ALLURE_CLI_VERSION}")
2020
zip = File.join(".allure", "allure.zip")

allure.gemspec

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ Gem::Specification.new do |s|
66
s.platform = Gem::Platform::RUBY
77
s.name = "allure-ruby"
88
s.version = version
9-
s.summary = "Allure ruby commons and ruby testing framework adapters"
9+
s.summary = "Allure ruby commons and ruby testing framework adaptors"
1010

1111
s.required_ruby_version = ">= 2.5.0"
1212

tasks/release.rb

Lines changed: 8 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,39 +1,33 @@
11
# frozen_string_literal: true
22

3-
FRAMEWORKS = %w[allure-ruby-commons allure-cucumber].freeze
4-
53
root = File.expand_path("..", __dir__)
64
version = File.read("#{root}/ALLURE_VERSION").strip
75

86
directory "pkg"
97

10-
FRAMEWORKS.each do |framework|
11-
namespace framework do
12-
gem = "pkg/#{framework}-#{version}.gem"
13-
gemspec = "#{framework}.gemspec"
8+
ADAPTORS.each do |adaptor|
9+
namespace adaptor do
10+
gem = "pkg/#{adaptor}-#{version}.gem"
11+
gemspec = "#{adaptor}.gemspec"
1412

1513
task :clean do
1614
rm_f gem
1715
end
1816

1917
task gem: "pkg" do
20-
sh "cd #{framework} && gem build #{gemspec} && mv #{framework}-#{version}.gem #{root}/pkg/"
18+
sh "cd #{adaptor} && gem build #{gemspec} && mv #{adaptor}-#{version}.gem #{root}/pkg/"
2119
end
2220

2321
task build: %i[clean gem]
2422

25-
task install: :build do
26-
sh "gem install --pre #{gem}"
27-
end
28-
2923
task push: :build do
3024
sh "gem push #{gem}"
3125
end
3226
end
3327
end
3428

3529
namespace :all do
36-
task build: FRAMEWORKS.map { |framework| "#{framework}:build" }
37-
task install: FRAMEWORKS.map { |framework| "#{framework}:install" }
38-
task push: FRAMEWORKS.map { |framework| "#{framework}:push" }
30+
task build: ADAPTORS.map { |adaptor| "#{adaptor}:build" }
31+
task install: ADAPTORS.map { |adaptor| "#{adaptor}:install" }
32+
task push: ADAPTORS.map { |adaptor| "#{adaptor}:push" }
3933
end

0 commit comments

Comments
 (0)