paper_house 0.6.0 → 0.6.1
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 +3 -1
- data/Rakefile +3 -10
- data/examples/executable/Rakefile +5 -0
- data/examples/executable/Rakefile.llvm +5 -0
- data/examples/executable/hello.c +7 -0
- data/examples/executable_subdirs/Rakefile +11 -0
- data/examples/executable_subdirs/includes/hello.h +1 -0
- data/examples/executable_subdirs/sources/hello.c +6 -0
- data/examples/executable_subdirs/sources/main.c +8 -0
- data/examples/fail/Rakefile +5 -0
- data/examples/fail/hello +0 -0
- data/examples/fail/hello.c +1 -0
- data/examples/ruby_extension/Rakefile +5 -0
- data/examples/ruby_extension/Rakefile.llvm +5 -0
- data/examples/ruby_extension/hello.c +6 -0
- data/examples/shared_library/Rakefile +23 -0
- data/examples/shared_library/Rakefile.llvm +25 -0
- data/examples/shared_library/hello.c +6 -0
- data/examples/shared_library/hello.h +1 -0
- data/examples/shared_library/main.c +7 -0
- data/examples/shared_library_subdirs/Rakefile +28 -0
- data/examples/shared_library_subdirs/includes/hello.h +1 -0
- data/examples/shared_library_subdirs/sources/hello.c +6 -0
- data/examples/shared_library_subdirs/sources/main.c +8 -0
- data/examples/static_library/Rakefile +14 -0
- data/examples/static_library/Rakefile.llvm +14 -0
- data/examples/static_library/hello.c +6 -0
- data/examples/static_library/hello.h +1 -0
- data/examples/static_library/main.c +7 -0
- data/examples/static_library_subdirs/Rakefile +19 -0
- data/examples/static_library_subdirs/includes/hello.h +1 -0
- data/examples/static_library_subdirs/sources/hello.c +6 -0
- data/examples/static_library_subdirs/sources/main.c +8 -0
- data/features/step_definitions/paper_house_steps.rb +1 -1
- data/features/support/hooks.rb +2 -2
- data/lib/paper_house/auto_depends.rb +3 -8
- data/lib/paper_house/build_failed.rb +3 -1
- data/lib/paper_house/build_task.rb +7 -4
- data/lib/paper_house/dependency.rb +9 -7
- data/lib/paper_house/executable_task.rb +13 -1
- data/lib/paper_house/library_task.rb +7 -6
- data/lib/paper_house/linker_options.rb +1 -1
- data/lib/paper_house/platform.rb +7 -8
- data/lib/paper_house/ruby_extension_task.rb +0 -4
- data/lib/paper_house/shared_library_task.rb +11 -0
- data/lib/paper_house/version.rb +1 -1
- data/paper_house.gemspec +2 -1
- data/spec/paper_house/executable_task_spec.rb +35 -42
- data/spec/paper_house/ruby_extension_task_spec.rb +38 -76
- data/spec/paper_house/shared_library_task_spec.rb +71 -105
- data/spec/paper_house/static_library_task_spec.rb +63 -54
- data/spec/paper_house/version_spec.rb +2 -4
- data/spec/spec_helper.rb +2 -1
- metadata +54 -24
- data/lib/paper_house/safe_popen.rb +0 -26
@@ -1,26 +0,0 @@
|
|
1
|
-
# encoding: utf-8
|
2
|
-
|
3
|
-
require 'popen4'
|
4
|
-
|
5
|
-
module PaperHouse
|
6
|
-
#
|
7
|
-
# Thin POpen4 wrapper that avoids POpen4's segraults in 1.8.6.
|
8
|
-
# See also https://github.com/engineyard/engineyard/issues/115
|
9
|
-
#
|
10
|
-
class SafePopen
|
11
|
-
#
|
12
|
-
# Starts a new process and pass the subprocess IOs and pid to the
|
13
|
-
# block supplied.
|
14
|
-
#
|
15
|
-
def self.popen(command, &block)
|
16
|
-
status = nil
|
17
|
-
begin
|
18
|
-
GC.disable
|
19
|
-
status = POpen4.popen4(command, &block)
|
20
|
-
ensure
|
21
|
-
GC.enable
|
22
|
-
end
|
23
|
-
status
|
24
|
-
end
|
25
|
-
end
|
26
|
-
end
|