drupid 1.1.2 → 1.1.3

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 8030f123e42767835106890cb4607a65167fd13f
4
- data.tar.gz: d77d020f6fdd540b8f25c04d657990ef5663f3d6
3
+ metadata.gz: 161cc5e1450ec53a00cad14a1859274bc8743f4f
4
+ data.tar.gz: 93f381ecf0bc8064a2f66b7e16b6783cb9836402
5
5
  SHA512:
6
- metadata.gz: e8638f29cc4a2b423328628e0f89ea723597d5bfe49e3ae2c4f710a7c40bafc8859e32903bb4b0dc1910897b0a9976742b11def87952d753d8116eaae880418b
7
- data.tar.gz: 7f5563fa71d1ff292aa70069cd5a0823b086814e992bbe6795247bf03fb339dfecdb0ad011f94760bea276df8d0d7e384d6b545efc07dda9c27228424e1abc4f
6
+ metadata.gz: 78722164f1d15b6197779e74774d1850fe73bd5024c6459617a86d1d3085ee172828355c1e398ed5492c6b2190b1108318bd384b10f2be257104fe04be0998ff
7
+ data.tar.gz: 88d5d9d43ff6eacc12c08180616b256dc5857c8b23dcb95937152cbba9e55e83770c6857470528172057c9adc60ae17080391f49a20a258eef70f1006b8252d9
data/README.md CHANGED
@@ -9,9 +9,12 @@ Drupid is a better replacement for [Drush](https://github.com/drush-ops/drush) `
9
9
 
10
10
  ### Release Notes ###
11
11
 
12
- #### Version 1.1.2 (2013/9/1) ####
12
+ #### Version 1.1.3 (2013/9/1) ####
13
13
 
14
- Clean up the gem packaging process and fix a broken dependency in Ruby 1.8.
14
+ - Fixed a broken dependency causing Drupid to fail to install in Ruby 1.8.
15
+ - Cleaned up the gem packaging process.
16
+ - Better debugging messages.
17
+ - Bug fixes.
15
18
 
16
19
  #### Version 1.1.0 (2013/9/1) ####
17
20
 
data/bin/drupid CHANGED
@@ -166,7 +166,7 @@ module Drupid
166
166
  '.lock' != @updater.makefile.path.extname
167
167
  @updater.makefile.save(@updater.makefile.path.sub_ext('.make.lock'))
168
168
  end
169
- if (not failed) and @options[:updatedb]
169
+ if (not failed) and (not @options[:dry]) and @options[:updatedb]
170
170
  if which('drush').nil?
171
171
  owarn 'Not updating the database because Drush cannot be found.'
172
172
  elsif @updater.updatedb
@@ -255,6 +255,7 @@ module Drupid
255
255
  def go!
256
256
  preflight_dependencies
257
257
  parse_options
258
+ debug USER_AGENT
258
259
  ohai "Dry run" if @options[:dry]
259
260
  case @options[:command]
260
261
  when :clear then clear_cache
data/drupid.gemspec CHANGED
@@ -24,8 +24,7 @@ Gem::Specification.new do |gem|
24
24
 
25
25
  # Dependencies
26
26
  gem.add_runtime_dependency 'rgl', ['>= 0.4.0']
27
- nokogiri_version = (RUBY_VERSION < '1.9') ? '= 1.5.9' : '>= 1.6.0'
28
- gem.add_runtime_dependency 'nokogiri', [nokogiri_version]
27
+ gem.add_runtime_dependency 'nokogiri', ['= 1.5.9']
29
28
  gem.add_development_dependency 'minitest', ['>= 5.0.6']
30
29
  gem.add_development_dependency 'rdoc', ['>= 0']
31
30
  end
data/lib/drupid/drush.rb CHANGED
@@ -33,7 +33,11 @@ module Drupid
33
33
  FileUtils.cd(path) do
34
34
  output = %x|drush core-status --format=yaml|
35
35
  end
36
- st = YAML.load(output)
36
+ begin # See self.installed?
37
+ st = YAML.load(output)
38
+ rescue Exception
39
+ return false
40
+ end
37
41
  return false unless st
38
42
  return (st['bootstrap'] =~ /Successful/) ? true : false
39
43
  end
@@ -55,7 +59,13 @@ module Drupid
55
59
  output = %x|drush pm-info --format=yaml #{project_name} 2>&1|
56
60
  return false unless $?.success? # site not fully bootstrapped
57
61
  end
58
- st = YAML.load(output)
62
+ # If a project is not found, Drush does *not* return a YAML structure,
63
+ # so we need to catch exceptions here.
64
+ begin
65
+ st = YAML.load(output)
66
+ rescue Exception
67
+ return false
68
+ end
59
69
  return false unless st.has_key?(project_name)
60
70
  type = st[project_name]['type']
61
71
  status = st[project_name]['status']
data/lib/drupid/patch.rb CHANGED
@@ -42,8 +42,9 @@ module Drupid
42
42
  blah "Fetching patch..."
43
43
  begin
44
44
  curl @url.to_s, '-o', dst
45
- rescue
45
+ rescue => ex
46
46
  raise "Patch #{File.basename(@url.to_s)} could not be fetched."
47
+ debug ex.message
47
48
  end
48
49
  @cached_location = dst
49
50
  debug "Patch downloaded into #{@cached_location}"
@@ -356,9 +356,9 @@ module Drupid
356
356
  @release_xml = Nokogiri::XML(open("http://updates.drupal.org/release-history/#{self.name}/#{self.core}"))
357
357
  end
358
358
  debug "Release history retrieved"
359
- rescue Exception
359
+ rescue => ex
360
360
  owarn "Could not get release history for #{self.extended_name}"
361
- blah e
361
+ debug "fetch_release_history: #{ex}"
362
362
  @release_xml = nil
363
363
  end
364
364
  end
@@ -499,7 +499,7 @@ module Drupid
499
499
  self.download_url = "http://git.drupal.org/project/#{name}.git"
500
500
  end
501
501
  self.update_download_url if self.download_url.nil?
502
- raise "No download URL specified for #{self.extended_name}" unless self.download_url
502
+ raise "No download URL defined for #{self.extended_name}" unless self.download_url
503
503
  downloader = Drupid.makeDownloader self.download_url.to_s,
504
504
  self.cached_location.dirname.to_s,
505
505
  self.cached_location.basename.to_s,
@@ -388,7 +388,8 @@ module Drupid
388
388
  begin
389
389
  component.fetch
390
390
  rescue => ex
391
- @log.error("#{component.extended_name} could not be fetched: #{ex.message}")
391
+ @log.error("#{component.extended_name} could not be fetched.")
392
+ debug "_fetch_and_patch: #{ex.message}"
392
393
  return false
393
394
  end
394
395
  if component.has_patches?
data/lib/drupid/utils.rb CHANGED
@@ -301,8 +301,11 @@ module Drupid
301
301
  def dont_debug
302
302
  saved_debug = $DEBUG
303
303
  $DEBUG = false
304
- yield
305
- $DEBUG = saved_debug
304
+ begin
305
+ yield
306
+ ensure
307
+ $DEBUG = saved_debug
308
+ end
306
309
  end
307
310
 
308
311
  end # Utils
@@ -1,4 +1,4 @@
1
1
  module Drupid
2
- VERSION = '1.1.2'
2
+ VERSION = '1.1.3'
3
3
  USER_AGENT = "Drupid #{VERSION} (Ruby #{RUBY_VERSION}-#{RUBY_PATCHLEVEL}; #{RUBY_PLATFORM})"
4
4
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: drupid
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.1.2
4
+ version: 1.1.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Lifepillar
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2013-09-01 00:00:00.000000000 Z
11
+ date: 2013-09-02 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rgl
@@ -28,16 +28,16 @@ dependencies:
28
28
  name: nokogiri
29
29
  requirement: !ruby/object:Gem::Requirement
30
30
  requirements:
31
- - - '>='
31
+ - - '='
32
32
  - !ruby/object:Gem::Version
33
- version: 1.6.0
33
+ version: 1.5.9
34
34
  type: :runtime
35
35
  prerelease: false
36
36
  version_requirements: !ruby/object:Gem::Requirement
37
37
  requirements:
38
- - - '>='
38
+ - - '='
39
39
  - !ruby/object:Gem::Version
40
- version: 1.6.0
40
+ version: 1.5.9
41
41
  - !ruby/object:Gem::Dependency
42
42
  name: minitest
43
43
  requirement: !ruby/object:Gem::Requirement