nake 0.0.9.5 → 0.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/Gemfile.lock +7 -0
- data/bin/nake +1 -62
- data/lib/nake/runner.rb +66 -0
- data/nake.gemspec +1 -1
- metadata +15 -18
- data/deps.rb +0 -5
- data/deps.rip +0 -5
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA1:
|
3
|
+
metadata.gz: ab3b00108e17b8b2af0232d2141190057070eb43
|
4
|
+
data.tar.gz: 074eb4ad9413fcf7f241fbfd5ff4ff8b88c3d905
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: 5c21fc403737649f7f7cdc272710643734e0cda4adde444be01d9b40edf986c7113a5b606783880f33a5e50bdb804ca2f56a24114b0c612331c43c1d2c179bc3
|
7
|
+
data.tar.gz: 5abd2ad95042e3cb57298601cb0e6102760f64283ffd79723706d1c665556ab42387ed4785f91f50e3b419ebff2a1d16151972e99c9bff6c0de77686f03780e6
|
data/Gemfile.lock
ADDED
data/bin/nake
CHANGED
@@ -2,65 +2,4 @@
|
|
2
2
|
|
3
3
|
$:.unshift File.join(File.dirname(__FILE__), "..", "lib")
|
4
4
|
|
5
|
-
require "nake"
|
6
|
-
require "nake/args"
|
7
|
-
require "nake/helpers"
|
8
|
-
|
9
|
-
# parse arguments
|
10
|
-
begin
|
11
|
-
Nake.parse
|
12
|
-
rescue Exception => exception
|
13
|
-
puts "~ Arguments parsed into #{Nake.parse.inspect.green}"
|
14
|
-
puts "Exception occured during parsing arguments"
|
15
|
-
print_exception_with_backtrace_and_abort(exception)
|
16
|
-
else
|
17
|
-
if Nake.parse[:nake] && Nake.parse[:nake].include?("--debug") # Nake.debug isn't initialized yet
|
18
|
-
puts "~ Arguments parsed into #{Nake.parse.inspect.green}"
|
19
|
-
end
|
20
|
-
end
|
21
|
-
|
22
|
-
# load task file
|
23
|
-
if Nake.parse[:file]
|
24
|
-
begin
|
25
|
-
load Nake.parse[:file]
|
26
|
-
rescue Exception => exception
|
27
|
-
print_exception_with_backtrace_and_abort(exception)
|
28
|
-
end
|
29
|
-
elsif File.exist?("tasks.rb")
|
30
|
-
# default value, useful when running nake on systems without
|
31
|
-
# shebang support, so you are using nake -T instead of ./tasks.rb -T
|
32
|
-
Nake.parse[:file] = "tasks.rb"
|
33
|
-
else
|
34
|
-
abort "You have to specify a file with tasks"
|
35
|
-
end
|
36
|
-
|
37
|
-
# run arguments
|
38
|
-
# yes, arguments has to run after the task file is loaded
|
39
|
-
begin
|
40
|
-
original_args = Nake.parse.dup
|
41
|
-
Nake.run_args
|
42
|
-
rescue SystemExit => exception
|
43
|
-
exit exception.status
|
44
|
-
rescue Exception => exception
|
45
|
-
puts "~ Arguments parsed into #{Nake.parse.inspect.green}"
|
46
|
-
puts "Exception occured setting nake flags"
|
47
|
-
print_exception_with_backtrace_and_abort(exception)
|
48
|
-
else
|
49
|
-
if Nake.debug && Nake.parse != original_args
|
50
|
-
puts "~ Arguments changed into #{Nake.parse.inspect.green}"
|
51
|
-
end
|
52
|
-
end
|
53
|
-
|
54
|
-
# run tasks
|
55
|
-
begin
|
56
|
-
Nake.run_task
|
57
|
-
rescue TaskNotFound => exception
|
58
|
-
abort exception.message
|
59
|
-
rescue SystemExit => exception
|
60
|
-
exit exception.status
|
61
|
-
rescue Exception => exception
|
62
|
-
print_exception_with_backtrace_and_abort(exception)
|
63
|
-
end
|
64
|
-
|
65
|
-
# exit with exit status of the last command
|
66
|
-
exit $? ? $?.exitstatus.to_i : 0
|
5
|
+
require "nake/runner"
|
data/lib/nake/runner.rb
ADDED
@@ -0,0 +1,66 @@
|
|
1
|
+
require "nake"
|
2
|
+
require "nake/args"
|
3
|
+
require "nake/helpers"
|
4
|
+
|
5
|
+
module Nake
|
6
|
+
def self.run
|
7
|
+
# parse arguments
|
8
|
+
begin
|
9
|
+
Nake.parse
|
10
|
+
rescue Exception => exception
|
11
|
+
puts "~ Arguments parsed into #{Nake.parse.inspect.green}"
|
12
|
+
puts "Exception occured during parsing arguments"
|
13
|
+
print_exception_with_backtrace_and_abort(exception)
|
14
|
+
else
|
15
|
+
if Nake.parse[:nake] && Nake.parse[:nake].include?("--debug") # Nake.debug isn't initialized yet
|
16
|
+
puts "~ Arguments parsed into #{Nake.parse.inspect.green}"
|
17
|
+
end
|
18
|
+
end
|
19
|
+
|
20
|
+
# load task file
|
21
|
+
if Nake.parse[:file]
|
22
|
+
begin
|
23
|
+
load Nake.parse[:file]
|
24
|
+
rescue Exception => exception
|
25
|
+
print_exception_with_backtrace_and_abort(exception)
|
26
|
+
end
|
27
|
+
elsif File.exist?("tasks.rb")
|
28
|
+
# default value, useful when running nake on systems without
|
29
|
+
# shebang support, so you are using nake -T instead of ./tasks.rb -T
|
30
|
+
Nake.parse[:file] = "tasks.rb"
|
31
|
+
else
|
32
|
+
abort "You have to specify a file with tasks"
|
33
|
+
end
|
34
|
+
|
35
|
+
# run arguments
|
36
|
+
# yes, arguments has to run after the task file is loaded
|
37
|
+
begin
|
38
|
+
original_args = Nake.parse.dup
|
39
|
+
Nake.run_args
|
40
|
+
rescue SystemExit => exception
|
41
|
+
exit exception.status
|
42
|
+
rescue Exception => exception
|
43
|
+
puts "~ Arguments parsed into #{Nake.parse.inspect.green}"
|
44
|
+
puts "Exception occured setting nake flags"
|
45
|
+
print_exception_with_backtrace_and_abort(exception)
|
46
|
+
else
|
47
|
+
if Nake.debug && Nake.parse != original_args
|
48
|
+
puts "~ Arguments changed into #{Nake.parse.inspect.green}"
|
49
|
+
end
|
50
|
+
end
|
51
|
+
|
52
|
+
# run tasks
|
53
|
+
begin
|
54
|
+
Nake.run_task
|
55
|
+
rescue TaskNotFound => exception
|
56
|
+
abort exception.message
|
57
|
+
rescue SystemExit => exception
|
58
|
+
exit exception.status
|
59
|
+
rescue Exception => exception
|
60
|
+
print_exception_with_backtrace_and_abort(exception)
|
61
|
+
end
|
62
|
+
|
63
|
+
# exit with exit status of the last command
|
64
|
+
exit $? ? $?.exitstatus.to_i : 0
|
65
|
+
end
|
66
|
+
end
|
data/nake.gemspec
CHANGED
@@ -8,7 +8,7 @@ require "base64"
|
|
8
8
|
|
9
9
|
Gem::Specification.new do |s|
|
10
10
|
s.name = "nake"
|
11
|
-
s.version = "0.
|
11
|
+
s.version = "0.1"
|
12
12
|
s.authors = ["Jakub Šťastný aka Botanicus"]
|
13
13
|
s.homepage = "http://github.com/botanicus/nake"
|
14
14
|
s.summary = "Nake is light-weight and highly flexible Rake replacement with much better arguments parsing"
|
metadata
CHANGED
@@ -1,35 +1,31 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: nake
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
5
|
-
prerelease:
|
4
|
+
version: '0.1'
|
6
5
|
platform: ruby
|
7
6
|
authors:
|
8
7
|
- Jakub Šťastný aka Botanicus
|
9
8
|
autorequire:
|
10
9
|
bindir: bin
|
11
10
|
cert_chain: []
|
12
|
-
date:
|
11
|
+
date: 2014-01-13 00:00:00.000000000 Z
|
13
12
|
dependencies:
|
14
13
|
- !ruby/object:Gem::Dependency
|
15
14
|
name: term-ansicolor
|
16
15
|
requirement: !ruby/object:Gem::Requirement
|
17
|
-
none: false
|
18
16
|
requirements:
|
19
|
-
- -
|
17
|
+
- - '>='
|
20
18
|
- !ruby/object:Gem::Version
|
21
19
|
version: '0'
|
22
20
|
type: :runtime
|
23
21
|
prerelease: false
|
24
22
|
version_requirements: !ruby/object:Gem::Requirement
|
25
|
-
none: false
|
26
23
|
requirements:
|
27
|
-
- -
|
24
|
+
- - '>='
|
28
25
|
- !ruby/object:Gem::Version
|
29
26
|
version: '0'
|
30
27
|
description: ''
|
31
|
-
email:
|
32
|
-
c3Rhc3RueUAxMDFpZGVhcy5jeg==
|
28
|
+
email: stastny@101ideas.cz
|
33
29
|
executables:
|
34
30
|
- nake
|
35
31
|
- nrake
|
@@ -41,6 +37,7 @@ files:
|
|
41
37
|
- .gitignore
|
42
38
|
- CHANGELOG
|
43
39
|
- Gemfile
|
40
|
+
- Gemfile.lock
|
44
41
|
- LICENSE
|
45
42
|
- README.textile
|
46
43
|
- TODO.txt
|
@@ -52,8 +49,6 @@ files:
|
|
52
49
|
- bm/bms.rb
|
53
50
|
- bm/output.txt
|
54
51
|
- bm/tasks.rb
|
55
|
-
- deps.rb
|
56
|
-
- deps.rip
|
57
52
|
- examples/arguments.rb
|
58
53
|
- examples/basic.rb
|
59
54
|
- examples/boot.rb
|
@@ -98,6 +93,7 @@ files:
|
|
98
93
|
- lib/nake/helpers.rb
|
99
94
|
- lib/nake/rake.rb
|
100
95
|
- lib/nake/rule.rb
|
96
|
+
- lib/nake/runner.rb
|
101
97
|
- lib/nake/struct_hash.rb
|
102
98
|
- lib/nake/task.rb
|
103
99
|
- lib/nake/tasks/bundle.rb
|
@@ -136,27 +132,28 @@ files:
|
|
136
132
|
- tasks.rb
|
137
133
|
homepage: http://github.com/botanicus/nake
|
138
134
|
licenses: []
|
139
|
-
|
135
|
+
metadata: {}
|
136
|
+
post_install_message: "[\e[32mVersion 0.0.9\e[0m] Thanks to Task#config=, the configuration
|
137
|
+
can be shared between multiple tasks\n[\e[32mVersion 0.0.9\e[0m] Reworked rule,
|
138
|
+
added Rule class\n[\e[32mVersion 0.0.9\e[0m] Added --coloring & --no-coloring options\n"
|
140
139
|
rdoc_options: []
|
141
140
|
require_paths:
|
142
141
|
- lib
|
143
142
|
required_ruby_version: !ruby/object:Gem::Requirement
|
144
|
-
none: false
|
145
143
|
requirements:
|
146
|
-
- -
|
144
|
+
- - '>='
|
147
145
|
- !ruby/object:Gem::Version
|
148
146
|
version: '0'
|
149
147
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
150
|
-
none: false
|
151
148
|
requirements:
|
152
|
-
- -
|
149
|
+
- - '>='
|
153
150
|
- !ruby/object:Gem::Version
|
154
151
|
version: '0'
|
155
152
|
requirements: []
|
156
153
|
rubyforge_project: nake
|
157
|
-
rubygems_version:
|
154
|
+
rubygems_version: 2.0.3
|
158
155
|
signing_key:
|
159
|
-
specification_version:
|
156
|
+
specification_version: 4
|
160
157
|
summary: Nake is light-weight and highly flexible Rake replacement with much better
|
161
158
|
arguments parsing
|
162
159
|
test_files: []
|
data/deps.rb
DELETED