From 5e8d34621a10363787a5d382c7669210ef7b5d15 Mon Sep 17 00:00:00 2001 From: Sarah Mei Date: Thu, 14 Oct 2010 20:51:54 -0700 Subject: [PATCH 1/9] ohai rails 3.0.1 --- Gemfile | 2 +- Gemfile.lock | 66 +++++++++++++++++++++++++++++----------------------- 2 files changed, 38 insertions(+), 30 deletions(-) diff --git a/Gemfile b/Gemfile index b7a54ebf9..aefce4437 100644 --- a/Gemfile +++ b/Gemfile @@ -1,6 +1,6 @@ source 'http://rubygems.org' -gem 'rails', '3.0.0' +gem 'rails', '>= 3.0.0' gem 'bundler', '>= 1.0.0' #Security diff --git a/Gemfile.lock b/Gemfile.lock index 41e008130..14e3f10ef 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -15,9 +15,9 @@ GIT GIT remote: git://github.com/dcu/magent.git - revision: fe08cc6e9d4c1772035f84bcfb665d17b00ac625 + revision: 59b8563961b830f491cd6f6592cced67791ce0ef specs: - magent (1.0.0) + magent (0.5.0) em-websocket mongo uuidtools @@ -70,12 +70,12 @@ GEM remote: http://rubygems.org/ specs: abstract (1.0.0) - actionmailer (3.0.0) - actionpack (= 3.0.0) + actionmailer (3.0.1) + actionpack (= 3.0.1) mail (~> 2.2.5) - actionpack (3.0.0) - activemodel (= 3.0.0) - activesupport (= 3.0.0) + actionpack (3.0.1) + activemodel (= 3.0.1) + activesupport (= 3.0.1) builder (~> 2.1.2) erubis (~> 2.6.6) i18n (~> 0.4.1) @@ -83,19 +83,19 @@ GEM rack-mount (~> 0.6.12) rack-test (~> 0.5.4) tzinfo (~> 0.3.23) - activemodel (3.0.0) - activesupport (= 3.0.0) + activemodel (3.0.1) + activesupport (= 3.0.1) builder (~> 2.1.2) i18n (~> 0.4.1) - activerecord (3.0.0) - activemodel (= 3.0.0) - activesupport (= 3.0.0) + activerecord (3.0.1) + activemodel (= 3.0.1) + activesupport (= 3.0.1) arel (~> 1.0.0) tzinfo (~> 0.3.23) - activeresource (3.0.0) - activemodel (= 3.0.0) - activesupport (= 3.0.0) - activesupport (3.0.0) + activeresource (3.0.1) + activemodel (= 3.0.1) + activesupport (= 3.0.1) + activesupport (3.0.1) addressable (2.2.2) arel (1.0.1) activesupport (~> 3.0.0) @@ -122,6 +122,7 @@ GEM 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) @@ -162,6 +163,7 @@ GEM i18n (0.4.1) json (1.4.6) json_pure (1.4.6) + linecache (0.43) mail (2.2.7) activesupport (>= 2.3.6) mime-types @@ -195,17 +197,17 @@ GEM 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) + rails (3.0.1) + actionmailer (= 3.0.1) + actionpack (= 3.0.1) + activerecord (= 3.0.1) + activeresource (= 3.0.1) + activesupport (= 3.0.1) bundler (~> 1.0.0) - railties (= 3.0.0) - railties (3.0.0) - actionpack (= 3.0.0) - activesupport (= 3.0.0) + railties (= 3.0.1) + railties (3.0.1) + actionpack (= 3.0.1) + activesupport (= 3.0.1) rake (>= 0.8.4) thor (~> 0.14.0) rake (0.8.7) @@ -223,6 +225,11 @@ GEM rspec-expectations (= 2.0.0) rspec-rails (2.0.0) rspec (= 2.0.0) + ruby-debug (0.10.3) + columnize (>= 0.1) + ruby-debug-base (~> 0.10.3.0) + ruby-debug-base (0.10.3) + linecache (>= 0.3) rubyzip (0.9.4) selenium-webdriver (0.0.29) childprocess (>= 0.0.7) @@ -242,8 +249,8 @@ GEM uuidtools (2.1.1) warden (0.10.7) rack (>= 1.0.0) - webmock (1.3.5) - addressable (>= 2.1.1) + webmock (1.4.0) + addressable (>= 2.2.2) crack (>= 0.1.7) will_paginate (3.0.pre2) xml-simple (1.0.12) @@ -275,11 +282,12 @@ DEPENDENCIES mocha mongo_mapper! pubsubhubbub - rails (= 3.0.0) + rails (>= 3.0.0) redfinger! roxml! rspec (>= 2.0.0) rspec-rails (>= 2.0.0) + ruby-debug sprinkle! thin webmock From 2a6279207ec8f6831f95d23769c750adf4da3bf0 Mon Sep 17 00:00:00 2001 From: Sarah Mei Date: Thu, 14 Oct 2010 23:27:30 -0700 Subject: [PATCH 2/9] Replace ref to github issues with link to redmine. Also, fussy copy edits. --- README.md | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index 4f6723507..32bd7ae22 100644 --- a/README.md +++ b/README.md @@ -5,7 +5,7 @@ network. **THIS IS PRE-ALPHA SOFTWARE AND SHOULD BE TREATED ACCORDINGLY.** **PLEASE, DO NOT RUN IN PRODUCTION. IT IS FUN TO GET RUNNING, BUT EXPECT THINGS -TO BE BROKEN** +TO BE BROKEN.** Installation instructions are [here](http://github.com/diaspora/diaspora/wiki/Installing-and-Running-Diaspora). @@ -48,8 +48,7 @@ We are maintaining a [public tracker project](http://www.pivotaltracker.com/projects/61641) and a [roadmap](https://github.com/diaspora/diaspora/wiki/Roadmap). Also, you can -file [bug reports](https://github.com/diaspora/diaspora/issues) right here on -github. +file [bug reports](http://bugs.joindiaspora.com) on our issue tracker. Ongoing discussion: @@ -59,8 +58,8 @@ Ongoing discussion: - [#diaspora-dev IRC channel](irc://irc.freenode.net/#diaspora-dev) ([join via the web client](http://webchat.freenode.net?channels=diaspora-dev)) -More general info and updates about the project can be found on: -[Our blog](http://joindiaspora.com), +More general info and updates about the project can be found on +[our blog](http://joindiaspora.com), [and on Twitter](http://twitter.com/joindiaspora). Also, be sure to join the official [mailing list](http://eepurl.com/Vebk). From 20f164fd454eb32d81535de5ec21f4bd1c4f953e Mon Sep 17 00:00:00 2001 From: maxwell Date: Fri, 15 Oct 2010 11:11:25 -0700 Subject: [PATCH 3/9] fixing some of the invite copy --- Gemfile.lock | 8 -------- app/controllers/invitations_controller.rb | 1 + app/helpers/aspects_helper.rb | 8 ++++++++ app/views/invitations/_new.haml | 4 +--- app/views/shared/_aspect_friends.haml | 9 +-------- app/views/shared/_invitations.haml | 8 ++++++++ 6 files changed, 19 insertions(+), 19 deletions(-) create mode 100644 app/views/shared/_invitations.haml diff --git a/Gemfile.lock b/Gemfile.lock index 14e3f10ef..b184b3559 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -122,7 +122,6 @@ GEM 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) @@ -163,7 +162,6 @@ GEM i18n (0.4.1) json (1.4.6) json_pure (1.4.6) - linecache (0.43) mail (2.2.7) activesupport (>= 2.3.6) mime-types @@ -225,11 +223,6 @@ GEM rspec-expectations (= 2.0.0) rspec-rails (2.0.0) rspec (= 2.0.0) - ruby-debug (0.10.3) - columnize (>= 0.1) - ruby-debug-base (~> 0.10.3.0) - ruby-debug-base (0.10.3) - linecache (>= 0.3) rubyzip (0.9.4) selenium-webdriver (0.0.29) childprocess (>= 0.0.7) @@ -287,7 +280,6 @@ DEPENDENCIES roxml! rspec (>= 2.0.0) rspec-rails (>= 2.0.0) - ruby-debug sprinkle! thin webmock diff --git a/app/controllers/invitations_controller.rb b/app/controllers/invitations_controller.rb index 92da135d8..340c7440f 100644 --- a/app/controllers/invitations_controller.rb +++ b/app/controllers/invitations_controller.rb @@ -12,6 +12,7 @@ class InvitationsController < Devise::InvitationsController flash[:error] = I18n.t 'invitations.create.no_more' elsif e.message == "You already invited this person" flash[:error] = I18n.t 'invitations.create.already_sent' + else raise e end diff --git a/app/helpers/aspects_helper.rb b/app/helpers/aspects_helper.rb index 265b052a8..88dfe0d6b 100644 --- a/app/helpers/aspects_helper.rb +++ b/app/helpers/aspects_helper.rb @@ -14,4 +14,12 @@ module AspectsHelper "#{I18n.t('aspects.helper.remove')}" end end + + def aspect_id(aspect) + if aspect.class == Aspect + aspect.id + else + :all + end + end end diff --git a/app/views/invitations/_new.haml b/app/views/invitations/_new.haml index f53882567..1921e6836 100644 --- a/app/views/invitations/_new.haml +++ b/app/views/invitations/_new.haml @@ -1,9 +1,7 @@ %h2 Send invitation = form_for User.new, :url => invitation_path(User) do |f| - /= devise_error_messages! %p = f.label :email = f.text_field :email - = f.hidden_field :aspect_id, :value => @aspect.id + = f.hidden_field :aspect_id, :value => aspect_id(@aspect) %p= f.submit "Send an invitation" -/= link_to "Home", after_sign_in_path_for(resource_name) diff --git a/app/views/shared/_aspect_friends.haml b/app/views/shared/_aspect_friends.haml index 508cabbb4..6ca3a29af 100644 --- a/app/views/shared/_aspect_friends.haml +++ b/app/views/shared/_aspect_friends.haml @@ -32,11 +32,4 @@ %br - %h4 Invites - = link_to "Invite a friend!", "#invite_user_pane", :class => "invite_user_button", :class => "invite_user_button", :title => "Invite a friend" - %br - = "You have #{@invites} invites." - .yo{ :style => "display:none;"} - #invite_user_pane - = render "invitations/new" - + = render "shared/invitations", :invites => @invites diff --git a/app/views/shared/_invitations.haml b/app/views/shared/_invitations.haml new file mode 100644 index 000000000..86a50c2cb --- /dev/null +++ b/app/views/shared/_invitations.haml @@ -0,0 +1,8 @@ +- unless @aspect == :all + %h4 Invites + = link_to "Invite a friend", "#invite_user_pane", :class => "invite_user_button", :class => "invite_user_button", :title => "Invite a friend" + = "(#{invites} left)" + %br + .yo{ :style => "display:none;"} + #invite_user_pane + = render "invitations/new" From d18b59f3d3c9eab372eac3bf363b0630d7340298 Mon Sep 17 00:00:00 2001 From: danielvincent Date: Fri, 15 Oct 2010 11:12:12 -0700 Subject: [PATCH 4/9] typo fix --- config/locales/diaspora/en.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/config/locales/diaspora/en.yml b/config/locales/diaspora/en.yml index f80a24733..4c67a0468 100644 --- a/config/locales/diaspora/en.yml +++ b/config/locales/diaspora/en.yml @@ -75,7 +75,7 @@ en: nobody: "We know you have friends, bring them to Diaspora!" nobody_in_aspect: "Your aspect '%{aspect_name}' is empty." add_friend: "Add a friend" - add_friend_to: "Add a someone to %{aspect_name}" + add_friend_to: "Add someone to %{aspect_name}" invite: "Invite a someone to join Diaspora!" manage: add_a_new_aspect: "Add a new aspect" From db313571724610bbf44d3306214c5833262a8164 Mon Sep 17 00:00:00 2001 From: danielvincent Date: Fri, 15 Oct 2010 11:16:04 -0700 Subject: [PATCH 5/9] another typo change --- config/locales/diaspora/en.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/config/locales/diaspora/en.yml b/config/locales/diaspora/en.yml index 4c67a0468..9d438feec 100644 --- a/config/locales/diaspora/en.yml +++ b/config/locales/diaspora/en.yml @@ -76,7 +76,7 @@ en: nobody_in_aspect: "Your aspect '%{aspect_name}' is empty." add_friend: "Add a friend" add_friend_to: "Add someone to %{aspect_name}" - invite: "Invite a someone to join Diaspora!" + invite: "Invite someone to join Diaspora!" manage: add_a_new_aspect: "Add a new aspect" add_a_new_friend: "Add a new friend" From a61c126aad2c65087e6f88babc3e44f9a1cc645b Mon Sep 17 00:00:00 2001 From: maxwell Date: Fri, 15 Oct 2010 11:29:23 -0700 Subject: [PATCH 6/9] manage page now uses partial --- app/views/aspects/manage.html.haml | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/app/views/aspects/manage.html.haml b/app/views/aspects/manage.html.haml index 472d8241f..a188787af 100644 --- a/app/views/aspects/manage.html.haml +++ b/app/views/aspects/manage.html.haml @@ -25,12 +25,7 @@ %ul.dropzone %li.grey Drag to ignore/remove - %h3= link_to "Invite a friend!", "#invite_user_pane", :id => "invite_user_button", :class => "invite_user_button", :title => "Invite a friend" - %h3= "You have #{@invites} invites." - - .yo{ :style => "display:none;"} - #invite_user_pane - = render "invitations/new" + = render 'shared/invitations', :invites => @invites - content_for :publish do = link_to(t('.add_a_new_aspect'), "#add_aspect_pane", :id => "add_aspect_button", :class => "new_aspect button", :title => t('.add_a_new_aspect')) From 12bdd1712dac0e3048c8e097fe045c60ef3ed783 Mon Sep 17 00:00:00 2001 From: danielvincent Date: Fri, 15 Oct 2010 13:56:49 -0700 Subject: [PATCH 7/9] share on facebook checkbox instead of broadcast button --- app/controllers/aspects_controller.rb | 3 +++ app/views/shared/_publisher.haml | 20 +++++++++++++++++--- public/javascripts/view.js | 9 +-------- public/stylesheets/sass/application.sass | 10 ++++++++++ 4 files changed, 31 insertions(+), 11 deletions(-) diff --git a/app/controllers/aspects_controller.rb b/app/controllers/aspects_controller.rb index 484cab55e..ec22b9f32 100644 --- a/app/controllers/aspects_controller.rb +++ b/app/controllers/aspects_controller.rb @@ -11,6 +11,9 @@ class AspectsController < ApplicationController def index @posts = current_user.visible_posts(:by_members_of => :all).paginate :page => params[:page], :per_page => 15, :order => 'created_at DESC' @aspect = :all + + @fb_access_url = MiniFB.oauth_url(FB_APP_ID, APP_CONFIG[:pod_url] + "services/create", + :scope=>MiniFB.scopes.join(",")) end def create diff --git a/app/views/shared/_publisher.haml b/app/views/shared/_publisher.haml index f14873e75..b514a5e1e 100644 --- a/app/views/shared/_publisher.haml +++ b/app/views/shared/_publisher.haml @@ -2,6 +2,18 @@ -# licensed under the Affero General Public License version 3 or later. See -# the COPYRIGHT file. +:javascript + + $("div.public_toggle input").live("click", function(evt){ + if("#{@logged_in}" == "false" && $(this).attr('checked') == true){ + if(confirm("You are currently not connected to facebook. Sign in to facebook?")){ + window.location = "#{@fb_access_url}"; + } else { + $(this).attr('checked', false); + } + }; + }); + #publisher = owner_image_tag @@ -18,13 +30,15 @@ = check_box_tag("aspect_ids[]", aspect.id, @aspect == :all || current_aspect?(aspect) ) = aspect.name - = f.hidden_field( :public, :value => false ) + - if @aspect == :all + .public_toggle + = f.check_box( :public, :value => false ) + share on facebook + .buttons - if @aspect == :all = f.submit t('.share'), :title => "Share with all aspects" - else = f.submit t('.share'), :title => "Share with #{@aspect.name}" - - if defined? broadcast - = f.submit "Broadcast", :class => "broadcast", :name => "broadcast", :title => "Publish to Diaspora and Facebook" diff --git a/public/javascripts/view.js b/public/javascripts/view.js index f79cace4d..94874358b 100644 --- a/public/javascripts/view.js +++ b/public/javascripts/view.js @@ -47,7 +47,7 @@ $(document).ready(function(){ ); $("#publisher textarea").keydown( function(e) { - if (e.shiftKey && e.keyCode == 13) { + if (e.keyCode == 13) { $("#publisher form").submit(); } }); @@ -71,10 +71,3 @@ $.fn.clearForm = function() { }); }; -$("#publisher .broadcast").live("click", function(evt){ - evt.preventDefault(); - if( confirm("Publish to Diaspora and Facebook?") ) { - $("#status_message_public").val("true"); - $(this).submit(); - } -}); diff --git a/public/stylesheets/sass/application.sass b/public/stylesheets/sass/application.sass index f1b8bee94..feb23b897 100644 --- a/public/stylesheets/sass/application.sass +++ b/public/stylesheets/sass/application.sass @@ -612,6 +612,16 @@ label .buttons :float right + .public_toggle + :position absolute + :top 53px + :left 460px + :width 300px + :font + :size smaller + :style italic + + #image_picker .small_photo :height 100px From e8c49feca48ef243c42c3e96b128d29c7f5d08fc Mon Sep 17 00:00:00 2001 From: maxwell Date: Fri, 15 Oct 2010 14:10:10 -0700 Subject: [PATCH 8/9] made the public info link in all aspects publisher --- app/views/shared/_invitations.haml | 2 +- app/views/shared/_public_explain.haml | 9 +++++++++ app/views/shared/_publisher.haml | 5 ++++- app/views/users/_services.haml | 2 +- public/javascripts/view.js | 1 + 5 files changed, 16 insertions(+), 3 deletions(-) create mode 100644 app/views/shared/_public_explain.haml diff --git a/app/views/shared/_invitations.haml b/app/views/shared/_invitations.haml index 86a50c2cb..b82cca104 100644 --- a/app/views/shared/_invitations.haml +++ b/app/views/shared/_invitations.haml @@ -1,6 +1,6 @@ - unless @aspect == :all %h4 Invites - = link_to "Invite a friend", "#invite_user_pane", :class => "invite_user_button", :class => "invite_user_button", :title => "Invite a friend" + = link_to "Invite a friend", "#invite_user_pane", :class => "invite_user_button", :title => "Invite a friend" = "(#{invites} left)" %br .yo{ :style => "display:none;"} diff --git a/app/views/shared/_public_explain.haml b/app/views/shared/_public_explain.haml new file mode 100644 index 000000000..568f4d884 --- /dev/null +++ b/app/views/shared/_public_explain.haml @@ -0,0 +1,9 @@ +%h1 you are about to post a public message! +%p + this message is going to be posted to your public feed, + and to any services you may have connected to Diaspora. + + - if @logged_in + = connected_fb_as(@access_token) + - else + = link_to "Connect to Facebook", @fb_access_url diff --git a/app/views/shared/_publisher.haml b/app/views/shared/_publisher.haml index b514a5e1e..c1886b5fb 100644 --- a/app/views/shared/_publisher.haml +++ b/app/views/shared/_publisher.haml @@ -35,7 +35,10 @@ .public_toggle = f.check_box( :public, :value => false ) share on facebook - + = link_to 'public info', "#question_mark_pane", :class => 'question_mark' + .yo{:style => "display:none;"} + #question_mark_pane + = render 'shared/public_explain' .buttons - if @aspect == :all = f.submit t('.share'), :title => "Share with all aspects" diff --git a/app/views/users/_services.haml b/app/views/users/_services.haml index 80cf33663..a9a6d7977 100644 --- a/app/views/users/_services.haml +++ b/app/views/users/_services.haml @@ -18,7 +18,7 @@ = link_to "Disconnect from Facebook", services_destroy_path - else - = link_to "Connect to Facebook (DO NOT USE WITH A REAL ACCOUNT)", @fb_access_url + = link_to "Connect to Facebook", @fb_access_url #content_bottom .back diff --git a/public/javascripts/view.js b/public/javascripts/view.js index 94874358b..dec170a07 100644 --- a/public/javascripts/view.js +++ b/public/javascripts/view.js @@ -30,6 +30,7 @@ $(document).ready(function(){ $(".add_request_button").fancybox({ 'titleShow': false }); $(".invite_user_button").fancybox({ 'titleShow': false }); $(".add_request_button").fancybox({ 'titleShow': false }); + $(".question_mark").fancybox({ 'titleShow': false }); $("input[type='submit']").addClass("button"); From a8e8480e946c1b3c518aa2bd5a890d2fd08c9ee9 Mon Sep 17 00:00:00 2001 From: Raphael Date: Fri, 15 Oct 2010 14:14:32 -0700 Subject: [PATCH 9/9] Add vendor/bundle to gitignore --- .gitignore | 1 + 1 file changed, 1 insertion(+) diff --git a/.gitignore b/.gitignore index 81ed4083b..379d97a20 100644 --- a/.gitignore +++ b/.gitignore @@ -3,6 +3,7 @@ config/app_config.yml config/fb_config.yml config/initializers/secret_token.rb .bundle +vendor/bundle/* # Generated files log/*