berkes-drupal.rb 0.0.9 → 0.0.10

Sign up to get free protection for your applications and to get access to all the features.
data/README.txt CHANGED
@@ -1,4 +1,4 @@
1
- = drupal
1
+ = drupal.rb
2
2
 
3
3
  http://berkes.github.com/drupal.rb/
4
4
 
@@ -69,22 +69,6 @@ to quickly generate and manage Drupal modules.
69
69
  Create a file in ~/.drupal.rb/ named defaults.yml. The variables in there will
70
70
  be used as defaults on the prompt when creating a module.
71
71
  Alternatively you can copy the example from the doc dir in the package.
72
-
73
- == TODO:
74
- * Move module, install to base too.
75
- * Add support for database scheme upgrades, similar to rake db: commands. Should add hook_update to .install.
76
- * Move helptext into one include instead of having it on 4 places (DRY!)
77
- * Improve Drupal version support to defaults.yml.
78
- * Remove ':' from todo list items
79
- * Support versions for installer
80
- * Support version prompt for project installation
81
- * Support installing a list from file(s) so that devs may have lists of core modules they use
82
- * Add hook dependencies
83
- * Add an option to write and/or change defaults.yml from commandline
84
- * Add installer for jQuery plugins?
85
- * Add graceful error handling
86
- * Add / refactor tests, using rspec
87
- * Refactor / encapsulate entire project / make extendable
88
72
 
89
73
  == AUTHOR:
90
74
 
@@ -1,6 +1,6 @@
1
1
  Gem::Specification.new do |s|
2
2
  s.name = "drupal.rb"
3
- s.version = "0.0.9"
3
+ s.version = "0.0.10"
4
4
  s.date = "2008-10-16"
5
5
  s.summary = "Drupal development kit"
6
6
  s.email = "ber@webschuur.com"
@@ -9,6 +9,10 @@ Gem::Specification.new do |s|
9
9
  s.has_rdoc = true
10
10
  s.require_path = "lib"
11
11
  s.authors = ["tj@vision-media.ca", "ber@webschuur.com"]
12
+ s.add_dependency("archive-tar-minitar", ">0.5.0")
13
+ s.requirements = [
14
+ "A POSIX compliant environment (Mac, Unix, Linux, and for Windows Cygwin)",
15
+ "Minitar Gem version 0.5.0 or greater. http://raa.ruby-lang.org/project/minitar" ]
12
16
  s.files = ["History.txt",
13
17
  "Manifest.txt",
14
18
  "README.txt",
@@ -56,7 +56,7 @@ class Drupal
56
56
 
57
57
  MAJOR = 0
58
58
  MINOR = 0
59
- TINY = 6
59
+ TINY = 9
60
60
  VERSION = [MAJOR, MINOR, TINY].join('.')
61
61
 
62
62
  # Run the drupal development tool.
@@ -1,6 +1,8 @@
1
- require 'zlib'
1
+ require 'rubygems'
2
2
  require 'net/http'
3
3
  require 'rexml/document'
4
+ require 'zlib'
5
+ require 'archive/tar/minitar'
4
6
 
5
7
  class Drupal
6
8
  class Install
@@ -58,21 +60,19 @@ class Drupal
58
60
  @tarpath = get_tarball(release)
59
61
 
60
62
  # Extract tarball
61
- @pwd = Dir.getwd
62
- Dir.chdir File.dirname(@tarpath) and debug "Changed cwd to #{File.dirname(@tarpath)}" unless @dest == '.'
63
- Kernel.system "tar -xf #{@tarpath}" rescue abort "Failed to extract #{@tarpath}"
64
- Dir.chdir @pwd and debug "Reverted cwd back to #{@pwd}" unless @dest == '.'
65
-
63
+ tgz = Zlib::GzipReader.new(File.open(@tarpath, 'rb'))
64
+ Archive::Tar::Minitar.unpack(tgz, @dest) rescue abort "Failed to extract #{@tarpath} to #{@dest}"
65
+
66
66
  # Remove tarball
67
- Kernel.system "rm #{@tarpath}" rescue abort "Failed to remove #{@tarpath}"
67
+ File.delete(@tarpath) rescue abort "Failed to remove #{@tarpath}"
68
68
 
69
69
  # Installation complete
70
- debug "Project installed to #{File.dirname(@tarpath)}" unless @dest == '.'
70
+ debug "Project #{@project} installed to #{File.dirname(@tarpath)}" unless @dest == '.'
71
71
  debug 'Installation complete'
72
72
  end
73
73
 
74
74
  def get_xml project, version='6.x'
75
- debug "Locating #{project} page"
75
+ debug "Locating #{project} page for version #{version}"
76
76
  # Locate tarball from project page
77
77
  begin
78
78
  response = Net::HTTP.get_response(URI.parse("http://updates.drupal.org/release-history/#{project}/#{version}"))
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: berkes-drupal.rb
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.9
4
+ version: 0.0.10
5
5
  platform: ruby
6
6
  authors:
7
7
  - tj@vision-media.ca
@@ -12,8 +12,17 @@ cert_chain: []
12
12
 
13
13
  date: 2008-10-16 00:00:00 -07:00
14
14
  default_executable:
15
- dependencies: []
16
-
15
+ dependencies:
16
+ - !ruby/object:Gem::Dependency
17
+ name: archive-tar-minitar
18
+ type: :runtime
19
+ version_requirement:
20
+ version_requirements: !ruby/object:Gem::Requirement
21
+ requirements:
22
+ - - ">"
23
+ - !ruby/object:Gem::Version
24
+ version: 0.5.0
25
+ version:
17
26
  description: Drupal is an open source Ruby development tool allowing developers to quickly generate and manage Drupal modules.
18
27
  email: ber@webschuur.com
19
28
  executables:
@@ -83,8 +92,9 @@ required_rubygems_version: !ruby/object:Gem::Requirement
83
92
  - !ruby/object:Gem::Version
84
93
  version: "0"
85
94
  version:
86
- requirements: []
87
-
95
+ requirements:
96
+ - A POSIX compliant environment (Mac, Unix, Linux, and for Windows Cygwin)
97
+ - Minitar Gem version 0.5.0 or greater. http://raa.ruby-lang.org/project/minitar
88
98
  rubyforge_project:
89
99
  rubygems_version: 1.3.5
90
100
  signing_key: