diff --git a/Gemfile b/Gemfile index 2399220..ff8b3c4 100644 --- a/Gemfile +++ b/Gemfile @@ -13,4 +13,3 @@ gemspec # To use debugger # gem 'debugger' gem 'jquery-rails' - diff --git a/Gemfile.lock b/Gemfile.lock index 6043fb0..f3dd2e5 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -1,237 +1,385 @@ PATH remote: . specs: - uploadbox (0.2.0) - browser (~> 0.4, >= 0.4.1) - carrierwave (~> 0.9, >= 0.9.0) - carrierwave-processing (~> 0.0, >= 0.0.2) - dotenv-rails (~> 0.10, >= 0.10.0) - fog (~> 1.15, >= 1.15.0) - heroku-api (~> 0.3, >= 0.3.15) - jbuilder (>= 1.2, < 3) - mini_magick (~> 3.6, >= 3.6.0) - rails (>= 4.0.4, < 5) - redis (~> 3.0, >= 3.0.4) - resque (~> 1.25, >= 1.25.0) + uploadbox (0.3.0) + browser (~> 2.2, >= 2.2.0) + carrierwave (~> 0.11, >= 0.11.2) + carrierwave-processing (~> 1.1, >= 1.1.0) + dotenv-rails (~> 2.1, >= 2.1.1) + fog (~> 1.38, >= 1.38.0) + heroku-api (~> 0.4, >= 0.4.2) + jbuilder (>= 2.6.0, < 3) + mini_magick (~> 4.5, >= 4.5.1) + rails (>= 5.0, < 6) + redis (~> 3.3, >= 3.3.1) + resque (~> 1.26, >= 1.26.0) GEM remote: https://rubygems.org/ specs: - actionmailer (4.0.4) - actionpack (= 4.0.4) - mail (~> 2.5.4) - actionpack (4.0.4) - activesupport (= 4.0.4) - builder (~> 3.1.0) + CFPropertyList (2.3.2) + actioncable (5.0.0.1) + actionpack (= 5.0.0.1) + nio4r (~> 1.2) + websocket-driver (~> 0.6.1) + actionmailer (5.0.0.1) + actionpack (= 5.0.0.1) + actionview (= 5.0.0.1) + activejob (= 5.0.0.1) + mail (~> 2.5, >= 2.5.4) + rails-dom-testing (~> 2.0) + actionpack (5.0.0.1) + actionview (= 5.0.0.1) + activesupport (= 5.0.0.1) + rack (~> 2.0) + rack-test (~> 0.6.3) + rails-dom-testing (~> 2.0) + rails-html-sanitizer (~> 1.0, >= 1.0.2) + actionview (5.0.0.1) + activesupport (= 5.0.0.1) + builder (~> 3.1) erubis (~> 2.7.0) - rack (~> 1.5.2) - rack-test (~> 0.6.2) - activemodel (4.0.4) - activesupport (= 4.0.4) - builder (~> 3.1.0) - activerecord (4.0.4) - activemodel (= 4.0.4) - activerecord-deprecated_finders (~> 1.0.2) - activesupport (= 4.0.4) - arel (~> 4.0.0) - activerecord-deprecated_finders (1.0.3) - activesupport (4.0.4) - i18n (~> 0.6, >= 0.6.9) - minitest (~> 4.2) - multi_json (~> 1.3) - thread_safe (~> 0.1) - tzinfo (~> 0.3.37) - addressable (2.3.5) - arel (4.0.2) - atomic (1.1.16) - better_errors (0.9.0) + rails-dom-testing (~> 2.0) + rails-html-sanitizer (~> 1.0, >= 1.0.2) + activejob (5.0.0.1) + activesupport (= 5.0.0.1) + globalid (>= 0.3.6) + activemodel (5.0.0.1) + activesupport (= 5.0.0.1) + activerecord (5.0.0.1) + activemodel (= 5.0.0.1) + activesupport (= 5.0.0.1) + arel (~> 7.0) + activesupport (5.0.0.1) + concurrent-ruby (~> 1.0, >= 1.0.2) + i18n (~> 0.7) + minitest (~> 5.1) + tzinfo (~> 1.1) + addressable (2.4.0) + arel (7.1.1) + better_errors (2.1.1) coderay (>= 1.0.0) erubis (>= 2.6.6) + rack (>= 0.9.0) binding_of_caller (0.7.2) debug_inspector (>= 0.0.1) - browser (0.6.0) - builder (3.1.4) - capybara (2.1.0) + browser (2.2.0) + builder (3.2.2) + capybara (2.8.1) + addressable mime-types (>= 1.16) nokogiri (>= 1.3.3) rack (>= 1.0.0) rack-test (>= 0.5.4) xpath (~> 2.0) - carrierwave (0.10.0) + carrierwave (0.11.2) activemodel (>= 3.2.0) activesupport (>= 3.2.0) json (>= 1.7) mime-types (>= 1.16) - carrierwave-processing (0.0.2) + mimemagic (>= 0.3.0) + carrierwave-processing (1.1.0) carrierwave - coderay (1.0.9) - coffee-rails (4.0.1) + cliver (0.3.2) + coderay (1.1.1) + coffee-rails (4.2.1) coffee-script (>= 2.2.0) - railties (>= 4.0.0, < 5.0) - coffee-script (2.2.0) + railties (>= 4.0.0, < 5.2.x) + coffee-script (2.4.1) coffee-script-source execjs - coffee-script-source (1.7.0) - database_cleaner (1.0.1) + coffee-script-source (1.10.0) + concurrent-ruby (1.0.2) + database_cleaner (1.5.3) debug_inspector (0.0.2) diff-lcs (1.2.5) - dotenv (0.11.1) - dotenv-deployment (~> 0.0.2) - dotenv-deployment (0.0.2) - dotenv-rails (0.11.1) - dotenv (= 0.11.1) + docile (1.1.5) + dotenv (2.1.1) + dotenv-rails (2.1.1) + dotenv (= 2.1.1) + railties (>= 4.0, < 5.1) erubis (2.7.0) - eventmachine (1.0.3) - excon (0.31.0) - execjs (2.0.2) - factory_girl (4.2.0) + excon (0.52.0) + execjs (2.7.0) + factory_girl (4.7.0) activesupport (>= 3.0.0) - factory_girl_rails (4.2.1) - factory_girl (~> 4.2.0) + factory_girl_rails (4.7.0) + factory_girl (~> 4.7.0) railties (>= 3.0.0) - faye-websocket (0.4.7) - eventmachine (>= 0.12.0) - fog (1.19.0) + fission (0.5.0) + CFPropertyList (~> 2.2) + fog (1.38.0) + fog-aliyun (>= 0.1.0) + fog-atmos + fog-aws (>= 0.6.0) + fog-brightbox (~> 0.4) + fog-cloudatcost (~> 0.1.0) + fog-core (~> 1.32) + fog-dynect (~> 0.0.2) + fog-ecloud (~> 0.1) + fog-google (<= 0.1.0) + fog-json + fog-local + fog-openstack + fog-powerdns (>= 0.1.1) + fog-profitbricks + fog-rackspace + fog-radosgw (>= 0.0.2) + fog-riakcs + fog-sakuracloud (>= 0.0.4) + fog-serverlove + fog-softlayer + fog-storm_on_demand + fog-terremark + fog-vmfusion + fog-voxel + fog-vsphere (>= 0.4.0) + fog-xenserver + fog-xml (~> 0.1.1) + ipaddress (~> 0.5) + fog-aliyun (0.1.0) + fog-core (~> 1.27) + fog-json (~> 1.0) + ipaddress (~> 0.8) + xml-simple (~> 1.1) + fog-atmos (0.1.0) + fog-core + fog-xml + fog-aws (0.11.0) + fog-core (~> 1.38) + fog-json (~> 1.0) + fog-xml (~> 0.1) + ipaddress (~> 0.8) + fog-brightbox (0.11.0) + fog-core (~> 1.22) + fog-json + inflecto (~> 0.0.2) + fog-cloudatcost (0.1.2) + fog-core (~> 1.36) + fog-json (~> 1.0) + fog-xml (~> 0.1) + ipaddress (~> 0.8) + fog-core (1.42.0) builder - excon (~> 0.31.0) - formatador (~> 0.2.0) - mime-types - multi_json (~> 1.0) - net-scp (~> 1.1) - net-ssh (>= 2.1.3) - nokogiri (~> 1.5) - ruby-hmac + excon (~> 0.49) + formatador (~> 0.2) + fog-dynect (0.0.3) + fog-core + fog-json + fog-xml + fog-ecloud (0.3.0) + fog-core + fog-xml + fog-google (0.1.0) + fog-core + fog-json + fog-xml + fog-json (1.0.2) + fog-core (~> 1.0) + multi_json (~> 1.10) + fog-local (0.3.0) + fog-core (~> 1.27) + fog-openstack (0.1.12) + fog-core (>= 1.40) + fog-json (>= 1.0) + ipaddress (>= 0.8) + fog-powerdns (0.1.1) + fog-core (~> 1.27) + fog-json (~> 1.0) + fog-xml (~> 0.1) + fog-profitbricks (0.0.5) + fog-core + fog-xml + nokogiri + fog-rackspace (0.1.1) + fog-core (>= 1.35) + fog-json (>= 1.0) + fog-xml (>= 0.1) + ipaddress (>= 0.8) + fog-radosgw (0.0.5) + fog-core (>= 1.21.0) + fog-json + fog-xml (>= 0.0.1) + fog-riakcs (0.1.0) + fog-core + fog-json + fog-xml + fog-sakuracloud (1.7.5) + fog-core + fog-json + fog-serverlove (0.1.2) + fog-core + fog-json + fog-softlayer (1.1.4) + fog-core + fog-json + fog-storm_on_demand (0.1.1) + fog-core + fog-json + fog-terremark (0.1.0) + fog-core + fog-xml + fog-vmfusion (0.1.0) + fission + fog-core + fog-voxel (0.1.0) + fog-core + fog-xml + fog-vsphere (1.0.1) + fog-core + rbvmomi (~> 1.8.0) + fog-xenserver (0.2.3) + fog-core + fog-xml + fog-xml (0.1.2) + fog-core + nokogiri (~> 1.5, >= 1.5.11) formatador (0.2.5) - heroku-api (0.3.18) - excon (~> 0.27) + globalid (0.3.7) + activesupport (>= 4.1.0) + heroku-api (0.4.2) + excon (~> 0.45) multi_json (~> 1.8) - hike (1.2.3) - http_parser.rb (0.5.3) - i18n (0.6.9) - jbuilder (2.1.3) - activesupport (>= 3.0.0, < 5) + i18n (0.7.0) + inflecto (0.0.2) + ipaddress (0.8.3) + jbuilder (2.6.0) + activesupport (>= 3.0.0, < 5.1) multi_json (~> 1.2) - jquery-rails (3.0.4) - railties (>= 3.0, < 5.0) + jquery-rails (4.2.1) + rails-dom-testing (>= 1, < 3) + railties (>= 4.2.0) thor (>= 0.14, < 2.0) - json (1.8.1) - launchy (2.4.2) + json (2.0.2) + launchy (2.4.3) addressable (~> 2.3) - mail (2.5.4) - mime-types (~> 1.16) - treetop (~> 1.4.8) + loofah (2.0.3) + nokogiri (>= 1.5.9) + mail (2.6.4) + mime-types (>= 1.16, < 4) method_source (0.8.2) - mime-types (1.25) - mini_magick (3.8.0) - subexec (~> 0.2.1) - minitest (4.7.5) + mime-types (3.1) + mime-types-data (~> 3.2015) + mime-types-data (3.2016.0521) + mimemagic (0.3.2) + mini_magick (4.5.1) + mini_portile2 (2.1.0) + minitest (5.9.0) mono_logger (1.1.0) - multi_json (1.9.2) - net-scp (1.2.1) - net-ssh (>= 2.6.5) - net-ssh (2.9.1) - nokogiri (1.5.10) - pg (0.17.1) - poltergeist (1.3.0) - capybara (~> 2.1.0) - faye-websocket (>= 0.4.4, < 0.5.0) - http_parser.rb (~> 0.5.3) - polyglot (0.3.5) - pry (0.9.12.2) - coderay (~> 1.0.5) - method_source (~> 0.8) + multi_json (1.12.1) + nio4r (1.2.1) + nokogiri (1.6.8) + mini_portile2 (~> 2.1.0) + pkg-config (~> 1.1.7) + pg (0.18.4) + pkg-config (1.1.7) + poltergeist (1.10.0) + capybara (~> 2.1) + cliver (~> 0.3.1) + websocket-driver (>= 0.2.0) + pry (0.10.4) + coderay (~> 1.1.0) + method_source (~> 0.8.1) slop (~> 3.4) - pry-rails (0.3.2) + pry-rails (0.3.4) pry (>= 0.9.10) - rack (1.5.2) - rack-protection (1.5.3) - rack - rack-test (0.6.2) + rack (2.0.1) + rack-test (0.6.3) rack (>= 1.0) - rails (4.0.4) - actionmailer (= 4.0.4) - actionpack (= 4.0.4) - activerecord (= 4.0.4) - activesupport (= 4.0.4) + rails (5.0.0.1) + actioncable (= 5.0.0.1) + actionmailer (= 5.0.0.1) + actionpack (= 5.0.0.1) + actionview (= 5.0.0.1) + activejob (= 5.0.0.1) + activemodel (= 5.0.0.1) + activerecord (= 5.0.0.1) + activesupport (= 5.0.0.1) bundler (>= 1.3.0, < 2.0) - railties (= 4.0.4) - sprockets-rails (~> 2.0.0) - railties (4.0.4) - actionpack (= 4.0.4) - activesupport (= 4.0.4) + railties (= 5.0.0.1) + sprockets-rails (>= 2.0.0) + rails-dom-testing (2.0.1) + activesupport (>= 4.2.0, < 6.0) + nokogiri (~> 1.6.0) + rails-html-sanitizer (1.0.3) + loofah (~> 2.0) + railties (5.0.0.1) + actionpack (= 5.0.0.1) + activesupport (= 5.0.0.1) + method_source rake (>= 0.8.7) thor (>= 0.18.1, < 2.0) - rake (10.2.1) - redis (3.1.0) - redis-namespace (1.5.0) + rake (11.2.2) + rbvmomi (1.8.2) + builder + nokogiri (>= 1.4.1) + trollop + redis (3.3.1) + redis-namespace (1.5.2) redis (~> 3.0, >= 3.0.4) - resque (1.25.2) + resque (1.26.0) mono_logger (~> 1.0) multi_json (~> 1.0) redis-namespace (~> 1.3) sinatra (>= 0.9.2) vegas (~> 0.1.2) - rspec-collection_matchers (0.0.3) - rspec-expectations (>= 2.99.0.beta1) - rspec-core (3.0.0.beta1) - rspec-support (= 3.0.0.beta1) - rspec-expectations (3.0.0.beta1) - diff-lcs (>= 1.1.3, < 2.0) - rspec-support (= 3.0.0.beta1) - rspec-mocks (3.0.0.beta1) - rspec-support (= 3.0.0.beta1) - rspec-rails (3.0.0.beta1) + rspec-core (3.5.3) + rspec-support (~> 3.5.0) + rspec-expectations (3.5.0) + diff-lcs (>= 1.2.0, < 2.0) + rspec-support (~> 3.5.0) + rspec-mocks (3.5.0) + diff-lcs (>= 1.2.0, < 2.0) + rspec-support (~> 3.5.0) + rspec-rails (3.5.2) actionpack (>= 3.0) - activemodel (>= 3.0) activesupport (>= 3.0) railties (>= 3.0) - rspec-collection_matchers - rspec-core (= 3.0.0.beta1) - rspec-expectations (= 3.0.0.beta1) - rspec-mocks (= 3.0.0.beta1) - rspec-support (3.0.0.beta1) - ruby-hmac (0.4.0) - sass (3.2.18) - sass-rails (4.0.2) - railties (>= 4.0.0, < 5.0) - sass (~> 3.2.0) - sprockets (~> 2.8, <= 2.11.0) - sprockets-rails (~> 2.0.0) + rspec-core (~> 3.5.0) + rspec-expectations (~> 3.5.0) + rspec-mocks (~> 3.5.0) + rspec-support (~> 3.5.0) + rspec-support (3.5.0) + sass (3.4.22) + sass-rails (5.0.6) + railties (>= 4.0.0, < 6) + sass (~> 3.1) + sprockets (>= 2.8, < 4.0) + sprockets-rails (>= 2.0, < 4.0) + tilt (>= 1.1, < 3) sham_rack (1.3.6) rack - simplecov (0.7.1) - multi_json (~> 1.0) - simplecov-html (~> 0.7.1) - simplecov-html (0.7.1) - sinatra (1.4.5) - rack (~> 1.4) - rack-protection (~> 1.4) - tilt (~> 1.3, >= 1.3.4) - slim (2.0.2) - temple (~> 0.6.6) + simplecov (0.12.0) + docile (~> 1.1.0) + json (>= 1.8, < 3) + simplecov-html (~> 0.10.0) + simplecov-html (0.10.0) + sinatra (1.0) + rack (>= 1.0) + slim (3.0.7) + temple (~> 0.7.6) tilt (>= 1.3.3, < 2.1) - slop (3.4.6) - sprockets (2.11.0) - hike (~> 1.2) - multi_json (~> 1.0) - rack (~> 1.0) - tilt (~> 1.1, != 1.3.0) - sprockets-rails (2.0.1) - actionpack (>= 3.0) - activesupport (>= 3.0) - sprockets (~> 2.8) - subexec (0.2.3) - temple (0.6.7) + slop (3.6.0) + sprockets (3.7.0) + concurrent-ruby (~> 1.0) + rack (> 1, < 3) + sprockets-rails (3.2.0) + actionpack (>= 4.0) + activesupport (>= 4.0) + sprockets (>= 3.0.0) + temple (0.7.7) thor (0.19.1) - thread_safe (0.3.1) - atomic (>= 1.1.7, < 2) - tilt (1.4.1) - treetop (1.4.15) - polyglot - polyglot (>= 0.3.1) - tzinfo (0.3.39) + thread_safe (0.3.5) + tilt (2.0.5) + trollop (2.1.2) + tzinfo (1.2.2) + thread_safe (~> 0.1) vegas (0.1.11) rack (>= 1.0.0) + websocket-driver (0.6.4) + websocket-extensions (>= 0.1.0) + websocket-extensions (0.1.2) + xml-simple (1.1.5) xpath (2.0.0) nokogiri (~> 1.3) @@ -239,20 +387,23 @@ PLATFORMS ruby DEPENDENCIES - better_errors (~> 0.9, >= 0.9.0) - binding_of_caller (~> 0.7, >= 0.7.2) - capybara (~> 2.1, >= 2.1.0) - coffee-rails (~> 4.0, >= 4.0.0) - database_cleaner (= 1.0.1) - factory_girl_rails (~> 4.2, >= 4.2.1) + better_errors (~> 2.1.1) + binding_of_caller (~> 0.7.2) + capybara (~> 2.8.1) + coffee-rails (~> 4.2.1) + database_cleaner (~> 1.5.3) + factory_girl_rails (~> 4.7.0) jquery-rails - launchy (~> 2.4, >= 2.4.2) - pg (~> 0.17, >= 0.17.1) - poltergeist (~> 1.3, >= 1.3.0) - pry-rails (~> 0.3, >= 0.3.2) - rspec-rails (= 3.0.0.beta1) - sass-rails (~> 4.0, >= 4.0.2) - sham_rack (~> 1.3, >= 1.3.6) - simplecov (~> 0.7, >= 0.7.1) - slim (~> 2.0, >= 2.0.1) + launchy (~> 2.4.3) + pg (~> 0.18.4) + poltergeist (~> 1.10.0) + pry-rails (~> 0.3.4) + rspec-rails (~> 3.5.2) + sass-rails (~> 5.0.6) + sham_rack (~> 1.3.6) + simplecov (~> 0.12.0) + slim (~> 3.0.7) uploadbox! + +BUNDLED WITH + 1.12.5 diff --git a/Rakefile b/Rakefile index 576642f..38288a9 100644 --- a/Rakefile +++ b/Rakefile @@ -1,8 +1,5 @@ -begin - require 'bundler/setup' -rescue LoadError - puts 'You must `gem install bundler` and `bundle install` to run rake tasks' -end +require 'bundler' +Bundler::GemHelper.install_tasks require 'rdoc/task' @@ -17,10 +14,6 @@ end APP_RAKEFILE = File.expand_path("../spec/dummy/Rakefile", __FILE__) load 'rails/tasks/engine.rake' - - -Bundler::GemHelper.install_tasks - require 'rspec/core' require 'rspec/core/rake_task' desc "Run all specs in spec directory (excluding plugin specs)" diff --git a/app/assets/javascripts/_file_uploader.coffee b/app/assets/javascripts/_file_uploader.coffee index 8ee8962..e4d5c68 100644 --- a/app/assets/javascripts/_file_uploader.coffee +++ b/app/assets/javascripts/_file_uploader.coffee @@ -38,7 +38,7 @@ class @FileUploader @loader.show() data.submit() - @container.find('.fileupload').removeClass('processing').addClass('uploading') + @container.find('.fileupload').removeClass('is-processing').addClass('is-uploading') @container.closest('form').find('[type=submit]').attr("disabled", true) makePreview: (file) => @@ -64,7 +64,7 @@ class @FileUploader @loader.find('.bar').css({width: progress + '%'}) done: (e, data) => - @container.find('.fileupload').removeClass('uploading').addClass('processing') + @container.find('.fileupload').removeClass('is-uploading').addClass('is-processing') @originalFileURL = @fileInput.data('url') + @filePath $.ajax type: 'POST' @@ -81,7 +81,7 @@ class @FileUploader error: => @loader.detach() - @container.find('.fileupload').removeClass('uploading').removeClass('processing') + @container.find('.fileupload').removeClass('is-uploading').removeClass('is-processing') @container.closest('form').find('[type=submit]').attr("disabled", false) verifyProcessing: => @@ -104,7 +104,7 @@ class @FileUploader error: => @loader.detach() - @container.find('.fileupload').removeClass('uploading').removeClass('processing') + @container.find('.fileupload').removeClass('is-uploading').removeClass('is-processing') @container.closest('form').find('[type=submit]').attr("disabled", false) delete: => @@ -114,7 +114,7 @@ class @FileUploader fail: (e, data) => @loader.detach() - @container.find('.fileupload').removeClass('uploading').removeClass('processing') + @container.find('.fileupload').removeClass('is-uploading').removeClass('is-processing') @container.closest('form').find('[type=submit]').attr("disabled", false) showThumb: (image) => @@ -125,7 +125,7 @@ class @FileUploader @container.find('a.btn.fileupload-exists').attr('href', image.url) @container.find('[data-item="filename"]').attr('href', @originalFileURL).attr('target', '_blank') @container.find('.fileupload').removeClass('fileupload-new').addClass('fileupload-exists') - @container.find('.fileupload').removeClass('uploading').removeClass('processing') + @container.find('.fileupload').removeClass('is-uploading').removeClass('is-processing') @container.closest('form').find('[type=submit]').attr("disabled", false) setupLabel: => diff --git a/app/assets/javascripts/_image_uploader.coffee b/app/assets/javascripts/_image_uploader.coffee index e9e11b0..a1a951c 100644 --- a/app/assets/javascripts/_image_uploader.coffee +++ b/app/assets/javascripts/_image_uploader.coffee @@ -48,7 +48,7 @@ class @ImageUploader @loader.show() data.submit() - @container.find('.fileupload').removeClass('processing').addClass('uploading') + @container.find('.fileupload').removeClass('is-processing').addClass('is-uploading') @container.closest('form').find('[type=submit]').attr("disabled", true) appendThumb: (img) => @@ -76,7 +76,7 @@ class @ImageUploader @loader.find('.bar').css({width: progress + '%'}) done: (e, data) => - @container.find('.fileupload').removeClass('uploading').addClass('processing') + @container.find('.fileupload').removeClass('is-uploading').addClass('is-processing') @originalFileURL = @fileInput.data('url') + @filePath $.ajax @@ -93,7 +93,7 @@ class @ImageUploader error: => @loader.detach() - @container.find('.fileupload').removeClass('uploading').removeClass('processing') + @container.find('.fileupload').removeClass('is-uploading').removeClass('is-processing') @container.closest('form').find('[type=submit]').attr("disabled", false) verifyProcessing: => @@ -116,7 +116,7 @@ class @ImageUploader error: => @loader.detach() - @container.find('.fileupload').removeClass('uploading').removeClass('processing') + @container.find('.fileupload').removeClass('is-uploading').removeClass('is-processing') @container.closest('form').find('[type=submit]').attr("disabled", false) @@ -127,7 +127,7 @@ class @ImageUploader fail: (e, data) => @loader.detach() - @container.find('.fileupload').removeClass('uploading').removeClass('processing') + @container.find('.fileupload').removeClass('is-uploading').removeClass('is-processing') @container.closest('form').find('[type=submit]').attr("disabled", false) showThumb: (image) => @@ -138,7 +138,7 @@ class @ImageUploader @container.find('a.btn.fileupload-exists').attr('href', image.url) @thumbContainer.find('img').detach() @container.find('.fileupload').removeClass('fileupload-new').addClass('fileupload-exists') - @container.find('.fileupload').removeClass('uploading').removeClass('processing') + @container.find('.fileupload').removeClass('is-uploading').removeClass('is-processing') @container.closest('form').find('[type=submit]').attr("disabled", false) setupLabel: => diff --git a/app/assets/javascripts/_show_image.coffee b/app/assets/javascripts/_show_image.coffee index 88ff669..a66c27f 100644 --- a/app/assets/javascripts/_show_image.coffee +++ b/app/assets/javascripts/_show_image.coffee @@ -1,6 +1,6 @@ class @ShowImage constructor: (@container) -> - if @container.data('processing') == true + if @container.data('is-processing') == true loadImage @container.data('original'), @append, { maxWidth: @container.find('img').attr('width'), maxHeight: @container.find('img').attr('height'), @@ -12,4 +12,3 @@ class @ShowImage } append: (img) => @container.append(img) - diff --git a/app/assets/javascripts/_uploader_preview.coffee b/app/assets/javascripts/_uploader_preview.coffee index 7461f6e..84638c0 100644 --- a/app/assets/javascripts/_uploader_preview.coffee +++ b/app/assets/javascripts/_uploader_preview.coffee @@ -40,7 +40,7 @@ class @UploaderPreview } @loader.find('.uploader-overlay').height(@thumbContainer.data('height')) @container.prepend(@loader.show()) - @container.find('.fileupload').removeClass('processing').addClass('uploading') + @container.find('.fileupload').removeClass('is-processing').addClass('is-uploading') add: (e, data) => @file = data.files[0] @@ -89,7 +89,7 @@ class @UploaderPreview @loader.find('.bar').css({width: progress + '%'}) done: (data) => - @container.find('.fileupload').removeClass('uploading').addClass('processing') + @container.find('.fileupload').removeClass('is-uploading').addClass('is-processing') @container.closest('form').find('[type=submit]').attr("disabled", false) $(@).trigger('upload:done', @fileInput.data('url') + @filePath) @@ -108,7 +108,7 @@ class @UploaderPreview error: => @loader.detach() - @container.find('.fileupload').removeClass('uploading').removeClass('processing') + @container.find('.fileupload').removeClass('is-uploading').removeClass('is-processing') @container.closest('form').find('[type=submit]').attr("disabled", false) verifyProcessing: => @@ -139,7 +139,7 @@ class @UploaderPreview @idInput.val(image.id) @container.find('a.btn.fileupload-exists').attr('href', image.url) @container.find('.fileupload').removeClass('fileupload-new').removeClass('fileupload-uploading').addClass('fileupload-exists') - @container.find('.fileupload').removeClass('uploading').removeClass('processing') + @container.find('.fileupload').removeClass('is-uploading').removeClass('is-processing') fail: => @loader.detach() diff --git a/app/assets/stylesheets/uploadbox.sass b/app/assets/stylesheets/uploadbox.sass index 162199e..29f4aa4 100644 --- a/app/assets/stylesheets/uploadbox.sass +++ b/app/assets/stylesheets/uploadbox.sass @@ -10,7 +10,7 @@ .uploader-overlay width: 100% - background: rgba(0, 0, 0, .6) + background: rgba(#000, .6) position: absolute z-index: 1 @@ -36,11 +36,9 @@ width: 100% top: 10px - // &.uploading:before - // content: 'Enviando' + &.is-uploading - // &.processing:before - // content: 'Processando' + &.is-processing .fileupload-new .btn.fileupload-exists @@ -218,8 +216,6 @@ .fileupload-exists .btn.fileupload-exists display: block - // .fileupload-new - // display: none !important .fileupload background: transparent @@ -243,4 +239,4 @@ .fileupload-actions - position: static \ No newline at end of file + position: static diff --git a/lib/uploadbox/version.rb b/lib/uploadbox/version.rb index 8f6ed5d..6f036ec 100644 --- a/lib/uploadbox/version.rb +++ b/lib/uploadbox/version.rb @@ -1,3 +1,3 @@ module Uploadbox - VERSION = "0.2.0" + VERSION = "0.3.0" end diff --git a/uploadbox.gemspec b/uploadbox.gemspec index 550fd5e..3568d23 100644 --- a/uploadbox.gemspec +++ b/uploadbox.gemspec @@ -1,48 +1,46 @@ -$:.push File.expand_path('../lib', __FILE__) - -require 'uploadbox/version' +# -*- encoding: utf-8 -*- +$:.push File.expand_path("../lib", __FILE__) +require "uploadbox/version" Gem::Specification.new do |s| - s.name = 'uploadbox' + s.name = "uploadbox" s.version = Uploadbox::VERSION - s.authors = ['Julio Protzek', 'Renato Carvalho'] - s.email = ['julio@startae.com.br', 'renato@startae.com.br'] - s.homepage = 'https://github.com/startae/uploadbox' - s.summary = 'Ajax file uploader for Rails applications.' - s.description = 'Uploadbox makes easy to manage files in your Rails application.' - - s.required_ruby_version = '>= 1.9.3' - - s.license = 'MIT' + s.platform = Gem::Platform::RUBY + s.authors = ["Julio Protzek", "Renato Carvalho", "Romulo Machado"] + s.email = ["julioprotzek@gmail.com", "renatolz@gmail.com", "romulo.machado5@gmail.com"] + s.homepage = "https://github.com/startae/uploadbox" + s.summary = %q{Ajax file uploader for Rails applications.} + s.description = %q{Uploadbox makes easy to manage files in your Rails application.} + s.license = %q{MIT} - s.files = Dir['{app,config,db,lib}/**/*', 'MIT-LICENSE', 'Rakefile', 'README.md'] + s.add_dependency 'rails', '>= 5.0', '< 6' + s.add_dependency 'fog', '~> 1.38', '>= 1.38.0' + s.add_dependency 'carrierwave', '~> 0.11', '>= 0.11.2' + s.add_dependency 'carrierwave-processing', '~> 1.1', '>= 1.1.0' + s.add_dependency 'mini_magick', '~> 4.5', '>= 4.5.1' + s.add_dependency 'jbuilder', '>= 2.6.0', '< 3' + s.add_dependency 'resque', '~> 1.26', '>= 1.26.0' + s.add_dependency 'redis', '~> 3.3', '>= 3.3.1' + s.add_dependency 'heroku-api', '~> 0.4', '>= 0.4.2' + s.add_dependency 'dotenv-rails', '~> 2.1','>= 2.1.1' + s.add_dependency 'browser', '~> 2.2', '>= 2.2.0' - s.add_dependency 'rails', '>= 4.0.4', '< 5' - s.add_dependency 'fog', '~> 1.15', '>= 1.15.0' - s.add_dependency 'carrierwave', '~> 0.9', '>= 0.9.0' - s.add_dependency 'carrierwave-processing', '~> 0.0', '>= 0.0.2' - s.add_dependency 'mini_magick', '~> 3.6', '>= 3.6.0' - s.add_dependency 'jbuilder', '>= 1.2', '< 3' - s.add_dependency 'resque', '~> 1.25', '>= 1.25.0' - s.add_dependency 'redis', '~> 3.0', '>= 3.0.4' - s.add_dependency 'heroku-api', '~> 0.3', '>= 0.3.15' - s.add_dependency 'dotenv-rails', '~> 0.10','>= 0.10.0' - s.add_dependency 'browser', '~> 0.4', '>= 0.4.1' + s.add_development_dependency 'jquery-rails', '~> 4.2.1' + s.add_development_dependency 'better_errors', '~> 2.1.1' + s.add_development_dependency 'binding_of_caller', '~> 0.7.2' + s.add_development_dependency 'pg', '~> 0.18.4' + s.add_development_dependency 'rspec-rails', '~> 3.5.2' + s.add_development_dependency 'capybara', '~> 2.8.1' + s.add_development_dependency 'factory_girl_rails', '~> 4.7.0' + s.add_development_dependency 'poltergeist', '~> 1.10.0' + s.add_development_dependency 'database_cleaner', '~> 1.5.3' + s.add_development_dependency 'sham_rack', '~> 1.3.6' + s.add_development_dependency 'simplecov', '~> 0.12.0' + s.add_development_dependency 'pry-rails', '~> 0.3.4' + s.add_development_dependency 'launchy', '~> 2.4.3' + s.add_development_dependency 'sass-rails', '~> 5.0.6' + s.add_development_dependency 'coffee-rails', '~> 4.2.1' + s.add_development_dependency 'slim', '~> 3.0.7' - s.add_development_dependency 'jquery-rails', '~> 3.0', '>= 3.0.4' - s.add_development_dependency 'better_errors', '~> 0.9', '>= 0.9.0' - s.add_development_dependency 'binding_of_caller', '~> 0.7', '>= 0.7.2' - s.add_development_dependency 'pg', '~> 0.17', '>= 0.17.1' - s.add_development_dependency 'rspec-rails', '3.0.0.beta1' - s.add_development_dependency 'capybara', '~> 2.1', '>= 2.1.0' - s.add_development_dependency 'factory_girl_rails', '~> 4.2', '>= 4.2.1' - s.add_development_dependency 'poltergeist', '~> 1.3', '>= 1.3.0' - s.add_development_dependency 'database_cleaner', '1.0.1' - s.add_development_dependency 'sham_rack', '~> 1.3', '>= 1.3.6' - s.add_development_dependency 'simplecov', '~> 0.7', '>= 0.7.1' - s.add_development_dependency 'pry-rails', '~> 0.3', '>= 0.3.2' - s.add_development_dependency 'launchy', '~> 2.4', '>= 2.4.2' - s.add_development_dependency 'sass-rails', '~> 4.0', '>= 4.0.2' - s.add_development_dependency 'coffee-rails', '~> 4.0', '>= 4.0.0' - s.add_development_dependency 'slim', '~> 2.0', '>= 2.0.1' + s.files = Dir['{app,config,db,lib}/**/*', 'MIT-LICENSE', 'Rakefile', 'README.md'] end