fcid 0.0.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (84) hide show
  1. data/MIT-LICENSE +20 -0
  2. data/README.rdoc +3 -0
  3. data/Rakefile +22 -0
  4. data/app/controllers/fcid/feeds_controller.rb +22 -0
  5. data/app/controllers/fcid/friendships_controller.rb +74 -0
  6. data/app/controllers/fcid/messages_controller.rb +24 -0
  7. data/app/controllers/fcid/session_controller.rb +80 -0
  8. data/app/controllers/fcid/users_controller.rb +25 -0
  9. data/app/views/fcid/_ajax_new.html.erb +3 -0
  10. data/app/views/fcid/_announce.html.erb +5 -0
  11. data/app/views/fcid/_footer.html.erb +0 -0
  12. data/app/views/fcid/_navigation.html.erb +0 -0
  13. data/app/views/fcid/create.html.erb +6 -0
  14. data/app/views/fcid/feeds/_feed.html.erb +29 -0
  15. data/app/views/fcid/feeds/index.html.erb +4 -0
  16. data/app/views/fcid/feeds/show.html.erb +0 -0
  17. data/app/views/fcid/friendships/index.html.erb +5 -0
  18. data/app/views/fcid/friendships/new.html.erb +22 -0
  19. data/app/views/fcid/messages/_message.html.erb +0 -0
  20. data/app/views/fcid/messages/_message_tr.html.erb +8 -0
  21. data/app/views/fcid/messages/index.html.erb +20 -0
  22. data/app/views/fcid/new.html.erb +30 -0
  23. data/app/views/fcid/session/new.html.erb +40 -0
  24. data/app/views/fcid/users/_ajax_new.html.erb +3 -0
  25. data/app/views/fcid/users/create.html.erb +6 -0
  26. data/app/views/fcid/users/new.html.erb +33 -0
  27. data/app/views/friendships/new.html.erb +22 -0
  28. data/app/views/session/new.html.erb +20 -0
  29. data/config/routes.rb +29 -0
  30. data/lib/fcid/active_resource/exceptions.rb +7 -0
  31. data/lib/fcid/active_resource/extra_params.rb +66 -0
  32. data/lib/fcid/active_resource/session.rb +45 -0
  33. data/lib/fcid/base.rb +7 -0
  34. data/lib/fcid/config.rb +88 -0
  35. data/lib/fcid/consumer.rb +51 -0
  36. data/lib/fcid/controller.rb +46 -0
  37. data/lib/fcid/email.rb +9 -0
  38. data/lib/fcid/engine.rb +5 -0
  39. data/lib/fcid/feed.rb +17 -0
  40. data/lib/fcid/friendship.rb +5 -0
  41. data/lib/fcid/helpers.rb +49 -0
  42. data/lib/fcid/message.rb +5 -0
  43. data/lib/fcid/notification.rb +5 -0
  44. data/lib/fcid/publisher/base.rb +398 -0
  45. data/lib/fcid/session.rb +5 -0
  46. data/lib/fcid/user.rb +50 -0
  47. data/lib/fcid/user_methods.rb +39 -0
  48. data/lib/fcid/version.rb +3 -0
  49. data/lib/fcid.rb +12 -0
  50. data/lib/fcid_client.rb +14 -0
  51. data/lib/tasks/fcid_tasks.rake +4 -0
  52. data/lib/vendor/authenticated_system.rb +153 -0
  53. data/lib/vendor/authenticated_test_helper.rb +11 -0
  54. data/test/dummy/README.rdoc +261 -0
  55. data/test/dummy/Rakefile +7 -0
  56. data/test/dummy/app/assets/javascripts/application.js +15 -0
  57. data/test/dummy/app/assets/stylesheets/application.css +13 -0
  58. data/test/dummy/app/controllers/application_controller.rb +3 -0
  59. data/test/dummy/app/helpers/application_helper.rb +2 -0
  60. data/test/dummy/app/views/layouts/application.html.erb +14 -0
  61. data/test/dummy/config/application.rb +59 -0
  62. data/test/dummy/config/boot.rb +10 -0
  63. data/test/dummy/config/database.yml +25 -0
  64. data/test/dummy/config/environment.rb +5 -0
  65. data/test/dummy/config/environments/development.rb +37 -0
  66. data/test/dummy/config/environments/production.rb +67 -0
  67. data/test/dummy/config/environments/test.rb +37 -0
  68. data/test/dummy/config/initializers/backtrace_silencers.rb +7 -0
  69. data/test/dummy/config/initializers/inflections.rb +15 -0
  70. data/test/dummy/config/initializers/mime_types.rb +5 -0
  71. data/test/dummy/config/initializers/secret_token.rb +7 -0
  72. data/test/dummy/config/initializers/session_store.rb +8 -0
  73. data/test/dummy/config/initializers/wrap_parameters.rb +14 -0
  74. data/test/dummy/config/locales/en.yml +5 -0
  75. data/test/dummy/config/routes.rb +58 -0
  76. data/test/dummy/config.ru +4 -0
  77. data/test/dummy/public/404.html +26 -0
  78. data/test/dummy/public/422.html +26 -0
  79. data/test/dummy/public/500.html +25 -0
  80. data/test/dummy/public/favicon.ico +0 -0
  81. data/test/dummy/script/rails +6 -0
  82. data/test/fcid_test.rb +9 -0
  83. data/test/test_helper.rb +15 -0
  84. metadata +169 -0
@@ -0,0 +1,58 @@
1
+ Dummy::Application.routes.draw do
2
+ # The priority is based upon order of creation:
3
+ # first created -> highest priority.
4
+
5
+ # Sample of regular route:
6
+ # match 'products/:id' => 'catalog#view'
7
+ # Keep in mind you can assign values other than :controller and :action
8
+
9
+ # Sample of named route:
10
+ # match 'products/:id/purchase' => 'catalog#purchase', :as => :purchase
11
+ # This route can be invoked with purchase_url(:id => product.id)
12
+
13
+ # Sample resource route (maps HTTP verbs to controller actions automatically):
14
+ # resources :products
15
+
16
+ # Sample resource route with options:
17
+ # resources :products do
18
+ # member do
19
+ # get 'short'
20
+ # post 'toggle'
21
+ # end
22
+ #
23
+ # collection do
24
+ # get 'sold'
25
+ # end
26
+ # end
27
+
28
+ # Sample resource route with sub-resources:
29
+ # resources :products do
30
+ # resources :comments, :sales
31
+ # resource :seller
32
+ # end
33
+
34
+ # Sample resource route with more complex sub-resources
35
+ # resources :products do
36
+ # resources :comments
37
+ # resources :sales do
38
+ # get 'recent', :on => :collection
39
+ # end
40
+ # end
41
+
42
+ # Sample resource route within a namespace:
43
+ # namespace :admin do
44
+ # # Directs /admin/products/* to Admin::ProductsController
45
+ # # (app/controllers/admin/products_controller.rb)
46
+ # resources :products
47
+ # end
48
+
49
+ # You can have the root of your site routed with "root"
50
+ # just remember to delete public/index.html.
51
+ # root :to => 'welcome#index'
52
+
53
+ # See how all your routes lay out with "rake routes"
54
+
55
+ # This is a legacy wild controller route that's not recommended for RESTful applications.
56
+ # Note: This route will make all actions in every controller accessible via GET requests.
57
+ # match ':controller(/:action(/:id))(.:format)'
58
+ end
@@ -0,0 +1,4 @@
1
+ # This file is used by Rack-based servers to start the application.
2
+
3
+ require ::File.expand_path('../config/environment', __FILE__)
4
+ run Dummy::Application
@@ -0,0 +1,26 @@
1
+ <!DOCTYPE html>
2
+ <html>
3
+ <head>
4
+ <title>The page you were looking for doesn't exist (404)</title>
5
+ <style type="text/css">
6
+ body { background-color: #fff; color: #666; text-align: center; font-family: arial, sans-serif; }
7
+ div.dialog {
8
+ width: 25em;
9
+ padding: 0 4em;
10
+ margin: 4em auto 0 auto;
11
+ border: 1px solid #ccc;
12
+ border-right-color: #999;
13
+ border-bottom-color: #999;
14
+ }
15
+ h1 { font-size: 100%; color: #f00; line-height: 1.5em; }
16
+ </style>
17
+ </head>
18
+
19
+ <body>
20
+ <!-- This file lives in public/404.html -->
21
+ <div class="dialog">
22
+ <h1>The page you were looking for doesn't exist.</h1>
23
+ <p>You may have mistyped the address or the page may have moved.</p>
24
+ </div>
25
+ </body>
26
+ </html>
@@ -0,0 +1,26 @@
1
+ <!DOCTYPE html>
2
+ <html>
3
+ <head>
4
+ <title>The change you wanted was rejected (422)</title>
5
+ <style type="text/css">
6
+ body { background-color: #fff; color: #666; text-align: center; font-family: arial, sans-serif; }
7
+ div.dialog {
8
+ width: 25em;
9
+ padding: 0 4em;
10
+ margin: 4em auto 0 auto;
11
+ border: 1px solid #ccc;
12
+ border-right-color: #999;
13
+ border-bottom-color: #999;
14
+ }
15
+ h1 { font-size: 100%; color: #f00; line-height: 1.5em; }
16
+ </style>
17
+ </head>
18
+
19
+ <body>
20
+ <!-- This file lives in public/422.html -->
21
+ <div class="dialog">
22
+ <h1>The change you wanted was rejected.</h1>
23
+ <p>Maybe you tried to change something you didn't have access to.</p>
24
+ </div>
25
+ </body>
26
+ </html>
@@ -0,0 +1,25 @@
1
+ <!DOCTYPE html>
2
+ <html>
3
+ <head>
4
+ <title>We're sorry, but something went wrong (500)</title>
5
+ <style type="text/css">
6
+ body { background-color: #fff; color: #666; text-align: center; font-family: arial, sans-serif; }
7
+ div.dialog {
8
+ width: 25em;
9
+ padding: 0 4em;
10
+ margin: 4em auto 0 auto;
11
+ border: 1px solid #ccc;
12
+ border-right-color: #999;
13
+ border-bottom-color: #999;
14
+ }
15
+ h1 { font-size: 100%; color: #f00; line-height: 1.5em; }
16
+ </style>
17
+ </head>
18
+
19
+ <body>
20
+ <!-- This file lives in public/500.html -->
21
+ <div class="dialog">
22
+ <h1>We're sorry, but something went wrong.</h1>
23
+ </div>
24
+ </body>
25
+ </html>
File without changes
@@ -0,0 +1,6 @@
1
+ #!/usr/bin/env ruby
2
+ # This command will automatically be run when you run "rails" with Rails 3 gems installed from the root of your application.
3
+
4
+ APP_PATH = File.expand_path('../../config/application', __FILE__)
5
+ require File.expand_path('../../config/boot', __FILE__)
6
+ require 'rails/commands'
data/test/fcid_test.rb ADDED
@@ -0,0 +1,9 @@
1
+ # encoding: utf-8
2
+ require 'test/unit'
3
+
4
+ class FcidTest < Test::Unit::TestCase
5
+ # Replace this with your real tests.
6
+ def test_this_plugin
7
+ flunk
8
+ end
9
+ end
@@ -0,0 +1,15 @@
1
+ # Configure Rails Environment
2
+ ENV["RAILS_ENV"] = "test"
3
+
4
+ require File.expand_path("../dummy/config/environment.rb", __FILE__)
5
+ require "rails/test_help"
6
+
7
+ Rails.backtrace_cleaner.remove_silencers!
8
+
9
+ # Load support files
10
+ Dir["#{File.dirname(__FILE__)}/support/**/*.rb"].each { |f| require f }
11
+
12
+ # Load fixtures from the engine
13
+ if ActiveSupport::TestCase.method_defined?(:fixture_path=)
14
+ ActiveSupport::TestCase.fixture_path = File.expand_path("../fixtures", __FILE__)
15
+ end
metadata ADDED
@@ -0,0 +1,169 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: fcid
3
+ version: !ruby/object:Gem::Version
4
+ prerelease: false
5
+ segments:
6
+ - 0
7
+ - 0
8
+ - 1
9
+ version: 0.0.1
10
+ platform: ruby
11
+ authors:
12
+ - aotianlong
13
+ autorequire:
14
+ bindir: bin
15
+ cert_chain: []
16
+
17
+ date: 2013-06-19 00:00:00 +08:00
18
+ default_executable:
19
+ dependencies:
20
+ - !ruby/object:Gem::Dependency
21
+ name: rails
22
+ prerelease: false
23
+ requirement: &id001 !ruby/object:Gem::Requirement
24
+ requirements:
25
+ - - ~>
26
+ - !ruby/object:Gem::Version
27
+ segments:
28
+ - 3
29
+ - 2
30
+ - 13
31
+ version: 3.2.13
32
+ type: :runtime
33
+ version_requirements: *id001
34
+ - !ruby/object:Gem::Dependency
35
+ name: sqlite3
36
+ prerelease: false
37
+ requirement: &id002 !ruby/object:Gem::Requirement
38
+ requirements:
39
+ - - ">="
40
+ - !ruby/object:Gem::Version
41
+ segments:
42
+ - 0
43
+ version: "0"
44
+ type: :development
45
+ version_requirements: *id002
46
+ description: Description of Fcid.
47
+ email:
48
+ - aotianlong@gmail.com
49
+ executables: []
50
+
51
+ extensions: []
52
+
53
+ extra_rdoc_files: []
54
+
55
+ files:
56
+ - app/controllers/fcid/feeds_controller.rb
57
+ - app/controllers/fcid/friendships_controller.rb
58
+ - app/controllers/fcid/messages_controller.rb
59
+ - app/controllers/fcid/session_controller.rb
60
+ - app/controllers/fcid/users_controller.rb
61
+ - app/views/fcid/_ajax_new.html.erb
62
+ - app/views/fcid/_announce.html.erb
63
+ - app/views/fcid/_footer.html.erb
64
+ - app/views/fcid/_navigation.html.erb
65
+ - app/views/fcid/create.html.erb
66
+ - app/views/fcid/feeds/_feed.html.erb
67
+ - app/views/fcid/feeds/index.html.erb
68
+ - app/views/fcid/feeds/show.html.erb
69
+ - app/views/fcid/friendships/index.html.erb
70
+ - app/views/fcid/friendships/new.html.erb
71
+ - app/views/fcid/messages/_message.html.erb
72
+ - app/views/fcid/messages/_message_tr.html.erb
73
+ - app/views/fcid/messages/index.html.erb
74
+ - app/views/fcid/new.html.erb
75
+ - app/views/fcid/session/new.html.erb
76
+ - app/views/fcid/users/_ajax_new.html.erb
77
+ - app/views/fcid/users/create.html.erb
78
+ - app/views/fcid/users/new.html.erb
79
+ - app/views/friendships/new.html.erb
80
+ - app/views/session/new.html.erb
81
+ - config/routes.rb
82
+ - lib/fcid/active_resource/exceptions.rb
83
+ - lib/fcid/active_resource/extra_params.rb
84
+ - lib/fcid/active_resource/session.rb
85
+ - lib/fcid/base.rb
86
+ - lib/fcid/config.rb
87
+ - lib/fcid/consumer.rb
88
+ - lib/fcid/controller.rb
89
+ - lib/fcid/email.rb
90
+ - lib/fcid/engine.rb
91
+ - lib/fcid/feed.rb
92
+ - lib/fcid/friendship.rb
93
+ - lib/fcid/helpers.rb
94
+ - lib/fcid/message.rb
95
+ - lib/fcid/notification.rb
96
+ - lib/fcid/publisher/base.rb
97
+ - lib/fcid/session.rb
98
+ - lib/fcid/user.rb
99
+ - lib/fcid/user_methods.rb
100
+ - lib/fcid/version.rb
101
+ - lib/fcid.rb
102
+ - lib/fcid_client.rb
103
+ - lib/tasks/fcid_tasks.rake
104
+ - lib/vendor/authenticated_system.rb
105
+ - lib/vendor/authenticated_test_helper.rb
106
+ - MIT-LICENSE
107
+ - Rakefile
108
+ - README.rdoc
109
+ has_rdoc: true
110
+ homepage: http://www.aotianlong.com
111
+ licenses: []
112
+
113
+ post_install_message:
114
+ rdoc_options: []
115
+
116
+ require_paths:
117
+ - lib
118
+ required_ruby_version: !ruby/object:Gem::Requirement
119
+ requirements:
120
+ - - ">="
121
+ - !ruby/object:Gem::Version
122
+ segments:
123
+ - 0
124
+ version: "0"
125
+ required_rubygems_version: !ruby/object:Gem::Requirement
126
+ requirements:
127
+ - - ">="
128
+ - !ruby/object:Gem::Version
129
+ segments:
130
+ - 0
131
+ version: "0"
132
+ requirements: []
133
+
134
+ rubyforge_project:
135
+ rubygems_version: 1.3.6
136
+ signing_key:
137
+ specification_version: 3
138
+ summary: Summary of Fcid.
139
+ test_files:
140
+ - test/dummy/app/assets/javascripts/application.js
141
+ - test/dummy/app/assets/stylesheets/application.css
142
+ - test/dummy/app/controllers/application_controller.rb
143
+ - test/dummy/app/helpers/application_helper.rb
144
+ - test/dummy/app/views/layouts/application.html.erb
145
+ - test/dummy/config/application.rb
146
+ - test/dummy/config/boot.rb
147
+ - test/dummy/config/database.yml
148
+ - test/dummy/config/environment.rb
149
+ - test/dummy/config/environments/development.rb
150
+ - test/dummy/config/environments/production.rb
151
+ - test/dummy/config/environments/test.rb
152
+ - test/dummy/config/initializers/backtrace_silencers.rb
153
+ - test/dummy/config/initializers/inflections.rb
154
+ - test/dummy/config/initializers/mime_types.rb
155
+ - test/dummy/config/initializers/secret_token.rb
156
+ - test/dummy/config/initializers/session_store.rb
157
+ - test/dummy/config/initializers/wrap_parameters.rb
158
+ - test/dummy/config/locales/en.yml
159
+ - test/dummy/config/routes.rb
160
+ - test/dummy/config.ru
161
+ - test/dummy/public/404.html
162
+ - test/dummy/public/422.html
163
+ - test/dummy/public/500.html
164
+ - test/dummy/public/favicon.ico
165
+ - test/dummy/Rakefile
166
+ - test/dummy/README.rdoc
167
+ - test/dummy/script/rails
168
+ - test/fcid_test.rb
169
+ - test/test_helper.rb