Skip to content

Commit

Permalink
add codes
Browse files Browse the repository at this point in the history
  • Loading branch information
IceskYsl committed Oct 19, 2013
1 parent 5e21c69 commit 9fbb403
Show file tree
Hide file tree
Showing 51 changed files with 772 additions and 15 deletions.
31 changes: 30 additions & 1 deletion Gemfile
Original file line number Diff line number Diff line change
@@ -1,8 +1,37 @@
source 'https://rubygems.org'
source 'http://ruby.taobao.org'
#source 'https://rubygems.org'

# Bundle edge Rails instead: gem 'rails', github: 'rails/rails'
gem 'rails', '4.0.0'

gem 'execjs'
gem 'therubyracer'

#omniauth
gem 'omniauth-google-oauth2'

# Mongoid 辅助插件
gem "mongoid"#, "3.0.6"
# gem 'mongoid_auto_increment_id' #, "0.5.0"
# gem 'mongoid_rails_migrations' #, '~> 0.0.14'

# 分页
gem 'will_paginate_mongoid'

#for api
gem 'grape'
gem 'grape-entity'

#tags
# gem 'mongoid_taggable_on'

#tools
gem 'exception_notification'

#bootstrap
# gem "twitter-bootstrap-rails"
# gem 'anjlab-bootstrap-rails', '~> 3.0.0.3', :require => 'bootstrap-rails'
gem 'anjlab-bootstrap-rails', :require => 'bootstrap-rails',:github => 'anjlab/bootstrap-rails'

# Use SCSS for stylesheets
gem 'sass-rails', '~> 4.0.0'
Expand Down
118 changes: 106 additions & 12 deletions Gemfile.lock
Original file line number Diff line number Diff line change
@@ -1,5 +1,13 @@
GIT
remote: git://github.com/anjlab/bootstrap-rails.git
revision: 8826a3bfbbcfb18709f0e8bb0eff9cf921a479c3
specs:
anjlab-bootstrap-rails (3.0.0.3)
railties (>= 3.0)
sass (>= 3.2)

GEM
remote: https://rubygems.org/
remote: http://ruby.taobao.org/
specs:
actionmailer (4.0.0)
actionpack (= 4.0.0)
Expand Down Expand Up @@ -27,33 +35,97 @@ GEM
tzinfo (~> 0.3.37)
arel (4.0.0)
atomic (1.1.14)
axiom-types (0.0.5)
descendants_tracker (~> 0.0.1)
ice_nine (~> 0.9)
backports (3.3.5)
bson (1.9.2)
builder (3.1.4)
coffee-rails (4.0.0)
coercible (0.2.0)
backports (~> 3.0, >= 3.1.0)
descendants_tracker (~> 0.0.1)
coffee-rails (4.0.1)
coffee-script (>= 2.2.0)
railties (>= 4.0.0.beta, < 5.0)
railties (>= 4.0.0, < 5.0)
coffee-script (2.2.0)
coffee-script-source
execjs
coffee-script-source (1.6.3)
descendants_tracker (0.0.3)
durran-validatable (2.0.1)
equalizer (0.0.7)
erubis (2.7.0)
execjs (2.0.1)
exception_notification (4.0.1)
actionmailer (>= 3.0.4)
activesupport (>= 3.0.4)
execjs (2.0.2)
faraday (0.8.8)
multipart-post (~> 1.2.0)
grape (0.6.0)
activesupport
builder
hashie (>= 1.2.0)
multi_json (>= 1.3.2)
multi_xml (>= 0.5.2)
rack (>= 1.3.0)
rack-accept
rack-mount
virtus
grape-entity (0.3.0)
activesupport
multi_json (>= 1.3.2)
hashie (2.0.5)
hike (1.2.3)
httpauth (0.2.0)
i18n (0.6.5)
jbuilder (1.5.1)
ice_nine (0.10.0)
jbuilder (1.5.2)
activesupport (>= 3.0.0)
multi_json (>= 1.2.0)
jquery-rails (3.0.4)
railties (>= 3.0, < 5.0)
thor (>= 0.14, < 2.0)
json (1.8.0)
json (1.8.1)
jwt (0.1.8)
multi_json (>= 1.5)
leshill-will_paginate (2.3.11)
libv8 (3.16.14.3)
mail (2.5.4)
mime-types (~> 1.16)
treetop (~> 1.4.8)
mime-types (1.25)
minitest (4.7.5)
multi_json (1.8.0)
mongo (1.9.2)
bson (~> 1.9.2)
mongoid (1.0.6)
activesupport (>= 2.2.2)
durran-validatable (>= 2.0.1)
leshill-will_paginate (>= 2.3.11)
mongo (>= 0.18.2)
multi_json (1.8.2)
multi_xml (0.5.5)
multipart-post (1.2.0)
oauth2 (0.8.1)
faraday (~> 0.8)
httpauth (~> 0.1)
jwt (~> 0.1.4)
multi_json (~> 1.0)
rack (~> 1.2)
omniauth (1.1.4)
hashie (>= 1.2, < 3)
rack
omniauth-google-oauth2 (0.2.1)
omniauth (~> 1.0)
omniauth-oauth2
omniauth-oauth2 (1.1.1)
oauth2 (~> 0.8.0)
omniauth (~> 1.0)
polyglot (0.3.3)
rack (1.5.2)
rack-accept (0.4.5)
rack (>= 0.4)
rack-mount (0.8.3)
rack (>= 1.0.0)
rack-test (0.6.2)
rack (>= 1.0)
rails (4.0.0)
Expand All @@ -72,9 +144,10 @@ GEM
rake (10.1.0)
rdoc (3.12.2)
json (~> 1.4)
sass (3.2.10)
sass-rails (4.0.0)
railties (>= 4.0.0.beta, < 5.0)
ref (1.0.5)
sass (3.2.12)
sass-rails (4.0.1)
railties (>= 4.0.0, < 5.0)
sass (>= 3.1.10)
sprockets-rails (~> 2.0.0)
sdoc (0.3.20)
Expand All @@ -85,10 +158,13 @@ GEM
multi_json (~> 1.0)
rack (~> 1.0)
tilt (~> 1.1, != 1.3.0)
sprockets-rails (2.0.0)
sprockets-rails (2.0.1)
actionpack (>= 3.0)
activesupport (>= 3.0)
sprockets (~> 2.8)
therubyracer (0.12.0)
libv8 (~> 3.16.14.0)
ref
thor (0.18.1)
thread_safe (0.1.3)
atomic
Expand All @@ -98,20 +174,38 @@ GEM
polyglot (>= 0.3.1)
turbolinks (1.3.0)
coffee-rails
tzinfo (0.3.37)
tzinfo (0.3.38)
uglifier (2.2.1)
execjs (>= 0.3.0)
multi_json (~> 1.0, >= 1.0.2)
virtus (1.0.0)
axiom-types (~> 0.0.5)
coercible (~> 0.2)
descendants_tracker (~> 0.0.1)
equalizer (~> 0.0.7)
will_paginate (3.0.5)
will_paginate_mongoid (2.0.1)
mongoid
will_paginate (~> 3.0)

PLATFORMS
ruby

DEPENDENCIES
anjlab-bootstrap-rails!
coffee-rails (~> 4.0.0)
exception_notification
execjs
grape
grape-entity
jbuilder (~> 1.2)
jquery-rails
mongoid
omniauth-google-oauth2
rails (= 4.0.0)
sass-rails (~> 4.0.0)
sdoc
therubyracer
turbolinks
uglifier (>= 1.3.0)
will_paginate_mongoid
6 changes: 6 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,2 +1,8 @@
活动日历,让生活更好玩~

### code
git clone [email protected]:IceskYsl/huodongrili.git online_20130919

[root@localhost huodong]# ln -s ./online_20130919 current

/usr/local/mongodb/bin/mongod --dbpath=/usr/local/mongodb/data/db --logpath=/usr/local/mongodb/logs/mongodb.log --fork
1 change: 1 addition & 0 deletions app/assets/javascripts/application.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,5 @@
//= require jquery
//= require jquery_ujs
//= require turbolinks
//= require twitter/bootstrap
//= require_tree .
3 changes: 3 additions & 0 deletions app/assets/javascripts/blogs.js.coffee
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# Place all the behaviors and hooks related to the matching controller here.
# All this logic will automatically be available in application.js.
# You can use CoffeeScript in this file: http://coffeescript.org/
3 changes: 3 additions & 0 deletions app/assets/javascripts/chats.js.coffee
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# Place all the behaviors and hooks related to the matching controller here.
# All this logic will automatically be available in application.js.
# You can use CoffeeScript in this file: http://coffeescript.org/
3 changes: 3 additions & 0 deletions app/assets/javascripts/index.js.coffee
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# Place all the behaviors and hooks related to the matching controller here.
# All this logic will automatically be available in application.js.
# You can use CoffeeScript in this file: http://coffeescript.org/
3 changes: 3 additions & 0 deletions app/assets/javascripts/users.js.coffee
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# Place all the behaviors and hooks related to the matching controller here.
# All this logic will automatically be available in application.js.
# You can use CoffeeScript in this file: http://coffeescript.org/
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
* You're free to add application-wide styles to this file and they'll appear at the top of the
* compiled file, but it's generally better to create a new file per style scope.
*
*= require twitter/bootstrap
*= require_self
*= require_tree .
*/
3 changes: 3 additions & 0 deletions app/assets/stylesheets/blogs.css.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
// Place all the styles related to the blogs controller here.
// They will automatically be included in application.css.
// You can use Sass (SCSS) here: http://sass-lang.com/
3 changes: 3 additions & 0 deletions app/assets/stylesheets/chats.css.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
// Place all the styles related to the chats controller here.
// They will automatically be included in application.css.
// You can use Sass (SCSS) here: http://sass-lang.com/
3 changes: 3 additions & 0 deletions app/assets/stylesheets/index.css.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
// Place all the styles related to the index controller here.
// They will automatically be included in application.css.
// You can use Sass (SCSS) here: http://sass-lang.com/
3 changes: 3 additions & 0 deletions app/assets/stylesheets/users.css.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
// Place all the styles related to the users controller here.
// They will automatically be included in application.css.
// You can use Sass (SCSS) here: http://sass-lang.com/
29 changes: 29 additions & 0 deletions app/controllers/accounts_controller.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
# coding: utf-8
class AccountsController < ApplicationController

#聊天人列表
def index
end

#得到自己独一无二link www.huodongrili.com/u/username
def show
end


#采用Google账号登陆
def bind

end


#登出
def logout

end

#帐号设置
def setting

end

end
5 changes: 5 additions & 0 deletions app/controllers/application_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,9 @@ class ApplicationController < ActionController::Base
# Prevent CSRF attacks by raising an exception.
# For APIs, you may want to use :null_session instead.
protect_from_forgery with: :exception

def current_account
return nil unless session[:account_id]
@current_account ||= Account.find(session[:account_id])
end
end
24 changes: 24 additions & 0 deletions app/controllers/blogs_controller.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
# coding: utf-8
class BlogsController < ApplicationController

def index
end

def show
end

def new
end

def create
end

def edit

end

def update

end

end
15 changes: 15 additions & 0 deletions app/controllers/chats_controller.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
# coding: utf-8
class ChatsController < ApplicationController

def index
end

#申请聊天
def apply
end

#确认
def confirm
end

end
4 changes: 4 additions & 0 deletions app/controllers/index_controller.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
class IndexController < ApplicationController
def index
end
end
2 changes: 2 additions & 0 deletions app/helpers/accounts_helper.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
module AccountsHelper
end
6 changes: 6 additions & 0 deletions app/helpers/application_helper.rb
Original file line number Diff line number Diff line change
@@ -1,2 +1,8 @@
module ApplicationHelper

def current_account
return nil unless session[:account_id]
@current_account ||= Account.find(session[:account_id])
end

end
2 changes: 2 additions & 0 deletions app/helpers/blogs_helper.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
module BlogsHelper
end
2 changes: 2 additions & 0 deletions app/helpers/chats_helper.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
module ChatsHelper
end
2 changes: 2 additions & 0 deletions app/helpers/index_helper.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
module IndexHelper
end
Loading

0 comments on commit 9fbb403

Please sign in to comment.