snapdragon 0.1.11 → 0.1.12
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/ChangeLog.markdown +5 -0
- data/lib/snapdragon/command_line_parser.rb +4 -0
- data/lib/snapdragon/resources/SnapdragonConsoleReporter.js +1 -1
- data/lib/snapdragon/suite.rb +4 -0
- data/lib/snapdragon/version.rb +1 -1
- data/lib/snapdragon/views/run.erb +6 -1
- data/spec/lib/snapdragon/command_line_parser_spec.rb +12 -0
- data/spec/lib/snapdragon/suite_spec.rb +9 -0
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: b8aad99b89a86f7409439f78820527090c48188f
|
4
|
+
data.tar.gz: 2707cb606f2f5ae2f3e72783b27e18efa25e4d5b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 9eef67ae9b2468cbf3bedef07fc8219a0a14657a2d2ac4717bc19adfafa382f187621b4f5794775b276c40d89fc7601ef1ecbcf41d0daee6a383e8f8581a0a52
|
7
|
+
data.tar.gz: 719add788cd12f7729f631f39d597bf0e47d68186b6cd03cd9fee92893d83b937a960d2be03ad73d2a6f5ecf25c78073f9d75284c8a69c955f8bb09415b9a837
|
data/ChangeLog.markdown
CHANGED
@@ -6,6 +6,11 @@ versions as well as provide a rough history.
|
|
6
6
|
|
7
7
|
#### Next Release
|
8
8
|
|
9
|
+
#### v0.1.12
|
10
|
+
|
11
|
+
* add the --color, --no-color, --colour, --no-colour, and -c option to
|
12
|
+
enable/disable color output
|
13
|
+
|
9
14
|
#### v0.1.11
|
10
15
|
|
11
16
|
* fixed issue where junit formatter was outputing multiple xml docs.
|
@@ -7,6 +7,7 @@ module Snapdragon
|
|
7
7
|
def self.parse(args)
|
8
8
|
options = OpenStruct.new
|
9
9
|
options.format = "console"
|
10
|
+
options.color = true
|
10
11
|
|
11
12
|
opts = OptionParser.new do |opts|
|
12
13
|
opts.banner = "Usage: snapdragon [options] [files or directories]"
|
@@ -19,6 +20,9 @@ module Snapdragon
|
|
19
20
|
opts.on('-f', '--format [FORMAT]', "set output format") do |format|
|
20
21
|
options.format = format
|
21
22
|
end
|
23
|
+
opts.on('-c', '--[no-]color', '--[no-]colour', 'Enable color in the output.') do |o|
|
24
|
+
options.color = o
|
25
|
+
end
|
22
26
|
if args.empty?
|
23
27
|
puts opts; exit
|
24
28
|
end
|
data/lib/snapdragon/suite.rb
CHANGED
data/lib/snapdragon/version.rb
CHANGED
@@ -34,7 +34,12 @@
|
|
34
34
|
var snapdragonJUnitReporter = new jasmine.SnapdragonJUnitReporter();
|
35
35
|
jasmineEnv.addReporter(snapdragonJUnitReporter);
|
36
36
|
<% else %>
|
37
|
-
var
|
37
|
+
var reporterOptions = {};
|
38
|
+
<% if @suite.use_color? %>
|
39
|
+
reporterOptions.showColors = true;
|
40
|
+
<% end %>
|
41
|
+
|
42
|
+
var snapdragonConsoleReporter = new jasmine.SnapdragonConsoleReporter(reporterOptions);
|
38
43
|
jasmineEnv.addReporter(snapdragonConsoleReporter);
|
39
44
|
<% end %>
|
40
45
|
|
@@ -46,5 +46,17 @@ describe Snapdragon::CommandLineParser do
|
|
46
46
|
subject.parse(["spec/hello_spec.rb"]).format.should eq "console"
|
47
47
|
end
|
48
48
|
end
|
49
|
+
|
50
|
+
context "when color option is not provided" do
|
51
|
+
it "defaults to true" do
|
52
|
+
subject.parse(["spec/hello_spec.rb"]).color.should eq true
|
53
|
+
end
|
54
|
+
end
|
55
|
+
|
56
|
+
context "when no-color option is provided" do
|
57
|
+
it "sets the color option" do
|
58
|
+
subject.parse(["--no-color", "spec/hello_spec.rb"]).color.should eq false
|
59
|
+
end
|
60
|
+
end
|
49
61
|
end
|
50
62
|
end
|
@@ -32,6 +32,15 @@ describe Snapdragon::Suite do
|
|
32
32
|
end
|
33
33
|
end
|
34
34
|
|
35
|
+
describe "#use_color?" do
|
36
|
+
it "returns the configured color setting" do
|
37
|
+
color = stub
|
38
|
+
options = stub(color: color)
|
39
|
+
suite = Snapdragon::Suite.new(options, stub)
|
40
|
+
suite.use_color?.should eq color
|
41
|
+
end
|
42
|
+
end
|
43
|
+
|
35
44
|
describe "#spec_files" do
|
36
45
|
it "creates a path object to represent the path" do
|
37
46
|
options = stub
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: snapdragon
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.12
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Andrew De Ponte
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2013-07-
|
11
|
+
date: 2013-07-19 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: capybara
|