logirel 0.0.15 → 0.0.17
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.
- data/.idea/.name +1 -0
- data/.idea/.rakeTasks +7 -0
- data/.idea/dictionaries/xyz.xml +3 -0
- data/.idea/encodings.xml +5 -0
- data/.idea/inspectionProfiles/Project_Default.xml +11 -0
- data/.idea/inspectionProfiles/profiles_settings.xml +7 -0
- data/.idea/logirel.iml +65 -0
- data/.idea/misc.xml +8 -0
- data/.idea/modules.xml +9 -0
- data/.idea/vcs.xml +7 -0
- data/.idea/workspace.xml +666 -0
- data/.semver +1 -1
- data/README.md +36 -36
- data/Rakefile.rb +0 -1
- data/lib/logirel/Initer.rb +103 -150
- data/lib/logirel/cli.rb +64 -63
- data/lib/logirel/cli_helper.rb +86 -0
- data/lib/logirel/queries/bool_q.rb +34 -0
- data/lib/logirel/queries/query.rb +7 -0
- data/lib/logirel/queries/str_q.rb +36 -0
- data/lib/logirel/queries.rb +2 -0
- data/lib/logirel/tasks/albacore_tasks.rb +15 -0
- data/lib/logirel/tasks/aspnet.rb +23 -0
- data/lib/logirel/tasks/assembly_info.rb +15 -0
- data/lib/logirel/tasks/core.rb +36 -0
- data/lib/logirel/tasks/ncover.rb +23 -0
- data/lib/logirel/tasks/nuget.rb +17 -0
- data/lib/logirel/tasks/nunit.rb +14 -0
- data/lib/logirel/tasks/nuspec.rb +4 -0
- data/lib/logirel/tasks/output.rb +4 -0
- data/lib/logirel/tasks/xunit.rb +15 -0
- data/lib/logirel/tasks/zip.rb +4 -0
- data/lib/logirel/templates/Gemfile.tt +6 -0
- data/lib/logirel/templates/Rakefile.tt +9 -0
- data/lib/logirel/templates/environment.tt +114 -0
- data/lib/logirel/templates/gitignore.tt +6 -0
- data/lib/logirel/templates/paths.tt +40 -0
- data/lib/logirel/templates/project_details.tt +5 -0
- data/{content/utils.rb → lib/logirel/templates/utils.tt} +1 -1
- data/lib/logirel/utils.rb +8 -0
- data/lib/logirel/version.rb +2 -10
- data/lib/logirel/vs/environment.rb +22 -0
- data/lib/logirel/vs/project_types.rb +27 -0
- data/lib/logirel/vs/solution.rb +113 -0
- data/lib/logirel.rb +2 -9
- data/logirel.gemspec +8 -5
- data/spec/queries/bool_query_spec.rb +32 -27
- data/spec/queries/string_query_spec.rb +57 -53
- data/spec/support/with_sample_projects.rb +3 -3
- data/spec/version_spec.rb +2 -3
- 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
- metadata +75 -38
- data/content/environment.rb +0 -82
- data/lib/logirel/NuGet.rb +0 -8
- data/lib/logirel/details_emitter.rb +0 -0
- data/lib/logirel/q_model.rb +0 -65
- data/lib/logirel/querier.rb +0 -8
- data/spec/dependencies/nuget_spec.rb +0 -10
- data/spec/filesystem/filestructure_spec.rb +0 -56
- data/spec/filesystem/path_init_spec.rb +0 -35
- data/spec/filesystem/rakefile_init_spec.rb +0 -32
- data/spec/initer_spec.rb +0 -29
- data/spec/queries/querier_spec.rb +0 -45
- data/vendor/cache/albacore-0.2.5.gem +0 -0
- data/vendor/cache/rubyzip-0.9.4.gem +0 -0
- data/vendor/cache/semver-1.0.5.gem +0 -0
@@ -1,30 +1,35 @@
|
|
1
|
-
require 'logirel/
|
2
|
-
describe Logirel::BoolQ, "when given input" do
|
3
|
-
before(:each) { @out = StringIO.new }
|
1
|
+
require 'logirel/queries'
|
4
2
|
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
3
|
+
module Logirel
|
4
|
+
module Queries
|
5
|
+
describe BoolQ, "when given input" do
|
6
|
+
before(:each) { @out = StringIO.new }
|
7
|
+
|
8
|
+
it "input says no, second time" do
|
9
|
+
io = StringIO.new "x\nn"
|
10
|
+
b = BoolQ.new "Yes or no?", true, io, @out
|
11
|
+
b.exec.should be_false
|
12
|
+
end
|
13
|
+
it "input says yet, second time" do
|
14
|
+
io = StringIO.new "x\ny"
|
15
|
+
b = BoolQ.new "Yes or no?", false, io, @out
|
16
|
+
b.exec.should be_true
|
17
|
+
end
|
18
|
+
it "input says yes" do
|
19
|
+
io = StringIO.new "y"
|
20
|
+
b = BoolQ.new "Yes or no?", false, io, @out
|
21
|
+
b.exec.should be_true
|
22
|
+
end
|
23
|
+
it "input says no" do
|
24
|
+
io = StringIO.new "n"
|
25
|
+
b = BoolQ.new("Yes or no?", true, io, @out)
|
26
|
+
b.exec.should be_false
|
27
|
+
end
|
28
|
+
it "input is default" do
|
29
|
+
io = StringIO.new "\n"
|
30
|
+
b = BoolQ.new("Yes or no?", true, io, @out)
|
31
|
+
b.exec.should be_true
|
32
|
+
end
|
33
|
+
end
|
29
34
|
end
|
30
35
|
end
|
@@ -1,58 +1,62 @@
|
|
1
|
-
require 'logirel/
|
1
|
+
require 'logirel/queries'
|
2
2
|
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
3
|
+
module Logirel
|
4
|
+
module Queries
|
5
|
+
describe StrQ, "in its default mode of operation, when reading props" do
|
6
|
+
before(:each) { @q = StrQ.new "Q??", "def" }
|
7
|
+
subject { @q }
|
8
|
+
it { should respond_to :question }
|
9
|
+
it { should respond_to :default }
|
10
|
+
specify { @q.answer.should eql("def") }
|
11
|
+
specify { @q.question.should eql("Q??") }
|
12
|
+
end
|
11
13
|
|
12
|
-
describe
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
end
|
14
|
+
describe StrQ, "when feeding it OK input" do
|
15
|
+
before(:each) do
|
16
|
+
@io = StringIO.new "My Answer"
|
17
|
+
@out = StringIO.new
|
18
|
+
@validator = double('validator')
|
19
|
+
@validator.should_receive(:call).once.
|
20
|
+
with(an_instance_of(String)).
|
21
|
+
and_return(true)
|
22
|
+
end
|
23
|
+
subject { StrQ.new("q?", "def", @io, @validator, @out) }
|
24
|
+
specify {
|
25
|
+
subject.exec.should eql("My Answer") and
|
26
|
+
subject.answer.should eql("My Answer")
|
27
|
+
}
|
28
|
+
end
|
27
29
|
|
28
|
-
describe
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
end
|
30
|
+
describe StrQ, "when feeding it bad input" do
|
31
|
+
before(:each) do
|
32
|
+
@io = StringIO.new "My Bad Answer\nAnother Bad Answer\nOKAnswer!"
|
33
|
+
@out = StringIO.new
|
34
|
+
|
35
|
+
@validator = double('validator')
|
36
|
+
@validator.should_receive(:call).exactly(3).times.
|
37
|
+
with(an_instance_of(String)).
|
38
|
+
and_return(false, false, true)
|
39
|
+
end
|
40
|
+
subject { StrQ.new("q?", "def", @io, @validator, @out) }
|
41
|
+
specify { subject.exec.should == "OKAnswer!" }
|
42
|
+
end
|
41
43
|
|
42
|
-
describe
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
44
|
+
describe StrQ, "when accepting the defaults" do
|
45
|
+
before(:each) do
|
46
|
+
@io = StringIO.new "\n"
|
47
|
+
@out = StringIO.new
|
48
|
+
|
49
|
+
@validator = double('validator')
|
50
|
+
@validator.should_receive(:call).once.
|
51
|
+
with(an_instance_of(String)).
|
52
|
+
# the validator should be called for empty input once if we have a default, directly when defaulting with validator{true}
|
53
|
+
and_return(true)
|
54
|
+
end
|
55
|
+
subject { StrQ.new("q?", "def", @io, @validator, @out) }
|
56
|
+
specify {
|
57
|
+
subject.exec.should eql("def") and
|
58
|
+
subject.answer.should eql("def")
|
59
|
+
}
|
60
|
+
end
|
52
61
|
end
|
53
|
-
|
54
|
-
specify {
|
55
|
-
subject.exec.should eql("def") and
|
56
|
-
subject.answer.should eql("def")
|
57
|
-
}
|
58
|
-
end
|
62
|
+
end
|
@@ -1,7 +1,7 @@
|
|
1
1
|
require 'construct'
|
2
2
|
|
3
3
|
def with_sample_projects(&block)
|
4
|
-
Construct::within_construct do |c|
|
4
|
+
Construct::within_construct do |c|
|
5
5
|
# given files
|
6
6
|
c.directory('src/A')
|
7
7
|
c.directory('src/B')
|
@@ -9,9 +9,9 @@ def with_sample_projects(&block)
|
|
9
9
|
c.file('src/A/A.csproj') do |f|
|
10
10
|
f.puts "cs proj file ... xml in here"
|
11
11
|
end
|
12
|
-
|
12
|
+
|
13
13
|
c.file('src/C/HelloWorld.vbproj')
|
14
|
-
|
14
|
+
block.call(c)
|
15
15
|
end
|
16
16
|
end
|
17
17
|
|
data/spec/version_spec.rb
CHANGED
@@ -1,10 +1,9 @@
|
|
1
|
-
|
2
1
|
describe Logirel::Version, "in general" do
|
3
2
|
before(:each) do
|
4
3
|
@v = Logirel::Version.new
|
5
4
|
end
|
6
|
-
|
5
|
+
|
7
6
|
it "should be able to parse numerics" do
|
8
|
-
@v.parse_numeric("1.3.677.32578").should eql([1,3,677,32578])
|
7
|
+
@v.parse_numeric("1.3.677.32578").should eql([1, 3, 677, 32578])
|
9
8
|
end
|
10
9
|
end
|
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.0.
|
4
|
+
version: 0.0.17
|
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-07-05 00:00:00.000000000Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: rspec
|
16
|
-
requirement: &
|
16
|
+
requirement: &22164036 !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: *22164036
|
25
25
|
- !ruby/object:Gem::Dependency
|
26
26
|
name: memoize
|
27
|
-
requirement: &
|
27
|
+
requirement: &22305000 !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: *22305000
|
36
36
|
- !ruby/object:Gem::Dependency
|
37
37
|
name: devver-construct
|
38
|
-
requirement: &
|
38
|
+
requirement: &22772376 !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: *22772376
|
47
47
|
- !ruby/object:Gem::Dependency
|
48
48
|
name: albacore
|
49
|
-
requirement: &
|
49
|
+
requirement: &22985040 !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.6
|
55
55
|
type: :runtime
|
56
56
|
prerelease: false
|
57
|
-
version_requirements: *
|
57
|
+
version_requirements: *22985040
|
58
58
|
- !ruby/object:Gem::Dependency
|
59
59
|
name: semver
|
60
|
-
requirement: &
|
60
|
+
requirement: &26688216 !ruby/object:Gem::Requirement
|
61
61
|
none: false
|
62
62
|
requirements:
|
63
63
|
- - ~>
|
@@ -65,10 +65,10 @@ dependencies:
|
|
65
65
|
version: 1.0.6
|
66
66
|
type: :runtime
|
67
67
|
prerelease: false
|
68
|
-
version_requirements: *
|
68
|
+
version_requirements: *26688216
|
69
69
|
- !ruby/object:Gem::Dependency
|
70
70
|
name: bundler
|
71
|
-
requirement: &
|
71
|
+
requirement: &27547572 !ruby/object:Gem::Requirement
|
72
72
|
none: false
|
73
73
|
requirements:
|
74
74
|
- - ~>
|
@@ -76,29 +76,40 @@ dependencies:
|
|
76
76
|
version: 1.0.14
|
77
77
|
type: :runtime
|
78
78
|
prerelease: false
|
79
|
-
version_requirements: *
|
79
|
+
version_requirements: *27547572
|
80
80
|
- !ruby/object:Gem::Dependency
|
81
81
|
name: thor
|
82
|
-
requirement: &
|
82
|
+
requirement: &27547032 !ruby/object:Gem::Requirement
|
83
83
|
none: false
|
84
84
|
requirements:
|
85
|
-
- -
|
85
|
+
- - ~>
|
86
86
|
- !ruby/object:Gem::Version
|
87
|
-
version:
|
87
|
+
version: 0.14.6
|
88
88
|
type: :runtime
|
89
89
|
prerelease: false
|
90
|
-
version_requirements: *
|
90
|
+
version_requirements: *27547032
|
91
91
|
- !ruby/object:Gem::Dependency
|
92
92
|
name: uuid
|
93
|
-
requirement: &
|
93
|
+
requirement: &27546228 !ruby/object:Gem::Requirement
|
94
94
|
none: false
|
95
95
|
requirements:
|
96
|
-
- -
|
96
|
+
- - ~>
|
97
97
|
- !ruby/object:Gem::Version
|
98
|
-
version:
|
98
|
+
version: 2.3.2
|
99
|
+
type: :runtime
|
100
|
+
prerelease: false
|
101
|
+
version_requirements: *27546228
|
102
|
+
- !ruby/object:Gem::Dependency
|
103
|
+
name: nokogiri
|
104
|
+
requirement: &27545280 !ruby/object:Gem::Requirement
|
105
|
+
none: false
|
106
|
+
requirements:
|
107
|
+
- - ~>
|
108
|
+
- !ruby/object:Gem::Version
|
109
|
+
version: 1.4.4
|
99
110
|
type: :runtime
|
100
111
|
prerelease: false
|
101
|
-
version_requirements: *
|
112
|
+
version_requirements: *27545280
|
102
113
|
description: ! "The gem works by having as its dependencies \n everything you need
|
103
114
|
to get started with OSS and proprietary .Net coding.\n The aim of the gem is to
|
104
115
|
allow developers to get up and running quickly\n and provide a nice way of converting
|
@@ -111,44 +122,70 @@ extensions: []
|
|
111
122
|
extra_rdoc_files: []
|
112
123
|
files:
|
113
124
|
- .gitignore
|
125
|
+
- .idea/.name
|
126
|
+
- .idea/.rakeTasks
|
127
|
+
- .idea/dictionaries/xyz.xml
|
128
|
+
- .idea/encodings.xml
|
129
|
+
- .idea/inspectionProfiles/Project_Default.xml
|
130
|
+
- .idea/inspectionProfiles/profiles_settings.xml
|
131
|
+
- .idea/logirel.iml
|
132
|
+
- .idea/misc.xml
|
133
|
+
- .idea/modules.xml
|
134
|
+
- .idea/vcs.xml
|
135
|
+
- .idea/workspace.xml
|
114
136
|
- .semver
|
115
137
|
- Gemfile
|
116
138
|
- README.md
|
117
139
|
- Rakefile.rb
|
118
140
|
- bin/logirel
|
119
|
-
- content/environment.rb
|
120
|
-
- content/utils.rb
|
121
141
|
- lib/logirel.rb
|
122
142
|
- lib/logirel/Initer.rb
|
123
|
-
- lib/logirel/NuGet.rb
|
124
143
|
- lib/logirel/cli.rb
|
125
|
-
- lib/logirel/
|
126
|
-
- lib/logirel/
|
127
|
-
- lib/logirel/
|
144
|
+
- lib/logirel/cli_helper.rb
|
145
|
+
- lib/logirel/queries.rb
|
146
|
+
- lib/logirel/queries/bool_q.rb
|
147
|
+
- lib/logirel/queries/query.rb
|
148
|
+
- lib/logirel/queries/str_q.rb
|
149
|
+
- lib/logirel/tasks/albacore_tasks.rb
|
150
|
+
- lib/logirel/tasks/aspnet.rb
|
151
|
+
- lib/logirel/tasks/assembly_info.rb
|
152
|
+
- lib/logirel/tasks/core.rb
|
153
|
+
- lib/logirel/tasks/ncover.rb
|
154
|
+
- lib/logirel/tasks/nuget.rb
|
155
|
+
- lib/logirel/tasks/nunit.rb
|
156
|
+
- lib/logirel/tasks/nuspec.rb
|
157
|
+
- lib/logirel/tasks/output.rb
|
158
|
+
- lib/logirel/tasks/xunit.rb
|
159
|
+
- lib/logirel/tasks/zip.rb
|
160
|
+
- lib/logirel/templates/Gemfile.tt
|
161
|
+
- lib/logirel/templates/Rakefile.tt
|
162
|
+
- lib/logirel/templates/environment.tt
|
163
|
+
- lib/logirel/templates/gitignore.tt
|
164
|
+
- lib/logirel/templates/paths.tt
|
165
|
+
- lib/logirel/templates/project_details.tt
|
166
|
+
- lib/logirel/templates/utils.tt
|
167
|
+
- lib/logirel/utils.rb
|
128
168
|
- lib/logirel/version.rb
|
169
|
+
- lib/logirel/vs/environment.rb
|
170
|
+
- lib/logirel/vs/project_types.rb
|
171
|
+
- lib/logirel/vs/solution.rb
|
129
172
|
- logirel.gemspec
|
130
|
-
- spec/dependencies/nuget_spec.rb
|
131
|
-
- spec/filesystem/filestructure_spec.rb
|
132
|
-
- spec/filesystem/path_init_spec.rb
|
133
|
-
- spec/filesystem/rakefile_init_spec.rb
|
134
173
|
- spec/helpers.rb
|
135
|
-
- spec/initer_spec.rb
|
136
174
|
- spec/queries/bool_query_spec.rb
|
137
|
-
- spec/queries/querier_spec.rb
|
138
175
|
- spec/queries/string_query_spec.rb
|
139
176
|
- spec/support/with_sample_projects.rb
|
140
177
|
- spec/version_spec.rb
|
141
|
-
- vendor/cache/albacore-0.2.
|
178
|
+
- vendor/cache/albacore-0.2.6.gem
|
142
179
|
- vendor/cache/devver-construct-1.1.0.gem
|
143
180
|
- vendor/cache/diff-lcs-1.1.2.gem
|
144
181
|
- vendor/cache/macaddr-1.0.0.gem
|
145
182
|
- vendor/cache/memoize-1.3.1.gem
|
183
|
+
- vendor/cache/nokogiri-1.4.6-x86-mingw32.gem
|
146
184
|
- vendor/cache/rspec-2.6.0.gem
|
147
185
|
- vendor/cache/rspec-core-2.6.4.gem
|
148
186
|
- vendor/cache/rspec-expectations-2.6.0.gem
|
149
187
|
- vendor/cache/rspec-mocks-2.6.0.gem
|
150
|
-
- vendor/cache/
|
151
|
-
- vendor/cache/semver-1.0.5.gem
|
188
|
+
- vendor/cache/semver-1.0.6.gem
|
152
189
|
- vendor/cache/thor-0.14.6.gem
|
153
190
|
- vendor/cache/uuid-2.3.2.gem
|
154
191
|
homepage: https://github.com/haf/logirel
|
data/content/environment.rb
DELETED
@@ -1,82 +0,0 @@
|
|
1
|
-
require 'semver'
|
2
|
-
|
3
|
-
namespace :env do
|
4
|
-
|
5
|
-
task :common do
|
6
|
-
|
7
|
-
# version management
|
8
|
-
fv = version(VERSION_BASE)
|
9
|
-
build = ENV['BUILD_NUMBER'] || fv[2]
|
10
|
-
revision = ENV['OFFICIAL_RELEASE'] || (fv[3] == 0 ? Time.now.strftime('%j%H') : fv[3]) # (day of year 0-265)(hour 00-24)
|
11
|
-
|
12
|
-
real_version = [fv[0], fv[1], build, revision]
|
13
|
-
|
14
|
-
ENV['VERSION'] = VERSION = real_version.join(".")
|
15
|
-
ENV['VERSION_INFORMAL'] = VERSION_INFORMAL = real_version.join(".")
|
16
|
-
puts "Assembly Version: #{VERSION}."
|
17
|
-
puts "##teamcity[buildNumber '#{VERSION}']" # print the version (revision) and build number to ci
|
18
|
-
|
19
|
-
# configuration management
|
20
|
-
ENV['FRAMEWORK'] = FRAMEWORK = ENV['FRAMEWORK'] || (Rake::Win32::windows? ? "net40" : "mono28")
|
21
|
-
puts "Framework: #{FRAMEWORK}"
|
22
|
-
end
|
23
|
-
|
24
|
-
# configure the output directories
|
25
|
-
task :configure, [:str] do |t, args|
|
26
|
-
ENV['CONFIGURATION'] = CONFIGURATION = args[:str]
|
27
|
-
Folders[:binaries] = File.join(Folders[:out], FRAMEWORK, args[:str].downcase)
|
28
|
-
CLEAN.include(File.join(Folders[:binaries], "*"))
|
29
|
-
end
|
30
|
-
|
31
|
-
task :set_dirs do
|
32
|
-
Folders[:proj_out] = File.join(Folders[:src], Projects[:proj][:dir], 'bin', CONFIGURATION)
|
33
|
-
CLEAN.include(Folders[:proj_out])
|
34
|
-
|
35
|
-
# for tests
|
36
|
-
Folders[:proj] = File.join(Folders[:src], Projects[:proj][:test_dir], 'bin', CONFIGURATION)
|
37
|
-
Files[:proj][:test] = File.join(Folders[:proj_test_out], "#{Projects[:proj][:test_dir]}.dll")
|
38
|
-
CLEAN.include(Folders[:proj_test_out])
|
39
|
-
end
|
40
|
-
|
41
|
-
desc "set debug environment variables"
|
42
|
-
task :debug => [:common] do
|
43
|
-
Rake::Task["env:configure"].invoke('Debug')
|
44
|
-
Rake::Task["env:set_dirs"].invoke
|
45
|
-
end
|
46
|
-
|
47
|
-
desc "set release environment variables"
|
48
|
-
task :release => [:common] do
|
49
|
-
Rake::Task["env:configure"].invoke('Release')
|
50
|
-
Rake::Task["env:set_dirs"].invoke
|
51
|
-
end
|
52
|
-
|
53
|
-
desc "set GA envionment variables"
|
54
|
-
task :ga do
|
55
|
-
puts "##teamcity[progressMessage 'Setting environment variables for GA']"
|
56
|
-
ENV['OFFICIAL_RELEASE'] = OFFICIAL_RELEASE = "4000"
|
57
|
-
end
|
58
|
-
|
59
|
-
desc "set release candidate environment variables"
|
60
|
-
task :rc, [:number] do |t, args|
|
61
|
-
puts "##teamcity[progressMessage 'Setting environment variables for Release Candidate']"
|
62
|
-
arg_num = args[:number].to_i
|
63
|
-
num = arg_num != 0 ? arg_num : 1
|
64
|
-
ENV['OFFICIAL_RELEASE'] = OFFICIAL_RELEASE = "#{3000 + num}"
|
65
|
-
end
|
66
|
-
|
67
|
-
desc "set beta-environment variables"
|
68
|
-
task :beta, [:number] do |t, args|
|
69
|
-
puts "##teamcity[progressMessage 'Setting environment variables for Beta']"
|
70
|
-
arg_num = args[:number].to_i
|
71
|
-
num = arg_num != 0 ? arg_num : 1
|
72
|
-
ENV['OFFICIAL_RELEASE'] = OFFICIAL_RELEASE = "#{2000 + num}"
|
73
|
-
end
|
74
|
-
|
75
|
-
desc "set alpha environment variables"
|
76
|
-
task :alpha, [:number] do |t, args|
|
77
|
-
puts "##teamcity[progressMessage 'Setting environment variables for Alpha']"
|
78
|
-
arg_num = args[:number].to_i
|
79
|
-
num = arg_num != 0 ? arg_num : 1
|
80
|
-
ENV['OFFICIAL_RELEASE'] = OFFICIAL_RELEASE = "#{1000 + num}"
|
81
|
-
end
|
82
|
-
end
|
data/lib/logirel/NuGet.rb
DELETED
File without changes
|
data/lib/logirel/q_model.rb
DELETED
@@ -1,65 +0,0 @@
|
|
1
|
-
module Logirel
|
2
|
-
class Q
|
3
|
-
attr_accessor :question, :default
|
4
|
-
end
|
5
|
-
|
6
|
-
class BoolQ < Q
|
7
|
-
attr_accessor :pos_answer, :neg_answer
|
8
|
-
|
9
|
-
def initialize(question,
|
10
|
-
default = true,
|
11
|
-
io_source = STDIN,
|
12
|
-
io_target = STDOUT)
|
13
|
-
@question = question
|
14
|
-
@default = default
|
15
|
-
@io_source = io_source
|
16
|
-
@io_target = io_target
|
17
|
-
end
|
18
|
-
|
19
|
-
def default_str
|
20
|
-
|
21
|
-
@default ? "[Yn]" : "[yN]"
|
22
|
-
|
23
|
-
end
|
24
|
-
|
25
|
-
def exec
|
26
|
-
@io_target.print @question + " " + default_str
|
27
|
-
a = ""
|
28
|
-
begin
|
29
|
-
a = @io_source.gets.chomp
|
30
|
-
end while !a.empty? && !['y', 'n'].include?(a.downcase)
|
31
|
-
a.empty? ? @default : (a == 'y')
|
32
|
-
end
|
33
|
-
end
|
34
|
-
|
35
|
-
class StrQ < Q
|
36
|
-
def initialize(question,
|
37
|
-
default = nil,
|
38
|
-
io_source = STDIN,
|
39
|
-
validator = nil,
|
40
|
-
io_target = STDOUT)
|
41
|
-
@question = question
|
42
|
-
@default = default
|
43
|
-
@io_source = io_source
|
44
|
-
@validator = validator || lambda { |s| true }
|
45
|
-
@io_target = io_target
|
46
|
-
@answer = ""
|
47
|
-
end
|
48
|
-
|
49
|
-
def answer
|
50
|
-
@answer.empty? ? @default : @answer
|
51
|
-
end
|
52
|
-
|
53
|
-
def exec
|
54
|
-
@io_target.print @question + " [#{@default}]: "
|
55
|
-
valid = false
|
56
|
-
begin
|
57
|
-
@answer = @io_source.gets.chomp
|
58
|
-
valid = @validator.call(@answer)
|
59
|
-
end while !valid || (!valid && @answer.empty?)
|
60
|
-
@answer = @answer.empty? ? @default : @answer
|
61
|
-
@io_target.puts "Chose '#{@answer}'."
|
62
|
-
@answer
|
63
|
-
end
|
64
|
-
end
|
65
|
-
end
|
data/lib/logirel/querier.rb
DELETED