Skip to content

Commit

Permalink
Merge branch 'master' of git://github.com/resolve/refinerycms
Browse files Browse the repository at this point in the history
  • Loading branch information
bryanmtl committed Feb 22, 2011
2 parents e0c68f1 + 5921457 commit 42a77b6
Show file tree
Hide file tree
Showing 68 changed files with 1,774 additions and 258 deletions.
1 change: 0 additions & 1 deletion .gitignore
Expand Up @@ -8,7 +8,6 @@ tmp/**/*
# Documentation
doc/api
doc/app
doc/*
.yardoc
.yardopts

Expand Down
70 changes: 35 additions & 35 deletions Gemfile.lock
@@ -1,47 +1,47 @@
PATH
remote: .
specs:
refinerycms (0.9.9.1)
refinerycms (0.9.9.3)
bundler (~> 1.0.10)
refinerycms-authentication (~> 0.9.9.1)
refinerycms-base (~> 0.9.9.1)
refinerycms-core (~> 0.9.9.1)
refinerycms-dashboard (~> 0.9.9.1)
refinerycms-images (~> 0.9.9.1)
refinerycms-pages (~> 0.9.9.1)
refinerycms-resources (~> 0.9.9.1)
refinerycms-settings (~> 0.9.9.1)
refinerycms-authentication (0.9.9.1)
refinerycms-authentication (~> 0.9.9.3)
refinerycms-base (~> 0.9.9.3)
refinerycms-core (~> 0.9.9.3)
refinerycms-dashboard (~> 0.9.9.3)
refinerycms-images (~> 0.9.9.3)
refinerycms-pages (~> 0.9.9.3)
refinerycms-resources (~> 0.9.9.3)
refinerycms-settings (~> 0.9.9.3)
refinerycms-authentication (0.9.9.3)
devise (~> 1.1)
refinerycms-core (~> 0.9.9.1)
refinerycms-base (0.9.9.1)
refinerycms-core (0.9.9.1)
refinerycms-core (~> 0.9.9.3)
refinerycms-base (0.9.9.3)
refinerycms-core (0.9.9.3)
acts_as_indexed (~> 0.7)
friendly_id_globalize3 (~> 3.2.0)
globalize3 (>= 0.1.0.beta)
moretea-awesome_nested_set (= 1.4.3.1)
rails (~> 3.0.3)
rdoc (>= 2.5.11)
refinerycms-base (~> 0.9.9.1)
refinerycms-base (~> 0.9.9.3)
refinerycms-generators (~> 0.9.9.3)
refinerycms-settings (~> 0.9.9.1)
refinerycms-settings (~> 0.9.9.3)
truncate_html (~> 0.5)
will_paginate (~> 3.0.pre)
refinerycms-dashboard (0.9.9.1)
refinerycms-core (~> 0.9.9.1)
refinerycms-images (0.9.9.1)
refinerycms-dashboard (0.9.9.3)
refinerycms-core (~> 0.9.9.3)
refinerycms-images (0.9.9.3)
dragonfly (~> 0.8.2)
rack-cache (~> 0.5.2)
refinerycms-core (~> 0.9.9.1)
refinerycms-pages (0.9.9.1)
refinerycms-core (~> 0.9.9.1)
refinerycms-resources (0.9.9.1)
rack-cache (>= 0.5.3)
refinerycms-core (~> 0.9.9.3)
refinerycms-pages (0.9.9.3)
refinerycms-core (~> 0.9.9.3)
refinerycms-resources (0.9.9.3)
dragonfly (~> 0.8.2)
rack-cache (~> 0.5.2)
refinerycms-core (~> 0.9.9.1)
refinerycms-settings (0.9.9.1)
refinerycms-base (~> 0.9.9.1)
refinerycms-testing (0.9.9.1)
rack-cache (>= 0.5.3)
refinerycms-core (~> 0.9.9.3)
refinerycms-settings (0.9.9.3)
refinerycms-base (~> 0.9.9.3)
refinerycms-testing (0.9.9.3)
autotest
autotest-notification
autotest-rails
Expand All @@ -54,13 +54,13 @@ PATH
json_pure
launchy
rack-test (~> 0.5.6)
refinerycms-core (~> 0.9.9.1)
refinerycms-core (~> 0.9.9.3)
rspec-rails (~> 2.5)

GEM
remote: http://rubygems.org/
specs:
ZenTest (4.4.2)
ZenTest (4.5.0)
abstract (1.0.0)
actionmailer (3.0.4)
actionpack (= 3.0.4)
Expand Down Expand Up @@ -108,7 +108,7 @@ GEM
rack-test (>= 0.5.4)
selenium-webdriver (>= 0.0.27)
xpath (~> 0.1.3)
celerity (0.8.7)
celerity (0.8.8)
childprocess (0.1.7)
ffi (~> 0.6.3)
configuration (1.2.0)
Expand All @@ -121,8 +121,8 @@ GEM
cucumber-rails (0.3.2)
cucumber (>= 0.8.0)
culerity (0.2.15)
database_cleaner (0.6.3)
devise (1.1.5)
database_cleaner (0.6.4)
devise (1.1.7)
bcrypt-ruby (~> 2.1.2)
warden (~> 1.0.2)
diff-lcs (1.1.2)
Expand Down Expand Up @@ -157,7 +157,7 @@ GEM
nokogiri (1.4.4)
polyglot (0.3.1)
rack (1.2.1)
rack-cache (0.5.3)
rack-cache (1.0)
rack (>= 0.4)
rack-mount (0.6.13)
rack (>= 1.0.0)
Expand All @@ -178,7 +178,7 @@ GEM
thor (~> 0.14.4)
rake (0.8.7)
rdoc (3.5.3)
refinerycms-generators (0.9.9.3)
refinerycms-generators (0.9.9.5)
refinerycms-i18n (0.9.9.9)
refinerycms (>= 0.9.8)
routing-filter (>= 0.2.3)
Expand Down
2 changes: 1 addition & 1 deletion authentication/license.md
@@ -1,6 +1,6 @@
# MIT License

Copyright (c) 2005-2010 [Resolve Digital](http://www.resolvedigital.com)
Copyright (c) 2005-2011 [Resolve Digital](http://www.resolvedigital.com)

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
17 changes: 0 additions & 17 deletions authentication/readme.md

This file was deleted.

6 changes: 3 additions & 3 deletions authentication/refinerycms-authentication.gemspec
Expand Up @@ -2,10 +2,10 @@

Gem::Specification.new do |s|
s.name = %q{refinerycms-authentication}
s.version = %q{0.9.9.1}
s.version = %q{0.9.9.3}
s.summary = %q{Authentication engine for Refinery CMS}
s.description = %q{The default authentication engine for Refinery CMS}
s.date = %q{2011-02-15}
s.date = %q{2011-02-17}
s.email = %q{info@refinerycms.com}
s.homepage = %q{http://refinerycms.com}
s.rubyforge_project = %q{refinerycms}
Expand All @@ -14,7 +14,7 @@ Gem::Specification.new do |s|
s.require_paths = %w(lib)
s.executables = %w()

s.add_dependency 'refinerycms-core', '~> 0.9.9.1'
s.add_dependency 'refinerycms-core', '~> 0.9.9.3'
s.add_dependency 'devise', '~> 1.1'

s.files = [
Expand Down
Expand Up @@ -9,7 +9,7 @@ def self.up
t.datetime "created_at"
end

add_index ::Slug.table_name, ["name", "sluggable_type", "scope", "sequence"], :name => "index_#{::Slug.table_name}_on_name_sluggable_type_scope_and_sequence", :unique => true
add_index ::Slug.table_name, ["name", "sluggable_type", "scope", "sequence"], :name => "index_#{::Slug.table_name}_on_n_s_s_and_s", :unique => true
add_index ::Slug.table_name, ["sluggable_id"], :name => "index_#{::Slug.table_name}_on_sluggable_id"
end

Expand Down
2 changes: 1 addition & 1 deletion base/lib/refinery/version.rb
Expand Up @@ -3,7 +3,7 @@ class Version
@major = 0
@minor = 9
@tiny = 9
@build = 1
@build = 3

class << self
attr_reader :major, :minor, :tiny, :build
Expand Down
2 changes: 1 addition & 1 deletion base/license.md
@@ -1,6 +1,6 @@
# MIT License

Copyright (c) 2005-2010 [Resolve Digital](http://www.resolvedigital.com)
Copyright (c) 2005-2011 [Resolve Digital](http://www.resolvedigital.com)

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
4 changes: 2 additions & 2 deletions base/refinerycms-base.gemspec
Expand Up @@ -2,10 +2,10 @@

Gem::Specification.new do |s|
s.name = %q{refinerycms-base}
s.version = %q{0.9.9.1}
s.version = %q{0.9.9.3}
s.summary = %q{Base engine for Refinery CMS}
s.description = %q{The basic base for Refinery CMS Refinery CMS}
s.date = %q{2011-02-15}
s.date = %q{2011-02-17}
s.email = %q{info@refinerycms.com}
s.homepage = %q{http://refinerycms.com}
s.rubyforge_project = %q{refinerycms}
Expand Down
49 changes: 27 additions & 22 deletions bin/refinerycms
Expand Up @@ -18,7 +18,6 @@ require Pathname.new(File.expand_path(File.dirname(__FILE__) << "/..")).join('li
require 'pathname'
require 'fileutils'
require 'optparse'
require 'active_support'

module Refinery
class AppGenerator
Expand Down Expand Up @@ -117,7 +116,14 @@ module Refinery
bundle!

# Ensure the database exists so that queries like .table_exists? don't fail.
run_command("rake -f \"#{@app_path.join('Rakefile')}\" db:create")
puts "\nCreating a new database.."
# Warn about incorrect username or password.
unless @options[:database][:adapter] == 'sqlite3'
note = "NOTE: if your database username is not '#{@options[:database][:username]}'"
note << " or your password is not '#{@options[:database][:password]}' then the installer will stop working here.\n\n"
puts note
end
run_command("rake -f \"#{@app_path.join('Rakefile')}\" db:create", {:fail => "Unable to create the application's database"})
else
# Update the current application.
update!
Expand Down Expand Up @@ -204,7 +210,7 @@ module Refinery
end
end
elsif @app_path.join('.git').directory? && @options[:update] && !@options[:confirm]
git_status = run_command('git status --porcelain', :puts => false)
git_status = run_command('git status --porcelain', {:puts => false, :ruby => false})
if git_status.to_s.strip.length > 0
puts "\nYou have uncommitted changes or untracked files. Please remove or commit them, or:"
puts "Use --confirm to have Refinery proceed anyway. "
Expand All @@ -230,7 +236,7 @@ module Refinery
end

def generate!(rails_command = nil)
if rails_command.blank?
if rails_command.to_s.length == 0
# Generate a rails application
rails_command = "rails new \"#{@app_path}\""
rails_command << " --database #{@options[:database][:adapter]}"
Expand All @@ -240,11 +246,13 @@ module Refinery
end
rails_output = run_command(rails_command, {:cd => false})
# Detect non-success or a blank rails output or starting with "Can't initialize" or "Error"
if !$?.success? or rails_output.blank? or rails_output =~ /^(Can't\ initialize|Error)/
if !$?.success? or rails_output.to_s.length == 0 or rails_output =~ /^(Can't\ initialize|Error)/
puts "Generating Rails application failed. Exiting..."
exit(1)
elsif defined? JRUBY_VERSION
find_and_replace(@app_path.join('Gemfile'), /['|"]sqlite3['|"]/, "'activerecord-jdbcsqlite3-adapter'")
else
if defined? JRUBY_VERSION
find_and_replace(@app_path.join('Gemfile'), /['|"]sqlite3['|"]/, "'activerecord-jdbcsqlite3-adapter'")
end

# Override username and password
find_and_replace('config/database.yml', %r{username:.*}, "username: #{@options[:database][:username]}")
Expand Down Expand Up @@ -308,13 +316,13 @@ module Refinery
hosting = "Duostack" if @options[:duostack]
unless hosting.nil?
puts "\n\nInitializing and committing to git..\n"
run_command("git init && git add . && git commit -am 'Initial Commit'")
run_command("git init && git add . && git commit -am 'Initial Commit'", :ruby => false)

puts "\n\nCreating #{hosting} app..\n"
run_command("#{hosting.downcase} create #{@options[:heroku] || @options[:duostack]}")

puts "\n\nPushing to #{hosting} (this takes time, be patient)..\n"
run_command("git push #{hosting.downcase} master")
run_command("git push #{hosting.downcase} master", :ruby => false)

puts "\n\nSetting up the #{hosting} database..\n"
run_command("#{hosting.downcase} rake db:setup")
Expand All @@ -339,16 +347,6 @@ module Refinery
puts "heroku config:add S3_BUCKET=XXXXXXXXX S3_KEY=XXXXXXXXX S3_SECRET=XXXXXXXXXX"
end

puts "\n--- Refinery CMS 0.9.9.1 note ---"
puts "New 'core' engine called 'refinerycms-testing' which handles RSpec and Cucumber support."
puts "You will see this disabled in your Gemfile in the '# REFINERY CMS' section."
puts "To enable it, uncomment the gem line in your Gemfile and run:"
puts "\nbundle install"
puts "rails generate refinerycms_testing"
puts "\nIf it prompts you about whether you want to overwrite any files that conflict, choose yes."
puts "\nNow, to run the specs and features you can just type 'rake'."
puts "--- End upgrade note ---\n"

puts "\nThanks for installing Refinery, enjoy creating your new application!"
puts "---------\n\n"
end
Expand All @@ -357,11 +355,18 @@ module Refinery

def run_command(command, options = {})
require 'rbconfig'
exe = File.join(RbConfig::CONFIG['bindir'], RbConfig::CONFIG['RUBY_INSTALL_NAME'])
options = {:cd => true, :puts => true, :fail => nil}.merge(options)
options = {:cd => true, :puts => true, :fail => nil, :ruby => true}.merge(options)
to_run = %w()
to_run << "cd \"#{@app_path}\" &&" if options[:cd]
to_run << "#{exe} -S " << command

# Sometimes we want to exclude the ruby runtime executable from the front
# e.g. when shelling to git
if options[:ruby]
exe = File.join(RbConfig::CONFIG['bindir'], RbConfig::CONFIG['RUBY_INSTALL_NAME'])
to_run << "#{exe} -S "
end

to_run << command

if Refinery::WINDOWS
to_run = %w(cmd /c) | to_run.map{|c| c.gsub(/\//m, '\\')}
Expand Down
15 changes: 15 additions & 0 deletions changelog.md
@@ -1,3 +1,16 @@
## 0.9.9.3 [17 February 2011]

* Fixed faulty require statement that tried to load rack/cache before dragonfly. [Philip Arndt](https://github.com/parndt)

## 0.9.9.2 [17 February 2011]

* Removed ``activesupport`` requirement from ``bin/refinerycms``. [Philip Arndt](https://github.com/parndt)
* Fixed an issue in some browsers with a particular jQuery selector. [Philip Arndt](https://github.com/parndt)
* Modified some existing migrations to behave better when creating new applications. [Philip Arndt](https://github.com/parndt)
* Fixed ``-u`` and ``-p`` support for ``bin/refinerycms``. [Philip Arndt](https://github.com/parndt)

* [See full list](https://github.com/resolve/refinerycms/compare/0.9.9.1...0.9.9.2)

## 0.9.9.1 [15 February 2011]

* Fixed Firefox issue with WYMeditor. [Amanda Wagener](https:/github.com/awagener)
Expand All @@ -9,6 +22,8 @@
* New Vietnamese translation files added. [Alex Nguyen](https://github.com/tiendung) and Stefan N and Mario Nguyen
* Improved JRuby support as well as the way that commands run in any ruby implementation. [Hiro Asari](https://github.com/BanzaiMan)

* [See full list](https://github.com/resolve/refinerycms/compare/0.9.9...0.9.9.1)

## 0.9.9 [27 January 2011]

* Better, more semantic HTML5. [Joe Sak](https://github.com/joemsak)
Expand Down
2 changes: 1 addition & 1 deletion core/app/views/shared/_head.html.erb
Expand Up @@ -8,7 +8,7 @@
logger.warn "This change is necessary so that we can deliver a performant experience for the user."
logger.warn "Called from: #{caller.detect{|c| c =~ %r{#{Rails.root.to_s}}}.inspect.to_s.split(':in').first}\n\n"
end
if (yielded_head_libraries = yield(:head)).present?
if (yielded_head_libraries = yield(:head_libraries)).present?
logger.warn "\n-- DEPRECATION WARNING --"
logger.warn "The use of 'content_for :head_libraries' is DEPRECATED for the frontend layouts."
logger.warn "Please use content_for :before_javascript_libraries or content_for :after_javascript_libraries instead."
Expand Down

0 comments on commit 42a77b6

Please sign in to comment.