rake_tasks 0.0.3 → 0.0.4
Sign up to get free protection for your applications and to get access to all the features.
- data/README +7 -6
- data/lib/rake_tasks/doc.rb +78 -0
- data/lib/rake_tasks.rb +1 -0
- data/rake_tasks.gemspec +9 -7
- metadata +12 -7
data/README
CHANGED
@@ -1,8 +1,9 @@
|
|
1
1
|
== Welcome to RakeTasks
|
2
2
|
|
3
|
-
RakeTasks provides basic rake tasks
|
4
|
-
building and installing gems, and running tests.
|
5
|
-
rake tasks if they are
|
3
|
+
RakeTasks provides basic rake tasks for generating documentation,
|
4
|
+
building and installing gems, and running tests.
|
5
|
+
It will also load additional rake tasks if they are in a folder named 'tasks'.
|
6
|
+
mmmm yummy
|
6
7
|
|
7
8
|
The following assumptions are currently made:
|
8
9
|
|
@@ -28,11 +29,11 @@ The default task will be set in the following order:
|
|
28
29
|
|
29
30
|
gem install rake_tasks
|
30
31
|
|
31
|
-
2. Require the gem in your
|
32
|
+
2. Require the gem in your Gemfile:
|
32
33
|
|
33
|
-
gem 'rake_tasks', '~> 0.0.
|
34
|
+
gem 'rake_tasks', '~> 0.0.4'
|
34
35
|
|
35
|
-
3. Require the gem wherever you
|
36
|
+
3. Require the gem wherever you need to use it:
|
36
37
|
|
37
38
|
require 'rake_tasks'
|
38
39
|
|
@@ -0,0 +1,78 @@
|
|
1
|
+
gem_spec_file = "#{File.basename(Dir.getwd)}.gemspec"
|
2
|
+
|
3
|
+
if File.file?(gem_spec_file)
|
4
|
+
############################################################################
|
5
|
+
namespace :doc do
|
6
|
+
############################################################################
|
7
|
+
|
8
|
+
gem_spec = Gem::Specification.load(gem_spec_file)
|
9
|
+
|
10
|
+
readme = 'README_GENERATED'
|
11
|
+
|
12
|
+
file readme => gem_spec_file do |t|
|
13
|
+
gem_title = camelize(gem_spec.name)
|
14
|
+
header = '=='
|
15
|
+
|
16
|
+
content =<<-EOD
|
17
|
+
#{header} Welcome to #{gem_title}
|
18
|
+
|
19
|
+
#{gem_spec.description}
|
20
|
+
|
21
|
+
#{header} Getting Started
|
22
|
+
|
23
|
+
1. Install #{gem_title} at the command prompt if you haven't yet:
|
24
|
+
|
25
|
+
gem install #{gem_spec.name}
|
26
|
+
|
27
|
+
2. Require the gem in your Gemfile:
|
28
|
+
|
29
|
+
gem '#{gem_spec.name}', '~> #{gem_spec.version}'
|
30
|
+
|
31
|
+
3. Require the gem wherever you need to use it:
|
32
|
+
|
33
|
+
require '#{gem_spec.name}'
|
34
|
+
|
35
|
+
#{header} Usage
|
36
|
+
|
37
|
+
TODO
|
38
|
+
|
39
|
+
#{header} Additional Notes
|
40
|
+
|
41
|
+
TODO
|
42
|
+
|
43
|
+
#{header} Additional Documentation
|
44
|
+
|
45
|
+
rake rdoc:app
|
46
|
+
|
47
|
+
#{header} License
|
48
|
+
|
49
|
+
#{gem_title} is released under the #{gem_spec.license} license.
|
50
|
+
EOD
|
51
|
+
|
52
|
+
File.open(readme, 'w') do |file|
|
53
|
+
file.puts content
|
54
|
+
end
|
55
|
+
end
|
56
|
+
|
57
|
+
desc "Generate a #{readme} file."
|
58
|
+
task :readme => readme
|
59
|
+
|
60
|
+
desc "Removes files associated with generating documentation."
|
61
|
+
task :clobber do |t|
|
62
|
+
rm_f readme
|
63
|
+
end
|
64
|
+
|
65
|
+
def camelize(word)
|
66
|
+
result = ''
|
67
|
+
word.split('_').each do |section|
|
68
|
+
result += section.capitalize
|
69
|
+
end
|
70
|
+
return result
|
71
|
+
end
|
72
|
+
|
73
|
+
############################################################################
|
74
|
+
end # :doc
|
75
|
+
############################################################################
|
76
|
+
|
77
|
+
task :clobber => 'doc:clobber'
|
78
|
+
end
|
data/lib/rake_tasks.rb
CHANGED
data/rake_tasks.gemspec
CHANGED
@@ -1,18 +1,20 @@
|
|
1
1
|
Gem::Specification.new do |s|
|
2
2
|
s.name = 'rake_tasks'
|
3
|
-
s.version = '0.0.
|
3
|
+
s.version = '0.0.4'
|
4
4
|
|
5
|
-
s.summary = 'Basic rake tasks.'
|
6
|
-
s.description
|
7
|
-
|
8
|
-
|
9
|
-
|
5
|
+
s.summary = 'Basic rake tasks. You know you want some.'
|
6
|
+
s.description =%Q{
|
7
|
+
RakeTasks provides basic rake tasks for generating documentation,
|
8
|
+
building and installing gems, and running tests.
|
9
|
+
It will also load additional rake tasks if they are in a folder named 'tasks'.
|
10
|
+
mmmm yummy
|
11
|
+
}.strip
|
10
12
|
|
11
13
|
s.author = 'Travis Herrick'
|
12
14
|
s.email = 'tthetoad@gmail.com'
|
13
15
|
s.homepage = 'http://www.bitbucket.org/ToadJamb/gems_rake_tasks'
|
14
16
|
|
15
|
-
s.license = '
|
17
|
+
s.license = 'GPLv3'
|
16
18
|
|
17
19
|
s.extra_rdoc_files << 'README'
|
18
20
|
|
metadata
CHANGED
@@ -5,8 +5,8 @@ version: !ruby/object:Gem::Version
|
|
5
5
|
segments:
|
6
6
|
- 0
|
7
7
|
- 0
|
8
|
-
-
|
9
|
-
version: 0.0.
|
8
|
+
- 4
|
9
|
+
version: 0.0.4
|
10
10
|
platform: ruby
|
11
11
|
authors:
|
12
12
|
- Travis Herrick
|
@@ -32,7 +32,11 @@ dependencies:
|
|
32
32
|
type: :runtime
|
33
33
|
prerelease: false
|
34
34
|
version_requirements: *id001
|
35
|
-
description:
|
35
|
+
description: |-
|
36
|
+
RakeTasks provides basic rake tasks for generating documentation,
|
37
|
+
building and installing gems, and running tests.
|
38
|
+
It will also load additional rake tasks if they are in a folder named 'tasks'.
|
39
|
+
mmmm yummy
|
36
40
|
email: tthetoad@gmail.com
|
37
41
|
executables: []
|
38
42
|
|
@@ -43,17 +47,18 @@ extra_rdoc_files:
|
|
43
47
|
files:
|
44
48
|
- lib/rake_tasks/rdoc.rb
|
45
49
|
- lib/rake_tasks/gem.rb
|
50
|
+
- lib/rake_tasks/doc.rb
|
46
51
|
- lib/rake_tasks/test.rb
|
47
52
|
- lib/rake_tasks.rb
|
48
53
|
- Gemfile.lock
|
49
54
|
- Gemfile
|
50
|
-
- rakefile
|
51
55
|
- README
|
56
|
+
- rakefile
|
52
57
|
- rake_tasks.gemspec
|
53
58
|
has_rdoc: true
|
54
59
|
homepage: http://www.bitbucket.org/ToadJamb/gems_rake_tasks
|
55
60
|
licenses:
|
56
|
-
-
|
61
|
+
- GPLv3
|
57
62
|
post_install_message:
|
58
63
|
rdoc_options: []
|
59
64
|
|
@@ -64,7 +69,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
64
69
|
requirements:
|
65
70
|
- - ">="
|
66
71
|
- !ruby/object:Gem::Version
|
67
|
-
hash:
|
72
|
+
hash: -859823795052376856
|
68
73
|
segments:
|
69
74
|
- 0
|
70
75
|
version: "0"
|
@@ -82,6 +87,6 @@ rubyforge_project:
|
|
82
87
|
rubygems_version: 1.3.7
|
83
88
|
signing_key:
|
84
89
|
specification_version: 3
|
85
|
-
summary: Basic rake tasks.
|
90
|
+
summary: Basic rake tasks. You know you want some.
|
86
91
|
test_files: []
|
87
92
|
|