analytics-ruby-mock 0.0.1
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/analytics_ruby_mock.rb +32 -0
- metadata +47 -0
@@ -0,0 +1,32 @@
|
|
1
|
+
module AnalyticsRuby
|
2
|
+
module ClassMethods
|
3
|
+
def track(options)
|
4
|
+
debug_message(:track, options)
|
5
|
+
end
|
6
|
+
|
7
|
+
def identify(options)
|
8
|
+
debug_message(:identify, options)
|
9
|
+
end
|
10
|
+
|
11
|
+
def alias(options)
|
12
|
+
debug_message(:alias, options)
|
13
|
+
end
|
14
|
+
|
15
|
+
def flush
|
16
|
+
debug_message(:flush)
|
17
|
+
end
|
18
|
+
|
19
|
+
def debug
|
20
|
+
@debug = true
|
21
|
+
end
|
22
|
+
|
23
|
+
private
|
24
|
+
|
25
|
+
def debug_message(method, options = nil)
|
26
|
+
if @debug
|
27
|
+
puts "Mock of AnalyticsRuby called #{method.to_s} #{options.present? ? "with: #{options}" : ""}"
|
28
|
+
end
|
29
|
+
end
|
30
|
+
end
|
31
|
+
extend ClassMethods
|
32
|
+
end
|
metadata
ADDED
@@ -0,0 +1,47 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: analytics-ruby-mock
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.0.1
|
5
|
+
prerelease:
|
6
|
+
platform: ruby
|
7
|
+
authors:
|
8
|
+
- Gavin Miller
|
9
|
+
autorequire:
|
10
|
+
bindir: bin
|
11
|
+
cert_chain: []
|
12
|
+
date: 2013-09-20 00:00:00.000000000 Z
|
13
|
+
dependencies: []
|
14
|
+
description: Capture all calls to segment.io and prevent them from being sent.
|
15
|
+
email: gavin@petrofeed.com
|
16
|
+
executables: []
|
17
|
+
extensions: []
|
18
|
+
extra_rdoc_files: []
|
19
|
+
files:
|
20
|
+
- lib/analytics_ruby_mock.rb
|
21
|
+
homepage: http://rubygems.org/gems/analytics-ruby-mock
|
22
|
+
licenses:
|
23
|
+
- MIT
|
24
|
+
post_install_message:
|
25
|
+
rdoc_options: []
|
26
|
+
require_paths:
|
27
|
+
- lib
|
28
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
29
|
+
none: false
|
30
|
+
requirements:
|
31
|
+
- - ! '>='
|
32
|
+
- !ruby/object:Gem::Version
|
33
|
+
version: '0'
|
34
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
35
|
+
none: false
|
36
|
+
requirements:
|
37
|
+
- - ! '>='
|
38
|
+
- !ruby/object:Gem::Version
|
39
|
+
version: '0'
|
40
|
+
requirements: []
|
41
|
+
rubyforge_project:
|
42
|
+
rubygems_version: 1.8.23
|
43
|
+
signing_key:
|
44
|
+
specification_version: 3
|
45
|
+
summary: A mock for segment.io calls
|
46
|
+
test_files: []
|
47
|
+
has_rdoc:
|