active_spy 1.4.4 → 2.0.0.pre1

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: a1ddcb7f321e2de4343d3c6b8fac8fc482780a81
4
- data.tar.gz: 8eae88906c367052ef622c376360fa47a7266eb7
3
+ metadata.gz: e86bd2b0638a1f6f81bbca9aa8e9a40f335406fa
4
+ data.tar.gz: 49b7496fa72f2107f8d8e8bb0c53d49b6399deeb
5
5
  SHA512:
6
- metadata.gz: a58b1135f6df45d1ba10d49079dd1dc7289e23494a02a75996b67770c82f507031e4b6e4487039017c1d17e4c4ab3fff517d71fe8e89268fc186b7a3d2a958ee
7
- data.tar.gz: 294d03f553b35481e356c2c2f7fa8a31cdcca2b010eafad3fe2b4668048ec2aa4a2fdd710c5be6a08faf8643d8ead76dab758427b689642ad10194d94c9e7ec3
6
+ metadata.gz: 8a2589841b831c08a586c9b0e5935d632287da21774fd421a7d6138dc160aa1ae020ac10b9a6889bf02ad124a560c1e11b1c06797f489ed32db673404033e589
7
+ data.tar.gz: cb209fe807bf696e3af09d7126e439361f735e0af263ec49d74d53bf0ff2f249375ad4d625e4a01bb06345d401a2a42366fe98d2a409813da87e2a344fd3edd3
data/Gemfile CHANGED
@@ -1,22 +1,21 @@
1
1
  source 'http://rubygems.org'
2
2
  # Add dependencies required to use your gem here.
3
3
  # Example:
4
- # gem "activesupport", ">= 2.3.5"
5
4
  gem 'activesupport', '>= 4.0.0'
6
- gem 'rest-client', '>= 1.8.0'
7
- gem 'hashie'
5
+ gem 'shoryuken', '>= 1.0.0'
6
+ gem 'nullobject', '>= 0.0.5'
7
+ gem 'request_store', '>= 1.2.0'
8
8
 
9
9
  # Add dependencies to develop your gem here.
10
10
  # Include everything needed to run rake, tests, features, etc.
11
11
  group :development do
12
12
  gem 'activerecord', '>= 4.0.0'
13
- gem 'rails', '>= 4.0.0'
14
13
  gem 'rubocop', '~> 0.24.0'
15
- gem 'pry', '~> 0.10.0'
16
- gem 'rspec', '~> 3.0.0'
17
- gem 'yard', '0.8.7.4'
18
- gem 'rdoc', '~> 4.1.1'
19
14
  gem 'bundler', '~> 1.9.7'
20
15
  gem 'jeweler', '~> 2.0.1'
21
16
  gem 'simplecov'
17
+ gem 'sqlite3'
18
+ gem 'rake'
19
+ gem 'pry-byebug'
20
+ gem 'dotenv'
22
21
  end
data/Gemfile.lock CHANGED
@@ -1,44 +1,39 @@
1
1
  GEM
2
2
  remote: http://rubygems.org/
3
3
  specs:
4
- actionmailer (4.1.4)
5
- actionpack (= 4.1.4)
6
- actionview (= 4.1.4)
7
- mail (~> 2.5.4)
8
- actionpack (4.1.4)
9
- actionview (= 4.1.4)
10
- activesupport (= 4.1.4)
11
- rack (~> 1.5.2)
12
- rack-test (~> 0.6.2)
13
- actionview (4.1.4)
14
- activesupport (= 4.1.4)
4
+ activemodel (4.2.4)
5
+ activesupport (= 4.2.4)
15
6
  builder (~> 3.1)
16
- erubis (~> 2.7.0)
17
- activemodel (4.1.4)
18
- activesupport (= 4.1.4)
19
- builder (~> 3.1)
20
- activerecord (4.1.4)
21
- activemodel (= 4.1.4)
22
- activesupport (= 4.1.4)
23
- arel (~> 5.0.0)
24
- activesupport (4.1.4)
25
- i18n (~> 0.6, >= 0.6.9)
7
+ activerecord (4.2.4)
8
+ activemodel (= 4.2.4)
9
+ activesupport (= 4.2.4)
10
+ arel (~> 6.0)
11
+ activesupport (4.2.4)
12
+ i18n (~> 0.7)
26
13
  json (~> 1.7, >= 1.7.7)
27
14
  minitest (~> 5.1)
28
- thread_safe (~> 0.1)
15
+ thread_safe (~> 0.3, >= 0.3.4)
29
16
  tzinfo (~> 1.1)
30
17
  addressable (2.3.6)
31
- arel (5.0.1.20140414130214)
18
+ arel (6.0.3)
32
19
  ast (2.0.0)
20
+ aws-sdk-core (2.0.48)
21
+ builder (~> 3.0)
22
+ jmespath (~> 1.0)
23
+ multi_json (~> 1.0)
33
24
  builder (3.2.2)
25
+ byebug (5.0.0)
26
+ columnize (= 0.9.0)
27
+ celluloid (0.16.0)
28
+ timers (~> 4.0.0)
34
29
  coderay (1.1.0)
30
+ columnize (0.9.0)
35
31
  descendants_tracker (0.0.4)
36
32
  thread_safe (~> 0.3, >= 0.3.1)
37
- diff-lcs (1.2.5)
38
33
  docile (1.1.5)
39
- domain_name (0.5.24)
40
- unf (>= 0.0.5, < 1.0.0)
41
- erubis (2.7.0)
34
+ dotenv (0.11.1)
35
+ dotenv-deployment (~> 0.0.2)
36
+ dotenv-deployment (0.0.2)
42
37
  faraday (0.9.0)
43
38
  multipart-post (>= 1.2, < 3)
44
39
  git (1.2.7)
@@ -52,10 +47,8 @@ GEM
52
47
  oauth2
53
48
  hashie (3.2.0)
54
49
  highline (1.6.21)
55
- hike (1.2.3)
56
- http-cookie (1.0.2)
57
- domain_name (~> 0.5)
58
- i18n (0.6.11)
50
+ hitimes (1.2.2)
51
+ i18n (0.7.0)
59
52
  jeweler (2.0.1)
60
53
  builder
61
54
  bundler (>= 1.0)
@@ -65,21 +58,19 @@ GEM
65
58
  nokogiri (>= 1.5.10)
66
59
  rake
67
60
  rdoc
68
- json (1.8.1)
61
+ jmespath (1.0.2)
62
+ multi_json (~> 1.0)
63
+ json (1.8.3)
69
64
  jwt (1.0.0)
70
- mail (2.5.4)
71
- mime-types (~> 1.16)
72
- treetop (~> 1.4.8)
73
65
  method_source (0.8.2)
74
- mime-types (1.25.1)
75
66
  mini_portile (0.6.0)
76
- minitest (5.4.0)
77
- multi_json (1.10.1)
67
+ minitest (5.8.0)
68
+ multi_json (1.11.2)
78
69
  multi_xml (0.5.5)
79
70
  multipart-post (2.0.0)
80
- netrc (0.10.3)
81
71
  nokogiri (1.6.2.1)
82
72
  mini_portile (= 0.6.0)
73
+ nullobject (0.0.5)
83
74
  oauth2 (1.0.0)
84
75
  faraday (>= 0.8, < 0.10)
85
76
  jwt (~> 1.0)
@@ -89,50 +80,20 @@ GEM
89
80
  parser (2.2.0.pre.3)
90
81
  ast (>= 1.1, < 3.0)
91
82
  slop (~> 3.4, >= 3.4.5)
92
- polyglot (0.3.5)
93
83
  powerpack (0.0.9)
94
- pry (0.10.0)
84
+ pry (0.10.1)
95
85
  coderay (~> 1.1.0)
96
86
  method_source (~> 0.8.1)
97
87
  slop (~> 3.4)
98
- rack (1.5.2)
99
- rack-test (0.6.2)
100
- rack (>= 1.0)
101
- rails (4.1.4)
102
- actionmailer (= 4.1.4)
103
- actionpack (= 4.1.4)
104
- actionview (= 4.1.4)
105
- activemodel (= 4.1.4)
106
- activerecord (= 4.1.4)
107
- activesupport (= 4.1.4)
108
- bundler (>= 1.3.0, < 2.0)
109
- railties (= 4.1.4)
110
- sprockets-rails (~> 2.0)
111
- railties (4.1.4)
112
- actionpack (= 4.1.4)
113
- activesupport (= 4.1.4)
114
- rake (>= 0.8.7)
115
- thor (>= 0.18.1, < 2.0)
88
+ pry-byebug (3.2.0)
89
+ byebug (~> 5.0)
90
+ pry (~> 0.10)
91
+ rack (1.6.4)
116
92
  rainbow (2.0.0)
117
- rake (10.3.2)
93
+ rake (10.4.2)
118
94
  rdoc (4.1.1)
119
95
  json (~> 1.4)
120
- rest-client (1.8.0)
121
- http-cookie (>= 1.0.2, < 2.0)
122
- mime-types (>= 1.16, < 3.0)
123
- netrc (~> 0.7)
124
- rspec (3.0.0)
125
- rspec-core (~> 3.0.0)
126
- rspec-expectations (~> 3.0.0)
127
- rspec-mocks (~> 3.0.0)
128
- rspec-core (3.0.2)
129
- rspec-support (~> 3.0.0)
130
- rspec-expectations (3.0.2)
131
- diff-lcs (>= 1.2.0, < 2.0)
132
- rspec-support (~> 3.0.0)
133
- rspec-mocks (3.0.2)
134
- rspec-support (~> 3.0.0)
135
- rspec-support (3.0.2)
96
+ request_store (1.2.0)
136
97
  rubocop (0.24.1)
137
98
  json (>= 1.7.7, < 2)
138
99
  parser (>= 2.2.0.pre.3, < 3.0)
@@ -140,33 +101,21 @@ GEM
140
101
  rainbow (>= 1.99.1, < 3.0)
141
102
  ruby-progressbar (~> 1.4)
142
103
  ruby-progressbar (1.5.1)
143
- simplecov (0.8.2)
104
+ shoryuken (1.0.3)
105
+ aws-sdk-core (~> 2.0.21)
106
+ celluloid (~> 0.16.0)
107
+ simplecov (0.10.0)
144
108
  docile (~> 1.1.0)
145
- multi_json
146
- simplecov-html (~> 0.8.0)
147
- simplecov-html (0.8.0)
148
- slop (3.5.0)
149
- sprockets (2.12.1)
150
- hike (~> 1.2)
151
- multi_json (~> 1.0)
152
- rack (~> 1.0)
153
- tilt (~> 1.1, != 1.3.0)
154
- sprockets-rails (2.1.3)
155
- actionpack (>= 3.0)
156
- activesupport (>= 3.0)
157
- sprockets (~> 2.8)
158
- thor (0.19.1)
159
- thread_safe (0.3.4)
160
- tilt (1.4.1)
161
- treetop (1.4.15)
162
- polyglot
163
- polyglot (>= 0.3.1)
164
- tzinfo (1.2.1)
109
+ json (~> 1.8)
110
+ simplecov-html (~> 0.10.0)
111
+ simplecov-html (0.10.0)
112
+ slop (3.6.0)
113
+ sqlite3 (1.3.9)
114
+ thread_safe (0.3.5)
115
+ timers (4.0.1)
116
+ hitimes
117
+ tzinfo (1.2.2)
165
118
  thread_safe (~> 0.1)
166
- unf (0.1.4)
167
- unf_ext
168
- unf_ext (0.0.7.1)
169
- yard (0.8.7.4)
170
119
 
171
120
  PLATFORMS
172
121
  ruby
@@ -175,13 +124,13 @@ DEPENDENCIES
175
124
  activerecord (>= 4.0.0)
176
125
  activesupport (>= 4.0.0)
177
126
  bundler (~> 1.9.7)
178
- hashie
127
+ dotenv
179
128
  jeweler (~> 2.0.1)
180
- pry (~> 0.10.0)
181
- rails (>= 4.0.0)
182
- rdoc (~> 4.1.1)
183
- rest-client (>= 1.8.0)
184
- rspec (~> 3.0.0)
129
+ nullobject (>= 0.0.5)
130
+ pry-byebug
131
+ rake
132
+ request_store (>= 1.2.0)
185
133
  rubocop (~> 0.24.0)
134
+ shoryuken (>= 1.0.0)
186
135
  simplecov
187
- yard (= 0.8.7.4)
136
+ sqlite3
data/Rakefile CHANGED
@@ -12,9 +12,11 @@ end
12
12
  require 'rake'
13
13
 
14
14
  require 'jeweler'
15
+ require './lib/active_spy/version.rb'
15
16
  Jeweler::Tasks.new do |gem|
16
17
  # gem is a Gem::Specification... see
17
18
  # http://guides.rubygems.org/specification-reference/ for more options
19
+ gem.version = ActiveSpy::Version::STRING
18
20
  gem.name = 'active_spy'
19
21
  gem.homepage = 'http://github.com/edools/active_spy'
20
22
  gem.license = 'MIT'
@@ -31,26 +33,34 @@ Jeweler::Tasks.new do |gem|
31
33
  DESC
32
34
  gem.email = 'd.camata@gmail.com'
33
35
  gem.authors = ['Douglas Camata']
34
- gem.files = Dir['lib/**/*'] + Dir['app/**/*.rb'] + Dir['config/**/*.rb'] +
35
- Dir['.document'] + Dir['README.md'] + Dir['LICENSE.txt'] + Dir['VERSION'] +
36
+ gem.files = Dir['lib/**/*'] + Dir['config/**/*.rb'] + Dir['.document'] +
37
+ Dir['README.md'] + Dir['LICENSE.txt'] + Dir['VERSION'] +
36
38
  Dir['Rakefile'] + Dir['active_spy.gemspec'] + Dir['Gemfile*']
37
39
  # dependencies defined in Gemfile
38
40
  end
39
41
  Jeweler::RubygemsDotOrgTasks.new
40
42
 
41
- require 'rspec/core'
42
- require 'rspec/core/rake_task'
43
- RSpec::Core::RakeTask.new(:spec) do |spec|
44
- spec.pattern = FileList['spec/active_spy/**/*_spec.rb']
43
+ require 'rake/testtask'
44
+ Rake::TestTask.new("test:regular") do |t|
45
+ t.libs = ["test"]
46
+ t.pattern = "test/*_test.rb"
47
+ t.ruby_opts = []
45
48
  end
46
49
 
50
+ Rake::TestTask.new("test:generators") do |t|
51
+ t.libs = ["test"]
52
+ t.pattern = "test/generators/*_test.rb"
53
+ t.ruby_opts = []
54
+ end
55
+
56
+ task test: ['test:regular', 'test:generators']
57
+
47
58
  desc 'Code coverage detail'
48
59
  task :simplecov do
49
60
  ENV['COVERAGE'] = 'true'
50
61
  Rake::Task['spec'].execute
51
62
  end
52
63
 
53
- task default: :spec
64
+ task default: :test
54
65
 
55
- require 'yard'
56
- YARD::Rake::YardocTask.new
66
+ require 'bundler/gem_tasks'
data/active_spy.gemspec CHANGED
@@ -2,16 +2,16 @@
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.4.4 ruby lib
5
+ # stub: active_spy 2.0.0.pre1 ruby lib
6
6
 
7
7
  Gem::Specification.new do |s|
8
8
  s.name = "active_spy"
9
- s.version = "1.4.4"
9
+ s.version = "2.0.0.pre1"
10
10
 
11
- s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
+ s.required_rubygems_version = Gem::Requirement.new("> 1.3.1") if s.respond_to? :required_rubygems_version=
12
12
  s.require_paths = ["lib"]
13
13
  s.authors = ["Douglas Camata"]
14
- s.date = "2015-06-02"
14
+ s.date = "2015-08-31"
15
15
  s.description = " Watch for a method call in any class and run before/after callbacks.\n You can even watch your Rails models for events (like create, update,\n destroy), send these events to a event-runner instance and it redirect these\n events to other apps that are subscrived for them. This gem also provides\n classes that you can use to process the received events too.\n"
16
16
  s.email = "d.camata@gmail.com"
17
17
  s.extra_rdoc_files = [
@@ -25,23 +25,14 @@ Gem::Specification.new do |s|
25
25
  "LICENSE.txt",
26
26
  "README.md",
27
27
  "Rakefile",
28
- "VERSION",
29
28
  "active_spy.gemspec",
30
- "app/controllers/active_spy/notifications_controller.rb",
31
29
  "config/initializers/active_spy_configuration_loader.rb",
32
30
  "config/routes.rb",
33
31
  "lib/active_spy.rb",
34
- "lib/active_spy/base.rb",
35
- "lib/active_spy/configuration.rb",
36
- "lib/active_spy/rails/base.rb",
37
- "lib/active_spy/rails/engine.rb",
38
- "lib/active_spy/rails/hook_list.rb",
39
- "lib/active_spy/rails/listener.rb",
40
- "lib/active_spy/rails/railtie.rb",
41
- "lib/active_spy/rails/spy.rb",
42
- "lib/active_spy/rails/validation.rb",
43
- "lib/active_spy/spy/spy.rb",
44
- "lib/active_spy/spy/spy_list.rb",
32
+ "lib/active_spy/agent.rb",
33
+ "lib/active_spy/handler.rb",
34
+ "lib/active_spy/station.rb",
35
+ "lib/active_spy/version.rb",
45
36
  "lib/rails/generators/active_spy/install/install_generator.rb",
46
37
  "lib/rails/generators/active_spy/install/templates/active_spy.yml",
47
38
  "lib/rails/generators/active_spy/install/templates/initializer.rb"
@@ -56,47 +47,47 @@ Gem::Specification.new do |s|
56
47
 
57
48
  if Gem::Version.new(Gem::VERSION) >= Gem::Version.new('1.2.0') then
58
49
  s.add_runtime_dependency(%q<activesupport>, [">= 4.0.0"])
59
- s.add_runtime_dependency(%q<rest-client>, [">= 1.8.0"])
60
- s.add_runtime_dependency(%q<hashie>, [">= 0"])
50
+ s.add_runtime_dependency(%q<shoryuken>, [">= 1.0.0"])
51
+ s.add_runtime_dependency(%q<nullobject>, [">= 0.0.5"])
52
+ s.add_runtime_dependency(%q<request_store>, [">= 1.2.0"])
61
53
  s.add_development_dependency(%q<activerecord>, [">= 4.0.0"])
62
- s.add_development_dependency(%q<rails>, [">= 4.0.0"])
63
54
  s.add_development_dependency(%q<rubocop>, ["~> 0.24.0"])
64
- s.add_development_dependency(%q<pry>, ["~> 0.10.0"])
65
- s.add_development_dependency(%q<rspec>, ["~> 3.0.0"])
66
- s.add_development_dependency(%q<yard>, ["= 0.8.7.4"])
67
- s.add_development_dependency(%q<rdoc>, ["~> 4.1.1"])
68
55
  s.add_development_dependency(%q<bundler>, ["~> 1.9.7"])
69
56
  s.add_development_dependency(%q<jeweler>, ["~> 2.0.1"])
70
57
  s.add_development_dependency(%q<simplecov>, [">= 0"])
58
+ s.add_development_dependency(%q<sqlite3>, [">= 0"])
59
+ s.add_development_dependency(%q<rake>, [">= 0"])
60
+ s.add_development_dependency(%q<pry-byebug>, [">= 0"])
61
+ s.add_development_dependency(%q<dotenv>, [">= 0"])
71
62
  else
72
63
  s.add_dependency(%q<activesupport>, [">= 4.0.0"])
73
- s.add_dependency(%q<rest-client>, [">= 1.8.0"])
74
- s.add_dependency(%q<hashie>, [">= 0"])
64
+ s.add_dependency(%q<shoryuken>, [">= 1.0.0"])
65
+ s.add_dependency(%q<nullobject>, [">= 0.0.5"])
66
+ s.add_dependency(%q<request_store>, [">= 1.2.0"])
75
67
  s.add_dependency(%q<activerecord>, [">= 4.0.0"])
76
- s.add_dependency(%q<rails>, [">= 4.0.0"])
77
68
  s.add_dependency(%q<rubocop>, ["~> 0.24.0"])
78
- s.add_dependency(%q<pry>, ["~> 0.10.0"])
79
- s.add_dependency(%q<rspec>, ["~> 3.0.0"])
80
- s.add_dependency(%q<yard>, ["= 0.8.7.4"])
81
- s.add_dependency(%q<rdoc>, ["~> 4.1.1"])
82
69
  s.add_dependency(%q<bundler>, ["~> 1.9.7"])
83
70
  s.add_dependency(%q<jeweler>, ["~> 2.0.1"])
84
71
  s.add_dependency(%q<simplecov>, [">= 0"])
72
+ s.add_dependency(%q<sqlite3>, [">= 0"])
73
+ s.add_dependency(%q<rake>, [">= 0"])
74
+ s.add_dependency(%q<pry-byebug>, [">= 0"])
75
+ s.add_dependency(%q<dotenv>, [">= 0"])
85
76
  end
86
77
  else
87
78
  s.add_dependency(%q<activesupport>, [">= 4.0.0"])
88
- s.add_dependency(%q<rest-client>, [">= 1.8.0"])
89
- s.add_dependency(%q<hashie>, [">= 0"])
79
+ s.add_dependency(%q<shoryuken>, [">= 1.0.0"])
80
+ s.add_dependency(%q<nullobject>, [">= 0.0.5"])
81
+ s.add_dependency(%q<request_store>, [">= 1.2.0"])
90
82
  s.add_dependency(%q<activerecord>, [">= 4.0.0"])
91
- s.add_dependency(%q<rails>, [">= 4.0.0"])
92
83
  s.add_dependency(%q<rubocop>, ["~> 0.24.0"])
93
- s.add_dependency(%q<pry>, ["~> 0.10.0"])
94
- s.add_dependency(%q<rspec>, ["~> 3.0.0"])
95
- s.add_dependency(%q<yard>, ["= 0.8.7.4"])
96
- s.add_dependency(%q<rdoc>, ["~> 4.1.1"])
97
84
  s.add_dependency(%q<bundler>, ["~> 1.9.7"])
98
85
  s.add_dependency(%q<jeweler>, ["~> 2.0.1"])
99
86
  s.add_dependency(%q<simplecov>, [">= 0"])
87
+ s.add_dependency(%q<sqlite3>, [">= 0"])
88
+ s.add_dependency(%q<rake>, [">= 0"])
89
+ s.add_dependency(%q<pry-byebug>, [">= 0"])
90
+ s.add_dependency(%q<dotenv>, [">= 0"])
100
91
  end
101
92
  end
102
93
 
data/lib/active_spy.rb CHANGED
@@ -1,70 +1,22 @@
1
- require 'active_spy/configuration'
2
- require 'active_spy/base'
3
- require 'active_spy/spy/spy'
4
- require 'active_spy/spy/spy_list'
1
+ require 'shoryuken'
2
+ require 'active_support'
3
+ require 'request_store'
5
4
 
6
- if defined?(Rails)
7
- require 'active_spy/rails/base'
8
- require 'active_spy/rails/spy'
9
- require 'active_spy/rails/railtie'
10
- require 'active_spy/rails/engine'
11
- require 'active_spy/rails/engine'
12
- require 'active_spy/rails/hook_list'
13
- require 'active_spy/rails/listener'
14
- require 'active_spy/rails/validation'
15
- end
5
+ require 'active_spy/station'
6
+ require 'active_spy/agent'
7
+ require 'active_spy/handler'
16
8
 
17
- # Base module for the gem
18
- #
19
9
  module ActiveSpy
20
- if defined?(Rails)
21
- # @!method self.configure
22
- # Class method to set the service's name, host and port.
23
- #
24
- def self.configure
25
- Configuration.instance_eval do
26
- yield(self)
27
- end
28
- end
29
-
30
- # @!method self.register_service
31
- # Class method to register the service in an event-runner instance.
32
- #
33
- def self.register_service
34
- host = ActiveSpy::Configuration.event_host
35
- port = ActiveSpy::Configuration.event_port
36
- verify_ssl = ActiveSpy::Configuration.event_verify_ssl
37
- @base_url = "#{host}:#{port}/services"
38
-
39
- return if self.service_registered?
40
- service = { service: ActiveSpy::Configuration.settings }.to_json
41
-
42
- params = { headers: { content_type: :json }, method: :post, url: @base_url, payload: service }
43
- params[:verify_ssl] = verify_ssl if verify_ssl
44
-
45
- RestClient::Request.execute(params)
46
- end
47
-
48
- # @!method self.service_registered?
49
- # Check if the service was already registetered in the configured event
50
- # runner instance.
51
- #
52
- def self.service_registered?
53
- name = ActiveSpy::Configuration.name
54
- verify_ssl = ActiveSpy::Configuration.event_verify_ssl
55
- url = "#{@base_url}/#{name.downcase.gsub(' ', '-').strip}"
56
-
57
- begin
58
- if verify_ssl
59
- RestClient::Request.execute(method: :get, url: url, verify_ssl: verify_ssl)
60
- else
61
- RestClient.get url
62
- end
63
- rescue RestClient::ResourceNotFound
64
- return false
65
- else
66
- return true
67
- end
10
+ DEFAULTS = {
11
+ app_name: 'ActiveSpy',
12
+ app_env: 'development',
13
+ fake_clients: false,
14
+ aws: {}
15
+ }
16
+
17
+ class << self
18
+ def options
19
+ @options ||= DEFAULTS.dup
68
20
  end
69
21
  end
70
22
  end