akitaonrails-locarails 1.1.6 → 1.1.7

Sign up to get free protection for your applications and to get access to all the features.
data/bin/locarails CHANGED
@@ -171,9 +171,8 @@ mysqlcfg.input( :db, "Nome do seu banco mysql (enter para '#{config.usuario}')
171
171
  mysqlcfg.input( :user, "Seu usuario de mysql (enter para #{mysqlcfg.db})", mysqlcfg.db )
172
172
  mysqlcfg.input( :pass, "Sua senha de mysql" )
173
173
  mysqlcfg.input( :host, "Seu servidor mysql (ex. mysqlxxxx.locaweb.com.br)" )
174
- mysqlcfg.host = "#{mysqlcfg.host}.locaweb.com.br" unless mysqlcfg.host =~ /locaweb\.com\.br/
175
174
  if config.mode == 'git'
176
- config.input( :branch, "Git branch (enter para 'master')", 'master' )
175
+ config.input( :branch, "Git branch local (enter para 'master')", 'master' )
177
176
  config.input( :remote_repo, "Nome do repositorio remoto (enter para 'locaweb')", 'locaweb' )
178
177
  config.remote_git = "#{config.usuario}@#{config.dominio}:~/repo/#{config.app_name}.git"
179
178
  end
@@ -193,15 +192,27 @@ STR
193
192
  end
194
193
 
195
194
  if config.mode == 'git'
196
- FileUtils.copy_file("#{config.bin_path}/../templates/.gitignore",
197
- "#{config.local_path}/.gitignore") unless File.exists?("#{config.local_path}/.gitignore")
195
+ begin
196
+ FileUtils.copy_file("#{config.bin_path}/../templates/.gitignore",
197
+ "#{config.local_path}/.gitignore") unless File.exists?("#{config.local_path}/.gitignore")
198
+ rescue
199
+ puts "Error copying file #{config.bin_path}/../templates/.gitignore"
200
+ end
198
201
  end
199
202
 
200
- FileUtils.copy_file("#{config.bin_path}/../templates/locaweb_backup.rb",
201
- "#{config.local_path}/config/locaweb_backup.rb") unless File.exists?("#{config.local_path}/config/locaweb_backup.rb")
203
+ begin
204
+ FileUtils.copy_file("#{config.bin_path}/../templates/locaweb_backup.rb",
205
+ "#{config.local_path}/config/locaweb_backup.rb") unless File.exists?("#{config.local_path}/config/locaweb_backup.rb")
206
+ rescue
207
+ puts "Error copying file #{config.bin_path}/../templates/locaweb_backup.rb"
208
+ end
202
209
 
203
- FileUtils.copy_file("#{config.bin_path}/../templates/ssh_helper.rb",
204
- "#{config.local_path}/config/ssh_helper.rb") unless File.exists?("#{config.local_path}/config/ssh_helper.rb")
210
+ begin
211
+ FileUtils.copy_file("#{config.bin_path}/../templates/ssh_helper.rb",
212
+ "#{config.local_path}/config/ssh_helper.rb") unless File.exists?("#{config.local_path}/config/ssh_helper.rb")
213
+ rescue
214
+ puts "Error copying file #{config.bin_path}/../templates/ssh_helper.rb"
215
+ end
205
216
 
206
217
  File.open("#{config.local_path}/config/deploy.rb", 'w') do |out|
207
218
  erb = ERB.new(File.read("#{config.bin_path}/../templates/deploy.rb.erb"))
data/lib/locarails.rb CHANGED
@@ -1,3 +1,4 @@
1
- require 'locarails/version'
2
1
  module Locarails
3
- end
2
+ end
3
+
4
+ require 'locarails/version'
@@ -2,7 +2,7 @@ module Locarails
2
2
  module VERSION #:nodoc:
3
3
  MAJOR = 1
4
4
  MINOR = 1
5
- TINY = 6
5
+ TINY = 7
6
6
 
7
7
  STRING = [MAJOR, MINOR, TINY].join('.')
8
8
  end
data/tasks/gems.rake ADDED
@@ -0,0 +1,43 @@
1
+ locarails_gemspec = Gem::Specification.new do |s|
2
+ s.name = "locarails"
3
+ s.version = Locarails::VERSION::STRING
4
+ s.homepage = "http://www.locaweb.com.br/rails"
5
+ s.summary = "Configuracao de Capistrano automatica para hospedagens Linux Locaweb."
6
+ s.authors = ["Fabio Akita"]
7
+ s.date = %q{Time.now.strftime("%Y/%d/%m")}
8
+ s.default_executable = "locarails"
9
+ s.description = "A maneira mais simples para instalar aplicacoes Rails na hospedagem Linux da Locaweb."
10
+ s.email = "fabio.akita@locaweb.com.br"
11
+ s.executables = ["locarails"]
12
+ s.files = Dir.glob("{bin,lib,templates,tasks}/**/*") + ['templates/.gitignore']
13
+ s.has_rdoc = true
14
+ s.require_paths = ["lib"]
15
+
16
+ s.add_runtime_dependency("capistrano", [">= 2.0.0"])
17
+ s.add_runtime_dependency("highline", [">= 0"])
18
+ s.add_runtime_dependency("archive-tar-minitar", [">= 0.5.2"])
19
+ end
20
+
21
+
22
+ Rake::GemPackageTask.new(locarails_gemspec) do |pkg|
23
+ pkg.gem_spec = locarails_gemspec
24
+ end
25
+
26
+ namespace :gem do
27
+ namespace :spec do
28
+ desc "Update locarails.gemspec"
29
+ task :generate do
30
+ File.open("locarails.gemspec", "w") do |f|
31
+ f.puts(locarails_gemspec.to_ruby)
32
+ end
33
+ end
34
+ end
35
+ end
36
+
37
+ desc "Generate package and install"
38
+ task :install => :package do
39
+ sh %{sudo gem install --local pkg/locarails-#{Locarails::VERSION}}
40
+ end
41
+
42
+ desc "Remove all generated artifacts"
43
+ task :clean => :clobber_package
@@ -0,0 +1,22 @@
1
+ log/*.log
2
+ log/*.out
3
+ log/*.pid
4
+ tmp/**/*
5
+ .DS_Store
6
+ db/schema.rb
7
+ db/schema.sql
8
+ db/*.sqlite3*
9
+ config/database.yml
10
+ config/database.locaweb.yml
11
+ public/photos/*
12
+ public/upload/*
13
+ public/assets/*
14
+ .project
15
+ .#*
16
+ tmp/.*
17
+ \#*
18
+ *~
19
+ vendor/**/**/doc/*
20
+ rsa_key*
21
+ coverage/
22
+ coverage
@@ -5,3 +5,4 @@ production:
5
5
  username: <%= mysqlcfg.user %>
6
6
  password: <%= mysqlcfg.pass %>
7
7
  host: <%= mysqlcfg.host %>
8
+ pool: 5
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: akitaonrails-locarails
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.1.6
4
+ version: 1.1.7
5
5
  platform: ruby
6
6
  authors:
7
7
  - Fabio Akita
@@ -9,7 +9,7 @@ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
11
 
12
- date: 2008-08-27 00:00:00 -07:00
12
+ date: 2008-12-24 00:00:00 -08:00
13
13
  default_executable: locarails
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
@@ -51,6 +51,9 @@ files:
51
51
  - bin/locarails
52
52
  - bin/locarails.cmd
53
53
  - lib/locarails
54
+ - lib/locarails/copy.rb
55
+ - lib/locarails/fix.rb
56
+ - lib/locarails/none.rb
54
57
  - lib/locarails/version.rb
55
58
  - lib/locarails.rb
56
59
  - templates/database.locaweb.yml.erb
@@ -58,9 +61,8 @@ files:
58
61
  - templates/deploy.rb.erb
59
62
  - templates/locaweb_backup.rb
60
63
  - templates/ssh_helper.rb
61
- - lib/locarails/copy.rb
62
- - lib/locarails/none.rb
63
- - lib/locarails/fix.rb
64
+ - tasks/gems.rake
65
+ - templates/.gitignore
64
66
  has_rdoc: true
65
67
  homepage: http://www.locaweb.com.br/rails
66
68
  post_install_message:
@@ -82,7 +84,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
82
84
  version:
83
85
  requirements: []
84
86
 
85
- rubyforge_project: locarails
87
+ rubyforge_project:
86
88
  rubygems_version: 1.2.0
87
89
  signing_key:
88
90
  specification_version: 2