poper 0.0.1 → 0.0.2

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: b7153ad540eeef4da3f86fd9a67254ca040bc3eb
4
- data.tar.gz: 71a62ce9a84843f339e2a80d5fc925193252626d
3
+ metadata.gz: a9abd695f0fb3e1824c45c4979a2a9d3d72021e9
4
+ data.tar.gz: 6e2891f64e04be17af1e4ed5eb1a1ec53dbefb49
5
5
  SHA512:
6
- metadata.gz: 26e4417bd8841090135832e04e8162c896f7d25e8b92c088dc5843e346d56277af3adba03fbd7f2e797f092cd207953aae65d61e460a6d5b6cf387c93489bea7
7
- data.tar.gz: 9fa2595e63b97637797c83f1553270c437f8492946173496b1fd70e7ad76cfdd7b8062dff7625f135832a09b61083fa2540a0682bcf42179b34a302d5e950b9c
6
+ metadata.gz: 29155d2fb248dc20e7f907aeb9586699d1c1486fc6043f690e0bde1e98493cc0be5565d5a2cb9f99be1406a54fd5f323a53a6aeeecc57256546153a5491cd477
7
+ data.tar.gz: 0307cd1f8cc2c319d83704aba0ffdbc4eab30db81d251fccd4bed29da5f643925c8abb44b75eac5082382bab38489b6d66b5fd9929a7729b17414046b46c315b
data/README.md CHANGED
@@ -4,6 +4,7 @@ Poper makes sure that your git commit messages are well-formed
4
4
 
5
5
  [![Code Climate](https://codeclimate.com/github/mmozuras/poper.png)](https://codeclimate.com/github/mmozuras/poper)
6
6
  [![Build Status](https://travis-ci.org/mmozuras/poper.png)](https://travis-ci.org/mmozuras/poper)
7
+ [![Gem Version](https://badge.fury.io/rb/poper.png)](http://badge.fury.io/rb/poper)
7
8
  [![Dependency Status](https://gemnasium.com/mmozuras/poper.png)](https://gemnasium.com/mmozuras/poper)
8
9
 
9
10
  ## Usage
@@ -0,0 +1,14 @@
1
+ module Poper
2
+ module Rule
3
+ class Generic < Rule
4
+ MSG = 'Consider writing a more detailed, not as generic, commit summary'
5
+ GENERIC = %w(fix fixed fixes oops todo fixme commit changes hm hmm hmmm
6
+ test tests quickfix)
7
+
8
+ def check(message)
9
+ words = message.scan(/[\w-]+/).compact
10
+ MSG if words.all? { |word| GENERIC.include?(word.downcase) }
11
+ end
12
+ end
13
+ end
14
+ end
data/lib/poper/runner.rb CHANGED
@@ -4,7 +4,8 @@ module Poper
4
4
  class Runner
5
5
  def initialize(commit, repo_path = '.')
6
6
  @repo = Rugged::Repository.new(repo_path)
7
- @commit = @repo.lookup(commit)
7
+ merge_base = @repo.merge_base(commit, commit) # hack to make refs work
8
+ @commit = @repo.lookup(merge_base)
8
9
  end
9
10
 
10
11
  def run
data/lib/poper/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module Poper
2
- VERSION = '0.0.1'
2
+ VERSION = '0.0.2'
3
3
  end
data/lib/poper.rb CHANGED
@@ -5,4 +5,4 @@ require 'poper/rule/capitalization'
5
5
  require 'poper/rule/single_word'
6
6
  require 'poper/rule/fifty_char_summary'
7
7
  require 'poper/rule/seventy_two_char_limit'
8
- require 'poper/rule/banned'
8
+ require 'poper/rule/generic'
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: poper
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
  - Mindaugas Mozūras
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2013-10-16 00:00:00.000000000 Z
11
+ date: 2013-10-20 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rugged
@@ -74,9 +74,9 @@ extensions: []
74
74
  extra_rdoc_files: []
75
75
  files:
76
76
  - lib/poper/cli.rb
77
- - lib/poper/rule/banned.rb
78
77
  - lib/poper/rule/capitalization.rb
79
78
  - lib/poper/rule/fifty_char_summary.rb
79
+ - lib/poper/rule/generic.rb
80
80
  - lib/poper/rule/rule.rb
81
81
  - lib/poper/rule/seventy_two_char_limit.rb
82
82
  - lib/poper/rule/single_word.rb
@@ -1,12 +0,0 @@
1
- module Poper
2
- module Rule
3
- class Banned < Rule
4
- MSG = 'Consider writing a more detailed commit summary'
5
- BANNED = %w(fix fixed oops todo fixme commit changes hmm hmmm quickfix)
6
-
7
- def check(message)
8
- MSG if BANNED.include?(message.lines.first.strip.downcase)
9
- end
10
- end
11
- end
12
- end