xdomain-rails 1.0.0 → 1.0.1
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 +7 -7
- data/app/controllers/xdomain_rails/xdomain_controller.rb +8 -0
- data/lib/xdomain_rails/version.rb +1 -1
- metadata +3 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: e78b93732ae275287cfa9f8842d1534cc964d679
|
4
|
+
data.tar.gz: 0ce133ef1fed523dc8a4d6587583c0cb7e166c12
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f95dd1335ed8b051258e8fcb81601a205990846bcbc2f09a0e593b2df0bf6fa34d25a87a5a2e6bf9565cb4a1f3ada565273692f6539f7925f4c49c029c3c141a
|
7
|
+
data.tar.gz: 9682bffb5c272a90fbf11206855cae5018214c61d96a8626912c59f46f71c7ffeb5b2edfff8e09acbf826c19ad3debc60c7276df63052ef33d8c8fce196a60b8
|
data/README.md
CHANGED
@@ -15,7 +15,7 @@ And then execute:
|
|
15
15
|
|
16
16
|
## Usage
|
17
17
|
|
18
|
-
The gem provides very simple API.
|
18
|
+
The gem provides a very simple API.
|
19
19
|
|
20
20
|
Consulting [XDomain README](https://github.com/jpillora/xdomain)
|
21
21
|
before using this gem is a good idea.
|
@@ -24,8 +24,8 @@ I highly recommend and assume that you are using
|
|
24
24
|
[dotenv-rails](https://github.com/bkeepers/dotenv).
|
25
25
|
|
26
26
|
Let's say we want to configure http://master.example.com
|
27
|
-
(the domain which you are making requests from) as master domain
|
28
|
-
and http://slave.example.com (which receives requests) as slave domain.
|
27
|
+
(the domain which you are making requests from) as a master domain
|
28
|
+
and http://slave.example.com (which receives requests) as a slave domain.
|
29
29
|
|
30
30
|
### Slave domain
|
31
31
|
|
@@ -41,7 +41,7 @@ Add following ENV variable to your .env:
|
|
41
41
|
XDOMAIN_MASTERS=http://master.example.com
|
42
42
|
```
|
43
43
|
|
44
|
-
Note: you can also limit scope, use wildcards and add few domains,
|
44
|
+
Note: you can also limit a scope, use wildcards and add few domains,
|
45
45
|
consult [configuration section](#configuration) for more informations:
|
46
46
|
```
|
47
47
|
XDOMAIN_MASTERS=*.example.com/api/*.json *.another.com
|
@@ -72,7 +72,7 @@ $.get('http://slave.example.com/secret.json')
|
|
72
72
|
|
73
73
|
More sophisticated configuration is supported.
|
74
74
|
|
75
|
-
By default, gem will load domain configuration as JSON
|
75
|
+
By default, gem will load a domain configuration as JSON
|
76
76
|
from following ENV variables:
|
77
77
|
|
78
78
|
```
|
@@ -82,7 +82,7 @@ XDOMAIN_SLAVES='["http://first.example.com", "http://another.example.com/another
|
|
82
82
|
|
83
83
|
As in XDomain, you can use wildcards in your master domains setup.
|
84
84
|
|
85
|
-
To change path for proxy, which by default is `/xdomain/proxy`
|
85
|
+
To change the path for proxy, which by default is `/xdomain/proxy`
|
86
86
|
you can just add it in ENV variable:
|
87
87
|
|
88
88
|
```
|
@@ -94,7 +94,7 @@ or you want to customize variable names, just create file
|
|
94
94
|
`config/initializers/xdomain_rails.rb` (**server restart required**):
|
95
95
|
|
96
96
|
```ruby
|
97
|
-
|
97
|
+
XdomainRails.configure do |config|
|
98
98
|
# path to default xdomain proxy
|
99
99
|
# default: '/xdomain/proxy'
|
100
100
|
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: xdomain-rails
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.
|
4
|
+
version: 1.0.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Lucjan Suski
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-
|
11
|
+
date: 2014-11-11 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -94,9 +94,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
94
94
|
version: '0'
|
95
95
|
requirements: []
|
96
96
|
rubyforge_project:
|
97
|
-
rubygems_version: 2.
|
97
|
+
rubygems_version: 2.2.2
|
98
98
|
signing_key:
|
99
99
|
specification_version: 4
|
100
100
|
summary: Xdomain gem for Rails
|
101
101
|
test_files: []
|
102
|
-
has_rdoc:
|