Skip to content
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...
1 parent 6ade9bb commit 5ef8e0a30c8d851133a9eda00e4c4e6ba702e93c @ugisozols ugisozols committed Apr 3, 2012
View
56 core/lib/generators/refinery/engine/templates/Gemfile
@@ -4,34 +4,23 @@ gemspec
gem 'refinerycms', :git => 'git://github.com/resolve/refinerycms.git'
-# 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'
@phiggins
phiggins added a note Apr 3, 2012

You probably want 0.9.0. 0.9.0.rc is from 2010.

@ugisozols
Refinery member
ugisozols added a note Apr 3, 2012

:+1:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
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'
@phiggins
phiggins added a note Apr 3, 2012

This is somewhat outdated as well. IIRC 0.10.0 is the latest.

@ugisozols
Refinery member
ugisozols added a note Apr 3, 2012

Yeah, we probably need to revisit all extension Gemfiles and update versions.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
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'
View
2 core/lib/generators/refinery/engine/templates/Guardfile
@@ -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" }
View
2 core/lib/generators/refinery/engine/templates/app/models/refinery/namespace/singular_name.rb
@@ -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
View
2 core/lib/generators/refinery/engine/templates/spec/spec_helper.rb
@@ -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'

0 comments on commit 5ef8e0a

Please sign in to comment.
Something went wrong with that request. Please try again.