From a11a4e08047f26900aaff2ad4b0ac4f571d9bebd Mon Sep 17 00:00:00 2001 From: "Jeremy B. Merrill" Date: Fri, 27 May 2016 13:30:15 -0400 Subject: [PATCH] be a little quicker wiht feedback --- Gemfile | 2 +- Gemfile.lock | 26 +++++++++++--------------- uploader/gui_for_uploader.rb | 4 ++++ uploader/views/uploader.erb | 2 ++ 4 files changed, 18 insertions(+), 16 deletions(-) diff --git a/Gemfile b/Gemfile index 0931d9f..06d6628 100644 --- a/Gemfile +++ b/Gemfile @@ -12,7 +12,7 @@ platform :jruby do # but with my own custom version of Tika, http://github.com/jeremybmerrill/tika # because Warbler can't handle gems sourced from git, I had to make a whole new gem. gem 'rika-stevedore', "1.6.2", :require => "rika" - gem 'stevedore-uploader', :path => "../stevedore-uploader" + gem 'stevedore-uploader', "~> 1.0.3" gem "sinatra" gem "warbler", "2.0.0.rc2" diff --git a/Gemfile.lock b/Gemfile.lock index 75dda87..821e84e 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -1,17 +1,3 @@ -PATH - remote: ../stevedore-uploader - specs: - stevedore-uploader (1.0.2-java) - aws-sdk (~> 2) - elasticsearch (~> 1.0) - jruby-openssl (~> 0.9) - mail (~> 2.6) - manticore - nokogiri (~> 1.6) - pst (~> 0.0.2) - rika-stevedore (>= 1.6.1) - rubyzip (~> 1.1) - GEM remote: https://rubygems.org/ specs: @@ -91,6 +77,16 @@ GEM rack (~> 1.5) rack-protection (~> 1.4) tilt (>= 1.3, < 3) + stevedore-uploader (1.0.3-java) + aws-sdk (~> 2) + elasticsearch (~> 1.0) + jruby-openssl (~> 0.9) + mail (~> 2.6) + manticore + nokogiri (~> 1.6) + pst (~> 0.0.2) + rika-stevedore (>= 1.6.1) + rubyzip (~> 1.1) thread_safe (0.3.5-java) tilt (2.0.4) twitter (5.16.0) @@ -127,7 +123,7 @@ DEPENDENCIES manticore rika-stevedore (= 1.6.2) sinatra - stevedore-uploader! + stevedore-uploader (~> 1.0.3) twitter warbler (= 2.0.0.rc2) diff --git a/uploader/gui_for_uploader.rb b/uploader/gui_for_uploader.rb index 796845c..0ffc3bb 100644 --- a/uploader/gui_for_uploader.rb +++ b/uploader/gui_for_uploader.rb @@ -22,6 +22,10 @@ es_index = params["index-name"] invalid << ["index-name", params["index-name"]] if es_index.nil? || es_index.empty? + settings.logs.puts "Creating a search engine..." + + settings.logs.flush + # if the files are already on S3, extract the bucket name from params["files"] # if they're not, extract the bucket name from params["frontend-location"] diff --git a/uploader/views/uploader.erb b/uploader/views/uploader.erb index ff364a0..0810a99 100644 --- a/uploader/views/uploader.erb +++ b/uploader/views/uploader.erb @@ -61,6 +61,8 @@ var logs = new EventSource('/upload/stream'); $(document).on('click', '#submit', function(e){ + $('#logs').html("

Creating a search engine...

"); + var was_disabled = $('#index-name input').is('[disabled]'); $('#index-name input').removeAttr('disabled'); $.post('/upload/do', $('form').serialize(), function(json_resp){