nake 0.0.2 → 0.0.3.pre

Sign up to get free protection for your applications and to get access to all the features.
data/CHANGELOG CHANGED
@@ -10,3 +10,6 @@
10
10
 
11
11
  = Version 0.0.2
12
12
  * Support for configuration
13
+ * A lot of useful tasks for releasing, prereleasing, bundling, specs, clean etc.
14
+
15
+ = Version 0.0.3
@@ -3,7 +3,7 @@
3
3
  # this will be probably in a library
4
4
  Task.new(:build) do |task|
5
5
  task.define do
6
- exec "gem build #{task.config[:gemspec]}"
6
+ sh "gem build #{task.config[:gemspec]}"
7
7
  end
8
8
  end
9
9
 
@@ -4,7 +4,7 @@ require "nake/argv"
4
4
  require "nake/task"
5
5
 
6
6
  module Nake
7
- VERSION ||= "0.0.2"
7
+ VERSION ||= "0.0.3"
8
8
  TaskNotFound ||= Class.new(StandardError)
9
9
  ConfigurationError ||= Class.new(StandardError)
10
10
 
@@ -1,17 +1,19 @@
1
1
  # encoding: utf-8
2
2
 
3
3
  require "fileutils"
4
- require "open3"
5
4
 
6
5
  module Nake
7
6
  module TaskHelpers
8
7
  include FileUtils
9
- def sh(command)
10
- puts "#{"$".magenta} #{command.cyan}"
11
- Open3.popen3("sh", "-c", command) do |stdin, stdout, stderr|
12
- puts stdout.readlines.map { |line| " #{line}" }
13
- puts stderr.readlines.map { |line| " #{line.red}" }
14
- end
8
+ alias_method :run, :`
9
+
10
+ # return true if process suceeded, false otherwise
11
+ # sh "ls -a"
12
+ # sh "ls", "-a"
13
+ def sh(*parts)
14
+ puts "#{"$".magenta} #{parts.join(" ").cyan}"
15
+ run "#{parts.shift} #{parts.join(" ")}"
16
+ $?.success?
15
17
  end
16
18
  end
17
19
  end
@@ -7,7 +7,7 @@ require "nake/tasks/gem"
7
7
  task(:release, "release:tag", "release:gemcutter").tap do |task|
8
8
  task.description = "Release current version version"
9
9
  task.define do
10
- puts "Version #{version} was successfuly published. Don't forget to increase VERSION constant!"
10
+ puts "Version #{task.config[:version]} was successfuly published. Don't forget to increase VERSION constant!"
11
11
  end
12
12
  end
13
13
 
@@ -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
- exec "spec #{paths.join(" ")}"
6
+ sh "spec #{paths.join(" ")}"
7
7
  end
8
8
 
9
9
  Task.new("spec:stubs") do |task|
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: nake
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.2
4
+ version: 0.0.3.pre
5
5
  platform: ruby
6
6
  authors:
7
7
  - "Jakub \xC5\xA0\xC5\xA5astn\xC3\xBD aka Botanicus"
@@ -76,9 +76,8 @@ has_rdoc: true
76
76
  homepage: http://github.com/botanicus/nake
77
77
  licenses: []
78
78
 
79
- post_install_message: |-
80
- === Changes in the last Nake ===
81
- - Support for configuration
79
+ post_install_message: "=== Changes in the last Nake ===\n\
80
+ - "
82
81
  rdoc_options: []
83
82
 
84
83
  require_paths:
@@ -91,9 +90,9 @@ required_ruby_version: !ruby/object:Gem::Requirement
91
90
  version:
92
91
  required_rubygems_version: !ruby/object:Gem::Requirement
93
92
  requirements:
94
- - - ">="
93
+ - - ">"
95
94
  - !ruby/object:Gem::Version
96
- version: "0"
95
+ version: 1.3.1
97
96
  version:
98
97
  requirements: []
99
98