ocrunner 0.3.0 → 0.3.1
Sign up to get free protection for your applications and to get access to all the features.
- data/README.rdoc +9 -6
- data/VERSION +1 -1
- data/lib/ocrunner/cli.rb +6 -5
- data/lib/ocrunner/test_runner.rb +1 -1
- data/ocrunner.gemspec +2 -2
- metadata +3 -3
data/README.rdoc
CHANGED
@@ -20,13 +20,16 @@ Control-c: kill ocrunner
|
|
20
20
|
Control-\: toggle verbosity and rerun tests. This is nice for when the pretty filtered output doesn't show quite enough information to you.
|
21
21
|
|
22
22
|
|
23
|
-
== Pretty debug logging with
|
23
|
+
== Pretty debug logging with OCLog() and OCOLog()
|
24
24
|
|
25
|
-
This is a little crazy, but ocrunner has support for displaying debug log messaged from your Objective-C code through the use of
|
25
|
+
This is a little crazy, but ocrunner has support for displaying debug log messaged from your Objective-C code through the use of two custom logging macros. The messages are colored purple in order to make them easier to see in the verbose output. To use this feature, add the following macro to a header or prefix file in your Xcode project:
|
26
26
|
|
27
|
-
#define
|
27
|
+
#define OCLog(format, ...) NSLog([NSString stringWithFormat: @"%s:%d:%s:\033[35m%@\033[0m", __PRETTY_FUNCTION__, __LINE__, __FILE__, format], ## __VA_ARGS__)
|
28
|
+
#define OCOLog(object) OCLog(@"%@", object)
|
29
|
+
|
30
|
+
OCLog is a drop in replacement for NSLog(). OCOLog is for logging a single values without having to specify the format string.
|
28
31
|
|
29
|
-
ocrunner will display the latest version of this macro when run with --
|
32
|
+
ocrunner will display the latest version of this macro when run with --oclog-help.
|
30
33
|
|
31
34
|
|
32
35
|
== I don't like your defaults
|
@@ -42,8 +45,8 @@ Don't worry, you can specify the target/configuration/sdk options passed to xcod
|
|
42
45
|
--debug-command, -d: Print xcodebuild command and exit
|
43
46
|
--verbose, -v: Display all xcodebuild output after summary
|
44
47
|
--loud-compilation, -l: Always show verbose output when a compilation or linking error occurs (default: true)
|
45
|
-
--
|
46
|
-
--
|
48
|
+
--oclog, -r: Display OCLog log messages (default: true)
|
49
|
+
--oclog-help, -o: Print OCLog code example and exit
|
47
50
|
--version, -e: Print version and exit
|
48
51
|
--help, -h: Show this message
|
49
52
|
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.3.
|
1
|
+
0.3.1
|
data/lib/ocrunner/cli.rb
CHANGED
@@ -31,14 +31,15 @@ module OCRunner
|
|
31
31
|
opt :debug_command, "Print xcodebuild command and exit", :type => :boolean, :default => false
|
32
32
|
opt :verbose, "Display all xcodebuild output after summary", :type => :boolean, :default => false
|
33
33
|
opt :loud_compilation, "Always show verbose output when a compilation or linking error occurs", :type => :boolean, :default => true
|
34
|
-
opt :
|
35
|
-
opt :
|
34
|
+
opt :oclog, "Display OCLog log messages", :type => :boolean, :default => true
|
35
|
+
opt :oclog_help, "Print OCLog code example and exit", :type => :boolean, :default => false
|
36
36
|
end
|
37
37
|
|
38
|
-
if opts[:
|
38
|
+
if opts[:oclog_help]
|
39
39
|
present do
|
40
40
|
puts indent blue "Add this to a header or prefix file in your Xcode project:"
|
41
|
-
puts indent '#define
|
41
|
+
puts indent '#define OCLog(format, ...) NSLog([NSString stringWithFormat: @"%s:%d:%s:\033[35m%@\033[0m", __PRETTY_FUNCTION__, __LINE__, __FILE__, format], ## __VA_ARGS__)'
|
42
|
+
puts indent '#define OCOLog(object) OCLog(@"%@", object)'
|
42
43
|
end
|
43
44
|
exit
|
44
45
|
end
|
@@ -50,7 +51,7 @@ module OCRunner
|
|
50
51
|
execute.call
|
51
52
|
|
52
53
|
if opts[:auto]
|
53
|
-
FSSM.monitor(Dir.pwd, %w{**/*.m **/*.h}) do
|
54
|
+
FSSM.monitor(Dir.pwd, %w{**/*.m **/*.h **/*.pch}) do
|
54
55
|
create { |base, relative| execute.call }
|
55
56
|
update { |base, relative| execute.call }
|
56
57
|
delete { |base, relative| execute.call }
|
data/lib/ocrunner/test_runner.rb
CHANGED
data/ocrunner.gemspec
CHANGED
@@ -5,11 +5,11 @@
|
|
5
5
|
|
6
6
|
Gem::Specification.new do |s|
|
7
7
|
s.name = %q{ocrunner}
|
8
|
-
s.version = "0.3.
|
8
|
+
s.version = "0.3.1"
|
9
9
|
|
10
10
|
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
11
11
|
s.authors = ["Jim Benton"]
|
12
|
-
s.date = %q{2010-04-
|
12
|
+
s.date = %q{2010-04-12}
|
13
13
|
s.default_executable = %q{ocrunner}
|
14
14
|
s.description = %q{Provides pretty console output for running OCUnit tests with xcodebuilder from the command line}
|
15
15
|
s.email = %q{jim@autonomousmachine.com}
|
metadata
CHANGED
@@ -5,8 +5,8 @@ version: !ruby/object:Gem::Version
|
|
5
5
|
segments:
|
6
6
|
- 0
|
7
7
|
- 3
|
8
|
-
-
|
9
|
-
version: 0.3.
|
8
|
+
- 1
|
9
|
+
version: 0.3.1
|
10
10
|
platform: ruby
|
11
11
|
authors:
|
12
12
|
- Jim Benton
|
@@ -14,7 +14,7 @@ autorequire:
|
|
14
14
|
bindir: bin
|
15
15
|
cert_chain: []
|
16
16
|
|
17
|
-
date: 2010-04-
|
17
|
+
date: 2010-04-12 00:00:00 -05:00
|
18
18
|
default_executable: ocrunner
|
19
19
|
dependencies:
|
20
20
|
- !ruby/object:Gem::Dependency
|