nake 0.0.8.pre → 0.0.8

Sign up to get free protection for your applications and to get access to all the features.
data/TODO.txt CHANGED
@@ -3,6 +3,7 @@
3
3
  - update examples
4
4
  - features
5
5
 
6
+ - task inheritance => sharing config via super
6
7
  - rework rule
7
8
  - check if everything works
8
9
  - specs
data/bm/tmp/test.c ADDED
@@ -0,0 +1,6 @@
1
+ #include <stdio.h>
2
+
3
+ int main() {
4
+ printf("Hello World!\n");
5
+ return 0;
6
+ }
@@ -0,0 +1 @@
1
+ <html>Hello World!</html>
@@ -4,8 +4,18 @@ require "nake/abstract_task"
4
4
 
5
5
  module Nake
6
6
  class FileTask < AbstractTask
7
+ # TODO: default description na Generate #name
7
8
  alias_method :path, :name
8
-
9
+
10
+ # FileTask can depend on tasks, other file tasks or just files.
11
+ # If a file task depends on a task, this task isn't supposed to change anything what ...
12
+ # ... if it's changing something, make sure the changing task is actually called before the file tasks are executed
13
+ # If the task is changing something so the file will be generated in all cases, you should rather to use normal task
14
+ # If there are some dependencies on files
15
+ # FileTask.new("www/index.html") do |task|
16
+ # task.file_dependencies.push(*FileList["images/**/*"])
17
+ # task.dependencies.push("www") # www task exist
18
+ # end
9
19
  def call(args = Array.new, options = Hash.new)
10
20
  will_run = true
11
21
  unless self.dependencies.empty?
@@ -3,7 +3,7 @@
3
3
  # ./tasks.rb spec/nake/argv_spec.rb spec/nake/task_spec.rb
4
4
  task(:spec) do |*paths, options|
5
5
  paths.push("spec") if paths.empty?
6
- sh "spec #{paths.join(" ")}"
6
+ sh "spec", *paths
7
7
  end
8
8
 
9
9
  Task.new("spec:stubs") do |task|
@@ -12,18 +12,8 @@ Task.new("spec:stubs") do |task|
12
12
  Dir.glob("lib/**/*.rb").each do |file|
13
13
  specfile = file.sub(/^lib/, "spec").sub(/\.rb$/, '_spec.rb')
14
14
  unless File.exist?(specfile)
15
- %x[mkdir -p #{File.dirname(specfile)}]
16
- %x[touch #{specfile}]
17
- puts "Created #{specfile}"
18
- end
19
- end
20
- (Dir.glob("spec/rango/**/*.rb") + ["spec/rango_spec.rb"]).each do |file|
21
- libfile = file.sub(/spec/, "lib").sub(/_spec\.rb$/, '.rb')
22
- if !File.exist?(libfile) && File.zero?(file)
23
- %x[rm #{file}]
24
- puts "Removed empty file #{file}"
25
- elsif !File.exist?(libfile)
26
- puts "File exists just in spec, not in lib: #{file}"
15
+ sh "mkdir -p #{File.dirname(specfile)}"
16
+ sh "touch #{specfile}"
27
17
  end
28
18
  end
29
19
  end
Binary file
data/nake.gemspec CHANGED
@@ -2,12 +2,12 @@
2
2
  # encoding: utf-8
3
3
 
4
4
  # NOTE: we can't use require_relative because when we run gem build, it use eval for executing this file
5
- $:.unshift(File.join(File.dirname(__FILE__), "lib"))
6
- require "nake"
5
+ #$:.unshift(File.join(File.dirname(__FILE__), "lib"))
6
+ #require "nake"
7
7
 
8
8
  Gem::Specification.new do |s|
9
9
  s.name = "nake"
10
- s.version = Nake::VERSION
10
+ s.version = "0.0.8"
11
11
  s.authors = ["Jakub Šťastný aka Botanicus"]
12
12
  s.homepage = "http://github.com/botanicus/nake"
13
13
  s.summary = "Nake is light-weight and highly flexible Rake replacement with much better arguments parsing"
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: nake
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.8.pre
4
+ version: 0.0.8
5
5
  platform: ruby
6
6
  authors:
7
7
  - "Jakub \xC5\xA0\xC5\xA5astn\xC3\xBD aka Botanicus"
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain:
11
- date: 2010-01-10 00:00:00 +00:00
11
+ date: 2010-01-10 00:00:00 +01:00
12
12
  default_executable: nake
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
@@ -30,110 +30,109 @@ extensions: []
30
30
  extra_rdoc_files: []
31
31
 
32
32
  files:
33
+ - bin/nake
34
+ - bin/nrake
35
+ - bin/rake2nake
36
+ - bin/snake
37
+ - bm/bms.rb
38
+ - bm/output.txt
39
+ - bm/Rakefile
40
+ - bm/tasks.rb
41
+ - bm/tmp/test.c
42
+ - bm/tmp/www/index.html
43
+ - CHANGELOG
33
44
  - deps.rb
45
+ - deps.rip
46
+ - examples/arguments.rb
47
+ - examples/basic.rb
48
+ - examples/boot.rb
49
+ - examples/complex.rb
50
+ - examples/configuration.rb
51
+ - examples/default.rb
34
52
  - examples/default_proc.rb
53
+ - examples/dependencies.rb
35
54
  - examples/description.rb
36
- - examples/default.rb
37
55
  - examples/file.rb
38
- - examples/invoking.rb
39
56
  - examples/helpers.rb
40
- - examples/configuration.rb
41
- - examples/arguments.rb
42
- - examples/task_arguments.rb
43
- - examples/dependencies.rb
44
- - examples/boot.rb
57
+ - examples/invoking.rb
45
58
  - examples/rules.rb
46
59
  - examples/script.rb
47
- - examples/basic.rb
48
- - examples/complex.rb
49
- - CHANGELOG
50
- - deps.rip
51
- - features/task_arguments.feature
60
+ - examples/task_arguments.rb
61
+ - features/arguments.feature
62
+ - features/basic.feature
63
+ - features/boot.feature
64
+ - features/builtin_arguments.feature
52
65
  - features/complex.feature
53
- - features/executable.feature
54
- - features/invoking.feature
66
+ - features/configuration.feature
67
+ - features/default.feature
55
68
  - features/default_proc.feature
56
- - features/file.feature
57
- - features/rules.feature
58
- - features/steps.rb
59
- - features/arguments.feature
60
69
  - features/dependencies.feature
70
+ - features/description.feature
61
71
  - features/env.rb
62
- - features/configuration.feature
63
- - features/basic.feature
72
+ - features/executable.feature
73
+ - features/file.feature
64
74
  - features/helpers.feature
65
- - features/builtin_arguments.feature
66
- - features/description.feature
67
- - features/boot.feature
68
- - features/default.feature
75
+ - features/invoking.feature
76
+ - features/rules.feature
69
77
  - features/script.feature
70
- - lib/nake.rb
71
- - lib/nake/struct_hash.rb
78
+ - features/steps.rb
79
+ - features/task_arguments.feature
72
80
  - lib/nake/abstract_task.rb
73
- - lib/nake/argv.rb
74
- - lib/nake/rule.rb
75
81
  - lib/nake/args.rb
76
- - lib/nake/template.rb
77
- - lib/nake/task.rb
78
- - lib/nake/helpers.rb
82
+ - lib/nake/argv.rb
79
83
  - lib/nake/colors.rb
80
- - lib/nake/file_task.rb
81
84
  - lib/nake/dsl.rb
85
+ - lib/nake/file_task.rb
86
+ - lib/nake/helpers.rb
87
+ - lib/nake/rake.rb
88
+ - lib/nake/rule.rb
89
+ - lib/nake/struct_hash.rb
90
+ - lib/nake/task.rb
91
+ - lib/nake/tasks/bundle.rb
92
+ - lib/nake/tasks/clean.rb
82
93
  - lib/nake/tasks/gem.rb
94
+ - lib/nake/tasks/release.rb
83
95
  - lib/nake/tasks/rip.rb
84
- - lib/nake/tasks/clean.rb
85
96
  - lib/nake/tasks/spec.rb
86
- - lib/nake/tasks/bundle.rb
87
- - lib/nake/tasks/release.rb
88
- - lib/nake/rake.rb
97
+ - lib/nake/template.rb
98
+ - lib/nake.rb
89
99
  - LICENSE
90
- - README.textile
91
- - prerelease.log
92
- - nake.pre.gemspec
93
- - bm/tasks.rb
94
- - bm/Rakefile
95
- - bm/bms.rb
96
- - bm/output.txt
100
+ - nake-0.0.8.gem
101
+ - nake-0.0.8.pre.gem
97
102
  - nake.gemspec
98
- - tasks.rb
99
- - bin/rake2nake
100
- - bin/nake
101
- - bin/nrake
102
- - bin/snake
103
- - TODO.txt
104
- - spec/spec_helper.rb
105
- - spec/nake/rule_spec.rb
103
+ - nake.pre.gemspec
104
+ - README.textile
105
+ - spec/nake/abstract_task_spec.rb
106
106
  - spec/nake/args_spec.rb
107
- - spec/nake/rake_spec.rb
108
- - spec/nake/tasks_spec.rb
107
+ - spec/nake/argv_spec.rb
108
+ - spec/nake/colors_spec.rb
109
109
  - spec/nake/dsl_spec.rb
110
- - spec/nake/task_spec.rb
111
- - spec/nake/helpers_spec.rb
112
110
  - spec/nake/file_task_spec.rb
113
- - spec/nake/colors_spec.rb
111
+ - spec/nake/helpers_spec.rb
112
+ - spec/nake/rake_spec.rb
113
+ - spec/nake/rule_spec.rb
114
114
  - spec/nake/struct_hash_spec.rb
115
- - spec/nake/tasks/release_spec.rb
115
+ - spec/nake/task_spec.rb
116
116
  - spec/nake/tasks/bundle_spec.rb
117
- - spec/nake/tasks/rip_spec.rb
118
117
  - spec/nake/tasks/clean_spec.rb
119
118
  - spec/nake/tasks/gem_spec.rb
119
+ - spec/nake/tasks/release_spec.rb
120
+ - spec/nake/tasks/rip_spec.rb
120
121
  - spec/nake/tasks/spec_spec.rb
122
+ - spec/nake/tasks_spec.rb
121
123
  - spec/nake/template_spec.rb
122
- - spec/nake/argv_spec.rb
123
- - spec/nake/abstract_task_spec.rb
124
- - spec/stubs/database.yml.erb
125
- - spec/stubs/database.yml.tt
126
124
  - spec/nake_spec.rb
127
125
  - spec/spec.opts
126
+ - spec/spec_helper.rb
127
+ - spec/stubs/database.yml.erb
128
+ - spec/stubs/database.yml.tt
129
+ - tasks.rb
130
+ - TODO.txt
128
131
  has_rdoc: true
129
132
  homepage: http://github.com/botanicus/nake
130
133
  licenses: []
131
134
 
132
- post_install_message: |-
133
- === Changes in the last Nake ===
134
- - Thanks to Task#config=, the configuration can be shared between multiple tasks
135
- - Reworked rule, added Rule class
136
- - Added --coloring & --no-coloring options
135
+ post_install_message:
137
136
  rdoc_options: []
138
137
 
139
138
  require_paths:
@@ -146,9 +145,9 @@ required_ruby_version: !ruby/object:Gem::Requirement
146
145
  version:
147
146
  required_rubygems_version: !ruby/object:Gem::Requirement
148
147
  requirements:
149
- - - ">"
148
+ - - ">="
150
149
  - !ruby/object:Gem::Version
151
- version: 1.3.1
150
+ version: "0"
152
151
  version:
153
152
  requirements: []
154
153
 
data/prerelease.log DELETED
@@ -1,10 +0,0 @@
1
- ~ If you want to contribute to nake, you have to install code-cleaner gem and then run ./tasks.rb hooks:whitespace:install to get Git pre-commit hook for removing trailing whitespace and improving code quality in general.
2
- ~ Config {:gemspec=>"nake.pre.gemspec"}
3
- ~ Config {:files=>["nake-0.0.8.pre.gem"]}
4
- ~ Config {:gemspec=>"nake.pre.gemspec"}
5
- ~ Executing task prerelease with arguments [] and options {}
6
- ~ Invoking task release:gemcutter
7
- ~ Executing task clean with arguments {} and options {}
8
- ~ Executing task build with arguments {} and options {}
9
- $ gem build nake.pre.gemspec
10
- WARNING: no description specified