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 +4 -4
- data/CHANGELOG.md +5 -1
- data/lib/active_mocker/generate.rb +9 -0
- data/lib/active_mocker/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: c646df814c710d83b6f05e9600630c3ed824a563
|
4
|
+
data.tar.gz: cd0d8ff004f471ffef508643ce956660bf4a6491
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 2ae81ef35739bf6ac397c5ca5c59444a71517711c95d59a4ba37eeb31818946bdfcc6c896f2b34a425297f92ecacd71da5de03f1b0e0f0b4530407c86c2784d8
|
7
|
+
data.tar.gz: c2c169a9f87c20838f988385e7bcc6daa47510d4f072100c7fda6986394234c8cd68cdee1983fbe70fd187537e0de239f19ba6efff10473b3ce15a5465472892
|
data/CHANGELOG.md
CHANGED
@@ -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.
|
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
|
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.
|
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-
|
11
|
+
date: 2016-02-13 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activesupport
|