ore-tasks 0.2.0 → 0.3.0
Sign up to get free protection for your applications and to get access to all the features.
- data/ChangeLog.md +9 -0
- data/README.md +2 -1
- data/gemspec.yml +4 -2
- data/lib/ore/tasks.rb +50 -5
- data/ore-tasks.gemspec +1 -1
- metadata +4 -4
data/ChangeLog.md
CHANGED
@@ -1,3 +1,12 @@
|
|
1
|
+
### 0.3.0 / 2010-11-14
|
2
|
+
|
3
|
+
* Added ore-core ~> 0.3.0 as a runtime dependency.
|
4
|
+
* Added the `version` task, which displays the current version.
|
5
|
+
* Added {Ore::Tasks#release_tasks} to explicitly control which tasks
|
6
|
+
are invoked when releasing a new version.
|
7
|
+
* Perform `git push` before the release process.
|
8
|
+
* Perform `git tag` and `git push --tags` after a successful release.
|
9
|
+
|
1
10
|
### 0.2.0 / 2010-11-07
|
2
11
|
|
3
12
|
* Require [ore-core](http://github.com/ruby-ore/ore-core) ~> 0.1.0.
|
data/README.md
CHANGED
@@ -16,7 +16,7 @@ project.
|
|
16
16
|
[rubygems.org](http://rubygems.org/).
|
17
17
|
* Provides optional Git tasks.
|
18
18
|
* Provides the `console` task for digging right into your code.
|
19
|
-
* **Does not** automatically
|
19
|
+
* **Does not** automatically modify or commit changes to your code.
|
20
20
|
|
21
21
|
## Requirements
|
22
22
|
|
@@ -40,6 +40,7 @@ project.
|
|
40
40
|
rake push # Builds and pushes a Gem
|
41
41
|
rake release # Builds and Pushes a new Gem / Build, Tags and Pushe...
|
42
42
|
rake tag # Tags a release and pushes the tag
|
43
|
+
rake version # Displays the current version
|
43
44
|
|
44
45
|
## Copyright
|
45
46
|
|
data/gemspec.yml
CHANGED
@@ -1,5 +1,5 @@
|
|
1
1
|
name: ore-tasks
|
2
|
-
version: 0.
|
2
|
+
version: 0.3.0
|
3
3
|
summary: Rake tasks for managing and releasing RubyGems using Ore.
|
4
4
|
description:
|
5
5
|
Simple Rake tasks for managing and releasing a RubyGem project generated
|
@@ -9,7 +9,9 @@ email: postmodern.mod3@gmail.com
|
|
9
9
|
homepage: http://github.com/ruby-ore/ore-tasks
|
10
10
|
has_yard: true
|
11
11
|
|
12
|
-
|
12
|
+
dependencies:
|
13
13
|
ore-core: ~> 0.1.0
|
14
|
+
|
15
|
+
development_dependencies:
|
14
16
|
rspec: ~> 2.0.0
|
15
17
|
yard: ~> 0.6.0
|
data/lib/ore/tasks.rb
CHANGED
@@ -3,14 +3,31 @@ require 'ore/project'
|
|
3
3
|
require 'rake/tasklib'
|
4
4
|
|
5
5
|
module Ore
|
6
|
+
#
|
7
|
+
# Defines basic Rake tasks for managing and releasing projects
|
8
|
+
# that use [Ore](http://rubydoc.info/gems/ore-core/file/README.md).
|
9
|
+
#
|
6
10
|
class Tasks < Rake::TaskLib
|
7
11
|
|
12
|
+
# The tasks to perform when releasing a new version
|
13
|
+
attr_reader :release_tasks
|
14
|
+
|
15
|
+
#
|
16
|
+
# Initializes the Ore tasks.
|
17
|
+
#
|
18
|
+
# @param [String] root
|
19
|
+
# The optional root directory for the project.
|
20
|
+
#
|
8
21
|
def initialize(root=Dir.pwd)
|
9
22
|
@project = Project.find(root)
|
23
|
+
@release_tasks = ['push']
|
10
24
|
|
11
25
|
define
|
12
26
|
end
|
13
27
|
|
28
|
+
#
|
29
|
+
# Defines the core Ore tasks.
|
30
|
+
#
|
14
31
|
def define_core_tasks
|
15
32
|
desc "Only builds a Gem"
|
16
33
|
task :build do
|
@@ -43,7 +60,14 @@ module Ore
|
|
43
60
|
end
|
44
61
|
|
45
62
|
desc "Builds and Pushes a new Gem"
|
46
|
-
task :release
|
63
|
+
task :release do
|
64
|
+
@release_tasks.each { |task| Rake::Task[task].invoke }
|
65
|
+
end
|
66
|
+
|
67
|
+
desc 'Displays the current version'
|
68
|
+
task :version do
|
69
|
+
puts @project.version
|
70
|
+
end
|
47
71
|
|
48
72
|
desc "Start IRB with all runtime dependencies loaded"
|
49
73
|
task :console, [:script] do |t,args|
|
@@ -75,18 +99,27 @@ module Ore
|
|
75
99
|
end
|
76
100
|
end
|
77
101
|
|
102
|
+
#
|
103
|
+
# Defines the Ore tasks specific to [git](http://www.git-scm.com).
|
104
|
+
#
|
78
105
|
def define_git_tasks
|
79
|
-
|
80
|
-
task :tag => :build do
|
106
|
+
task :sync do
|
81
107
|
run "git push"
|
108
|
+
end
|
109
|
+
|
110
|
+
desc 'Tags a release and pushes the tag'
|
111
|
+
task :tag do
|
82
112
|
run "git tag v#{@project.version}"
|
83
113
|
run "git push --tags"
|
84
114
|
end
|
85
115
|
|
86
|
-
|
87
|
-
|
116
|
+
@release_tasks.unshift('sync')
|
117
|
+
@release_tasks.push('tag')
|
88
118
|
end
|
89
119
|
|
120
|
+
#
|
121
|
+
# Defines the Ore tasks.
|
122
|
+
#
|
90
123
|
def define
|
91
124
|
define_core_tasks
|
92
125
|
|
@@ -96,6 +129,18 @@ module Ore
|
|
96
129
|
end
|
97
130
|
end
|
98
131
|
|
132
|
+
#
|
133
|
+
# Runs a program with optional arguments.
|
134
|
+
#
|
135
|
+
# @param [String] program
|
136
|
+
# The program to run.
|
137
|
+
#
|
138
|
+
# @param [Array<String>] arguments
|
139
|
+
# Optional arguments.
|
140
|
+
#
|
141
|
+
# @return [true]
|
142
|
+
# The program was executed successfully.
|
143
|
+
#
|
99
144
|
def run(program,*arguments)
|
100
145
|
show_command = ([program] + arguments).join(' ')
|
101
146
|
|
data/ore-tasks.gemspec
CHANGED
metadata
CHANGED
@@ -4,9 +4,9 @@ version: !ruby/object:Gem::Version
|
|
4
4
|
prerelease: false
|
5
5
|
segments:
|
6
6
|
- 0
|
7
|
-
-
|
7
|
+
- 3
|
8
8
|
- 0
|
9
|
-
version: 0.
|
9
|
+
version: 0.3.0
|
10
10
|
platform: ruby
|
11
11
|
authors:
|
12
12
|
- Postmodern
|
@@ -14,7 +14,7 @@ autorequire:
|
|
14
14
|
bindir: bin
|
15
15
|
cert_chain: []
|
16
16
|
|
17
|
-
date: 2010-11-
|
17
|
+
date: 2010-11-14 00:00:00 -08:00
|
18
18
|
default_executable:
|
19
19
|
dependencies:
|
20
20
|
- !ruby/object:Gem::Dependency
|
@@ -30,7 +30,7 @@ dependencies:
|
|
30
30
|
- 1
|
31
31
|
- 0
|
32
32
|
version: 0.1.0
|
33
|
-
type: :
|
33
|
+
type: :runtime
|
34
34
|
version_requirements: *id001
|
35
35
|
- !ruby/object:Gem::Dependency
|
36
36
|
name: rspec
|