rusky 0.2.1 → 0.2.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +18 -1
- data/exe/rusky +4 -0
- data/lib/rusky.rb +1 -0
- data/lib/rusky/cli.rb +24 -0
- data/lib/rusky/version.rb +1 -1
- data/rusky.gemspec +1 -0
- metadata +20 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: a00a714408281d031099446610b64c09660f508b
|
4
|
+
data.tar.gz: fba6ebd6126cb2381e0663143261f1af85f2355f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 07b16db70461073fbc0791f5476aa81ec92b89e23477d3165b49820216bdbe7f8f0858ee6246ce526b7f1fe8cb3b87e4d6b1866380805626fa7afd561bae2fde
|
7
|
+
data.tar.gz: 84c6e65a3bc61ef46162fa58e12e20abbf5773674da0d2381ff210a0b415ef8fdecbd270cd44fa7c40fa1b590f4b1be6f5724dff4390e22c150007e486c753c1
|
data/README.md
CHANGED
@@ -30,7 +30,7 @@ After installation, Rusky automatically creates git hook scripts in `.git/hooks`
|
|
30
30
|
|
31
31
|
## Usage
|
32
32
|
|
33
|
-
1. Add the following lines into your Rakefile. It defines rake tasks to be executed on Git hook. The task names are `"rusky:#{git_hook_name}"`.
|
33
|
+
1. Add the following lines into your `Rakefile` (or [any other rake file](https://github.com/ruby/rake/blob/68ef9140c11d083d8bb7ee5da5b0543e3a7df73d/lib/rake/application.rb#L41-L46)). It defines rake tasks to be executed on Git hook. The task names are `"rusky:#{git_hook_name}"`.
|
34
34
|
|
35
35
|
```ruby
|
36
36
|
require "rusky/task"
|
@@ -47,6 +47,23 @@ pre-push:
|
|
47
47
|
- bundle exec rspec
|
48
48
|
```
|
49
49
|
|
50
|
+
### Manual installation
|
51
|
+
|
52
|
+
Although Rusky automatically creates necessary files, it provides CLI for (un)installation as well. It would be useful when you want to retry (un)install.
|
53
|
+
|
54
|
+
```console
|
55
|
+
rusky -h
|
56
|
+
Commands:
|
57
|
+
rusky help [COMMAND] # Describe available commands or one specific command
|
58
|
+
rusky install # Generate Git hooks and .rusky files
|
59
|
+
rusky uninstall # Remove files generated by rusky
|
60
|
+
rusky version # Show current version
|
61
|
+
|
62
|
+
Options:
|
63
|
+
-h, [--help], [--no-help] # Show help message.
|
64
|
+
-v, [--version], [--no-version] # Show current version
|
65
|
+
```
|
66
|
+
|
50
67
|
### Customizable callback rake task
|
51
68
|
|
52
69
|
You can write your own rake task as a callback of Git hook.
|
data/exe/rusky
ADDED
data/lib/rusky.rb
CHANGED
data/lib/rusky/cli.rb
ADDED
@@ -0,0 +1,24 @@
|
|
1
|
+
require 'rusky'
|
2
|
+
require 'thor'
|
3
|
+
|
4
|
+
module Rusky
|
5
|
+
class CLI < Thor
|
6
|
+
class_option :help, type: :boolean, aliases: '-h', desc: 'Show help message.'
|
7
|
+
class_option :version, type: :boolean, aliases: '-v', desc: 'Show current version'
|
8
|
+
|
9
|
+
desc "install", "Generate Git hooks and .rusky files"
|
10
|
+
def install
|
11
|
+
Rusky.install
|
12
|
+
end
|
13
|
+
|
14
|
+
desc "uninstall", "Remove files generated by rusky"
|
15
|
+
def uninstall
|
16
|
+
Rusky.uninstall
|
17
|
+
end
|
18
|
+
|
19
|
+
desc "version", "Show current version"
|
20
|
+
def version
|
21
|
+
puts Rusky::VERSION
|
22
|
+
end
|
23
|
+
end
|
24
|
+
end
|
data/lib/rusky/version.rb
CHANGED
data/rusky.gemspec
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rusky
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.
|
4
|
+
version: 0.2.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Masato Ohba
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2017-09-
|
11
|
+
date: 2017-09-09 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rake
|
@@ -24,6 +24,20 @@ dependencies:
|
|
24
24
|
- - ">="
|
25
25
|
- !ruby/object:Gem::Version
|
26
26
|
version: '0'
|
27
|
+
- !ruby/object:Gem::Dependency
|
28
|
+
name: thor
|
29
|
+
requirement: !ruby/object:Gem::Requirement
|
30
|
+
requirements:
|
31
|
+
- - ">="
|
32
|
+
- !ruby/object:Gem::Version
|
33
|
+
version: '0'
|
34
|
+
type: :runtime
|
35
|
+
prerelease: false
|
36
|
+
version_requirements: !ruby/object:Gem::Requirement
|
37
|
+
requirements:
|
38
|
+
- - ">="
|
39
|
+
- !ruby/object:Gem::Version
|
40
|
+
version: '0'
|
27
41
|
- !ruby/object:Gem::Dependency
|
28
42
|
name: bundler
|
29
43
|
requirement: !ruby/object:Gem::Requirement
|
@@ -69,7 +83,8 @@ dependencies:
|
|
69
83
|
description: Rusky helps you to manage Git hooks easily.
|
70
84
|
email:
|
71
85
|
- over.rye@gmail.com
|
72
|
-
executables:
|
86
|
+
executables:
|
87
|
+
- rusky
|
73
88
|
extensions: []
|
74
89
|
extra_rdoc_files: []
|
75
90
|
files:
|
@@ -82,8 +97,10 @@ files:
|
|
82
97
|
- Rakefile
|
83
98
|
- bin/console
|
84
99
|
- bin/setup
|
100
|
+
- exe/rusky
|
85
101
|
- lib/rubygems_plugin.rb
|
86
102
|
- lib/rusky.rb
|
103
|
+
- lib/rusky/cli.rb
|
87
104
|
- lib/rusky/task.rb
|
88
105
|
- lib/rusky/version.rb
|
89
106
|
- rusky.gemspec
|