alchemy_cms 2.2.rc15 → 2.2.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -7,10 +7,12 @@ rvm:
7
7
  - rbx-19mode
8
8
  branches:
9
9
  only:
10
- - master
10
+ - 2.2-stable
11
11
  before_script:
12
+ - "export DISPLAY=:99.0"
13
+ - "sh -e /etc/init.d/xvfb start"
12
14
  - "sh -c 'cd spec/dummy && RAILS_ENV=test bundle exec rake db:create db:schema:load --trace'"
13
- script: "bundle exec rspec spec"
15
+ script: "bundle exec rspec spec --format=doc"
14
16
  env:
15
17
  - DB=mysql
16
18
  - DB=postgresql
data/Gemfile CHANGED
@@ -10,8 +10,8 @@ group :test do
10
10
  gem 'sqlite3' if ENV['DB'].nil? || ENV['DB'] == 'sqlite'
11
11
  gem 'mysql2' if ENV['DB'] == 'mysql'
12
12
  gem 'pg' if ENV['DB'] == 'postgresql'
13
+ gem 'poltergeist'
13
14
  unless ENV['CI']
14
- gem 'capybara-webkit'
15
15
  gem 'launchy'
16
16
  end
17
17
  end
data/README.md CHANGED
@@ -33,9 +33,7 @@ Features
33
33
  Rails Version
34
34
  -------------
35
35
 
36
- This branch of Alchemy runs with Rails 3.2.
37
-
38
- **This branch is a beta development branch. For productive environments use the current rubygems version, or the latest stable tag.**
36
+ This version of Alchemy runs with Rails 3.2 only.
39
37
 
40
38
  If you are looking for a Rails 3.1 compatible version check the 2.1-stable branch.
41
39
 
@@ -53,7 +51,7 @@ Installation
53
51
 
54
52
  Use the installer (recommended):
55
53
 
56
- gem install alchemy_cms --pre
54
+ gem install alchemy_cms
57
55
  alchemy new my_magicpage
58
56
 
59
57
  Start the local server:
@@ -81,7 +79,7 @@ Add to existing Rails project
81
79
 
82
80
  In your Gemfile:
83
81
 
84
- gem 'alchemy_cms', :git => 'git://github.com/magiclabs/alchemy_cms.git', :branch => 'next_stable'
82
+ gem 'alchemy_cms', :git => 'git://github.com/magiclabs/alchemy_cms.git'
85
83
 
86
84
  Run in terminal:
87
85
 
@@ -0,0 +1 @@
1
+ // You can overwrite this file in your app or engine to customize javascript available in Alchemy's backend.
@@ -25,3 +25,4 @@
25
25
  //= require alchemy/alchemy.windows
26
26
  //= require alchemy/alchemy.preview_window
27
27
  //= require alchemy/alchemy.elements_window
28
+ //= require alchemy/alchemy.custom
@@ -32,12 +32,12 @@ if (typeof(Alchemy) === 'undefined') {
32
32
 
33
33
  AjaxErrorHandler: function($dialog, status, textStatus, errorThrown) {
34
34
  var $div = $('<div class="with_padding" />');
35
- var $errorDiv = $('<div id="errorExplanation" />');
35
+ var $errorDiv = $('<div id="errorExplanation" class="ajax_status_code_' + status + '" />');
36
36
  $dialog.html($div);
37
37
  $div.append($errorDiv);
38
38
  if (status === 0) {
39
- $errorDiv.append('<h2>The server does not respond!</h2>');
40
- $errorDiv.append('<p>Please start server and try again.</p>');
39
+ $errorDiv.append('<h2>The server does not respond.</h2>');
40
+ $errorDiv.append('<p>Please check server and try again.</p>');
41
41
  } else {
42
42
  $errorDiv.append('<h2>' + errorThrown + ' (' + status + ')</h2>');
43
43
  $errorDiv.append('<p>Please check log and try again.</p>');
@@ -16,4 +16,5 @@
16
16
  *= require alchemy/jquery-ui.alchemy
17
17
  *= require alchemy/jquery.Jcrop
18
18
  *= require alchemy/jquery.sb
19
+ *= require alchemy/custom
19
20
  */
@@ -754,6 +754,12 @@ div#toolbar_buttons_right {
754
754
  border: 1px solid #d08f91;
755
755
  color: #690001;
756
756
  @include rounded-corner;
757
+
758
+ &.ajax_status_code_0 {
759
+ border-color: #c4c19c;
760
+ color: #726d23;
761
+ background-color: #f3f0c1;
762
+ }
757
763
  }
758
764
 
759
765
  #errorExplanation h2 {
@@ -0,0 +1 @@
1
+ /* You can overwrite this file in your app or engine to customize stylesheets available in Alchemy's backend. */
@@ -235,8 +235,7 @@ module Alchemy
235
235
  private
236
236
 
237
237
  def load_page
238
- @page ||= Page.with_language(session[:language_id]).find_by_urlname(params[:id])
239
- @page ||= Page.find_by_id(params[:id])
238
+ @page = Page.find_by_id(params[:id])
240
239
  raise ActiveRecord::RecordNotFound if @page.nil?
241
240
  end
242
241
 
@@ -17,7 +17,7 @@ module Alchemy
17
17
  caches_action(:show,
18
18
  :cache_path => proc { @page.cache_key(request) },
19
19
  :if => proc {
20
- if Alchemy::Config.get(:cache_pages)
20
+ if @page && Alchemy::Config.get(:cache_pages)
21
21
  pagelayout = PageLayout.get(@page.page_layout)
22
22
  pagelayout['cache'].nil? || pagelayout['cache']
23
23
  else
@@ -542,7 +542,7 @@ module Alchemy
542
542
  <script type="text/javascript">
543
543
  try {
544
544
  Alchemy.loadAlchemyMenuBar({
545
- page_id: '#{@page.urlname || @page.id}',
545
+ page_id: #{@page.id},
546
546
  route: '#{Alchemy.mount_point}',
547
547
  locale: '#{current_user.language}'
548
548
  });
@@ -1,4 +1,4 @@
1
- <li id="page_<%= page.id %>" class="page_level_<%= page.level %>">
1
+ <li id="page_<%= page.id %>" class="<%= "page_level_#{page.level} #{page.page_layout}" %>">
2
2
  <div class="sitemap_page<%= page.locked ? ' locked' : '' %>">
3
3
  <div class="sitemap_left_images">
4
4
  <%= sitemapFolderLink(page) unless page.children.blank? || @sorting %>
@@ -42,17 +42,24 @@ Capistrano::Configuration.instance(:must_exist).load do
42
42
 
43
43
  desc "Creates the database.yml file"
44
44
  task :create do
45
- db_config = ERB.new <<-EOF
45
+ db_adapter = Capistrano::CLI.ui.ask("Please enter database adapter (Options: mysql2, or postgresql. Default mysql2): ")
46
+ db_adapter = db_adapter.empty? ? 'mysql2' : db_adapter.gsub(/^mysql$/, 'mysql2')
47
+ db_name = Capistrano::CLI.ui.ask("Please enter database name: ")
48
+ db_username = Capistrano::CLI.ui.ask("Please enter database username: ")
49
+ db_password = Capistrano::CLI.ui.ask("Please enter database password: ")
50
+ default_db_host = db_adapter == 'mysql2' ? 'localhost' : '127.0.0.1'
51
+ db_host = Capistrano::CLI.ui.ask("Please enter database host (Default: #{default_db_host}): ")
52
+ db_host = db_host.empty? ? default_db_host : db_host
53
+ db_config = ERB.new <<-EOF
46
54
  production:
47
- adapter: mysql2
55
+ adapter: #{ db_adapter }
48
56
  encoding: utf8
49
57
  reconnect: false
50
58
  pool: 5
51
- database: #{ Capistrano::CLI.ui.ask("Database name: ") }
52
- username: #{ Capistrano::CLI.ui.ask("Database username: ") }
53
- password: #{ Capistrano::CLI.ui.ask("Database password: ") }
54
- socket: #{ Capistrano::CLI.ui.ask("Database socket: ") }
55
- host: #{ Capistrano::CLI.ui.ask("Database host: ") }
59
+ database: #{ db_name }
60
+ username: #{ db_username }
61
+ password: #{ db_password }
62
+ host: #{ db_host }
56
63
  EOF
57
64
  run "mkdir -p #{shared_path}/config"
58
65
  put db_config.result, "#{shared_path}/config/database.yml"
@@ -1,5 +1,5 @@
1
1
  module Alchemy
2
2
 
3
- VERSION = "2.2.rc15"
3
+ VERSION = "2.2.0"
4
4
 
5
5
  end
@@ -2,46 +2,48 @@ require 'bundler/capistrano'
2
2
  require 'alchemy/capistrano'
3
3
  load 'deploy/assets'
4
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
5
+ # ssh settings
6
+ set :user, "<%= @ssh_user %>"
7
+ set :password, "<%= @ssh_password %>"
8
+ set :port, <%= @ssh_port || 22 %>
10
9
 
11
10
  # domain names
12
- role :app, "<%= @server %>"
13
- role :web, "<%= @server %>"
14
- role :db, "<%= @server %>", :primary => true
11
+ role :app, "<%= @server %>"
12
+ role :web, "<%= @server %>"
13
+ role :db, "<%= @server %>", :primary => true
15
14
 
16
- # set the public webserver path
17
- set :deploy_to, "<%= @deploy_path %>"
18
-
19
- set :rails_env, "production"
15
+ # the webserver path
16
+ set :deploy_to, "<%= @deploy_path %>"
20
17
 
18
+ # repository settings
21
19
  <%- 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 %>"
20
+ set :scm, "subversion"
21
+ set :repository_url, "<%= @repository_url %>"
26
22
  <%- if @scm_user && @scm_password -%>
27
- set :repository, Proc.new { "--username #{scm_user} --password #{scm_password} #{repository_url}" }
23
+ set :scm_user, "<%= @scm_user %>"
24
+ set :scm_password, "<%= @scm_password %>"
25
+ set :repository, Proc.new { "--username #{scm_user} --password #{scm_password} #{repository_url}" }
28
26
  <%- else -%>
29
- set :repository, "<%= @repository_url %>"
27
+ set :repository, "<%= @repository_url %>"
30
28
  <%- end -%>
31
29
  <%- elsif @scm == "git" -%>
32
- set :scm, "git"
33
- set :repository, "<%= @repository_url %>"
34
- set :branch, "master"
30
+ set :scm, "git"
31
+ set :repository, "<%= @repository_url %>"
32
+ set :branch, "master"
35
33
  <%- end -%>
36
34
 
37
- before "deploy:start", "deploy:seed"
38
- before "deploy:restart", "deploy:migrate"
35
+ # before hooks
36
+ before "deploy:start", "deploy:seed"
37
+ before "deploy:create_symlink", "deploy:migrate"
39
38
 
39
+ # after hooks
40
40
  <%- if @database_type == "mysql" -%>
41
- after "deploy:setup", "alchemy:database_yml:create"
42
- after "deploy:assets:symlink", "alchemy:database_yml:symlink"
41
+ after "deploy:setup", "alchemy:database_yml:create"
42
+ after "deploy:assets:symlink", "alchemy:database_yml:symlink"
43
43
  <%- end -%>
44
- after "deploy", "deploy:cleanup"
44
+ after "deploy", "deploy:cleanup"
45
+
46
+ # special tasks
45
47
 
46
48
  namespace :logs do
47
49
  desc "show last 100 lines of log"
@@ -70,3 +72,14 @@ namespace :deploy do
70
72
  end
71
73
 
72
74
  end
75
+
76
+ ## defaults
77
+
78
+ # rails env
79
+ set :rails_env, "production"
80
+
81
+ # enable bundler binstubs
82
+ set :bundle_flags, "--deployment --binstubs"
83
+
84
+ # do not use sudo
85
+ set :use_sudo, false
@@ -101,11 +101,6 @@ module Alchemy
101
101
  session[:language_id] = @language.id
102
102
  end
103
103
 
104
- it "should find a page from urlname" do
105
- get :edit, {:id => @page.to_param}
106
- response.status.should == 200
107
- end
108
-
109
104
  it "should find a page from id" do
110
105
  get :edit, {:id => @page.id}
111
106
  response.status.should == 200
@@ -1,12 +1,11 @@
1
- # Skipping on Travis-CI, because capybara-webkit does not install on travis.
2
- unless ENV["CI"]
1
+ require 'spec_helper'
3
2
 
4
- require 'spec_helper'
5
-
6
- describe Alchemy::Admin::PagesController, :js => true do
3
+ module Alchemy
4
+ describe Admin::PagesController, :js => true do
7
5
 
8
6
  before(:all) do
9
7
  create_admin_user
8
+ @german_root = FactoryGirl.create(:language_root_page, :language => Language.get_default, :name => 'Deutsch')
10
9
  end
11
10
 
12
11
  before(:each) do
@@ -22,7 +21,6 @@ unless ENV["CI"]
22
21
  context "in a multilangual environment" do
23
22
 
24
23
  before(:all) do
25
- @german_root = FactoryGirl.create(:language_root_page, :language => Alchemy::Language.get_default, :name => 'Deutsch')
26
24
  @klingonian_root = FactoryGirl.create(:language_root_page, :name => 'Klingonian')
27
25
  end
28
26
 
@@ -34,7 +32,6 @@ unless ENV["CI"]
34
32
 
35
33
  after(:all) {
36
34
  @klingonian_root.delete
37
- @german_root.delete
38
35
  }
39
36
 
40
37
  end
@@ -65,6 +62,9 @@ unless ENV["CI"]
65
62
 
66
63
  end
67
64
 
68
- end
65
+ after(:all) {
66
+ @german_root.delete
67
+ }
69
68
 
69
+ end
70
70
  end
@@ -28,10 +28,10 @@ def configure
28
28
 
29
29
  # Configure capybara for integration testing
30
30
  require "capybara/rails"
31
- require 'capybara-webkit' unless ENV['CI']
31
+ require 'capybara/poltergeist'
32
32
  Capybara.default_driver = :rack_test
33
33
  Capybara.default_selector = :css
34
- Capybara.javascript_driver = :webkit unless ENV['CI']
34
+ Capybara.javascript_driver = :poltergeist
35
35
 
36
36
  # Load support files
37
37
  Dir["#{File.dirname(__FILE__)}/support/**/*.rb"].each { |f| require f }
metadata CHANGED
@@ -1,8 +1,8 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: alchemy_cms
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.2.rc15
5
- prerelease: 4
4
+ version: 2.2.0
5
+ prerelease:
6
6
  platform: ruby
7
7
  authors:
8
8
  - Thomas von Deyen
@@ -12,7 +12,7 @@ authors:
12
12
  autorequire:
13
13
  bindir: bin
14
14
  cert_chain: []
15
- date: 2012-06-18 00:00:00.000000000 Z
15
+ date: 2012-06-25 00:00:00.000000000 Z
16
16
  dependencies:
17
17
  - !ruby/object:Gem::Dependency
18
18
  name: rails
@@ -387,6 +387,7 @@ files:
387
387
  - app/assets/images/alchemy/ui-icons_666666_256x240.png
388
388
  - app/assets/javascripts/alchemy/alchemy.base.js
389
389
  - app/assets/javascripts/alchemy/alchemy.buttons.js
390
+ - app/assets/javascripts/alchemy/alchemy.custom.js
390
391
  - app/assets/javascripts/alchemy/alchemy.datepicker.js
391
392
  - app/assets/javascripts/alchemy/alchemy.dirty.js
392
393
  - app/assets/javascripts/alchemy/alchemy.dragndrop.js
@@ -418,6 +419,7 @@ files:
418
419
  - app/assets/stylesheets/alchemy/alchemy.css
419
420
  - app/assets/stylesheets/alchemy/base.css.scss
420
421
  - app/assets/stylesheets/alchemy/buttons.css.scss
422
+ - app/assets/stylesheets/alchemy/custom.css
421
423
  - app/assets/stylesheets/alchemy/dashboard.css.scss
422
424
  - app/assets/stylesheets/alchemy/elements.css.scss
423
425
  - app/assets/stylesheets/alchemy/flash.css.scss
@@ -1032,9 +1034,12 @@ required_ruby_version: !ruby/object:Gem::Requirement
1032
1034
  required_rubygems_version: !ruby/object:Gem::Requirement
1033
1035
  none: false
1034
1036
  requirements:
1035
- - - ! '>'
1037
+ - - ! '>='
1036
1038
  - !ruby/object:Gem::Version
1037
- version: 1.3.1
1039
+ version: '0'
1040
+ segments:
1041
+ - 0
1042
+ hash: 1665960692087372061
1038
1043
  requirements:
1039
1044
  - ImageMagick (libmagick), v6.6 or greater.
1040
1045
  rubyforge_project: