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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 60c31bd6d9203cda5c3e771fe53fd1963562ba19
4
- data.tar.gz: 3fa992ecbb2b3b5d255776df58890f0eccc4cafd
3
+ metadata.gz: 13495731a35bbc3a1fd9fe9207b20f5161de1b2e
4
+ data.tar.gz: 7928d4bba7b344dabcc2376f3d3de895f16921ed
5
5
  SHA512:
6
- metadata.gz: 524b7de465121d72f2157620b84795cef249deb1d62d07bbb166287fa190401a211dbae46b46a86a76207636a1e171dbc6d078b39c2fa7dc2312669c8299424a
7
- data.tar.gz: 8bf369915690be1c13311c59572b30cbd7579bdd1d49ca09719c93c43ee7187c3548e92d7410a4138a3063df6dd5ecf892f9f96408e8ed2cf387135a447b195e
6
+ metadata.gz: 96c3145c2b78d99cf7cb156aee010599e9fd6f477631d0d6bb8c339254730d6749710ba4515039b172b265ea7dcda36a27bf966ed591f5087c546c81636f4692
7
+ data.tar.gz: 0f12639de6be91f42b86e8cb6c5f72092c8e8eb49ac076984b7930ca835b17ccf140e693daec5422dabb7843dafae9d8ecd4fcbf780a2c432e77ded8ecc9c77e
data/VERSION CHANGED
@@ -1 +1 @@
1
- 1.2.0
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.2.0 ruby lib
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.2.0"
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
- @development_mode = mode unless mode.nil?
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
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: active_spy
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.2.0
4
+ version: 1.3.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Douglas Camata