motion-specwrap 1.0.0 → 1.0.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 +4 -4
- data/README.md +72 -0
- data/bin/motion-specwrap +2 -53
- data/lib/motion-specwrap.rb +0 -1
- data/lib/motion-specwrap/version.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 7f54d8f5a5909855b81dd10f61b5d1d6f7d8e5bf
|
4
|
+
data.tar.gz: 0d87dca108d34ed210b4309f2c0d536e11f364fa
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 6ff2e4d3f39a7ceeb5d1ad6bdc2f405b6dacbdbc90364280b567ac638829296c40e70c5f71e120235c16c296891edb368592cfa732c7cb4f5479d67f92762fde
|
7
|
+
data.tar.gz: c5f2723cfc00c3aff016db57219507eb30257c5abe886c7b7ab974a127492ac0efd909f041a2c69ec8b556b8ac27ccce90b0636eae9217c6c07d99dd7c05ba87
|
data/README.md
CHANGED
@@ -14,6 +14,10 @@ Now you may execute `bundle exec motion-specwrap` instead of `bundle exec rake s
|
|
14
14
|
1. Bacon is made to output its exit status code to standard output, such that:
|
15
15
|
2. A wrapper script is provided which runs rake spec as normal, checks the exit status code printed by Bacon, and uses it to exit with the correct exit status code.
|
16
16
|
|
17
|
+
## Update: Sept 10, 2013
|
18
|
+
|
19
|
+
lrz has [fixed the regression](http://hipbyte.myjetbrains.com/youtrack/issue/RM-230) in RubyMotion 2.7, so you shouldn't need motion-specwrap now
|
20
|
+
|
17
21
|
### Update: July 30, 2013
|
18
22
|
|
19
23
|
I'm back on the RM scene again, setting up CI, etc.
|
@@ -53,3 +57,71 @@ minivan:baitmotion (master*) $ echo $?
|
|
53
57
|
```
|
54
58
|
|
55
59
|
That is not supposed to be 0! I will need to continue supporting this gem in the meanwhile but I have contacted HipByte about this.
|
60
|
+
|
61
|
+
---
|
62
|
+
|
63
|
+
HipByte issue for this: http://hipbyte.myjetbrains.com/youtrack/issue/RM-230
|
64
|
+
|
65
|
+
## motion-specwrap output
|
66
|
+
|
67
|
+
```
|
68
|
+
➜ baitmotion git:(master) ✗ bundle exec motion-specwrap
|
69
|
+
================================================================================
|
70
|
+
A new version of RubyMotion is available. Run `sudo motion update' to upgrade.
|
71
|
+
================================================================================
|
72
|
+
|
73
|
+
Build ./build/iPhoneSimulator-6.1-Development
|
74
|
+
Compile /Users/keyvan/baitmotion/build/redgreen_style_config.rb
|
75
|
+
Compile ./spec/main_spec.rb
|
76
|
+
Link ./build/iPhoneSimulator-6.1-Development/baitmotion_spec.app/baitmotion
|
77
|
+
Create ./build/iPhoneSimulator-6.1-Development/baitmotion_spec.dSYM
|
78
|
+
Simulate ./build/iPhoneSimulator-6.1-Development/baitmotion_spec.app
|
79
|
+
Bacon Output Style: :full
|
80
|
+
Application 'baitmotion'
|
81
|
+
- has one window
|
82
|
+
[✓] This test has passed! Good job!
|
83
|
+
|
84
|
+
- foo
|
85
|
+
[✗] This test has not passed: FAILED - 1.==(2) failed!
|
86
|
+
[FAILED - 1.==(2) failed]
|
87
|
+
BACKTRACE: Bacon::Error: 1.==(2) failed
|
88
|
+
spec.rb:685:in `satisfy:': Application 'baitmotion' - foo
|
89
|
+
spec.rb:699:in `method_missing:'
|
90
|
+
spec.rb:315:in `block in run_spec_block'
|
91
|
+
spec.rb:439:in `execute_block'
|
92
|
+
spec.rb:315:in `run_spec_block'
|
93
|
+
spec.rb:330:in `run'
|
94
|
+
|
95
|
+
|
96
|
+
- foo
|
97
|
+
[✗] This test has not passed: FAILED - 1.==(2) failed!
|
98
|
+
[FAILED - 1.==(2) failed]
|
99
|
+
BACKTRACE: Bacon::Error: 1.==(2) failed
|
100
|
+
spec.rb:685:in `satisfy:': Application 'baitmotion' - foo
|
101
|
+
spec.rb:699:in `method_missing:'
|
102
|
+
spec.rb:315:in `block in run_spec_block'
|
103
|
+
spec.rb:439:in `execute_block'
|
104
|
+
spec.rb:315:in `run_spec_block'
|
105
|
+
spec.rb:330:in `run'
|
106
|
+
|
107
|
+
|
108
|
+
- foo
|
109
|
+
[✗] This test has not passed: FAILED - 1.==(2) failed!
|
110
|
+
[FAILED - 1.==(2) failed]
|
111
|
+
BACKTRACE: Bacon::Error: 1.==(2) failed
|
112
|
+
spec.rb:685:in `satisfy:': Application 'baitmotion' - foo
|
113
|
+
spec.rb:699:in `method_missing:'
|
114
|
+
spec.rb:315:in `block in run_spec_block'
|
115
|
+
spec.rb:439:in `execute_block'
|
116
|
+
spec.rb:315:in `run_spec_block'
|
117
|
+
spec.rb:330:in `run'
|
118
|
+
|
119
|
+
|
120
|
+
|
121
|
+
4 specifications (4 requirements), 3 failures, 0 errors
|
122
|
+
* motion-specwrap read the summary to exit(3)
|
123
|
+
➜ baitmotion git:(master) ✗ echo $?
|
124
|
+
3
|
125
|
+
➜ baitmotion git:(master) ✗
|
126
|
+
```
|
127
|
+
|
data/bin/motion-specwrap
CHANGED
@@ -1,55 +1,4 @@
|
|
1
1
|
#!/usr/bin/env ruby
|
2
|
-
require '
|
3
|
-
require 'open3'
|
4
|
-
|
5
|
-
regexp = / (\d*) failures, (\d*) errors/
|
6
|
-
|
7
|
-
$Run = true
|
8
|
-
|
9
|
-
def watch_for(file, pattern)
|
10
|
-
linebuf = ""
|
11
|
-
f = File.open(file,"r")
|
12
|
-
f.seek(0,IO::SEEK_END)
|
13
|
-
while $Run do
|
14
|
-
select([f])
|
15
|
-
line = f.gets
|
16
|
-
if !line.nil?
|
17
|
-
if (matches = line.match(pattern))
|
18
|
-
exit_value = matches[1].to_i+matches[2].to_i
|
19
|
-
puts line
|
20
|
-
puts " * motion-specwrap read the summary to exit(#{exit_value})"
|
21
|
-
exit(exit_value)
|
22
|
-
else
|
23
|
-
if line.include? "\n"
|
24
|
-
puts linebuf + line
|
25
|
-
linebuf.clear
|
26
|
-
else
|
27
|
-
linebuf << line
|
28
|
-
end
|
29
|
-
end
|
30
|
-
end
|
31
|
-
end
|
32
|
-
end
|
33
|
-
|
34
|
-
file = Tempfile.new "motion-specwrap"
|
35
|
-
|
36
|
-
begin
|
37
|
-
file_watch_thread = Thread.new do
|
38
|
-
watch_for(file.path, regexp)
|
39
|
-
end
|
40
|
-
|
41
|
-
Open3.popen2e("rake spec > #{file.path}") do |stdin, out_and_err, wait_thr|
|
42
|
-
while (line = out_and_err.gets)
|
43
|
-
puts line
|
44
|
-
end
|
45
|
-
puts " * motion-specwrap should have exited already -- could not determine the correct exit value"
|
46
|
-
$Run = false
|
47
|
-
end
|
48
|
-
rescue => ex
|
49
|
-
puts ex
|
50
|
-
ensure
|
51
|
-
file_watch_thread.join
|
52
|
-
file.close
|
53
|
-
file.unlink
|
54
|
-
end
|
2
|
+
require 'motion-specwrap'
|
55
3
|
|
4
|
+
Motion::SpecWrap.run('rake spec')
|
data/lib/motion-specwrap.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: motion-specwrap
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.
|
4
|
+
version: 1.0.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Keyvan Fatehi
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2013-
|
11
|
+
date: 2013-09-11 00:00:00.000000000 Z
|
12
12
|
dependencies: []
|
13
13
|
description: Exit value support wrapper for RubyMotion's 'rake spec'
|
14
14
|
email:
|
@@ -46,7 +46,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
46
46
|
version: '0'
|
47
47
|
requirements: []
|
48
48
|
rubyforge_project:
|
49
|
-
rubygems_version: 2.0.
|
49
|
+
rubygems_version: 2.0.5
|
50
50
|
signing_key:
|
51
51
|
specification_version: 4
|
52
52
|
summary: Exit value support wrapper for RubyMotion's 'rake spec'
|