dev 2.0.134 → 2.0.135

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/commands/commit.rb +15 -10
  3. metadata +1 -1
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: a676eddb8540f25d6658f16cff3b2135ae955c8c
4
- data.tar.gz: d0555ce2fb618a744573311d4a11217174021504
3
+ metadata.gz: 598d1305055fc2abb292607133eb8ce5b7a7d17b
4
+ data.tar.gz: cee1a91ecfe3766b194292a37ced5edf71a6e34f
5
5
  SHA512:
6
- metadata.gz: 78fa6f5f759cbe4a07a9043be50364c47c9701d7a5931851e71e7eba5cbf83c29feeb4e7d6984359816c3ee686caf64dcda50965954c57870c0dd51ad370a0d6
7
- data.tar.gz: 590a25b2bc7233584587eca29a81df880bbd89ae86bda1f5e0da11ee7c1a64747199f00dc3dfbef1b61781e4bdb2292ed6fe2ac188a3ee2ed74ac4efbd2d7455
6
+ metadata.gz: d89c1bdc0c38759104ed8e8e3048933ba5ad8216e1ca40131d8f04c90ac4a5bb5002d72e56fb86ca30660e822adc920cc0919d6cf0e1825717f6872960578a9d
7
+ data.tar.gz: 5f4f42ece0921f9d68dd8650329d7dfe9b67fc985f9f09456133c2318a6444a4a3d94e29988ee58dce2c30d75ebb1870483a8c39be347d9c020d3e93ec82cc47
@@ -2,24 +2,30 @@
2
2
 
3
3
  class Commit < Array
4
4
  def update
5
+ message=""
6
+ message=IO.read('commit.message').strip if File.exists?('commit.message')
7
+
5
8
  if(File.exists?('.git') && `git config --list`.include?('user.name='))
6
9
  if(!`git status`.include?('nothing to commit') &&
7
10
  !`git status`.include?('untracked files present'))
8
- if(File.exists?('commit.message') && File.read('commit.message').gsub(/\s+/,"").length >0)
9
- add "git commit -a -v -m \"#{File.read('commit.message')}\""
11
+ if(message.length==0)#File.exists?('commit.message') && File.read('commit.message').gsub(/\s+/,"").length >0)
12
+ if(defined?(REQUIRE_COMMIT_MESSAGE))
13
+ Commit.reset_commit_message
14
+ raise "commit.message required to perform commit"
15
+ else
16
+ add "git commit -m'all'"
17
+ end
10
18
  else
11
- add "git commit -m'all'"
19
+ #add "git commit -a -v -m \"#{File.read('commit.message')}\""
20
+ add "git commit -a -v --file commit.message"
21
+ add "<%Commit.reset_commit_message%>"
12
22
  end
13
- #add "<%FileUtils.rm('commit.message')%>" if File.exists?('commit.message')
14
- add "<%File.open('commit.message','w'){|f|f.write('')}%>"
23
+ # add "<%File.open('commit.message','w'){|f|f.write('')}%>"
15
24
  end
16
25
  end
17
26
  if(File.exists?('.svn'))
18
- message=""
19
- message=IO.read('commit.message').strip if File.exists?('commit.message')
20
- if(!File.exists?('commit.message') || message.length==0)
27
+ if(message.length==0)
21
28
  if(defined?(REQUIRE_COMMIT_MESSAGE))
22
- puts "commit.message required to perform commit"
23
29
  Commit.reset_commit_message
24
30
  raise "commit.message required to perform commit"
25
31
  else
@@ -28,7 +34,6 @@ class Commit < Array
28
34
  else
29
35
  add 'svn commit --file commit.message'
30
36
  add "<%Commit.reset_commit_message%>"
31
- #add "<%FileUtils.rm('commit.message')%>" if File.exists?('commit.message')
32
37
  end
33
38
  end
34
39
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: dev
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.0.134
4
+ version: 2.0.135
5
5
  platform: ruby
6
6
  authors:
7
7
  - Lou Parslow