Browse files

renamed the gem to 'cargo_wiki'

  • Loading branch information...
1 parent e5e2e1c commit dd9c7d6d33a62647fdd13469662a2dccc561c740 @raw1z committed Feb 1, 2012
Showing with 104 additions and 163 deletions.
  1. +1 −1 README.rdoc
  2. +1 −1 Rakefile
  3. 0 app/assets/images/{cargo → cargo_wiki}/.gitkeep
  4. 0 app/assets/images/{cargo → cargo_wiki}/accounts.png
  5. 0 app/assets/images/{cargo → cargo_wiki}/articles.png
  6. 0 app/assets/images/{cargo → cargo_wiki}/history.png
  7. 0 app/assets/images/{cargo → cargo_wiki}/tags.png
  8. +1 −1 app/assets/javascripts/{cargo → cargo_wiki}/application.js
  9. 0 app/assets/javascripts/{cargo → cargo_wiki}/articles.js.coffee
  10. 0 app/assets/javascripts/{cargo → cargo_wiki}/home.js.coffee
  11. 0 app/assets/javascripts/{cargo → cargo_wiki}/html5-ie.js
  12. 0 app/assets/javascripts/{cargo → cargo_wiki}/sessions.js.coffee
  13. 0 app/assets/javascripts/{cargo → cargo_wiki}/tags.js.coffee
  14. 0 app/assets/javascripts/{cargo → cargo_wiki}/users.js.coffee
  15. 0 app/assets/javascripts/{cargo → cargo_wiki}/versions.js.coffee
  16. 0 app/assets/stylesheets/{cargo → cargo_wiki}/_mixins.sass
  17. +2 −2 app/assets/stylesheets/{cargo → cargo_wiki}/application.css
  18. +1 −1 app/assets/stylesheets/{cargo → cargo_wiki}/articles.css.sass
  19. +1 −1 app/assets/stylesheets/{cargo → cargo_wiki}/home.css.sass
  20. 0 app/assets/stylesheets/{cargo → cargo_wiki}/saxMono-fontfacekit/demo.html
  21. 0 app/assets/stylesheets/{cargo → cargo_wiki}/saxMono-fontfacekit/s.a.x. Software License.txt
  22. 0 app/assets/stylesheets/{cargo → cargo_wiki}/saxMono-fontfacekit/saxmono-webfont.eot
  23. 0 app/assets/stylesheets/{cargo → cargo_wiki}/saxMono-fontfacekit/saxmono-webfont.svg
  24. 0 app/assets/stylesheets/{cargo → cargo_wiki}/saxMono-fontfacekit/saxmono-webfont.ttf
  25. 0 app/assets/stylesheets/{cargo → cargo_wiki}/saxMono-fontfacekit/saxmono-webfont.woff
  26. 0 app/assets/stylesheets/{cargo → cargo_wiki}/saxMono-fontfacekit/stylesheet.css
  27. 0 app/assets/stylesheets/{cargo → cargo_wiki}/sessions.css.sass
  28. +1 −1 app/assets/stylesheets/{cargo → cargo_wiki}/tags.css.sass
  29. +1 −1 app/assets/stylesheets/{cargo → cargo_wiki}/users.css.sass
  30. 0 app/assets/stylesheets/{cargo → cargo_wiki}/versions.css.sass
  31. +1 −1 app/controllers/{cargo → cargo_wiki}/application_controller.rb
  32. +2 −2 app/controllers/{cargo → cargo_wiki}/articles_controller.rb
  33. +1 −1 app/controllers/{cargo → cargo_wiki}/home_controller.rb
  34. +1 −1 app/controllers/{cargo → cargo_wiki}/sessions_controller.rb
  35. +1 −1 app/controllers/{cargo → cargo_wiki}/tags_controller.rb
  36. +1 −1 app/controllers/{cargo → cargo_wiki}/users_controller.rb
  37. +1 −1 app/controllers/{cargo → cargo_wiki}/versions_controller.rb
  38. +1 −1 app/helpers/{cargo → cargo_wiki}/application_helper.rb
  39. +1 −1 app/helpers/{cargo → cargo_wiki}/articles_helper.rb
  40. +1 −1 app/helpers/{cargo → cargo_wiki}/home_helper.rb
  41. +1 −1 app/helpers/{cargo → cargo_wiki}/sessions_helper.rb
  42. +1 −1 app/helpers/{cargo → cargo_wiki}/tags_helper.rb
  43. +1 −1 app/helpers/{cargo → cargo_wiki}/users_helper.rb
  44. +1 −1 app/helpers/{cargo → cargo_wiki}/versions_helper.rb
  45. +1 −1 app/models/{cargo → cargo_wiki}/article.rb
  46. +1 −1 app/models/{cargo → cargo_wiki}/user.rb
  47. +0 −2 app/views/cargo/home/index.html.haml
  48. 0 app/views/{cargo → cargo_wiki}/articles/_form.html.haml
  49. 0 app/views/{cargo → cargo_wiki}/articles/edit.html.haml
  50. 0 app/views/{cargo → cargo_wiki}/articles/index.html.haml
  51. 0 app/views/{cargo → cargo_wiki}/articles/new.html.haml
  52. 0 app/views/{cargo → cargo_wiki}/articles/show.html.haml
  53. +2 −0 app/views/cargo_wiki/home/index.html.haml
  54. 0 app/views/{cargo → cargo_wiki}/sessions/new.html.haml
  55. 0 app/views/{cargo → cargo_wiki}/tags/index.html.haml
  56. +1 −1 app/views/{cargo → cargo_wiki}/users/_form.html.haml
  57. 0 app/views/{cargo → cargo_wiki}/users/_user.html.haml
  58. 0 app/views/{cargo → cargo_wiki}/users/edit.html.haml
  59. 0 app/views/{cargo → cargo_wiki}/users/index.html.haml
  60. 0 app/views/{cargo → cargo_wiki}/users/new.html.haml
  61. 0 app/views/{cargo → cargo_wiki}/versions/index.html.haml
  62. +6 −6 app/views/layouts/{cargo → cargo_wiki}/application.html.haml
  63. +4 −4 cargo.gemspec → cargo_wiki.gemspec
  64. +1 −1 config/initializers/paper_trail.rb
  65. +0 −59 config/locales/devise.en.yml
  66. +1 −1 config/routes.rb
  67. +0 −10 db/migrate/20120123133445_create_cargo_articles.rb
  68. +10 −0 db/migrate/20120123133445_create_cargo_wiki_articles.rb
  69. +2 −2 db/migrate/{20120123162205_create_cargo_users.rb → 20120123162205_create_cargo_wiki_users.rb}
  70. +1 −1 db/migrate/20120124104007_add_author_id_to_articles.rb
  71. +1 −1 db/migrate/20120124123937_add_auth_token_to_users.rb
  72. +1 −1 db/migrate/20120125072849_add_role_to_users.rb
  73. +3 −3 features/step_definitions/article_actions_permissions_steps.rb
  74. +7 −7 features/step_definitions/articles_index_steps.rb
  75. +3 −3 features/step_definitions/create_article_steps.rb
  76. +4 −4 features/step_definitions/destroy_article_steps.rb
  77. +3 −3 features/step_definitions/edit_article_steps.rb
  78. +6 −6 features/step_definitions/history_steps.rb
  79. +2 −2 features/step_definitions/show_article_steps.rb
  80. +5 −5 features/support/hooks.rb
  81. +0 −4 lib/cargo.rb
  82. +4 −0 lib/cargo_wiki.rb
  83. +2 −2 lib/{cargo → cargo_wiki}/engine.rb
  84. +1 −1 lib/{cargo → cargo_wiki}/version.rb
  85. +1 −1 lib/tasks/{cargo_tasks.rake → cargo_wiki_tasks.rake}
  86. +1 −1 script/rails
  87. 0 spec/controllers/{cargo → cargo_wiki}/articles_controller_spec.rb
  88. 0 spec/controllers/{cargo → cargo_wiki}/home_controller_spec.rb
  89. 0 spec/controllers/{cargo → cargo_wiki}/sessions_controller_spec.rb
  90. 0 spec/controllers/{cargo → cargo_wiki}/tags_controller_spec.rb
  91. 0 spec/controllers/{cargo → cargo_wiki}/users_controller_spec.rb
  92. 0 spec/controllers/{cargo → cargo_wiki}/versions_controller_spec.rb
  93. +1 −1 spec/dummy/config/application.rb
  94. +1 −1 spec/dummy/config/routes.rb
  95. +2 −2 spec/dummy/db/schema.rb
  96. +1 −1 spec/factories/{cargo_articles.rb → cargo_wiki_articles.rb}
  97. +1 −1 spec/factories/{cargo_users.rb → cargo_wiki_users.rb}
  98. 0 spec/helpers/{cargo → cargo_wiki}/articles_helper_spec.rb
  99. 0 spec/helpers/{cargo → cargo_wiki}/home_helper_spec.rb
  100. 0 spec/helpers/{cargo → cargo_wiki}/sessions_helper_spec.rb
  101. 0 spec/helpers/{cargo → cargo_wiki}/tags_helper_spec.rb
  102. 0 spec/helpers/{cargo → cargo_wiki}/users_helper_spec.rb
  103. 0 spec/helpers/{cargo → cargo_wiki}/versions_helper_spec.rb
  104. 0 spec/models/{cargo → cargo_wiki}/article_spec.rb
  105. 0 spec/models/{cargo → cargo_wiki}/user_spec.rb
View
2 README.rdoc
@@ -1,3 +1,3 @@
-= Cargo
+= CargoWiki
This project rocks and uses MIT-LICENSE.
View
2 Rakefile
@@ -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')
View
0 app/assets/images/cargo/.gitkeep → app/assets/images/cargo_wiki/.gitkeep
File renamed without changes.
View
0 app/assets/images/cargo/accounts.png → app/assets/images/cargo_wiki/accounts.png
File renamed without changes
View
0 app/assets/images/cargo/articles.png → app/assets/images/cargo_wiki/articles.png
File renamed without changes
View
0 app/assets/images/cargo/history.png → app/assets/images/cargo_wiki/history.png
File renamed without changes
View
0 app/assets/images/cargo/tags.png → app/assets/images/cargo_wiki/tags.png
File renamed without changes
View
2 app/assets/javascripts/cargo/application.js → ...ets/javascripts/cargo_wiki/application.js
@@ -12,5 +12,5 @@
//
//= require jquery
//= require jquery_ujs
-//= require cargo/html5-ie
+//= require cargo_wiki/html5-ie
//= require_tree .
View
0 ...sets/javascripts/cargo/articles.js.coffee → ...javascripts/cargo_wiki/articles.js.coffee
File renamed without changes.
View
0 app/assets/javascripts/cargo/home.js.coffee → ...ets/javascripts/cargo_wiki/home.js.coffee
File renamed without changes.
View
0 app/assets/javascripts/cargo/html5-ie.js → ...assets/javascripts/cargo_wiki/html5-ie.js
File renamed without changes.
View
0 ...sets/javascripts/cargo/sessions.js.coffee → ...javascripts/cargo_wiki/sessions.js.coffee
File renamed without changes.
View
0 app/assets/javascripts/cargo/tags.js.coffee → ...ets/javascripts/cargo_wiki/tags.js.coffee
File renamed without changes.
View
0 app/assets/javascripts/cargo/users.js.coffee → ...ts/javascripts/cargo_wiki/users.js.coffee
File renamed without changes.
View
0 ...sets/javascripts/cargo/versions.js.coffee → ...javascripts/cargo_wiki/versions.js.coffee
File renamed without changes.
View
0 app/assets/stylesheets/cargo/_mixins.sass → ...ssets/stylesheets/cargo_wiki/_mixins.sass
File renamed without changes.
View
4 app/assets/stylesheets/cargo/application.css → ...ts/stylesheets/cargo_wiki/application.css
@@ -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 .
*/
View
2 ...ssets/stylesheets/cargo/articles.css.sass → .../stylesheets/cargo_wiki/articles.css.sass
@@ -1,7 +1,7 @@
@import compass
@import blueprint
@import blueprint/liquid
-@import cargo/mixins
+@import cargo_wiki/mixins
.article
h1.title
View
2 app/assets/stylesheets/cargo/home.css.sass → ...sets/stylesheets/cargo_wiki/home.css.sass
@@ -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
View
0 ...heets/cargo/saxMono-fontfacekit/demo.html → .../cargo_wiki/saxMono-fontfacekit/demo.html
File renamed without changes.
View
0 ...o-fontfacekit/s.a.x. Software License.txt → ...o-fontfacekit/s.a.x. Software License.txt
File renamed without changes.
View
0 ...o/saxMono-fontfacekit/saxmono-webfont.eot → ...i/saxMono-fontfacekit/saxmono-webfont.eot
File renamed without changes.
View
0 ...o/saxMono-fontfacekit/saxmono-webfont.svg → ...i/saxMono-fontfacekit/saxmono-webfont.svg
File renamed without changes.
View
0 ...o/saxMono-fontfacekit/saxmono-webfont.ttf → ...i/saxMono-fontfacekit/saxmono-webfont.ttf
File renamed without changes.
View
0 .../saxMono-fontfacekit/saxmono-webfont.woff → .../saxMono-fontfacekit/saxmono-webfont.woff
File renamed without changes.
View
0 .../cargo/saxMono-fontfacekit/stylesheet.css → ...o_wiki/saxMono-fontfacekit/stylesheet.css
File renamed without changes.
View
0 ...ssets/stylesheets/cargo/sessions.css.sass → .../stylesheets/cargo_wiki/sessions.css.sass
File renamed without changes.
View
2 app/assets/stylesheets/cargo/tags.css.sass → ...sets/stylesheets/cargo_wiki/tags.css.sass
@@ -1,7 +1,7 @@
@import compass
@import blueprint
@import blueprint/liquid
-@import cargo/mixins
+@import cargo_wiki/mixins
.tags_list
text-align: center
View
2 app/assets/stylesheets/cargo/users.css.sass → ...ets/stylesheets/cargo_wiki/users.css.sass
@@ -1,7 +1,7 @@
@import compass
@import blueprint
@import blueprint/liquid
-@import cargo/mixins
+@import cargo_wiki/mixins
form.user
label
View
0 ...ssets/stylesheets/cargo/versions.css.sass → .../stylesheets/cargo_wiki/versions.css.sass
File renamed without changes.
View
2 ...ntrollers/cargo/application_controller.rb → ...lers/cargo_wiki/application_controller.rb
@@ -1,4 +1,4 @@
-module Cargo
+module CargoWiki
class ApplicationController < ActionController::Base
private
View
4 app/controllers/cargo/articles_controller.rb → ...rollers/cargo_wiki/articles_controller.rb
@@ -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
View
2 app/controllers/cargo/home_controller.rb → ...controllers/cargo_wiki/home_controller.rb
@@ -1,4 +1,4 @@
-module Cargo
+module CargoWiki
class HomeController < ApplicationController
def index
end
View
2 app/controllers/cargo/sessions_controller.rb → ...rollers/cargo_wiki/sessions_controller.rb
@@ -1,4 +1,4 @@
-module Cargo
+module CargoWiki
class SessionsController < ApplicationController
def new
if signed_in?
View
2 app/controllers/cargo/tags_controller.rb → ...controllers/cargo_wiki/tags_controller.rb
@@ -1,4 +1,4 @@
-module Cargo
+module CargoWiki
class TagsController < ApplicationController
respond_to :html, :json
View
2 app/controllers/cargo/users_controller.rb → ...ontrollers/cargo_wiki/users_controller.rb
@@ -1,4 +1,4 @@
-module Cargo
+module CargoWiki
class UsersController < ApplicationController
before_filter :require_login, :require_admin
View
2 app/controllers/cargo/versions_controller.rb → ...rollers/cargo_wiki/versions_controller.rb
@@ -1,4 +1,4 @@
-module Cargo
+module CargoWiki
class VersionsController < ApplicationController
def index
if params[:article_id]
View
2 app/helpers/cargo/application_helper.rb → app/helpers/cargo_wiki/application_helper.rb
@@ -1,4 +1,4 @@
-module Cargo
+module CargoWiki
module ApplicationHelper
end
end
View
2 app/helpers/cargo/articles_helper.rb → app/helpers/cargo_wiki/articles_helper.rb
@@ -1,4 +1,4 @@
-module Cargo
+module CargoWiki
module ArticlesHelper
end
end
View
2 app/helpers/cargo/home_helper.rb → app/helpers/cargo_wiki/home_helper.rb
@@ -1,4 +1,4 @@
-module Cargo
+module CargoWiki
module HomeHelper
end
end
View
2 app/helpers/cargo/sessions_helper.rb → app/helpers/cargo_wiki/sessions_helper.rb
@@ -1,4 +1,4 @@
-module Cargo
+module CargoWiki
module SessionsHelper
end
end
View
2 app/helpers/cargo/tags_helper.rb → app/helpers/cargo_wiki/tags_helper.rb
@@ -1,4 +1,4 @@
-module Cargo
+module CargoWiki
module TagsHelper
include ActsAsTaggableOn::TagsHelper
end
View
2 app/helpers/cargo/users_helper.rb → app/helpers/cargo_wiki/users_helper.rb
@@ -1,4 +1,4 @@
-module Cargo
+module CargoWiki
module UsersHelper
end
end
View
2 app/helpers/cargo/versions_helper.rb → app/helpers/cargo_wiki/versions_helper.rb
@@ -1,4 +1,4 @@
-module Cargo
+module CargoWiki
module VersionsHelper
end
end
View
2 app/models/cargo/article.rb → app/models/cargo_wiki/article.rb
@@ -1,4 +1,4 @@
-module Cargo
+module CargoWiki
class Article < ActiveRecord::Base
acts_as_taggable
View
2 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)
View
2 app/views/cargo/home/index.html.haml
@@ -1,2 +0,0 @@
-%h1 Home#index
-%p Find me in app/views/cargo/home/index.html.haml
View
0 app/views/cargo/articles/_form.html.haml → ...views/cargo_wiki/articles/_form.html.haml
File renamed without changes.
View
0 app/views/cargo/articles/edit.html.haml → app/views/cargo_wiki/articles/edit.html.haml
File renamed without changes.
View
0 app/views/cargo/articles/index.html.haml → ...views/cargo_wiki/articles/index.html.haml
File renamed without changes.
View
0 app/views/cargo/articles/new.html.haml → app/views/cargo_wiki/articles/new.html.haml
File renamed without changes.
View
0 app/views/cargo/articles/show.html.haml → app/views/cargo_wiki/articles/show.html.haml
File renamed without changes.
View
2 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
View
0 app/views/cargo/sessions/new.html.haml → app/views/cargo_wiki/sessions/new.html.haml
File renamed without changes.
View
0 app/views/cargo/tags/index.html.haml → app/views/cargo_wiki/tags/index.html.haml
File renamed without changes.
View
2 app/views/cargo/users/_form.html.haml → app/views/cargo_wiki/users/_form.html.haml
@@ -1,4 +1,4 @@
= form.input :username
= form.input :role, :collection => Cargo::User::ROLES
= form.input :password
-= form.input :password_confirmation
+= form.inpuCargoWikissword_confirmation
View
0 app/views/cargo/users/_user.html.haml → app/views/cargo_wiki/users/_user.html.haml
File renamed without changes.
View
0 app/views/cargo/users/edit.html.haml → app/views/cargo_wiki/users/edit.html.haml
File renamed without changes.
View
0 app/views/cargo/users/index.html.haml → app/views/cargo_wiki/users/index.html.haml
File renamed without changes.
View
0 app/views/cargo/users/new.html.haml → app/views/cargo_wiki/users/new.html.haml
File renamed without changes.
View
0 app/views/cargo/versions/index.html.haml → ...views/cargo_wiki/versions/index.html.haml
File renamed without changes.
View
12 ...views/layouts/cargo/application.html.haml → .../layouts/cargo_wiki/application.html.haml
@@ -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}")
@@ -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')
View
8 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"
View
2 config/initializers/paper_trail.rb
@@ -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
View
59 config/locales/devise.en.yml
@@ -1,59 +0,0 @@
-# Additional translations at https://github.com/plataformatec/devise/wiki/I18n
-
-en:
- errors:
- messages:
- expired: "has expired, please request a new one"
- not_found: "not found"
- already_confirmed: "was already confirmed, please try signing in"
- not_locked: "was not locked"
- not_saved:
- one: "1 error prohibited this %{resource} from being saved:"
- other: "%{count} errors prohibited this %{resource} from being saved:"
-
- devise:
- failure:
- already_authenticated: 'You are already signed in.'
- unauthenticated: 'You need to sign in or sign up before continuing.'
- unconfirmed: 'You have to confirm your account before continuing.'
- locked: 'Your account is locked.'
- invalid: 'Invalid email or password.'
- invalid_token: 'Invalid authentication token.'
- timeout: 'Your session expired, please sign in again to continue.'
- inactive: 'Your account was not activated yet.'
- sessions:
- signed_in: 'Signed in successfully.'
- signed_out: 'Signed out successfully.'
- passwords:
- send_instructions: 'You will receive an email with instructions about how to reset your password in a few minutes.'
- updated: 'Your password was changed successfully. You are now signed in.'
- updated_not_active: 'Your password was changed successfully.'
- send_paranoid_instructions: "If your e-mail exists on our database, you will receive a password recovery link on your e-mail"
- confirmations:
- send_instructions: 'You will receive an email with instructions about how to confirm your account in a few minutes.'
- send_paranoid_instructions: 'If your e-mail exists on our database, you will receive an email with instructions about how to confirm your account in a few minutes.'
- confirmed: 'Your account was successfully confirmed. You are now signed in.'
- registrations:
- signed_up: 'Welcome! You have signed up successfully.'
- inactive_signed_up: 'You have signed up successfully. However, we could not sign you in because your account is %{reason}.'
- updated: 'You updated your account successfully.'
- update_needs_confirmation: "You updated your account successfully, but we need to verify your new email address. Please check your email and click on the confirm link to finalize confirming your new email address."
- destroyed: 'Bye! Your account was successfully cancelled. We hope to see you again soon.'
- reasons:
- inactive: 'inactive'
- unconfirmed: 'unconfirmed'
- locked: 'locked'
- unlocks:
- send_instructions: 'You will receive an email with instructions about how to unlock your account in a few minutes.'
- unlocked: 'Your account was successfully unlocked. You are now signed in.'
- send_paranoid_instructions: 'If your account exists, you will receive an email with instructions about how to unlock it in a few minutes.'
- omniauth_callbacks:
- success: 'Successfully authorized from %{kind} account.'
- failure: 'Could not authorize you from %{kind} because "%{reason}".'
- mailer:
- confirmation_instructions:
- subject: 'Confirmation instructions'
- reset_password_instructions:
- subject: 'Reset password instructions'
- unlock_instructions:
- subject: 'Unlock Instructions'
View
2 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
View
10 db/migrate/20120123133445_create_cargo_articles.rb
@@ -1,10 +0,0 @@
-class CreateCargoArticles < ActiveRecord::Migration
- def change
- create_table :cargo_articles do |t|
- t.string :title
- t.text :body
-
- t.timestamps
- end
- end
-end
View
10 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
View
4 ...rate/20120123162205_create_cargo_users.rb → ...20120123162205_create_cargo_wiki_users.rb
@@ -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
View
2 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
View
2 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
View
2 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
View
6 features/step_definitions/article_actions_permissions_steps.rb
@@ -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|
@@ -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
View
14 features/step_definitions/articles_index_steps.rb
@@ -1,11 +1,11 @@
When /^I visit the articles index page$/ do
- visit '/cargo/articles'
+ visit '/cargo_wiki/articles'
end
Then /^I should see the articles list$/ do
page.should have_content("Articles")
within(".articles.list") do
- Cargo::Article.all.each do |article|
+ CargoWiki::Article.all.each do |article|
within("#article-#{article.id}") do
page.should have_content(article.title)
page.should have_content(article.author.username)
@@ -16,7 +16,7 @@
end
Then /^I should be able to display the history for each article$/ do
- Cargo::Article.all.each do |article|
+ CargoWiki::Article.all.each do |article|
within("#article-#{article.id} .actions") do
page.should have_content('History')
end
@@ -25,7 +25,7 @@
Then /^I should not be able to add\/edit\/destroy an article$/ do
page.should have_no_content('New Article')
- Cargo::Article.all.each do |article|
+ CargoWiki::Article.all.each do |article|
within("#article-#{article.id} .actions") do
page.should have_no_content('Edit')
page.should have_no_content('Destroy')
@@ -35,7 +35,7 @@
Then /^I should be able to add\/edit\/destroy an article$/ do
page.should have_content('New Article')
- Cargo::Article.all.each do |article|
+ CargoWiki::Article.all.each do |article|
within("#article-#{article.id} .actions") do
page.should have_content('Edit')
page.should have_content('Destroy')
@@ -45,15 +45,15 @@
Then /^I should be able to add\/edit an article$/ do
page.should have_content('New Article')
- Cargo::Article.all.each do |article|
+ CargoWiki::Article.all.each do |article|
within("#article-#{article.id} .actions") do
page.should have_content('Edit')
end
end
end
Then /^I should not be able to destroy an article$/ do
- Cargo::Article.all.each do |article|
+ CargoWiki::Article.all.each do |article|
within("#article-#{article.id} .actions") do
page.should have_no_content('Destroy')
end
View
6 features/step_definitions/create_article_steps.rb
@@ -15,8 +15,8 @@
end
Then /^I should be redirected to the new article show page$/ do
- @article = Cargo::Article.last
- current_path.should == "/cargo/articles/#{@article.id}"
+ @article = CargoWiki::Article.last
+ current_path.should == "/cargo_wiki/articles/#{@article.id}"
end
Then /^I should see the newly created article$/ do
@@ -52,7 +52,7 @@
end
Then /^I should stay on the new article page$/ do
- current_path.should == "/cargo/articles"
+ current_path.should == "/cargo_wiki/articles"
page.should have_css('#article_title')
page.should have_css('#article_body')
page.should have_css('#article_last_commit_message')
View
8 features/step_definitions/destroy_article_steps.rb
@@ -1,5 +1,5 @@
Given /^I see the two articles$/ do
- Cargo::Article.all.each do |article|
+ CargoWiki::Article.all.each do |article|
within('.articles') do
within("#article-#{article.id}") do
page.should have_content(article.title)
@@ -11,16 +11,16 @@
end
When /^I delete one of them$/ do
- @article_id = Cargo::Article.last.id
+ @article_id = CargoWiki::Article.last.id
within("#article-#{@article_id}") { click_link("Destroy") }
end
Then /^I should be redirected to the articles index page$/ do
- current_path.should == "/cargo/articles"
+ current_path.should == "/cargo_wiki/articles"
end
Then /^I should see the article remaining in the database$/ do
- article = Cargo::Article.last
+ article = CargoWiki::Article.last
within('.articles') do
within("#article-#{article.id}") { page.should have_content(article.title) }
end
View
6 features/step_definitions/edit_article_steps.rb
@@ -1,6 +1,6 @@
Given /^I visit its show page$/ do
- @article = Cargo::Article.last
- visit "/cargo/articles/#{@article.id}"
+ @article = CargoWiki::Article.last
+ visit "/cargo_wiki/articles/#{@article.id}"
end
Given /^I click on 'Edit'$/ do
@@ -27,7 +27,7 @@
end
Then /^I should stay on the edit article page$/ do
- current_path.should == "/cargo/articles/#{@article.id}"
+ current_path.should == "/cargo_wiki/articles/#{@article.id}"
page.should have_css('#article_title')
page.should have_css('#article_body')
page.should have_css('#article_last_commit_message')
View
12 features/step_definitions/history_steps.rb
@@ -7,11 +7,11 @@
end
When /^I visit the history page$/ do
- visit '/cargo/versions'
+ visit '/cargo_wiki/versions'
end
Then /^I should see two changes on the last modified article$/ do
- versions = Cargo::Article.last.versions
+ versions = CargoWiki::Article.last.versions
versions.count.should == 2
versions.each do |version|
within('.versions') do
@@ -26,7 +26,7 @@
end
Then /^I should see one change on the other one$/ do
- article = Cargo::Article.first
+ article = CargoWiki::Article.first
article.versions.count.should == 1
version = article.versions[0]
within('.versions') do
@@ -48,8 +48,8 @@
end
When /^I visit the article history page$/ do
- @article = Cargo::Article.last
- visit "/cargo/articles/#{@article.id}/versions"
+ @article = CargoWiki::Article.last
+ visit "/cargo_wiki/articles/#{@article.id}/versions"
end
Then /^I should see my changes on that article$/ do
@@ -67,5 +67,5 @@
Then /^I should be able to return to the article show page$/ do
click_link "Back to article"
- current_path.should == "/cargo/articles/#{Cargo::Article.last.id}"
+ current_path.should == "/cargo_wiki/articles/#{CargoWiki::Article.last.id}"
end
View
4 features/step_definitions/show_article_steps.rb
@@ -1,12 +1,12 @@
When /^I select this article$/ do
- @article = Cargo::Article.last
+ @article = CargoWiki::Article.last
within("#article-#{@article.id}") do
click_link(@article.title)
end
end
Then /^I should be redirected to the article show page$/ do
- current_path.should == "/cargo/articles/#{@article.id}"
+ current_path.should == "/cargo_wiki/articles/#{@article.id}"
end
Then /^I should see the title of the article$/ do
View
10 features/support/hooks.rb
@@ -1,20 +1,20 @@
Before '@anonymous_visitor' do
- visit '/cargo/logout'
+ visit '/cargo_wiki/logout'
end
Before '@editor' do
- visit '/cargo/logout'
+ visit '/cargo_wiki/logout'
@user = Factory.create(:user)
- visit '/cargo/login'
+ visit '/cargo_wiki/login'
fill_in 'Username', :with => @user.username
fill_in 'Password', :with => 'passwd'
click_on 'Login'
end
Before '@admin' do
- visit '/cargo/logout'
+ visit '/cargo_wiki/logout'
@user = Factory.create(:user, :role => 'admin')
- visit '/cargo/login'
+ visit '/cargo_wiki/login'
fill_in 'Username', :with => @user.username
fill_in 'Password', :with => 'passwd'
click_on 'Login'
View
4 lib/cargo.rb
@@ -1,4 +0,0 @@
-require "cargo/engine"
-
-module Cargo
-end
View
4 lib/cargo_wiki.rb
@@ -0,0 +1,4 @@
+require "cargo_wiki/engine"
+
+module CargoWiki
+end
View
4 lib/cargo/engine.rb → lib/cargo_wiki/engine.rb
@@ -1,6 +1,6 @@
-module Cargo
+module CargoWiki
class Engine < ::Rails::Engine
- isolate_namespace Cargo
+ isolate_namespace CargoWiki
config.generators do |g|
g.template_engine :haml
View
2 lib/cargo/version.rb → lib/cargo_wiki/version.rb
@@ -1,3 +1,3 @@
-module Cargo
+module CargoWiki
VERSION = "0.0.1.pre"
end
View
2 lib/tasks/cargo_tasks.rake → lib/tasks/cargo_wiki_tasks.rake
@@ -1,4 +1,4 @@
# desc "Explaining what the task does"
-# task :cargo do
+# task :cargo_wiki do
# # Task goes here
# end
View
2 script/rails
@@ -2,7 +2,7 @@
# This command will automatically be run when you run "rails" with Rails 3 gems installed from the root of your application.
ENGINE_ROOT = File.expand_path('../..', __FILE__)
-ENGINE_PATH = File.expand_path('../../lib/cargo/engine', __FILE__)
+ENGINE_PATH = File.expand_path('../../lib/cargo_wiki/engine', __FILE__)
require 'rails/all'
require 'rails/engine/commands'
View
0 ...rollers/cargo/articles_controller_spec.rb → ...rs/cargo_wiki/articles_controller_spec.rb
File renamed without changes.
View
0 ...controllers/cargo/home_controller_spec.rb → ...ollers/cargo_wiki/home_controller_spec.rb
File renamed without changes.
View
0 ...rollers/cargo/sessions_controller_spec.rb → ...rs/cargo_wiki/sessions_controller_spec.rb
File renamed without changes.
View
0 ...controllers/cargo/tags_controller_spec.rb → ...ollers/cargo_wiki/tags_controller_spec.rb
File renamed without changes.
View
0 ...ontrollers/cargo/users_controller_spec.rb → ...llers/cargo_wiki/users_controller_spec.rb
File renamed without changes.
View
0 ...rollers/cargo/versions_controller_spec.rb → ...rs/cargo_wiki/versions_controller_spec.rb
File renamed without changes.
View
2 spec/dummy/config/application.rb
@@ -3,7 +3,7 @@
require 'rails/all'
Bundler.require
-require "cargo"
+require "cargo_wiki"
module Dummy
class Application < Rails::Application
View
2 spec/dummy/config/routes.rb
@@ -1,4 +1,4 @@
Rails.application.routes.draw do
- mount Cargo::Engine => "/cargo"
+ mount CargoWiki::Engine => "/cargo_wiki"
end
View
4 spec/dummy/db/schema.rb
@@ -13,15 +13,15 @@
ActiveRecord::Schema.define(:version => 20120201013717) do
- create_table "cargo_articles", :force => true do |t|
+ create_table "cargo_wiki_articles", :force => true do |t|
t.string "title"
t.text "body"
t.datetime "created_at", :null => false
t.datetime "updated_at", :null => false
t.integer "author_id"
end
- create_table "cargo_users", :force => true do |t|
+ create_table "cargo_wiki_users", :force => true do |t|
t.string "username"
t.string "password_digest"
t.datetime "created_at", :null => false
View
2 spec/factories/cargo_articles.rb → spec/factories/cargo_wiki_articles.rb
@@ -1,7 +1,7 @@
# Read about factories at http://github.com/thoughtbot/factory_girl
FactoryGirl.define do
- factory :article, :class => 'Cargo::Article' do
+ factory :article, :class => 'CargoWiki::Article' do
sequence(:title) { |n| "Article #{n}" }
body { Faker::Lorem.paragraphs.join(" ") }
last_commit_message { Faker::Lorem.sentence }
View
2 spec/factories/cargo_users.rb → spec/factories/cargo_wiki_users.rb
@@ -1,7 +1,7 @@
# Read about factories at http://github.com/thoughtbot/factory_girl
FactoryGirl.define do
- factory :user, :class => 'Cargo::User' do
+ factory :user, :class => 'CargoWiki::User' do
username { "#{Faker::Name.first_name}.#{Faker::Name.last_name}".downcase }
role "editor"
password "passwd"
View
0 spec/helpers/cargo/articles_helper_spec.rb → ...elpers/cargo_wiki/articles_helper_spec.rb
File renamed without changes.
View
0 spec/helpers/cargo/home_helper_spec.rb → spec/helpers/cargo_wiki/home_helper_spec.rb
File renamed without changes.
View
0 spec/helpers/cargo/sessions_helper_spec.rb → ...elpers/cargo_wiki/sessions_helper_spec.rb
File renamed without changes.
View
0 spec/helpers/cargo/tags_helper_spec.rb → spec/helpers/cargo_wiki/tags_helper_spec.rb
File renamed without changes.
View
0 spec/helpers/cargo/users_helper_spec.rb → spec/helpers/cargo_wiki/users_helper_spec.rb
File renamed without changes.
View
0 spec/helpers/cargo/versions_helper_spec.rb → ...elpers/cargo_wiki/versions_helper_spec.rb
File renamed without changes.
View
0 spec/models/cargo/article_spec.rb → spec/models/cargo_wiki/article_spec.rb
File renamed without changes.
View
0 spec/models/cargo/user_spec.rb → spec/models/cargo_wiki/user_spec.rb
File renamed without changes.

0 comments on commit dd9c7d6

Please sign in to comment.