reagent-simple-gem 0.2.1 → 0.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/{README.markdown → README.rdoc} +10 -10
- data/Rakefile +3 -2
- data/lib/simple_gem/gem.rb +1 -1
- data/lib/simple_gem/version.rb +2 -2
- data/templates/{README.markdown.erb → README.rdoc.erb} +5 -5
- data/templates/Rakefile.erb +4 -3
- data/templates/lib_version.rb.erb +1 -1
- data/test/simple_gem/gem_test.rb +1 -1
- metadata +8 -7
@@ -1,10 +1,10 @@
|
|
1
|
-
|
1
|
+
= SimpleGem
|
2
2
|
|
3
|
-
|
3
|
+
== Description
|
4
4
|
|
5
5
|
Creating RubyGems is fun work, but dealing with the complexity of hoe / bones / newgem is not (for me, at least). SimpleGem is a way to quickly create a gem structure with the bare minimum needed to build and deploy.
|
6
6
|
|
7
|
-
|
7
|
+
== Installation
|
8
8
|
|
9
9
|
Ideally:
|
10
10
|
|
@@ -17,25 +17,25 @@ But GitHub doesn't seem to consistently build gems, so use this as a fallback:
|
|
17
17
|
$ rake gem
|
18
18
|
$ sudo gem install pkg/simple-gem-x.x.x.gem
|
19
19
|
|
20
|
-
|
20
|
+
== Usage
|
21
21
|
|
22
22
|
$ simple-gem my-gem
|
23
23
|
|
24
24
|
This will create a gem structure under the 'my-gem' directory. The command is pretty forgiving with the name you supply, it will automatically transform anything that is camelcased into something more ruby-like.
|
25
25
|
|
26
|
-
After generating your gem, go ahead and add information about your gem to both the
|
26
|
+
After generating your gem, go ahead and add information about your gem to both the <tt>Rakefile</tt> and <tt>README.markdown</tt> files. The default version number is "0.1.0", but if you want to change that, take a look at <tt>lib/my_gem/version.rb</tt> to make the change - this will automatically be picked up when you rebuild your gem.
|
27
27
|
|
28
28
|
Your new gem provides some Rake tasks for convenience:
|
29
29
|
|
30
|
-
*
|
31
|
-
*
|
32
|
-
*
|
30
|
+
* <tt>rake gem</tt> - Build the gem and drop it into the <tt>pkg/</tt> directory for installation.
|
31
|
+
* <tt>rake test</tt> - The default test task, it will run the tests in <tt>test</tt>. If this is a newly-created gem, your tests will flunk.
|
32
|
+
* <tt>rake github</tt> - Generate <tt>my_gem.gemspec</tt> file to use if you're serving your gem from GitHub (requires flagging your GitHub project as a rubygem).
|
33
33
|
|
34
34
|
That's it. Enjoy.
|
35
35
|
|
36
|
-
|
36
|
+
== License
|
37
37
|
|
38
|
-
Copyright (c) 2008 Patrick Reagan (reaganpr@gmail.com)
|
38
|
+
Copyright (c) 2008 Patrick Reagan (mailto:reaganpr@gmail.com)
|
39
39
|
|
40
40
|
Permission is hereby granted, free of charge, to any person
|
41
41
|
obtaining a copy of this software and associated documentation
|
data/Rakefile
CHANGED
@@ -10,13 +10,14 @@ spec = Gem::Specification.new do |s|
|
|
10
10
|
s.name = 'simple-gem'
|
11
11
|
s.version = SimpleGem::Version.to_s
|
12
12
|
s.has_rdoc = true
|
13
|
-
s.extra_rdoc_files = %w(README.
|
13
|
+
s.extra_rdoc_files = %w(README.rdoc)
|
14
|
+
s.rdoc_options = %w(--main README.rdoc)
|
14
15
|
s.summary = "Make gems. Simple."
|
15
16
|
s.author = 'Patrick Reagan'
|
16
17
|
s.email = 'reaganpr@gmail.com'
|
17
18
|
s.homepage = 'http://sneaq.net'
|
18
19
|
s.executables = ['simple-gem']
|
19
|
-
s.files = %w(README.
|
20
|
+
s.files = %w(README.rdoc Rakefile) + Dir.glob("{lib,test,templates}/**/*")
|
20
21
|
end
|
21
22
|
|
22
23
|
Rake::GemPackageTask.new(spec) do |pkg|
|
data/lib/simple_gem/gem.rb
CHANGED
@@ -28,7 +28,7 @@ module SimpleGem
|
|
28
28
|
generate_file('lib.rb.erb', "lib/#{self.ruby_name}.rb")
|
29
29
|
generate_file('lib_version.rb.erb', "lib/#{self.ruby_name}/version.rb")
|
30
30
|
generate_file('Rakefile.erb', 'Rakefile')
|
31
|
-
generate_file('README.
|
31
|
+
generate_file('README.rdoc.erb', 'README.rdoc')
|
32
32
|
generate_file('test_helper.rb.erb', 'test/test_helper.rb')
|
33
33
|
generate_file('test.rb.erb', "test/unit/#{self.ruby_name}_test.rb")
|
34
34
|
end
|
data/lib/simple_gem/version.rb
CHANGED
@@ -1,18 +1,18 @@
|
|
1
|
-
|
1
|
+
= <%= self.module_name %>
|
2
2
|
|
3
|
-
|
3
|
+
== Description
|
4
4
|
|
5
5
|
Describe your gem here ...
|
6
6
|
|
7
|
-
|
7
|
+
== Installation
|
8
8
|
|
9
9
|
sudo gem install <%= self.name %>
|
10
10
|
|
11
|
-
|
11
|
+
== Usage
|
12
12
|
|
13
13
|
require '<%= self.ruby_name %>'
|
14
14
|
|
15
|
-
|
15
|
+
== License
|
16
16
|
|
17
17
|
Copyright (c) <year> <copyright holders>
|
18
18
|
|
data/templates/Rakefile.erb
CHANGED
@@ -10,15 +10,16 @@ spec = Gem::Specification.new do |s|
|
|
10
10
|
s.name = '<%= self.name %>'
|
11
11
|
s.version = <%= self.module_name %>::Version.to_s
|
12
12
|
s.has_rdoc = true
|
13
|
-
s.extra_rdoc_files = %w(README.
|
13
|
+
s.extra_rdoc_files = %w(README.rdoc)
|
14
|
+
s.rdoc_options = %w(--main README.rdoc)
|
14
15
|
s.summary = "This gem does ... "
|
15
16
|
s.author = 'First Last'
|
16
17
|
s.email = 'user@example.com'
|
17
18
|
s.homepage = 'http://my-site.net'
|
18
|
-
s.files = %w(README.
|
19
|
+
s.files = %w(README.rdoc Rakefile) + Dir.glob("{lib,test}/**/*")
|
19
20
|
# s.executables = ['<%= self.name %>']
|
20
21
|
|
21
|
-
# s.add_dependency('gem_name', '
|
22
|
+
# s.add_dependency('gem_name', '~> 0.0.1')
|
22
23
|
end
|
23
24
|
|
24
25
|
Rake::GemPackageTask.new(spec) do |pkg|
|
data/test/simple_gem/gem_test.rb
CHANGED
@@ -90,7 +90,7 @@ module SimpleGem
|
|
90
90
|
end
|
91
91
|
|
92
92
|
it "should create the README file" do
|
93
|
-
File.exist?("#{@tmp_dir}/#{@name}/README.
|
93
|
+
File.exist?("#{@tmp_dir}/#{@name}/README.rdoc").should == true
|
94
94
|
end
|
95
95
|
|
96
96
|
it "should generate the test helper file" do
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: reagent-simple-gem
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.3.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Patrick Reagan
|
@@ -9,7 +9,7 @@ autorequire:
|
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
11
|
|
12
|
-
date: 2008-12-
|
12
|
+
date: 2008-12-12 00:00:00 -08:00
|
13
13
|
default_executable: simple-gem
|
14
14
|
dependencies: []
|
15
15
|
|
@@ -20,9 +20,9 @@ executables:
|
|
20
20
|
extensions: []
|
21
21
|
|
22
22
|
extra_rdoc_files:
|
23
|
-
- README.
|
23
|
+
- README.rdoc
|
24
24
|
files:
|
25
|
-
- README.
|
25
|
+
- README.rdoc
|
26
26
|
- Rakefile
|
27
27
|
- lib/simple_gem
|
28
28
|
- lib/simple_gem/gem.rb
|
@@ -33,15 +33,16 @@ files:
|
|
33
33
|
- templates/lib.rb.erb
|
34
34
|
- templates/lib_version.rb.erb
|
35
35
|
- templates/Rakefile.erb
|
36
|
-
- templates/README.
|
36
|
+
- templates/README.rdoc.erb
|
37
37
|
- templates/test.rb.erb
|
38
38
|
- templates/test_helper.rb.erb
|
39
39
|
- bin/simple-gem
|
40
40
|
has_rdoc: true
|
41
41
|
homepage: http://sneaq.net
|
42
42
|
post_install_message:
|
43
|
-
rdoc_options:
|
44
|
-
|
43
|
+
rdoc_options:
|
44
|
+
- --main
|
45
|
+
- README.rdoc
|
45
46
|
require_paths:
|
46
47
|
- lib
|
47
48
|
required_ruby_version: !ruby/object:Gem::Requirement
|