rake-builder 0.9.0 → 0.9.1

Sign up to get free protection for your applications and to get access to all the features.
data/lib/rake/builder.rb CHANGED
@@ -335,7 +335,8 @@ module Rake
335
335
  end
336
336
 
337
337
  def label
338
- target.gsub(%r(\.), '_')
338
+ label = target.sub(/^\.\//, '') # Remove current directory from name
339
+ label.gsub(%r(\.), '_')
339
340
  end
340
341
 
341
342
  # Source files found in source_search_paths
@@ -3,7 +3,7 @@ module Rake
3
3
  module VERSION #:nodoc:
4
4
  MAJOR = 0
5
5
  MINOR = 9
6
- TINY = 0
6
+ TINY = 1
7
7
 
8
8
  STRING = [MAJOR, MINOR, TINY].join('.')
9
9
  end
@@ -3,7 +3,8 @@ require 'spec_helper'
3
3
  describe Rake::Builder do
4
4
  include InputOutputTestHelper
5
5
 
6
- let(:target_pathname) { File.join('foo', 'bar', 'my_prog.exe') }
6
+ let(:target_path) { File.join('foo', 'bar') }
7
+ let(:target_pathname) { File.join(target_path, 'my_prog.exe') }
7
8
  let(:source_paths) { ['src/file1.cpp'] }
8
9
  let(:target_parameters) { [] }
9
10
  let(:builder) do
@@ -278,6 +279,14 @@ describe Rake::Builder do
278
279
  it 'replaces dots with underscores' do
279
280
  expect(builder.label).to eq(File.join('foo', 'bar', 'my_prog_exe'))
280
281
  end
282
+
283
+ context 'a leading current directory indicator' do
284
+ let(:target_path) { File.join('.', 'ciao') }
285
+
286
+ it 'is removed' do
287
+ expect(builder.label).to eq(File.join('ciao', 'my_prog_exe'))
288
+ end
289
+ end
281
290
  end
282
291
 
283
292
  context '#target_type' do
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rake-builder
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.9.0
4
+ version: 0.9.1
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -155,7 +155,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
155
155
  version: '0'
156
156
  segments:
157
157
  - 0
158
- hash: -3982904796129396463
158
+ hash: 3806419148437936099
159
159
  required_rubygems_version: !ruby/object:Gem::Requirement
160
160
  none: false
161
161
  requirements:
@@ -164,7 +164,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
164
164
  version: '0'
165
165
  segments:
166
166
  - 0
167
- hash: -3982904796129396463
167
+ hash: 3806419148437936099
168
168
  requirements: []
169
169
  rubyforge_project: nowarning
170
170
  rubygems_version: 1.8.23.2