drupid 1.0.0 → 1.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/lib/drupid/download_strategy.rb +2 -2
- data/lib/drupid/platform.rb +3 -3
- data/lib/drupid/project.rb +2 -2
- data/lib/drupid/updater.rb +1 -1
- data/lib/drupid.rb +1 -1
- metadata +2 -2
|
@@ -452,7 +452,7 @@ module Drupid
|
|
|
452
452
|
debug "Pathname.mkpath may raise harmless exceptions"
|
|
453
453
|
wd.mkpath unless wd.exist?
|
|
454
454
|
target = wd + @co.basename
|
|
455
|
-
FileUtils.cp_r Dir[@co+"{.}"], target
|
|
455
|
+
FileUtils.cp_r Dir[(@co+"{.}").to_s], target
|
|
456
456
|
|
|
457
457
|
require 'find'
|
|
458
458
|
Find.find(Dir.pwd) do |path|
|
|
@@ -534,7 +534,7 @@ module Drupid
|
|
|
534
534
|
def stage
|
|
535
535
|
# FIXME: The export command doesn't work on checkouts
|
|
536
536
|
# See https://bugs.launchpad.net/bzr/+bug/897511
|
|
537
|
-
FileUtils.cp_r Dir[@clone+"{.}"], Dir.pwd
|
|
537
|
+
FileUtils.cp_r Dir[(@clone+"{.}").to_s], Dir.pwd
|
|
538
538
|
FileUtils.rm_r Dir[Dir.pwd+"/.bzr"]
|
|
539
539
|
|
|
540
540
|
#dst=Dir.getwd
|
data/lib/drupid/platform.rb
CHANGED
|
@@ -65,7 +65,7 @@ module Drupid
|
|
|
65
65
|
# Returns the (possibly empty) list of sites in this platform.
|
|
66
66
|
def site_names
|
|
67
67
|
return [] unless sites_path.exist?
|
|
68
|
-
Pathname.glob(sites_path + '
|
|
68
|
+
Pathname.glob(sites_path.to_s + '/*/').map { |s| s.basename.to_s }.reject { |s| s =~ /^all$/ }
|
|
69
69
|
end
|
|
70
70
|
|
|
71
71
|
# Returns the full path to the libraries folder.
|
|
@@ -94,7 +94,7 @@ module Drupid
|
|
|
94
94
|
# For profiles to be found, they must be located inside
|
|
95
95
|
# the subdirectory of #local_path named 'profiles'.
|
|
96
96
|
def profiles
|
|
97
|
-
Pathname.glob(local_path + 'profiles/*/*.profile').map { |p| p.basename('.profile').to_s }
|
|
97
|
+
Pathname.glob(local_path.to_s + '/profiles/*/*.profile').map { |p| p.basename('.profile').to_s }
|
|
98
98
|
end
|
|
99
99
|
|
|
100
100
|
# Returns the Drupid::PlatformProject object with the specified name,
|
|
@@ -157,7 +157,7 @@ module Drupid
|
|
|
157
157
|
search_paths << local_path+contrib_path+'themes/**/*.info'
|
|
158
158
|
search_paths.uniq! # contrib_path may be ''
|
|
159
159
|
search_paths.each do |sp|
|
|
160
|
-
Dir[sp].each do |p|
|
|
160
|
+
Dir[sp.to_s].each do |p|
|
|
161
161
|
pp = Drupid::PlatformProject.new(self, p)
|
|
162
162
|
@projects[pp.name] = pp
|
|
163
163
|
count += 1
|
data/lib/drupid/project.rb
CHANGED
|
@@ -107,7 +107,7 @@ module Drupid
|
|
|
107
107
|
@project_dir+'**/*.info'
|
|
108
108
|
]
|
|
109
109
|
attempts.each do |p|
|
|
110
|
-
list = Pathname.glob(p)
|
|
110
|
+
list = Pathname.glob(p.to_s)
|
|
111
111
|
if 1 == list.size and list.first.exist?
|
|
112
112
|
# Set the project's name after the .info file name
|
|
113
113
|
@project_name = list.first.basename('.info').to_s
|
|
@@ -115,7 +115,7 @@ module Drupid
|
|
|
115
115
|
end
|
|
116
116
|
end
|
|
117
117
|
# We get here if all the above has failed.
|
|
118
|
-
Pathname.glob(@project_dir+'
|
|
118
|
+
Pathname.glob(@project_dir.to_s+'/**/*.info').each do |p|
|
|
119
119
|
data = p.open("r").read
|
|
120
120
|
match = data.match(/project\s*=\s*["']?(.+)["']?/)
|
|
121
121
|
unless match.nil?
|
data/lib/drupid/updater.rb
CHANGED
|
@@ -280,7 +280,7 @@ module Drupid
|
|
|
280
280
|
# deleting "spurious" paths inside the 'libraries' folder.
|
|
281
281
|
# Note also that Drupid is not smart enough to find libraries installed
|
|
282
282
|
# inside modules or themes.
|
|
283
|
-
Pathname.glob(@platform.libraries_path + '
|
|
283
|
+
Pathname.glob(@platform.libraries_path.to_s + '/**/*').each do |p|
|
|
284
284
|
next unless p.directory?
|
|
285
285
|
q = p.relative_path_from(@platform.local_path + @platform.contrib_path)
|
|
286
286
|
# If q is not a prefix of any processed path, or viceversa, delete it
|
data/lib/drupid.rb
CHANGED
|
@@ -38,7 +38,7 @@ module Kernel
|
|
|
38
38
|
end unless Kernel.respond_to? :silence_warnings
|
|
39
39
|
|
|
40
40
|
module Drupid
|
|
41
|
-
DRUPID_VERSION = '1.0.
|
|
41
|
+
DRUPID_VERSION = '1.0.1'
|
|
42
42
|
DRUPID_USER_AGENT = "Drupid #{DRUPID_VERSION} (Ruby #{RUBY_VERSION}-#{RUBY_PATCHLEVEL}; #{RUBY_PLATFORM})"
|
|
43
43
|
end
|
|
44
44
|
|
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: drupid
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 1.0.
|
|
4
|
+
version: 1.0.1
|
|
5
5
|
prerelease:
|
|
6
6
|
platform: ruby
|
|
7
7
|
authors:
|
|
@@ -9,7 +9,7 @@ authors:
|
|
|
9
9
|
autorequire:
|
|
10
10
|
bindir: bin
|
|
11
11
|
cert_chain: []
|
|
12
|
-
date: 2012-11-
|
|
12
|
+
date: 2012-11-05 00:00:00.000000000 Z
|
|
13
13
|
dependencies:
|
|
14
14
|
- !ruby/object:Gem::Dependency
|
|
15
15
|
name: rgl
|