Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Multi-kill! #1552, #1553, #1554.

* Update generated engine Gemfile
* Remove --format Fuubar from Guardfile
* Fix failing specs for newly generated engine
  • Loading branch information...
commit 7db31eb56339d7d1b6ad7090a03701287923c80f 1 parent 2a2d846
Uģis Ozols ugisozols authored
56 core/lib/generators/refinery/engine/templates/Gemfile
View
@@ -4,34 +4,23 @@ gemspec
gem 'refinerycms', '~> 2.0.0'
-# Refinery/rails should pull in the proper versions of these
-group :assets do
- gem 'sass-rails'
- gem 'coffee-rails'
- gem 'uglifier'
+# Database Configuration
+platforms :jruby do
+ gem 'activerecord-jdbcsqlite3-adapter'
+ gem 'activerecord-jdbcmysql-adapter'
+ gem 'activerecord-jdbcpostgresql-adapter'
+ gem 'jruby-openssl'
end
-gem 'jquery-rails'
+platforms :ruby do
+ gem 'sqlite3'
+ gem 'mysql2'
+ gem 'pg'
+end
group :development, :test do
- gem 'refinerycms-testing', '~> 2.0.0'
- gem 'factory_girl_rails'
- gem 'generator_spec'
-
- require 'rbconfig'
-
- platforms :jruby do
- gem 'activerecord-jdbcsqlite3-adapter'
- gem 'activerecord-jdbcmysql-adapter'
- gem 'activerecord-jdbcpostgresql-adapter'
- gem 'jruby-openssl'
- end
-
- unless defined?(JRUBY_VERSION)
- gem 'sqlite3'
- gem 'mysql2'
- gem 'pg'
- end
+ gem 'refinerycms-testing', :git => 'git://github.com/resolve/refinerycms.git'
+ gem 'guard-rspec', '~> 0.6.0'
platforms :mswin, :mingw do
gem 'win32console'
@@ -40,25 +29,28 @@ group :development, :test do
end
platforms :ruby do
- gem 'spork', '0.9.0.rc9'
+ gem 'spork', '~> 0.9.0.rc'
gem 'guard-spork'
unless ENV['TRAVIS']
+ require 'rbconfig'
if RbConfig::CONFIG['target_os'] =~ /darwin/i
gem 'rb-fsevent', '>= 0.3.9'
- gem 'growl', '~> 1.0.3'
+ gem 'ruby_gntp'
end
if RbConfig::CONFIG['target_os'] =~ /linux/i
gem 'rb-inotify', '>= 0.5.1'
gem 'libnotify', '~> 0.1.3'
+ gem 'therubyracer', '~> 0.9.9'
end
end
end
platforms :jruby do
unless ENV['TRAVIS']
+ require 'rbconfig'
if RbConfig::CONFIG['target_os'] =~ /darwin/i
- gem 'growl', '~> 1.0.3'
+ gem 'ruby_gntp'
end
if RbConfig::CONFIG['target_os'] =~ /linux/i
gem 'rb-inotify', '>= 0.5.1'
@@ -67,3 +59,13 @@ group :development, :test do
end
end
end
+
+# Gems used only for assets and not required
+# in production environments by default.
+group :assets do
+ gem 'sass-rails'
+ gem 'coffee-rails'
+ gem 'uglifier'
+end
+
+gem 'jquery-rails', '~> 2.0.0'
2  core/lib/generators/refinery/engine/templates/Guardfile
View
@@ -8,7 +8,7 @@ guard 'spork', :wait => 60, :cucumber => false, :rspec_env => { 'RAILS_ENV' => '
watch(%r{^vendor/extensions/(.+)/spec/support/.+\.rb$})
end
-guard 'rspec', :version => 2, :cli => "--color --drb --format Fuubar", :all_on_start => false, :all_after_pass => false do
+guard 'rspec', :version => 2, :cli => "--color --drb", :all_on_start => false, :all_after_pass => false do
watch(%r{^spec/.+_spec\.rb$})
watch(%r{^lib/(.+)\.rb$}) { |m| "spec/lib/#{m[1]}_spec.rb" }
watch('spec/spec_helper.rb') { "spec" }
2  core/lib/generators/refinery/engine/templates/app/models/refinery/namespace/singular_name.rb
View
@@ -5,6 +5,8 @@ class <%= class_name %> < Refinery::Core::BaseModel
<% if localized? %>
translates <%= localized_attributes.map{|a| ":#{a.name}"}.join(', ') %><% end %>
<% if (string_attributes = attributes.select{ |a| a.type.to_s =~ /string|text/ }.uniq).any? %>
+ attr_accessible <%= string_attributes.first.name.to_sym.inspect %>, :position
+
acts_as_indexed :fields => <%= string_attributes.map{|s| s.name.to_sym}.inspect %>
validates <%= string_attributes.first.name.to_sym.inspect %>, :presence => true, :uniqueness => true
2  core/lib/generators/refinery/engine/templates/spec/spec_helper.rb
View
@@ -2,7 +2,7 @@ def setup_environment
# Configure Rails Environment
ENV["RAILS_ENV"] ||= 'test'
- require File.expand_path("../dummy/config/environment", __FILE__)
+ require File.expand_path('../../../../../config/environment', __FILE__)
require 'rspec/rails'
require 'capybara/rspec'
Please sign in to comment.
Something went wrong with that request. Please try again.