diff --git a/.gitignore b/.gitignore index 999b067f4..81ed4083b 100644 --- a/.gitignore +++ b/.gitignore @@ -4,8 +4,13 @@ config/fb_config.yml config/initializers/secret_token.rb .bundle -# Uploded files and local files +# Generated files log/* +public/stylesheets/application.css +public/stylesheets/sessions.css +public/stylesheets/ui.css + +# Uploded files and local files public/uploads/* public/source.tar tmp/**/* diff --git a/Gemfile b/Gemfile index 95146c630..9e9cce592 100644 --- a/Gemfile +++ b/Gemfile @@ -1,6 +1,6 @@ source 'http://rubygems.org' -gem 'rails', '3.0.0' +gem 'rails', '3.0.1' gem 'bundler', '>= 1.0.0' #Security diff --git a/Gemfile.lock b/Gemfile.lock deleted file mode 100644 index 3aeac65b3..000000000 --- a/Gemfile.lock +++ /dev/null @@ -1,301 +0,0 @@ -GIT - remote: git://github.com/Empact/roxml.git - revision: 33034d3e632b3a14565a791af0a63c7e23ec0de4 - specs: - roxml (3.1.5) - activesupport (>= 2.3.0) - nokogiri (>= 1.3.3) - -GIT - remote: git://github.com/collectiveidea/devise-mongo_mapper - revision: fa2f20310e0988295adc192255d3b1cedee1b412 - specs: - devise-mongo_mapper (0.0.1) - devise (~> 1.1.0) - -GIT - remote: git://github.com/dcu/magent.git - revision: fe08cc6e9d4c1772035f84bcfb665d17b00ac625 - specs: - magent (1.0.0) - em-websocket - mongo - uuidtools - -GIT - remote: git://github.com/igrigorik/em-http-request.git - revision: bf62d67fc72d6e701be5037e239dd470194b8e45 - ref: bf62d67fc72d6e701be5 - specs: - em-http-request (0.2.13) - addressable (>= 2.0.0) - eventmachine (>= 0.12.9) - -GIT - remote: git://github.com/jnunemaker/mongomapper.git - revision: fd59b0ab068be7321f8e84b9dc12fb4fa6b8535d - branch: rails3 - specs: - mongo_mapper (0.8.4) - activemodel (~> 3.0.0) - activesupport (~> 3.0.0) - plucky (~> 0.3.6) - -GIT - remote: git://github.com/rsofaer/carrierwave.git - revision: 9edb8bdddd2236742a85bfd7b260387498d01f88 - branch: master - specs: - carrierwave (0.4.4) - -GIT - remote: git://github.com/rsofaer/redfinger.git - revision: 07721f46d02b9d3aa04880788fecb0b4c1b284d7 - specs: - redfinger (0.0.6) - hashie - nokogiri (>= 1.4.0) - rest-client (>= 1.5.0) - -GIT - remote: git://github.com/rsofaer/sprinkle.git - revision: 7c744ed158dda1f99a015e6a29d086e80bd8c635 - specs: - sprinkle (0.3.1) - activesupport (>= 3.0.0beta4) - capistrano (>= 2.5.5) - highline (>= 1.4.0) - -GEM - remote: http://rubygems.org/ - specs: - abstract (1.0.0) - actionmailer (3.0.0) - actionpack (= 3.0.0) - mail (~> 2.2.5) - actionpack (3.0.0) - activemodel (= 3.0.0) - activesupport (= 3.0.0) - builder (~> 2.1.2) - erubis (~> 2.6.6) - i18n (~> 0.4.1) - rack (~> 1.2.1) - rack-mount (~> 0.6.12) - rack-test (~> 0.5.4) - tzinfo (~> 0.3.23) - activemodel (3.0.0) - activesupport (= 3.0.0) - builder (~> 2.1.2) - i18n (~> 0.4.1) - activerecord (3.0.0) - activemodel (= 3.0.0) - activesupport (= 3.0.0) - arel (~> 1.0.0) - tzinfo (~> 0.3.23) - activeresource (3.0.0) - activemodel (= 3.0.0) - activesupport (= 3.0.0) - activesupport (3.0.0) - addressable (2.2.2) - archive-tar-minitar (0.5.2) - arel (1.0.1) - activesupport (~> 3.0.0) - aws (2.3.21) - http_connection - uuidtools - xml-simple - bcrypt-ruby (2.1.2) - bson (1.1) - bson_ext (1.1) - builder (2.1.2) - capistrano (2.5.19) - highline - net-scp (>= 1.0.0) - net-sftp (>= 2.0.0) - net-ssh (>= 2.0.14) - net-ssh-gateway (>= 1.0.0) - capybara (0.3.9) - culerity (>= 0.2.4) - mime-types (>= 1.16) - nokogiri (>= 1.3.3) - rack (>= 1.0.0) - rack-test (>= 0.5.4) - selenium-webdriver (>= 0.0.3) - childprocess (0.0.7) - ffi (~> 0.6.3) - columnize (0.3.1) - crack (0.1.8) - cucumber (0.9.2) - builder (~> 2.1.2) - diff-lcs (~> 1.1.2) - gherkin (~> 2.2.5) - json (~> 1.4.6) - term-ansicolor (~> 1.0.5) - cucumber-rails (0.3.2) - cucumber (>= 0.8.0) - culerity (0.2.12) - daemons (1.1.0) - database_cleaner (0.5.2) - devise (1.1.3) - bcrypt-ruby (~> 2.1.2) - warden (~> 0.10.7) - devise_invitable (0.3.4) - devise (~> 1.1.0) - diff-lcs (1.1.2) - em-websocket (0.1.4) - addressable (>= 2.1.1) - eventmachine (>= 0.12.9) - erubis (2.6.6) - abstract (>= 1.0.0) - eventmachine (0.12.10) - factory_girl (1.3.2) - factory_girl_rails (1.0) - factory_girl (~> 1.3) - rails (>= 3.0.0.beta4) - ffi (0.6.3) - rake (>= 0.8.7) - gherkin (2.2.8) - json (~> 1.4.6) - term-ansicolor (~> 1.0.5) - haml (3.0.21) - hashie (0.4.0) - highline (1.6.1) - http_connection (1.3.1) - i18n (0.4.1) - json (1.4.6) - json_pure (1.4.6) - linecache19 (0.5.11) - ruby_core_source (>= 0.1.4) - mail (2.2.7) - activesupport (>= 2.3.6) - mime-types - treetop (>= 1.4.5) - mime-types (1.16) - mini_fb (1.1.3) - hashie - rest-client - mini_magick (2.3) - subexec (~> 0.0.4) - mocha (0.9.8) - rake - mongo (1.1) - bson (>= 1.0.5) - net-scp (1.0.4) - net-ssh (>= 1.99.1) - net-sftp (2.0.5) - net-ssh (>= 2.0.9) - net-ssh (2.0.23) - net-ssh-gateway (1.0.1) - net-ssh (>= 1.99.1) - nokogiri (1.4.3.1) - plucky (0.3.6) - mongo (~> 1.1) - polyglot (0.3.1) - pubsubhubbub (0.1.1) - em-http-request (>= 0.1.5) - eventmachine (>= 0.12.9) - rack (1.2.1) - rack-mount (0.6.13) - rack (>= 1.0.0) - rack-test (0.5.6) - rack (>= 1.0) - rails (3.0.0) - actionmailer (= 3.0.0) - actionpack (= 3.0.0) - activerecord (= 3.0.0) - activeresource (= 3.0.0) - activesupport (= 3.0.0) - bundler (~> 1.0.0) - railties (= 3.0.0) - railties (3.0.0) - actionpack (= 3.0.0) - activesupport (= 3.0.0) - rake (>= 0.8.4) - thor (~> 0.14.0) - rake (0.8.7) - rest-client (1.6.1) - mime-types (>= 1.16) - rspec (2.0.0) - rspec-core (= 2.0.0) - rspec-expectations (= 2.0.0) - rspec-mocks (= 2.0.0) - rspec-core (2.0.0) - rspec-expectations (2.0.0) - diff-lcs (>= 1.1.2) - rspec-mocks (2.0.0) - rspec-core (= 2.0.0) - rspec-expectations (= 2.0.0) - rspec-rails (2.0.0) - rspec (= 2.0.0) - ruby-debug-base19 (0.11.24) - columnize (>= 0.3.1) - linecache19 (>= 0.5.11) - ruby_core_source (>= 0.1.4) - ruby-debug19 (0.11.6) - columnize (>= 0.3.1) - linecache19 (>= 0.5.11) - ruby-debug-base19 (>= 0.11.19) - ruby_core_source (0.1.4) - archive-tar-minitar (>= 0.5.2) - rubyzip (0.9.4) - selenium-webdriver (0.0.29) - childprocess (>= 0.0.7) - ffi (~> 0.6.3) - json_pure - rubyzip - subexec (0.0.4) - term-ansicolor (1.0.5) - thin (1.2.7) - daemons (>= 1.0.9) - eventmachine (>= 0.12.6) - rack (>= 1.0.0) - thor (0.14.3) - treetop (1.4.8) - polyglot (>= 0.3.1) - tzinfo (0.3.23) - uuidtools (2.1.1) - warden (0.10.7) - rack (>= 1.0.0) - webmock (1.4.0) - addressable (>= 2.2.2) - crack (>= 0.1.7) - will_paginate (3.0.pre2) - xml-simple (1.0.12) - -PLATFORMS - ruby - -DEPENDENCIES - addressable - aws - bson (= 1.1) - bson_ext (= 1.1) - bundler (>= 1.0.0) - capybara (~> 0.3.9) - carrierwave! - cucumber-rails (= 0.3.2) - database_cleaner - devise (= 1.1.3) - devise-mongo_mapper! - devise_invitable (~> 0.3.4) - em-http-request! - em-websocket - factory_girl_rails - haml - json - magent! - mini_fb - mini_magick - mocha - mongo_mapper! - pubsubhubbub - rails (= 3.0.0) - redfinger! - roxml! - rspec (>= 2.0.0) - rspec-rails (>= 2.0.0) - ruby-debug19 - sprinkle! - thin - webmock - will_paginate (= 3.0.pre2) diff --git a/app/controllers/requests_controller.rb b/app/controllers/requests_controller.rb index 79a29461e..630cb9b32 100644 --- a/app/controllers/requests_controller.rb +++ b/app/controllers/requests_controller.rb @@ -33,7 +33,7 @@ class RequestsController < ApplicationController aspect = current_user.aspect_by_id(params[:request][:aspect_id]) begin - rel_hash = relationship_flow(params[:request][:destination_url]) + rel_hash = relationship_flow(params[:request][:destination_url].strip) rescue Exception => e raise e unless e.message.include? "not found" flash[:error] = I18n.t 'requests.create.error' diff --git a/app/models/request.rb b/app/models/request.rb index d57470745..d910cfaa2 100644 --- a/app/models/request.rb +++ b/app/models/request.rb @@ -48,6 +48,7 @@ class Request protected def clean_link if self.destination_url + self.destination_url = self.destination_url.strip self.destination_url = 'http://' + self.destination_url unless self.destination_url.match('https?://') self.destination_url = self.destination_url + '/' if self.destination_url[-1,1] != '/' end diff --git a/app/views/layouts/application.html.haml b/app/views/layouts/application.html.haml index 961dd9e0b..b4fb5fbac 100644 --- a/app/views/layouts/application.html.haml +++ b/app/views/layouts/application.html.haml @@ -11,6 +11,8 @@ %meta{"http-equiv"=>"Content-Type", :content=>"text/html; charset=utf-8"}/ = stylesheet_link_tag "blueprint/screen", :media => 'screen' + = stylesheet_link_tag "blueprint/print", :media => 'print' + = stylesheet_link_tag "application", "ui" = stylesheet_link_tag "/../javascripts/fancybox/jquery.fancybox-1.3.1" diff --git a/app/views/users/_account.haml b/app/views/users/_account.haml index e6b1a7ff1..e76ae6cc6 100644 --- a/app/views/users/_account.haml +++ b/app/views/users/_account.haml @@ -5,8 +5,13 @@ %h2 Account -%h3 Change Password += link_to "invite friends", new_user_invitation_path(current_user) +%br +%br +%br + +%h3 Change Password = form_for @user do |f| = f.error_messages @@ -23,12 +28,14 @@ = f.submit 'Change password' %h3 Export Data - = link_to "download my xml", users_export_path, :class => "button" = link_to "download my photos", users_export_photos_path, :class => "button" -%h3 Close Account +%br +%br +%br +%h3 Close Account = link_to "Close Account", current_user, :confirm => "Are you sure?", :method => :delete, :class => "button" diff --git a/app/views/users/_profile.haml b/app/views/users/_profile.haml index a9ea4ad4d..cbb2b6d6a 100644 --- a/app/views/users/_profile.haml +++ b/app/views/users/_profile.haml @@ -4,8 +4,6 @@ %h2 Profile -= link_to new_user_invitation_path(current_user) - = form_for @user do |f| = f.error_messages diff --git a/db/seeds/dev.rb b/db/seeds/dev.rb index 873c58ec5..b321124f8 100644 --- a/db/seeds/dev.rb +++ b/db/seeds/dev.rb @@ -40,4 +40,4 @@ user2.person.save! aspect = user.aspect(:name => "other dudes") request = user.send_friend_request_to(user2, aspect) reversed_request = user2.accept_friend_request( request.id, user2.aspect(:name => "presidents").id ) -user.receive reversed_request.to_diaspora_xml +user.receive reversed_request.to_diaspora_xml, user2.person diff --git a/db/seeds/tom.rb b/db/seeds/tom.rb index 947ba0b21..074b37caf 100644 --- a/db/seeds/tom.rb +++ b/db/seeds/tom.rb @@ -41,6 +41,6 @@ user2.person.save! aspect = user.aspect(:name => "other dudes") request = user.send_friend_request_to(user2, aspect) reversed_request = user2.accept_friend_request( request.id, user2.aspect(:name => "presidents").id ) -user.receive reversed_request.to_diaspora_xml +user.receive reversed_request.to_diaspora_xml, user2.person user.aspect(:name => "Presidents") diff --git a/public/stylesheets/application.css b/public/stylesheets/application.css deleted file mode 100644 index 6bacdffbb..000000000 --- a/public/stylesheets/application.css +++ /dev/null @@ -1,744 +0,0 @@ -@font-face { - font-family: "BrandonGrotesqueLightRegular"; - src: url("brandongrotesque_light/Brandon_light-webfont.eot"); - src: local("☺"), url("brandongrotesque_light/Brandon_light-webfont.woff") format("woff"), url("brandongrotesque_light/Brandon_light-webfont.ttf") format("truetype"), url("brandongrotesque_light/Brandon_light-webfont.svg#webfont") format("svg"); - font { - weight: normal; - style: normal; } } - -body { - padding: 2em; - margin: 0; } - -a { - color: #107fc9; - text-decoration: none; } - a:hover { - color: #22aae0; } - a:active { - color: #005d9c; } - -h1, h2, h3, h4 { - color: #444444; } - -h3 { - font-size: 18px; } - -.avatar { - width: 50px; - height: 50px; } - -#flash_notice, -#flash_error, -#flash_alert { - z-index: 100; - position: fixed; - color: white; - top: -100px; - left: 0; - width: 100%; - padding: 1em; - box-shadow: 0 1px 2px #333333; - -moz-box-shadow: 0 1px 2px #333333; - -webkit-box-shadow: 0 1px 2px #333333; - font-weight: bold; } - -#flash_notice { - background-color: rgba(127, 255, 36, 0.85); - border-bottom: solid 1px #66cc66; - text-shadow: 0 1px #66cc66; } - -#flash_error, -#flash_alert { - background-color: rgba(208, 49, 43, 0.85); - border-bottom: solid 1px #cc6666; - text-shadow: 0 1px #cc6666; } - -.fieldWithErrors { - display: inline; } - -.error_messages { - width: 400px; - border: 2px solid #cf0000; - padding: 0; - padding-bottom: 12px; - margin-bottom: 20px; - background-color: #f0f0f0; - font-size: 12px; } - .error_messages h2 { - text-align: left; - padding: 5px 5px 5px 15px; - margin: 0; - font-weight: bold; - font-size: 12px; - background-color: #cc0000; } - .error_messages p { - margin: 8px 10px; } - .error_messages ul { - margin: 0; } - -header { - z-index: 4; - position: relative; - margin: -2em; - margin-bottom: 2em; - color: black; - background: -webkit-gradient(linear, 0% 0%, 0% 100%, from(#666666), to(#222222)); - background: -moz-linear-gradient(19% 75% 90deg, #222222, #666666); - background-color: #666666; - padding: 0; - padding-top: 5px; - border-bottom: 1px solid #cccccc; } - header a { - color: #999999; } - header a:hover { - background: none; - color: #eeeeee; } - header #diaspora_text { - display: inline; - font-family: "BrandonGrotesqueLightRegular"; - font-size: 16px; - border: none; - color: white; } - header #session_action { - position: absolute; - display: inline; - top: 0; - right: 0; } - header #session_action ul { - list-style: none; - padding: 0; - margin: 0; - display: inline; } - header #session_action ul li { - display: inline; - margin-right: 1em; } - header #session_action ul li:last-child { - margin-right: 0; } - header #aspect_header { - -webkit-box-shadow: 0px -4px 6px -2px #777777; - background: -webkit-gradient(linear, 0% 0%, 0% 100%, from(#f7f7f7), to(#eeeeee)); - background: -moz-linear-gradient(19% 75% 90deg, #eeeeee, #f7f7f7); - background-color: #eeeeee; - border-top: 1px solid white; - padding: 20px 0; } - header #aspect_header h1 { - text-shadow: 0 1px 0 white; } - header #aspect_header a { - color: #444444; } - header #aspect_header a:hover { - background: none; - color: #999999; } - header #aspect_header .page_title { - text-transform: uppercase; - text-shadow: 0 1px 0 white; } - -ul#stream { - margin: 0; - padding: 0; } - ul#stream > li { - min-height: 50px; - list-style: none; - padding: 12px 0; - border-bottom: 1px solid #eeeeee; } - ul#stream > li:hover { - background-color: #fafafa; - border-bottom: 1px solid #dddddd; } - ul#stream > li:hover .destroy_link { - display: inline; } - ul#stream .right { - top: 0; } - -li.message { - position: relative; - line-height: 19px; - font-family: "Arial", "Helvetica", sans-serif; - color: #777777; } - li.message .avatar { - float: left; - margin-right: 15px; } - li.message .delete:hover { - background: #eeeeee; } - li.message .content { - max-width: 610px; - margin-top: -4px; - padding-left: 65px; - color: #444444; - font-weight: normal; - font-size: 14px; } - li.message .content .from { - font-family: "Helvetica neue", Arial, Helvetica, sans-serif; - text-shadow: 0 1px white; } - li.message .content .from .aspect { - cursor: default; - display: inline; - color: #bbbbbb; - font-size: 12px; } - li.message .content .from .aspect a { - font-weight: normal; - color: #bbbbbb; } - li.message .content .from .aspect a:hover { - text-decoration: underline; } - li.message .content .from .aspect a:active { - color: #999999; } - li.message .content .from .aspect ul { - display: inline; - margin: 0; - padding: 0; - list-style: none; } - li.message .content .from .aspect ul li { - display: inline; } - li.message .content .from .aspect ul li:after { - content: ","; } - li.message .content .from .aspect ul li:last-child:after { - content: ""; } - li.message .content .from a { - font-weight: bold; } - li.message .content div.info { - color: #444444; - font-size: 13px; } - li.message .content div.info a { - color: #cccccc; } - li.message .content div.info .time { - font-weight: bold; - margin-right: 5px; } - li.message .content div.info .time a { - color: #bbbbbb; } - li.message:hover div.info a, li.message:hover .time a { - color: #107fc9; } - li.message:hover div.info a:hover, li.message:hover .time a:hover { - color: #22aae0; } - li.message:hover div.info a:active, li.message:hover .time a:active { - color: #005d9c; } - -.destroy_link .reshare_pane .reshare_button a.inactive { - color: #cccccc; - cursor: default; } - .destroy_link .reshare_pane .reshare_button a.inactive:hover { - text-decoration: none; } - -.destroy_link .reshare_pane { - margin-left: 5px; - margin-right: 5px; - display: inline; - position: relative; } - .destroy_link .reshare_pane ul.reshare_box { - width: 150px; - display: none; - z-index: 10; - position: absolute; - margin-top: 5px; - padding: 0; - background-color: #fafafa; - list-style: none; - border: 5px solid #666666; - -webkit-box-shadow: 0 0 5px #666666; - -moz-box-shadow: 0 0 5px #666666; - text-shadow: 0 2px white; - color: black; } - .destroy_link .reshare_pane ul.reshare_box > li { - font-weight: bold; - color: #cccccc; - border-top: 1px solid white; - border-bottom: 1px solid #cccccc; } - .destroy_link .reshare_pane ul.reshare_box > li:first-child { - border-top: none; } - .destroy_link .reshare_pane ul.reshare_box > li:last-child { - border-bottom: none; } - .destroy_link .reshare_pane ul.reshare_box > li a { - display: block; - height: 100%; - padding: 2px 5px; } - .destroy_link .reshare_pane ul.reshare_box > li a:hover { - background-color: #eeeeee; - text-decoration: none; } - .destroy_link .reshare_pane ul.reshare_box > li a:active { - background-color: #cccccc; } - -form { - position: relative; - font-size: 120%; - margin: 1em; - margin-left: 0em; } - -#user_name { - margin-bottom: 20px; } - #user_name img { - margin-right: 10px; - display: inline-block; - float: left; - height: 40px; } - #user_name h1 { - margin-bottom: 7px; - line-height: 18px; } - #user_name h1 a { - color: black; } - #user_name span { - size: small; - font-weight: normal; - color: #999999; } - #user_name #latest_message_time { - font-style: italic; } - #user_name ul { - display: inline; - margin: 0; - padding: 0; - list-style: none; } - #user_name ul > li { - display: inline; - margin-right: 1em; } - -#stream div.comments { - display: none; } - #stream div.comments .avatar { - width: 35px; - height: 35px; - margin-right: 10px; } - -input.comment_submit { - display: none; - margin-right: -10px; } - -ul.comment_set { - margin: 0; - margin-top: 1em; - padding: 0; - list-style: none; - max-width: 610px; } - ul.comment_set textarea { - width: 100%; } - ul.comment_set li.comment { - margin-bottom: 0.5em; - background-color: rgba(10, 81, 109, 0.05); - padding: 0.6em; - border-bottom: 1px solid #dddddd; } - ul.comment_set li.comment .content { - color: #777777; - margin-top: -2px; - padding-left: 45px; - font-size: 12px; - line-height: 18px; } - ul.comment_set li.comment .content .from a { - color: #444444; } - ul.comment_set li.comment .content div.time { - color: #bbbbbb; - font-size: 11px; - font-weight: bold; } - ul.comment_set li.comment form { - margin-top: -5px; - margin-bottom: 0; - font-size: 1em; } - ul.comment_set li.comment form textarea { - font-size: 1em; } - -.profile_photo img { - height: 150px; - width: 150px; } - -#profile ul { - list-style-type: none; - margin: 0; - padding: 0; } - -#stream img.person_picture, #profile img.person_picture, -.comments img.person_picture { - border-radius: 3px; - -webkit-border-radius: 3px; - -moz-border-radius: 3px; - display: inline block; - height: 30px; - display: absolute; - float: left; - margin-right: 10px; } - -.pagination a { - padding: 3px; } - -li.message .from .destroy_link { - display: none; - position: absolute; - right: 0; - font-size: 12px; } - li.message .from .destroy_link a { - color: #999999; - font-weight: normal; } - li.message .from .destroy_link a:hover { - text-decoration: underline; } - -.request_buttons { - position: absolute; - right: 0; - display: inline; - list-style: none; - margin: 0; - padding: 0; } - .request_buttons > li { - display: inline; } - .request_buttons > li:first-child { - margin-right: 1em; } - -#show_photo { - text-align: center; - min-height: 200px; } - #show_photo img { - max-width: 100%; } - #show_photo .caption { - margin-top: 10px; - margin-bottom: 25px; - font-size: larger; } - -#debug_info { - margin-top: 20px; - color: #cccccc; } - #debug_info h5 { - color: #cccccc; } - -input[type='text'], -input[type='password'], -textarea { - font-family: "Arial", "Helvetica", sans-serif; - font-size: 14px; - padding: 0.3em; - display: block; - width: 66%; - border: 1px solid #cccccc; - height: auto; - border-radius: 5px; - -webkit-border-radius: 5px; - -moz-border-radius: 5px; } - -.submit_block { - text-align: right; - font-size: 12px; } - -form p { - position: relative; - padding: 0; - margin: 0; } - -label { - font-family: "Arial", "Helvetica", sans-serif; - font-weight: normal; - color: #999999; - position: absolute; - top: 3px; - left: 0.48em; - text-shadow: 0 1px 1px #eeeeee; } - -#publisher { - color: #999999; - position: relative; } - #publisher .avatar { - float: left; - margin-right: 15px; } - #publisher p { - position: absolute; - left: 0; - top: 0; } - #publisher form { - display: inline; } - #publisher form input[type='submit'] { - display: block; - margin-right: 20px; - width: 100%; } - #publisher textarea { - width: 570px; - height: 42px; - margin-top: 0; - margin-bottom: 0; } - #publisher .buttons { - float: right; } - -#image_picker .small_photo { - height: 100px; - position: relative; - display: inline-block; - margin-right: 1em; - margin-bottom: 1em; } - #image_picker .small_photo img { - border-radius: 3px; } - #image_picker .small_photo input[type='checkbox'] { - position: absolute; } -#image_picker .selected { - -webkit-box-shadow: 0 3px 6px black; - -moz-box-shadow: 0 3px 6px black; - border: 1px solid white; } - -/* cycle it! */ -.album { - position: relative; - height: 200px; - width: 200px; - display: inline-block; } - .album img { - width: 200px; - height: 200px; } - .album .name { - position: absolute; - z-index: 6; - padding: 1em; - background: rgba(0, 0, 0, 0.8); - bottom: 20px; - font-size: 18px; - text-shadow: 0 2px 0 black; } - .album .name .time { - font-size: 12px; } - .album .name .time a { - font-weight: normal; } - .album div.image_cycle img { - display: none; } - -.field_with_submit input[type='text'] { - width: 82%; - display: inline; } - -h1.big_text { - position: relative; - line-height: auto; - border-bottom: 1px solid #666666; } - h1.big_text .right { - top: -6px; } - -#content_bottom .right { - top: -5px; } - -.right { - display: inline; - float: right; } - -.back { - font-size: 12px; - font-weight: normal; } - -#content_bottom { - position: relative; - line-height: 36px; - margin: 0; - margin-top: 25px; - margin-bottom: 25px; - min-height: 36px; - border-top: 1px solid #999999; - border-bottom: 2px solid #eeeeee; } - -.show_post_comments ul.comment_set { - width: 100%; } - -.sub_header { - position: relative; - text-align: center; - font-style: italic; - margin-bottom: 20px; - color: #999999; } - -.image_thumb { - display: inline-block; - width: 100px; - min-width: 100px; - height: 100px; - min-height: 100px; } - .image_thumb img { - display: none; } - -.image_cycle img { - display: none; } - -#aspect_nav { - color: black; - margin-top: 8px; - margin-bottom: 1px; - font-family: "Arial", "Helvetica", sans-serif; } - #aspect_nav #aspect_manage_button { - display: inline; } - #aspect_nav #aspect_manage_button a { - color: #999999; } - #aspect_nav ul { - margin: 0; - padding: 0; - list-style: none; } - #aspect_nav ul > li { - padding: 0; - display: inline; - margin-right: 2px; } - #aspect_nav ul > li a { - text-shadow: 0 1px 0 #444444; - line-height: 22px; - padding: 3px 8px; - padding-bottom: 3px; - color: #999999; } - #aspect_nav ul > li a:hover { - background-color: #4e4e4e; - color: #cccccc; } - #aspect_nav ul > li.selected a { - -webkit-border-radius: 5px 5px 0 0; - -moz-border-radius: 5px 5px 0 0; - -webkit-box-shadow: 0px -4px 6px -2px #777777; - -moz-box-shadow: 0px -4px 6px -2px #777777; - text-shadow: 0 1px 0 white; - padding-top: 4px; - padding-bottom: 5px; - line-height: 18px; - font-weight: bold; - background-color: #eeeeee; - background: -webkit-gradient(linear, 0% 0%, 0% 100%, from(white), to(#f7f7f7)); - background: -moz-linear-gradient(19% 75% 90deg, #f7f7f7, white); - border: 1px solid white; - border-bottom: 1px solid #f7f7f7; - color: #444444; } - #aspect_nav ul > li.selected a:hover { - background-color: #efefef; } - #aspect_nav ul > li.selected a a { - color: black; } - #aspect_nav .new_requests { - color: red; } - -#global_search { - display: inline; - position: relative; - opacity: 0.5; } - #global_search form { - display: inline; } - #global_search form input { - display: inline; - font-size: 12px; - border: none; } - #global_search form input[type='text'] { - width: 200px; - padding: 2px; } - #global_search form label { - font-size: 12px; - margin-top: -3px; } - -.aspect, -.requests, -.remove { - list-style: none; } - .aspect h3, - .requests h3, - .remove h3 { - display: inline-block; } - .aspect .tip, - .requests .tip, - .remove .tip { - display: none; - color: #999999; - margin-left: 0.5em; } - .aspect .edit_name_field:hover .tip, - .requests .edit_name_field:hover .tip, - .remove .edit_name_field:hover .tip { - display: inline; } - .aspect .aspect_name, - .requests .aspect_name, - .remove .aspect_name { - position: relative; } - .aspect .aspect_name ul.tools, - .requests .aspect_name ul.tools, - .remove .aspect_name ul.tools { - position: absolute; - top: 5px; - right: 0; - display: inline; - padding: 0; - margin: 0; - list-style: none; } - .aspect .aspect_name ul.tools li, - .requests .aspect_name ul.tools li, - .remove .aspect_name ul.tools li { - display: inline; - margin-right: 1em; } - .aspect .aspect_name ul.tools li:last-child, - .requests .aspect_name ul.tools li:last-child, - .remove .aspect_name ul.tools li:last-child { - margin-right: 0; } - .aspect .grey, - .requests .grey, - .remove .grey { - color: #999999; - cursor: default; - text-shadow: 0 1px white; } - .aspect ul.dropzone, - .requests ul.dropzone, - .remove ul.dropzone { - min-height: 20px; - margin: 0; - margin-bottom: 25px; - background-color: #efefef; - border: 1px solid #cccccc; - list-style: none; - padding: 15px; } - .aspect ul.dropzone.active, - .requests ul.dropzone.active, - .remove ul.dropzone.active { - background-color: #fafafa; } - .aspect .person, - .aspect .requested_person, - .requests .person, - .requests .requested_person, - .remove .person, - .remove .requested_person { - display: inline-block; - padding: 5px; - cursor: move; - margin: 5px; - z-index: 10; - text-align: center; - width: 125px; - height: 120px; } - .aspect .person img, - .aspect .requested_person img, - .requests .person img, - .requests .requested_person img, - .remove .person img, - .remove .requested_person img { - height: 100px; - width: 100px; - display: inline-block; } - .aspect .person:active, - .aspect .requested_person:active, - .requests .person:active, - .requests .requested_person:active, - .remove .person:active, - .remove .requested_person:active { - z-index: 20; - color: #666666; } - .aspect .person:active img, - .aspect .requested_person:active img, - .requests .person:active img, - .requests .requested_person:active img, - .remove .person:active img, - .remove .requested_person:active img { - -webkit-box-shadow: 0 1px 3px #333333; - -moz-box-shadow: 0 2px 4px #333333; - opacity: 0.9; } - -ul#settings_nav { - list-style: none; - padding: 0; - marign: 0; - font-size: larger; } - ul#settings_nav > li a { - font-size: smaller; - display: block; - height: 100%; - border-bottom: 1px solid #eeeeee; - padding: 2px; } - -.settings_pane { - display: none; } - -#fancybox-close:hover { - background-color: transparent; } - -#friend_pictures { - margin-top: 12px; - line-height: 1em; } - #friend_pictures img { - margin-right: -1px; - width: 35px; - height: 35px; } - -#thumbnails { - line-height: 14px; } - -#aspect_list { - margin: 0; - padding: 0; } diff --git a/public/stylesheets/sass/application.sass b/public/stylesheets/sass/application.sass index c70992407..0b8368b6b 100644 --- a/public/stylesheets/sass/application.sass +++ b/public/stylesheets/sass/application.sass @@ -114,7 +114,7 @@ header :bottom 1px solid #ccc a - :color #999 + :color #CCC &:hover :background none @@ -266,8 +266,8 @@ li.message :size 14px div.info - :color #444 - :font-size 13px + :color #999 + :font-size smaller a :color #ccc .time @@ -768,12 +768,12 @@ h1.big_text :padding 3px 8px :bottom 3px - :color #999 + :color #CCC &:hover :background :color #4e4e4e - :color #ccc + :color #eee &.selected a :-webkit-border-radius 5px 5px 0 0 diff --git a/public/stylesheets/sessions.css b/public/stylesheets/sessions.css deleted file mode 100644 index 2b5199d25..000000000 --- a/public/stylesheets/sessions.css +++ /dev/null @@ -1,123 +0,0 @@ -@font-face { - font-family: "BrandonGrotesqueLightRegular"; - src: url("brandongrotesque_light/Brandon_light-webfont.eot"); - src: local("☺"), url("brandongrotesque_light/Brandon_light-webfont.woff") format("woff"), url("brandongrotesque_light/Brandon_light-webfont.ttf") format("truetype"), url("brandongrotesque_light/Brandon_light-webfont.svg#webfont") format("svg"); - font { - weight: normal; - style: normal; } } - -#flash_notice, -#flash_error, -#flash_alert { - z-index: 100; - top: 32px; - position: absolute; - color: black; - width: 400px; - margin: 0 0 0 -200px; - left: 50%; - text-align: center; - font-size: 14px; - padding: 3px 0; } - -#flash_notice { - background-color: #ccffcc; - border: solid 1px #66cc66; } - -#flash_error, -#flash_alert { - background-color: #ffcccc; - border: solid 1px #cc6666; } - -.fieldWithErrors { - display: inline; } - -.error_messages { - width: 400px; - border: 2px solid #cf0000; - padding: 0; - padding-bottom: 12px; - margin-bottom: 20px; - background-color: #f0f0f0; - font-size: 12px; } - .error_messages h2 { - text-align: left; - padding: 5px 5px 5px 15px; - margin: 0; - font-weight: bold; - font-size: 12px; - background-color: #cc0000; } - .error_messages p { - margin: 8px 10px; } - .error_messages ul { - margin: 0; } - -/* via blueprint */ -html { - font-size: 100.01%; } - -/* via blueprint */ -body { - font-size: 75%; - font-family: "Helvetica Neue", Arial, Helvetica, sans-serif; - color: #222222; - background: white; - margin-left: 100px; } - -/* via blueprint */ -input[type=text], -input[type=password], -textarea, select { - background-color: white; - border: 1px solid #bbbbbb; } - -/* via blueprint */ -input[type=text]:focus, -input[type=password]:focus, -input.text:focus, -input.title:focus, -textarea:focus, select:focus { - border-color: #666666; } - -#huge_text { - font-size: 40px; - font-family: "BrandonGrotesqueLightRegular"; - line-height: 120px; - color: #333333; - text-shadow: 0 1px 1px #999999; } - -input { - font-size: 14px; } - -form p { - position: relative; - padding: 0; } - -label { - color: #999999; - position: absolute; - padding-top: 7px; - left: 8px; - font-size: 14px; - font-weight: normal; } - -input[type='text'], -input[type='password'] { - font-family: "Helvetica Neue", Arial, Helvetica, sans-serif; - padding: 0.3em; - width: 395px; - border-top: 1px solid #999999; } - -#user { - display: inline; - width: 500px; } - #user .username { - width: 200px; - display: inline; } - #user .username input { - display: inline; - width: 200px; } - #user .user_network { - width: 200px; - display: inline; - font-size: 18px; } diff --git a/public/stylesheets/ui.css b/public/stylesheets/ui.css deleted file mode 100644 index 6a0dd8850..000000000 --- a/public/stylesheets/ui.css +++ /dev/null @@ -1,73 +0,0 @@ -.button, .button_set { - font-family: "Lucida Grande", sans-serif; - font-style: normal; - display: inline; - padding: 4px; - font-size: 12px; - line-height: 100%; - text-shadow: 0 1px 0 white; - min-height: 10px; - background: -webkit-gradient(linear, 0% 29%, 0% 85%, from(#fcfcfc), to(#f6f6f6)); - background: -moz-linear-gradient(top, #fcfcfc, #f6f6f6); - border: 1px solid #eeeeee; - border-bottom: 1px solid #999999; - border-left: 1px solid #cccccc; - border-right: 1px solid #cccccc; - border-radius: 3px; - -moz-border-radius: 3px; - -webkit-border-radius: 3px; - cursor: pointer; - box-shadow: 0 1px 1px #eeeeee; - -webkit-box-shadow: 0 1px 1px #eeeeee; - -moz-box-shadow: 0 1px 1px #eeeeee; - font-weight: normal; - color: #666666; } - .button:hover, .button_set:hover { - color: #666666; - background: -webkit-gradient(linear, 0% 29%, 0% 85%, from(#fafafa), to(#f0f0f0)); - background: -moz-linear-gradient(top, #fafafa, #f0f0f0); } - .button:active, .button_set:active { - color: #666666; - background: -webkit-gradient(linear, 0% 29%, 0% 85%, from(#f0f0f0), to(#fafafa)); - background: -moz-linear-gradient(top, #f0f0f0, #fafafa); - border-top: 1px solid #cccccc; } - -ul.button_set { - padding-left: 0; - padding-right: 0; } - ul.button_set > li { - padding: 5px; - display: inline; - height: 100%; - border-left: 1px solid #cccccc; - border-right: 1px solid white; - margin-left: -3px; - margin-right: -3px; } - ul.button_set > li:first-child { - margin-left: 0; - border-left: none; } - ul.button_set > li:last-child { - margin-right: 0; - border-right: none; } - -.button .selected, .button_set .selected { - background: -webkit-gradient(linear, 0% 29%, 0% 85%, from(#f0f0f0), to(#fafafa)); - background: -moz-linear-gradient(top, #f0f0f0, #fafafa); - border-top: 1px solid #aaaaaa; } - -.right { - position: absolute; - right: 0; } - -.contextual_pane { - z-index: 20; - position: absolute; - display: none; - background-color: white; - border: 4px solid black; - border-radius: 3px; - -moz-border-radius: 3px; - -webkit-border-radius: 3px; - box-shadow: 0 0 5px black; - -webkit-box-shadow: 0 0 10px black; - padding: 2em; } diff --git a/spec/models/request_spec.rb b/spec/models/request_spec.rb index c40d1a25e..dc5145f2a 100644 --- a/spec/models/request_spec.rb +++ b/spec/models/request_spec.rb @@ -38,4 +38,11 @@ describe Request do Request.for_user(user).all.count.should == 1 end + it 'should strip the destination url' do + person_request = Request.new + person_request.destination_url = " http://google.com/ " + person_request.send(:clean_link) + person_request.destination_url.should == "http://google.com/" + end + end diff --git a/spec/models/user/invite_spec.rb b/spec/models/user/invite_spec.rb index 117bb5b37..180b2d874 100644 --- a/spec/models/user/invite_spec.rb +++ b/spec/models/user/invite_spec.rb @@ -13,17 +13,27 @@ describe User do let(:invited_user3) { create_user_with_invitation("abc", :email => "email@example.com", :inviter => inviter_with_3_invites)} context "creating invites" do - it 'should invite the user' do - pending "weird wrong number of arguments error (0 for 2), which changes if you put in two args" - #User.should_receive(:invite!).and_return(invited_user) - inviter.invite_user(:email => "email@example.com") + before do + deliverable = Object.new + deliverable.stub!(:deliver) + ::Devise.mailer.stub!(:invitation).and_return(deliverable) end - it 'should add the inviter to the invited_user' do - User.should_receive(:invite!).and_return(invited_user) - invited_user = inviter.invite_user(:email => "email@example.com") + it 'creates a user' do + lambda { + inviter.invite_user(:email => "joe@example.com") + }.should change(User, :count).by(1) + end + + it 'sends email to the invited user' do + ::Devise.mailer.should_receive(:invitation).once + inviter.invite_user(:email => "ian@example.com") + end + + it 'adds the inviter to the invited_user' do + invited_user = inviter.invite_user(:email => "marcy@example.com") invited_user.reload - invited_user.inviters.include?(inviter).should be true + invited_user.inviters.include?(inviter).should be_true end end diff --git a/spec/models/user_spec.rb b/spec/models/user_spec.rb index 8da51bc4a..cf7c4c51a 100644 --- a/spec/models/user_spec.rb +++ b/spec/models/user_spec.rb @@ -86,6 +86,16 @@ describe User do user.should_receive(:remove_person) user.destroy end + + + it 'should remove all aspects' do + pending "this should use :dependant => :destroy on the many assoc...but that screws this test suite..." + aspects = user.aspects + user.destroy + proc{ aspects.reload }.should raise_error /does not exist/ + + end + describe '#remove_person' do it 'should remove the person object' do