quick-rspec 0.1.5 → 0.1.6

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: a1543be30abba1ad1f47926a4c048a209f3c5a9b
4
- data.tar.gz: 5761bb6ba885f7d46afb8c31d7db3744db95183c
3
+ metadata.gz: 0926689cfba3bd0dc113fa7319370f996fa960a7
4
+ data.tar.gz: 262e4b4a5adba0b394f4f679c69bb1f56cbf1ba1
5
5
  SHA512:
6
- metadata.gz: e5ae715a5e53d8c5f461c9ca77bdc85b27e538a08d00b6acd1fd103ca4b6d469e4f0cb4c5e147146db9a655ecacb9bc55b122898b1dbafcf95df23a57f8c394c
7
- data.tar.gz: 20db3089a64739cdfe88aa3c3b12804fbd4b86d64cc8b50c6ec632f79f135477c61603545717c18f44bd8bd20b98baccb38ca0ee0f28829eb881ea78515bbf4e
6
+ metadata.gz: af8139073a92b653c570f129166ad0556b7b26dda16defe2b2ae904cf7a333b14c1d0fb6044135b100362b2549d2df415ecf6a66cb57238b8fbb2c48b532bf32
7
+ data.tar.gz: 80b5cf2db8b0bef2b272a5c96e71527db656d753c21a2cc710d61d17d6d704c1788894634f68dbaca9ff483c6c769f2d18ba69be3d83542110efe2dbd425a9c1
data/lib/quick-rspec.rb CHANGED
@@ -51,10 +51,10 @@ class QuickRspec < Rails::Railtie
51
51
  def load_stats
52
52
  @@coverage = begin
53
53
  JSON.parse(File.read(Rails.root.join('tmp/quick_rspec.new.json')))
54
- rescue Errno::ENOENT
54
+ rescue Errno::ENOENT, JSON::ParserError
55
55
  begin
56
56
  JSON.parse(File.read(Rails.root.join('tmp/quick_rspec.json')))
57
- rescue Errno::ENOENT
57
+ rescue Errno::ENOENT, JSON::ParserError
58
58
  {}
59
59
  end
60
60
  end
@@ -66,6 +66,8 @@ class QuickRspec < Rails::Railtie
66
66
  new_coverage.each do |spec, coverage|
67
67
  @@coverage[spec] = coverage
68
68
  end
69
+ dir = Rails.root.join('tmp')
70
+ FileUtils.mkdir_p(dir) unless File.directory?(dir)
69
71
  File.open(Rails.root.join('tmp/quick_rspec.new.json'), 'w+') do |f|
70
72
  f.write @@coverage.to_json
71
73
  end
data/quick-rspec.gemspec CHANGED
@@ -5,7 +5,7 @@ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
5
5
  Gem::Specification.new do |spec|
6
6
  spec.required_ruby_version = '>= 2.3'
7
7
  spec.name = "quick-rspec"
8
- spec.version = "0.1.5"
8
+ spec.version = "0.1.6"
9
9
  spec.authors = ["Dmitry Silchenko"]
10
10
  spec.email = ["dmitry@desofto.com"]
11
11
 
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: quick-rspec
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.5
4
+ version: 0.1.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - Dmitry Silchenko
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2017-04-04 00:00:00.000000000 Z
11
+ date: 2017-04-05 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler