social_cheesecake 0.0.4 → 0.1.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (65) hide show
  1. data/.gitignore +2 -0
  2. data/Rakefile +111 -0
  3. data/app/assets/javascripts/kinetic.js +448 -407
  4. data/app/assets/javascripts/social_cheesecake.js +1 -2
  5. data/app/assets/javascripts/socialcheesecake/_header.js +28 -0
  6. data/app/assets/javascripts/socialcheesecake/actor.js +104 -41
  7. data/app/assets/javascripts/socialcheesecake/cheesecake.js +26 -31
  8. data/app/assets/javascripts/socialcheesecake/grid.js +53 -12
  9. data/app/assets/javascripts/socialcheesecake/sector.js +108 -93
  10. data/app/assets/javascripts/socialcheesecake/text.js +39 -36
  11. data/lib/generators/social_cheesecake/install_generator.rb +10 -0
  12. data/lib/social_cheesecake/version.rb +1 -1
  13. data/social_cheesecake.gemspec +1 -0
  14. data/test/dummy/.gitignore +15 -0
  15. data/test/dummy/Gemfile +34 -0
  16. data/test/dummy/README +261 -0
  17. data/test/dummy/Rakefile +7 -0
  18. data/test/dummy/app/assets/images/beatriz.png +0 -0
  19. data/test/dummy/app/assets/images/rails.png +0 -0
  20. data/test/dummy/app/assets/images/youngAlberto.png +0 -0
  21. data/test/dummy/app/assets/javascripts/application.js +10 -0
  22. data/test/dummy/app/assets/stylesheets/application.css +7 -0
  23. data/test/dummy/app/controllers/application_controller.rb +3 -0
  24. data/test/dummy/app/helpers/application_helper.rb +2 -0
  25. data/test/dummy/app/mailers/.gitkeep +0 -0
  26. data/test/dummy/app/models/.gitkeep +0 -0
  27. data/test/dummy/app/views/layouts/application.html.erb +14 -0
  28. data/test/dummy/config/application.rb +48 -0
  29. data/test/dummy/config/boot.rb +6 -0
  30. data/test/dummy/config/database.yml +25 -0
  31. data/test/dummy/config/environment.rb +5 -0
  32. data/test/dummy/config/environments/development.rb +30 -0
  33. data/test/dummy/config/environments/production.rb +60 -0
  34. data/test/dummy/config/environments/test.rb +39 -0
  35. data/test/dummy/config/initializers/backtrace_silencers.rb +7 -0
  36. data/test/dummy/config/initializers/inflections.rb +10 -0
  37. data/test/dummy/config/initializers/mime_types.rb +5 -0
  38. data/test/dummy/config/initializers/secret_token.rb +7 -0
  39. data/test/dummy/config/initializers/session_store.rb +8 -0
  40. data/test/dummy/config/initializers/wrap_parameters.rb +14 -0
  41. data/test/dummy/config/locales/en.yml +5 -0
  42. data/test/dummy/config/routes.rb +58 -0
  43. data/test/dummy/config.ru +4 -0
  44. data/test/dummy/db/seeds.rb +7 -0
  45. data/test/dummy/doc/README_FOR_APP +2 -0
  46. data/test/dummy/lib/assets/.gitkeep +0 -0
  47. data/test/dummy/lib/tasks/.gitkeep +0 -0
  48. data/test/dummy/log/.gitkeep +0 -0
  49. data/test/dummy/public/404.html +26 -0
  50. data/test/dummy/public/422.html +26 -0
  51. data/test/dummy/public/500.html +26 -0
  52. data/test/dummy/public/favicon.ico +0 -0
  53. data/test/dummy/public/index.html +133 -0
  54. data/test/dummy/public/robots.txt +5 -0
  55. data/test/dummy/script/rails +6 -0
  56. data/test/dummy/test/fixtures/.gitkeep +0 -0
  57. data/test/dummy/test/functional/.gitkeep +0 -0
  58. data/test/dummy/test/integration/.gitkeep +0 -0
  59. data/test/dummy/test/performance/browsing_test.rb +12 -0
  60. data/test/dummy/test/test_helper.rb +13 -0
  61. data/test/dummy/test/unit/.gitkeep +0 -0
  62. data/test/dummy/vendor/assets/stylesheets/.gitkeep +0 -0
  63. data/test/dummy/vendor/plugins/.gitkeep +0 -0
  64. metadata +114 -29
  65. data/app/assets/javascripts/socialCheesecake.js +0 -161
@@ -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,7 @@
1
+ # This file should contain all the record creation needed to seed the database with its default values.
2
+ # The data can then be loaded with the rake db:seed (or created alongside the db with db:setup).
3
+ #
4
+ # Examples:
5
+ #
6
+ # cities = City.create([{ :name => 'Chicago' }, { :name => 'Copenhagen' }])
7
+ # Mayor.create(:name => 'Emanuel', :city => cities.first)
@@ -0,0 +1,2 @@
1
+ Use this README file to introduce your application and point to useful places in the API for learning more.
2
+ Run "rake doc:app" to generate API documentation for your models, controllers, helpers, and libraries.
File without changes
File without changes
File without changes
@@ -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,26 @@
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
+ <p>We've been notified about this issue and we'll take a look at it shortly.</p>
24
+ </div>
25
+ </body>
26
+ </html>
File without changes
@@ -0,0 +1,133 @@
1
+ <!DOCTYPE HTML>
2
+ <html>
3
+ <head>
4
+ <meta charset="utf-8">
5
+ <style>
6
+ body {
7
+ margin: 0px;
8
+ padding: 0px;
9
+ }
10
+ canvas {
11
+ }
12
+ #grid {
13
+ position: absolute;
14
+ left: 460px;
15
+ top: 30px;
16
+ }
17
+ #grid .actor {
18
+ width: 64px;
19
+ height: 64px;
20
+ float: left;
21
+ margin: 5px;
22
+ }
23
+ #grid .actor.focused {
24
+ border: 2px solid #00F;
25
+ background-color: #006;
26
+ margin: 3px;
27
+ }
28
+ #grid .actor img {
29
+ width: 64px;
30
+ height: 64px;
31
+ }
32
+ </style>
33
+ <script src="assets/application.js"></script>
34
+ <script>
35
+ window.requestAnimFrame = (function(callback) {
36
+ return window.requestAnimationFrame || window.webkitRequestAnimationFrame || window.mozRequestAnimationFrame || window.oRequestAnimationFrame || window.msRequestAnimationFrame ||
37
+ function(callback) {
38
+ window.setTimeout(callback, 1000 / 60);
39
+ };
40
+ })();
41
+ var cheese;
42
+ window.onload = function() {
43
+ var cheesecakeData = {
44
+ container: {
45
+ id: "container",
46
+ width: 440,
47
+ height: 440
48
+ },
49
+ grid: {
50
+ id: "grid",
51
+ divIdPrefix: "actor_"
52
+ },
53
+ rMax : 200,
54
+ center: {x : 220, y : 220},
55
+ sectors: [
56
+ {name:"John Connor Lider de la revolucion" , subsectors : [
57
+ {name : "Cassidy",
58
+ actors: [
59
+ [0],
60
+ [1],
61
+ [2]
62
+ ]
63
+ },
64
+ {name : "Cassidy2"}
65
+ ]},
66
+ { name:"3,14159265358979323846264338327950288419716939937510" , subsectors : [
67
+ {name : "Abc"},
68
+ {name : "Cassidy2",
69
+ actors: [
70
+ [3],
71
+ [4]
72
+ ]
73
+ }
74
+ ]},
75
+ { name:"Luke I am your father", subsectors : [
76
+ {name : "Luke I am your father"}
77
+ ]},
78
+ { name:"Olivia",subsectors : [
79
+ {name : "Dunham"},
80
+ {name : "FBI"}
81
+ ]},
82
+ { name:"Altivia",subsectors : [
83
+ {name : "Dunham"},
84
+ {name : "FBI"}
85
+ ]},
86
+ { name:"Walter",subsectors : [
87
+ {name : "Bishop"},
88
+ {name : "Craziness",
89
+ actors: [[3]]
90
+ }]
91
+ },
92
+ { name:"Nina",subsectors : [
93
+ {name : "Massive Dynamic"}
94
+ ]}
95
+ ]
96
+ };
97
+ cheese = new socialCheesecake.Cheesecake(cheesecakeData);
98
+ /*
99
+ new socialCheesecake.Actor({parent : cheese, imgSrc: "images/youngAlberto.png",
100
+ width: 64, height: 64, x : 500, y : 80});
101
+ new socialCheesecake.Actor({parent : cheese, imgSrc: "images/youngAlberto.png",
102
+ width: 64, height: 64, x : 600, y : 80}); */
103
+ };
104
+
105
+ </script>
106
+ </head>
107
+ <body id="container" onmousedown="return false;">
108
+ <div id="grid">
109
+ <div class="actor" id="actor_0"><img src="assets/youngAlberto.png">
110
+ </div>
111
+ <div class="actor" id="actor_1"><img src="assets/beatriz.png">
112
+ </div>
113
+ <div class="actor" id="actor_2"><img src="assets/youngAlberto.png">
114
+ </div>
115
+ <div class="actor" id="actor_3"><img src="assets/beatriz.png">
116
+ </div>
117
+ <div class="actor" id="actor_4"><img src="assets/youngAlberto.png">
118
+ </div>
119
+ </div>
120
+ <div id="buttons">
121
+ <button type="button" onclick="cheese.grid.actors[0].focus()">Focus 0</button>
122
+ <button type="button" onclick="cheese.grid.actors[0].unfocus()">unfocus 0</button>
123
+ <button type="button" onclick="cheese.grid.actors[0].hide()">hide 0</button>
124
+ <button type="button" onclick="cheese.grid.actors[0].show()">show 0</button>
125
+ <button type="button" onclick="cheese.grid.actors[0].fadeOut(1000)">fadeOut 0</button>
126
+ <button type="button" onclick="cheese.grid.actors[0].fadeIn(1000)">fadeIn 0</button>
127
+ <button type="button" onclick="cheese.grid.focusAll()">Focus all!</button>
128
+ <button type="button" onclick="cheese.grid.unfocusAll()">Unfocus all!</button>
129
+ <button type="button" onclick="cheese.grid.hideAll()">Hide all!</button>
130
+ <button type="button" onclick="cheese.grid.showAll()">Show all!</button>
131
+ </div>
132
+ </body>
133
+ </html>
@@ -0,0 +1,5 @@
1
+ # See http://www.robotstxt.org/wc/norobots.html for documentation on how to use the robots.txt file
2
+ #
3
+ # To ban all spiders from the entire site uncomment the next two lines:
4
+ # User-Agent: *
5
+ # Disallow: /
@@ -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'
File without changes
File without changes
File without changes
@@ -0,0 +1,12 @@
1
+ require 'test_helper'
2
+ require 'rails/performance_test_help'
3
+
4
+ class BrowsingTest < ActionDispatch::PerformanceTest
5
+ # Refer to the documentation for all available options
6
+ # self.profile_options = { :runs => 5, :metrics => [:wall_time, :memory]
7
+ # :output => 'tmp/performance', :formats => [:flat] }
8
+
9
+ def test_homepage
10
+ get '/'
11
+ end
12
+ end
@@ -0,0 +1,13 @@
1
+ ENV["RAILS_ENV"] = "test"
2
+ require File.expand_path('../../config/environment', __FILE__)
3
+ require 'rails/test_help'
4
+
5
+ class ActiveSupport::TestCase
6
+ # Setup all fixtures in test/fixtures/*.(yml|csv) for all tests in alphabetical order.
7
+ #
8
+ # Note: You'll currently still have to declare fixtures explicitly in integration tests
9
+ # -- they do not yet inherit this setting
10
+ fixtures :all
11
+
12
+ # Add more helper methods to be used by all tests here...
13
+ end
File without changes
File without changes
File without changes
metadata CHANGED
@@ -1,61 +1,146 @@
1
- --- !ruby/object:Gem::Specification
1
+ --- !ruby/object:Gem::Specification
2
2
  name: social_cheesecake
3
- version: !ruby/object:Gem::Version
4
- version: 0.0.4
3
+ version: !ruby/object:Gem::Version
4
+ hash: 27
5
5
  prerelease:
6
+ segments:
7
+ - 0
8
+ - 1
9
+ - 0
10
+ version: 0.1.0
6
11
  platform: ruby
7
- authors:
8
- - Alicia Díez
12
+ authors:
13
+ - "Alicia D\xC3\xADez"
9
14
  autorequire:
10
15
  bindir: bin
11
16
  cert_chain: []
12
- date: 2011-12-19 00:00:00.000000000Z
13
- dependencies: []
17
+
18
+ date: 2011-12-22 00:00:00 Z
19
+ dependencies:
20
+ - !ruby/object:Gem::Dependency
21
+ name: railties
22
+ prerelease: false
23
+ requirement: &id001 !ruby/object:Gem::Requirement
24
+ none: false
25
+ requirements:
26
+ - - ">="
27
+ - !ruby/object:Gem::Version
28
+ hash: 5
29
+ segments:
30
+ - 3
31
+ - 1
32
+ - 3
33
+ version: 3.1.3
34
+ type: :runtime
35
+ version_requirements: *id001
14
36
  description: Wrapper gem for socialCheesecake.js
15
- email:
37
+ email:
16
38
  - adiezbal@gmail.com
17
39
  executables: []
40
+
18
41
  extensions: []
42
+
19
43
  extra_rdoc_files: []
20
- files:
44
+
45
+ files:
21
46
  - .gitignore
22
47
  - Gemfile
23
48
  - Rakefile
24
49
  - app/assets/javascripts/kinetic.js
25
- - app/assets/javascripts/socialCheesecake.js
26
50
  - app/assets/javascripts/social_cheesecake.js
51
+ - app/assets/javascripts/socialcheesecake/_header.js
52
+ - app/assets/javascripts/socialcheesecake/actor.js
53
+ - app/assets/javascripts/socialcheesecake/cheesecake.js
54
+ - app/assets/javascripts/socialcheesecake/grid.js
55
+ - app/assets/javascripts/socialcheesecake/sector.js
56
+ - app/assets/javascripts/socialcheesecake/text.js
57
+ - lib/generators/social_cheesecake/install_generator.rb
27
58
  - lib/social_cheesecake.rb
28
59
  - lib/social_cheesecake/engine.rb
29
60
  - lib/social_cheesecake/version.rb
30
61
  - social_cheesecake.gemspec
31
- - app/assets/javascripts/socialcheesecake/sector.js
32
- - app/assets/javascripts/socialcheesecake/actor.js
33
- - app/assets/javascripts/socialcheesecake/text.js
34
- - app/assets/javascripts/socialcheesecake/cheesecake.js
35
- - app/assets/javascripts/socialcheesecake/grid.js
36
- homepage: ''
62
+ - test/dummy/.gitignore
63
+ - test/dummy/Gemfile
64
+ - test/dummy/README
65
+ - test/dummy/Rakefile
66
+ - test/dummy/app/assets/images/beatriz.png
67
+ - test/dummy/app/assets/images/rails.png
68
+ - test/dummy/app/assets/images/youngAlberto.png
69
+ - test/dummy/app/assets/javascripts/application.js
70
+ - test/dummy/app/assets/stylesheets/application.css
71
+ - test/dummy/app/controllers/application_controller.rb
72
+ - test/dummy/app/helpers/application_helper.rb
73
+ - test/dummy/app/mailers/.gitkeep
74
+ - test/dummy/app/models/.gitkeep
75
+ - test/dummy/app/views/layouts/application.html.erb
76
+ - test/dummy/config.ru
77
+ - test/dummy/config/application.rb
78
+ - test/dummy/config/boot.rb
79
+ - test/dummy/config/database.yml
80
+ - test/dummy/config/environment.rb
81
+ - test/dummy/config/environments/development.rb
82
+ - test/dummy/config/environments/production.rb
83
+ - test/dummy/config/environments/test.rb
84
+ - test/dummy/config/initializers/backtrace_silencers.rb
85
+ - test/dummy/config/initializers/inflections.rb
86
+ - test/dummy/config/initializers/mime_types.rb
87
+ - test/dummy/config/initializers/secret_token.rb
88
+ - test/dummy/config/initializers/session_store.rb
89
+ - test/dummy/config/initializers/wrap_parameters.rb
90
+ - test/dummy/config/locales/en.yml
91
+ - test/dummy/config/routes.rb
92
+ - test/dummy/db/seeds.rb
93
+ - test/dummy/doc/README_FOR_APP
94
+ - test/dummy/lib/assets/.gitkeep
95
+ - test/dummy/lib/tasks/.gitkeep
96
+ - test/dummy/log/.gitkeep
97
+ - test/dummy/public/404.html
98
+ - test/dummy/public/422.html
99
+ - test/dummy/public/500.html
100
+ - test/dummy/public/favicon.ico
101
+ - test/dummy/public/index.html
102
+ - test/dummy/public/robots.txt
103
+ - test/dummy/script/rails
104
+ - test/dummy/test/fixtures/.gitkeep
105
+ - test/dummy/test/functional/.gitkeep
106
+ - test/dummy/test/integration/.gitkeep
107
+ - test/dummy/test/performance/browsing_test.rb
108
+ - test/dummy/test/test_helper.rb
109
+ - test/dummy/test/unit/.gitkeep
110
+ - test/dummy/vendor/assets/stylesheets/.gitkeep
111
+ - test/dummy/vendor/plugins/.gitkeep
112
+ homepage: ""
37
113
  licenses: []
114
+
38
115
  post_install_message:
39
116
  rdoc_options: []
40
- require_paths:
117
+
118
+ require_paths:
41
119
  - lib
42
- required_ruby_version: !ruby/object:Gem::Requirement
120
+ required_ruby_version: !ruby/object:Gem::Requirement
43
121
  none: false
44
- requirements:
45
- - - ! '>='
46
- - !ruby/object:Gem::Version
47
- version: '0'
48
- required_rubygems_version: !ruby/object:Gem::Requirement
122
+ requirements:
123
+ - - ">="
124
+ - !ruby/object:Gem::Version
125
+ hash: 3
126
+ segments:
127
+ - 0
128
+ version: "0"
129
+ required_rubygems_version: !ruby/object:Gem::Requirement
49
130
  none: false
50
- requirements:
51
- - - ! '>='
52
- - !ruby/object:Gem::Version
53
- version: '0'
131
+ requirements:
132
+ - - ">="
133
+ - !ruby/object:Gem::Version
134
+ hash: 3
135
+ segments:
136
+ - 0
137
+ version: "0"
54
138
  requirements: []
139
+
55
140
  rubyforge_project: social_cheesecake
56
- rubygems_version: 1.8.12
141
+ rubygems_version: 1.8.10
57
142
  signing_key:
58
143
  specification_version: 3
59
144
  summary: Wrapper gem for socialCheesecake.js
60
145
  test_files: []
61
- has_rdoc:
146
+