active_spy 1.2.0 → 1.3.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/VERSION +1 -1
- data/active_spy.gemspec +2 -2
- data/lib/active_spy/configuration.rb +12 -3
- data/lib/active_spy/rails/base.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 13495731a35bbc3a1fd9fe9207b20f5161de1b2e
|
4
|
+
data.tar.gz: 7928d4bba7b344dabcc2376f3d3de895f16921ed
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 96c3145c2b78d99cf7cb156aee010599e9fd6f477631d0d6bb8c339254730d6749710ba4515039b172b265ea7dcda36a27bf966ed591f5087c546c81636f4692
|
7
|
+
data.tar.gz: 0f12639de6be91f42b86e8cb6c5f72092c8e8eb49ac076984b7930ca835b17ccf140e693daec5422dabb7843dafae9d8ecd4fcbf780a2c432e77ded8ecc9c77e
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
1.
|
1
|
+
1.3.0
|
data/active_spy.gemspec
CHANGED
@@ -2,11 +2,11 @@
|
|
2
2
|
# DO NOT EDIT THIS FILE DIRECTLY
|
3
3
|
# Instead, edit Jeweler::Tasks in Rakefile, and run 'rake gemspec'
|
4
4
|
# -*- encoding: utf-8 -*-
|
5
|
-
# stub: active_spy 1.
|
5
|
+
# stub: active_spy 1.3.0 ruby lib
|
6
6
|
|
7
7
|
Gem::Specification.new do |s|
|
8
8
|
s.name = "active_spy"
|
9
|
-
s.version = "1.
|
9
|
+
s.version = "1.3.0"
|
10
10
|
|
11
11
|
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
12
12
|
s.require_paths = ["lib"]
|
@@ -43,16 +43,25 @@ module ActiveSpy
|
|
43
43
|
@event_host
|
44
44
|
end
|
45
45
|
|
46
|
-
# Set if the gem is in development mode or not
|
46
|
+
# Set if the gem is in development mode or not.
|
47
47
|
#
|
48
48
|
# @param [Boolean] development moded state to set
|
49
49
|
#
|
50
50
|
# @return [Boolean] development moded state to set
|
51
|
-
def development_mode(mode = nil)
|
52
|
-
|
51
|
+
def development_mode(mode = nil, options = nil)
|
52
|
+
unless mode.nil?
|
53
|
+
@development_mode = mode
|
54
|
+
@skip_validations = options[:skip_validations] if options.present?
|
55
|
+
end
|
53
56
|
@development_mode
|
54
57
|
end
|
55
58
|
|
59
|
+
# Simple reader for +skip_validations+ attribute.
|
60
|
+
#
|
61
|
+
def skip_validations
|
62
|
+
@skip_validations
|
63
|
+
end
|
64
|
+
|
56
65
|
# Imperative method to set development mode.
|
57
66
|
#
|
58
67
|
def development_mode!
|
@@ -42,7 +42,7 @@ module ActiveSpy
|
|
42
42
|
#
|
43
43
|
def method_missing(method, *_args, &_block)
|
44
44
|
event_json = { event: get_request_params(method) }.to_json
|
45
|
-
ActiveSpy::Rails::Validation::Event.new(event_json).validate!
|
45
|
+
ActiveSpy::Rails::Validation::Event.new(event_json).validate! unless ActiveSpy::Configuration.skip_validations
|
46
46
|
send_event_request(event_json) unless ActiveSpy::Configuration.development_mode
|
47
47
|
remove_is_new_method(@object)
|
48
48
|
end
|