paper_house 0.5.0 → 0.6.0

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 (76) hide show
  1. checksums.yaml +4 -4
  2. data/CONTRIBUTING.md +46 -12
  3. data/LICENSE +674 -0
  4. data/README.md +18 -10
  5. data/Rakefile +7 -117
  6. data/features/executable_task.feature +6 -0
  7. data/features/step_definitions/paper_house_steps.rb +1 -1
  8. data/features/support/env.rb +3 -32
  9. data/lib/paper_house/auto_depends.rb +4 -23
  10. data/lib/paper_house/build_failed.rb +18 -0
  11. data/lib/paper_house/build_task.rb +10 -24
  12. data/lib/paper_house/cc_options.rb +1 -23
  13. data/lib/paper_house/dependency.rb +1 -23
  14. data/lib/paper_house/executable_task.rb +1 -27
  15. data/lib/paper_house/library_task.rb +1 -23
  16. data/lib/paper_house/linker_options.rb +1 -23
  17. data/lib/paper_house/platform.rb +11 -32
  18. data/lib/paper_house/ruby_extension_task.rb +1 -27
  19. data/lib/paper_house/safe_popen.rb +1 -23
  20. data/lib/paper_house/shared_library_task.rb +1 -27
  21. data/lib/paper_house/static_library_task.rb +2 -24
  22. data/lib/paper_house/version.rb +2 -24
  23. data/lib/paper_house.rb +1 -23
  24. data/paper_house.gemspec +11 -9
  25. data/spec/paper_house/executable_task_spec.rb +26 -53
  26. data/spec/paper_house/ruby_extension_task_spec.rb +26 -53
  27. data/spec/paper_house/shared_library_task_spec.rb +30 -57
  28. data/spec/paper_house/static_library_task_spec.rb +41 -68
  29. data/spec/paper_house/version_spec.rb +1 -23
  30. data/spec/spec_helper.rb +3 -31
  31. metadata +24 -67
  32. data/.gitignore +0 -19
  33. data/.rspec +0 -3
  34. data/.rubocop.yml +0 -1
  35. data/.ruby-version +0 -1
  36. data/.travis.yml +0 -18
  37. data/Gemfile +0 -35
  38. data/Guardfile +0 -22
  39. data/cucumber.yml +0 -3
  40. data/examples/executable/.gitignore +0 -4
  41. data/examples/executable/Rakefile +0 -5
  42. data/examples/executable/Rakefile.llvm +0 -5
  43. data/examples/executable/hello.c +0 -7
  44. data/examples/executable_subdirs/.gitignore +0 -4
  45. data/examples/executable_subdirs/Rakefile +0 -11
  46. data/examples/executable_subdirs/includes/hello.h +0 -1
  47. data/examples/executable_subdirs/sources/hello.c +0 -6
  48. data/examples/executable_subdirs/sources/main.c +0 -8
  49. data/examples/ruby_extension/.gitignore +0 -5
  50. data/examples/ruby_extension/Rakefile +0 -5
  51. data/examples/ruby_extension/Rakefile.llvm +0 -5
  52. data/examples/ruby_extension/hello.c +0 -6
  53. data/examples/shared_library/.gitignore +0 -8
  54. data/examples/shared_library/Rakefile +0 -23
  55. data/examples/shared_library/Rakefile.llvm +0 -25
  56. data/examples/shared_library/hello.c +0 -6
  57. data/examples/shared_library/hello.h +0 -1
  58. data/examples/shared_library/main.c +0 -7
  59. data/examples/shared_library_subdirs/.gitignore +0 -8
  60. data/examples/shared_library_subdirs/Rakefile +0 -28
  61. data/examples/shared_library_subdirs/includes/hello.h +0 -1
  62. data/examples/shared_library_subdirs/sources/hello.c +0 -6
  63. data/examples/shared_library_subdirs/sources/main.c +0 -8
  64. data/examples/static_library/.gitignore +0 -7
  65. data/examples/static_library/Rakefile +0 -14
  66. data/examples/static_library/Rakefile.llvm +0 -14
  67. data/examples/static_library/hello.c +0 -6
  68. data/examples/static_library/hello.h +0 -1
  69. data/examples/static_library/main.c +0 -7
  70. data/examples/static_library_subdirs/.gitignore +0 -7
  71. data/examples/static_library_subdirs/Rakefile +0 -19
  72. data/examples/static_library_subdirs/includes/hello.h +0 -1
  73. data/examples/static_library_subdirs/sources/hello.c +0 -6
  74. data/examples/static_library_subdirs/sources/main.c +0 -8
  75. data/rake_simplecov_hook.rb +0 -24
  76. data/rubocop-todo.yml +0 -6
@@ -1,19 +0,0 @@
1
- # -*- coding: utf-8 -*-
2
-
3
- require 'paper_house'
4
-
5
- task :hello => :libhello
6
-
7
- PaperHouse::StaticLibraryTask.new :libhello do | task |
8
- task.library_name = 'hello'
9
- task.target_directory = 'objects'
10
- task.sources = 'sources/hello.c'
11
- task.includes = 'includes'
12
- task.cflags = %w(-Werror -Wall -Wextra)
13
- end
14
-
15
- PaperHouse::ExecutableTask.new :hello do | task |
16
- task.sources = 'sources/main.c'
17
- task.includes = 'includes'
18
- task.ldflags = '-Lobjects'
19
- end
@@ -1 +0,0 @@
1
- void print_hello();
@@ -1,6 +0,0 @@
1
- #include <stdio.h>
2
-
3
- void
4
- print_hello() {
5
- printf( "Hello, PaperHouse!\n" );
6
- }
@@ -1,8 +0,0 @@
1
- #include <stdlib.h>
2
- #include "hello.h"
3
-
4
- int
5
- main() {
6
- print_hello();
7
- return 0;
8
- }
@@ -1,24 +0,0 @@
1
- # -*- coding: utf-8 -*-
2
- require 'rubygems'
3
- require 'simplecov'
4
-
5
- def scenario_name
6
- File.basename Dir.pwd
7
- end
8
-
9
- def id_file
10
- File.join Dir.pwd, '..', '..', ".#{scenario_name}_id"
11
- end
12
-
13
- def new_scenario_id
14
- new_id = 0
15
- new_id = IO.read(id_file).chomp.to_i + 1 if File.exists?(id_file)
16
- File.open(id_file, 'w') { | file | file.puts new_id }
17
- new_id
18
- end
19
-
20
- SimpleCov.start do
21
- root File.dirname(__FILE__)
22
- command_name "#{scenario_name} scenario ##{new_scenario_id}"
23
- use_merging true
24
- end
data/rubocop-todo.yml DELETED
@@ -1,6 +0,0 @@
1
- # This configuration was generated by `rubocop --auto-gen-config`.
2
- # The point is for the user to remove these configuration records
3
- # one by one as the offences are removed from the code base.
4
-
5
- HashSyntax:
6
- EnforcedStyle: hash_rockets