alchemy_cms 2.1.rc3 → 2.1.rc4

Sign up to get free protection for your applications and to get access to all the features.
@@ -76,7 +76,11 @@ module Alchemy
76
76
 
77
77
  def set_language_to_default
78
78
  @language = Language.get_default
79
- store_language_in_session(@language)
79
+ if @language
80
+ store_language_in_session(@language)
81
+ else
82
+ raise "No Default Language found! Did you run `rake alchemy:db:seed` task?"
83
+ end
80
84
  end
81
85
 
82
86
  def store_language_in_session(language)
data/bin/alchemy CHANGED
@@ -1,6 +1,6 @@
1
+ #!/usr/bin/env ruby
1
2
  # encoding: UTF-8
2
3
 
3
- #!/usr/bin/env ruby
4
4
  begin
5
5
  require "rubygems"
6
6
  require 'rails/version'
@@ -13,168 +13,125 @@ begin
13
13
  end
14
14
 
15
15
  class AlchemyInstaller < Thor
16
-
17
- include Thor::Actions
18
16
 
19
- map "-v" => :version
17
+ include Thor::Actions
18
+
19
+ map "-v" => :version
20
20
  map "--version" => :version
21
21
 
22
22
  desc "version", "Prints current Alchemy CMS version", :hide => true
23
- def version
24
- puts Alchemy::VERSION
25
- end
23
+ def version
24
+ puts Alchemy::VERSION
25
+ end
26
26
 
27
- desc "new PROJECT", "Creates a new Alchemy CMS project."
28
- method_option :scm, :type => :string, :aliases => "-s", :desc => "Type of scm to use for this project. Leave blank for none."
27
+ desc "new PROJECT", "Creates a new Alchemy CMS project."
28
+ method_option :scm, :type => :string, :aliases => "-s", :desc => "Type of scm to use for this project. Leave blank for none."
29
29
  method_option :database, :type => :string, :default => 'mysql', :aliases => "-d", :desc => "Type of database to use for this project. Default mysql."
30
- def new(project)
31
- @application = project.downcase.strip.gsub(/ /, '_')
32
- if yes?("Install Alchemy CMS into ./#{@application}? (y/N)")
33
-
34
- say "Generating new Rails App...", :yellow
35
-
36
- if system("rails _#{RAILS_VERSION}_ new #{@application} -m #{File.join(File.dirname(__FILE__), '..', 'lib', 'rails', 'templates', 'alchemy.rb')} -d #{options[:database]} -JT")
37
-
38
- create_database_yml if options[:database] == 'mysql'
39
-
40
- with_standard_set = yes?("\nDo you want to copy the files of Alchemy´s Standardset into your App? (y/N)")
41
-
42
- %x[
43
- cd ./#{@application}
44
- rails g alchemy:scaffold#{' --with-standard-set' if with_standard_set}
45
- rm ./public/index.html
46
- rm ./app/assets/images/rails.png
47
- ]
48
-
30
+ def new(project)
31
+ @application = project.downcase.strip.gsub(/ /, '_')
32
+ if yes?("Install Alchemy CMS into ./#{@application}? (y/N)")
33
+
34
+ say "Generating new Rails App...", :yellow
35
+
36
+ if system("rails _#{RAILS_VERSION}_ new #{@application} -m #{File.join(File.dirname(__FILE__), '..', 'lib', 'rails', 'templates', 'alchemy.rb')} -d #{options[:database]} -JT")
37
+
38
+ create_database_yml if options[:database] == 'mysql'
39
+
49
40
  mountpoint = ask "\nWhere do you want to mount Alchemy CMS? (/)"
50
41
  mountpoint = "/" if mountpoint.empty?
51
42
  sentinel = /\.routes\.draw do(?:\s*\|map\|)?\s*$/
52
43
  inject_into_file "#{@application}/config/routes.rb", "\n mount Alchemy::Engine => '#{mountpoint}'\n", { :after => sentinel, :verbose => true }
53
-
54
- if options[:scm]
55
-
56
- %x[
57
- cd ./#{@application}
58
- rm -rf ./tmp/*
59
- rm -rf ./log/*
60
- mkdir -p ./index
61
- mkdir -p ./uploads
62
- ]
63
-
64
- case options[:scm]
65
- when 'svn'
66
- server = ask("\nURL of your svn server? (http://svn.magiclabs.de/customers)")
67
- server = "http://svn.magiclabs.de/customers" if server.empty?
68
- repository = ask("\nName of the repository? (#{@application})")
69
- repository = @application if repository.empty?
70
-
71
- say "\nImporting #{@application} into #{server}/#{repository} ...", :yellow
72
- output = %x[svn import ./#{@application} #{server}/#{repository} -m 'initial import by Alchemy installer']; imported = $?.success?
73
-
74
- if imported
75
-
76
- say "Removing and checking out again...", :yellow
77
- %x[
78
- rm -rf ./#{@application}
79
- svn co #{server}/#{repository}
80
- ]
81
-
82
- say "Committing ignores...", :yellow
83
- %x[
84
- cd ./#{@application}
85
- svn propset svn:ignore '*' tmp/ log/ index/ uploads/
86
- svn propset svn:ignore 'alchemy' ./public/images ./public/stylesheets ./public/javascripts
87
- svn propset svn:ignore 'pictures' ./public
88
- svn propset svn:ignore 'assets' ./public
89
- svn propset svn:ignore 'database.yml' ./config
90
- svn commit -m 'set ignores'
91
- ]
92
-
93
- # deploy.rb
94
- if yes? "\nUse Capistrano for deployment? (y/N)"
95
- @repository_url = "#{server}/#{repository}"
96
-
97
- # ssh settings
98
- @ssh_user = ask "SSH User:"
99
- @ssh_password = ask "SSH Password:"
100
- standard_port = 12312
101
- @ssh_port = ask "SSH Port (#{standard_port}):"
102
- @ssh_port = standard_port if @ssh_port.empty?
103
-
104
- # db settings
105
- @db_user = ask "Production Database User (#{@ssh_user}):"
106
- @db_user = @ssh_user if @db_user.empty?
107
- @db_password = ask "Production Database Password:"
108
- standard_db_name = "usr_#{@db_user}_1"
109
- @db_name = ask "Production Database Name (#{standard_db_name}):"
110
- @db_name = standard_db_name if @db_name.empty?
111
- standard_host = "localhost"
112
- @db_host = ask "Production Database Host (#{standard_host}):"
113
- @db_host = standard_host if @db_host.empty?
114
- standard_socket = '/var/run/mysqld/mysqld.sock'
115
- @db_socket = ask "Production Database Socket (#{standard_socket}):"
116
- @db_socket = standard_socket if @db_socket.empty?
117
-
118
- # deploy_path
119
- standard_path = "/var/www/#{@ssh_user}/html/alchemy"
120
- @deploy_path = ask "Deploy Path (#{standard_path}):"
121
- @deploy_path = standard_path if @deploy_path.empty?
122
-
123
- # scm settings
124
- @scm_user = ask "Subversion User:"
125
- @scm_password = ask "Subversion Password:"
126
-
127
- # server settings
128
- @server = ask "Hostname/IP of server to deploy to:"
129
-
130
- create_deploy_rb
131
-
132
- say "\nCapifying...", :yellow
133
-
134
- %x[
135
- cd #{@application}
136
- capify .
137
- svn add ./config/deploy.rb ./Capfile
138
- svn commit -m 'capified'
139
- ]
140
-
141
- end
142
-
143
- else
144
- say "Error while importing!", :red
145
- end
146
-
147
- when 'git'
148
- gitignore = <<-GIT
149
- log/*
150
- tmp/*
151
- .DS_Store
152
- upload/*
153
- index/*
154
- public/**/alchemy
155
- public/pictures
156
- public/assets
157
- config/database.yml
158
- GIT
159
- %x[
160
- cd #{@application}
161
- echo #{gitignore} > #{@application}/.gitignore
162
- touch ./index/.gitkeep
163
- touch ./uploads/.gitkeep
164
- git init .
165
- git commit -am 'inital commit'
166
- ]
167
- end
168
-
169
- end
170
-
171
- %x[
172
- cd ./#{@application}
173
- rake db:create alchemy:install:migrations db:migrate alchemy:db:seed
174
- ]
175
-
176
- readme = <<-EOF
177
- \nSuccessfully installed Alchemy CMS into ./#{@application}
44
+
45
+ with_standard_set = yes?("\nDo you want to copy the files of Alchemy´s Standardset into your App? (y/N)")
46
+
47
+ %x[
48
+ cd ./#{@application}
49
+ rails g alchemy:scaffold#{' --with-standard-set' if with_standard_set}
50
+ rm ./public/index.html
51
+ rm ./app/assets/images/rails.png
52
+ ]
53
+
54
+ if !options[:scm].nil? && !options[:scm].empty?
55
+
56
+ clean_mountpoint = mountpoint.gsub('/', '')
57
+
58
+ %x[
59
+ cd ./#{@application}
60
+ rm -rf ./tmp/*
61
+ rm -rf ./log/*
62
+ mkdir -p ./index
63
+ mkdir -p ./uploads
64
+ ]
65
+
66
+ if yes?("\nDo you want to generate a deploy script for Capistrano? (y/N)")
67
+ system "cd #{@application} && rails g alchemy:deploy_script --scm=#{options[:scm]} --db=#{options[:database]}"
68
+ say "\nCapifying...", :yellow
69
+ system "cd #{@application} && capify ."
70
+ end
71
+
72
+ case options[:scm]
73
+ when 'svn'
74
+ server = ask("\nURL of your svn server:")
75
+ repository = ask("\nName of the repository (#{@application}):")
76
+ repository = @application if repository.empty?
77
+
78
+ say "\nImporting #{@application} into #{server}/#{repository} ...", :yellow
79
+ output = %x[svn import ./#{@application} #{server}/#{repository} -m 'initial import by Alchemy installer']; imported = $?.success?
80
+
81
+ if imported
82
+
83
+ say "Removing and checking out again...", :yellow
84
+ %x[
85
+ rm -rf ./#{@application}
86
+ svn co #{server}/#{repository} #{@application}
87
+ ]
88
+
89
+ say "Committing ignores...", :yellow
90
+ %x[
91
+ cd ./#{@application}
92
+ svn propset svn:ignore '*' tmp/ log/ index/ uploads/
93
+ svn propset svn:ignore '#{clean_mountpoint.empty? ? 'pictures' : clean_mountpoint}' ./public
94
+ svn propset svn:ignore 'assets' ./public
95
+ svn propset svn:ignore 'database.yml' ./config
96
+ svn commit -m 'set ignores'
97
+ ]
98
+
99
+ else
100
+ say "Error while importing!", :red
101
+ end
102
+
103
+ when 'git'
104
+ gitignore = <<-GIT
105
+ log/*
106
+ tmp/*
107
+ .DS_Store
108
+ upload/*
109
+ index/*
110
+ public/#{clean_mountpoint.empty? ? 'pictures' : clean_mountpoint}
111
+ public/assets
112
+ config/database.yml
113
+ GIT
114
+ %x[
115
+ cd #{@application}
116
+ echo "#{gitignore}" > .gitignore
117
+ touch ./index/.gitkeep
118
+ touch ./uploads/.gitkeep
119
+ git init .
120
+ git add .
121
+ git commit -am 'inital commit'
122
+ ]
123
+ end
124
+
125
+ end
126
+
127
+ %x[
128
+ cd ./#{@application}
129
+ rake db:create alchemy:install:migrations db:migrate alchemy:db:seed
130
+ ]
131
+
132
+ readme = <<-EOF
133
+
134
+ Successfully installed Alchemy CMS into ./#{@application}
178
135
 
179
136
  Next steps:
180
137
 
@@ -196,25 +153,24 @@ Thank you for using Alchemy CMS!
196
153
  http://alchemy-cms.com
197
154
 
198
155
  EOF
199
- say readme, :green
200
-
201
- else
202
- say "\nError while installation!\n", :red
203
- end
204
-
205
- else
206
- return
207
- end
208
- end
209
-
156
+ say readme, :green
157
+ else
158
+ say "\nError while installation!\n", :red
159
+ end
160
+
161
+ else
162
+ return
163
+ end
164
+ end
165
+
210
166
  private
211
167
 
212
- def create_database_yml
213
- @db_root_password = ask("\nPlease provide your local root password for mysql (Leave blank for none):")
214
- local_standard_socket = '/tmp/mysql.sock'
215
- @db_local_socket = ask("\nPlease provide your local mysql socket (#{local_standard_socket}):")
216
- @db_local_socket = local_standard_socket if @db_local_socket.empty?
217
- create_file "./#{@application}/config/database.yml", :force => true do
168
+ def create_database_yml
169
+ @db_root_password = ask("\nPlease provide your local root password for mysql (Leave blank for none):")
170
+ local_standard_socket = '/tmp/mysql.sock'
171
+ @db_local_socket = ask("\nPlease provide your local mysql socket (#{local_standard_socket}):")
172
+ @db_local_socket = local_standard_socket if @db_local_socket.empty?
173
+ create_file "./#{@application}/config/database.yml", :force => true do
218
174
  <<-DATABASE
219
175
  development:
220
176
  adapter: mysql2
@@ -249,79 +205,9 @@ production:
249
205
  password: #{@db_root_password}
250
206
  socket: #{@db_local_socket}
251
207
  DATABASE
252
- end
253
- end
254
-
255
- def create_deploy_rb
256
- create_file "./#{@application}/config/deploy.rb" do
257
- <<-DEPLOY
258
- # set the applicationname here
259
- set :application, "#{@application}"
260
-
261
- # set the apps repository url
262
- set :repository_url, "#{@repository_url}"
263
-
264
- # ssh user settings. please change to customers
265
- set :user, "#{@ssh_user}"
266
- set :password, "#{@ssh_password}"
267
- set :port, #{@ssh_port}
268
- set :use_sudo, false
269
-
270
- # domain names
271
- role :app, "#{@server}"
272
- role :web, "#{@server}"
273
- role :db, "#{@server}", :primary => true
274
-
275
- # set the public webserver path
276
- set :deploy_to, "#{@deploy_path}"
277
-
278
- set :scm, :subversion
279
- set :scm_user, "#{@scm_user}"
280
- set :scm_password, "#{@scm_password}"
281
-
282
- set :repository, Proc.new{ "--username \#{scm_user} --password \#{scm_password} \#{repository_url}" }
283
-
284
- after "deploy:setup", "alchemy:database_yml:create"
285
-
286
- before "deploy:start", "deploy:seed"
287
-
288
- after "deploy:symlink", "alchemy:database_yml:symlink"
289
-
290
- before "deploy:restart", "deploy:migrate"
291
-
292
- after "deploy", "deploy:cleanup"
293
-
294
- namespace :logs do
295
- desc "show last 50 lines of production.log"
296
- task :tail do
297
- run "tail -n50 \#{shared_path}/log/production.log"
298
- end
299
-
300
- desc "watch tail of production.log and wait for additional data to be appended to the input"
301
- task :watch do
302
- stream("tail -f \#{shared_path}/log/production.log")
303
- end
304
- end
305
-
306
- namespace :deploy do
307
- desc "Overwrite for the internal Capistrano deploy:start task."
308
- task :start, :roles => :app do
309
- end
310
-
311
- desc "Restart the server"
312
- task :restart, :roles => :app do
313
- run "touch \#{current_path}/tmp/restart.txt"
314
- end
208
+ end
209
+ end
315
210
 
316
- desc 'Seeds the database'
317
- task :seed, :roles => :app, :except => { :no_release => true } do
318
- run "cd \#{current_path} && RAILS_ENV=production rake db:seed"
319
- end
320
- end
321
- DEPLOY
322
- end
323
- end
324
-
325
211
  end
326
212
 
327
213
  AlchemyInstaller.start
@@ -4,11 +4,11 @@ require "rails"
4
4
  require "alchemy/mount_point"
5
5
 
6
6
  Capistrano::Configuration.instance(:must_exist).load do
7
-
7
+
8
8
  after "deploy:setup", "alchemy:shared_folders:create"
9
9
  after "deploy:symlink", "alchemy:shared_folders:symlink"
10
10
  before "deploy:start", "alchemy:db:seed"
11
-
11
+
12
12
  namespace :alchemy do
13
13
 
14
14
  namespace :shared_folders do
@@ -20,7 +20,7 @@ Capistrano::Configuration.instance(:must_exist).load do
20
20
  run "mkdir -p #{shared_path}/index"
21
21
  run "mkdir -p #{shared_path}/uploads/pictures"
22
22
  run "mkdir -p #{shared_path}/uploads/attachments"
23
- run "mkdir -p #{File.join(shared_path, 'cache', Capistrano::CLI.ui.ask("Where is Alchemy CMS mounted at? (/)"), 'pictures')}"
23
+ run "mkdir -p #{File.join(shared_path, 'cache', Capistrano::CLI.ui.ask("Where is Alchemy CMS mounted at? ('/')"), 'pictures')}"
24
24
  end
25
25
 
26
26
  # This task sets the symlinks for uploads, picture cache and ferret index folder.
@@ -38,7 +38,7 @@ Capistrano::Configuration.instance(:must_exist).load do
38
38
 
39
39
  desc "Upgrades production database to current Alchemy CMS version"
40
40
  task :upgrade do
41
- run "cd #{current_path} && RAILS_ENV=production #{rake} alchemy:upgrade"
41
+ run "cd #{current_path} && RAILS_ENV=#{fetch(:rails_env, 'production')} #{rake} alchemy:upgrade"
42
42
  end
43
43
 
44
44
  namespace :database_yml do
@@ -46,22 +46,22 @@ Capistrano::Configuration.instance(:must_exist).load do
46
46
  desc "Creates the database.yml file"
47
47
  task :create do
48
48
  db_config = ERB.new <<-EOF
49
- production:
50
- adapter: mysql
51
- encoding: utf8
52
- reconnect: false
53
- pool: 5
54
- database: #{ Capistrano::CLI.ui.ask("Database name: ") }
55
- username: #{ Capistrano::CLI.ui.ask("Database username: ") }
56
- password: #{ Capistrano::CLI.ui.ask("Database password: ") }
57
- socket: #{ Capistrano::CLI.ui.ask("Database socket: ") }
58
- host: #{ Capistrano::CLI.ui.ask("Database host: ") }
59
- EOF
49
+ production:
50
+ adapter: mysql
51
+ encoding: utf8
52
+ reconnect: false
53
+ pool: 5
54
+ database: #{ Capistrano::CLI.ui.ask("Database name: ") }
55
+ username: #{ Capistrano::CLI.ui.ask("Database username: ") }
56
+ password: #{ Capistrano::CLI.ui.ask("Database password: ") }
57
+ socket: #{ Capistrano::CLI.ui.ask("Database socket: ") }
58
+ host: #{ Capistrano::CLI.ui.ask("Database host: ") }
59
+ EOF
60
60
  run "mkdir -p #{shared_path}/config"
61
61
  put db_config.result, "#{shared_path}/config/database.yml"
62
62
  end
63
63
 
64
- desc "Symlinks the database.yml file from shared folder into config folder"
64
+ desc "[internal] Symlinks the database.yml file from shared folder into config folder"
65
65
  task :symlink, :except => { :no_release => true } do
66
66
  run "ln -nfs #{shared_path}/config/database.yml #{release_path}/config/database.yml"
67
67
  end
@@ -74,21 +74,21 @@ Capistrano::Configuration.instance(:must_exist).load do
74
74
 
75
75
  desc "Seeds the database with essential data."
76
76
  task :seed, :roles => :app do
77
- run "cd #{current_path} && RAILS_ENV=production #{rake} alchemy:db:seed"
77
+ run "cd #{current_path} && RAILS_ENV=#{fetch(:rails_env, 'production')} #{rake} alchemy:db:seed"
78
78
  end
79
79
 
80
80
  end
81
81
 
82
82
  namespace :ferret do
83
-
83
+
84
84
  # This task rebuilds the ferret index for the EssenceText and EssenceRichtext Models.
85
85
  # Call it before deploy:restart like +before "deploy:restart", "alchemy:rebuild_index"+ in your +deploy.rb+.
86
86
  # It uses the +alchemy:rebuild_index+ rake task found in +vendor/plugins/alchemy/lib/tasks+.
87
87
  desc "Rebuild the ferret index. Call before deploy:restart"
88
88
  task :rebuild_index, :roles => :app do
89
- run "cd #{current_path} && RAILS_ENV=production #{rake} ferret:rebuild_index"
89
+ run "cd #{current_path} && RAILS_ENV=#{fetch(:rails_env, 'production')} #{rake} ferret:rebuild_index"
90
90
  end
91
91
 
92
92
  end
93
-
93
+
94
94
  end
@@ -1,5 +1,5 @@
1
1
  module Alchemy
2
2
 
3
- VERSION = "2.1.rc3"
3
+ VERSION = "2.1.rc4"
4
4
 
5
5
  end
@@ -0,0 +1,31 @@
1
+ require 'rails/generators'
2
+
3
+ module Alchemy
4
+ module Generators
5
+ class DeployScriptGenerator < ::Rails::Generators::Base
6
+
7
+ desc "This generator generates a Capistrano deploy script."
8
+ class_option :scm, :type => :string, :desc => "Set the type of scm you use for deployment.", :default => 'svn'
9
+ class_option :db, :type => :string, :desc => "Set the type of database you use on your server.", :default => 'mysql'
10
+ source_root File.expand_path('templates', File.dirname(__FILE__))
11
+
12
+ def copy_script
13
+ @ssh_user = ask('Please enter SSH username:')
14
+ @ssh_password = ask('Please enter SSH password:')
15
+ port = ask('Please enter SSH port (22):')
16
+ @ssh_port = port.blank? ? 22 : port
17
+ @server = ask('Please enter server ip or domain:')
18
+ @deploy_path = ask('Please enter the path to the public html folder:')
19
+ @scm = options[:scm]
20
+ @repository_url = ask('Please enter the URL to your projects repository:')
21
+ if @scm == "svn" && yes?('Is your repository private? (y/N)')
22
+ @scm_user = ask('Please enter the username for your repository:')
23
+ @scm_password = ask('Please enter the password to your repository:')
24
+ end
25
+ @database_type = options[:db]
26
+ template "deploy.rb.tt", Rails.root.join('config', 'deploy.rb')
27
+ end
28
+
29
+ end
30
+ end
31
+ end
@@ -0,0 +1,72 @@
1
+ require 'bundler/capistrano'
2
+ require 'alchemy/capistrano'
3
+ load 'deploy/assets'
4
+
5
+ # ssh user settings. please change to customers
6
+ set :user, "<%= @ssh_user %>"
7
+ set :password, "<%= @ssh_password %>"
8
+ set :port, <%= @ssh_port %>
9
+ set :use_sudo, false
10
+
11
+ # domain names
12
+ role :app, "<%= @server %>"
13
+ role :web, "<%= @server %>"
14
+ role :db, "<%= @server %>", :primary => true
15
+
16
+ # set the public webserver path
17
+ set :deploy_to, "<%= @deploy_path %>"
18
+
19
+ set :rails_env, "production"
20
+
21
+ <%- if @scm == "svn" -%>
22
+ set :repository_url, "<%= @repository_url %>"
23
+ set :scm, "subversion"
24
+ set :scm_user, "<%= @scm_user %>"
25
+ set :scm_password, "<%= @scm_password %>"
26
+ <%- if @scm_user && @scm_password -%>
27
+ set :repository, Proc.new { "--username #{scm_user} --password #{scm_password} #{repository_url}" }
28
+ <%- else -%>
29
+ set :repository, "<%= @repository_url %>"
30
+ <%- end -%>
31
+ <%- elsif @scm == "git" -%>
32
+ set :scm, "git"
33
+ set :repository, "<%= @repository_url %>"
34
+ set :branch, "master"
35
+ <%- end -%>
36
+
37
+ before "deploy:start", "deploy:seed"
38
+ before "deploy:restart", "deploy:migrate"
39
+
40
+ <%- if @database_type == "mysql" -%>
41
+ after "deploy:setup", "alchemy:database_yml:create"
42
+ after "deploy:symlink", "alchemy:database_yml:symlink"
43
+ <%- end -%>
44
+ after "deploy", "deploy:cleanup"
45
+
46
+ namespace :logs do
47
+ desc "show last 100 lines of log"
48
+ task :tail do
49
+ run "tail -n100 #{shared_path}/log/#{rails_env}.log"
50
+ end
51
+
52
+ desc "watch tail of log and wait for additional data to be appended to the input"
53
+ task :watch do
54
+ stream("tail -f #{shared_path}/log/#{rails_env}.log")
55
+ end
56
+ end
57
+
58
+ namespace :deploy do
59
+
60
+ task :start do ; end
61
+ task :stop do ; end
62
+
63
+ task :restart, :roles => :app, :except => { :no_release => true } do
64
+ run "#{try_sudo} touch #{File.join(current_path,'tmp','restart.txt')}"
65
+ end
66
+
67
+ desc 'Seeds the database'
68
+ task :seed, :roles => :app, :except => { :no_release => true } do
69
+ run "cd #{release_path} && RAILS_ENV=#{rails_env} #{rake} db:seed"
70
+ end
71
+
72
+ end
@@ -7,8 +7,8 @@ gem 'alchemy_cms', "~> #{Alchemy::VERSION}"
7
7
  gem 'ruby-debug', :group => :development, :platform => :ruby_18
8
8
  gem 'ruby-debug19', :group => :development, :platform => :ruby_19
9
9
 
10
- if yes?("Use Capistrano for deployment? (y/N)")
11
- gem 'capistrano', :group => :development
10
+ if yes?("\nDo you want to use Capistrano for deployment? (y/N)")
11
+ gem 'capistrano', :group => :development
12
12
  end
13
13
 
14
14
  run 'bundle install'
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: alchemy_cms
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.1.rc3
4
+ version: 2.1.rc4
5
5
  prerelease: 4
6
6
  platform: ruby
7
7
  authors:
@@ -15,7 +15,7 @@ date: 2012-01-18 00:00:00.000000000 Z
15
15
  dependencies:
16
16
  - !ruby/object:Gem::Dependency
17
17
  name: rails
18
- requirement: &70365142414880 !ruby/object:Gem::Requirement
18
+ requirement: &70214478485880 !ruby/object:Gem::Requirement
19
19
  none: false
20
20
  requirements:
21
21
  - - ~>
@@ -23,10 +23,10 @@ dependencies:
23
23
  version: '3.1'
24
24
  type: :runtime
25
25
  prerelease: false
26
- version_requirements: *70365142414880
26
+ version_requirements: *70214478485880
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: authlogic
29
- requirement: &70365142414420 !ruby/object:Gem::Requirement
29
+ requirement: &70214478485160 !ruby/object:Gem::Requirement
30
30
  none: false
31
31
  requirements:
32
32
  - - ! '>='
@@ -34,10 +34,10 @@ dependencies:
34
34
  version: '0'
35
35
  type: :runtime
36
36
  prerelease: false
37
- version_requirements: *70365142414420
37
+ version_requirements: *70214478485160
38
38
  - !ruby/object:Gem::Dependency
39
39
  name: awesome_nested_set
40
- requirement: &70365142413860 !ruby/object:Gem::Requirement
40
+ requirement: &70214478484460 !ruby/object:Gem::Requirement
41
41
  none: false
42
42
  requirements:
43
43
  - - ~>
@@ -45,10 +45,10 @@ dependencies:
45
45
  version: '2.0'
46
46
  type: :runtime
47
47
  prerelease: false
48
- version_requirements: *70365142413860
48
+ version_requirements: *70214478484460
49
49
  - !ruby/object:Gem::Dependency
50
50
  name: declarative_authorization
51
- requirement: &70365142413320 !ruby/object:Gem::Requirement
51
+ requirement: &70214478483780 !ruby/object:Gem::Requirement
52
52
  none: false
53
53
  requirements:
54
54
  - - ~>
@@ -56,10 +56,10 @@ dependencies:
56
56
  version: 0.5.4
57
57
  type: :runtime
58
58
  prerelease: false
59
- version_requirements: *70365142413320
59
+ version_requirements: *70214478483780
60
60
  - !ruby/object:Gem::Dependency
61
61
  name: tvdeyen-fleximage
62
- requirement: &70365142412840 !ruby/object:Gem::Requirement
62
+ requirement: &70214478483180 !ruby/object:Gem::Requirement
63
63
  none: false
64
64
  requirements:
65
65
  - - ~>
@@ -67,10 +67,10 @@ dependencies:
67
67
  version: 1.0.9
68
68
  type: :runtime
69
69
  prerelease: false
70
- version_requirements: *70365142412840
70
+ version_requirements: *70214478483180
71
71
  - !ruby/object:Gem::Dependency
72
72
  name: will_paginate
73
- requirement: &70365142412340 !ruby/object:Gem::Requirement
73
+ requirement: &70214478482600 !ruby/object:Gem::Requirement
74
74
  none: false
75
75
  requirements:
76
76
  - - ~>
@@ -78,10 +78,10 @@ dependencies:
78
78
  version: '3.0'
79
79
  type: :runtime
80
80
  prerelease: false
81
- version_requirements: *70365142412340
81
+ version_requirements: *70214478482600
82
82
  - !ruby/object:Gem::Dependency
83
83
  name: acts_as_ferret
84
- requirement: &70365142411860 !ruby/object:Gem::Requirement
84
+ requirement: &70214478481900 !ruby/object:Gem::Requirement
85
85
  none: false
86
86
  requirements:
87
87
  - - ~>
@@ -89,10 +89,10 @@ dependencies:
89
89
  version: '0.5'
90
90
  type: :runtime
91
91
  prerelease: false
92
- version_requirements: *70365142411860
92
+ version_requirements: *70214478481900
93
93
  - !ruby/object:Gem::Dependency
94
94
  name: acts_as_list
95
- requirement: &70365142411380 !ruby/object:Gem::Requirement
95
+ requirement: &70214478480640 !ruby/object:Gem::Requirement
96
96
  none: false
97
97
  requirements:
98
98
  - - ~>
@@ -100,10 +100,10 @@ dependencies:
100
100
  version: '0.1'
101
101
  type: :runtime
102
102
  prerelease: false
103
- version_requirements: *70365142411380
103
+ version_requirements: *70214478480640
104
104
  - !ruby/object:Gem::Dependency
105
105
  name: magiclabs-userstamp
106
- requirement: &70365142410880 !ruby/object:Gem::Requirement
106
+ requirement: &70214478479260 !ruby/object:Gem::Requirement
107
107
  none: false
108
108
  requirements:
109
109
  - - ~>
@@ -111,10 +111,10 @@ dependencies:
111
111
  version: 2.0.2
112
112
  type: :runtime
113
113
  prerelease: false
114
- version_requirements: *70365142410880
114
+ version_requirements: *70214478479260
115
115
  - !ruby/object:Gem::Dependency
116
116
  name: dynamic_form
117
- requirement: &70365142699160 !ruby/object:Gem::Requirement
117
+ requirement: &70214478511660 !ruby/object:Gem::Requirement
118
118
  none: false
119
119
  requirements:
120
120
  - - ~>
@@ -122,10 +122,10 @@ dependencies:
122
122
  version: '1.1'
123
123
  type: :runtime
124
124
  prerelease: false
125
- version_requirements: *70365142699160
125
+ version_requirements: *70214478511660
126
126
  - !ruby/object:Gem::Dependency
127
127
  name: jquery-rails
128
- requirement: &70365142698680 !ruby/object:Gem::Requirement
128
+ requirement: &70214478510520 !ruby/object:Gem::Requirement
129
129
  none: false
130
130
  requirements:
131
131
  - - ~>
@@ -133,10 +133,10 @@ dependencies:
133
133
  version: 1.0.16
134
134
  type: :runtime
135
135
  prerelease: false
136
- version_requirements: *70365142698680
136
+ version_requirements: *70214478510520
137
137
  - !ruby/object:Gem::Dependency
138
138
  name: attachment_magic
139
- requirement: &70365142698200 !ruby/object:Gem::Requirement
139
+ requirement: &70214478509380 !ruby/object:Gem::Requirement
140
140
  none: false
141
141
  requirements:
142
142
  - - ~>
@@ -144,10 +144,10 @@ dependencies:
144
144
  version: 0.2.1
145
145
  type: :runtime
146
146
  prerelease: false
147
- version_requirements: *70365142698200
147
+ version_requirements: *70214478509380
148
148
  - !ruby/object:Gem::Dependency
149
149
  name: rspec-rails
150
- requirement: &70365142697720 !ruby/object:Gem::Requirement
150
+ requirement: &70214478508660 !ruby/object:Gem::Requirement
151
151
  none: false
152
152
  requirements:
153
153
  - - ~>
@@ -155,10 +155,10 @@ dependencies:
155
155
  version: '2.8'
156
156
  type: :development
157
157
  prerelease: false
158
- version_requirements: *70365142697720
158
+ version_requirements: *70214478508660
159
159
  - !ruby/object:Gem::Dependency
160
160
  name: sqlite3
161
- requirement: &70365142697340 !ruby/object:Gem::Requirement
161
+ requirement: &70214478507840 !ruby/object:Gem::Requirement
162
162
  none: false
163
163
  requirements:
164
164
  - - ! '>='
@@ -166,7 +166,7 @@ dependencies:
166
166
  version: '0'
167
167
  type: :development
168
168
  prerelease: false
169
- version_requirements: *70365142697340
169
+ version_requirements: *70214478507840
170
170
  description: Alchemy is an awesome Rails CMS with an extremely flexible content storing
171
171
  architecture.
172
172
  email:
@@ -578,6 +578,8 @@ files:
578
578
  - lib/extensions/array.rb
579
579
  - lib/extensions/hash.rb
580
580
  - lib/middleware/flash_session_cookie.rb
581
+ - lib/rails/generators/alchemy/deploy_script/deploy_script_generator.rb
582
+ - lib/rails/generators/alchemy/deploy_script/templates/deploy.rb.tt
581
583
  - lib/rails/generators/alchemy/elements/elements_generator.rb
582
584
  - lib/rails/generators/alchemy/elements/templates/editor.html.erb
583
585
  - lib/rails/generators/alchemy/elements/templates/view.html.erb
@@ -791,7 +793,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
791
793
  version: '0'
792
794
  segments:
793
795
  - 0
794
- hash: -574775660697271963
796
+ hash: 4031528361938782580
795
797
  required_rubygems_version: !ruby/object:Gem::Requirement
796
798
  none: false
797
799
  requirements: