logirel 0.1.0 → 0.1.1
Sign up to get free protection for your applications and to get access to all the features.
- data/.semver +1 -1
- data/lib/logirel/cli.rb +7 -4
- data/lib/logirel/cli_helper.rb +17 -11
- data/lib/logirel/tasks/albacore_tasks.rb +1 -0
- data/lib/logirel/tasks/core.rb +1 -1
- data/lib/logirel/tasks/msbuild.rb +15 -0
- data/lib/logirel/templates/Gemfile.tt +1 -1
- data/lib/logirel/templates/Rakefile.tt +9 -1
- data/lib/logirel/templates/paths.tt +9 -4
- data/logirel.gemspec +1 -1
- data/vendor/cache/albacore-0.2.5.gem +0 -0
- data/vendor/cache/nokogiri-1.4.7-x86-mingw32.gem +0 -0
- data/vendor/cache/rubyzip-0.9.4.gem +0 -0
- data/vendor/cache/semver2-2.0.0.gem +0 -0
- metadata +26 -24
- data/vendor/cache/albacore-0.2.6.gem +0 -0
- data/vendor/cache/nokogiri-1.4.6-x86-mingw32.gem +0 -0
- data/vendor/cache/semver-1.0.6.gem +0 -0
data/.semver
CHANGED
data/lib/logirel/cli.rb
CHANGED
@@ -30,9 +30,11 @@ module Logirel
|
|
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
32
|
opts = options.dup
|
33
|
-
helper = CliHelper.new
|
33
|
+
helper = CliHelper.new root
|
34
|
+
@root = root
|
34
35
|
|
35
36
|
puts "logirel v#{Logirel::VERSION}"
|
37
|
+
puts ""
|
36
38
|
@folders = helper.folders_selection
|
37
39
|
@files = helper.files_selection folders
|
38
40
|
|
@@ -40,7 +42,7 @@ module Logirel
|
|
40
42
|
selected_projs = helper.parse_folders(folders[:src]).find_all { |f| BoolQ.new(f).exec }
|
41
43
|
|
42
44
|
puts ""
|
43
|
-
@metas = selected_projs.empty? ? [] : helper.metadata_interactive(selected_projs)
|
45
|
+
@metas = selected_projs.empty? ? [] : helper.metadata_interactive(selected_projs, @folders)
|
44
46
|
|
45
47
|
puts "initing main environment"
|
46
48
|
run 'semver init'
|
@@ -51,11 +53,12 @@ module Logirel
|
|
51
53
|
template 'paths.tt', File.join(root, folders[:buildscripts], 'paths.rb')
|
52
54
|
template 'environment.tt', File.join(root, folders[:buildscripts], 'environment.rb')
|
53
55
|
template 'utils.tt', File.join(root, folders[:buildscripts], 'utils.rb')
|
54
|
-
template raketempl, File.join(root,
|
56
|
+
template raketempl, File.join(root, BUILD_FILE)
|
55
57
|
run 'git init'
|
56
58
|
run 'git add .'
|
57
|
-
# TODO: add a few nuget, nuspec, owrap, fpm, puppet etc tasks here!
|
58
59
|
|
60
|
+
# TODO: add a few nuget, nuspec, owrap, fpm, puppet etc tasks here!
|
61
|
+
msbuild_task @files[:sln] if BoolQ.new("add msbuild task for sln file?", true).exec
|
59
62
|
|
60
63
|
helper.say_goodbye
|
61
64
|
end
|
data/lib/logirel/cli_helper.rb
CHANGED
@@ -28,28 +28,33 @@ module Logirel
|
|
28
28
|
empty? ? 'which is empty.' : 'which contains folders.'}"
|
29
29
|
puts ""
|
30
30
|
|
31
|
+
build_dir = StrQ.new("Build Output Directory", "build").exec
|
31
32
|
{
|
32
33
|
:src => StrQ.new("Source Directory. Default (src) contains (#{parse_folders('src').inspect})", 'src').exec,
|
33
34
|
:buildscripts => StrQ.new("Buildscripts Directory", "buildscripts").exec,
|
34
|
-
:build =>
|
35
|
-
:tools => StrQ.new("Tools Directory", "tools").exec
|
35
|
+
:build => build_dir,
|
36
|
+
:tools => StrQ.new("Tools Directory", "tools").exec,
|
37
|
+
:tests => StrQ.new("Test Output Directory", "#{build_dir}/tests").exec,
|
38
|
+
:nuget => StrQ.new("NuGet Directory", "#{build_dir}/nuget").exec,
|
39
|
+
:nuspec => StrQ.new("NuSpec Directory", "#{build_dir}/nuspec").exec
|
36
40
|
}
|
37
41
|
end
|
38
42
|
|
39
43
|
# folders: hash (as defined above), of folder paths
|
40
44
|
def files_selection folders
|
41
45
|
puts "Looking at src folder: '#{folders[:src]}'."
|
46
|
+
first_sln = Dir.glob(File.join(@root_dir, folders[:src],"*.sln")).first
|
42
47
|
{
|
43
|
-
:sln => StrQ.new("sln file",
|
48
|
+
:sln => StrQ.new("sln file", File.join(folders[:src], File.basename(first_sln))).exec
|
44
49
|
}
|
45
50
|
end
|
46
51
|
|
47
|
-
def metadata_interactive selected_projs
|
52
|
+
def metadata_interactive selected_projs, selected_folders
|
48
53
|
puts "Project Meta-Data Definitions"
|
49
54
|
puts "-----------------------------"
|
50
55
|
puts "Let's set up some meta-data!"
|
51
56
|
puts ""
|
52
|
-
selected_projs.map { |p| meta_for p }
|
57
|
+
selected_projs.map { |p| meta_for p, selected_folders[:src] }
|
53
58
|
end
|
54
59
|
|
55
60
|
def say_goodbye
|
@@ -63,16 +68,17 @@ module Logirel
|
|
63
68
|
end
|
64
69
|
|
65
70
|
private
|
66
|
-
def meta_for p
|
71
|
+
def meta_for p, src_dir
|
67
72
|
base = File.basename(p)
|
68
73
|
|
69
|
-
puts "META DATA FOR: '#{base}'"
|
70
|
-
|
74
|
+
puts "META DATA FOR DIRECTORY: '#{src_dir}/#{base}'"
|
75
|
+
title = StrQ.new("Title", base).exec
|
71
76
|
|
72
77
|
{
|
73
|
-
:title =>
|
74
|
-
:
|
75
|
-
:
|
78
|
+
:title => title,
|
79
|
+
:id => base,
|
80
|
+
:dir => File.join(src_dir, base),
|
81
|
+
:test_dir => StrQ.new("Test Directory", title + ".Tests").exec,
|
76
82
|
:description => StrQ.new("Description", "Missing description for #{base}").exec,
|
77
83
|
:copyright => StrQ.new("Copyright").exec,
|
78
84
|
:authors => StrQ.new("Authors").exec,
|
data/lib/logirel/tasks/core.rb
CHANGED
@@ -0,0 +1,15 @@
|
|
1
|
+
module Logirel::Tasks
|
2
|
+
def msbuild_task(sln_file_path = nil, opts={})
|
3
|
+
#sln_file_path = tuck_and_get :sln_file_path, sln_file_path
|
4
|
+
|
5
|
+
append_to_file File.join(@root, BUILD_FILE), <<-EOF, :verbose => false
|
6
|
+
|
7
|
+
desc "build sln file"
|
8
|
+
nugetpack #{ inject_task_name opts, 'msbuild' }#{ inject_dependency opts } do |msb|
|
9
|
+
msb.solution = "#{sln_file_path}"
|
10
|
+
msb.properties :Configuration => :Debug
|
11
|
+
msb.targets :Clean, :Build
|
12
|
+
end
|
13
|
+
EOF
|
14
|
+
end
|
15
|
+
end
|
@@ -1,9 +1,17 @@
|
|
1
1
|
require "rubygems"
|
2
2
|
require "bundler"
|
3
3
|
Bundler.setup
|
4
|
+
$: << './'
|
4
5
|
|
5
6
|
require 'albacore'
|
6
7
|
require 'rake/clean'
|
7
8
|
require 'semver'
|
8
9
|
|
9
|
-
|
10
|
+
require '<%= folders[:buildscripts] %>/utils'
|
11
|
+
require '<%= folders[:buildscripts] %>/paths'
|
12
|
+
require '<%= folders[:buildscripts] %>/project_details'
|
13
|
+
require '<%= folders[:buildscripts] %>/environment'
|
14
|
+
|
15
|
+
# to get the current version of the project, type 'SemVer.find.to_s' in this rake file.
|
16
|
+
|
17
|
+
# task :default => :msbuild
|
@@ -8,23 +8,28 @@ FOLDERS = {
|
|
8
8
|
:src => "<%= folders[:src] %>",
|
9
9
|
:build => "<%= folders[:build] %>",
|
10
10
|
:binaries => "placeholder - environment.rb sets this depending on target",
|
11
|
-
:tests => "<%= folders[:tests] %>",
|
12
11
|
:tools => "<%= folders[:tools] %>",
|
12
|
+
:tests => "<%= folders[:tests] %>",
|
13
13
|
:nuget => "<%= folders[:nuget] %>",
|
14
|
-
|
14
|
+
:nuspec => "<%= folders[:nuspec] %>"
|
15
|
+
}
|
16
|
+
|
17
|
+
FOLDERS.merge({
|
18
|
+
<% metas.each do |m| %>
|
15
19
|
:<%=m[:ruby_key]%> => {
|
16
20
|
:test_dir => '<%= m[:test_dir] %>',
|
21
|
+
:nuspec => '#{FOLDERS[:nuspec]}/#{PROJECTS[<%= m[:ruby_key] %>][:nuget_key]}',
|
17
22
|
:out => 'placeholder - environment.rb will sets this',
|
18
23
|
:test_out => 'placeholder - environment.rb sets this'
|
19
24
|
},
|
20
25
|
<% end %>
|
21
|
-
}
|
26
|
+
})
|
22
27
|
|
23
28
|
FILES = {
|
24
29
|
:sln => "<%= files[:sln] %>",
|
25
30
|
<% metas.each do |m| %>
|
26
31
|
:<%= m[:ruby_key] %> => {
|
27
|
-
:nuspec => File.join(FOLDERS[:<%= m[:ruby_key] %>], "#{PROJECTS[:<%= m[:ruby_key] %>][:
|
32
|
+
:nuspec => File.join(FOLDERS[:<%= m[:ruby_key] %>][:nuspec], "#{PROJECTS[:<%= m[:ruby_key] %>][:nuget_key]}.nuspec")
|
28
33
|
},
|
29
34
|
<% end %>
|
30
35
|
}
|
data/logirel.gemspec
CHANGED
@@ -28,7 +28,7 @@ Gem::Specification.new do |s|
|
|
28
28
|
s.add_development_dependency "rspec", "~> 2.6.0"
|
29
29
|
s.add_development_dependency "memoize"
|
30
30
|
s.add_development_dependency "devver-construct"
|
31
|
-
s.add_dependency "albacore", "
|
31
|
+
s.add_dependency "albacore", "= 0.2.5"
|
32
32
|
s.add_dependency "semver2", "~> 2.0.0"
|
33
33
|
s.add_dependency "bundler", "~> 1.0.14"
|
34
34
|
s.add_dependency "thor", "~> 0.14.6"
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
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.1
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -13,7 +13,7 @@ date: 2011-07-07 00:00:00.000000000Z
|
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: rspec
|
16
|
-
requirement: &
|
16
|
+
requirement: &21852816 !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: *21852816
|
25
25
|
- !ruby/object:Gem::Dependency
|
26
26
|
name: memoize
|
27
|
-
requirement: &
|
27
|
+
requirement: &21852552 !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: *21852552
|
36
36
|
- !ruby/object:Gem::Dependency
|
37
37
|
name: devver-construct
|
38
|
-
requirement: &
|
38
|
+
requirement: &21851580 !ruby/object:Gem::Requirement
|
39
39
|
none: false
|
40
40
|
requirements:
|
41
41
|
- - ! '>='
|
@@ -43,21 +43,21 @@ dependencies:
|
|
43
43
|
version: '0'
|
44
44
|
type: :development
|
45
45
|
prerelease: false
|
46
|
-
version_requirements: *
|
46
|
+
version_requirements: *21851580
|
47
47
|
- !ruby/object:Gem::Dependency
|
48
48
|
name: albacore
|
49
|
-
requirement: &
|
49
|
+
requirement: &21851136 !ruby/object:Gem::Requirement
|
50
50
|
none: false
|
51
51
|
requirements:
|
52
|
-
- -
|
52
|
+
- - =
|
53
53
|
- !ruby/object:Gem::Version
|
54
|
-
version: 0.2.
|
54
|
+
version: 0.2.5
|
55
55
|
type: :runtime
|
56
56
|
prerelease: false
|
57
|
-
version_requirements: *
|
57
|
+
version_requirements: *21851136
|
58
58
|
- !ruby/object:Gem::Dependency
|
59
59
|
name: semver2
|
60
|
-
requirement: &
|
60
|
+
requirement: &21850776 !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: *21850776
|
69
69
|
- !ruby/object:Gem::Dependency
|
70
70
|
name: bundler
|
71
|
-
requirement: &
|
71
|
+
requirement: &21850476 !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: *21850476
|
80
80
|
- !ruby/object:Gem::Dependency
|
81
81
|
name: thor
|
82
|
-
requirement: &
|
82
|
+
requirement: &21850200 !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: *21850200
|
91
91
|
- !ruby/object:Gem::Dependency
|
92
92
|
name: uuid
|
93
|
-
requirement: &
|
93
|
+
requirement: &21849888 !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: *21849888
|
102
102
|
- !ruby/object:Gem::Dependency
|
103
103
|
name: nokogiri
|
104
|
-
requirement: &
|
104
|
+
requirement: &21849588 !ruby/object:Gem::Requirement
|
105
105
|
none: false
|
106
106
|
requirements:
|
107
107
|
- - ~>
|
@@ -109,7 +109,7 @@ dependencies:
|
|
109
109
|
version: 1.4.4
|
110
110
|
type: :runtime
|
111
111
|
prerelease: false
|
112
|
-
version_requirements: *
|
112
|
+
version_requirements: *21849588
|
113
113
|
description: ! "The gem works by having as its dependencies \n everything you need
|
114
114
|
to get started with OSS and proprietary .Net coding.\n The aim of the gem is to
|
115
115
|
allow developers to get up and running quickly\n and provide a nice way of converting
|
@@ -139,6 +139,7 @@ files:
|
|
139
139
|
- lib/logirel/tasks/aspnet.rb
|
140
140
|
- lib/logirel/tasks/assembly_info.rb
|
141
141
|
- lib/logirel/tasks/core.rb
|
142
|
+
- lib/logirel/tasks/msbuild.rb
|
142
143
|
- lib/logirel/tasks/ncover.rb
|
143
144
|
- lib/logirel/tasks/nuget.rb
|
144
145
|
- lib/logirel/tasks/nunit.rb
|
@@ -164,17 +165,18 @@ files:
|
|
164
165
|
- spec/queries/string_query_spec.rb
|
165
166
|
- spec/support/with_sample_projects.rb
|
166
167
|
- spec/version_spec.rb
|
167
|
-
- vendor/cache/albacore-0.2.
|
168
|
+
- vendor/cache/albacore-0.2.5.gem
|
168
169
|
- vendor/cache/devver-construct-1.1.0.gem
|
169
170
|
- vendor/cache/diff-lcs-1.1.2.gem
|
170
171
|
- vendor/cache/macaddr-1.0.0.gem
|
171
172
|
- vendor/cache/memoize-1.3.1.gem
|
172
|
-
- vendor/cache/nokogiri-1.4.
|
173
|
+
- vendor/cache/nokogiri-1.4.7-x86-mingw32.gem
|
173
174
|
- vendor/cache/rspec-2.6.0.gem
|
174
175
|
- vendor/cache/rspec-core-2.6.4.gem
|
175
176
|
- vendor/cache/rspec-expectations-2.6.0.gem
|
176
177
|
- vendor/cache/rspec-mocks-2.6.0.gem
|
177
|
-
- vendor/cache/
|
178
|
+
- vendor/cache/rubyzip-0.9.4.gem
|
179
|
+
- vendor/cache/semver2-2.0.0.gem
|
178
180
|
- vendor/cache/thor-0.14.6.gem
|
179
181
|
- vendor/cache/uuid-2.3.2.gem
|
180
182
|
homepage: https://github.com/haf/logirel
|
Binary file
|
Binary file
|
Binary file
|