rake-funnel 0.8.0.pre → 0.9.0.pre

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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 76e33792436ca221a9d1b5ec6572d7dadd2ac3af
4
- data.tar.gz: 4d856be39020bd11358c0a74fa0fa214c406891c
3
+ metadata.gz: a24c43a1a9f0170bc60541024af1b0c7fba00bbe
4
+ data.tar.gz: 6781d9f355a322c4aa2a317466345d31e6c1df7c
5
5
  SHA512:
6
- metadata.gz: 31032a16b781db6847645733f160ff733f248d58b0d23d433970e3e8a76a3adaa7a8515f638a00fe7ea4a51d97d2593ccf9c9cc019a425c4f73a50f2d491243b
7
- data.tar.gz: c7be402ab2563c1aa1d52bff0610d700ffd7afc57ba357687539a6f480355dbac53e525a1edeeb11f21b8747e7c30f08b78be20abae47325c2d7e7b34ba5f422
6
+ metadata.gz: 16ee74bb0cefd902f980df81fb4e685ae6446d8fb67e8e6f28d6677c4551f224919f9e9775d9e641e6633a7e12bb5df83a6cc9240dee07d438ba960a093054b9
7
+ data.tar.gz: a812455493c6c84e4187ae4376559f81834a1fd2a7f3de66e11f5c445ca5f587908b62dbe4bb7d54f16b87081e27e4ba2ec34281c7762c2cbc6eaba0252196f2
@@ -1,15 +1,15 @@
1
- module Rake
2
- module Funnel
3
- module Support
4
- class Trace
5
- class << self
6
- def message(message)
7
- return unless Rake.application.options.trace
8
-
9
- Rake.rake_output_message(message)
10
- end
11
- end
12
- end
13
- end
14
- end
15
- end
1
+ module Rake
2
+ module Funnel
3
+ module Support
4
+ class Trace
5
+ class << self
6
+ def message(message)
7
+ return unless Rake.application.options.trace
8
+
9
+ Rake.rake_output_message(message)
10
+ end
11
+ end
12
+ end
13
+ end
14
+ end
15
+ end
@@ -8,7 +8,6 @@ module Rake
8
8
 
9
9
  def initialize(hash = nil)
10
10
  super(hash)
11
- freeze
12
11
  end
13
12
 
14
13
  def each(&block)
@@ -1,5 +1,5 @@
1
1
  module Rake
2
2
  module Funnel
3
- VERSION = '0.8.0.pre'
3
+ VERSION = '0.9.0.pre'
4
4
  end
5
5
  end
@@ -56,7 +56,7 @@ describe Rake::Funnel::Support::AssemblyVersionWriter do
56
56
  end
57
57
  end
58
58
 
59
- describe 'generator' do
59
+ describe '#write' do
60
60
  let(:source) {
61
61
  [
62
62
  {
@@ -82,7 +82,6 @@ describe Rake::Funnel::Support::AssemblyVersionWriter do
82
82
 
83
83
  let(:target_path) { double(Proc).as_null_object }
84
84
  let(:languages) { [:vb, :cs, :fs] }
85
- let(:erb) { double(ERB).as_null_object }
86
85
 
87
86
  subject {
88
87
  described_class.new(source)
@@ -93,11 +92,11 @@ describe Rake::Funnel::Support::AssemblyVersionWriter do
93
92
  }
94
93
 
95
94
  before {
96
- allow(ERB).to receive(:new).and_return(erb)
95
+ allow(ERB).to receive(:new).and_call_original
97
96
  }
98
97
 
99
98
  before {
100
- allow(File).to receive(:read).and_return('template')
99
+ allow(File).to receive(:read).and_call_original
101
100
  allow(File).to receive(:write)
102
101
  }
103
102
 
@@ -121,7 +120,7 @@ describe Rake::Funnel::Support::AssemblyVersionWriter do
121
120
  end
122
121
 
123
122
  it 'should run templates through ERb' do
124
- expect(erb).to have_received(:result).exactly(languages.length * source.length).times
123
+ expect(ERB).to have_received(:new).exactly(languages.length * source.length).times
125
124
  end
126
125
 
127
126
  it 'should write version info file for each language in source' do
@@ -136,5 +135,22 @@ describe Rake::Funnel::Support::AssemblyVersionWriter do
136
135
  expect { subject.write(target_path, languages) }.to raise_error /Language is not supported: unsupported/
137
136
  end
138
137
  end
138
+
139
+ describe 'version modification' do
140
+ let(:target_path) {
141
+ proc { |_language, version_info, source|
142
+ version_info.assembly_informational_version = 'totally custom'
143
+ 'file'
144
+ }
145
+ }
146
+
147
+ before {
148
+ subject.write(target_path, languages)
149
+ }
150
+
151
+ it 'should use modified version info to generate file' do
152
+ expect(File).to have_received(:write).with('file', /AssemblyInformationalVersion\("totally custom"\)/).at_least(:once)
153
+ end
154
+ end
139
155
  end
140
156
  end
@@ -1,3 +1,3 @@
1
- Paket-Ref
2
- Explicitly-Removed-Package
3
- Untouched
1
+ Paket-Ref
2
+ Explicitly-Removed-Package
3
+ Untouched
@@ -1,3 +1,3 @@
1
- Paket-Ref
2
- Explicitly-Removed-Package
3
- Untouched
1
+ Paket-Ref
2
+ Explicitly-Removed-Package
3
+ Untouched
@@ -1,3 +1,3 @@
1
- Paket-Ref
2
- Explicitly-Removed-Package
3
- Untouched
1
+ Paket-Ref
2
+ Explicitly-Removed-Package
3
+ Untouched
@@ -1,3 +1,3 @@
1
- Paket-Ref
2
- Explicitly-Removed-Package
3
- Untouched
1
+ Paket-Ref
2
+ Explicitly-Removed-Package
3
+ Untouched
@@ -300,16 +300,6 @@ describe Rake::Funnel::Support::VersionInfo do
300
300
  it 'should be an OpenStruct' do
301
301
  expect(described_class < OpenStruct).to eq(true)
302
302
  end
303
-
304
- describe 'immutability' do
305
- let(:args) { { a: 42 } }
306
-
307
- subject { described_class.new(args) }
308
-
309
- it 'should be immutable' do
310
- expect { subject.a = 23 }.to raise_error
311
- end
312
- end
313
303
  end
314
304
 
315
305
  describe '#read_version_from' do
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rake-funnel
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.8.0.pre
4
+ version: 0.9.0.pre
5
5
  platform: ruby
6
6
  authors:
7
7
  - Alexander Groß