fcid 0.0.1 → 0.0.2
Sign up to get free protection for your applications and to get access to all the features.
- data/app/assets/images/expand.gif +0 -0
- data/app/assets/javascripts/fcid.js +14 -0
- data/app/assets/javascripts/jquery.corner.js +152 -0
- data/app/assets/stylesheets/fcid/admin.css +3 -0
- data/app/assets/stylesheets/fcid/application.css +30 -0
- data/app/assets/stylesheets/fcid/apps.css +74 -0
- data/app/assets/stylesheets/fcid/base.css +151 -0
- data/app/assets/stylesheets/fcid/base_xiaonei.css +1678 -0
- data/app/assets/stylesheets/fcid/box.css +135 -0
- data/app/assets/stylesheets/fcid/chat.css +200 -0
- data/app/assets/stylesheets/fcid/coderay.css +10 -0
- data/app/assets/stylesheets/fcid/common.css +16 -0
- data/app/assets/stylesheets/fcid/dashboardpro.css +1205 -0
- data/app/assets/stylesheets/fcid/dialog.css +175 -0
- data/app/assets/stylesheets/fcid/dialogpro.css +296 -0
- data/app/assets/stylesheets/fcid/editor.css +73 -0
- data/app/assets/stylesheets/fcid/feeds.css +41 -0
- data/app/assets/stylesheets/fcid/flyout_menu.css +38 -0
- data/app/assets/stylesheets/fcid/form.css +176 -0
- data/app/assets/stylesheets/fcid/friend_selector.css +65 -0
- data/app/assets/stylesheets/fcid/friends.css +445 -0
- data/app/assets/stylesheets/fcid/green.css +942 -0
- data/app/assets/stylesheets/fcid/layout.css +185 -0
- data/app/assets/stylesheets/fcid/lightbox.css +26 -0
- data/app/assets/stylesheets/fcid/lister.css +49 -0
- data/app/assets/stylesheets/fcid/modalbox.css +153 -0
- data/app/assets/stylesheets/fcid/msg.css +62 -0
- data/app/assets/stylesheets/fcid/navigationpro.css +878 -0
- data/app/assets/stylesheets/fcid/notification.css +162 -0
- data/app/assets/stylesheets/fcid/pagination.css +45 -0
- data/app/assets/stylesheets/fcid/pill_filter.css +83 -0
- data/app/assets/stylesheets/fcid/post.css +69 -0
- data/app/assets/stylesheets/fcid/powerapple.css +2645 -0
- data/app/assets/stylesheets/fcid/rails.css +58 -0
- data/app/assets/stylesheets/fcid/register.css +711 -0
- data/app/assets/stylesheets/fcid/showbox.css +122 -0
- data/app/assets/stylesheets/fcid/super-actions.css +222 -0
- data/app/assets/stylesheets/fcid/tabs.css +370 -0
- data/app/assets/stylesheets/fcid/toolbar.css +10 -0
- data/{lib → app/models}/fcid/base.rb +0 -0
- data/{lib → app/models}/fcid/email.rb +0 -0
- data/{lib → app/models}/fcid/feed.rb +0 -0
- data/{lib → app/models}/fcid/friendship.rb +0 -0
- data/{lib → app/models}/fcid/message.rb +0 -0
- data/{lib → app/models}/fcid/notification.rb +0 -0
- data/{lib → app/models}/fcid/session.rb +0 -0
- data/{lib → app/models}/fcid/user.rb +0 -0
- data/lib/fcid.rb +0 -3
- data/lib/fcid/controller.rb +22 -24
- data/lib/fcid/version.rb +1 -1
- data/test/dummy/db/development.sqlite3 +0 -0
- data/test/dummy/db/test.sqlite3 +0 -0
- data/test/dummy/log/development.log +2 -0
- metadata +133 -67
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
data/lib/fcid.rb
CHANGED
data/lib/fcid/controller.rb
CHANGED
@@ -4,37 +4,35 @@ module Fcid
|
|
4
4
|
extend ActiveSupport::Concern
|
5
5
|
|
6
6
|
|
7
|
-
module InstanceMethods
|
8
7
|
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
end
|
14
|
-
end
|
15
|
-
|
16
|
-
def logged_in?
|
17
|
-
!!current_user
|
8
|
+
def login_required
|
9
|
+
unless logged_in?
|
10
|
+
flash[:error] = "此操作需要登录."
|
11
|
+
redirect_to new_fcid_session_path(:redirect_to => url_for(params))
|
18
12
|
end
|
13
|
+
end
|
19
14
|
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
end
|
15
|
+
def logged_in?
|
16
|
+
!!current_user
|
17
|
+
end
|
24
18
|
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
rescue Exception =>e
|
30
|
-
session.delete :user_id
|
31
|
-
nil
|
32
|
-
end
|
33
|
-
}.bind(self).call
|
34
|
-
end
|
19
|
+
def current_user=(user)
|
20
|
+
session[:user_id] = user.try(:id)
|
21
|
+
@current_user = user
|
22
|
+
end
|
35
23
|
|
24
|
+
def current_user
|
25
|
+
@current_user ||= session[:user_id] && lambda{
|
26
|
+
begin
|
27
|
+
user = ::User.find(session[:user_id])
|
28
|
+
rescue Exception =>e
|
29
|
+
session.delete :user_id
|
30
|
+
nil
|
31
|
+
end
|
32
|
+
}.bind(self).call
|
36
33
|
end
|
37
34
|
|
35
|
+
|
38
36
|
module ClassMethods
|
39
37
|
end
|
40
38
|
|
data/lib/fcid/version.rb
CHANGED
File without changes
|
File without changes
|
metadata
CHANGED
@@ -1,63 +1,107 @@
|
|
1
|
-
--- !ruby/object:Gem::Specification
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
2
|
name: fcid
|
3
|
-
version: !ruby/object:Gem::Version
|
4
|
-
|
5
|
-
|
6
|
-
- 0
|
7
|
-
- 0
|
8
|
-
- 1
|
9
|
-
version: 0.0.1
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.0.2
|
5
|
+
prerelease:
|
10
6
|
platform: ruby
|
11
|
-
authors:
|
7
|
+
authors:
|
12
8
|
- aotianlong
|
13
9
|
autorequire:
|
14
10
|
bindir: bin
|
15
11
|
cert_chain: []
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
dependencies:
|
20
|
-
- !ruby/object:Gem::Dependency
|
12
|
+
date: 2013-06-19 00:00:00.000000000 Z
|
13
|
+
dependencies:
|
14
|
+
- !ruby/object:Gem::Dependency
|
21
15
|
name: rails
|
22
|
-
|
23
|
-
|
24
|
-
requirements:
|
16
|
+
requirement: !ruby/object:Gem::Requirement
|
17
|
+
none: false
|
18
|
+
requirements:
|
25
19
|
- - ~>
|
26
|
-
- !ruby/object:Gem::Version
|
27
|
-
segments:
|
28
|
-
- 3
|
29
|
-
- 2
|
30
|
-
- 13
|
20
|
+
- !ruby/object:Gem::Version
|
31
21
|
version: 3.2.13
|
32
22
|
type: :runtime
|
33
|
-
version_requirements: *id001
|
34
|
-
- !ruby/object:Gem::Dependency
|
35
|
-
name: sqlite3
|
36
23
|
prerelease: false
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
24
|
+
version_requirements: !ruby/object:Gem::Requirement
|
25
|
+
none: false
|
26
|
+
requirements:
|
27
|
+
- - ~>
|
28
|
+
- !ruby/object:Gem::Version
|
29
|
+
version: 3.2.13
|
30
|
+
- !ruby/object:Gem::Dependency
|
31
|
+
name: sqlite3
|
32
|
+
requirement: !ruby/object:Gem::Requirement
|
33
|
+
none: false
|
34
|
+
requirements:
|
35
|
+
- - ! '>='
|
36
|
+
- !ruby/object:Gem::Version
|
37
|
+
version: '0'
|
44
38
|
type: :development
|
45
|
-
|
39
|
+
prerelease: false
|
40
|
+
version_requirements: !ruby/object:Gem::Requirement
|
41
|
+
none: false
|
42
|
+
requirements:
|
43
|
+
- - ! '>='
|
44
|
+
- !ruby/object:Gem::Version
|
45
|
+
version: '0'
|
46
46
|
description: Description of Fcid.
|
47
|
-
email:
|
47
|
+
email:
|
48
48
|
- aotianlong@gmail.com
|
49
49
|
executables: []
|
50
|
-
|
51
50
|
extensions: []
|
52
|
-
|
53
51
|
extra_rdoc_files: []
|
54
|
-
|
55
|
-
|
52
|
+
files:
|
53
|
+
- app/assets/images/expand.gif
|
54
|
+
- app/assets/javascripts/fcid.js
|
55
|
+
- app/assets/javascripts/jquery.corner.js
|
56
|
+
- app/assets/stylesheets/fcid/admin.css
|
57
|
+
- app/assets/stylesheets/fcid/application.css
|
58
|
+
- app/assets/stylesheets/fcid/apps.css
|
59
|
+
- app/assets/stylesheets/fcid/base.css
|
60
|
+
- app/assets/stylesheets/fcid/base_xiaonei.css
|
61
|
+
- app/assets/stylesheets/fcid/box.css
|
62
|
+
- app/assets/stylesheets/fcid/chat.css
|
63
|
+
- app/assets/stylesheets/fcid/coderay.css
|
64
|
+
- app/assets/stylesheets/fcid/common.css
|
65
|
+
- app/assets/stylesheets/fcid/dashboardpro.css
|
66
|
+
- app/assets/stylesheets/fcid/dialog.css
|
67
|
+
- app/assets/stylesheets/fcid/dialogpro.css
|
68
|
+
- app/assets/stylesheets/fcid/editor.css
|
69
|
+
- app/assets/stylesheets/fcid/feeds.css
|
70
|
+
- app/assets/stylesheets/fcid/flyout_menu.css
|
71
|
+
- app/assets/stylesheets/fcid/form.css
|
72
|
+
- app/assets/stylesheets/fcid/friend_selector.css
|
73
|
+
- app/assets/stylesheets/fcid/friends.css
|
74
|
+
- app/assets/stylesheets/fcid/green.css
|
75
|
+
- app/assets/stylesheets/fcid/layout.css
|
76
|
+
- app/assets/stylesheets/fcid/lightbox.css
|
77
|
+
- app/assets/stylesheets/fcid/lister.css
|
78
|
+
- app/assets/stylesheets/fcid/modalbox.css
|
79
|
+
- app/assets/stylesheets/fcid/msg.css
|
80
|
+
- app/assets/stylesheets/fcid/navigationpro.css
|
81
|
+
- app/assets/stylesheets/fcid/notification.css
|
82
|
+
- app/assets/stylesheets/fcid/pagination.css
|
83
|
+
- app/assets/stylesheets/fcid/pill_filter.css
|
84
|
+
- app/assets/stylesheets/fcid/post.css
|
85
|
+
- app/assets/stylesheets/fcid/powerapple.css
|
86
|
+
- app/assets/stylesheets/fcid/rails.css
|
87
|
+
- app/assets/stylesheets/fcid/register.css
|
88
|
+
- app/assets/stylesheets/fcid/showbox.css
|
89
|
+
- app/assets/stylesheets/fcid/super-actions.css
|
90
|
+
- app/assets/stylesheets/fcid/tabs.css
|
91
|
+
- app/assets/stylesheets/fcid/toolbar.css
|
56
92
|
- app/controllers/fcid/feeds_controller.rb
|
57
93
|
- app/controllers/fcid/friendships_controller.rb
|
58
94
|
- app/controllers/fcid/messages_controller.rb
|
59
95
|
- app/controllers/fcid/session_controller.rb
|
60
96
|
- app/controllers/fcid/users_controller.rb
|
97
|
+
- app/models/fcid/base.rb
|
98
|
+
- app/models/fcid/email.rb
|
99
|
+
- app/models/fcid/feed.rb
|
100
|
+
- app/models/fcid/friendship.rb
|
101
|
+
- app/models/fcid/message.rb
|
102
|
+
- app/models/fcid/notification.rb
|
103
|
+
- app/models/fcid/session.rb
|
104
|
+
- app/models/fcid/user.rb
|
61
105
|
- app/views/fcid/_ajax_new.html.erb
|
62
106
|
- app/views/fcid/_announce.html.erb
|
63
107
|
- app/views/fcid/_footer.html.erb
|
@@ -82,20 +126,12 @@ files:
|
|
82
126
|
- lib/fcid/active_resource/exceptions.rb
|
83
127
|
- lib/fcid/active_resource/extra_params.rb
|
84
128
|
- lib/fcid/active_resource/session.rb
|
85
|
-
- lib/fcid/base.rb
|
86
129
|
- lib/fcid/config.rb
|
87
130
|
- lib/fcid/consumer.rb
|
88
131
|
- lib/fcid/controller.rb
|
89
|
-
- lib/fcid/email.rb
|
90
132
|
- lib/fcid/engine.rb
|
91
|
-
- lib/fcid/feed.rb
|
92
|
-
- lib/fcid/friendship.rb
|
93
133
|
- lib/fcid/helpers.rb
|
94
|
-
- lib/fcid/message.rb
|
95
|
-
- lib/fcid/notification.rb
|
96
134
|
- lib/fcid/publisher/base.rb
|
97
|
-
- lib/fcid/session.rb
|
98
|
-
- lib/fcid/user.rb
|
99
135
|
- lib/fcid/user_methods.rb
|
100
136
|
- lib/fcid/version.rb
|
101
137
|
- lib/fcid.rb
|
@@ -106,37 +142,64 @@ files:
|
|
106
142
|
- MIT-LICENSE
|
107
143
|
- Rakefile
|
108
144
|
- README.rdoc
|
109
|
-
|
145
|
+
- test/dummy/app/assets/javascripts/application.js
|
146
|
+
- test/dummy/app/assets/stylesheets/application.css
|
147
|
+
- test/dummy/app/controllers/application_controller.rb
|
148
|
+
- test/dummy/app/helpers/application_helper.rb
|
149
|
+
- test/dummy/app/views/layouts/application.html.erb
|
150
|
+
- test/dummy/config/application.rb
|
151
|
+
- test/dummy/config/boot.rb
|
152
|
+
- test/dummy/config/database.yml
|
153
|
+
- test/dummy/config/environment.rb
|
154
|
+
- test/dummy/config/environments/development.rb
|
155
|
+
- test/dummy/config/environments/production.rb
|
156
|
+
- test/dummy/config/environments/test.rb
|
157
|
+
- test/dummy/config/initializers/backtrace_silencers.rb
|
158
|
+
- test/dummy/config/initializers/inflections.rb
|
159
|
+
- test/dummy/config/initializers/mime_types.rb
|
160
|
+
- test/dummy/config/initializers/secret_token.rb
|
161
|
+
- test/dummy/config/initializers/session_store.rb
|
162
|
+
- test/dummy/config/initializers/wrap_parameters.rb
|
163
|
+
- test/dummy/config/locales/en.yml
|
164
|
+
- test/dummy/config/routes.rb
|
165
|
+
- test/dummy/config.ru
|
166
|
+
- test/dummy/db/development.sqlite3
|
167
|
+
- test/dummy/db/test.sqlite3
|
168
|
+
- test/dummy/log/development.log
|
169
|
+
- test/dummy/public/404.html
|
170
|
+
- test/dummy/public/422.html
|
171
|
+
- test/dummy/public/500.html
|
172
|
+
- test/dummy/public/favicon.ico
|
173
|
+
- test/dummy/Rakefile
|
174
|
+
- test/dummy/README.rdoc
|
175
|
+
- test/dummy/script/rails
|
176
|
+
- test/fcid_test.rb
|
177
|
+
- test/test_helper.rb
|
110
178
|
homepage: http://www.aotianlong.com
|
111
179
|
licenses: []
|
112
|
-
|
113
180
|
post_install_message:
|
114
181
|
rdoc_options: []
|
115
|
-
|
116
|
-
require_paths:
|
182
|
+
require_paths:
|
117
183
|
- lib
|
118
|
-
required_ruby_version: !ruby/object:Gem::Requirement
|
119
|
-
|
120
|
-
|
121
|
-
|
122
|
-
|
123
|
-
|
124
|
-
|
125
|
-
|
126
|
-
requirements:
|
127
|
-
- -
|
128
|
-
- !ruby/object:Gem::Version
|
129
|
-
|
130
|
-
- 0
|
131
|
-
version: "0"
|
184
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
185
|
+
none: false
|
186
|
+
requirements:
|
187
|
+
- - ! '>='
|
188
|
+
- !ruby/object:Gem::Version
|
189
|
+
version: '0'
|
190
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
191
|
+
none: false
|
192
|
+
requirements:
|
193
|
+
- - ! '>='
|
194
|
+
- !ruby/object:Gem::Version
|
195
|
+
version: '0'
|
132
196
|
requirements: []
|
133
|
-
|
134
197
|
rubyforge_project:
|
135
|
-
rubygems_version: 1.
|
198
|
+
rubygems_version: 1.8.25
|
136
199
|
signing_key:
|
137
200
|
specification_version: 3
|
138
201
|
summary: Summary of Fcid.
|
139
|
-
test_files:
|
202
|
+
test_files:
|
140
203
|
- test/dummy/app/assets/javascripts/application.js
|
141
204
|
- test/dummy/app/assets/stylesheets/application.css
|
142
205
|
- test/dummy/app/controllers/application_controller.rb
|
@@ -158,6 +221,9 @@ test_files:
|
|
158
221
|
- test/dummy/config/locales/en.yml
|
159
222
|
- test/dummy/config/routes.rb
|
160
223
|
- test/dummy/config.ru
|
224
|
+
- test/dummy/db/development.sqlite3
|
225
|
+
- test/dummy/db/test.sqlite3
|
226
|
+
- test/dummy/log/development.log
|
161
227
|
- test/dummy/public/404.html
|
162
228
|
- test/dummy/public/422.html
|
163
229
|
- test/dummy/public/500.html
|