rails-client-logger 1.0.2 → 1.0.3
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/README.md +23 -1
- data/lib/rails-client-logger/version.rb +1 -1
- data/vendor/assets/javascripts/rails_client_logger.js.coffee +4 -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: bf6ff6cde7fee4cd6174a386f495adb48bfff5f3
|
4
|
+
data.tar.gz: ecc87f453cf7a77588b27c592ae8751a91ec6d9c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f4284ab942f01b6fa0b9dd494a7e2013e44e3d0f757ed45ce6b8d09b3371908570ec6e2372400a0963e12afb30d91c06bc053918480a750df113ee75adc6258f
|
7
|
+
data.tar.gz: 770b5c7a13c2245cfe663313eb388f11478f5d96bc1b2a640625432c1bea982448cf2d2f76a37c405b186438dfbda1c6b089d52e19b01161e8a6567fd8536531
|
data/README.md
CHANGED
@@ -89,6 +89,27 @@ The gem uses a controller to send messages to the server, in some cases you may
|
|
89
89
|
mount RailsClientLogger::Engine, :at => "logger"
|
90
90
|
```
|
91
91
|
|
92
|
+
## Namespaced Logger URL
|
93
|
+
|
94
|
+
In case you need more flexibility with the url handling, for example if you have an API only app.
|
95
|
+
|
96
|
+
1. Modify routes.rb to include namespaced API routes
|
97
|
+
|
98
|
+
```ruby
|
99
|
+
namespace :api do
|
100
|
+
namespace :v1 do
|
101
|
+
mount RailsClientLogger::Engine, :at => "apilogger"
|
102
|
+
end
|
103
|
+
end
|
104
|
+
```
|
105
|
+
|
106
|
+
2. Specify global vars like
|
107
|
+
|
108
|
+
```javascript
|
109
|
+
window.jsLoggerBasePath = "/api/v1"
|
110
|
+
window.jsLoggerUrl = "/apilogger/rails_client_logger/log"
|
111
|
+
```
|
112
|
+
|
92
113
|
## Contributing
|
93
114
|
|
94
115
|
1. Fork it
|
@@ -106,8 +127,9 @@ The gem uses a controller to send messages to the server, in some cases you may
|
|
106
127
|
[elthariel](https://github.com/elthariel) - for Rails 4 support and CoffeeScript
|
107
128
|
implementation
|
108
129
|
|
130
|
+
[rhino232](https://github.com/rhino232) - for namespaced URLs
|
131
|
+
|
109
132
|
## License
|
110
133
|
MIT License
|
111
134
|
|
112
135
|
Copyright (c) 2013 Girish Sonawane (girish dot sonawane at gmail dot com)
|
113
|
-
|
@@ -1,3 +1,6 @@
|
|
1
|
+
window.jsLoggerBasePath ||= ''
|
2
|
+
window.jsLoggerUrl ||= "/logger/rails_client_logger/log"
|
3
|
+
|
1
4
|
window.jsLogger =
|
2
5
|
invoke: (level, message) ->
|
3
6
|
jQuery.ajax {
|
@@ -7,7 +10,7 @@ window.jsLogger =
|
|
7
10
|
data: {level: level, message: message}
|
8
11
|
complete: (request) ->
|
9
12
|
# Nothing yet
|
10
|
-
url: "
|
13
|
+
url: "" + window.jsLoggerBasePath + window.jsLoggerUrl
|
11
14
|
}
|
12
15
|
|
13
16
|
debug: (message) ->
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rails-client-logger
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.
|
4
|
+
version: 1.0.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Girish Sonawane
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2014-05
|
12
|
+
date: 2014-09-05 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: rails
|