Merge branch 'master' of https://git-wip-us.apache.org/repos/asf/buildr
diff --git a/buildr.gemspec b/buildr.gemspec
index 8451707..1b346e8 100644
--- a/buildr.gemspec
+++ b/buildr.gemspec
@@ -38,7 +38,6 @@
to do, and it takes care of the rest. But also something we can easily extend
for those one-off tasks, with a language that's a joy to use.
TEXT
- spec.rubyforge_project = 'buildr'
spec.platform = $platform
diff --git a/lib/buildr/packaging/artifact_namespace.rb b/lib/buildr/packaging/artifact_namespace.rb
index b977fa5..90d30ac 100644
--- a/lib/buildr/packaging/artifact_namespace.rb
+++ b/lib/buildr/packaging/artifact_namespace.rb
@@ -720,10 +720,10 @@
previous = get(unvers, false) || get(name, false)
if previous # have previous on current namespace
if previous.requirement # we must satisfy the requirement
- unless unvers # we only have the version
- satisfied = previous.requirement.satisfied_by?(artifact.version)
- else
+ if unvers
satisfied = previous.satisfied_by?(artifact)
+ else # we only have the version
+ satisfied = previous.requirement.satisfied_by?(artifact.version)
end
raise "Unsatisfied dependency #{previous} " +
"not satisfied by #{artifact}" unless satisfied
@@ -961,6 +961,7 @@
private
def get(name, include_parents = true, include_subs = true, include_self = true) #:nodoc:
+ artifact = nil
if include_subs && name.to_s[/_/] # try sub namespaces first
sub, parts = self, name.to_s.split('_')
sub_name = parts.shift.to_sym
@@ -980,7 +981,7 @@
artifact = registry.parent.get(name, true)
end
end
- artifact = artifact.call if artifact.respond_to?(:call)
+ artifact = artifact.call if artifact && artifact.respond_to?(:call)
artifact
end
diff --git a/rakelib/release.rake b/rakelib/release.rake
index a4073d4..8370cf8 100644
--- a/rakelib/release.rake
+++ b/rakelib/release.rake
@@ -13,7 +13,7 @@
# License for the specific language governing permissions and limitations under
# the License.
-RC_VERSION = ENV['RC_VERSION'] || ''
+RC_VERSION = ENV['RC_VERSION'] || '' unless defined?(RC_VERSION)
desc 'Release the next version of buildr from existing staged repository'
task 'release' do
diff --git a/rakelib/stage.rake b/rakelib/stage.rake
index 1c22693..06cd526 100644
--- a/rakelib/stage.rake
+++ b/rakelib/stage.rake
@@ -18,8 +18,8 @@
gpg_cmd = 'gpg2'
-STAGE_DATE = ENV['STAGE_DATE'] || Time.now.strftime('%Y-%m-%d')
-RC_VERSION = ENV['RC_VERSION'] || ''
+STAGE_DATE = ENV['STAGE_DATE'] || Time.now.strftime('%Y-%m-%d') unless defined?(STAGE_DATE)
+RC_VERSION = ENV['RC_VERSION'] || '' unless defined?(RC_VERSION)
task 'prepare' do
# Update source files to next release number.