active_mocker 2.1.0 → 2.1.1

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: 7cb66180d5ec42fc5a0971815560364088008ced
4
- data.tar.gz: 61b57337f4569854453c417d84323816995fc841
3
+ metadata.gz: c646df814c710d83b6f05e9600630c3ed824a563
4
+ data.tar.gz: cd0d8ff004f471ffef508643ce956660bf4a6491
5
5
  SHA512:
6
- metadata.gz: ee31dab1abe47dff3fd80b11fa28b5767008d04b1c3eb266feae2ecc486a7b4bd62eaf093d97cc6b85a6c09e2b25f59ebb706982146f69a6681f2f88c7f397ed
7
- data.tar.gz: 30ac184f5e8b5f42bc79ace88aaca7475a8cdd9a6c696d3aa11a51232a0b389365c0b1396eacc475fba916f87d5f29d09d6a044cb4cf841f71cc00346ad24269
6
+ metadata.gz: 2ae81ef35739bf6ac397c5ca5c59444a71517711c95d59a4ba37eeb31818946bdfcc6c896f2b34a425297f92ecacd71da5de03f1b0e0f0b4530407c86c2784d8
7
+ data.tar.gz: c2c169a9f87c20838f988385e7bcc6daa47510d4f072100c7fda6986394234c8cd68cdee1983fbe70fd187537e0de239f19ba6efff10473b3ce15a5465472892
@@ -1,7 +1,11 @@
1
1
  # Changelog
2
2
  All notable changes to this project will be documented in this file.
3
3
 
4
- ## 2.1.0 - 2106-02-05
4
+ ## 2.1.1 - 2016-02-12
5
+ ### Fix
6
+ - Mocks persist after model is deleted - https://github.com/zeisler/active_mocker/issues/35
7
+
8
+ ## 2.1.0 - 2016-02-05
5
9
  ### Enhancement
6
10
  - Support for module nested models.
7
11
  - Adding support for ruby 2.3
@@ -10,6 +10,7 @@ module ActiveMocker
10
10
 
11
11
  # @return self
12
12
  def call
13
+ clean_up
13
14
  progress_init
14
15
  models_paths.each do |file|
15
16
  model_name = model_name(file)
@@ -114,5 +115,13 @@ module ActiveMocker
114
115
  MockCreator.enabled_partials_default
115
116
  end
116
117
  end
118
+
119
+ def clean_up
120
+ delete_mocks unless config.single_model_path
121
+ end
122
+
123
+ def delete_mocks
124
+ FileUtils.rm Dir.glob(File.join(config.mock_dir, "/**/*_#{config.mock_append_name.underscore}.rb"))
125
+ end
117
126
  end
118
127
  end
@@ -1,3 +1,3 @@
1
1
  module ActiveMocker
2
- VERSION = "2.1.0"
2
+ VERSION = "2.1.1"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: active_mocker
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.1.0
4
+ version: 2.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Dustin Zeisler
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-02-09 00:00:00.000000000 Z
11
+ date: 2016-02-13 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activesupport