Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Comparing changes

Choose two branches to see what's changed or to start a new pull request. If you need to, you can also compare across forks.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also compare across forks.
base fork: stevenh512/diaspora
base: 4b41f8bf41
...
head fork: stevenh512/diaspora
compare: a8843c1036
Checking mergeability… Don't worry, you can still create the pull request.
  • 10 commits
  • 15 files changed
  • 0 commit comments
  • 4 contributors
Commits on Apr 01, 2012
@Raven24 Raven24 css should be delivered by asset pipeline(?) 62edcb8
Commits on Apr 02, 2012
@Raven24 Raven24 fix jasmine unhappiness I introduced with #3088 1709036
@Raven24 Raven24 fix cuke unhappiness I introduced with #3088 c9fa88a
Commits on Apr 03, 2012
@maxwell maxwell Merge pull request #3095 from Raven24/fix-jasmine-comment-error
fix jasmine unhappiness I introduced with #3088
7ce61fd
@maxwell maxwell Merge pull request #3097 from Raven24/fix-comments-error-cuke
fix cuke unhappiness I introduced with #3088
4523add
@maxwell maxwell Merge pull request #3090 from Raven24/ci-stuff
css should be delivered by asset pipeline for travis(?)
eee5a89
@danielgrippi danielgrippi fix jasmine specs e156947
@maxwell maxwell add asset sync gem b33ee8c
@maxwell maxwell update initializer 4ba3ec0
@stevenh512 Fix JSON caching regression
Disable jQuery's AJAX caching to prevent the browser's
back button from dumping the stream in JSON format.

Includes a test for the jquery_include_tag helper to
ensure that the necessary line of javascript doesn't
go missing again.

closes #3094
a8843c1
View
1  Gemfile
@@ -119,6 +119,7 @@ group :assets do
gem 'handlebars_assets'
gem 'uglifier'
+ gem "asset_sync"
end
gem 'jquery-rails'
View
4 Gemfile.lock
@@ -90,6 +90,9 @@ GEM
builder
archive-tar-minitar (0.5.2)
arel (2.2.3)
+ asset_sync (0.3.1)
+ activemodel
+ fog
bcrypt-ruby (3.0.1)
builder (3.0.0)
capistrano (2.9.0)
@@ -475,6 +478,7 @@ DEPENDENCIES
acts_as_api
addressable (= 2.2.4)
airbrake
+ asset_sync
bundler (~> 1.1.0)
capistrano (~> 2.9.0)
capistrano-ext (= 1.2.1)
View
2  app/assets/javascripts/app/forms/post_form.js
@@ -46,7 +46,7 @@ app.forms.Post = app.forms.Base.extend({
},
postRenderTemplate : function() {
- this.prepAndBindMentions()
+ //this.prepAndBindMentions()
},
prepAndBindMentions : function(){
View
1  app/helpers/application_helper.rb
@@ -48,6 +48,7 @@ def jquery_include_tag
buf << [ javascript_include_tag('jquery') ]
end
buf << [ javascript_include_tag('jquery_ujs') ]
+ buf << [ javascript_tag("jQuery.ajaxSetup({'cache': false});") ]
buf.join("\n").html_safe
end
end
View
25 config/initializers/asset_sync.rb
@@ -0,0 +1,25 @@
+if defined?(AssetSync)
+ require File.join(File.dirname(__FILE__), '..', '..', 'app', 'models', 'app_config')
+ AssetSync.configure do |config|
+ config.fog_provider = 'AWS'
+ config.fog_directory = AppConfig[:s3_bucket]
+ config.aws_access_key_id = AppConfig[:s3_key]
+ config.aws_secret_access_key = AppConfig[:s3_secret]
+
+ # Don't delete files from the store
+ # config.existing_remote_files = "keep"
+ #
+ # Increase upload performance by configuring your region
+ # config.fog_region = 'eu-west-1'
+ #
+ # Automatically replace files with their equivalent gzip compressed version
+ # config.gzip_compression = true
+ #
+ # Use the Rails generated 'manifest.yml' file to produce the list of files to
+ # upload instead of searching the assets directory.
+ # config.manifest = true
+ #
+ # Fail silently. Useful for environments such as Heroku
+ # config.fail_silently = true
+ end
+end
View
1  features/notifications.feature
@@ -64,6 +64,7 @@ Feature: Notifications
And I focus the comment field
And I fill in "text" with "great post!"
And I press "Comment"
+ And I wait for the ajax to finish
And I go to the destroy user session page
When I sign in as "alice@alice.alice"
And I follow "Notifications" in the header
View
23 lib/tasks/assets.rake
@@ -1,23 +0,0 @@
-namespace :assets do
- task :deploy do
- puts "compiling sass..."
- system 'sass --update public/stylesheets/sass:public/stylesheets'
-
- puts "packaging assets..."
- Jammit.package!
-
- Rake::Task['assets:upload'].invoke
- end
-
- task :upload => [:environment] do
- s3_configuration = {
- :bucket_name => AppConfig[:s3_bucket],
- :access_key_id => AppConfig[:s3_key],
- :secret_access_key => AppConfig[:s3_secret]
- }
- Jammit.upload_to_s3!(s3_configuration)
- asset_host = "https://#{s3_configuration[:bucket_name]}.s3.amazonaws.com"
- puts "NOTE: ENV['ASSET_HOST'] is now: #{asset_host}, but you may know your cdn url better than I"
- puts "Please set this in your ENV hash in a production enviroment"
- end
-end
View
2  lib/tasks/resque.rake
@@ -11,7 +11,7 @@ desc "Alias for resque:work (To run workers on Heroku)"
task "jobs:work" => "resque:work"
desc 'clear your failure queue in resque. good for crons.'
-task 'resque:clear_failed' => [:environment]do
+task 'resque:clear_failed' => [:environment] do
puts "clearing resque failures"
Resque::Failure.clear
puts "complete!"
View
4 script/ci/before.sh
@@ -9,8 +9,8 @@ echo "Start Xvfb"
sh -e /etc/init.d/xvfb start
# Regenerate css files
-echo "Regenerating CSS files"
-bundle exec sass -q --update public/stylesheets/sass/:public/stylesheets/
+#echo "Regenerating CSS files"
+#bundle exec sass -q --update public/stylesheets/sass/:public/stylesheets/
# Create a database.yml for the right database
echo "Setting up database.yml for $DB"
View
4 spec/helpers/application_helper_spec.rb
@@ -78,5 +78,9 @@ def current_user
it 'inclues jquery_ujs.js' do
jquery_include_tag.should match(/jquery_ujs\.js/)
end
+
+ it "disables ajax caching" do
+ jquery_include_tag.should match(/jQuery\.ajaxSetup/)
+ end
end
end
View
2  spec/javascripts/app/forms/post_form_spec.js
@@ -12,7 +12,7 @@ describe("app.forms.Post", function(){
describe("submitting a valid form", function(){
beforeEach(function(){
- this.view.$("form #text_with_markup").val("Oh My")
+ this.view.$("form .text").val("Oh My")
this.view.$("form .aspect_ids").val("public")
/* appending checkboxes */
View
16 spec/javascripts/app/views/comment_stream_view_spec.js
@@ -30,10 +30,24 @@ describe("app.views.CommentStream", function(){
})
describe("createComment", function(){
+ beforeEach(function(){
+ spyOn(this.view.model.comments, "create")
+ })
+
it("clears the new comment textarea", function(){
- $(this.view.el).html($("<textarea/>", {"class" : 'comment_box'}).val("hey"))
+ var comment = {
+ "id": 1234,
+ "text": "hey",
+ "author": "not_null"
+ };
+ spyOn($, "ajax").andCallFake(function(params) {
+ params.success(comment);
+ });
+
+ $(this.view.el).html($("<textarea/>", {"class" : 'comment_box'}).val(comment.text))
this.view.createComment()
expect(this.view.$(".comment_box").val()).toBe("")
+ expect(this.view.model.comments.create).toHaveBeenCalled()
})
})
View
2  spec/javascripts/app/views/post/wallpaper_view_spec.js
@@ -8,7 +8,7 @@ describe("app.views.Post.Wallpaper", function(){
it("has the image as the photo-fill", function(){
this.view.render()
expect(this.view.$(".photo-fill").data("img-src")).toBe("http://omgimabackground.com/wow.gif") //for the cuke
- expect(this.view.$(".photo-fill").css("background-image")).toBe('url("http://omgimabackground.com/wow.gif")')
+ expect(this.view.$(".photo-fill").css("background-image")).toBe("url(http://omgimabackground.com/wow.gif)")
})
})
})
View
8 spec/javascripts/search-spec.js
@@ -5,14 +5,6 @@
describe("List", function() {
describe("runDelayedSearch", function() {
- it('gets called on initialize', function(){
- spyOn(List, 'startSearchDelay');
- spec.loadFixture('pending_external_people_search');
- expect(List.startSearchDelay).toHaveBeenCalled();
- });
- });
-
- describe("runDelayedSearch", function() {
beforeEach( function(){
spec.loadFixture('empty_people_search');
List.initialize();
View
8 spec/javascripts/view-spec.js
@@ -8,14 +8,6 @@ describe("View", function() {
expect(typeof View === "object").toBeTruthy();
});
- describe("initialize", function() {
- it("is called on DOM ready", function() {
- spyOn(View, "initialize");
- $(View.initialize);
- expect(View.initialize).toHaveBeenCalled();
- });
- });
-
describe("publisher", function() {
beforeEach(function() {
$("#jasmine_content").html(

No commit comments for this range

Something went wrong with that request. Please try again.