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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: ebb244bba979ea95783388ddb3385b541ebcd8a7
4
- data.tar.gz: b2a840156c1e6defae8df5d6f7014b1dcd3492f4
3
+ metadata.gz: 27e4c21e267997e5114f2510a699eff927100a5d
4
+ data.tar.gz: aa324d0f29bae51e99bfe5a1d307b207df379e81
5
5
  SHA512:
6
- metadata.gz: e58a78ad0000b0f033fda86c4299321cf5343e52afc77780cd5ace99f879a7ce46c7a84ed01c984a7332901d9e42db681fe91c36977c60a84e5ba69cf164ab66
7
- data.tar.gz: 7486e1e6e705c74cb1bf53500022176ac395636d1dad06be6cf3513f6b2f4ea84cbb5122b66e7828ca53d57968202ebf777b90947e0a75c79776026976bd5fdb
6
+ metadata.gz: a696b83a8437a5053a7687c9789a36a6c3309b10242d9c8a12824f2e39e60ff77cdccd92e544c9bc135ae85f5d435914fc990668daf320059aa6ce68125a100c
7
+ data.tar.gz: 60f22d5c3f3b609a32bac3bffa745e6088edf45e0db3f61acdc20cd289c60ac29260b551f6e9b5e8227f410966adc316f0f09edb5354358690bbb87efbbe4a2e
@@ -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
@@ -10,7 +10,7 @@ module AmusingGit
10
10
 
11
11
  def create!
12
12
  `touch #{@hook_file}`
13
- `chmod +x #{@hook_file}`
13
+ `chmod 777 #{@hook_file}`
14
14
  end
15
15
 
16
16
  def configure_amusing_git!
@@ -29,17 +29,15 @@ module AmusingGit
29
29
  end
30
30
 
31
31
  def write_config
32
- File.open(config_file, "w") do |f|
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').write(AmusingGit::MessageSeeder.seed)
39
- end
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
@@ -1,3 +1,3 @@
1
1
  module AmusingGit
2
- VERSION = '0.0.1'
2
+ VERSION = '0.0.2'
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: amusing_git
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.1
4
+ version: 0.0.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ajit Singh