[Git][noosfero/noosfero][master] 2 commits: Fixes orders plugin installation procedure

Rodrigo Souto gitlab at mg.gitlab.com
Wed Mar 8 10:40:33 BRT 2017


Rodrigo Souto pushed to branch master at Noosfero / noosfero


Commits:
a4a3a402 by Gabriel Silva at 2017-02-21T05:33:17+00:00
Fixes orders plugin installation procedure

Signed-off-by: Gabriel Silva <gabriel93.silva at gmail.com>

- - - - -
86d6ceef by Rodrigo Souto at 2017-03-08T13:40:26+00:00
Merge branch 'travis_fix_orders' into 'master'

Fixes orders plugin installation procedure

See merge request !1129
- - - - -


1 changed file:

- plugins/orders/install.rb


Changes:

=====================================
plugins/orders/install.rb
=====================================
--- a/plugins/orders/install.rb
+++ b/plugins/orders/install.rb
@@ -4,17 +4,18 @@ sources_file = File.join(File.expand_path(File.dirname(__FILE__)), 'noosfero-jes
 repo_url = 'http://download.noosfero.org/debian/jessie-test'
 needs_update = false
 
-unless system "sudo grep -q '#{repo_url}' /etc/apt/sources.list /etc/apt/sources.list.d/*"
-  print 'To install this plugin, you must add noosfero-jessie-test to you sources list, Do you want to proceed? (yes/no): '
-  answer = gets.strip.downcase
-  exit(1) unless answer == 'yes' || answer == 'y'
+unless  ENV['NOOSFERO_BUNDLE_OPTS'] == 'install' || system('dpkg -s ruby-axlsx')
+  unless system "sudo grep -q '#{repo_url}' /etc/apt/sources.list /etc/apt/sources.list.d/*"
+    puts 'To install this plugin, you must add noosfero-jessie-test to you sources list.'
+    print 'Do you want to proceed? [(y)es/(n)o]: '
+    answer = gets.strip.downcase
+    exit(1) unless answer == 'yes' || answer == 'y'
 
-  puts '>>> Adding Noosfero jessie-test to your sources...'
-  FileUtils.cp(sources_file, '/etc/apt/sources.list.d/')
-  needs_update = true
-end
+    puts '>>> Adding Noosfero jessie-test to your sources...'
+    FileUtils.cp(sources_file, '/etc/apt/sources.list.d/')
+    needs_update = true
+  end
 
-unless system 'dpkg -s ruby-axlsx'
   puts '>>> Installing ruby-axlsx...'
   system 'sudo apt-get update' if needs_update
   unless system 'sudo apt-get install -y ruby-axlsx'



View it on GitLab: https://gitlab.com/noosfero/noosfero/compare/3a134694d93126a05f8bd8d23f0103631c3b3db5...86d6ceef1c67961c8ebb57b00f95aeb8b5ff59cc
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://listas.softwarelivre.org/pipermail/noosfero-dev/attachments/20170308/42bd4c00/attachment-0001.html>


More information about the Noosfero-dev mailing list