Permalink
Browse files

Updated resolve/refinerycms -> refinery/refinerycms

  • Loading branch information...
1 parent c1f3531 commit e7d26963c1c57948eed6b02830e1e57a643ee6bd @parndt parndt committed Sep 5, 2012
View

Large diffs are not rendered by default.

Oops, something went wrong.
@@ -183,7 +183,7 @@ WYMeditor.editor.prototype.close_dialog = function(e, cancelled) {
if ((span = $(this._doc.body).find('span#' + this._current_unique_stamp)).length > 0) {
span.parent().html(span.parent().html().replace(new RegExp(["<span(.+?)", span.attr('id'), "(.+?)<\/span>"].join("")), span.html()));
}
- // https://github.com/resolve/refinerycms/issues/888
+ // https://github.com/refinery/refinerycms/issues/888
if (node = $(this._doc.body).find('#' + this._current_unique_stamp)) {
node.attr("id", (node.attr('_id_before_replaceable') || ""));
node.removeAttr("_id_before_replaceable");
@@ -691,7 +691,7 @@ WYMeditor.editor.prototype.dialog = function( dialogType ) {
end = selection.focusOffset;
}
- // for https://github.com/resolve/refinerycms/issues/581
+ // for https://github.com/refinery/refinerycms/issues/581
if (typeof (start_node.insertData) === 'undefined') {
var j = start_node.childNodes.length - 1,
tmp_start_node = start_node;
@@ -2,7 +2,7 @@ source "http://rubygems.org"
gemspec
-gem 'refinerycms', :git => 'git://github.com/resolve/refinerycms.git'
+gem 'refinerycms', :git => 'git://github.com/refinery/refinerycms.git'
# Database Configuration
platforms :jruby do
@@ -19,7 +19,7 @@ platforms :ruby do
end
group :development, :test do
- gem 'refinerycms-testing', :git => 'git://github.com/resolve/refinerycms.git'
+ gem 'refinerycms-testing', :git => 'git://github.com/refinery/refinerycms.git'
gem 'guard-rspec', '~> 0.7.0'
platforms :mswin, :mingw do
@@ -268,7 +268,7 @@ def update_positions
params[:ul].each do |_, list|
# After we drop Ruby 1.8.x support the following line can be changed back to
# list.each do |index, hash|
- # because there won't be an ordering issue (see https://github.com/resolve/refinerycms/issues/1585)
+ # because there won't be an ordering issue (see https://github.com/refinery/refinerycms/issues/1585)
list.sort_by {|k, v| k.to_i}.map { |item| item[1] }.each_with_index do |hash, index|
moved_item_id = hash['id'].split(/#{singular_name}\_?/).reject(&:empty?).first
@current_#{singular_name} = #{class_name}.find_by_id(moved_item_id)
@@ -97,7 +97,7 @@ module Refinery
dummy.rgt.should eq(10)
end
- # Regression test for https://github.com/resolve/refinerycms/issues/1585
+ # Regression test for https://github.com/refinery/refinerycms/issues/1585
it "sorts numerically rather than by string key" do
dummy, dummy_params = [], {}
@@ -45,7 +45,7 @@
3.times { |n| page.should have_content("Refinery cms #{n} page was added") }
end
- # see https://github.com/resolve/refinerycms/issues/1673
+ # see https://github.com/refinery/refinerycms/issues/1673
it "uses proper link for nested pages" do
# we need to increase updated_at because dashboard entries are sorted by
# updated_at column and we need this page to be at the top of the list
@@ -75,7 +75,7 @@ h4. Installing Refinery
There are two popular ways to install Refinery: RubyGems and Rails Application Templates. We will discuss both and how you can get up and running with either.
-h5. RubyGems
+h5. RubyGems
The easiest way to install Refinery is to take advantage of RubyGems.
<shell>
@@ -149,7 +149,7 @@ Once you've created your first user you'll see Refinery's "Dashboard".
h4. Setting Your Site Name
-You'll need to set your Site Name; it's used in several spots on the CMS to give you nice branding (for instance, in the blue header at the top of the page and in the footer of your site).
+You'll need to set your Site Name; it's used in several spots on the CMS to give you nice branding (for instance, in the blue header at the top of the page and in the footer of your site).
To do this, you'll have to edit +config/initializers/refinery/core.rb+. Look for the line that begins:
@@ -195,7 +195,7 @@ If you request +http://localhost:3000/about+, this maps by default to Refinery's
So as you would expect according to Rails convention, the view for this action is located in +app/views/refinery/pages/show.html.erb+. You won't be able to see this file because Refinery is providing it for you. Next, let's override that view and replace it with our own.
-TIP: Overriding a file simply copies the file from Refinery's code into your +app/+ folder. Many people are confused as to what can be overridden initially. Any controller, model, view, javascript, or stylesheet from any installed extension can be overridden, but the most commonly overridden ones are those in the "refinery":https://github.com/resolve/refinerycms/tree/master/core/app/views/refinery folder.
+TIP: Overriding a file simply copies the file from Refinery's code into your +app/+ folder. Many people are confused as to what can be overridden initially. Any controller, model, view, javascript, or stylesheet from any installed extension can be overridden, but the most commonly overridden ones are those in the "refinery":https://github.com/refinery/refinerycms/tree/master/core/app/views/refinery folder.
h4. Overriding your first view
@@ -32,5 +32,5 @@ h3. Core Team
h3. Other places
* API (click 'File List' in top right) - <a href="http://api.refinerycms.org" title="http://api.refinerycms.org">http://api.refinerycms.org</a>
-* "GitHub Wiki":https://github.com/resolve/refinerycms/wiki
+* "GitHub Wiki":https://github.com/refinery/refinerycms/wiki
* "Guides":http://refinerycms.com/guides
@@ -106,4 +106,4 @@ h3. Pull request
h3. Done
-And now you're done! If your changes are accepted, you will end up on the "contributor list":http://github.com/resolve/refinerycms/contributors.
+And now you're done! If your changes are accepted, you will end up on the "contributor list":http://github.com/refinery/refinerycms/contributors.
@@ -6,7 +6,7 @@ By default pages don't allow you to make galleries of images. This guide will sh
endprologue.
-WARNING: This guide is for Rails 2 implementations of Refinery. If you're using Rails 3 use the "refinerycms-page-images":https://github.com/resolve/refinerycms-page-images extension instead.
+WARNING: This guide is for Rails 2 implementations of Refinery. If you're using Rails 3 use the "refinerycms-page-images":https://github.com/refinery/refinerycms-page-images extension instead.
h3. Introduction
@@ -17,7 +17,7 @@ h3. Create association between page and portfolio entry
Let say we want every page has exactly one gallery. So for achieve that we are going to add association in page model. Add following code in +/app/models/page.rb+
<erb>
-belongs_to :gallery, :class_name => "PortfolioEntry",
+belongs_to :gallery, :class_name => "PortfolioEntry",
:foreign_key => :portfolio_entry_id
</erb>
@@ -42,13 +42,13 @@ First we want to select gallery from list of options (add a few entries in portf
<erb>
<div class="field images_field">
<%= f.label 'Select Gallery' %>
- <%= f.select (:portfolio_entry_id,
- PortfolioEntry.all.collect { |p| [p.title, p.id.to_s] }, {
- :prompt => 'Select gallery',
- :selected => @page.portfolio_entry_id.to_s },
+ <%= f.select (:portfolio_entry_id,
+ PortfolioEntry.all.collect { |p| [p.title, p.id.to_s] }, {
+ :prompt => 'Select gallery',
+ :selected => @page.portfolio_entry_id.to_s },
:class => 'select_gallery' ) %>
- <%= render :partial => 'gallery',
+ <%= render :partial => 'gallery',
:locals => { :f => f, :gallery => @page.gallery } %>
</div>
</erb>
@@ -99,7 +99,7 @@ init_gallery = function () {
$('.select_gallery').change(function(e) {
$('#portfolio_images').remove();
- gallery_placeholder.empty().html('<img
+ gallery_placeholder.empty().html('<img
src="/images/refinery/ajax-loader.gif" style="padding:10px 0;">');
$.ajax({
@@ -145,7 +145,7 @@ But this would not work until we added below route in +/config/routes.rb+
<ruby>
map.namespace(:admin, :path_prefix => 'refinery') do |admin|
- admin.load_gallery "/load_gallery", :controller => "pages",
+ admin.load_gallery "/load_gallery", :controller => "pages",
:action => "load_gallery"
end
</ruby>
@@ -105,7 +105,7 @@ end
</ruby>
You can also entirely override the +show+ method inside this decorator, too, if
-need be. You can "view the existing method here":https://github.com/resolve/refinerycms/blob/master/pages/app/controllers/refinery/pages_controller.rb#L23-39
+need be. You can "view the existing method here":https://github.com/refinery/refinerycms/blob/master/pages/app/controllers/refinery/pages_controller.rb#L23-39
for reference.
This method has the advantage of constraining the find to occur only on pages
@@ -194,16 +194,16 @@ Now that we have a baseline example working ExistingApp using Devise, it's time
...
gem 'devise' #temporarily commented out,'~> 1.4.0'
- gem 'refinerycms-core', :git => 'git://github.com/resolve/refinerycms.git'
- gem 'refinerycms-dashboard', :git => 'git://github.com/resolve/refinerycms.git'
- gem 'refinerycms-images', :git => 'git://github.com/resolve/refinerycms.git'
- gem 'refinerycms-pages', :git => 'git://github.com/resolve/refinerycms.git'
- gem 'refinerycms-resources', :git => 'git://github.com/resolve/refinerycms.git'
- gem 'refinerycms-settings', :git => 'git://github.com/resolve/refinerycms.git'
- gem 'refinerycms-generators', :git => 'git://github.com/resolve/refinerycms-generators.git'
+ git 'git://github.com/refinery/refinerycms.git' do
+ gem 'refinerycms-core'
+ gem 'refinerycms-dashboard'
+ gem 'refinerycms-images'
+ gem 'refinerycms-pages'
+ gem 'refinerycms-resources'
+ end
group :development, :test do
- gem 'refinerycms-testing', :git => 'git://github.com/resolve/refinerycms.git'
+ gem 'refinerycms-testing', :git => 'git://github.com/refinery/refinerycms.git'
end
...
</ruby>
@@ -217,30 +217,30 @@ Now we have to undo some of what the refinery generator did, to keep control of
<shell>
$ mv app/views/layouts/application.html.erb.backup app/views/layouts/application.html.erb
TODO don't really know how you handle the asset pipeline, but obviously the following lines don't have anymore sense
-$ mkdir public/stylesheets/hide
+$ mkdir public/stylesheets/hide
$ mv public/stylesheets/*.css public/stylesheets/hide/.
$ mv public/stylesheets/hide/front_end_styles.css public/stylesheets/.
</shell>
Now we need to setup up:
-* a Role model
+* a Role model
* an additional model to get our many to many association working: RolesUsers
* a model used to list all Refinery plugins belonging to someone: UserPlugin
These are created by default when you add the refinerycms-authentication gem so we won't reinvent the wheel and use the existing code taken from github. Be aware that your existing models could do the trick (except for UserPlugin), as long as you implement some methods but we'll see that later.
WARNING. Beware of raw code: models are usually namespaced. Ex: replace ::Refinery::Role with ::Role or simply Role
-With inspiration from https://github.com/resolve/refinerycms/blob/master/authentication/db/migrate/, refinery_cms_authentication_schema:
+With inspiration from https://github.com/refinery/refinerycms/blob/master/authentication/db/migrate/, refinery_cms_authentication_schema:
<shell>
$ rails g model RolesUsers user_id:integer role_id:integer # add the index directly within the migration file
$ rails g model Role title:string
$ rails g model UserPlugin user_id:integer name:string position:integer
</shell>
-Now we have to fill in our models. Once again, we won't reinvent the wheel so we'll pick the code from here: https://github.com/resolve/refinerycms/blob/master/authentication/app/models/refinery/
+Now we have to fill in our models. Once again, we won't reinvent the wheel so we'll pick the code from here: https://github.com/refinery/refinerycms/blob/master/authentication/app/models/refinery/
+app/model/role.rb+
<ruby>
@@ -311,7 +311,7 @@ class User < Refinery::Core::BaseModel
raise ArgumentException, "Role should be the title of the role not a role object." if title.is_a?(::Role)
roles.any?{|r| r.title == title.to_s.camelize}
end
-
+
def can_delete?(user_to_delete = self)
user_to_delete.persisted? and
id != user_to_delete.id and
@@ -349,12 +349,12 @@ module ExistingApp
require 'refinery_patch'
require 'restrict_refinery_to_refinery_users'
end
-
- config.to_prepare do
+
+ config.to_prepare do
[::Refinery::ApplicationController, Refinery::Helpers].each do |c|
c.send :include, ::RefineryPatch
end
-
+
::Refinery::AdminController.send :include, ::RestrictRefineryToRefineryUsers
::Refinery::AdminController.send :before_filter, :restrict_refinery_to_refinery_users
end
@@ -389,7 +389,7 @@ class ApplicationController < ActionController::Base
end
</ruby>
-Ok. We should be ready to give it a spin.
+Ok. We should be ready to give it a spin.
If you try to access http://localhost:3000/, you should get first an error "undefined method 'refinery_user?'". Just reload the page, it should now be fine.
@@ -15,7 +15,7 @@ h3. Clone Refinery
First clone the git source in order to get the newest app generator.
<shell>
-$ git clone git://github.com/resolve/refinerycms.git ~/refinerycms-edge
+$ git clone git://github.com/refinery/refinerycms.git ~/refinerycms-edge
</shell>
h3. Upgrade your current application
@@ -23,7 +23,7 @@ h4. Setup
h5. In your browser
* Login to "http://github.com":http://github.com
-* Go to "http://github.com/resolve/refinerycms":http://github.com/resolve/refinerycms
+* Go to "http://github.com/refinery/refinerycms":http://github.com/refinery/refinerycms
* If you have a fork of refinerycms already, delete it (_if you're not going to lose work. This makes it much easier for us to integrate your changes back in_)
* Click on "fork" to make a fresh new fork on your own account.
@@ -43,7 +43,7 @@ h5. In your browser
h4. I found an issue. Where do I file it?
-* add it to "http://github.com/resolve/refinerycms/issues":http://github.com/resolve/refinerycms/issues - with as much detail as possible :-)
+* add it to "http://github.com/refinery/refinerycms/issues":http://github.com/refinery/refinerycms/issues - with as much detail as possible :-)
h4. Contributing a fix
@@ -68,18 +68,18 @@ TIP: if you've filed an issue on Github add "Closes GH-999" (replace 999 with yo
$ git push origin master
</shell>
-Now go to "http://github.com/resolve/refinerycms":http://github.com/resolve/refinerycms and click "Pull Request". Type a nice message explaining what you've done and send the request.
+Now go to "http://github.com/refinery/refinerycms":http://github.com/refinery/refinerycms and click "Pull Request". Type a nice message explaining what you've done and send the request.
We'll merge it in if it's all good.
h4. Confused on where to find everything?
-Take a look at this "page":https://github.com/resolve/refinerycms/wiki/Begin-Developing which briefly explains the source.
+Take a look at this "page":https://github.com/refinery/refinerycms/wiki/Begin-Developing which briefly explains the source.
h3. Contributing financially
-Some of the effort that goes into Refinery CMS is covered by client work where requirements aren't met by the current implementation and so extensions are required. Most of the effort, however, is done on a free basis by the core team and many contributors worldwide.
+Some of the effort that goes into Refinery CMS is covered by client work where requirements aren't met by the current implementation and so extensions are required. Most of the effort, however, is done on a free basis by the core team and many contributors worldwide.
-If you would like to contribute to Refinery CMS development by helping us to justify spending more time on it then you can "donate to the project at pledgie.":http://pledgie.com/campaigns/8431
+If you would like to contribute to Refinery CMS development by helping us to justify spending more time on it then you can "donate to the project at pledgie.":http://pledgie.com/campaigns/8431
All donations are very much appreciated and 100% of proceeds go toward making Refinery CMS even better.
@@ -11,28 +11,28 @@ h3. Format the guide
The best way for you to learn how to create a guide is to look at how a guide is structured. We are currently using the docrails project and as such all of the guides are written in textile.
-A good example of how a guide can be structured is the 'Getting Started With Refinery' guide which you can "see here":https://github.com/resolve/refinerycms/raw/master/doc/guides/1%20-%20Getting%20Started/1%20-%20Getting%20Started.textile.
+A good example of how a guide can be structured is the 'Getting Started With Refinery' guide which you can "see here":https://github.com/refinery/refinerycms/raw/master/doc/guides/1%20-%20Getting%20Started/1%20-%20Getting%20Started.textile.
You should be able to match the sections of the raw textile guide with the "live guide":/guides/getting-started/ to see how each aspect works.
h3. Submitting the guide
* Login to "http://github.com":http://github.com
-* Go to "http://github.com/resolve/refinerycms":http://github.com/resolve/refinerycms
+* Go to "http://github.com/refinery/refinerycms":http://github.com/refinery/refinerycms
* If you have a fork of refinerycms already, delete it (_if you're not going to lose work. This makes it much easier for us to integrate your changes back in_)
* Click on "fork" to make a fresh new fork on your own account.
Next make your changes or new guide in the 'doc/guides' folder.
-Now to go "http://github.com/resolve/refinerycms":http://github.com/resolve/refinerycms and click "Pull Request".
+Now to go "http://github.com/refinery/refinerycms":http://github.com/refinery/refinerycms and click "Pull Request".
After we review it, we'll merge it into the master refinerycms repository, and the changes will be up on http://refinerycms.com/guides within a few seconds.
h3. Why submit a guide?
The majority of Refinery CMS remains undocumented as development happens quickly. We'd appreciate it very much if you submitted a new guide or updated old ones. Here are some reasons for doing so:
-* You will be listed as a contributor at "github":https://github.com/resolve/refinerycms/contributors
+* You will be listed as a contributor at "github":https://github.com/refinery/refinerycms/contributors
* All contributors receive special status in the "IRC Channel":irc://irc.freenode.net/refinerycms
* Help others who face the same issues
* Reduce the amount of time the core team spends on support so they can focus on making Refinery even better
@@ -38,7 +38,7 @@ module Pages
@content.hide_sections 'bar'
end
- # Regression for https://github.com/resolve/refinerycms/issues/1516
+ # Regression for https://github.com/refinery/refinerycms/issues/1516
it "accepts an array" do
section2.should_receive :hide
@content.hide_sections ['bar']
@@ -649,7 +649,7 @@ module Admin
end
end
- # see https://github.com/resolve/refinerycms/pull/1583
+ # see https://github.com/refinery/refinerycms/pull/1583
context "when switching locales" do
specify "dialog has correct links", :js do
visit refinery.edit_admin_page_path(about_page)
Oops, something went wrong.

0 comments on commit e7d2696

Please sign in to comment.