Skip to content

Commit

Permalink
Great renaming
Browse files Browse the repository at this point in the history
  • Loading branch information
sgrove committed Apr 23, 2012
1 parent cd2ff77 commit 3d12bca
Show file tree
Hide file tree
Showing 16 changed files with 37 additions and 37 deletions.
6 changes: 3 additions & 3 deletions Gemfile
Expand Up @@ -8,10 +8,10 @@ gem 'pg', '0.12.2'
# Uncomment this is you want to use sqlite locally
# gem 'sqlite3'

# Auth/Bushido gems
# Auth/Cloudfuji gems
gem 'devise'
gem 'devise_bushido_authenticatable'
gem 'bushido'
gem 'devise_cloudfuji_authenticatable'
gem 'cloudfuji'

# Server/transport gems
gem 'thin'
Expand Down
8 changes: 4 additions & 4 deletions Gemfile.lock
Expand Up @@ -48,7 +48,7 @@ GEM
bourbon (1.4.0)
sass (>= 3.1)
builder (3.0.0)
bushido (0.0.36)
cloudfuji (0.0.39)
highline (>= 1.6.1)
json (>= 1.4.6)
orm_adapter (~> 0.0.3)
Expand All @@ -67,7 +67,7 @@ GEM
bcrypt-ruby (~> 3.0)
orm_adapter (~> 0.0.3)
warden (~> 1.1)
devise_bushido_authenticatable (1.0.3)
devise_cloudfuji_authenticatable (1.0.5)
devise (= 1.5.3)
rubycas-client (>= 2.2.1)
eco (1.0.0)
Expand Down Expand Up @@ -179,10 +179,10 @@ DEPENDENCIES
_bushido-faye (= 0.8.2)
aws-sdk
bourbon
bushido
cloudfuji
coffee-rails (~> 3.2.1)
devise
devise_bushido_authenticatable
devise_cloudfuji_authenticatable
eco
execjs
jquery-rails
Expand Down
Expand Up @@ -6,7 +6,7 @@ class Kandan.Plugins.UserList

@template: _.template '''
<div class="user clearfix">
<img class="avatar" src="http://gravatar.com/avatar/<%= gravatarHash %>?s=25&d=https://bushi.do/images/profile.png"/>
<img class="avatar" src="http://gravatar.com/avatar/<%= gravatarHash %>?s=25&d=https://cloudfuji.com/images/profile.png"/>
<span class="name"><%= name %></span>
</div>
'''
Expand Down
2 changes: 1 addition & 1 deletion app/assets/templates/activity_base.jst.eco
@@ -1,7 +1,7 @@
<span class="posted_at">
<%= new Date(@activity.created_at).toRelativeTime(Kandan.options.nowThreshold) %>
</span>
<img class="avatar" src="http://gravatar.com/avatar/<%= @activity.user.gravatar_hash %>?s=30&d=https://bushi.do/images/profile.png"/>
<img class="avatar" src="http://gravatar.com/avatar/<%= @activity.user.gravatar_hash %>?s=30&d=https://cloudfuji.com/images/profile.png"/>

<div class="readable">
<div class="content">
Expand Down
4 changes: 2 additions & 2 deletions app/assets/templates/current_user.jst.eco
@@ -1,2 +1,2 @@
<img src="http://gravatar.com/avatar/<%= @gravatarHash %>?s=25&d=http://bushi.do/images/profile.png"/>
<span><%= @name %></span>
<img src="http://gravatar.com/avatar/<%= @gravatarHash %>?s=25&d=http://cloudfuji.com/images/profile.png"/>
<span><%= @name %></span>
2 changes: 1 addition & 1 deletion app/assets/templates/message.jst.eco
@@ -1,7 +1,7 @@
<span class="posted_at">
<%= new Date(@activity.created_at).toRelativeTime(Kandan.options.nowThreshold) %>
</span>
<img class="avatar" src="http://gravatar.com/avatar/<%= @activity.user.gravatar_hash %>?s=30&d=https://bushi.do/images/profile.png"/>
<img class="avatar" src="http://gravatar.com/avatar/<%= @activity.user.gravatar_hash %>?s=30&d=https://cloudfuji.com/images/profile.png"/>

<div class="readable">
<span class="user">
Expand Down
2 changes: 1 addition & 1 deletion app/assets/templates/user_notification.jst.eco
@@ -1,7 +1,7 @@
<span class="posted_at">
<%= new Date(@activity.created_at).toRelativeTime(Kandan.options.nowThreshold) %>
</span>
<img class="avatar" src="http://gravatar.com/avatar/<%= @activity.user.gravatar_hash %>?s=30&d=https://bushi.do/images/profile.png"/>
<img class="avatar" src="http://gravatar.com/avatar/<%= @activity.user.gravatar_hash %>?s=30&d=https://cloudfuji.com/images/profile.png"/>

<div class="readable">
<span class="user">Kandan bot</span>
Expand Down
2 changes: 1 addition & 1 deletion app/models/user.rb
Expand Up @@ -11,7 +11,7 @@ class User < ActiveRecord::Base
# Setup accessible (or protected) attributes for your model
attr_accessible :id, :email, :password, :password_confirmation, :remember_me, :first_name, :last_name, :locale, :gravatar_hash

def bushido_extra_attributes(extra_attributes)
def cloudfuji_extra_attributes(extra_attributes)
self.first_name = extra_attributes["first_name"].to_s
self.last_name = extra_attributes["last_name"].to_s
self.email = extra_attributes["email"]
Expand Down
1 change: 0 additions & 1 deletion config/initializers/bushido.rb

This file was deleted.

1 change: 1 addition & 0 deletions config/initializers/cloudfuji.rb
@@ -0,0 +1 @@
require './lib/cloudfuji/cloudfuji_bootstrap.rb'
6 changes: 3 additions & 3 deletions config/initializers/kandan.rb
Expand Up @@ -9,9 +9,9 @@ def self.devise_modules
:recoverable, :rememberable, :trackable, :validatable,
:token_authenticatable]

bushido = [:bushido_authenticatable, :trackable,
:token_authenticatable]
cloudfuji = [:cloudfuji_authenticatable, :trackable,
:token_authenticatable]

::Bushido::Platform.on_bushido? ? bushido : standard
::Cloudfuji::Platform.on_cloudfuji? ? cloudfuji : standard
end
end
@@ -1,6 +1,6 @@
module Kandan
module Bushido
def self.enable_bushido!
module Cloudfuji
def self.enable_cloudfuji!
self.load_hooks!
self.extend_user!
end
Expand All @@ -15,7 +15,7 @@ def self.extend_user!
end

User.class_eval do
def bushido_extra_attributes(extra_attributes)
def cloudfuji_extra_attributes(extra_attributes)
self.first_name = "#{extra_attributes['first_name']}"
self.last_name = "#{extra_attributes['last_name']}"
self.locale = extra_attributes['locale']
Expand All @@ -25,18 +25,18 @@ def bushido_extra_attributes(extra_attributes)
end

def self.load_hooks!
Dir["#{Dir.pwd}/lib/bushido/**/*.rb"].each { |file| load file }
Dir["#{Dir.pwd}/lib/cloudfuji/**/*.rb"].each { |file| load file }
end

end
end

if Bushido::Platform.on_bushido?
class BushidoRailtie < Rails::Railtie
if Cloudfuji::Platform.on_cloudfuji?
class CloudfujiRailtie < Rails::Railtie
config.to_prepare do
puts "Enabling Bushido"
Kandan::Bushido.enable_bushido!
puts "Finished enabling Bushido"
puts "Enabling Cloudfuji"
Kandan::Cloudfuji.enable_cloudfuji!
puts "Finished enabling Cloudfuji"
end
end
end
@@ -1,6 +1,6 @@
class BushidoAppHooks < Bushido::EventObserver
class CloudfujiAppHooks < Cloudfuji::EventObserver
# This is here for eventual lazy-registration. Create a fake user on
# rake bushido:install, and when the app is claimed, we'll get this
# rake cloudfuji:install, and when the app is claimed, we'll get this
# event with the user info, so we convert the existing user and
# update their info here.
def app_claimed
Expand Down
@@ -1,4 +1,4 @@
class BushidoUserHooks < Bushido::EventObserver
class CloudfujiUserHooks < Cloudfuji::EventObserver
def user_added
data = params['data']
puts "Adding a new user with incoming data #{params.inspect}"
Expand Down Expand Up @@ -29,7 +29,7 @@ def user_updated
user = User.find_by_ido_id(data['ido_id'])

if user
user.bushido_extra_attributes(data)
user.cloudfuji_extra_attributes(data)
user.save
end
end
Expand Down
10 changes: 5 additions & 5 deletions lib/tasks/bushido.rake → lib/tasks/cloudfuji.rake
@@ -1,14 +1,14 @@
namespace :bushido do
namespace :cloudfuji do
desc "Run the initial setup for a Busido app. Copies config files and seeds db."
task :install => :environment do
user = User.first

if user.nil?
puts "Creating default user..."
user = User.new
user.email = "#{::Bushido::Platform.name}@#{ENV['BUSHIDO_HOST']}"
user.first_name = ::Bushido::Platform.name[0..1].upcase
user.last_name = ::Bushido::Platform.name
user.email = "#{::Cloudfuji::Platform.name}@#{ENV['CLOUDFUJI_HOST']}"
user.first_name = ::Cloudfuji::Platform.name[0..1].upcase
user.last_name = ::Cloudfuji::Platform.name
user.ido_id = "temporary_user"
user.save!
end
Expand All @@ -20,4 +20,4 @@ namespace :bushido do
channel = Channel.create :name => "Lobby"
end
end
end
end
2 changes: 1 addition & 1 deletion lib/tasks/kandan.rake
Expand Up @@ -26,7 +26,7 @@ namespace :kandan do
"Just paste in an image url and type a subtitle http://kandan.me/images/kandan.png",
"http://www.youtube.com/watch?v=Jgpty017CIw Same with youtube videos",
"/me is in proper love with Kandan, innit!",
"If you're the type of person who enjoys hacking on projects, the source to Kandan is at https://github.com/bushido/kandan",
"If you're the type of person who enjoys hacking on projects, the source to Kandan is at https://github.com/cloudfuji/kandan",
"Well, that's about it. If you have any questions, concerns, or ideas, just shoot us an email support@cloudfuji.com! Have fun!",
"Oh, sorry, one last thing - be sure to join the mailing list at https://groups.google.com/forum/?fromgroups#!forum/cloudfuji so you know there's a new release of Kandan!"
].each do |message|
Expand Down

0 comments on commit 3d12bca

Please sign in to comment.