gem_polisher 0.4.4 → 0.4.5
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +66 -0
- data/lib/gem_polisher/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: d8aa33707e7bd71a20351f25c911aef8cd198725
|
4
|
+
data.tar.gz: d654ef08d795ddc0d59e9ec2a5336c1d840253c6
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 56e432286f73d6dcd5d441c0893bb71310247fe53fe4a40f46da2d43ca3c702b8ecce6d74e5def257f768d8b3a63cbb1ad6220ad7b753c0a10ff7fc7a164a28a
|
7
|
+
data.tar.gz: 7a0b7cf1e734c0b55d780d2c7d915b7d22da2512e8482ec71d9417fd8f4c8335df2fde4b87803a043ab9d8b73af407f91b4b440348845b25c11d3c7c9804a681
|
data/README.md
CHANGED
@@ -1,8 +1,74 @@
|
|
1
1
|
# gem_polisher
|
2
2
|
|
3
|
+
[![Gem Version](https://badge.fury.io/rb/gem_polisher.svg)](http://badge.fury.io/rb/gem_polisher)
|
4
|
+
[![GitHub issues](https://img.shields.io/github/issues/fornellas/gem_polisher.svg)](https://github.com/fornellas/gem_polisher/issues)
|
5
|
+
[![GitHub license](https://img.shields.io/badge/license-GPLv3-blue.svg)](https://raw.githubusercontent.com/fornellas/gem_polisher/master/LICENSE)
|
6
|
+
[![Downloads](http://ruby-gem-downloads-badge.herokuapp.com/gem_polisher?type=total)](https://rubygems.org/gems/gem_polisher)
|
7
|
+
|
3
8
|
* Home: [https://github.com/fornellas/gem_polisher/](https://github.com/fornellas/gem_polisher/)
|
4
9
|
* Bugs: [https://github.com/fornellas/gem_polisher/issues](https://github.com/fornellas/gem_polisher/issues)
|
5
10
|
|
6
11
|
## Description
|
7
12
|
|
8
13
|
This Gem provides Rake tasks to assist Ruby Gem development workflow.
|
14
|
+
|
15
|
+
## Utilization
|
16
|
+
|
17
|
+
* Create a new Gem (see [http://guides.rubygems.org/make-your-own-gem/](http://guides.rubygems.org/make-your-own-gem/))
|
18
|
+
* Follow [already established naming conventions](http://guides.rubygems.org/name-your-gem/).
|
19
|
+
* Tip: if you does not use strict camel casing (eg: RDoc and not Rdoc), see <tt>GemPolisher#initialize</tt>'s <tt>gem_main_constant_s</tt> option.
|
20
|
+
* When creating your <tt>.gemspec</tt> file, point its <tt>version</tt> attribute to an external file. Eg:
|
21
|
+
```ruby
|
22
|
+
require_relative 'lib/my/gem/with_long_name/version'
|
23
|
+
Gem::Specification.new do |s|
|
24
|
+
s.version = My::Gem::WithLongName::VERSION
|
25
|
+
s.add_development_dependency 'gem_polisher', '~>0.4' # Change to latest available version!
|
26
|
+
end
|
27
|
+
```
|
28
|
+
* Create the version file accordingly. Eg:
|
29
|
+
```ruby
|
30
|
+
class My
|
31
|
+
class Gem
|
32
|
+
class WithLongName
|
33
|
+
VERSION = '0.0.0'
|
34
|
+
end
|
35
|
+
end
|
36
|
+
end
|
37
|
+
```
|
38
|
+
* Add this to your <tt>Rakefile</tt>:
|
39
|
+
```ruby
|
40
|
+
require 'gem_polisher'
|
41
|
+
GemPolisher.new
|
42
|
+
```
|
43
|
+
* Create your <tt>Gemfile</tt> and <tt>Gemfile.lock</tt> using [Bundler](http://bundler.io/).
|
44
|
+
|
45
|
+
At this point, you have at your disposal some Rake tasks:
|
46
|
+
```
|
47
|
+
$ bundle exec rake -T
|
48
|
+
rake gem:release[type] # Update bundle, run tests, increment version, build and publish Gem; type can be major, minor or patch
|
49
|
+
rake test # Run all tests
|
50
|
+
```
|
51
|
+
That you can use to generate new releases. The <tt>gem:release[type]</tt> task will:
|
52
|
+
* Make sure you are at master, with everything commited.
|
53
|
+
* Update your bundle (<tt>Gemfile.lock</tt>).
|
54
|
+
* Execute Rake task <tt>test</tt>.
|
55
|
+
* Tip: You can define your own test tasks tied to this. Eg:
|
56
|
+
```ruby
|
57
|
+
desc "Run RSpec"
|
58
|
+
task :rspec do
|
59
|
+
sh 'bundle exec rspec'
|
60
|
+
end
|
61
|
+
task test: [:rspec]
|
62
|
+
```
|
63
|
+
* Build your <tt>.gem</tt>.
|
64
|
+
* Publish it to https://rubygems.org/.
|
65
|
+
|
66
|
+
## Documentation
|
67
|
+
|
68
|
+
Documentation is provided via RDoc. The easiest way to read it:
|
69
|
+
```
|
70
|
+
gem install --rdoc gem_polisher
|
71
|
+
gem install bdoc
|
72
|
+
bdoc
|
73
|
+
```
|
74
|
+
You can read it with <tt>ri</tt> also, of course.
|
data/lib/gem_polisher/version.rb
CHANGED