Skip to content

Commit

Permalink
renamed the gem to 'cargo_wiki'
Browse files Browse the repository at this point in the history
  • Loading branch information
raw1z committed Feb 1, 2012
1 parent e5e2e1c commit dd9c7d6
Show file tree
Hide file tree
Showing 105 changed files with 104 additions and 163 deletions.
2 changes: 1 addition & 1 deletion README.rdoc
@@ -1,3 +1,3 @@
= Cargo
= CargoWiki

This project rocks and uses MIT-LICENSE.
2 changes: 1 addition & 1 deletion Rakefile
Expand Up @@ -14,7 +14,7 @@ end

RDoc::Task.new(:rdoc) do |rdoc|
rdoc.rdoc_dir = 'rdoc'
rdoc.title = 'Cargo'
rdoc.title = 'CargoWiki'
rdoc.options << '--line-numbers'
rdoc.rdoc_files.include('README.rdoc')
rdoc.rdoc_files.include('lib/**/*.rb')
Expand Down
File renamed without changes.
File renamed without changes
File renamed without changes
File renamed without changes
File renamed without changes
Expand Up @@ -12,5 +12,5 @@
//
//= require jquery
//= require jquery_ujs
//= require cargo/html5-ie
//= require cargo_wiki/html5-ie
//= require_tree .
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Expand Up @@ -9,7 +9,7 @@
* compiled file, but it's generally better to create a new file per style scope.
*
*= require_self
*= require cargo/saxMono-fontfacekit/stylesheet.css
*= require cargo/home
*= require cargo_wiki/saxMono-fontfacekit/stylesheet.css
*= require cargo_wiki/home
*= require_tree .
*/
@@ -1,7 +1,7 @@
@import compass
@import blueprint
@import blueprint/liquid
@import cargo/mixins
@import cargo_wiki/mixins

.article
h1.title
Expand Down
@@ -1,7 +1,7 @@
@import compass
@import blueprint
@import blueprint/liquid
@import cargo/mixins
@import cargo_wiki/mixins

$blueprint-liquid-container-width: 100%
$nav-bg-color: #3b5998
Expand Down
@@ -1,7 +1,7 @@
@import compass
@import blueprint
@import blueprint/liquid
@import cargo/mixins
@import cargo_wiki/mixins

.tags_list
text-align: center
Expand Down
@@ -1,7 +1,7 @@
@import compass
@import blueprint
@import blueprint/liquid
@import cargo/mixins
@import cargo_wiki/mixins

form.user
label
Expand Down
@@ -1,4 +1,4 @@
module Cargo
module CargoWiki
class ApplicationController < ActionController::Base
private

Expand Down
@@ -1,11 +1,11 @@
module Cargo
module CargoWiki
class ArticlesController < ApplicationController
before_filter :require_login, :except => [:index, :show]

def index
if params[:tag_id]
@tag = ActsAsTaggableOn::Tag.find(params[:tag_id])
@articles = Cargo::Article.tagged_with(@tag.name).order('created_at ASC')
@articles = CargoWiki::Article.tagged_with(@tag.name).order('created_at ASC')
else
@articles = Article.scoped
end
Expand Down
@@ -1,4 +1,4 @@
module Cargo
module CargoWiki
class HomeController < ApplicationController
def index
end
Expand Down
@@ -1,4 +1,4 @@
module Cargo
module CargoWiki
class SessionsController < ApplicationController
def new
if signed_in?
Expand Down
@@ -1,4 +1,4 @@
module Cargo
module CargoWiki
class TagsController < ApplicationController
respond_to :html, :json

Expand Down
@@ -1,4 +1,4 @@
module Cargo
module CargoWiki
class UsersController < ApplicationController
before_filter :require_login, :require_admin

Expand Down
@@ -1,4 +1,4 @@
module Cargo
module CargoWiki
class VersionsController < ApplicationController
def index
if params[:article_id]
Expand Down
@@ -1,4 +1,4 @@
module Cargo
module CargoWiki
module ApplicationHelper
end
end
@@ -1,4 +1,4 @@
module Cargo
module CargoWiki
module ArticlesHelper
end
end
@@ -1,4 +1,4 @@
module Cargo
module CargoWiki
module HomeHelper
end
end
@@ -1,4 +1,4 @@
module Cargo
module CargoWiki
module SessionsHelper
end
end
@@ -1,4 +1,4 @@
module Cargo
module CargoWiki
module TagsHelper
include ActsAsTaggableOn::TagsHelper
end
Expand Down
@@ -1,4 +1,4 @@
module Cargo
module CargoWiki
module UsersHelper
end
end
@@ -1,4 +1,4 @@
module Cargo
module CargoWiki
module VersionsHelper
end
end
@@ -1,4 +1,4 @@
module Cargo
module CargoWiki
class Article < ActiveRecord::Base
acts_as_taggable

Expand Down
2 changes: 1 addition & 1 deletion app/models/cargo/user.rb → app/models/cargo_wiki/user.rb
@@ -1,4 +1,4 @@
module Cargo
module CargoWiki
class User < ActiveRecord::Base
ROLES = %w(editor admin)

Expand Down
2 changes: 0 additions & 2 deletions app/views/cargo/home/index.html.haml

This file was deleted.

File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
2 changes: 2 additions & 0 deletions app/views/cargo_wiki/home/index.html.haml
@@ -0,0 +1,2 @@
%h1 Home#index
%p Find me in app/views/cargo_wiki/home/index.html.haml
File renamed without changes.
File renamed without changes.
@@ -1,4 +1,4 @@
= form.input :username
= form.input :role, :collection => Cargo::User::ROLES
= form.input :password
= form.input :password_confirmation
= form.inpuCargoWikissword_confirmation
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Expand Up @@ -2,8 +2,8 @@
%html
%head
%title TP Wiki
= stylesheet_link_tag "cargo/application", :media => "all"
= javascript_include_tag "cargo/application"
= stylesheet_link_tag "cargo_wiki/application", :media => "all"
= javascript_include_tag "cargo_wiki/application"
= csrf_meta_tags

%body(class="#{controller_name}")
Expand All @@ -13,11 +13,11 @@

%nav(role='navigation')
%ul
%li.articles= link_to image_tag('cargo/tags.png') + raw('<br/> Tags'), tags_path
%li.articles= link_to image_tag('cargo/articles.png') + raw('<br/> Articles'), articles_path
%li.history= link_to image_tag('cargo/history.png') + raw('<br/> History'), versions_path
%li.articles= link_to image_tag('cargo_wiki/tags.png') + raw('<br/> Tags'), tags_path
%li.articles= link_to image_tag('cargo_wiki/articles.png') + raw('<br/> Articles'), articles_path
%li.history= link_to image_tag('cargo_wiki/history.png') + raw('<br/> History'), versions_path
- if signed_in? and current_user.admin?
%li.users= link_to image_tag('cargo/accounts.png') + raw('<br/> Accounts'), users_path
%li.users= link_to image_tag('cargo_wiki/accounts.png') + raw('<br/> Accounts'), users_path

#body
%header(role='banner')
Expand Down
8 changes: 4 additions & 4 deletions cargo.gemspec → cargo_wiki.gemspec
@@ -1,15 +1,15 @@
$:.push File.expand_path("../lib", __FILE__)

# Maintain your gem"s version:
require "cargo/version"
require "cargo_wiki/version"

# Describe your gem and declare its dependencies:
Gem::Specification.new do |s|
s.name = "cargo"
s.version = Cargo::VERSION
s.name = "cargo_wiki"
s.version = CargoWiki::VERSION
s.authors = ["Rawane ZOSSOU"]
s.email = ["dev@raw1z.fr"]
s.homepage = "http://github.com/raw1z/cargo"
s.homepage = "http://github.com/raw1z/cargo_wiki"
s.summary = "Wiki engine"
s.description = "Wiki engine based on Rails 3 engine"

Expand Down
2 changes: 1 addition & 1 deletion config/initializers/paper_trail.rb
Expand Up @@ -2,6 +2,6 @@ class Version < ActiveRecord::Base
attr_accessible :commit_message

def created_by
Cargo::User.find(self.whodunnit)
CargoWiki::User.find(self.whodunnit)
end
end
59 changes: 0 additions & 59 deletions config/locales/devise.en.yml

This file was deleted.

2 changes: 1 addition & 1 deletion config/routes.rb
@@ -1,4 +1,4 @@
Cargo::Engine.routes.draw do
CargoWiki::Engine.routes.draw do
resources :tags, :only => :index do
resources :articles
end
Expand Down
10 changes: 0 additions & 10 deletions db/migrate/20120123133445_create_cargo_articles.rb

This file was deleted.

10 changes: 10 additions & 0 deletions db/migrate/20120123133445_create_cargo_wiki_articles.rb
@@ -0,0 +1,10 @@
class CreateCargoWikiArticles < ActiveRecord::Migration
def change
create_table :cargo_wiki_articles do |t|
t.string :title
t.text :body

t.timestamps
end
end
end
@@ -1,6 +1,6 @@
class CreateCargoUsers < ActiveRecord::Migration
class CreateCargoWikiUsers < ActiveRecord::Migration
def change
create_table :cargo_users do |t|
create_table :cargo_wiki_users do |t|
t.string :username
t.string :password_digest

Expand Down
2 changes: 1 addition & 1 deletion db/migrate/20120124104007_add_author_id_to_articles.rb
@@ -1,5 +1,5 @@
class AddAuthorIdToArticles < ActiveRecord::Migration
def change
add_column :cargo_articles, :author_id, :integer
add_column :cargo_wiki_articles, :author_id, :integer
end
end
2 changes: 1 addition & 1 deletion db/migrate/20120124123937_add_auth_token_to_users.rb
@@ -1,6 +1,6 @@
class AddAuthTokenToUsers < ActiveRecord::Migration
def change
add_column :cargo_users, :auth_token, :string
add_column :cargo_wiki_users, :auth_token, :string

end
end
2 changes: 1 addition & 1 deletion db/migrate/20120125072849_add_role_to_users.rb
@@ -1,5 +1,5 @@
class AddRoleToUsers < ActiveRecord::Migration
def change
add_column :cargo_users, :role, :string
add_column :cargo_wiki_users, :role, :string
end
end
@@ -1,9 +1,9 @@
When /^I try to create a new article$/ do
visit "/cargo/articles/new"
visit "/cargo_wiki/articles/new"
end

Then /^I should be redirected to the login page$/ do
current_path.should == "/cargo/login"
current_path.should == "/cargo_wiki/login"
end

Then /^I should see the flash error message "(.*)"$/ do |message|
Expand All @@ -13,5 +13,5 @@
end

When /^I try to edit this article$/ do
visit "/cargo/articles/#{Cargo::Article.last.id}/edit"
visit "/cargo_wiki/articles/#{CargoWiki::Article.last.id}/edit"
end

0 comments on commit dd9c7d6

Please sign in to comment.