Permalink
Browse files

Merge branch '1-0-stable'

Conflicts:
	Gemfile
	Gemfile.lock
	authentication/refinerycms-authentication.gemspec
	base/refinerycms-base.gemspec
	bin/refinerycms
	changelog.md
	core/app/views/refinery/admin/_form_actions.html.erb
	core/app/views/refinery/admin/_search.html.erb
	core/lib/gemspec.rb
	core/lib/refinery/helpers/form_helper.rb
	core/public/javascripts/jquery-ui-custom-min.js
	core/refinerycms-core.gemspec
	dashboard/refinerycms-dashboard.gemspec
	images/app/helpers/admin/images_helper.rb
	images/refinerycms-images.gemspec
	images/spec/models/image_spec.rb
	pages/app/views/refinery/admin/pages_dialogs/link_to.html.erb
	pages/refinerycms-pages.gemspec
	refinerycms.gemspec
	resources/refinerycms-resources.gemspec
	settings/refinerycms-settings.gemspec
	testing/lib/gemspec.rb
	testing/refinerycms-testing.gemspec
  • Loading branch information...
2 parents 317819b + 29f0b9c commit 3efd2f6fcc72462956e9bcb8eb63da27be67467c @parndt parndt committed Aug 17, 2011
View
@@ -89,8 +89,8 @@ end
# Gems used only for assets and not required
# in production environments by default.
group :assets do
- gem 'sass-rails', ">= 3.1.0.rc.6"
- gem 'coffee-rails', ">= 3.1.0.rc.6"
+ gem 'sass-rails'
+ gem 'coffee-rails'
gem 'uglifier'
end
View
@@ -34,7 +34,7 @@ PATH
refinerycms-core (2.0.0)
acts_as_indexed (~> 0.7)
awesome_nested_set (~> 2.0)
- coffee-rails (>= 3.1.0.rc5)
+ coffee-rails (>= 3.1.0.rc.6)
friendly_id_globalize3 (~> 3.2.1)
globalize3 (~> 0.2.0.beta3)
jquery-rails
@@ -43,7 +43,7 @@ PATH
refinerycms-base (= 2.0.0)
refinerycms-generators (= 2.0.0)
refinerycms-settings (= 2.0.0)
- sass-rails (>= 3.1.0.rc5)
+ sass-rails (>= 3.1.0.rc.6)
truncate_html (~> 0.5)
uglifier
refinerycms-dashboard (2.0.0)
@@ -275,7 +275,7 @@ PLATFORMS
DEPENDENCIES
awesome_nested_set!
capybara-webkit
- coffee-rails (>= 3.1.0.rc.6)
+ coffee-rails
growl (~> 1.0.3)
guard-spork
jquery-rails
@@ -287,7 +287,7 @@ DEPENDENCIES
refinerycms!
refinerycms-i18n (~> 2.0.0)!
refinerycms-testing (~> 2.0.0)
- sass-rails (>= 3.1.0.rc.6)
+ sass-rails
simplecov
spork (= 0.9.0.rc9)
sqlite3
@@ -6,7 +6,7 @@ Gem::Specification.new do |s|
s.version = %q{2.0.0}
s.summary = %q{Authentication engine for Refinery CMS}
s.description = %q{The default authentication engine for Refinery CMS}
- s.date = %q{2011-08-14}
+ s.date = %q{2011-08-17}
s.email = %q{info@refinerycms.com}
s.homepage = %q{http://refinerycms.com}
s.rubyforge_project = %q{refinerycms}
@@ -6,7 +6,7 @@ Gem::Specification.new do |s|
s.version = %q{2.0.0}
s.summary = %q{Base engine for Refinery CMS}
s.description = %q{This provides a base for Refinery CMS which handles things like settings on the Refinery namespace.}
- s.date = %q{2011-08-14}
+ s.date = %q{2011-08-17}
s.email = %q{info@refinerycms.com}
s.homepage = %q{http://refinerycms.com}
s.rubyforge_project = %q{refinerycms}
View
@@ -3,7 +3,6 @@
begin
require 'rubygems'
require 'bundler'
- ENV["BUNDLE_GEMFILE"] = File.expand_path('../../Gemfile', __FILE__)
rescue LoadError
puts "\n=== ACTION REQUIRED ===\n\n"
puts "Could not load the bundler gem. This is a required dependency of Refinery CMS."
@@ -13,6 +12,7 @@ end
# Let the application have a constant it can detect installation with.
REFINERYCMS_INSTALLER = true
+RAILS_MINOR_VERSION = '3.0'
# Load refinerycms
require File.expand_path(File.dirname(__FILE__) << "/../lib/refinery")
@@ -32,6 +32,7 @@ module Refinery
:confirm => false,
:database => {
:adapter => 'sqlite3',
+ :host => 'localhost',
:ident => false,
:password => nil,
:username => 'root',
@@ -42,7 +43,10 @@ module Refinery
:gems => [],
:heroku => false,
:testing => false,
- :trace => false
+ :trace => false,
+ :rails => {
+ :version => nil
+ }
}
@optparse = OptionParser.new do |opts|
@@ -81,6 +85,10 @@ module Refinery
@options[:database][:password] = password
end
+ opts.on('-h', '--database-host HOST', String, "Set the database hostname", " (default localhost)") do |host|
+ @options[:database][:host] = host
+ end
+
opts.on('--skip-db', "Skip any database creation or migration tasks") do
@options[:database][:skip] = true
end
@@ -108,6 +116,10 @@ module Refinery
opts.on("--trace", "Investigate any problems with the installer") do
@options[:trace] = true
end
+
+ opts.on('-r', "--rails-version VERSION", String, "Override the version of rails used to generate your application.") do |version|
+ @options[:rails][:version] = version
+ end
opts.on('-t', '--testing', "Automatically set up the project with refinerycms-testing support.") do
@options[:testing] = true
@@ -164,6 +176,15 @@ module Refinery
exit(1)
end
+ rails_version_in_path = run_command('rails --version', {:cd => false, :bundler => false, :puts => false}).to_s.gsub(/(Rails |\n)/, '')
+ @rails_version_to_use = @options[:rails][:version] || rails_version_in_path
+ if @rails_version_to_use !~ %r{\b#{RAILS_MINOR_VERSION}}
+ puts "\nRails #{@rails_version_to_use} is not supported by Refinery #{::Refinery.version}, " \
+ "please use Rails #{RAILS_MINOR_VERSION}.x instead."
+ puts "\n"
+ exit(1)
+ end
+
# Get the name and path of the new application
@app_path = Pathname.new(File.expand_path(@input.first))
@app_name = @app_path.to_s.split(File::SEPARATOR).last
@@ -212,22 +233,20 @@ module Refinery
end
def generate!
- # First, ensure dependencies are satisfied
- run_command('bundle install', {:cd => false, :bundler => false})
-
# Generate a rails application
- rails_command = "rails new \"#{@app_path}\""
+ rails_command = "rails _#{@rails_version_to_use}_ new \"#{@app_path}\""
rails_command << " --database #{@options[:database][:adapter]}"
rails_command << " --force" if @options[:force]
rails_command << " --skip-test-unit"
rails_command << " --skip-bundle" # Rails automatically installs the bundle, but so do we!
rails_command << " -m http://jruby.org" if defined? JRUBY_VERSION
- rails_output = run_command(rails_command, {:cd => false, :bundler => true})
+ rails_output = run_command(rails_command, {:cd => false, :bundler => false})
# Detect non-success or a blank rails output or starting with "Can't initialize" or "Error"
if !$?.success? or rails_output.to_s.length == 0 or rails_output =~ /^(Can't\ initialize|Error)/
- puts "Generating Rails application failed. Exiting..."
+ puts "\nGenerating Rails application failed. Exiting..."
+ puts "\n"
exit(1)
else
if defined? JRUBY_VERSION
@@ -237,7 +256,13 @@ module Refinery
# Remove rails from the Gemfile so that Refinery can manage it
find_and_replace('Gemfile', %r{^gem 'rails'}, "# gem 'rails'")
- # Override username and password
+ # Override database host
+ if @options[:database][:host] != 'localhost' && (adapter = @options[:database][:adapter]) != 'sqlite3'
+ adapter = 'mysql2' if adapter == 'mysql'
+ find_and_replace('config/database.yml', "\n adapter: #{adapter}", "\n adapter: #{adapter}\n host: #{@options[:database][:host]}")
+ end
+
+ # Override database username and password
if @options[:database][:ident]
find_and_replace('config/database.yml', %r{username:}, '#username:')
find_and_replace('config/database.yml', %r{password:}, '#password:')
@@ -249,9 +274,6 @@ module Refinery
puts "\n---------"
puts "Refinery successfully installed in '#{@app_path}'!\n\n"
end
- ensure
- # Now switch to the app's Gemfile.
- ENV["BUNDLE_GEMFILE"] = @app_path.join('Gemfile').to_s
end
def bundle!
View
@@ -1,12 +1,21 @@
-## 1.1.0 [unreleased]
+## 2.0.0 [unreleased]
* Finally removed `Page#[]` in favour of `Page#content_for` so instead of `@page[:body]` it's `@page.content_for(:body)`. [Philip Arndt](https://github.com/parndt)
* Migrated to [Kaminari](https://github.com/amatsuda/kaminari) for pagination. [Uģis Ozols](https://github.com/ugisozols)
* Moved everything under Refinery namespace. [wakeless](https://github.com/wakeless)
* Renamed `RefinerySetting` to `Refinery::Setting`. [Philip Arndt](https://github.com/parndt)
* Added `--trace` option to bin/refinerycms. [Steven Heidel](http://github.com/stevenheidel)
* Moved `/shared/*` to `/refinery/*` instead, including `/shared/admin/*` to `/refinery/admin/*` as it makes more sense. [Philip Arndt](https://github.com/parndt)
-* [See full list](https://github.com/resolve/refinerycms/compare/1.0.0...1.1.0)
+* [See full list](https://github.com/resolve/refinerycms/compare/1.0.4...master)
+
+## 1.0.4 [11 August 2011]
+
+* Added support for figuring out dimensions in resized images to `image_fu`. [Philip Arndt](https://github.com/parndt) and [Joe Sak](https://github.com/joemsak)
+* Fixed issues installing Refinery due to lack of permissions to the gem directories. [Philip Arndt](https://github.com/parndt)
+* Added ability to specify a different database host in the `bin/refinerycms` installer. [Philip Arndt](https://github.com/parndt)
+* Lock `will_paginate` to `3.0.pre2` in core gemspec. [Kris Forbes](https://github.com/krisf) and [Uģis Ozols](https://github.com/ugisozols)
+* Patch required_label helper so it would pick up I18n model attribute translations. [Uģis Ozols](https://github.com/ugisozols)
+* [See full list](https://github.com/resolve/refinerycms/compare/1.0.3...1.0.4)
## 1.0.3 [23 June 2011]
@@ -2,5 +2,6 @@
<input id='search' name='search' size='22' type='search' value='<%= params[:search] %>' />
<% if params[:wymeditor].presence %><input name='wymeditor' value='true' type='hidden'><% end %>
<% if from_dialog? %><input id='dialog' name='dialog' type='hidden' value='true' /><% end %>
+ <% if @callback.presence %><input name='callback' value='<%= @callback %>' type='hidden'><% end %>
<%= submit_tag t('button_text', :scope => 'refinery.admin.search'), :name => nil %>
</form>
View
@@ -31,8 +31,8 @@
s.add_dependency 'rails', '>= 3.1.0.rc6'
s.add_dependency 'truncate_html', '~> 0.5'
s.add_dependency 'kaminari', '~> 0.12'
- s.add_dependency 'sass-rails', '>= 3.1.0.rc5'
- s.add_dependency 'coffee-rails', '>= 3.1.0.rc5'
+ s.add_dependency 'sass-rails', '>= 3.1.0.rc.6'
+ s.add_dependency 'coffee-rails', '>= 3.1.0.rc.6'
s.add_dependency 'uglifier'
s.add_dependency 'jquery-rails'
@@ -25,8 +25,8 @@ Gem::Specification.new do |s|
s.add_dependency 'rails', '>= 3.1.0.rc6'
s.add_dependency 'truncate_html', '~> 0.5'
s.add_dependency 'kaminari', '~> 0.12'
- s.add_dependency 'sass-rails', '>= 3.1.0.rc5'
- s.add_dependency 'coffee-rails', '>= 3.1.0.rc5'
+ s.add_dependency 'sass-rails', '>= 3.1.0.rc.6'
+ s.add_dependency 'coffee-rails', '>= 3.1.0.rc.6'
s.add_dependency 'uglifier'
s.add_dependency 'jquery-rails'
@@ -6,7 +6,7 @@ Gem::Specification.new do |s|
s.version = %q{2.0.0}
s.summary = %q{Dashboard engine for Refinery CMS}
s.description = %q{The dashboard is usually the first engine the user sees in the backend of Refinery CMS. It displays useful information and contains links to common functionality.}
- s.date = %q{2011-08-14}
+ s.date = %q{2011-08-17}
s.email = %q{info@refinerycms.com}
s.homepage = %q{http://refinerycms.com}
s.rubyforge_project = %q{refinerycms}
Oops, something went wrong.

0 comments on commit 3efd2f6

Please sign in to comment.