active_mocker 1.6.1 → 1.6.2
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 -0
- data/lib/active_mocker/mock.rb +1 -1
- data/lib/active_mocker/mock/collection.rb +2 -2
- data/lib/active_mocker/mock/has_many.rb +2 -4
- data/lib/active_mocker/mock/queries.rb +1 -1
- 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: d0fffbadcc8ae119c4d21f143ffd15bb0a39da50
|
4
|
+
data.tar.gz: a571362fc14c543977695632341ee8bf998ca4ca
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 7e997a86936372d4f9d9fe150c2ad0b6b844bbb962b36dd2db87260b48d3ed3d12e572b6710c3354225d60a2671741d0b200bbf097f7d7a076fc402706d5339d
|
7
|
+
data.tar.gz: e09743ecb6b2df4f4fa40354b5e3131f8731ab21bfbaa1f24e02ef8ffa81437f1cd0c5b585e42be7c792ad24143e4c0da0b082006e5d1484696b4b3628ee6903
|
data/CHANGELOG.md
CHANGED
@@ -1,5 +1,10 @@
|
|
1
1
|
# Changelog
|
2
2
|
All notable changes to this project will be documented in this file.
|
3
|
+
## 1.6.2 - 2014-07-31
|
4
|
+
|
5
|
+
## Fix
|
6
|
+
- Ruby interpreter warnings
|
7
|
+
- calling `#blank?` inside of `Base#assign_attributes` would get a no method error. Solution is to require ‘active_support/core_ext’ in mock.rb.
|
3
8
|
|
4
9
|
## 1.6.1 - 2014-07-30
|
5
10
|
|
data/lib/active_mocker/mock.rb
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
require 'active_support/hash_with_indifferent_access'
|
2
2
|
require 'active_support/core_ext/module/delegation'
|
3
3
|
require 'active_support/inflector'
|
4
|
-
require 'active_support/core_ext
|
4
|
+
require 'active_support/core_ext'
|
5
5
|
require 'virtus'
|
6
6
|
|
7
7
|
require 'active_mocker/logger'
|
@@ -16,8 +16,8 @@ module Mock
|
|
16
16
|
end
|
17
17
|
|
18
18
|
extend ::Forwardable
|
19
|
-
def_delegators :@collection, :take, :push, :clear, :first, :last, :concat, :replace, :
|
20
|
-
|
19
|
+
def_delegators :@collection, :take, :push, :clear, :first, :last, :concat, :replace, :uniq, :count, :size, :length, :empty?, :any?, :many?, :include?, :delete
|
20
|
+
alias_method :distinct, :uniq
|
21
21
|
|
22
22
|
def select(&block)
|
23
23
|
collection.select(&block)
|
@@ -25,9 +25,8 @@ module Mock
|
|
25
25
|
end
|
26
26
|
end
|
27
27
|
|
28
|
-
private
|
28
|
+
# @api private
|
29
29
|
attr_reader :relation_class, :foreign_key, :foreign_id
|
30
|
-
public
|
31
30
|
|
32
31
|
def build(options={}, &block)
|
33
32
|
new_record = relation_class.new(init_options.merge!(options), &block)
|
@@ -54,12 +53,11 @@ module Mock
|
|
54
53
|
|
55
54
|
alias_method :create!, :create
|
56
55
|
|
56
|
+
# @api private
|
57
57
|
def init_options
|
58
58
|
{foreign_key => foreign_id}
|
59
59
|
end
|
60
60
|
|
61
|
-
private :init_options
|
62
|
-
|
63
61
|
end
|
64
62
|
|
65
63
|
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: 1.6.
|
4
|
+
version: 1.6.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Dustin Zeisler
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-07-
|
11
|
+
date: 2014-07-31 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activesupport
|