crtu 0.2.1 → 0.2.2

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 4db142452a60691b7a4b56594f5d74fd57af01e9
4
- data.tar.gz: 4a721c3cb9d38d7a11519fe23dcb30cfdeb2f2f6
3
+ metadata.gz: f161ed8724d8811b9b09a6d7835422c0347601be
4
+ data.tar.gz: 6568ee3cbcf07af4abce1534d3c86aed4cd0bda9
5
5
  SHA512:
6
- metadata.gz: 0ca9947b403a86d19406825e9ea7726dfb220b9828c328c756ef9c3b0e3a0d198c5ae7627b7563dc5e09f2974f8bb422588569c3baeae1407a65288e36db989e
7
- data.tar.gz: 125fb19202914d4e79c5a73de309f42e799c8d5a93290866977eaa9be7af76c68c659529ee2b702478283ddbecf651ba735ad6cdf421eafd031ac3b1cbc7c2a9
6
+ metadata.gz: 599564b39eafe30e814772d57aced52de786eb04767dd459e426dbe4c0442558f0007ac59f6d7c8ecd034c5aa8f25eb041ead5ec75760d1c1e1c67d23b072cb6
7
+ data.tar.gz: cba2fff6a63f5bd91743e19b2ac21bc86cd3f31408f6db250ba09ea1f40e36e535571ead295adb238516276b80c9574c4ee65167768fd475598e51f34515f990
@@ -1,3 +1,3 @@
1
1
  module Crtu
2
- VERSION = "0.2.1"
2
+ VERSION = "0.2.2"
3
3
  end
@@ -1,5 +1,6 @@
1
1
  require 'cucumber/rake/task'
2
2
  require 'fileutils'
3
+ require 'pathname'
3
4
 
4
5
  class BuildFailure < Exception;
5
6
  def initialize(message = nil)
@@ -67,6 +68,36 @@ namespace :features do
67
68
  end
68
69
  end
69
70
 
71
+
72
+ desc 'Run specific feature file'
73
+ task :run_cucumber_feature, [:feature_name] do |t,args|
74
+ if File.extname(:feature_name).empty?
75
+ filename = "#{:feature_name}.feature"
76
+ else
77
+ filename = :feature_name.to_s
78
+ end
79
+
80
+ #if we only give filename, no paths behind
81
+ if File.dirname(filename).empty?
82
+ filepath = File.join(Dir.pwd, 'features', filename)
83
+ else
84
+ # we shoud extract each pathname and process it
85
+ filefolders = File.dirname(filename).split(File::SEPARATOR)
86
+ filepath = File.join(Dir.pwd, 'features')
87
+
88
+ filefolders.each do |folder|
89
+ filepath = File.join(filepath,folder)
90
+ end
91
+ filepath = File.join(filename.basename)
92
+ end
93
+
94
+ Cucumber::Rake::Task.new(t) do |c|
95
+ c.cucumber_opts = "-r #{filepath} --format progress --out reports/progress.out --format html --out reports/report.html --format json --out reports/cucumber.json"
96
+ end
97
+
98
+
99
+ end
100
+
70
101
  desc 'Run complete feature build'
71
102
  task :cruise do
72
103
  finished_successful = run_and_check_for_exception('finished')
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: crtu
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.1
4
+ version: 0.2.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Fábio André Ramos Rodrigues
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2016-09-09 00:00:00.000000000 Z
11
+ date: 2016-09-20 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler