dvr 0.0.3 → 0.0.4

Sign up to get free protection for your applications and to get access to all the features.
data/README.md CHANGED
@@ -12,18 +12,18 @@ A nice side effect of using DVR is that it relies on recorded API responses (for
12
12
  ## Installation & Usage
13
13
  ``` bash
14
14
  $ gem install dvr
15
- $ dvr record --episode-location '/absolute/path/to/rspec-api-documentation'
15
+ $ dvr record 'path/to/my_rails_app/rspec-api-documentation' # supports relative path
16
+ $ dvr play 'path/to/recorded/dvr/server.rb' # supports relative path
16
17
  ```
17
18
  *Note that this is a command-line tool that doesn't need to be in your Gemfile.
18
19
 
19
- ### Options
20
+ ### Recording Options
20
21
  ``` bash
21
- -l, [--episode-location=EPISODE_LOCATION] # The location of the recorded HTTP responses
22
- -n, [--filename=FILENAME] # The name for the recorded server file
23
- -f, [--episode-format=EPISODE_FORMAT] # The format of the provided files
24
- -s, [--episode-source=EPISODE_SOURCE] # The source of the JSON files
25
- -l, --episode-location=EPISODE_LOCATION # The location of the JSON files to record
26
- -d, [--destination=DESTINATION] # The destination for the recorded server file
22
+ -n, [--filename=FILENAME] # The name for the recorded server file. Defaults to dvr_server.rb
23
+ -f, [--episode-format=EPISODE_FORMAT] # The format of the provided files. Defaults to rspec-api-documentation
24
+ -s, [--episode-source=EPISODE_SOURCE] # The source of the JSON files. Defaults to file system
25
+ -d, [--destination=DESTINATION] # The destination for the recorded server file. Defaults to pwd/dvr
26
+ -a, [--auto-create-directories] # Flag to auto create destination directories. Defaults to true
27
27
  ```
28
28
  ## Contributing
29
29
 
@@ -5,7 +5,7 @@ require 'dvr/version'
5
5
 
6
6
  Gem::Specification.new do |spec|
7
7
  spec.name = "dvr"
8
- spec.version = Dvr::VERSION
8
+ spec.version = DVR::VERSION
9
9
  spec.authors = ["Kyle Conarro"]
10
10
  spec.email = ["kyle.conarro@rigor.com"]
11
11
  spec.description = "Mimic your Rails API backend by generating a fake server using recorded HTTP responses"
@@ -3,6 +3,12 @@ module DVR
3
3
  class App < Thor
4
4
  namespace :dvr
5
5
 
6
+ map "-v" => :version
7
+ desc "version", "Show DVR version", :hide => true
8
+ def version
9
+ puts DVR::VERSION
10
+ end
11
+
6
12
  desc "record FROM_DIRECTORY", "Record episodes from API docs and playback as a Sinatra server file"
7
13
  method_option :episode_format, :aliases => "-f", :desc => "The format of the provided files", :required => false
8
14
  method_option :episode_source, :aliases => "-s", :desc => "The source of the JSON files", :required => false
@@ -16,7 +16,7 @@ module DVR
16
16
 
17
17
  def play
18
18
  translate.map do |e|
19
- "#{e[:method]} '#{e[:path]}' do\n '#{e[:response].body}'\nend\n\n"
19
+ "#{e[:method]} '#{e[:path]}' do\n\tstatus #{e[:response].status_code}\n\tbody '#{e[:response].body}'\nend"
20
20
  end.join
21
21
  end
22
22
 
@@ -7,7 +7,7 @@ module DVR
7
7
  end
8
8
 
9
9
  def binge_watch
10
- episodes.map(&:play).join
10
+ episodes.map(&:play).join("\n\n")
11
11
  end
12
12
 
13
13
  def download
@@ -1,3 +1,3 @@
1
- module Dvr
2
- VERSION = "0.0.3"
1
+ module DVR
2
+ VERSION = "0.0.4"
3
3
  end
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: dvr
3
3
  version: !ruby/object:Gem::Version
4
- hash: 25
4
+ hash: 23
5
5
  prerelease:
6
6
  segments:
7
7
  - 0
8
8
  - 0
9
- - 3
10
- version: 0.0.3
9
+ - 4
10
+ version: 0.0.4
11
11
  platform: ruby
12
12
  authors:
13
13
  - Kyle Conarro
@@ -15,7 +15,7 @@ autorequire:
15
15
  bindir: bin
16
16
  cert_chain: []
17
17
 
18
- date: 2013-12-12 00:00:00 Z
18
+ date: 2013-12-13 00:00:00 Z
19
19
  dependencies:
20
20
  - !ruby/object:Gem::Dependency
21
21
  name: bundler
@@ -134,7 +134,6 @@ files:
134
134
  - Rakefile
135
135
  - bin/dvr
136
136
  - dvr.gemspec
137
- - dvr/dvr_server.rb
138
137
  - lib/dvr.rb
139
138
  - lib/dvr/cli.rb
140
139
  - lib/dvr/cli/app.rb
@@ -143,7 +142,6 @@ files:
143
142
  - lib/dvr/recorder.rb
144
143
  - lib/dvr/season.rb
145
144
  - lib/dvr/version.rb
146
- - my_downloads/dvr_server.rb
147
145
  - spec/dvr/configuration_spec.rb
148
146
  - spec/dvr/episode_spec.rb
149
147
  - spec/dvr/recorder_spec.rb
@@ -151,7 +149,6 @@ files:
151
149
  - spec/dvr_spec.rb
152
150
  - spec/fixtures/requests/rspec_api_documentation.json
153
151
  - spec/spec_helper.rb
154
- - spec/support/server.rb
155
152
  homepage: ""
156
153
  licenses:
157
154
  - MIT
@@ -193,5 +190,4 @@ test_files:
193
190
  - spec/dvr_spec.rb
194
191
  - spec/fixtures/requests/rspec_api_documentation.json
195
192
  - spec/spec_helper.rb
196
- - spec/support/server.rb
197
193
  has_rdoc:
@@ -1,49 +0,0 @@
1
- require 'rubygems'
2
- require 'sinatra'
3
-
4
- before { request.path_info += '/'+ request.query_string if request.query_string && !request.query_string.empty? }
5
-
6
- post 'api/v1/har_records' do
7
- '{"job_id":"00c5ff51ca644e3f3de14dd5"}'
8
- end
9
-
10
- get '/api/v1/har_records/account_id=1' do
11
- '{"count":1,"har_records":{"1940":{"id":"1940","source_url":null,"wait_time":null,"dns_time":null,"send_time":null,"connect_time":null,"blocked_time":null,"receive_time":null,"browser":null,"creator":null,"domain":null,"har_url":"https://s3.amazonaws.com/checkdata.rigor.com/49.harp","entry_count":null,"error_count":null,"dom_load_time":null,"page_load_time":null,"server_time":null,"page_size":null,"client_error_count":null,"server_error_count":null,"connection_error_count":null,"created_at":"2013-12-09T22:40:54Z","updated_at":"2013-12-09T22:40:54Z","started_date_time":null,"account_id":1,"check_id":1,"check_run_history_id":1,"location_id":1,"image_count":null,"javascript_count":null,"css_count":null,"html_count":null,"flash_count":null,"other_count":null,"run_record_id":null}},"results":[{"key":"har_records","id":"1940"}]}'
12
- end
13
-
14
- get '/api/v1/har_records/check_id=1' do
15
- '{"count":1,"har_records":{"1941":{"id":"1941","source_url":null,"wait_time":null,"dns_time":null,"send_time":null,"connect_time":null,"blocked_time":null,"receive_time":null,"browser":null,"creator":null,"domain":null,"har_url":"https://s3.amazonaws.com/checkdata.rigor.com/50.harp","entry_count":null,"error_count":null,"dom_load_time":null,"page_load_time":null,"server_time":null,"page_size":null,"client_error_count":null,"server_error_count":null,"connection_error_count":null,"created_at":"2013-12-09T22:40:54Z","updated_at":"2013-12-09T22:40:54Z","started_date_time":null,"account_id":1,"check_id":1,"check_run_history_id":1,"location_id":1,"image_count":null,"javascript_count":null,"css_count":null,"html_count":null,"flash_count":null,"other_count":null,"run_record_id":null}},"results":[{"key":"har_records","id":"1941"}]}'
16
- end
17
-
18
- get '/api/v1/har_records/check_run_history_id=1' do
19
- '{"count":1,"har_records":{"1937":{"id":"1937","source_url":null,"wait_time":null,"dns_time":null,"send_time":null,"connect_time":null,"blocked_time":null,"receive_time":null,"browser":null,"creator":null,"domain":null,"har_url":"https://s3.amazonaws.com/checkdata.rigor.com/46.harp","entry_count":null,"error_count":null,"dom_load_time":null,"page_load_time":null,"server_time":null,"page_size":null,"client_error_count":null,"server_error_count":null,"connection_error_count":null,"created_at":"2013-12-09T22:40:54Z","updated_at":"2013-12-09T22:40:54Z","started_date_time":null,"account_id":1,"check_id":1,"check_run_history_id":1,"location_id":1,"image_count":null,"javascript_count":null,"css_count":null,"html_count":null,"flash_count":null,"other_count":null,"run_record_id":null}},"results":[{"key":"har_records","id":"1937"}]}'
20
- end
21
-
22
- get '/api/v1/har_records/start=2013-11-11&end=2013-11-21' do
23
- '{"count":1,"har_records":{"1936":{"id":"1936","source_url":null,"wait_time":null,"dns_time":null,"send_time":null,"connect_time":null,"blocked_time":null,"receive_time":null,"browser":null,"creator":null,"domain":null,"har_url":"https://s3.amazonaws.com/checkdata.rigor.com/45.harp","entry_count":null,"error_count":null,"dom_load_time":null,"page_load_time":null,"server_time":null,"page_size":null,"client_error_count":null,"server_error_count":null,"connection_error_count":null,"created_at":"2013-12-09T22:40:54Z","updated_at":"2013-12-09T22:40:54Z","started_date_time":null,"account_id":1,"check_id":1,"check_run_history_id":1,"location_id":1,"image_count":null,"javascript_count":null,"css_count":null,"html_count":null,"flash_count":null,"other_count":null,"run_record_id":null}},"results":[{"key":"har_records","id":"1936"}]}'
24
- end
25
-
26
- get '/api/v1/har_records/location_id=1' do
27
- '{"count":1,"har_records":{"1939":{"id":"1939","source_url":null,"wait_time":null,"dns_time":null,"send_time":null,"connect_time":null,"blocked_time":null,"receive_time":null,"browser":null,"creator":null,"domain":null,"har_url":"https://s3.amazonaws.com/checkdata.rigor.com/48.harp","entry_count":null,"error_count":null,"dom_load_time":null,"page_load_time":null,"server_time":null,"page_size":null,"client_error_count":null,"server_error_count":null,"connection_error_count":null,"created_at":"2013-12-09T22:40:54Z","updated_at":"2013-12-09T22:40:54Z","started_date_time":null,"account_id":1,"check_id":1,"check_run_history_id":1,"location_id":1,"image_count":null,"javascript_count":null,"css_count":null,"html_count":null,"flash_count":null,"other_count":null,"run_record_id":null}},"results":[{"key":"har_records","id":"1939"}]}'
28
- end
29
-
30
- get '/api/v1/har_records' do
31
- '{"count":1,"har_records":{"1938":{"id":"1938","source_url":null,"wait_time":null,"dns_time":null,"send_time":null,"connect_time":null,"blocked_time":null,"receive_time":null,"browser":null,"creator":null,"domain":null,"har_url":"https://s3.amazonaws.com/checkdata.rigor.com/47.harp","entry_count":null,"error_count":null,"dom_load_time":null,"page_load_time":null,"server_time":null,"page_size":null,"client_error_count":null,"server_error_count":null,"connection_error_count":null,"created_at":"2013-12-09T22:40:54Z","updated_at":"2013-12-09T22:40:54Z","started_date_time":null,"account_id":1,"check_id":1,"check_run_history_id":1,"location_id":1,"image_count":null,"javascript_count":null,"css_count":null,"html_count":null,"flash_count":null,"other_count":null,"run_record_id":null}},"results":[{"key":"har_records","id":"1938"}]}'
32
- end
33
-
34
- get '/api/v1/har_records/per_page=1&page=1' do
35
- '{"count":1,"har_records":{"1935":{"id":"1935","source_url":null,"wait_time":null,"dns_time":null,"send_time":null,"connect_time":null,"blocked_time":null,"receive_time":null,"browser":null,"creator":null,"domain":null,"har_url":"https://s3.amazonaws.com/checkdata.rigor.com/44.harp","entry_count":null,"error_count":null,"dom_load_time":null,"page_load_time":null,"server_time":null,"page_size":null,"client_error_count":null,"server_error_count":null,"connection_error_count":null,"created_at":"2013-12-09T22:40:54Z","updated_at":"2013-12-09T22:40:54Z","started_date_time":null,"account_id":1,"check_id":1,"check_run_history_id":1,"location_id":1,"image_count":null,"javascript_count":null,"css_count":null,"html_count":null,"flash_count":null,"other_count":null,"run_record_id":null}},"results":[{"key":"har_records","id":"1935"}]}'
36
- end
37
-
38
- post 'api/v1/har_records_bulk' do
39
- '{"job_id":"b48c6bd17724fd2324a97f4b"}'
40
- end
41
-
42
- delete 'api/v1/har_records_bulk/destroy_by_account_id' do
43
- '{"job_id":"997743e056e5d75ef0a142b4"}'
44
- end
45
-
46
- delete 'api/v1/har_records_bulk/destroy_by_check_id' do
47
- '{"job_id":"d29dcc8754dc997a182f15b5"}'
48
- end
49
-
@@ -1,49 +0,0 @@
1
- require 'rubygems'
2
- require 'sinatra'
3
-
4
- before { request.path_info += '/'+ request.query_string if request.query_string && !request.query_string.empty? }
5
-
6
- post 'api/v1/har_records' do
7
- '{"job_id":"00c5ff51ca644e3f3de14dd5"}'
8
- end
9
-
10
- get '/api/v1/har_records/account_id=1' do
11
- '{"count":1,"har_records":{"1940":{"id":"1940","source_url":null,"wait_time":null,"dns_time":null,"send_time":null,"connect_time":null,"blocked_time":null,"receive_time":null,"browser":null,"creator":null,"domain":null,"har_url":"https://s3.amazonaws.com/checkdata.rigor.com/49.harp","entry_count":null,"error_count":null,"dom_load_time":null,"page_load_time":null,"server_time":null,"page_size":null,"client_error_count":null,"server_error_count":null,"connection_error_count":null,"created_at":"2013-12-09T22:40:54Z","updated_at":"2013-12-09T22:40:54Z","started_date_time":null,"account_id":1,"check_id":1,"check_run_history_id":1,"location_id":1,"image_count":null,"javascript_count":null,"css_count":null,"html_count":null,"flash_count":null,"other_count":null,"run_record_id":null}},"results":[{"key":"har_records","id":"1940"}]}'
12
- end
13
-
14
- get '/api/v1/har_records/check_id=1' do
15
- '{"count":1,"har_records":{"1941":{"id":"1941","source_url":null,"wait_time":null,"dns_time":null,"send_time":null,"connect_time":null,"blocked_time":null,"receive_time":null,"browser":null,"creator":null,"domain":null,"har_url":"https://s3.amazonaws.com/checkdata.rigor.com/50.harp","entry_count":null,"error_count":null,"dom_load_time":null,"page_load_time":null,"server_time":null,"page_size":null,"client_error_count":null,"server_error_count":null,"connection_error_count":null,"created_at":"2013-12-09T22:40:54Z","updated_at":"2013-12-09T22:40:54Z","started_date_time":null,"account_id":1,"check_id":1,"check_run_history_id":1,"location_id":1,"image_count":null,"javascript_count":null,"css_count":null,"html_count":null,"flash_count":null,"other_count":null,"run_record_id":null}},"results":[{"key":"har_records","id":"1941"}]}'
16
- end
17
-
18
- get '/api/v1/har_records/check_run_history_id=1' do
19
- '{"count":1,"har_records":{"1937":{"id":"1937","source_url":null,"wait_time":null,"dns_time":null,"send_time":null,"connect_time":null,"blocked_time":null,"receive_time":null,"browser":null,"creator":null,"domain":null,"har_url":"https://s3.amazonaws.com/checkdata.rigor.com/46.harp","entry_count":null,"error_count":null,"dom_load_time":null,"page_load_time":null,"server_time":null,"page_size":null,"client_error_count":null,"server_error_count":null,"connection_error_count":null,"created_at":"2013-12-09T22:40:54Z","updated_at":"2013-12-09T22:40:54Z","started_date_time":null,"account_id":1,"check_id":1,"check_run_history_id":1,"location_id":1,"image_count":null,"javascript_count":null,"css_count":null,"html_count":null,"flash_count":null,"other_count":null,"run_record_id":null}},"results":[{"key":"har_records","id":"1937"}]}'
20
- end
21
-
22
- get '/api/v1/har_records/start=2013-11-11&end=2013-11-21' do
23
- '{"count":1,"har_records":{"1936":{"id":"1936","source_url":null,"wait_time":null,"dns_time":null,"send_time":null,"connect_time":null,"blocked_time":null,"receive_time":null,"browser":null,"creator":null,"domain":null,"har_url":"https://s3.amazonaws.com/checkdata.rigor.com/45.harp","entry_count":null,"error_count":null,"dom_load_time":null,"page_load_time":null,"server_time":null,"page_size":null,"client_error_count":null,"server_error_count":null,"connection_error_count":null,"created_at":"2013-12-09T22:40:54Z","updated_at":"2013-12-09T22:40:54Z","started_date_time":null,"account_id":1,"check_id":1,"check_run_history_id":1,"location_id":1,"image_count":null,"javascript_count":null,"css_count":null,"html_count":null,"flash_count":null,"other_count":null,"run_record_id":null}},"results":[{"key":"har_records","id":"1936"}]}'
24
- end
25
-
26
- get '/api/v1/har_records/location_id=1' do
27
- '{"count":1,"har_records":{"1939":{"id":"1939","source_url":null,"wait_time":null,"dns_time":null,"send_time":null,"connect_time":null,"blocked_time":null,"receive_time":null,"browser":null,"creator":null,"domain":null,"har_url":"https://s3.amazonaws.com/checkdata.rigor.com/48.harp","entry_count":null,"error_count":null,"dom_load_time":null,"page_load_time":null,"server_time":null,"page_size":null,"client_error_count":null,"server_error_count":null,"connection_error_count":null,"created_at":"2013-12-09T22:40:54Z","updated_at":"2013-12-09T22:40:54Z","started_date_time":null,"account_id":1,"check_id":1,"check_run_history_id":1,"location_id":1,"image_count":null,"javascript_count":null,"css_count":null,"html_count":null,"flash_count":null,"other_count":null,"run_record_id":null}},"results":[{"key":"har_records","id":"1939"}]}'
28
- end
29
-
30
- get '/api/v1/har_records' do
31
- '{"count":1,"har_records":{"1938":{"id":"1938","source_url":null,"wait_time":null,"dns_time":null,"send_time":null,"connect_time":null,"blocked_time":null,"receive_time":null,"browser":null,"creator":null,"domain":null,"har_url":"https://s3.amazonaws.com/checkdata.rigor.com/47.harp","entry_count":null,"error_count":null,"dom_load_time":null,"page_load_time":null,"server_time":null,"page_size":null,"client_error_count":null,"server_error_count":null,"connection_error_count":null,"created_at":"2013-12-09T22:40:54Z","updated_at":"2013-12-09T22:40:54Z","started_date_time":null,"account_id":1,"check_id":1,"check_run_history_id":1,"location_id":1,"image_count":null,"javascript_count":null,"css_count":null,"html_count":null,"flash_count":null,"other_count":null,"run_record_id":null}},"results":[{"key":"har_records","id":"1938"}]}'
32
- end
33
-
34
- get '/api/v1/har_records/per_page=1&page=1' do
35
- '{"count":1,"har_records":{"1935":{"id":"1935","source_url":null,"wait_time":null,"dns_time":null,"send_time":null,"connect_time":null,"blocked_time":null,"receive_time":null,"browser":null,"creator":null,"domain":null,"har_url":"https://s3.amazonaws.com/checkdata.rigor.com/44.harp","entry_count":null,"error_count":null,"dom_load_time":null,"page_load_time":null,"server_time":null,"page_size":null,"client_error_count":null,"server_error_count":null,"connection_error_count":null,"created_at":"2013-12-09T22:40:54Z","updated_at":"2013-12-09T22:40:54Z","started_date_time":null,"account_id":1,"check_id":1,"check_run_history_id":1,"location_id":1,"image_count":null,"javascript_count":null,"css_count":null,"html_count":null,"flash_count":null,"other_count":null,"run_record_id":null}},"results":[{"key":"har_records","id":"1935"}]}'
36
- end
37
-
38
- post 'api/v1/har_records_bulk' do
39
- '{"job_id":"b48c6bd17724fd2324a97f4b"}'
40
- end
41
-
42
- delete 'api/v1/har_records_bulk/destroy_by_account_id' do
43
- '{"job_id":"997743e056e5d75ef0a142b4"}'
44
- end
45
-
46
- delete 'api/v1/har_records_bulk/destroy_by_check_id' do
47
- '{"job_id":"d29dcc8754dc997a182f15b5"}'
48
- end
49
-
@@ -1,48 +0,0 @@
1
- require 'rubygems'
2
- require 'sinatra'
3
-
4
- before { request.path_info = request.path_info + '/' + request.query_string }
5
- post 'api/v1/har_records' do
6
- '{"job_id":"00c5ff51ca644e3f3de14dd5"}'
7
- end
8
-
9
- get '/api/v1/har_records/account_id=1' do
10
- '{"count":1,"har_records":{"1940":{"id":"1940","source_url":null,"wait_time":null,"dns_time":null,"send_time":null,"connect_time":null,"blocked_time":null,"receive_time":null,"browser":null,"creator":null,"domain":null,"har_url":"https://s3.amazonaws.com/checkdata.rigor.com/49.harp","entry_count":null,"error_count":null,"dom_load_time":null,"page_load_time":null,"server_time":null,"page_size":null,"client_error_count":null,"server_error_count":null,"connection_error_count":null,"created_at":"2013-12-09T22:40:54Z","updated_at":"2013-12-09T22:40:54Z","started_date_time":null,"account_id":1,"check_id":1,"check_run_history_id":1,"location_id":1,"image_count":null,"javascript_count":null,"css_count":null,"html_count":null,"flash_count":null,"other_count":null,"run_record_id":null}},"results":[{"key":"har_records","id":"1940"}]}'
11
- end
12
-
13
- get '/api/v1/har_records/check_id=1' do
14
- '{"count":1,"har_records":{"1941":{"id":"1941","source_url":null,"wait_time":null,"dns_time":null,"send_time":null,"connect_time":null,"blocked_time":null,"receive_time":null,"browser":null,"creator":null,"domain":null,"har_url":"https://s3.amazonaws.com/checkdata.rigor.com/50.harp","entry_count":null,"error_count":null,"dom_load_time":null,"page_load_time":null,"server_time":null,"page_size":null,"client_error_count":null,"server_error_count":null,"connection_error_count":null,"created_at":"2013-12-09T22:40:54Z","updated_at":"2013-12-09T22:40:54Z","started_date_time":null,"account_id":1,"check_id":1,"check_run_history_id":1,"location_id":1,"image_count":null,"javascript_count":null,"css_count":null,"html_count":null,"flash_count":null,"other_count":null,"run_record_id":null}},"results":[{"key":"har_records","id":"1941"}]}'
15
- end
16
-
17
- get '/api/v1/har_records/check_run_history_id=1' do
18
- '{"count":1,"har_records":{"1937":{"id":"1937","source_url":null,"wait_time":null,"dns_time":null,"send_time":null,"connect_time":null,"blocked_time":null,"receive_time":null,"browser":null,"creator":null,"domain":null,"har_url":"https://s3.amazonaws.com/checkdata.rigor.com/46.harp","entry_count":null,"error_count":null,"dom_load_time":null,"page_load_time":null,"server_time":null,"page_size":null,"client_error_count":null,"server_error_count":null,"connection_error_count":null,"created_at":"2013-12-09T22:40:54Z","updated_at":"2013-12-09T22:40:54Z","started_date_time":null,"account_id":1,"check_id":1,"check_run_history_id":1,"location_id":1,"image_count":null,"javascript_count":null,"css_count":null,"html_count":null,"flash_count":null,"other_count":null,"run_record_id":null}},"results":[{"key":"har_records","id":"1937"}]}'
19
- end
20
-
21
- get '/api/v1/har_records/start=2013-11-11&end=2013-11-21' do
22
- '{"count":1,"har_records":{"1936":{"id":"1936","source_url":null,"wait_time":null,"dns_time":null,"send_time":null,"connect_time":null,"blocked_time":null,"receive_time":null,"browser":null,"creator":null,"domain":null,"har_url":"https://s3.amazonaws.com/checkdata.rigor.com/45.harp","entry_count":null,"error_count":null,"dom_load_time":null,"page_load_time":null,"server_time":null,"page_size":null,"client_error_count":null,"server_error_count":null,"connection_error_count":null,"created_at":"2013-12-09T22:40:54Z","updated_at":"2013-12-09T22:40:54Z","started_date_time":null,"account_id":1,"check_id":1,"check_run_history_id":1,"location_id":1,"image_count":null,"javascript_count":null,"css_count":null,"html_count":null,"flash_count":null,"other_count":null,"run_record_id":null}},"results":[{"key":"har_records","id":"1936"}]}'
23
- end
24
-
25
- get '/api/v1/har_records/location_id=1' do
26
- '{"count":1,"har_records":{"1939":{"id":"1939","source_url":null,"wait_time":null,"dns_time":null,"send_time":null,"connect_time":null,"blocked_time":null,"receive_time":null,"browser":null,"creator":null,"domain":null,"har_url":"https://s3.amazonaws.com/checkdata.rigor.com/48.harp","entry_count":null,"error_count":null,"dom_load_time":null,"page_load_time":null,"server_time":null,"page_size":null,"client_error_count":null,"server_error_count":null,"connection_error_count":null,"created_at":"2013-12-09T22:40:54Z","updated_at":"2013-12-09T22:40:54Z","started_date_time":null,"account_id":1,"check_id":1,"check_run_history_id":1,"location_id":1,"image_count":null,"javascript_count":null,"css_count":null,"html_count":null,"flash_count":null,"other_count":null,"run_record_id":null}},"results":[{"key":"har_records","id":"1939"}]}'
27
- end
28
-
29
- get '/api/v1/har_records' do
30
- '{"count":1,"har_records":{"1938":{"id":"1938","source_url":null,"wait_time":null,"dns_time":null,"send_time":null,"connect_time":null,"blocked_time":null,"receive_time":null,"browser":null,"creator":null,"domain":null,"har_url":"https://s3.amazonaws.com/checkdata.rigor.com/47.harp","entry_count":null,"error_count":null,"dom_load_time":null,"page_load_time":null,"server_time":null,"page_size":null,"client_error_count":null,"server_error_count":null,"connection_error_count":null,"created_at":"2013-12-09T22:40:54Z","updated_at":"2013-12-09T22:40:54Z","started_date_time":null,"account_id":1,"check_id":1,"check_run_history_id":1,"location_id":1,"image_count":null,"javascript_count":null,"css_count":null,"html_count":null,"flash_count":null,"other_count":null,"run_record_id":null}},"results":[{"key":"har_records","id":"1938"}]}'
31
- end
32
-
33
- get '/api/v1/har_records/per_page=1&page=1' do
34
- '{"count":1,"har_records":{"1935":{"id":"1935","source_url":null,"wait_time":null,"dns_time":null,"send_time":null,"connect_time":null,"blocked_time":null,"receive_time":null,"browser":null,"creator":null,"domain":null,"har_url":"https://s3.amazonaws.com/checkdata.rigor.com/44.harp","entry_count":null,"error_count":null,"dom_load_time":null,"page_load_time":null,"server_time":null,"page_size":null,"client_error_count":null,"server_error_count":null,"connection_error_count":null,"created_at":"2013-12-09T22:40:54Z","updated_at":"2013-12-09T22:40:54Z","started_date_time":null,"account_id":1,"check_id":1,"check_run_history_id":1,"location_id":1,"image_count":null,"javascript_count":null,"css_count":null,"html_count":null,"flash_count":null,"other_count":null,"run_record_id":null}},"results":[{"key":"har_records","id":"1935"}]}'
35
- end
36
-
37
- post 'api/v1/har_records_bulk' do
38
- '{"job_id":"b48c6bd17724fd2324a97f4b"}'
39
- end
40
-
41
- delete 'api/v1/har_records_bulk/destroy_by_account_id' do
42
- '{"job_id":"997743e056e5d75ef0a142b4"}'
43
- end
44
-
45
- delete 'api/v1/har_records_bulk/destroy_by_check_id' do
46
- '{"job_id":"d29dcc8754dc997a182f15b5"}'
47
- end
48
-