codeclimate-test-reporter 0.4.4 → 0.4.5

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: 3bed6228fe161d03c73b8d3d0d69e1301eef2b98
4
- data.tar.gz: 36a78e13714fa12f09b77218bdf4953fd14b5db4
3
+ metadata.gz: 22d029fe509088ab5ffbcce0d1a1202a495fa24e
4
+ data.tar.gz: b34685362aea43b419ef122cdbd2eade83cc386a
5
5
  SHA512:
6
- metadata.gz: 6944ca55c721bc3a9f82c025221ccb7fa19131f5b98c08822a13e8c023a7187b546fb8b949cf9b3501e93911bf79ef23a5919ffc48246ce7bdf92ca1c5945689
7
- data.tar.gz: dc78b6e64d0cf4f8aaf76b5b6cff53e97c58513e8c2abdfe658d286cc92cb5c236e9e89a7c69084f25851c1304e82ad8c066a49ae8d7076af7343ac62ca0884b
6
+ metadata.gz: 51a86e51b0c27fedbe4a0b58f841aa51f2a4dae0a46032c2d9aeebd6a97a351ecbd60a973d02029956d425d125dcd0b0dfee519b713d746bf7d5714ab4aeff19
7
+ data.tar.gz: 7d3918264d16672122d763e8a6b988278289897d9ddad831f9f92a57f8a3f5062c87a2f4ed263c15d5eefb8e0027e1c40664a8fd8e407261d2a8336d745ff024
data/README.md CHANGED
@@ -46,6 +46,17 @@ end
46
46
  CodeClimate::TestReporter.start
47
47
  ```
48
48
 
49
+ Another example for when your Rails application root is not at the root of the git repository root
50
+
51
+ ```ruby
52
+ CodeClimate::TestReporter.configure do |config|
53
+ config.path_prefix = "app_root" #the root of your Rails application relative to the repository root
54
+ config.git_dir = "../" #the relative or absolute location of your git root compared to where your tests are run
55
+ end
56
+
57
+ CodeClimate::TestReporter.start
58
+ ```
59
+
49
60
  ## Extending Simplecov with other formatters
50
61
 
51
62
  Since ruby-test-reporter 0.4.0 you can use `CodeClimate::TestReporter::Formatter` as a Simplecov formatter directly. Just add the formatter to your Simplecov formatter in addition to the rest of your configuration:
@@ -19,7 +19,7 @@ module CodeClimate
19
19
  end
20
20
 
21
21
  class Configuration
22
- attr_accessor :branch, :logger, :profile, :path_prefix, :gzip_request
22
+ attr_accessor :branch, :logger, :profile, :path_prefix, :gzip_request, :git_dir
23
23
 
24
24
  def initialize
25
25
  @gzip_request = true
@@ -49,7 +49,15 @@ module CodeClimate
49
49
  end
50
50
 
51
51
  def git_dir
52
- defined?(Rails) ? Rails.root : '.'
52
+ return CodeClimate::TestReporter.configuration.git_dir unless CodeClimate::TestReporter.configuration.git_dir.nil?
53
+
54
+ root = "."
55
+
56
+ if defined?(Rails) && File.directory?(File.expand_path(".git", Rails.root))
57
+ root = Rails.root
58
+ end
59
+
60
+ root
53
61
  end
54
62
  end
55
63
  end
@@ -1,5 +1,5 @@
1
1
  module CodeClimate
2
2
  module TestReporter
3
- VERSION = "0.4.4"
3
+ VERSION = "0.4.5"
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: codeclimate-test-reporter
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.4
4
+ version: 0.4.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Bryan Helmkamp
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-12-30 00:00:00.000000000 Z
11
+ date: 2015-01-07 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: simplecov