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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: aabb3d0316915e2568b0570f28ddb8b717b347ab
4
- data.tar.gz: 95a98c54896fd63983f12a42eee6792b4c16215d
3
+ metadata.gz: e78b93732ae275287cfa9f8842d1534cc964d679
4
+ data.tar.gz: 0ce133ef1fed523dc8a4d6587583c0cb7e166c12
5
5
  SHA512:
6
- metadata.gz: 078fdf4317362d0a9e632d60b2f1d792f147806236802412d255a64b4c07da235b7225f0e5bae1de20b4f95d027b4429111acdea7c758f30c052a92f706d78c0
7
- data.tar.gz: b5c6ec59e2525b7be0f923e6e607a5b16d18df5c62b3b6e4ab849ac01958df474e18a2b6969e488a82088efeba2896e50698b552fa5ce25c76996b7fb2cc25fb
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
- Xdomain.configure do |config|
97
+ XdomainRails.configure do |config|
98
98
  # path to default xdomain proxy
99
99
  # default: '/xdomain/proxy'
100
100
 
@@ -1,8 +1,16 @@
1
1
  module XdomainRails
2
2
  class XdomainController < ApplicationController
3
+ after_action :allow_iframe
4
+
3
5
  layout false
4
6
 
5
7
  def proxy
6
8
  end
9
+
10
+ private
11
+
12
+ def allow_iframe
13
+ response.headers.except! 'X-Frame-Options'
14
+ end
7
15
  end
8
16
  end
@@ -1,3 +1,3 @@
1
1
  module XdomainRails
2
- VERSION = "1.0.0"
2
+ VERSION = "1.0.1"
3
3
  end
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.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-09-30 00:00:00.000000000 Z
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.4.1
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: