watchdocs-rails 0.4.6 → 0.5.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/.DS_Store +0 -0
- data/README.md +17 -3
- data/lib/watchdocs/rails/configuration.rb +6 -2
- data/lib/watchdocs/rails/recordings/exporter.rb +9 -1
- data/lib/watchdocs/rails/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA1:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: c23ba266af8e362dea8a252ee94b8f14ea674b04
|
|
4
|
+
data.tar.gz: 1ad9a1c35537eef31a26556ce1d3089359c07438
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 2e8e923956c0d9f084484ea0a91e007ca3f811b71c4f44c1b9dbd4fff2a84386d403e8306bd25ab3ae81e483c132948de4a72f49932cdf34bda9dce30dd9c03b
|
|
7
|
+
data.tar.gz: b4ef7736521736cfa8d7c33c719e04b1772e27d840e7dc81380338af88d239ff5152eec7c2b7388929abf364e1eb32ae9c28f46c2460c9c43f38f8d5626fe4f8
|
data/.DS_Store
CHANGED
|
Binary file
|
data/README.md
CHANGED
|
@@ -26,7 +26,9 @@ Create `config/initializers/watchdocs.rb` and configure the gem if you need to c
|
|
|
26
26
|
Watchdocs::Rails.configure do |c|
|
|
27
27
|
c.buffer_size = 50
|
|
28
28
|
c.temp_directory = 'tmp'
|
|
29
|
-
c.export_url = '
|
|
29
|
+
c.export_url = 'https://watchdocs-api.herokuapp.com/api/v1/project/10/reports'
|
|
30
|
+
c.api_key = '8L9qh77q9570H0LIz90Aj00T5mcOHW1w'
|
|
31
|
+
c.api_secret = 'G52uFXHPjyxRY3JdBIsw562uJ8bUdrE2'
|
|
30
32
|
end
|
|
31
33
|
```
|
|
32
34
|
|
|
@@ -46,9 +48,21 @@ Directory to store temporary file with recordings.
|
|
|
46
48
|
|
|
47
49
|
### export_url
|
|
48
50
|
|
|
49
|
-
**Default:**
|
|
51
|
+
**Default:** https://watchdocs-api.herokuapp.com/api/v1/project/10/reports
|
|
50
52
|
|
|
51
|
-
URL for exporting recorgings to your Watchdocs project.
|
|
53
|
+
URL for exporting recorgings to your Watchdocs project. (Change 10 to a random number)
|
|
54
|
+
|
|
55
|
+
### api_key
|
|
56
|
+
|
|
57
|
+
**Default:** 8L9qh77q9570H0LIz90Aj00T5mcOHW1w
|
|
58
|
+
|
|
59
|
+
API Key which you can get for your Watchdocs project in settings section.
|
|
60
|
+
|
|
61
|
+
### api_secret
|
|
62
|
+
|
|
63
|
+
**Default:** G52uFXHPjyxRY3JdBIsw562uJ8bUdrE2
|
|
64
|
+
|
|
65
|
+
API Secret which you can get for your Watchdocs project in settings section.
|
|
52
66
|
|
|
53
67
|
## Usage
|
|
54
68
|
|
|
@@ -5,12 +5,16 @@ module Watchdocs
|
|
|
5
5
|
include Configurations
|
|
6
6
|
configurable :buffer_size,
|
|
7
7
|
:temp_directory,
|
|
8
|
-
:export_url
|
|
8
|
+
:export_url,
|
|
9
|
+
:api_key,
|
|
10
|
+
:api_secret
|
|
9
11
|
|
|
10
12
|
configuration_defaults do |c|
|
|
11
13
|
c.buffer_size = 50
|
|
12
14
|
c.temp_directory = 'tmp'
|
|
13
|
-
c.export_url = '
|
|
15
|
+
c.export_url = 'https://watchdocs-api.herokuapp.com/api/v1/project/10/reports'
|
|
16
|
+
c.api_key = '8L9qh77q9570H0LIz90Aj00T5mcOHW1w'
|
|
17
|
+
c.api_secret = 'G52uFXHPjyxRY3JdBIsw562uJ8bUdrE2'
|
|
14
18
|
end
|
|
15
19
|
end
|
|
16
20
|
end
|
|
@@ -13,7 +13,8 @@ module Watchdocs
|
|
|
13
13
|
response = HTTParty.post(
|
|
14
14
|
api_url,
|
|
15
15
|
body: payload.to_json,
|
|
16
|
-
headers: { 'Content-Type' => 'application/json' }
|
|
16
|
+
headers: { 'Content-Type' => 'application/json' },
|
|
17
|
+
basic_auth: api_auth
|
|
17
18
|
)
|
|
18
19
|
check_response(response)
|
|
19
20
|
end
|
|
@@ -40,6 +41,13 @@ module Watchdocs
|
|
|
40
41
|
def api_url
|
|
41
42
|
Watchdocs::Rails.configuration.export_url
|
|
42
43
|
end
|
|
44
|
+
|
|
45
|
+
def api_auth
|
|
46
|
+
{
|
|
47
|
+
username: Watchdocs::Rails.configuration.api_key,
|
|
48
|
+
password: Watchdocs::Rails.configuration.api_secret
|
|
49
|
+
}
|
|
50
|
+
end
|
|
43
51
|
end
|
|
44
52
|
end
|
|
45
53
|
end
|
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: watchdocs-rails
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.
|
|
4
|
+
version: 0.5.0
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- mazikwyry
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2017-03-
|
|
11
|
+
date: 2017-03-21 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: bundler
|