bozo-scripts 0.8.0 → 0.9.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (3) hide show
  1. data/VERSION +1 -1
  2. data/lib/bozo/compilers/msbuild.rb +11 -24
  3. metadata +4 -4
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.8.0
1
+ 0.9.0
@@ -5,24 +5,15 @@ module Bozo::Compilers
5
5
 
6
6
  class Msbuild
7
7
 
8
- def config_with_defaults
9
- defaults = {
8
+ def initialize
9
+ @config = {
10
10
  :version => 'v4.0.30319',
11
11
  :framework => 'Framework64',
12
12
  :properties => {:configuration => :release},
13
- :max_cores => nil
13
+ :max_cores => nil,
14
+ :targets => [:build],
15
+ :websites_as_zip => false
14
16
  }
15
-
16
- default_targets = [:build]
17
-
18
- config = defaults.merge @config
19
- config[:targets] = (@targets or default_targets).clone
20
- config[:websites_as_zip] ||= false
21
- config
22
- end
23
-
24
- def initialize
25
- @config = {}
26
17
  @exclude_projects = []
27
18
  end
28
19
 
@@ -39,7 +30,6 @@ module Bozo::Compilers
39
30
  end
40
31
 
41
32
  def property(args)
42
- @config[:properties] ||= {}
43
33
  @config[:properties] = @config[:properties].merge(args)
44
34
  end
45
35
 
@@ -62,13 +52,11 @@ module Bozo::Compilers
62
52
  alias :properties :property
63
53
 
64
54
  def target(target)
65
- @targets ||= []
66
- @targets << target
55
+ @config[:targets] << target
67
56
  end
68
57
 
69
58
  def to_s
70
- config = configuration
71
- "Compile with msbuild #{config[:version]} building #{config[:solution]} with properties #{config[:properties]} for targets #{config[:targets]}"
59
+ "Compile with msbuild #{@config[:version]} building #{@config[:solution]} with properties #{@config[:properties]} for targets #{@config[:targets]}"
72
60
  end
73
61
 
74
62
  def without_stylecop
@@ -76,7 +64,7 @@ module Bozo::Compilers
76
64
  end
77
65
 
78
66
  def configuration
79
- config_with_defaults
67
+ Marshal.load(Marshal.dump(@config.dup))
80
68
  end
81
69
 
82
70
  def execute
@@ -168,10 +156,9 @@ module Bozo::Compilers
168
156
  end
169
157
 
170
158
  def clean(configuration)
171
- config = configuration.dup
172
- config.delete(:max_cores)
173
- config[:targets] = [:clean]
174
- args = generate_args config
159
+ configuration.delete(:max_cores)
160
+ configuration[:targets] = [:clean]
161
+ args = generate_args configuration
175
162
  execute_command :msbuild, args
176
163
 
177
164
  remove_obj_directory
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: bozo-scripts
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.8.0
4
+ version: 0.9.0
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -10,7 +10,7 @@ authors:
10
10
  autorequire:
11
11
  bindir: bin
12
12
  cert_chain: []
13
- date: 2015-10-07 00:00:00.000000000 Z
13
+ date: 2015-10-09 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: nokogiri
@@ -146,7 +146,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
146
146
  version: '0'
147
147
  segments:
148
148
  - 0
149
- hash: 777258561
149
+ hash: -43450659
150
150
  required_rubygems_version: !ruby/object:Gem::Requirement
151
151
  none: false
152
152
  requirements:
@@ -155,7 +155,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
155
155
  version: '0'
156
156
  segments:
157
157
  - 0
158
- hash: 777258561
158
+ hash: -43450659
159
159
  requirements: []
160
160
  rubyforge_project: bozo-scripts
161
161
  rubygems_version: 1.8.29