evm 0.6.1 → 0.9.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (52) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +278 -0
  3. data/bin/evm +12 -0
  4. data/lib/evm.rb +7 -28
  5. data/lib/evm/builder.rb +18 -17
  6. data/lib/evm/cli.rb +43 -18
  7. data/lib/evm/command.rb +2 -1
  8. data/lib/evm/command/bin.rb +2 -2
  9. data/lib/evm/command/config.rb +19 -0
  10. data/lib/evm/command/disuse.rb +15 -0
  11. data/lib/evm/command/install.rb +3 -1
  12. data/lib/evm/command/list.rb +1 -1
  13. data/lib/evm/command/uninstall.rb +3 -1
  14. data/lib/evm/command/use.rb +3 -1
  15. data/lib/evm/config.rb +43 -0
  16. data/lib/evm/git.rb +1 -1
  17. data/lib/evm/package.rb +26 -11
  18. data/lib/evm/remote_file.rb +9 -55
  19. data/lib/evm/tar_file.rb +1 -1
  20. data/spec/evm/builder_spec.rb +209 -0
  21. data/spec/evm/cli_spec.rb +53 -0
  22. data/spec/evm/command/bin_spec.rb +32 -0
  23. data/spec/evm/command/config_spec.rb +34 -0
  24. data/spec/evm/command/disuse_spec.rb +19 -0
  25. data/spec/evm/command/install_spec.rb +103 -0
  26. data/spec/evm/command/list_spec.rb +36 -0
  27. data/spec/evm/command/uninstall_spec.rb +35 -0
  28. data/spec/evm/command/use_spec.rb +32 -0
  29. data/spec/evm/config_spec.rb +36 -0
  30. data/spec/evm/evm_spec.rb +11 -0
  31. data/spec/evm/git_spec.rb +39 -0
  32. data/spec/evm/os_spec.rb +47 -0
  33. data/spec/evm/package_spec.rb +274 -0
  34. data/spec/evm/recipe_spec.rb +47 -0
  35. data/spec/evm/remote_file_spec.rb +47 -0
  36. data/spec/evm/system_spec.rb +36 -0
  37. data/spec/evm/tar_file_spec.rb +21 -0
  38. data/spec/spec_helper.rb +13 -0
  39. metadata +29 -17
  40. data/lib/evm/exception.rb +0 -4
  41. data/lib/evm/progress_bar.rb +0 -37
  42. data/recipes/emacs-23.4-bin.rb +0 -7
  43. data/recipes/emacs-23.4.rb +0 -27
  44. data/recipes/emacs-24.1-bin.rb +0 -7
  45. data/recipes/emacs-24.1.rb +0 -24
  46. data/recipes/emacs-24.2-bin.rb +0 -7
  47. data/recipes/emacs-24.2.rb +0 -24
  48. data/recipes/emacs-24.3-bin.rb +0 -7
  49. data/recipes/emacs-24.3.rb +0 -24
  50. data/recipes/emacs-24.4-bin.rb +0 -7
  51. data/recipes/emacs-24.4.rb +0 -24
  52. data/recipes/emacs-git-snapshot.rb +0 -25
@@ -1,4 +0,0 @@
1
- module Evm
2
- class Exception < StandardError
3
- end
4
- end
@@ -1,37 +0,0 @@
1
- module Evm
2
- class ProgressBar
3
- COLUMNS = 100
4
-
5
- def initialize
6
- @started = false
7
- end
8
-
9
- def set(progress)
10
- progress = progress.to_i
11
-
12
- if progress < 0 || progress > 100
13
- raise "Invalid progress #{progress}, must be between 0 and 100"
14
- end
15
-
16
- unless @started
17
- puts
18
- @started = true
19
- end
20
-
21
- print "\e[1A"
22
- print "\e[K"
23
- print '['
24
- print '-' * progress
25
- print ' ' * (COLUMNS - progress)
26
- print ']'
27
- print ' '
28
- print progress
29
- print '%'
30
- puts
31
- end
32
-
33
- def done
34
- set 100
35
- end
36
- end
37
- end
@@ -1,7 +0,0 @@
1
- recipe 'emacs-23.4-bin' do
2
- tar_gz 'https://github.com/rejeep/evm-bin/raw/master/emacs-23.4-%s.tar.gz' % platform_name
3
-
4
- install do
5
- copy build_path, installations_path
6
- end
7
- end
@@ -1,27 +0,0 @@
1
- recipe 'emacs-23.4' do
2
- tar_gz 'http://ftpmirror.gnu.org/emacs/emacs-23.4.tar.gz'
3
-
4
- osx do
5
- option '--with-ns'
6
- option '--without-x'
7
- option '--without-dbus'
8
- end
9
-
10
- linux do
11
- crt_dir = File.dirname(`gcc -print-file-name=crt1.o`)
12
-
13
- option '--prefix', installation_path
14
- option "--with-crt-dir=#{crt_dir}"
15
- option '--without-gif'
16
- end
17
-
18
- install do
19
- configure
20
- make 'bootstrap'
21
- make 'install'
22
-
23
- osx do
24
- copy File.join(build_path, 'nextstep', 'Emacs.app'), installation_path
25
- end
26
- end
27
- end
@@ -1,7 +0,0 @@
1
- recipe 'emacs-24.1-bin' do
2
- tar_gz 'https://github.com/rejeep/evm-bin/raw/master/emacs-24.1-%s.tar.gz' % platform_name
3
-
4
- install do
5
- copy build_path, installations_path
6
- end
7
- end
@@ -1,24 +0,0 @@
1
- recipe 'emacs-24.1' do
2
- tar_gz 'http://ftpmirror.gnu.org/emacs/emacs-24.1.tar.gz'
3
-
4
- osx do
5
- option '--with-ns'
6
- option '--without-x'
7
- option '--without-dbus'
8
- end
9
-
10
- linux do
11
- option '--prefix', installation_path
12
- option '--without-gif'
13
- end
14
-
15
- install do
16
- configure
17
- make 'bootstrap'
18
- make 'install'
19
-
20
- osx do
21
- copy File.join(build_path, 'nextstep', 'Emacs.app'), installation_path
22
- end
23
- end
24
- end
@@ -1,7 +0,0 @@
1
- recipe 'emacs-24.2-bin' do
2
- tar_gz 'https://github.com/rejeep/evm-bin/raw/master/emacs-24.2-%s.tar.gz' % platform_name
3
-
4
- install do
5
- copy build_path, installations_path
6
- end
7
- end
@@ -1,24 +0,0 @@
1
- recipe 'emacs-24.2' do
2
- tar_gz 'http://ftpmirror.gnu.org/emacs/emacs-24.2.tar.gz'
3
-
4
- osx do
5
- option '--with-ns'
6
- option '--without-x'
7
- option '--without-dbus'
8
- end
9
-
10
- linux do
11
- option '--prefix', installation_path
12
- option '--without-gif'
13
- end
14
-
15
- install do
16
- configure
17
- make 'bootstrap'
18
- make 'install'
19
-
20
- osx do
21
- copy File.join(build_path, 'nextstep', 'Emacs.app'), installation_path
22
- end
23
- end
24
- end
@@ -1,7 +0,0 @@
1
- recipe 'emacs-24.3-bin' do
2
- tar_gz 'https://github.com/rejeep/evm-bin/raw/master/emacs-24.3-%s.tar.gz' % platform_name
3
-
4
- install do
5
- copy build_path, installations_path
6
- end
7
- end
@@ -1,24 +0,0 @@
1
- recipe 'emacs-24.3' do
2
- tar_gz 'http://ftpmirror.gnu.org/emacs/emacs-24.3.tar.gz'
3
-
4
- osx do
5
- option '--with-ns'
6
- option '--without-x'
7
- option '--without-dbus'
8
- end
9
-
10
- linux do
11
- option '--prefix', installation_path
12
- option '--without-gif'
13
- end
14
-
15
- install do
16
- configure
17
- make 'bootstrap'
18
- make 'install'
19
-
20
- osx do
21
- copy File.join(build_path, 'nextstep', 'Emacs.app'), installation_path
22
- end
23
- end
24
- end
@@ -1,7 +0,0 @@
1
- recipe 'emacs-24.4-bin' do
2
- tar_gz 'https://github.com/rejeep/evm-bin/raw/master/emacs-24.4-%s.tar.gz' % platform_name
3
-
4
- install do
5
- copy build_path, installations_path
6
- end
7
- end
@@ -1,24 +0,0 @@
1
- recipe 'emacs-24.4' do
2
- tar_gz 'http://ftpmirror.gnu.org/emacs/emacs-24.4.tar.gz'
3
-
4
- osx do
5
- option '--with-ns'
6
- option '--without-x'
7
- option '--without-dbus'
8
- end
9
-
10
- linux do
11
- option '--prefix', installation_path
12
- option '--without-gif'
13
- end
14
-
15
- install do
16
- configure
17
- make 'bootstrap'
18
- make 'install'
19
-
20
- osx do
21
- copy File.join(build_path, 'nextstep', 'Emacs.app'), installation_path
22
- end
23
- end
24
- end
@@ -1,25 +0,0 @@
1
- recipe 'emacs-git-snapshot' do
2
- git 'http://git.savannah.gnu.org/r/emacs.git'
3
-
4
- osx do
5
- option '--with-ns'
6
- option '--without-x'
7
- option '--without-dbus'
8
- end
9
-
10
- linux do
11
- option '--prefix', installation_path
12
- option '--without-gif'
13
- end
14
-
15
- install do
16
- autogen
17
- configure
18
- make 'bootstrap'
19
- make 'install'
20
-
21
- osx do
22
- copy File.join(build_path, 'nextstep', 'Emacs.app'), installation_path
23
- end
24
- end
25
- end