dev_commands 0.0.11 → 0.0.12

Sign up to get free protection for your applications and to get access to all the features.
Files changed (3) hide show
  1. checksums.yaml +4 -4
  2. data/lib/commit.rb +10 -2
  3. metadata +1 -1
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: bc46c831f6d378f8e4f8636404710d3145bd6fc8
4
- data.tar.gz: 7e16338ba218e784ca7f2f530b0e76fc295e1817
3
+ metadata.gz: 5c08fc6ed7b442bb74a84d2792336718a0a927ff
4
+ data.tar.gz: ad1b738ef603f275b5833bb4162a128340bed20a
5
5
  SHA512:
6
- metadata.gz: bf0334fabafa3815a761b7f945b21e6344d38dfa29a0530c6e7a94e7c58763e34e480a8b009da064f621941211e4fd92335b23fe72b9f3183501663f2a7c5dc2
7
- data.tar.gz: b3cf64cfaee150f851c0c17332c82f452c37a55389255a9a0806050a8665a6d34386afbe112bfdda57b420069bd4b344c0800af75e25a3e60cea154c10ded389
6
+ metadata.gz: e51e506cc87a5c39e00cea94458056927fe6ee116de117033e89cc91afad5af844815d97fac873f4a2cd32c6042ec1fd8de69d88950893100c23b5b2363c2f5e
7
+ data.tar.gz: 97b257eb8ba5d9b3958bd4beea79d63520c52262a09bca90f30572273be00f117033e40a12e58e753f849dd9c70c1dd417eaf2fd56a11b56e20d99490c1c5986
@@ -1,7 +1,15 @@
1
1
  class Commit < Array
2
2
  def update
3
- if(File.exists?('.git'))
4
- add "git commit -m'all'"
3
+ if(File.exists?('.git') && `git config --list`.include?('user.name='))
4
+ if(!`git status`.include?('nothing to commit') &&
5
+ !`git status`.include?('untracked files present'))
6
+ if(File.exists?('commit.message') && File.read('commit.message').gsub(/\s+/,"").length >0)
7
+ add "git commit -a -v -m \"#{File.read('commit.message')}\""
8
+ else
9
+ add "git commit -m'all'"
10
+ end
11
+ add "<%FileUtils.rm('commit.message')%>" if File.exists?('commit.message')
12
+ end
5
13
  end
6
14
  end
7
15
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: dev_commands
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.11
4
+ version: 0.0.12
5
5
  platform: ruby
6
6
  authors:
7
7
  - Lou Parslow