scrab 0.0.2 → 0.0.3

Sign up to get free protection for your applications and to get access to all the features.
data/.rally ADDED
@@ -0,0 +1 @@
1
+ :project: "Rally - Cucumber integration test project"
data/lib/scrab.rb CHANGED
@@ -26,8 +26,21 @@ module Scrab
26
26
  end
27
27
 
28
28
  def self.rally_config
29
- raise "Please configure rally at #{rally_config_path}, check .rally.sample for an example" unless File.exist?(rally_config_path)
30
- @rally_config ||= YAML.load(File.read(rally_config_path))
29
+ @rally_config ||= begin
30
+ orig_path = Dir.pwd
31
+ path = orig_path
32
+ config = {}
33
+
34
+ while path != "/"
35
+ if path = File.join(path, '.rally') and File.exist?(path)
36
+ config = YAML.load(File.read(path)).merge(config)
37
+ end
38
+ Dir.chdir("..")
39
+ path = Dir.pwd
40
+ end
41
+
42
+ config
43
+ end
31
44
  end
32
45
 
33
46
  def self.rally
@@ -7,20 +7,26 @@ class Scrab::Commands::Push
7
7
  def run(options, *features)
8
8
  determine_feature_paths(features).each do |feature|
9
9
  begin
10
+ relative_path = File.expand_path(feature).gsub(/^#{Regexp.escape(Dir.pwd)}/, '')
11
+ @out.print "-> #{relative_path}"
12
+
10
13
  story = @parser.parse(feature)
11
14
 
12
- @out.print "Pushing '[#{story.id}] #{story.name}' to Rally... "
15
+ @out.print "\n\tStory: [#{story.id}] #{story.name}"
13
16
 
14
17
  if Scrab.rally.update(story)
15
- @out.puts "OK."
18
+ @out.puts ": OK."
16
19
  else
17
- @out.puts "FAILED."
20
+ @out.puts ": FAILED."
18
21
  end
19
22
  rescue Scrab::Rally::StoryNotFoundError
20
- @out.puts "NOT FOUND."
23
+ @out.puts ": NOT FOUND."
21
24
  rescue Scrab::FeatureParser::ParsingError => e
22
- @out.puts "Failed to parse '#{feature}':\n\t#{e.message}"
25
+ @out.puts ": PARSING FAILED"
26
+ @out.puts "\tFailed to parse '#{feature}':\n\t#{e.message}"
23
27
  end
28
+
29
+ @out.puts ""
24
30
  end
25
31
  end
26
32
 
data/lib/scrab/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module Scrab
2
- VERSION = "0.0.2"
2
+ VERSION = "0.0.3"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: scrab
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.2
4
+ version: 0.0.3
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -13,7 +13,7 @@ date: 2011-11-23 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: builder
16
- requirement: &70311929389920 !ruby/object:Gem::Requirement
16
+ requirement: &70347074210940 !ruby/object:Gem::Requirement
17
17
  none: false
18
18
  requirements:
19
19
  - - ! '>='
@@ -21,10 +21,10 @@ dependencies:
21
21
  version: '0'
22
22
  type: :runtime
23
23
  prerelease: false
24
- version_requirements: *70311929389920
24
+ version_requirements: *70347074210940
25
25
  - !ruby/object:Gem::Dependency
26
26
  name: rally_rest_api
27
- requirement: &70311929389480 !ruby/object:Gem::Requirement
27
+ requirement: &70347074210500 !ruby/object:Gem::Requirement
28
28
  none: false
29
29
  requirements:
30
30
  - - ! '>='
@@ -32,10 +32,10 @@ dependencies:
32
32
  version: '0'
33
33
  type: :runtime
34
34
  prerelease: false
35
- version_requirements: *70311929389480
35
+ version_requirements: *70347074210500
36
36
  - !ruby/object:Gem::Dependency
37
37
  name: gherkin
38
- requirement: &70311929389060 !ruby/object:Gem::Requirement
38
+ requirement: &70347074210080 !ruby/object:Gem::Requirement
39
39
  none: false
40
40
  requirements:
41
41
  - - ! '>='
@@ -43,10 +43,10 @@ dependencies:
43
43
  version: '0'
44
44
  type: :runtime
45
45
  prerelease: false
46
- version_requirements: *70311929389060
46
+ version_requirements: *70347074210080
47
47
  - !ruby/object:Gem::Dependency
48
48
  name: rspec
49
- requirement: &70311929388640 !ruby/object:Gem::Requirement
49
+ requirement: &70347074209660 !ruby/object:Gem::Requirement
50
50
  none: false
51
51
  requirements:
52
52
  - - ! '>='
@@ -54,10 +54,10 @@ dependencies:
54
54
  version: '0'
55
55
  type: :development
56
56
  prerelease: false
57
- version_requirements: *70311929388640
57
+ version_requirements: *70347074209660
58
58
  - !ruby/object:Gem::Dependency
59
59
  name: guard
60
- requirement: &70311929388220 !ruby/object:Gem::Requirement
60
+ requirement: &70347074209240 !ruby/object:Gem::Requirement
61
61
  none: false
62
62
  requirements:
63
63
  - - ! '>='
@@ -65,10 +65,10 @@ dependencies:
65
65
  version: '0'
66
66
  type: :development
67
67
  prerelease: false
68
- version_requirements: *70311929388220
68
+ version_requirements: *70347074209240
69
69
  - !ruby/object:Gem::Dependency
70
70
  name: guard-rspec
71
- requirement: &70311929387800 !ruby/object:Gem::Requirement
71
+ requirement: &70347074208820 !ruby/object:Gem::Requirement
72
72
  none: false
73
73
  requirements:
74
74
  - - ! '>='
@@ -76,10 +76,10 @@ dependencies:
76
76
  version: '0'
77
77
  type: :development
78
78
  prerelease: false
79
- version_requirements: *70311929387800
79
+ version_requirements: *70347074208820
80
80
  - !ruby/object:Gem::Dependency
81
81
  name: rb-fsevent
82
- requirement: &70311929387380 !ruby/object:Gem::Requirement
82
+ requirement: &70347074208400 !ruby/object:Gem::Requirement
83
83
  none: false
84
84
  requirements:
85
85
  - - ! '>='
@@ -87,10 +87,10 @@ dependencies:
87
87
  version: '0'
88
88
  type: :development
89
89
  prerelease: false
90
- version_requirements: *70311929387380
90
+ version_requirements: *70347074208400
91
91
  - !ruby/object:Gem::Dependency
92
92
  name: growl_notify
93
- requirement: &70311929386960 !ruby/object:Gem::Requirement
93
+ requirement: &70347074207980 !ruby/object:Gem::Requirement
94
94
  none: false
95
95
  requirements:
96
96
  - - ! '>='
@@ -98,10 +98,10 @@ dependencies:
98
98
  version: '0'
99
99
  type: :development
100
100
  prerelease: false
101
- version_requirements: *70311929386960
101
+ version_requirements: *70347074207980
102
102
  - !ruby/object:Gem::Dependency
103
103
  name: fakeweb
104
- requirement: &70311929386540 !ruby/object:Gem::Requirement
104
+ requirement: &70347074207560 !ruby/object:Gem::Requirement
105
105
  none: false
106
106
  requirements:
107
107
  - - ! '>='
@@ -109,7 +109,7 @@ dependencies:
109
109
  version: '0'
110
110
  type: :development
111
111
  prerelease: false
112
- version_requirements: *70311929386540
112
+ version_requirements: *70347074207560
113
113
  description: Simple tool for pushing cucumber features into Rally testcases
114
114
  email:
115
115
  - divoxx@gmail.com
@@ -119,6 +119,7 @@ extensions: []
119
119
  extra_rdoc_files: []
120
120
  files:
121
121
  - .gitignore
122
+ - .rally
122
123
  - .rally.sample
123
124
  - Gemfile
124
125
  - Guardfile