amusing_git 0.0.1 → 0.0.2
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/lib/amusing_git/cli.rb +7 -1
- data/lib/amusing_git/git/git_hook.rb +1 -1
- data/lib/amusing_git/setup.rb +4 -6
- data/lib/amusing_git/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: 27e4c21e267997e5114f2510a699eff927100a5d
|
|
4
|
+
data.tar.gz: aa324d0f29bae51e99bfe5a1d307b207df379e81
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: a696b83a8437a5053a7687c9789a36a6c3309b10242d9c8a12824f2e39e60ff77cdccd92e544c9bc135ae85f5d435914fc990668daf320059aa6ce68125a100c
|
|
7
|
+
data.tar.gz: 60f22d5c3f3b609a32bac3bffa745e6088edf45e0db3f61acdc20cd289c60ac29260b551f6e9b5e8227f410966adc316f0f09edb5354358690bbb87efbbe4a2e
|
data/lib/amusing_git/cli.rb
CHANGED
|
@@ -18,7 +18,13 @@ module AmusingGit
|
|
|
18
18
|
amuser.stop_amusing Dir.pwd
|
|
19
19
|
end
|
|
20
20
|
|
|
21
|
-
desc "amuse", "Print random messsage from configured messages"
|
|
21
|
+
desc "amuse", "Print random messsage from configured messages, use `amusing_git help amuse` to know how to add your own messages"
|
|
22
|
+
long_desc <<-LONGDESC
|
|
23
|
+
`amusing_git amuse` will print a random message from the configured messages
|
|
24
|
+
|
|
25
|
+
You can modify the configured messages. All the amusing_git config is present
|
|
26
|
+
inside $HOME/.amusing_git directory
|
|
27
|
+
LONGDESC
|
|
22
28
|
def amuse
|
|
23
29
|
maybe_setup_amusing_git
|
|
24
30
|
amuser.amuse
|
data/lib/amusing_git/setup.rb
CHANGED
|
@@ -29,17 +29,15 @@ module AmusingGit
|
|
|
29
29
|
end
|
|
30
30
|
|
|
31
31
|
def write_config
|
|
32
|
-
File.open(
|
|
32
|
+
File.open("#{ENV['HOME']}/.amusing_git/config", "w") do |f|
|
|
33
33
|
f.write(JSON.pretty_generate(config))
|
|
34
34
|
end
|
|
35
35
|
end
|
|
36
36
|
|
|
37
37
|
def copy_messages
|
|
38
|
-
File.open("#{ENV['HOME']}/.amusing_git/default_messages", 'w')
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
def config_file
|
|
42
|
-
File.new("#{ENV['HOME']}/.amusing_git/config", "w")
|
|
38
|
+
File.open("#{ENV['HOME']}/.amusing_git/default_messages", 'w') do |f|
|
|
39
|
+
f.write(AmusingGit::MessageSeeder.seed)
|
|
40
|
+
end
|
|
43
41
|
end
|
|
44
42
|
|
|
45
43
|
def config
|
data/lib/amusing_git/version.rb
CHANGED