githelp 0.1.2 → 0.1.3
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.
- checksums.yaml +4 -4
- data/README-gem.md +41 -0
- data/README.md +59 -21
- data/exe/githelp-changed +3 -6
- data/exe/githelp-unchanged +3 -5
- data/lib/githelp/version.rb +1 -1
- metadata +3 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 2ae34b6dff910ff07f8bce378c54a36b9577e7ac
|
4
|
+
data.tar.gz: 373bd1ad1df3196d5f03bd83179a9a26385c3951
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 268667e02e34302a0b1b115cd2cb53d4f4a7b71619af84876d399a0377d507ee775d71cbcbf1f7117bc0ff661ddfcaad18ee1e5a34b7541aedfedc7f299861c3
|
7
|
+
data.tar.gz: 16700527a1ee421a41e128c895e2a9e8c3ea54308140c8378ef4843e4a5eba938e41b45c524305aa897117ffba2ace120ff4d527090fbfeeb5d2a5a6a1328923
|
data/README-gem.md
ADDED
@@ -0,0 +1,41 @@
|
|
1
|
+
# Githelp
|
2
|
+
|
3
|
+
Welcome to your new gem! In this directory, you'll find the files you need to be able to package up your Ruby library into a gem. Put your Ruby code in the file `lib/githelp`. To experiment with that code, run `bin/console` for an interactive prompt.
|
4
|
+
|
5
|
+
TODO: Delete this and the text above, and describe your gem
|
6
|
+
|
7
|
+
## Installation
|
8
|
+
|
9
|
+
Add this line to your application's Gemfile:
|
10
|
+
|
11
|
+
```ruby
|
12
|
+
gem 'githelp'
|
13
|
+
```
|
14
|
+
|
15
|
+
And then execute:
|
16
|
+
|
17
|
+
$ bundle
|
18
|
+
|
19
|
+
Or install it yourself as:
|
20
|
+
|
21
|
+
$ gem install githelp
|
22
|
+
|
23
|
+
## Usage
|
24
|
+
|
25
|
+
TODO: Write usage instructions here
|
26
|
+
|
27
|
+
## Development
|
28
|
+
|
29
|
+
After checking out the repo, run `bin/setup` to install dependencies. Then, run `rake test` to run the tests. You can also run `bin/console` for an interactive prompt that will allow you to experiment.
|
30
|
+
|
31
|
+
To install this gem onto your local machine, run `bundle exec rake install`. To release a new version, update the version number in `version.rb`, and then run `bundle exec rake release`, which will create a git tag for the version, push git commits and tags, and push the `.gem` file to [rubygems.org](https://rubygems.org).
|
32
|
+
|
33
|
+
## Contributing
|
34
|
+
|
35
|
+
Bug reports and pull requests are welcome on GitHub at https://github.com/[USERNAME]/githelp.
|
36
|
+
|
37
|
+
|
38
|
+
## License
|
39
|
+
|
40
|
+
The gem is available as open source under the terms of the [MIT License](http://opensource.org/licenses/MIT).
|
41
|
+
|
data/README.md
CHANGED
@@ -1,41 +1,79 @@
|
|
1
|
-
#
|
1
|
+
# GitHelp
|
2
2
|
|
3
|
-
|
3
|
+
**Gitのコマンドの使いこなしを支援する**
|
4
4
|
|
5
|
-
|
5
|
+
### 解決したい問題
|
6
6
|
|
7
|
-
|
7
|
+
* Gitの使い方や引数指定方法がさっぱりわからないこと
|
8
|
+
* ちょっとしたことでもどうコマンドを組み合わせれば良いのかわからないこと
|
8
9
|
|
9
|
-
|
10
|
+
以下のような処理をGitでどうやって実行するかを教えてくれる
|
10
11
|
|
11
|
-
|
12
|
-
|
13
|
-
|
12
|
+
* example.txtは3日前からどう変わった?
|
13
|
+
* 3日前のexample.txtを見たい
|
14
|
+
* package.jsonからcoffeeという名前が消えたのはいつ?
|
15
|
+
* ここ1週間ぐらい変更されてないファイルは?
|
16
|
+
* 最近最も大量に修正したファイルはどれだっけ?
|
17
|
+
|
18
|
+
### 利用例
|
14
19
|
|
15
|
-
|
20
|
+
* ```README``` ```8``` ```比較``` のような引数を指定して```githelp```コマンドを起動すると以下のような候補が提示される
|
16
21
|
|
17
|
-
|
22
|
+
```
|
23
|
+
$ githelp README 8 比較
|
24
|
+
[0] 「README.md」ファイルを8分前のものと比較する
|
25
|
+
% git diff HEAD "@{8 minutes ago}" README.md
|
26
|
+
[1] 「README.md」ファイルを8時間前のものと比較する
|
27
|
+
% git diff HEAD "@{8 hours ago}" README.md
|
28
|
+
[2] 「README.md」ファイルを8日前のものと比較する
|
29
|
+
% git diff HEAD "@{8 days ago}" README.md
|
30
|
+
$
|
31
|
+
```
|
18
32
|
|
19
|
-
|
33
|
+
* ```-x``` オプションで数字を指定すると実行できる
|
20
34
|
|
21
|
-
$ gem install githelp
|
22
35
|
|
23
|
-
|
36
|
+
```
|
37
|
+
$ githelp README 8 比較 -x2
|
38
|
+
diff --git a/README.md b/README.md
|
39
|
+
index 862f185..34c8907 100644
|
40
|
+
--- a/README.md
|
41
|
+
+++ b/README.md
|
42
|
+
@@ -1,90 +1,3 @@
|
43
|
+
# GitHelp
|
44
|
+
|
45
|
+
-**Gitのコマンドの使いこなしを支援する**
|
46
|
+
-
|
47
|
+
-### 解決したい問題
|
48
|
+
-
|
49
|
+
-* Gitの使い方や引数指定方法がさっぱりわからないこと
|
50
|
+
-* ちょっとしたことでもどうコマンドを組み合わせれば良いのかわからないこと
|
51
|
+
...
|
52
|
+
```
|
24
53
|
|
25
|
-
|
54
|
+
* ```-i``` オプションを指定すると対話的に選択できる
|
55
|
+
* 引数なしで```githelp```を起動するとリストが表示される
|
26
56
|
|
27
|
-
## Development
|
28
57
|
|
29
|
-
|
58
|
+
### 実装
|
30
59
|
|
31
|
-
|
60
|
+
* [ExpandHelp](https://github.com/masui/expand_ruby)を利用
|
61
|
+
* [ExpandHelp論文](http://www.interaction-ipsj.org/archives/paper2012/data/Interaction2012/oral/data/pdf/12INT012.pdf)
|
62
|
+
* [```data```](https://github.com/masui/GitHelp/tree/master/data)ディレクトリの下に問題パタンと解決コマンドを書く
|
63
|
+
* ワンライナーで無理な場合は ```bin``` の下にコマンドを用意する
|
32
64
|
|
33
|
-
|
65
|
+
### インストール
|
34
66
|
|
35
|
-
|
67
|
+
```
|
68
|
+
% gem install githelp
|
69
|
+
```
|
36
70
|
|
71
|
+
### お願い
|
37
72
|
|
38
|
-
|
73
|
+
データが全然足りないので、こういうのを足せという情報があればお願いいたします。
|
39
74
|
|
40
|
-
|
75
|
+
### 考察とか
|
41
76
|
|
77
|
+
* Siriみたいなのでやるのがトレンドな気もするが、自分が何をやりたいのかはっきりわかってない場合でも使えるし、正しいセンテンスを指定する必要もないから楽だと思う
|
78
|
+
* ```githelp 削除``` とか言えば何ができるのかわかる
|
79
|
+
* もちろんこのやり方はGit以外でも有効である
|
data/exe/githelp-changed
CHANGED
@@ -1,12 +1,9 @@
|
|
1
1
|
#!/usr/bin/env ruby
|
2
2
|
# coding: utf-8
|
3
3
|
|
4
|
-
|
5
|
-
|
6
|
-
progdir = "#{File.dirname(progpath)}"
|
4
|
+
require "bundler/setup"
|
5
|
+
require "githelp"
|
7
6
|
|
8
|
-
|
9
|
-
require "#{progdir}/../lib/args"
|
10
|
-
require "#{progdir}/../lib/changes"
|
7
|
+
include Githelp
|
11
8
|
|
12
9
|
puts changed(ARGV[0])
|
data/exe/githelp-unchanged
CHANGED
@@ -1,11 +1,9 @@
|
|
1
1
|
#!/usr/bin/env ruby
|
2
2
|
# coding: utf-8
|
3
3
|
|
4
|
-
|
5
|
-
|
6
|
-
progdir = "#{File.dirname(progpath)}"
|
4
|
+
require "bundler/setup"
|
5
|
+
require "githelp"
|
7
6
|
|
8
|
-
|
9
|
-
require "#{progdir}/../lib/changes"
|
7
|
+
include Githelp
|
10
8
|
|
11
9
|
puts unchanged(ARGV[0])
|
data/lib/githelp/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: githelp
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Toshiyuki Masui
|
@@ -81,6 +81,7 @@ files:
|
|
81
81
|
- Gemfile
|
82
82
|
- LICENSE.txt
|
83
83
|
- Makefile
|
84
|
+
- README-gem.md
|
84
85
|
- README.md
|
85
86
|
- Rakefile
|
86
87
|
- data.txt
|
@@ -144,7 +145,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
144
145
|
version: '0'
|
145
146
|
requirements: []
|
146
147
|
rubyforge_project:
|
147
|
-
rubygems_version: 2.
|
148
|
+
rubygems_version: 2.5.1
|
148
149
|
signing_key:
|
149
150
|
specification_version: 4
|
150
151
|
summary: GitHelp - long summary
|