Skip to content

Commit

Permalink
Stops messing with load paths, fixed inconsistencies and fixed whites…
Browse files Browse the repository at this point in the history
…pace.
  • Loading branch information
parndt committed Aug 30, 2012
1 parent c8a01a4 commit ee52cdd
Show file tree
Hide file tree
Showing 28 changed files with 44 additions and 53 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
:title => t('delete', :scope => 'refinery.admin.users'),
:method => :delete,
:data => {
:confirm => t('message', :scope => 'refinery.admin.delete', :title => user.username)
:confirm => t('message', :scope => 'refinery.admin.delete', :title => user.username)
} if current_refinery_user.can_delete?(user) %>
</span>
</li>
5 changes: 2 additions & 3 deletions authentication/refinerycms-authentication.gemspec
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
# Encoding: UTF-8
$:.push File.expand_path('../../core/lib', __FILE__)
require 'refinery/version'
require File.expand_path('../../core/lib/refinery/version', __FILE__)

version = Refinery::Version.to_s
rails_version = ['>= 3.1.3', '< 3.3']
Expand All @@ -14,7 +13,7 @@ Gem::Specification.new do |s|
s.email = %q{[email protected]}
s.homepage = %q{http://refinerycms.com}
s.rubyforge_project = %q{refinerycms}
s.authors = ['Philip Arndt', 'Uģis Ozols', 'David Jones', 'Steven Heidel']
s.authors = ['Philip Arndt', 'Uģis Ozols', 'Rob Yurkowski']
s.license = %q{MIT}
s.require_paths = %w(lib)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,4 @@
<%= f.label :draft, t('.save_as_draft'),
:class => 'stripped' %>
</span>
</div>
</div>
Original file line number Diff line number Diff line change
Expand Up @@ -30,4 +30,4 @@
:confirm => t('message', :scope => 'refinery.admin.delete', :title => <%= singular_name %>.<%= title_attribute %>),
:method => :delete %>
</span>
</li>
</li>
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Refinery::I18n.frontend_locales.each do |lang|
I18n.locale = lang

if defined?(Refinery::User)
Refinery::User.all.each do |user|
if user.plugins.where(:name => 'refinerycms-<%= namespacing.underscore %>').blank?
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ module Refinery
:title_attribute => "<%= title.name %>", <% end %>
:order => "created_at DESC"
<% if @includes_spam -%>

before_filter :get_spam_count, :only => [:index, :spam]

def index
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,22 +7,22 @@ module Refinery

attr_accessible <%= names_for_attr_accessible.map { |a| ":#{a}" }.join(', ') %>, :position
<% if string_attributes.any? -%>

acts_as_indexed :fields => [<%= string_attributes.map { |a| ":#{a.name}" }.join(", ") %>]
<% end -%>
<% if (text_fields = attributes.map { |a| a.name if a.type == :text }.compact.uniq).any? && text_fields.detect{ |a| a.to_s == 'message' }.nil? -%>

alias_attribute :message, :<%= text_fields.first %>
<% elsif text_fields.empty? -%>

# def message was created automatically because you didn't specify a text field
# when you ran the refinery:form generator. <3 <3 Refinery CMS.
def message
"Override def message in vendor/extensions/<%= namespacing.underscore %>/app/models/refinery/<%= namespacing.underscore %>/<%= singular_name %>.rb"
end
<% end -%>
<% unless (string_fields = attributes.map { |a| a.name if a.type == :string }.compact.uniq).empty? || string_fields.detect { |f| f.to_s == 'name' } -%>

alias_attribute :name, :<%= string_fields.first %>
<% end -%>

Expand Down
2 changes: 1 addition & 1 deletion core/lib/refinery/i18n.rb
Original file line number Diff line number Diff line change
Expand Up @@ -19,4 +19,4 @@ def frontend_locales
end
end
end
end
end
5 changes: 2 additions & 3 deletions core/refinerycms-core.gemspec
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
# Encoding: UTF-8
$:.push File.expand_path('../../core/lib', __FILE__)
require 'refinery/version'
require File.expand_path('../../core/lib/refinery/version', __FILE__)

version = Refinery::Version.to_s
rails_version = ['>= 3.1.3', '< 3.3']
Expand All @@ -14,7 +13,7 @@ Gem::Specification.new do |s|
s.email = %q{[email protected]}
s.homepage = %q{http://refinerycms.com}
s.rubyforge_project = %q{refinerycms}
s.authors = ['Philip Arndt', 'Uģis Ozols', 'David Jones', 'Steven Heidel']
s.authors = ['Philip Arndt', 'Uģis Ozols', 'Rob Yurkowski']
s.license = %q{MIT}
s.require_paths = %w(lib)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,4 +34,4 @@ module Admin
end
end
end
end
end
4 changes: 2 additions & 2 deletions core/spec/lib/refinery/application_controller_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ module Refinery
before do
Rails.application.routes.draw { get "anonymous/index" }
end

after do
Rails.application.reload_routes!
end
Expand Down Expand Up @@ -64,7 +64,7 @@ def index

it "is true so HTTPS is used" do
Refinery::Core.stub(:force_ssl).and_return(true)

get :index

response.should be_redirect
Expand Down
2 changes: 1 addition & 1 deletion core/spec/lib/refinery/crud_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ module Refinery
it "sorts numerically rather than by string key" do
dummy, dummy_params = [], {}

# When we have 11 entries, the 11th index will be #10, which will be
# When we have 11 entries, the 11th index will be #10, which will be
# sorted above #2 if we are sorting by strings.
11.times do |n|
dummy << Refinery::CrudDummy.create!
Expand Down
2 changes: 1 addition & 1 deletion core/spec/requests/refinery/core_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,4 @@ module Core
end
end
end
end
end
7 changes: 3 additions & 4 deletions dashboard/refinerycms-dashboard.gemspec
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
# Encoding: UTF-8
$:.push File.expand_path('../../core/lib', __FILE__)
require 'refinery/version'
require File.expand_path('../../core/lib/refinery/version', __FILE__)

version = Refinery::Version.to_s

Expand All @@ -13,10 +12,10 @@ Gem::Specification.new do |s|
s.email = %q{[email protected]}
s.homepage = %q{http://refinerycms.com}
s.rubyforge_project = %q{refinerycms}
s.authors = ['Philip Arndt', 'Uģis Ozols', 'David Jones', 'Steven Heidel']
s.authors = ['Philip Arndt', 'Uģis Ozols', 'Rob Yurkowski']
s.license = %q{MIT}
s.require_paths = %w(lib)

s.files = `git ls-files`.split("\n")
s.test_files = `git ls-files -- spec/*`.split("\n")

Expand Down
2 changes: 1 addition & 1 deletion images/app/controllers/refinery/admin/images_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ def create
unless params[:insert]
if @images.all?(&:valid?)
flash.notice = t('uploaded_successfully', :scope => 'refinery.admin.images.form')

@dialog_successful = true if from_dialog?

render :nothing => true, :layout => true
Expand Down
2 changes: 1 addition & 1 deletion images/app/views/refinery/admin/images/insert.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@
<script>
$(document).ready(function(){
new ImageDialog({
callback: <%= @callback.present? ? "self.parent.#{h @callback}" : "null" %>,
callback: <%= @callback.present? ? "self.parent.#{h @callback}" : "null" %>,
multiple: <%= @multiple == 'true' %>
}).create();
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,4 @@ def up
def down
add_column :refinery_images, :image_ext, :string
end
end
end
4 changes: 2 additions & 2 deletions images/lib/refinery/images/configuration.rb
Original file line number Diff line number Diff line change
Expand Up @@ -53,11 +53,11 @@ def s3_access_key_id
def s3_secret_access_key
config.s3_secret_access_key.nil? ? Refinery::Core.s3_secret_access_key : config.s3_secret_access_key
end

def s3_region
config.s3_region.nil? ? Refinery::Core.s3_region : config.s3_region
end

end
end
end
5 changes: 2 additions & 3 deletions images/refinerycms-images.gemspec
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
# Encoding: UTF-8
$:.push File.expand_path('../../core/lib', __FILE__)
require 'refinery/version'
require File.expand_path('../../core/lib/refinery/version', __FILE__)

version = Refinery::Version.to_s

Expand All @@ -13,7 +12,7 @@ Gem::Specification.new do |s|
s.email = %q{[email protected]}
s.homepage = %q{http://refinerycms.com}
s.rubyforge_project = %q{refinerycms}
s.authors = ['Philip Arndt', 'Uģis Ozols', 'David Jones', 'Steven Heidel']
s.authors = ['Philip Arndt', 'Uģis Ozols', 'Rob Yurkowski']
s.license = %q{MIT}
s.require_paths = %w(lib)

Expand Down
4 changes: 2 additions & 2 deletions images/spec/factories/image.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
factory :image, :class => ::Refinery::Image do
image Refinery.roots(:'refinery/images').join("spec/fixtures/beach.jpeg")
end

factory :alternate_image, :class => ::Refinery::Image do
image Refinery.roots(:'refinery/images').join("spec/fixtures/beach-alternate.jpeg")
end
end
end
6 changes: 2 additions & 4 deletions pages/refinerycms-pages.gemspec
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
# Encoding: UTF-8
$:.push File.expand_path('../../core/lib', __FILE__)
require 'refinery/version'
require File.expand_path('../../core/lib/refinery/version', __FILE__)

version = Refinery::Version.to_s

Expand All @@ -10,11 +9,10 @@ Gem::Specification.new do |s|
s.version = version
s.summary = %q{Pages extension for Refinery CMS}
s.description = %q{The default content extension of Refinery CMS. This extension handles the administration and display of user-editable pages.}
s.date = %q{2011-10-12}
s.email = %q{[email protected]}
s.homepage = %q{http://refinerycms.com}
s.rubyforge_project = %q{refinerycms}
s.authors = ['Philip Arndt', 'Uģis Ozols', 'David Jones', 'Steven Heidel']
s.authors = ['Philip Arndt', 'Uģis Ozols', 'Rob Yurkowski']
s.license = %q{MIT}
s.require_paths = %w(lib)

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -100,4 +100,4 @@ module Admin
end
end
end
end
end
2 changes: 1 addition & 1 deletion refinerycms.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ Gem::Specification.new do |s|
s.email = %q{[email protected]}
s.homepage = %q{http://refinerycms.com}
s.rubyforge_project = %q{refinerycms}
s.authors = ['Philip Arndt', 'Uģis Ozols', 'David Jones', 'Steven Heidel']
s.authors = ['Philip Arndt', 'Uģis Ozols', 'Rob Yurkowski']
s.license = %q{MIT}
s.bindir = 'bin'
s.executables = %w(refinerycms)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,6 @@ Refinery::Resources.configure do |config|
# config.dragonfly_secret = <%= Refinery::Resources.dragonfly_secret.inspect %>
# config.dragonfly_url_format = <%= Refinery::Resources.dragonfly_url_format.inspect %>
# config.datastore_root_path = <%= Refinery::Resources.datastore_root_path.inspect %>
# config.content_disposition = <%= Refinery::Resources.content_disposition.inspect %>
# config.content_disposition = <%= Refinery::Resources.content_disposition.inspect %>

end
6 changes: 3 additions & 3 deletions resources/lib/refinery/resources/configuration.rb
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ module Resources
self.dragonfly_insert_before = 'ActionDispatch::Callbacks'
self.dragonfly_secret = Refinery::Core.dragonfly_secret
self.dragonfly_url_format = '/system/resources/:job/:basename.:format'

self.content_disposition = :attachment
self.max_file_size = 52428800
self.pages_per_dialog = 12
Expand Down Expand Up @@ -39,11 +39,11 @@ def s3_access_key_id
def s3_secret_access_key
config.s3_secret_access_key.nil? ? Refinery::Core.s3_secret_access_key : config.s3_secret_access_key
end

def s3_region
config.s3_region.nil? ? Refinery::Core.s3_region : config.s3_region
end

end
end
end
6 changes: 2 additions & 4 deletions resources/refinerycms-resources.gemspec
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
# Encoding: UTF-8
$:.push File.expand_path('../../core/lib', __FILE__)
require 'refinery/version'
require File.expand_path('../../core/lib/refinery/version', __FILE__)

version = Refinery::Version.to_s

Expand All @@ -10,11 +9,10 @@ Gem::Specification.new do |s|
s.version = version
s.summary = %q{Resources extension for Refinery CMS}
s.description = %q{Handles all file upload and processing functionality in Refinery CMS.}
s.date = %q{2011-10-12}
s.email = %q{[email protected]}
s.homepage = %q{http://refinerycms.com}
s.rubyforge_project = %q{refinerycms}
s.authors = ['Philip Arndt', 'Uģis Ozols', 'David Jones', 'Steven Heidel']
s.authors = ['Philip Arndt', 'Uģis Ozols', 'Rob Yurkowski']
s.license = %q{MIT}
s.require_paths = %w(lib)

Expand Down
2 changes: 1 addition & 1 deletion resources/spec/requests/refinery/admin/resources_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ module Admin
before do
Refinery::I18n.stub(:current_locale).and_return(:da)
end

it "is shown" do
visit refinery.admin_resources_path

Expand Down
5 changes: 2 additions & 3 deletions testing/refinerycms-testing.gemspec
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
# Encoding: UTF-8
$:.push File.expand_path('../../core/lib', __FILE__)
require 'refinery/version'
require File.expand_path('../../core/lib/refinery/version', __FILE__)

version = Refinery::Version.to_s

Expand All @@ -13,7 +12,7 @@ Gem::Specification.new do |s|
s.email = %q{[email protected]}
s.homepage = %q{http://refinerycms.com}
s.rubyforge_project = %q{refinerycms}
s.authors = ['Philip Arndt', 'Jamie Winsor']
s.authors = ['Philip Arndt', 'Uģis Ozols', 'Rob Yurkowski']
s.license = %q{MIT}
s.require_paths = %w(lib)

Expand Down

0 comments on commit ee52cdd

Please sign in to comment.