iron_hammer 1.0.2 → 1.0.3

Sign up to get free protection for your applications and to get access to all the features.
data/Rakefile CHANGED
@@ -14,7 +14,7 @@ $hoe = Hoe.spec 'iron_hammer' do
14
14
  self.rubyforge_name = self.name
15
15
  self.extra_deps = [['rubyzip2','>= 2.0.1'],
16
16
  ['builder', '>= 2.1.2']]
17
- self.version = '1.0.2'
17
+ self.version = '1.0.3'
18
18
  end
19
19
 
20
20
  require 'newgem/tasks'
data/lib/iron_hammer.rb CHANGED
@@ -32,6 +32,7 @@ require 'iron_hammer/projects/dll_project'
32
32
  require 'iron_hammer/projects/generic_project'
33
33
  require 'iron_hammer/projects/project_file'
34
34
  require 'iron_hammer/projects/project_types'
35
+ require 'iron_hammer/projects/solution_project'
35
36
  require 'iron_hammer/projects/test_project'
36
37
  require 'iron_hammer/solutions/solution'
37
38
  require 'iron_hammer/solutions/solution_file'
@@ -16,8 +16,8 @@ module IronHammer
16
16
  content = file
17
17
  File.open(@filename, 'w') do |f|
18
18
  content.each_line do |line|
19
- line.gsub!(/^(\[assembly: AssemblyVersion\(").*("\)\])$/) do |match|
20
- "#{$1}#{new_version}#{$2}"
19
+ line.gsub!(/^(\[assembly: Assembly(File)?Version\(").*("\)\])$/) do |match|
20
+ "#{$1}#{new_version}#{$3}"
21
21
  end
22
22
  f << line
23
23
  end
@@ -0,0 +1,21 @@
1
+ module IronHammer
2
+ module Projects
3
+ class SolutionProject
4
+
5
+ def initialize name, dependencies
6
+ @name = name
7
+ @dependencies = dependencies
8
+ end
9
+
10
+ def assembly_name
11
+ @name
12
+ end
13
+
14
+ def dependencies
15
+ @dependencies
16
+ end
17
+
18
+ end unless defined? SolutionProject
19
+ end
20
+ end
21
+
@@ -50,14 +50,20 @@ namespace :iron do
50
50
  end
51
51
 
52
52
  namespace :ivy do
53
- desc 'Publishes project dependencies into ivy repository'
54
- task :setup, [:binaries_path] do |t, args|
55
- all_dependencies = []
56
- @anvil.projects.each do |project|
57
- project.dependencies.each do |dependency|
58
- all_dependencies << dependency unless all_dependencies.include? dependency
53
+ def all_dependencies
54
+ unless @all_dependencies
55
+ @all_dependencies = []
56
+ @anvil.projects.each do |project|
57
+ project.dependencies.each do |dependency|
58
+ @all_dependencies << dependency unless @all_dependencies.include? dependency
59
+ end
59
60
  end
60
61
  end
62
+ @all_dependencies
63
+ end
64
+
65
+ desc 'Publishes project dependencies into ivy repository'
66
+ task :setup, [:binaries_path] do |t, args|
61
67
 
62
68
  files = Dir.new(args.binaries_path).entries
63
69
  candidates = all_dependencies.select {|x| files.include? "#{x.name}.#{x.extension}"}
@@ -105,13 +111,16 @@ namespace :iron do
105
111
  end
106
112
 
107
113
  desc 'Retrieves all project dependencies from ivy repository and modify project csproj to reference them'
108
- task :retrieve => [:generate] do
114
+ task :retrieve do
115
+ builder = IvyBuilder.new(SolutionProject.new(@anvil.solution.name, all_dependencies))
116
+ xml = "ivy-#{@anvil.solution.name}.xml"
117
+ builder.write_to xml
118
+
119
+ sh builder.retrieve xml
120
+
109
121
  @anvil.projects.each do |project|
110
- xml = "ivy-#{project.name}.xml"
111
122
  builder = IvyBuilder.new project
112
123
 
113
- sh builder.retrieve xml
114
-
115
124
  builder.modify_csproj
116
125
  end
117
126
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: iron_hammer
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.2
4
+ version: 1.0.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Mozair Alves do Carmo Junior
@@ -10,7 +10,7 @@ autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
12
 
13
- date: 2010-02-09 00:00:00 -02:00
13
+ date: 2010-02-11 00:00:00 -02:00
14
14
  default_executable:
15
15
  dependencies:
16
16
  - !ruby/object:Gem::Dependency
@@ -98,6 +98,7 @@ files:
98
98
  - lib/iron_hammer/projects/generic_project.rb
99
99
  - lib/iron_hammer/projects/project_file.rb
100
100
  - lib/iron_hammer/projects/project_types.rb
101
+ - lib/iron_hammer/projects/solution_project.rb
101
102
  - lib/iron_hammer/projects/test_project.rb
102
103
  - lib/iron_hammer/solutions/solution.rb
103
104
  - lib/iron_hammer/solutions/solution_file.rb