logirel 0.1.3 → 0.1.4
Sign up to get free protection for your applications and to get access to all the features.
- data/.semver +1 -1
- data/README.md +2 -1
- data/lib/logirel/cli.rb +3 -2
- data/lib/logirel/tasks/msbuild.rb +14 -5
- data/lib/logirel/templates/Rakefile.tt +0 -2
- data/lib/logirel/templates/environment.tt +2 -2
- data/lib/logirel/templates/paths.tt +5 -5
- data/lib/logirel/version.rb +1 -1
- data/logirel.gemspec +3 -2
- metadata +31 -20
data/.semver
CHANGED
data/README.md
CHANGED
@@ -4,10 +4,11 @@ Getting started
|
|
4
4
|
===============
|
5
5
|
1. `gem install logirel`
|
6
6
|
1. Go to the project of your choice
|
7
|
-
1. `logirel
|
7
|
+
1. `logirel`
|
8
8
|
1. You should now answer the questions that logirel poses.
|
9
9
|
1. after it's done, run `rake`.
|
10
10
|
|
11
|
+
**[Apache 2 Licensed](http://www.apache.org/licenses/LICENSE-2.0.html)**
|
11
12
|
|
12
13
|
Hacking it
|
13
14
|
==========
|
data/lib/logirel/cli.rb
CHANGED
@@ -29,7 +29,7 @@ module Logirel
|
|
29
29
|
method_option "root", :type => :string, :banner => "Perform the initialization in the given root directory"
|
30
30
|
method_option "raketempl", :type => :string, :banner => "Specify the initialization template to use"
|
31
31
|
def init(root = Dir.pwd, raketempl = 'Rakefile.tt')
|
32
|
-
opts = options.dup
|
32
|
+
#opts = options.dup
|
33
33
|
helper = CliHelper.new root
|
34
34
|
@root = root
|
35
35
|
|
@@ -58,7 +58,8 @@ module Logirel
|
|
58
58
|
run 'git add .'
|
59
59
|
|
60
60
|
# TODO: add a few nuget, nuspec, owrap, fpm, puppet etc tasks here!
|
61
|
-
|
61
|
+
build_sln = BoolQ.new("add msbuild task for sln file?", true).exec
|
62
|
+
msbuild_task BoolQ.new("Set this task up as rake default task?", true).exec if build_sln
|
62
63
|
|
63
64
|
helper.say_goodbye
|
64
65
|
end
|
@@ -1,14 +1,23 @@
|
|
1
1
|
module Logirel::Tasks
|
2
|
-
def msbuild_task(
|
2
|
+
def msbuild_task(add_as_default = true, opts={})
|
3
3
|
#sln_file_path = tuck_and_get :sln_file_path, sln_file_path
|
4
|
+
#add_as_default = tuck_and_get :add_as_default, add_as_default
|
5
|
+
|
6
|
+
if add_as_default
|
7
|
+
append_to_file File.join(@root, BUILD_FILE), <<-EOF, :verbose => false
|
8
|
+
|
9
|
+
task :default => ["env:release", #{ inject_task_name opts, 'msbuild' }]
|
10
|
+
|
11
|
+
EOF
|
12
|
+
end
|
4
13
|
|
5
14
|
append_to_file File.join(@root, BUILD_FILE), <<-EOF, :verbose => false
|
6
15
|
|
7
16
|
desc "build sln file"
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
17
|
+
msbuild #{ inject_task_name opts, 'msbuild' }#{ inject_dependency opts } do |msb|
|
18
|
+
msb.solution = FILES[:sln]
|
19
|
+
msb.properties :Configuration => CONFIGURATION
|
20
|
+
msb.targets :Clean, :Build
|
12
21
|
end
|
13
22
|
EOF
|
14
23
|
end
|
@@ -9,7 +9,7 @@ namespace :env do
|
|
9
9
|
fv = version SemVer.find.to_s
|
10
10
|
revision = (!fv[3] || fv[3] == 0) ? (ENV['BUILD_NUMBER'] || Time.now.strftime('%j%H')) : fv[3] # (day of year 0-265)(hour 00-24)
|
11
11
|
|
12
|
-
ENV['BUILD_VERSION'] = BUILD_VERSION = SemVer.new(fv[0], fv[1], fv[2]
|
12
|
+
ENV['BUILD_VERSION'] = BUILD_VERSION = "#{SemVer.new(fv[0], fv[1], fv[2]).to_s}.#{revision}"
|
13
13
|
puts "Assembly Version: #{BUILD_VERSION}."
|
14
14
|
puts "##teamcity[buildNumber '#{BUILD_VERSION}']" # tell teamcity our decision
|
15
15
|
|
@@ -32,7 +32,7 @@ namespace :env do
|
|
32
32
|
CLEAN.include(FOLDERS[:<%=k%>][:out])
|
33
33
|
|
34
34
|
# for tests
|
35
|
-
FOLDERS[:<%=k%>] = File.join(FOLDERS[:src], PROJECTS[:<%=k%>][:test_dir], 'bin', CONFIGURATION)
|
35
|
+
FOLDERS[:<%=k%>][:test_out] = File.join(FOLDERS[:src], PROJECTS[:<%=k%>][:test_dir], 'bin', CONFIGURATION)
|
36
36
|
FILES[:<%=k%>][:test] = File.join(FOLDERS[:<%=k%>][:test_out], "#{PROJECTS[:<%=k%>][:test_dir]}.dll")
|
37
37
|
CLEAN.include(FOLDERS[:test_out])
|
38
38
|
<% end %>
|
@@ -3,7 +3,7 @@ require "<%=folders[:buildscripts]%>/project_details"
|
|
3
3
|
|
4
4
|
# The folders array denoting where to place build artifacts
|
5
5
|
|
6
|
-
|
6
|
+
folders = {
|
7
7
|
:root => root_folder,
|
8
8
|
:src => "<%= folders[:src] %>",
|
9
9
|
:build => "<%= folders[:build] %>",
|
@@ -14,11 +14,11 @@ FOLDERS = {
|
|
14
14
|
:nuspec => "<%= folders[:nuspec] %>"
|
15
15
|
}
|
16
16
|
|
17
|
-
FOLDERS.merge({
|
17
|
+
FOLDERS = folders.merge({
|
18
18
|
<% metas.each do |m| %>
|
19
19
|
:<%=m[:ruby_key]%> => {
|
20
20
|
:test_dir => '<%= m[:test_dir] %>',
|
21
|
-
:nuspec =>
|
21
|
+
:nuspec => "#{folders[:nuspec]}/#{PROJECTS[:<%= m[:ruby_key] %>][:nuget_key]}",
|
22
22
|
:out => 'placeholder - environment.rb will sets this',
|
23
23
|
:test_out => 'placeholder - environment.rb sets this'
|
24
24
|
},
|
@@ -29,15 +29,15 @@ FILES = {
|
|
29
29
|
:sln => "<%= files[:sln] %>",
|
30
30
|
<% metas.each do |m| %>
|
31
31
|
:<%= m[:ruby_key] %> => {
|
32
|
-
:nuspec => File.join(FOLDERS[:<%= m[:ruby_key] %>][:nuspec], "#{PROJECTS[:<%= m[:ruby_key] %>][:nuget_key]}.nuspec")
|
32
|
+
:nuspec => "todo" # File.join(FOLDERS[:<%= m[:ruby_key] %>][:nuspec], "#{PROJECTS[:<%= m[:ruby_key] %>][:nuget_key]}.nuspec")
|
33
33
|
},
|
34
34
|
<% end %>
|
35
35
|
}
|
36
36
|
|
37
37
|
COMMANDS = {
|
38
|
-
:nunit => File.join(FOLDERS[:nunit], "nunit-console.exe"),
|
39
38
|
:nuget => File.join(FOLDERS[:tools], "NuGet.exe"),
|
40
39
|
:ilmerge => File.join(FOLDERS[:tools], "ILMerge.exe")
|
40
|
+
# nunit etc
|
41
41
|
}
|
42
42
|
|
43
43
|
URIS = {
|
data/lib/logirel/version.rb
CHANGED
data/logirel.gemspec
CHANGED
@@ -32,10 +32,11 @@ Gem::Specification.new do |s|
|
|
32
32
|
s.add_dependency "bundler", "~> 1.0.14"
|
33
33
|
s.add_dependency "thor", "~> 0.14.6"
|
34
34
|
s.add_dependency "uuid", "~> 2.3.2"
|
35
|
-
s.add_dependency "nokogiri",
|
35
|
+
s.add_dependency "nokogiri", "~>1.4.4"
|
36
|
+
s.add_dependency "rubyzip", "~>0.9.4"
|
36
37
|
|
37
38
|
s.requirements << '.Net or Mono installation'
|
38
39
|
s.requirements << 'xbuild (on linux) or msbuild (on windows) for csproj files'
|
39
40
|
s.requirements << 'Access to the internet w/o a proxy! ;)'
|
40
41
|
|
41
|
-
end
|
42
|
+
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: logirel
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.4
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,11 +9,11 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2011-
|
12
|
+
date: 2011-08-11 00:00:00.000000000Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: rspec
|
16
|
-
requirement: &
|
16
|
+
requirement: &21961584 !ruby/object:Gem::Requirement
|
17
17
|
none: false
|
18
18
|
requirements:
|
19
19
|
- - ~>
|
@@ -21,10 +21,10 @@ dependencies:
|
|
21
21
|
version: 2.6.0
|
22
22
|
type: :development
|
23
23
|
prerelease: false
|
24
|
-
version_requirements: *
|
24
|
+
version_requirements: *21961584
|
25
25
|
- !ruby/object:Gem::Dependency
|
26
26
|
name: memoize
|
27
|
-
requirement: &
|
27
|
+
requirement: &21961164 !ruby/object:Gem::Requirement
|
28
28
|
none: false
|
29
29
|
requirements:
|
30
30
|
- - ! '>='
|
@@ -32,10 +32,10 @@ dependencies:
|
|
32
32
|
version: '0'
|
33
33
|
type: :development
|
34
34
|
prerelease: false
|
35
|
-
version_requirements: *
|
35
|
+
version_requirements: *21961164
|
36
36
|
- !ruby/object:Gem::Dependency
|
37
37
|
name: devver-construct
|
38
|
-
requirement: &
|
38
|
+
requirement: &21960708 !ruby/object:Gem::Requirement
|
39
39
|
none: false
|
40
40
|
requirements:
|
41
41
|
- - ! '>='
|
@@ -43,10 +43,10 @@ dependencies:
|
|
43
43
|
version: '0'
|
44
44
|
type: :development
|
45
45
|
prerelease: false
|
46
|
-
version_requirements: *
|
46
|
+
version_requirements: *21960708
|
47
47
|
- !ruby/object:Gem::Dependency
|
48
48
|
name: albacore
|
49
|
-
requirement: &
|
49
|
+
requirement: &21960312 !ruby/object:Gem::Requirement
|
50
50
|
none: false
|
51
51
|
requirements:
|
52
52
|
- - ~>
|
@@ -54,10 +54,10 @@ dependencies:
|
|
54
54
|
version: 0.2.5
|
55
55
|
type: :runtime
|
56
56
|
prerelease: false
|
57
|
-
version_requirements: *
|
57
|
+
version_requirements: *21960312
|
58
58
|
- !ruby/object:Gem::Dependency
|
59
59
|
name: semver2
|
60
|
-
requirement: &
|
60
|
+
requirement: &21959928 !ruby/object:Gem::Requirement
|
61
61
|
none: false
|
62
62
|
requirements:
|
63
63
|
- - ~>
|
@@ -65,10 +65,10 @@ dependencies:
|
|
65
65
|
version: 2.0.0
|
66
66
|
type: :runtime
|
67
67
|
prerelease: false
|
68
|
-
version_requirements: *
|
68
|
+
version_requirements: *21959928
|
69
69
|
- !ruby/object:Gem::Dependency
|
70
70
|
name: bundler
|
71
|
-
requirement: &
|
71
|
+
requirement: &21959580 !ruby/object:Gem::Requirement
|
72
72
|
none: false
|
73
73
|
requirements:
|
74
74
|
- - ~>
|
@@ -76,10 +76,10 @@ dependencies:
|
|
76
76
|
version: 1.0.14
|
77
77
|
type: :runtime
|
78
78
|
prerelease: false
|
79
|
-
version_requirements: *
|
79
|
+
version_requirements: *21959580
|
80
80
|
- !ruby/object:Gem::Dependency
|
81
81
|
name: thor
|
82
|
-
requirement: &
|
82
|
+
requirement: &21959208 !ruby/object:Gem::Requirement
|
83
83
|
none: false
|
84
84
|
requirements:
|
85
85
|
- - ~>
|
@@ -87,10 +87,10 @@ dependencies:
|
|
87
87
|
version: 0.14.6
|
88
88
|
type: :runtime
|
89
89
|
prerelease: false
|
90
|
-
version_requirements: *
|
90
|
+
version_requirements: *21959208
|
91
91
|
- !ruby/object:Gem::Dependency
|
92
92
|
name: uuid
|
93
|
-
requirement: &
|
93
|
+
requirement: &21958788 !ruby/object:Gem::Requirement
|
94
94
|
none: false
|
95
95
|
requirements:
|
96
96
|
- - ~>
|
@@ -98,10 +98,10 @@ dependencies:
|
|
98
98
|
version: 2.3.2
|
99
99
|
type: :runtime
|
100
100
|
prerelease: false
|
101
|
-
version_requirements: *
|
101
|
+
version_requirements: *21958788
|
102
102
|
- !ruby/object:Gem::Dependency
|
103
103
|
name: nokogiri
|
104
|
-
requirement: &
|
104
|
+
requirement: &21885516 !ruby/object:Gem::Requirement
|
105
105
|
none: false
|
106
106
|
requirements:
|
107
107
|
- - ~>
|
@@ -109,7 +109,18 @@ dependencies:
|
|
109
109
|
version: 1.4.4
|
110
110
|
type: :runtime
|
111
111
|
prerelease: false
|
112
|
-
version_requirements: *
|
112
|
+
version_requirements: *21885516
|
113
|
+
- !ruby/object:Gem::Dependency
|
114
|
+
name: rubyzip
|
115
|
+
requirement: &21885216 !ruby/object:Gem::Requirement
|
116
|
+
none: false
|
117
|
+
requirements:
|
118
|
+
- - ~>
|
119
|
+
- !ruby/object:Gem::Version
|
120
|
+
version: 0.9.4
|
121
|
+
type: :runtime
|
122
|
+
prerelease: false
|
123
|
+
version_requirements: *21885216
|
113
124
|
description: ! "The gem works by having as its dependencies \n everything you need
|
114
125
|
to get started with OSS and proprietary .Net coding.\n The aim of the gem is to
|
115
126
|
allow developers to get up and running quickly\n and provide a nice way of converting
|