pronto 0.1.4 → 0.1.5

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: 85dc0a7bada137f7afa7bcebe1c07ea768cee9c7
4
- data.tar.gz: b6448d7d62c19197b5480e6b02d37e7ff5329a74
3
+ metadata.gz: a66e654e1708c5c4fcf6413076a2c042e9dd7225
4
+ data.tar.gz: 73fa54051809d970a117bf7e9cfdf811439bdf73
5
5
  SHA512:
6
- metadata.gz: 19a811421795f9d684e768342d875267a91152dbc1a1182a18c697788d5cbb92fec73a6454d80af1b2d7021123a749682cc92d7c22c6cbbd2c7eb57bfb29bc93
7
- data.tar.gz: 1e048107685ea2175ce0d753823813c689932d4c8ebc7415cd429cd8a9d4a3e6afc68167db40e2db747cddfa606be8496cd4b4de0adaf782c8b459f4b15acc00
6
+ metadata.gz: 5c9c1e1839d66d7712b408f9b5aafdce9a0a03ceff4c88c3688a56a037fe83bddb7b21d2095c40ac0601ea41a1425b3a4c7c71949b0a19567cb7c827e332e822
7
+ data.tar.gz: 75cac8fa3d9f50baf3cde10d4ab61df15d8a1b6808442e16cd073ef3244629cddf70630d1e2412d5ac68ad52cff72ae8fd5d0813417c451219a2255d1405f023
data/README.md CHANGED
@@ -52,3 +52,4 @@ Currently available runners:
52
52
 
53
53
  * [pronto-rubocop](https://github.com/mmozuras/pronto-rubocop)
54
54
  * [pronto-flay](https://github.com/mmozuras/pronto-flay)
55
+ * [pronto-brakeman](https://github.com/mmozuras/pronto-brakeman)
data/lib/pronto/cli.rb CHANGED
@@ -9,9 +9,9 @@ module Pronto
9
9
 
10
10
  method_option :commit,
11
11
  type: :string,
12
- default: nil,
12
+ default: 'master',
13
13
  aliases: '-c',
14
- banner: 'Commit for the diff, defaults to master'
14
+ banner: 'Commit for the diff'
15
15
 
16
16
  method_option :runner,
17
17
  type: :array,
@@ -21,10 +21,9 @@ module Pronto
21
21
 
22
22
  method_option :formatter,
23
23
  type: :string,
24
- default: nil,
24
+ default: 'text',
25
25
  aliases: '-f',
26
- banner: "Formatter, defaults to text.
27
- Available: #{::Pronto::Formatter.names.join(', ')}"
26
+ banner: "Pick output formatter. Available: #{::Pronto::Formatter.names.join(', ')}"
28
27
 
29
28
  def exec
30
29
  gem_names = options[:runner].any? ? options[:runner] : ::Pronto.gem_names
@@ -1,3 +1,5 @@
1
+ require 'pathname'
2
+
1
3
  module Rugged
2
4
  class Diff
3
5
  class Delta
@@ -4,7 +4,7 @@ module Rugged
4
4
  class Repository
5
5
  def blame(filepath)
6
6
  # TODO: Using grit blame implementation for now.
7
- # Replace it with rugged implementation when it's available.
7
+ # Replace it with Rugged implementation when it's available.
8
8
  ::Grit::Repo.new(path).blame(filepath)
9
9
  end
10
10
  end
@@ -1,3 +1,3 @@
1
1
  module Pronto
2
- VERSION = '0.1.4'
2
+ VERSION = '0.1.5'
3
3
  end
data/lib/pronto.rb CHANGED
@@ -46,7 +46,8 @@ module Pronto
46
46
  def self.diff(repo_path, commit)
47
47
  repo = Rugged::Repository.new(repo_path)
48
48
  commit ||= 'master'
49
- repo.diff(commit, repo.head.target)
49
+ merge_base = repo.merge_base(commit, repo.head.target)
50
+ repo.diff(merge_base, repo.head.target)
50
51
  end
51
52
 
52
53
  def self.run_all_runners(patches)
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: pronto
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.4
4
+ version: 0.1.5
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-06 00:00:00.000000000 Z
11
+ date: 2013-10-07 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rugged
@@ -108,6 +108,20 @@ dependencies:
108
108
  - - ~>
109
109
  - !ruby/object:Gem::Version
110
110
  version: 0.1.0
111
+ - !ruby/object:Gem::Dependency
112
+ name: pronto-flay
113
+ requirement: !ruby/object:Gem::Requirement
114
+ requirements:
115
+ - - ~>
116
+ - !ruby/object:Gem::Version
117
+ version: 0.1.0
118
+ type: :development
119
+ prerelease: false
120
+ version_requirements: !ruby/object:Gem::Requirement
121
+ requirements:
122
+ - - ~>
123
+ - !ruby/object:Gem::Version
124
+ version: 0.1.0
111
125
  description:
112
126
  email: mindaugas.mozuras@gmail.com
113
127
  executables: