coleslaw 0.0.2 → 1.0.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +13 -5
- data/README.md +23 -5
- data/bin/coleslaw +20 -19
- data/lib/coleslaw/gem/version.rb +1 -1
- metadata +13 -13
checksums.yaml
CHANGED
@@ -1,7 +1,15 @@
|
|
1
1
|
---
|
2
|
-
|
3
|
-
metadata.gz:
|
4
|
-
|
2
|
+
!binary "U0hBMQ==":
|
3
|
+
metadata.gz: !binary |-
|
4
|
+
OWZmYmUxMjc1MWM1ZTQ2NGE0YWJlNzRiZmRmZmYyOGYwNjFkODViYQ==
|
5
|
+
data.tar.gz: !binary |-
|
6
|
+
ZWI2YTkwN2EyMTYyNGI5OTgyNmRkZDIwOWYyOGFiOTgyMWMyNmM3Nw==
|
5
7
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
|
8
|
+
metadata.gz: !binary |-
|
9
|
+
ZGY1NDMxOGQzY2NmMDczOGZjMGE4ZGJjNjYwMDA5Mjg0MDM3NGI5OTE5ZjJh
|
10
|
+
OGY3NDFiNWNkNTFiY2U2YmFiZThlMDBkNzc2NmM4ZGU1ZWU0MDU4YTE2ODg4
|
11
|
+
Yjk2OGM4MDQzYmU5MTFlZjRmNGIwNmIyNzljMWRmMDY2NGNmYjU=
|
12
|
+
data.tar.gz: !binary |-
|
13
|
+
MDdkZjEzNGYwYTk5YjE3NDQxYTliNTYzOGQwNTIxMzAxMmEyZGY3MDcwMWI5
|
14
|
+
ZTFiYzMyZjlkNzRiZDQyMjMyODBlMzZlOWY4NWFmZDgwMzc2NDc5NDQ2Y2Iy
|
15
|
+
MTg1ZTE3OTBmNWNiOGI1ODQ4MzI4ZDI5YmJkODkxNjA3NjM3NjQ=
|
data/README.md
CHANGED
@@ -1,12 +1,14 @@
|
|
1
|
-
# Coleslaw
|
1
|
+
# Coleslaw Gem
|
2
2
|
|
3
|
-
|
3
|
+
ColeslawApp (http://www.coleslawapp.com) is an easy and sexy way to
|
4
|
+
share your hard built Cucumber (Ruby) or Lettuce (Python) feature files
|
5
|
+
with your product owner and maybe the world.
|
4
6
|
|
5
7
|
## Installation
|
6
8
|
|
7
9
|
Add this line to your application's Gemfile:
|
8
10
|
|
9
|
-
gem 'coleslaw
|
11
|
+
gem 'coleslaw'
|
10
12
|
|
11
13
|
And then execute:
|
12
14
|
|
@@ -14,11 +16,27 @@ And then execute:
|
|
14
16
|
|
15
17
|
Or install it yourself as:
|
16
18
|
|
17
|
-
$ gem install coleslaw
|
19
|
+
$ gem install coleslaw
|
18
20
|
|
19
21
|
## Usage
|
20
22
|
|
21
|
-
|
23
|
+
### Get your secret key
|
24
|
+
Visit http://www.coleslawapp.com and register an account there. You
|
25
|
+
may also want to create a project in order to have a project token.
|
26
|
+
|
27
|
+
Then visit https://www.coleslawapp.com/api_tokens and copy your secret
|
28
|
+
token.
|
29
|
+
### Upload the tests
|
30
|
+
By default, coleslaw assume that your .feature file is in features/
|
31
|
+
folder and your .xml test result file is in features/reports/. You can
|
32
|
+
customize these with --features-dir and --reports-dir.
|
33
|
+
|
34
|
+
Now run:
|
35
|
+
$ bundle exec coleslaw --token [Your secret token here] [Project Token]
|
36
|
+
|
37
|
+
And viola, tests will be uploaded to Coleslaw and rendered. Visit
|
38
|
+
https://www.coleslawapp.com/dashboard and start browsing your uploaded
|
39
|
+
tests.
|
22
40
|
|
23
41
|
## Contributing
|
24
42
|
|
data/bin/coleslaw
CHANGED
@@ -16,7 +16,7 @@ end
|
|
16
16
|
# Command Line Interface for https://www.coleslawapp.com - The easiest way to share your BDD features with product owner
|
17
17
|
#
|
18
18
|
# SYNOPSIS
|
19
|
-
# #{command_name} [options]
|
19
|
+
# #{command_name} [options] PROJECT_TOKEN
|
20
20
|
#
|
21
21
|
# OPTIONS
|
22
22
|
# #{summarized_options}
|
@@ -32,7 +32,7 @@ class Coleslaw < Quickl::Command(__FILE__, __LINE__)
|
|
32
32
|
options do |opt|
|
33
33
|
opt.on_tail('--help', "Show this help message"){ raise Quickl::Help }
|
34
34
|
opt.on_tail('--version', "Show version and exit"){ raise Quickl::Exit, "#{Quickl.program_name} #{VERSION}" }
|
35
|
-
opt.on('--token [
|
35
|
+
opt.on('--token [API_TOKEN]', "Set your access token") { |t| @token = t }
|
36
36
|
opt.on('--features-dir [FDIR]', "Set the features directory, default to #{DEFAULT_FEATURES_DIR}") do |features_dir|
|
37
37
|
@features_dir = features_dir
|
38
38
|
end
|
@@ -86,17 +86,17 @@ class Coleslaw < Quickl::Command(__FILE__, __LINE__)
|
|
86
86
|
raise Quickl::InvalidArgument, "Please provide token by either use --token or create .coleslaw file in your current working directory"
|
87
87
|
end
|
88
88
|
|
89
|
-
|
89
|
+
project_token = args.first
|
90
90
|
|
91
|
-
unless
|
92
|
-
raise Quickl::InvalidArgument, "
|
91
|
+
unless project_token
|
92
|
+
raise Quickl::InvalidArgument, "Please provide project token"
|
93
93
|
end
|
94
94
|
|
95
95
|
puts "Creating new test result..."
|
96
|
-
if (test_result_id = create_test_result(
|
96
|
+
if (test_result_id = create_test_result(project_token))
|
97
97
|
test_result_files.each do |test_result_file|
|
98
98
|
puts "Uploading [#{test_result_file}]"
|
99
|
-
upload_test_result_file(
|
99
|
+
upload_test_result_file(project_token, test_result_id, test_result_file)
|
100
100
|
end
|
101
101
|
puts "Successfully created test result ##{test_result_id}"
|
102
102
|
end
|
@@ -106,9 +106,9 @@ class Coleslaw < Quickl::Command(__FILE__, __LINE__)
|
|
106
106
|
{ content_type: :json, :accept => :json, :'Token-Secret' => token }
|
107
107
|
end
|
108
108
|
|
109
|
-
def create_test_result(
|
109
|
+
def create_test_result(project_token)
|
110
110
|
response = RestClient.post(
|
111
|
-
server + "/
|
111
|
+
server + "/projects/#{project_token}/test_results",
|
112
112
|
{},
|
113
113
|
**request_options
|
114
114
|
)
|
@@ -120,17 +120,18 @@ class Coleslaw < Quickl::Command(__FILE__, __LINE__)
|
|
120
120
|
nil
|
121
121
|
end
|
122
122
|
|
123
|
-
def upload_test_result_file(
|
123
|
+
def upload_test_result_file(project_token, test_result_id, test_result_file)
|
124
124
|
RestClient.post(
|
125
|
-
|
126
|
-
|
127
|
-
|
128
|
-
|
129
|
-
|
130
|
-
|
131
|
-
|
132
|
-
|
133
|
-
|
125
|
+
server + "/projects/#{project_token}/test_results/#{test_result_id}/add_file",
|
126
|
+
{
|
127
|
+
file: File.new(test_result_file, 'rb')
|
128
|
+
},
|
129
|
+
**request_options
|
130
|
+
) do |response, request, result, &block|
|
131
|
+
unless [301, 302, 307].include? response.code # RestClient does not handle redirects on POST
|
132
|
+
response.return!(request, result, &block)
|
133
|
+
end
|
134
|
+
end
|
134
135
|
end
|
135
136
|
|
136
137
|
def test_result_files
|
data/lib/coleslaw/gem/version.rb
CHANGED
metadata
CHANGED
@@ -1,55 +1,55 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: coleslaw
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0
|
4
|
+
version: 1.0.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Phuong Nguyen
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2014-09-15 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: quickl
|
15
15
|
requirement: !ruby/object:Gem::Requirement
|
16
16
|
requirements:
|
17
|
-
- - '>='
|
17
|
+
- - ! '>='
|
18
18
|
- !ruby/object:Gem::Version
|
19
19
|
version: '0'
|
20
20
|
type: :runtime
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
|
-
- - '>='
|
24
|
+
- - ! '>='
|
25
25
|
- !ruby/object:Gem::Version
|
26
26
|
version: '0'
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: rest-client
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
30
30
|
requirements:
|
31
|
-
- - '>='
|
31
|
+
- - ! '>='
|
32
32
|
- !ruby/object:Gem::Version
|
33
33
|
version: '0'
|
34
34
|
type: :runtime
|
35
35
|
prerelease: false
|
36
36
|
version_requirements: !ruby/object:Gem::Requirement
|
37
37
|
requirements:
|
38
|
-
- - '>='
|
38
|
+
- - ! '>='
|
39
39
|
- !ruby/object:Gem::Version
|
40
40
|
version: '0'
|
41
41
|
- !ruby/object:Gem::Dependency
|
42
42
|
name: json
|
43
43
|
requirement: !ruby/object:Gem::Requirement
|
44
44
|
requirements:
|
45
|
-
- - '>='
|
45
|
+
- - ! '>='
|
46
46
|
- !ruby/object:Gem::Version
|
47
47
|
version: '0'
|
48
48
|
type: :runtime
|
49
49
|
prerelease: false
|
50
50
|
version_requirements: !ruby/object:Gem::Requirement
|
51
51
|
requirements:
|
52
|
-
- - '>='
|
52
|
+
- - ! '>='
|
53
53
|
- !ruby/object:Gem::Version
|
54
54
|
version: '0'
|
55
55
|
- !ruby/object:Gem::Dependency
|
@@ -70,14 +70,14 @@ dependencies:
|
|
70
70
|
name: byebug
|
71
71
|
requirement: !ruby/object:Gem::Requirement
|
72
72
|
requirements:
|
73
|
-
- - '>='
|
73
|
+
- - ! '>='
|
74
74
|
- !ruby/object:Gem::Version
|
75
75
|
version: '0'
|
76
76
|
type: :development
|
77
77
|
prerelease: false
|
78
78
|
version_requirements: !ruby/object:Gem::Requirement
|
79
79
|
requirements:
|
80
|
-
- - '>='
|
80
|
+
- - ! '>='
|
81
81
|
- !ruby/object:Gem::Version
|
82
82
|
version: '0'
|
83
83
|
description: A gem that allow you to upload your test results to http://coleslawapp.com
|
@@ -107,17 +107,17 @@ require_paths:
|
|
107
107
|
- lib
|
108
108
|
required_ruby_version: !ruby/object:Gem::Requirement
|
109
109
|
requirements:
|
110
|
-
- - '>='
|
110
|
+
- - ! '>='
|
111
111
|
- !ruby/object:Gem::Version
|
112
112
|
version: '0'
|
113
113
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
114
114
|
requirements:
|
115
|
-
- - '>='
|
115
|
+
- - ! '>='
|
116
116
|
- !ruby/object:Gem::Version
|
117
117
|
version: '0'
|
118
118
|
requirements: []
|
119
119
|
rubyforge_project:
|
120
|
-
rubygems_version: 2.
|
120
|
+
rubygems_version: 2.1.9
|
121
121
|
signing_key:
|
122
122
|
specification_version: 4
|
123
123
|
summary: A gem that allow you to upload your test results to http://coleslawapp.com
|