magicmonkey 0.1.2 → 0.1.3

Sign up to get free protection for your applications and to get access to all the features.
data/.gitignore ADDED
@@ -0,0 +1,21 @@
1
+ ## MAC OS
2
+ .DS_Store
3
+
4
+ ## TEXTMATE
5
+ *.tmproj
6
+ tmtags
7
+
8
+ ## EMACS
9
+ *~
10
+ \#*
11
+ .\#*
12
+
13
+ ## VIM
14
+ *.swp
15
+
16
+ ## PROJECT::GENERAL
17
+ coverage
18
+ rdoc
19
+ pkg
20
+
21
+ ## PROJECT::SPECIFIC
data/README.rdoc CHANGED
@@ -1,6 +1,6 @@
1
1
  = Magicmonkey
2
2
 
3
- Magicmonkey is a useful script that can manage your Ruby on Rails application.
3
+ Magicmonkey is a useful script that can manage your Ruby on Rails applications.
4
4
  Magicmonkey allows you to build in easy way the follow web server architecture:
5
5
 
6
6
 
@@ -21,7 +21,7 @@ Magicmonkey allows you to build in easy way the follow web server architecture:
21
21
  +-------------------------------+ +-------------------------------+ +-------------------------------+
22
22
 
23
23
 
24
- Every your web application have a virtual host like this:
24
+ Every your web applications have a virtual host like this:
25
25
 
26
26
  <VirtualHost *:80>
27
27
  ServerName foo.com
data/Rakefile CHANGED
@@ -1,56 +1 @@
1
- require 'rubygems'
2
- require 'rake'
3
-
4
- begin
5
- require 'jeweler'
6
- Jeweler::Tasks.new do |gem|
7
- gem.name = "magicmonkey"
8
- gem.version = File.exist?('VERSION') ? File.read('VERSION').strip : ''
9
- gem.summary = %Q{Manage your Rails applications: different Ruby versions and different application servers}
10
- gem.description = %Q{Manage your Rails applications: different Ruby versions and different application servers.}
11
- gem.email = "enrico@megiston.it"
12
- gem.homepage = "http://github.com/pioz/magicmonkey"
13
- gem.authors = ["pioz"]
14
- gem.add_development_dependency "thoughtbot-shoulda", ">= 0"
15
- #gem.add_dependency 'nokogiri'
16
- #gem.add_dependency 'activerecord'
17
- #gem.add_dependency 'sqlite3-ruby'
18
- end
19
- Jeweler::GemcutterTasks.new
20
- rescue LoadError
21
- puts "Jeweler (or a dependency) not available. Install it with: gem install jeweler"
22
- end
23
-
24
- require 'rake/testtask'
25
- Rake::TestTask.new(:test) do |test|
26
- test.libs << 'lib' << 'test'
27
- test.pattern = 'test/**/test_*.rb'
28
- test.verbose = true
29
- end
30
-
31
- begin
32
- require 'rcov/rcovtask'
33
- Rcov::RcovTask.new do |test|
34
- test.libs << 'test'
35
- test.pattern = 'test/**/test_*.rb'
36
- test.verbose = true
37
- end
38
- rescue LoadError
39
- task :rcov do
40
- abort "RCov is not available. In order to run rcov, you must: sudo gem install spicycode-rcov"
41
- end
42
- end
43
-
44
- task :test => :check_dependencies
45
-
46
- task :default => :test
47
-
48
- require 'rake/rdoctask'
49
- Rake::RDocTask.new do |rdoc|
50
- version = File.exist?('VERSION') ? File.read('VERSION') : ""
51
-
52
- rdoc.rdoc_dir = 'rdoc'
53
- rdoc.title = "magicmonkey #{version}"
54
- rdoc.rdoc_files.include('README*')
55
- rdoc.rdoc_files.include('lib/**/*.rb')
56
- end
1
+ require 'bundler/gem_tasks'
data/bin/magicmonkey CHANGED
@@ -1,6 +1,6 @@
1
1
  #!/usr/bin/env ruby
2
2
 
3
- $APP_PATH = "#{File.dirname(__FILE__)}/.."
4
- require "#{$APP_PATH}/lib/magic_monkey.rb"
3
+ $APP_PATH = File.expand_path("#{File.dirname(__FILE__)}/..")
4
+ require "#{$APP_PATH}/lib/magicmonkey/magicmonkey"
5
5
 
6
6
  MagicMonkey.main(ARGV)
@@ -1,7 +1,8 @@
1
1
  require 'optparse'
2
2
  require 'pp'
3
3
  require 'etc'
4
- require "#{$APP_PATH}/lib/configuration"
4
+ require "#{$APP_PATH}/lib/magicmonkey/version"
5
+ require "#{$APP_PATH}/lib/magicmonkey/configuration"
5
6
 
6
7
  module MagicMonkey
7
8
  COMMANDS = [:start, :stop, :restart, :add, :remove, :show]
@@ -11,7 +12,7 @@ module MagicMonkey
11
12
  Process::UID.change_privilege(Conf[:uid] || Process.uid)
12
13
  command = argv[0]
13
14
  if command == '-v' || command == '--version'
14
- puts File.exist?("#{$APP_PATH}/VERSION") ? File.read("#{$APP_PATH}/VERSION").strip : ''
15
+ puts Magicmonkey::VERSION
15
16
  exit
16
17
  elsif command.nil? || command == '-h' || command == '--help' || !COMMANDS.include?(command.to_sym)
17
18
  main_help
@@ -217,6 +218,7 @@ module MagicMonkey
217
218
  if input.upcase == "Y\n" || input == "\n"
218
219
  if create_vhost
219
220
  vh = YAML.load_file(vhost_template)[:vhost_template]
221
+ vh.gsub!('$APP_NAME', app_name)
220
222
  vh.gsub!('$SERVER_NAME', server_name || app_name)
221
223
  #vh.gsub!('$DOCUMENT_ROOT', Conf[app_name][:app_path])
222
224
  vh.gsub!('$PORT', Conf[app_name][:port].to_s)
@@ -0,0 +1,3 @@
1
+ module Magicmonkey
2
+ VERSION = '0.1.3'
3
+ end
data/magicmonkey.gemspec CHANGED
@@ -1,57 +1,20 @@
1
- # Generated by jeweler
2
- # DO NOT EDIT THIS FILE DIRECTLY
3
- # Instead, edit Jeweler::Tasks in Rakefile, and run the gemspec command
4
1
  # -*- encoding: utf-8 -*-
2
+ $:.push File.expand_path("../lib", __FILE__)
3
+ require "magicmonkey/version"
5
4
 
6
5
  Gem::Specification.new do |s|
7
- s.name = %q{magicmonkey}
8
- s.version = "0.0.10"
6
+ s.name = "magicmonkey"
7
+ s.version = Magicmonkey::VERSION
8
+ s.authors = ["Enrico Pilotto"]
9
+ s.email = ["enrico@megiston.it"]
10
+ s.homepage = "https://github.com/pioz/magicmonkey"
11
+ s.summary = %q{Manage your Rails applications: different Ruby versions and different application servers}
12
+ s.description = %q{Manage your Rails applications: different Ruby versions and different application servers.}
9
13
 
10
- s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
- s.authors = ["pioz"]
12
- s.date = %q{2010-10-28}
13
- s.default_executable = %q{magicmonkey}
14
- s.description = %q{Manage your Rails applications: different Ruby versions and different application servers}
15
- s.email = %q{enrico@megiston.it}
16
- s.executables = ["magicmonkey"]
17
- s.extra_rdoc_files = [
18
- "LICENSE",
19
- "README.rdoc"
20
- ]
21
- s.files = [
22
- ".gitignore",
23
- "LICENSE",
24
- "README.rdoc",
25
- "Rakefile",
26
- "VERSION",
27
- "bin/magicmonkey",
28
- "lib/configuration.rb",
29
- "lib/magic_monkey.rb",
30
- "magicmonkey.gemspec",
31
- "test/helper.rb",
32
- "test/test_magic_monkey.rb"
33
- ]
34
- s.homepage = %q{http://github.com/pioz/magicmonkey}
35
- s.rdoc_options = ["--charset=UTF-8"]
36
- s.require_paths = ["lib"]
37
- s.rubygems_version = %q{1.3.7}
38
- s.summary = %q{Manage your Rails applications: different Ruby versions and different application servers}
39
- s.test_files = [
40
- "test/helper.rb",
41
- "test/test_magic_monkey.rb"
42
- ]
43
-
44
- if s.respond_to? :specification_version then
45
- current_version = Gem::Specification::CURRENT_SPECIFICATION_VERSION
46
- s.specification_version = 3
14
+ s.rubyforge_project = "magicmonkey"
47
15
 
48
- if Gem::Version.new(Gem::VERSION) >= Gem::Version.new('1.2.0') then
49
- s.add_development_dependency(%q<thoughtbot-shoulda>, [">= 0"])
50
- else
51
- s.add_dependency(%q<thoughtbot-shoulda>, [">= 0"])
52
- end
53
- else
54
- s.add_dependency(%q<thoughtbot-shoulda>, [">= 0"])
55
- end
16
+ s.files = `git ls-files`.split("\n")
17
+ s.test_files = `git ls-files -- {test,spec,features}/*`.split("\n")
18
+ s.executables = `git ls-files -- bin/*`.split("\n").map{ |f| File.basename(f) }
19
+ s.require_paths = ["lib"]
56
20
  end
57
-
metadata CHANGED
@@ -1,76 +1,61 @@
1
- --- !ruby/object:Gem::Specification
1
+ --- !ruby/object:Gem::Specification
2
2
  name: magicmonkey
3
- version: !ruby/object:Gem::Version
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.1.3
4
5
  prerelease:
5
- version: 0.1.2
6
6
  platform: ruby
7
- authors:
8
- - pioz
7
+ authors:
8
+ - Enrico Pilotto
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
-
13
- date: 2011-06-24 00:00:00 +02:00
14
- default_executable: magicmonkey
15
- dependencies:
16
- - !ruby/object:Gem::Dependency
17
- name: thoughtbot-shoulda
18
- prerelease: false
19
- requirement: &id001 !ruby/object:Gem::Requirement
20
- none: false
21
- requirements:
22
- - - ">="
23
- - !ruby/object:Gem::Version
24
- version: "0"
25
- type: :development
26
- version_requirements: *id001
27
- description: "Manage your Rails applications: different Ruby versions and different application servers."
28
- email: enrico@megiston.it
29
- executables:
12
+ date: 2011-10-11 00:00:00.000000000Z
13
+ dependencies: []
14
+ description: ! 'Manage your Rails applications: different Ruby versions and different
15
+ application servers.'
16
+ email:
17
+ - enrico@megiston.it
18
+ executables:
30
19
  - magicmonkey
31
20
  extensions: []
32
-
33
- extra_rdoc_files:
34
- - LICENSE
35
- - README.rdoc
36
- files:
21
+ extra_rdoc_files: []
22
+ files:
23
+ - .gitignore
37
24
  - LICENSE
38
25
  - README.rdoc
39
26
  - Rakefile
40
- - VERSION
41
27
  - bin/magicmonkey
42
- - lib/configuration.rb
43
- - lib/magic_monkey.rb
28
+ - lib/magicmonkey/configuration.rb
29
+ - lib/magicmonkey/magicmonkey.rb
30
+ - lib/magicmonkey/version.rb
44
31
  - magicmonkey.gemspec
45
32
  - test/helper.rb
46
33
  - test/test_magic_monkey.rb
47
- has_rdoc: true
48
- homepage: http://github.com/pioz/magicmonkey
34
+ homepage: https://github.com/pioz/magicmonkey
49
35
  licenses: []
50
-
51
36
  post_install_message:
52
37
  rdoc_options: []
53
-
54
- require_paths:
38
+ require_paths:
55
39
  - lib
56
- required_ruby_version: !ruby/object:Gem::Requirement
40
+ required_ruby_version: !ruby/object:Gem::Requirement
57
41
  none: false
58
- requirements:
59
- - - ">="
60
- - !ruby/object:Gem::Version
61
- version: "0"
62
- required_rubygems_version: !ruby/object:Gem::Requirement
42
+ requirements:
43
+ - - ! '>='
44
+ - !ruby/object:Gem::Version
45
+ version: '0'
46
+ required_rubygems_version: !ruby/object:Gem::Requirement
63
47
  none: false
64
- requirements:
65
- - - ">="
66
- - !ruby/object:Gem::Version
67
- version: "0"
48
+ requirements:
49
+ - - ! '>='
50
+ - !ruby/object:Gem::Version
51
+ version: '0'
68
52
  requirements: []
69
-
70
- rubyforge_project:
71
- rubygems_version: 1.6.2
53
+ rubyforge_project: magicmonkey
54
+ rubygems_version: 1.8.6
72
55
  signing_key:
73
56
  specification_version: 3
74
- summary: "Manage your Rails applications: different Ruby versions and different application servers"
75
- test_files: []
76
-
57
+ summary: ! 'Manage your Rails applications: different Ruby versions and different
58
+ application servers'
59
+ test_files:
60
+ - test/helper.rb
61
+ - test/test_magic_monkey.rb
data/VERSION DELETED
@@ -1 +0,0 @@
1
- 0.1.2