emoji-commit 1.0.1 → 1.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: 5770b8641d5fad72336d762786bfce51e6430a27
4
- data.tar.gz: dc4870f46fe7ba1488c8288bcb49fd539b2acc79
3
+ metadata.gz: 31ffaaf1576e1c772b2d860394f2e09971190845
4
+ data.tar.gz: 5e6e35cae299c2869189ee3861d80b414a309741
5
5
  SHA512:
6
- metadata.gz: 807b4cb629818154c3c308a397407036bd7865c4d3369e4e6ac9a6eaf7011298c2992c74b21d0ae55c47cd9bbbef795e1f1316cddcc408fbc52b1177d436afdf
7
- data.tar.gz: acfd102d86e5751384474a5999644440d25549b2c10c5525487b30c30e3a761891ee44c8c8388874ad9c1ec7030482f8e7ba0013ab4ce0c118a427599cb43060
6
+ metadata.gz: 7c6d355d269246f98193b68c0330b4f81a728f69650b98942c329ee171b06939f7c4d1d67db27ef26208d2d2094ea1cf21bc1fbea049737ae87b52e37f73e8b6
7
+ data.tar.gz: 2de6f08554e67c89334d606ec21c626c85852a0737949315a0d89a1bfc4470daa80c3b7d57695ce3980dff7033ef05a6d7ea66131e13cddb1b0fee4d114a4662
data/README.md CHANGED
@@ -14,29 +14,33 @@ The gem installs a special commit hook script in a repo of your choosing.
14
14
 
15
15
  Make sure you're in the root directory of a Git initialised repo (it will have the `.git` hidden folder in it, check it's there with `ls -a`). Then execute:
16
16
 
17
- `$ emoji install`
17
+ ```shell
18
+ $ emoji install
19
+ ```
18
20
 
19
21
  It will prompt to confirm you want to install, hit `y`. Now every time you write a commit message, a random emoji from [this](http://www.emoji-cheat-sheet.com/) list will be prefixed to it.
20
22
 
21
- `$ git commit -m 'Some boring message'`
23
+ `$ git commit -m 'Some boring message'`
22
24
 
23
25
  Will be added to your repo as:
24
26
 
25
- `:kimono: Some boring message`
27
+ `:kimono: Some boring message`
26
28
  :kimono: Some boring message
27
29
 
28
30
  Or:
29
31
 
30
- `:sheep: Some boring message`
32
+ `:sheep: Some boring message`
31
33
  :sheep: Some boring message
32
34
 
33
35
  Or even:
34
36
 
35
- `:lock_with_ink_pen: Some boring message`
37
+ `:lock_with_ink_pen: Some boring message`
36
38
  :lock_with_ink_pen: Some boring message
37
39
 
38
40
  It is random after all.
39
41
 
42
+ If your message already begins with an emoji in the format `:foobar:` then this won't be overwritten.
43
+
40
44
  ## Development
41
45
 
42
46
  After checking out the repo, run `bin/setup` to install dependencies. Then, run `rake spec` to run the tests. You can also run `bin/console` for an interactive prompt that will allow you to experiment.
@@ -47,7 +51,6 @@ To install this gem onto your local machine, run `bundle exec rake install`. To
47
51
 
48
52
  Bug reports and pull requests are welcome on GitHub at https://github.com/claireparker/emoji-commit.
49
53
 
50
-
51
54
  ## License
52
55
 
53
56
  The gem is available as open source under the terms of the [MIT License](http://opensource.org/licenses/MIT).
data/TODO.md CHANGED
@@ -1,7 +1,9 @@
1
- ### Before release
1
+ ### TODO
2
+
3
+ Pull requests welcome
2
4
 
3
5
  * ~~Get rid of warnings on fileutils~~
4
- * Readme
6
+ * ~~Readme~~
5
7
  * ~~Add more specs for emoji_exists regex~~
6
8
  * ~~Add specs for get_emoji~~
7
9
  * ~~Rename emoji-commit-msg class and methods~~
@@ -13,9 +15,6 @@
13
15
  * Test all bundle exec Thor stuff
14
16
  * Check Fileutils.cp is OK if file already exists
15
17
  * Add a rescue in to file-tasks
16
-
17
- ### Next version
18
-
19
18
  * Can you do skin tone modifiers in Git emojis?
20
19
  * Add support for this if yes
21
20
  * Prompt user through install
@@ -10,7 +10,7 @@ Gem::Specification.new do |spec|
10
10
  spec.email = ['claire.parker87@gmail.com']
11
11
 
12
12
  spec.summary = %q(Adds an emoji to your commit message)
13
- spec.description = %q(Prefixes Git commit messages with a random Git-friendly emoji.)
13
+ spec.description = %q(Prefixes Git commit messages with a random GitHub-friendly emoji.)
14
14
  spec.homepage = 'https://github.com/claireparker/emoji-commit'
15
15
  spec.license = 'MIT'
16
16
 
@@ -2,7 +2,7 @@
2
2
  require 'json'
3
3
 
4
4
  module EmojiCommit
5
- class EmojiCommitMsg
5
+ class Msg
6
6
  attr_accessor :msg_file
7
7
 
8
8
  def initialize(file)
@@ -1,3 +1,3 @@
1
1
  module EmojiCommit
2
- VERSION = "1.0.1"
2
+ VERSION = "1.0.2"
3
3
  end
@@ -1,4 +1,4 @@
1
1
  #!/usr/bin/ruby
2
2
  require 'emoji-commit-msg'
3
3
 
4
- EmojiCommit::EmojiCommitMsg.new(ARGV[0]).edit_commit_msg
4
+ EmojiCommit::Msg.new(ARGV[0]).edit_commit_msg
@@ -14,13 +14,17 @@ module EmojiCommit
14
14
 
15
15
  puts 'You are about to overwrite any existing Git commit hook with the emoji script'
16
16
  puts 'Is that OK? (y|n)'
17
+
17
18
  answer = STDIN.gets.strip.downcase
19
+
18
20
  if answer == 'n'
19
21
  puts 'Fine whatever. Bye'
20
22
  exit
21
23
  elsif answer != 'y'
22
24
  puts 'Pardon? Oh who cares. Bye'
23
25
  exit
26
+ else
27
+ puts 'Great, installing into .git/hooks'
24
28
  end
25
29
 
26
30
  if File.exist?('.git/hooks/commit-msg') then FileUtils.rm('.git/hooks/commit-msg') end
@@ -33,6 +37,7 @@ module EmojiCommit
33
37
  FileUtils.cp(path + '/commit-msg', '.git/hooks/commit-msg')
34
38
  FileUtils.cp(path + '/assets/emojis.json', '.git/hooks/emojis.json')
35
39
  FileUtils.chmod 0755, %w(.git/hooks/emoji-script.rb .git/hooks/emoji-commit-msg.rb .git/hooks/commit-msg .git/hooks/emojis.json)
40
+
36
41
  puts 'Installed scripts successfully. Commit emoji-ful messages!'
37
42
  end
38
43
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: emoji-commit
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.1
4
+ version: 1.0.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Claire Parker
@@ -66,7 +66,7 @@ dependencies:
66
66
  - - '>='
67
67
  - !ruby/object:Gem::Version
68
68
  version: '0'
69
- description: Prefixes Git commit messages with a random Git-friendly emoji.
69
+ description: Prefixes Git commit messages with a random GitHub-friendly emoji.
70
70
  email:
71
71
  - claire.parker87@gmail.com
72
72
  executables: