inline_forms 1.3.15 → 1.3.16
Sign up to get free protection for your applications and to get access to all the features.
data/bin/inline_forms
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
#!/usr/bin/env ruby
|
1
|
+
mv#!/usr/bin/env ruby
|
2
2
|
# copied from hobo and then modified. Some stuff is there because of that.
|
3
3
|
|
4
4
|
require 'fileutils'
|
@@ -206,6 +206,10 @@ end
|
|
206
206
|
|
207
207
|
puts "Capify...\n"
|
208
208
|
system('capify .')
|
209
|
+
system("cp #{src}/lib/generators/templates/deploy.rb config/deploy.rb")
|
210
|
+
|
211
|
+
puts "Unicorn Config...\n"
|
212
|
+
system("cp #{src}/lib/generators/templates/unicorn.rb config/unicorn.rb")
|
209
213
|
|
210
214
|
puts "Initializing git...\n"
|
211
215
|
system('git init')
|
@@ -0,0 +1,70 @@
|
|
1
|
+
# -*- encoding : utf-8 -*-
|
2
|
+
|
3
|
+
require "bundler/capistrano"
|
4
|
+
require "rvm/capistrano"
|
5
|
+
|
6
|
+
set :application, "YOUR_APPLICATION_NAME"
|
7
|
+
set :domain, "YOUR_HOST_NAME"
|
8
|
+
set :user, "YOUR_USERNAME_ON_THE_HOST"
|
9
|
+
|
10
|
+
#
|
11
|
+
|
12
|
+
set :rvm_ruby_string, ENV['GEM_HOME'].gsub(/.*\//,"") # Read from local system
|
13
|
+
|
14
|
+
set :bundle_flags, "--deployment"
|
15
|
+
|
16
|
+
set :use_sudo, false
|
17
|
+
|
18
|
+
set :deploy_to, "/var/www/ror/#{application}"
|
19
|
+
|
20
|
+
set :repository, "file:///home/#{user}/git-repos/#{application}.git"
|
21
|
+
set :local_repository, "ssh://#{user}@#{domain}/home/#{user}/git-repos/#{application}.git"
|
22
|
+
set :scm, "git"
|
23
|
+
|
24
|
+
|
25
|
+
role :app, domain
|
26
|
+
role :web, domain
|
27
|
+
role :db, domain, :primary => true
|
28
|
+
|
29
|
+
before :deploy do
|
30
|
+
system "bundle install"
|
31
|
+
system "git commit -a"
|
32
|
+
system "git push"
|
33
|
+
end
|
34
|
+
|
35
|
+
before 'deploy:setup', 'rvm:install_rvm'
|
36
|
+
before 'deploy:setup', 'rvm:install_ruby'
|
37
|
+
after "deploy:update_code", "deploy:fix_stuff"
|
38
|
+
after "deploy:update_code", "deploy:precompile_assets"
|
39
|
+
|
40
|
+
namespace :deploy do
|
41
|
+
task :start, :roles => :app do
|
42
|
+
run "touch #{current_release}/tmp/restart.txt"
|
43
|
+
end
|
44
|
+
|
45
|
+
task :stop, :roles => :app do
|
46
|
+
# Do nothing.
|
47
|
+
end
|
48
|
+
|
49
|
+
desc "Fix Stuff."
|
50
|
+
task :fix_stuff do
|
51
|
+
run "cd #{shared_path} && mkdir -p log"
|
52
|
+
run "cd #{shared_path} && mkdir -p sockets"
|
53
|
+
run "ln -s #{shared_path}/sockets #{release_path}/tmp/sockets"
|
54
|
+
raise "Rails environment not set" unless rails_env
|
55
|
+
run "cd #{release_path} && RAILS_ENV=#{rails_env} bundle exec rails g ckeditor:install "
|
56
|
+
end
|
57
|
+
|
58
|
+
|
59
|
+
desc "Compile all the assets named in config.assets.precompile."
|
60
|
+
task :precompile_assets do
|
61
|
+
raise "Rails environment not set" unless rails_env
|
62
|
+
task = "assets:precompile"
|
63
|
+
run "cd #{release_path} && bundle exec rake #{task} RAILS_ENV=#{rails_env}"
|
64
|
+
end
|
65
|
+
|
66
|
+
desc "Restart Application"
|
67
|
+
task :restart, :roles => :app do
|
68
|
+
run "touch #{current_release}/tmp/restart.txt"
|
69
|
+
end
|
70
|
+
end
|
@@ -0,0 +1,47 @@
|
|
1
|
+
APP_ROOT = File.expand_path(File.dirname(File.dirname(__FILE__)))
|
2
|
+
|
3
|
+
if ENV['MY_RUBY_HOME'] && ENV['MY_RUBY_HOME'].include?('rvm')
|
4
|
+
begin
|
5
|
+
#rvm_path = File.dirname(File.dirname(ENV['MY_RUBY_HOME']))
|
6
|
+
#rvm_lib_path = File.join(rvm_path, 'lib')
|
7
|
+
#$LOAD_PATH.unshift rvm_lib_path
|
8
|
+
require 'rvm'
|
9
|
+
RVM.use_from_path! APP_ROOT
|
10
|
+
rescue LoadError
|
11
|
+
raise "RVM ruby lib is currently unavailable."
|
12
|
+
end
|
13
|
+
end
|
14
|
+
|
15
|
+
ENV['BUNDLE_GEMFILE'] = File.expand_path('../Gemfile', File.dirname(__FILE__))
|
16
|
+
require 'bundler/setup'
|
17
|
+
|
18
|
+
worker_processes 4
|
19
|
+
working_directory APP_ROOT
|
20
|
+
|
21
|
+
preload_app true
|
22
|
+
|
23
|
+
timeout 30
|
24
|
+
|
25
|
+
listen APP_ROOT + "/tmp/sockets/unicorn.sock", :backlog => 64
|
26
|
+
|
27
|
+
pid APP_ROOT + "/tmp/pids/unicorn.pid"
|
28
|
+
|
29
|
+
stderr_path APP_ROOT + "/log/unicorn.stderr.log"
|
30
|
+
stdout_path APP_ROOT + "/log/unicorn.stdout.log"
|
31
|
+
|
32
|
+
before_fork do |server, worker|
|
33
|
+
defined?(ActiveRecord::Base) && ActiveRecord::Base.connection.disconnect!
|
34
|
+
|
35
|
+
old_pid = Rails.root + '/tmp/pids/unicorn.pid.oldbin'
|
36
|
+
if File.exists?(old_pid) && server.pid != old_pid
|
37
|
+
begin
|
38
|
+
Process.kill("QUIT", File.read(old_pid).to_i)
|
39
|
+
rescue Errno::ENOENT, Errno::ESRCH
|
40
|
+
puts "Old master alerady dead"
|
41
|
+
end
|
42
|
+
end
|
43
|
+
end
|
44
|
+
|
45
|
+
after_fork do |server, worker|
|
46
|
+
defined?(ActiveRecord::Base) && ActiveRecord::Base.establish_connection
|
47
|
+
end
|
data/lib/inline_forms/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: inline_forms
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.3.
|
4
|
+
version: 1.3.16
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -221,9 +221,10 @@ files:
|
|
221
221
|
- lib/generators/inline_forms_generator.rb
|
222
222
|
- lib/generators/templates/_inline_forms_tabs.html.erb
|
223
223
|
- lib/generators/templates/controller.erb
|
224
|
-
- lib/generators/templates/deploy.rb
|
224
|
+
- lib/generators/templates/deploy.rb
|
225
225
|
- lib/generators/templates/migration.erb
|
226
226
|
- lib/generators/templates/model.erb
|
227
|
+
- lib/generators/templates/unicorn.rb
|
227
228
|
- lib/inline_forms.rb
|
228
229
|
- lib/inline_forms/version.rb
|
229
230
|
- lib/locales/inline_forms.en.yml
|
@@ -1,60 +0,0 @@
|
|
1
|
-
# -*- encoding : utf-8 -*-
|
2
|
-
require "bundler/capistrano"
|
3
|
-
|
4
|
-
set :rvm_ruby_string, ENV['GEM_HOME'].gsub(/.*\//,"") # Read from local system
|
5
|
-
|
6
|
-
require "rvm/capistrano"
|
7
|
-
|
8
|
-
set :bundle_flags, "--deployment"
|
9
|
-
|
10
|
-
set :use_sudo, false
|
11
|
-
|
12
|
-
set :application, "iDesignBack"
|
13
|
-
set :domain, "ror.suares.com"
|
14
|
-
|
15
|
-
set :deploy_to, "/var/www/ror/#{application}"
|
16
|
-
|
17
|
-
set :repository, "file:///home/capdeploy/git-repos/#{application}.git"
|
18
|
-
set :local_repository, "ssh://capdeploy@#{domain}/home/capdeploy/git-repos/#{application}.git"
|
19
|
-
set :scm, "git"
|
20
|
-
|
21
|
-
set :user, "capdeploy"
|
22
|
-
|
23
|
-
role :app, domain
|
24
|
-
role :web, domain
|
25
|
-
role :db, domain, :primary => true
|
26
|
-
|
27
|
-
before :deploy do
|
28
|
-
system "bundle install"
|
29
|
-
# system "bundle update inline_forms"
|
30
|
-
system "git commit -a"
|
31
|
-
system "git push"
|
32
|
-
end
|
33
|
-
|
34
|
-
after "deploy:update_code", "deploy:precompile_assets"
|
35
|
-
before 'deploy:setup', 'rvm:install_rvm'
|
36
|
-
before 'deploy:setup', 'rvm:install_ruby'
|
37
|
-
|
38
|
-
namespace :deploy do
|
39
|
-
task :start, :roles => :app do
|
40
|
-
run "touch #{current_release}/tmp/restart.txt"
|
41
|
-
end
|
42
|
-
|
43
|
-
task :stop, :roles => :app do
|
44
|
-
# Do nothing.
|
45
|
-
end
|
46
|
-
|
47
|
-
desc "Compile all the assets named in config.assets.precompile."
|
48
|
-
task :precompile_assets do
|
49
|
-
|
50
|
-
run "cd #{release_path}/../../shared && mkdir -p log"
|
51
|
-
raise "Rails environment not set" unless rails_env
|
52
|
-
task = "assets:precompile"
|
53
|
-
run "cd #{release_path} && bundle exec rake #{task} RAILS_ENV=#{rails_env}"
|
54
|
-
end
|
55
|
-
|
56
|
-
desc "Restart Application"
|
57
|
-
task :restart, :roles => :app do
|
58
|
-
run "touch #{current_release}/tmp/restart.txt"
|
59
|
-
end
|
60
|
-
end
|