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.
Files changed (56) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +3 -1
  3. data/Rakefile +3 -10
  4. data/examples/executable/Rakefile +5 -0
  5. data/examples/executable/Rakefile.llvm +5 -0
  6. data/examples/executable/hello.c +7 -0
  7. data/examples/executable_subdirs/Rakefile +11 -0
  8. data/examples/executable_subdirs/includes/hello.h +1 -0
  9. data/examples/executable_subdirs/sources/hello.c +6 -0
  10. data/examples/executable_subdirs/sources/main.c +8 -0
  11. data/examples/fail/Rakefile +5 -0
  12. data/examples/fail/hello +0 -0
  13. data/examples/fail/hello.c +1 -0
  14. data/examples/ruby_extension/Rakefile +5 -0
  15. data/examples/ruby_extension/Rakefile.llvm +5 -0
  16. data/examples/ruby_extension/hello.c +6 -0
  17. data/examples/shared_library/Rakefile +23 -0
  18. data/examples/shared_library/Rakefile.llvm +25 -0
  19. data/examples/shared_library/hello.c +6 -0
  20. data/examples/shared_library/hello.h +1 -0
  21. data/examples/shared_library/main.c +7 -0
  22. data/examples/shared_library_subdirs/Rakefile +28 -0
  23. data/examples/shared_library_subdirs/includes/hello.h +1 -0
  24. data/examples/shared_library_subdirs/sources/hello.c +6 -0
  25. data/examples/shared_library_subdirs/sources/main.c +8 -0
  26. data/examples/static_library/Rakefile +14 -0
  27. data/examples/static_library/Rakefile.llvm +14 -0
  28. data/examples/static_library/hello.c +6 -0
  29. data/examples/static_library/hello.h +1 -0
  30. data/examples/static_library/main.c +7 -0
  31. data/examples/static_library_subdirs/Rakefile +19 -0
  32. data/examples/static_library_subdirs/includes/hello.h +1 -0
  33. data/examples/static_library_subdirs/sources/hello.c +6 -0
  34. data/examples/static_library_subdirs/sources/main.c +8 -0
  35. data/features/step_definitions/paper_house_steps.rb +1 -1
  36. data/features/support/hooks.rb +2 -2
  37. data/lib/paper_house/auto_depends.rb +3 -8
  38. data/lib/paper_house/build_failed.rb +3 -1
  39. data/lib/paper_house/build_task.rb +7 -4
  40. data/lib/paper_house/dependency.rb +9 -7
  41. data/lib/paper_house/executable_task.rb +13 -1
  42. data/lib/paper_house/library_task.rb +7 -6
  43. data/lib/paper_house/linker_options.rb +1 -1
  44. data/lib/paper_house/platform.rb +7 -8
  45. data/lib/paper_house/ruby_extension_task.rb +0 -4
  46. data/lib/paper_house/shared_library_task.rb +11 -0
  47. data/lib/paper_house/version.rb +1 -1
  48. data/paper_house.gemspec +2 -1
  49. data/spec/paper_house/executable_task_spec.rb +35 -42
  50. data/spec/paper_house/ruby_extension_task_spec.rb +38 -76
  51. data/spec/paper_house/shared_library_task_spec.rb +71 -105
  52. data/spec/paper_house/static_library_task_spec.rb +63 -54
  53. data/spec/paper_house/version_spec.rb +2 -4
  54. data/spec/spec_helper.rb +2 -1
  55. metadata +54 -24
  56. 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