releasy 0.2.0 → 0.2.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (60) hide show
  1. data/.yardopts +3 -1
  2. data/CHANGELOG.md +9 -0
  3. data/README.md +114 -41
  4. data/Rakefile +1 -1
  5. data/bin/7z_sfx_LICENSE.txt +56 -0
  6. data/bin/7za.exe +0 -0
  7. data/bin/7za_exe_LICENSE.txt +29 -0
  8. data/lib/releasy.rb +4 -1
  9. data/lib/releasy/builders/builder.rb +14 -6
  10. data/lib/releasy/builders/ocra_builder.rb +4 -2
  11. data/lib/releasy/builders/osx_app.rb +18 -6
  12. data/lib/releasy/builders/source.rb +9 -2
  13. data/lib/releasy/builders/windows_folder.rb +12 -3
  14. data/lib/releasy/builders/windows_installer.rb +2 -3
  15. data/lib/releasy/builders/windows_standalone.rb +13 -3
  16. data/lib/releasy/builders/windows_wrapped.rb +14 -4
  17. data/lib/releasy/cli/install_sfx.rb +1 -1
  18. data/lib/releasy/deployers.rb +1 -1
  19. data/lib/releasy/deployers/deployer.rb +22 -1
  20. data/lib/releasy/deployers/github.rb +31 -124
  21. data/lib/releasy/deployers/local.rb +55 -0
  22. data/lib/releasy/deployers/rsync.rb +59 -0
  23. data/lib/releasy/mixins/has_packagers.rb +1 -1
  24. data/lib/releasy/mixins/utilities.rb +34 -0
  25. data/lib/releasy/packagers/dmg.rb +17 -0
  26. data/lib/releasy/packagers/exe.rb +18 -1
  27. data/lib/releasy/packagers/packager.rb +22 -6
  28. data/lib/releasy/packagers/seven_zip.rb +17 -0
  29. data/lib/releasy/packagers/tar_bzip2.rb +19 -0
  30. data/lib/releasy/packagers/tar_gzip.rb +19 -0
  31. data/lib/releasy/packagers/tar_packager.rb +2 -1
  32. data/lib/releasy/packagers/zip.rb +17 -0
  33. data/lib/releasy/project.rb +45 -4
  34. data/lib/releasy/version.rb +1 -1
  35. data/releasy.gemspec +1 -1
  36. data/test/releasy/builders/data/Main.rb +3 -2
  37. data/test/releasy/builders/helpers/builder_helper.rb +35 -0
  38. data/test/releasy/builders/helpers/ocra_builder_helper.rb +31 -0
  39. data/test/releasy/builders/helpers/windows_builder_helper.rb +25 -0
  40. data/test/releasy/builders/osx_app_test.rb +6 -4
  41. data/test/releasy/builders/source_test.rb +7 -4
  42. data/test/releasy/builders/windows_folder_test.rb +3 -1
  43. data/test/releasy/builders/windows_installer_test.rb +6 -4
  44. data/test/releasy/builders/windows_standalone_test.rb +6 -4
  45. data/test/releasy/builders/windows_wrapped_test.rb +3 -1
  46. data/test/releasy/cli/install_sfx_test.rb +1 -1
  47. data/test/releasy/deployers/github_test.rb +30 -32
  48. data/test/releasy/deployers/local_test.rb +93 -0
  49. data/test/releasy/deployers/rsync_test.rb +55 -0
  50. data/test/releasy/integration/source_test.rb +6 -6
  51. data/test/releasy/mixins/utilities_test.rb +50 -0
  52. data/test/releasy/packagers/packager_test.rb +79 -0
  53. data/test/releasy/packagers_test.rb +12 -6
  54. data/test/releasy/project_test.rb +5 -5
  55. data/test/teststrap.rb +6 -0
  56. data/test/yard_test.rb +1 -1
  57. metadata +40 -28
  58. data/lib/releasy/mixins/exec.rb +0 -14
  59. data/test/releasy/builders/ocra_builder_test.rb +0 -37
  60. data/test/releasy/builders/windows_builder_test.rb +0 -26
@@ -1,14 +0,0 @@
1
- module Releasy
2
- module Mixins
3
- # Adds an {#exec} method that prints out if the project is verbose.
4
- module Exec
5
- protected
6
- def exec(command)
7
- info command
8
- result = %x[#{command}]
9
- info result
10
- result
11
- end
12
- end
13
- end
14
- end
@@ -1,37 +0,0 @@
1
- require File.expand_path("helpers/helper", File.dirname(__FILE__))
2
-
3
- context Releasy::Builders::OcraBuilder do
4
- setup do
5
- Class.new(Releasy::Builders::OcraBuilder) do
6
- const_set :DEFAULT_FOLDER_SUFFIX, ''
7
- end.new new_project
8
- end
9
-
10
- hookup do
11
- topic.send(:setup)
12
- end
13
-
14
- asserts_topic.kind_of Releasy::Builders::WindowsBuilder
15
- asserts(:ocra_parameters).equals ""
16
- asserts(:icon).nil
17
- asserts("setting incorrect icon") { topic.icon = "frog.png" }.raises ArgumentError, /icon must be a .ico file/
18
- asserts(:ocra_command).raises Releasy::ConfigError, /Unless the executable file extension is .rbw or .rb, then #executable_type must be explicitly :windows or :console/
19
-
20
- context "#icon=" do
21
- hookup { topic.icon = "icon.ico" }
22
- asserts(:icon).equals "icon.ico"
23
- end
24
-
25
- context "#ocra_command" do
26
- hookup do
27
- topic.exclude_encoding
28
- topic.ocra_parameters = "--wobble"
29
- topic.project.executable = source_files.first
30
- topic.executable_type = :console
31
- topic.icon = "icon.ico"
32
- end
33
-
34
- helper(:command) { %[ocra "bin/test_app" --console --no-enc --wobble --icon "icon.ico" "lib/test_app.rb" "lib/test_app/stuff.rb" "README.txt" "LICENSE.txt" "Gemfile.lock" "Gemfile"] }
35
- asserts(:ocra_command).equals { %[bundle exec #{command}] }
36
- end
37
- end
@@ -1,26 +0,0 @@
1
- require File.expand_path("helpers/helper", File.dirname(__FILE__))
2
-
3
- context Releasy::Builders::WindowsBuilder do
4
- setup do
5
- Class.new(Releasy::Builders::WindowsBuilder) do
6
- const_set :DEFAULT_FOLDER_SUFFIX, ''
7
- end.new new_project
8
- end
9
-
10
- context "#executable_type undefined and Project#executable doesn't have meaningful extension" do
11
- hookup { topic.project.executable = "fred" }
12
- asserts(:effective_executable_type).raises Releasy::ConfigError, /Unless the executable file extension is .rbw or .rb, then #executable_type must be explicitly :windows or :console/
13
- end
14
-
15
- context "valid" do
16
- hookup { topic.executable_type = :console }
17
-
18
- asserts(:effective_executable_type).equals :console
19
- asserts(:encoding_excluded?).equals false
20
-
21
- context "exclude_encoding" do
22
- hookup { topic.exclude_encoding }
23
- asserts(:encoding_excluded?).equals true
24
- end
25
- end
26
- end