Skip to content

Commit 5fa109e

Browse files
committed
added support for self-hosted raven-js library;
1 parent 029538a commit 5fa109e

File tree

3 files changed

+11
-4
lines changed

3 files changed

+11
-4
lines changed

β€ŽREADME.mdβ€Ž

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,12 @@ For more information see official [Sentry repository](https://github.com/getsent
1919
"source": "vendor/burdapraha/oc_sentry/upload",
2020
"destination": "upload",
2121
"debug": "true"
22-
}
22+
},
23+
{
24+
"source": "vendor/burdapraha/oc_version_number/upload",
25+
"destination": "upload",
26+
"debug": "true"
27+
}
2328
]
2429
}
2530
```
@@ -30,6 +35,7 @@ It will move vQmod xml file to correct folder.
3035

3136
- `define('SENTRY_PHP', 'FILL_YOUR_ACCESS_PHP');`
3237
- `define('SENTRY_JS', 'FILL_YOUR_ACCESS_JS');`
38+
- `define('SENTRY_JS_LIB', ''); // here constant is optional, if you want use self-hosted raven-js library`
3339

3440
6. optionally you can add row to your `.gitignore` file with path to sentry.xml (example: upload/vqmod/xml/sentry.xml)
3541
7. celebrate! πŸŽ‰ πŸŽ‰ πŸŽ‰

β€Žcomposer.jsonβ€Ž

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
"require": {
99
"php": ">=5.6.0",
1010
"sasedev/composer-plugin-filecopier": "^1.1",
11-
"sentry/sentry": "^1.7"
11+
"sentry/sentry": "^1.7",
12+
"burdapraha/oc_version_number": "^1.0"
1213
}
1314
}

β€Župload/vqmod/xml/sentry.xmlβ€Ž

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,8 +44,8 @@
4444
<search position="before">
4545
<![CDATA[<?php foreach ($scripts as $script) { ?>]]>
4646
</search>
47-
<add><![CDATA[<script src="https://cdn.ravenjs.com/3.15.0/raven.min.js" type="text/javascript"></script>
48-
<script><?php if(defined('SENTRY_JS') && !empty(SENTRY_JS)) {?>Raven.config("<?php echo SENTRY_JS ?>").install()<?php }else {?>console.warn('Please setup your `SENTRY_JS` constant for log errors.')<?php }?></script>]]></add>
47+
<add><![CDATA[<script src="<?php if(!defined('SENTRY_JS_LIB') && !empty(SENTRY_JS_LIB)) {?>https://cdn.ravenjs.com/3.15.0/raven.min.js<?php }else {echo SENTRY_JS_LIB; ?><?php }?>" type="text/javascript"></script>
48+
<script><?php if(defined('SENTRY_JS') && !empty(SENTRY_JS)) {?>Raven.config("<?php echo SENTRY_JS ?>").install()<?php }else {?>console.warn('Please setup your `SENTRY_JS` constant for log errors.')<?php }?></script>]]></add>
4949
</operation>
5050
</file>
5151

0 commit comments

Comments
Β (0)