excursion 0.1.9 → 0.2.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/app/assets/javascripts/excursion.js +14 -4
- data/lib/excursion.rb +0 -1
- data/lib/excursion/builders/application_builder.rb +0 -3
- data/lib/excursion/builders/url_builder.rb +15 -9
- data/lib/excursion/cors.rb +15 -5
- data/lib/excursion/datastores/test.rb +15 -3
- data/lib/excursion/pool.rb +37 -17
- data/lib/excursion/pool/application.rb +1 -1
- data/lib/excursion/railtie.rb +3 -5
- data/lib/excursion/version.rb +1 -1
- data/spec/controllers/excursion_controller_spec.rb +4 -0
- data/spec/dummy/config/application.rb +1 -45
- data/spec/dummy/config/environments/development.rb +0 -6
- data/spec/dummy/config/environments/production.rb +1 -51
- data/spec/dummy/config/environments/test.rb +0 -7
- data/spec/dummy/config/initializers/wrap_parameters.rb +9 -7
- data/spec/dummy/config/routes.rb +1 -0
- data/spec/dummy/log/development.log +29110 -0
- data/spec/excursion/cors_spec.rb +4 -0
- data/spec/excursion/pool_spec.rb +1 -1
- data/spec/spec_helper.rb +2 -0
- metadata +22 -5
- data/lib/excursion/asset_middleware.rb +0 -18
data/spec/excursion/pool_spec.rb
CHANGED
@@ -49,7 +49,7 @@ describe 'Excursion::Pool' do
|
|
49
49
|
it 'should require the memcache_server option be configured' do
|
50
50
|
Excursion.configuration.datastore = :memcache
|
51
51
|
Excursion.configuration.memcache_server = nil
|
52
|
-
expect { Excursion::Pool.datastore }.to raise_exception(Excursion::
|
52
|
+
expect { Excursion::Pool.datastore }.to raise_exception(Excursion::DatastoreConfigurationError)
|
53
53
|
end
|
54
54
|
|
55
55
|
it 'should return an instance of Excursion::Datastores::Memcache' do
|
data/spec/spec_helper.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: excursion
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1
|
4
|
+
version: 0.2.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Mark Rebec
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-
|
11
|
+
date: 2014-03-04 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|
@@ -16,14 +16,14 @@ dependencies:
|
|
16
16
|
requirements:
|
17
17
|
- - '>='
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version: 3.
|
19
|
+
version: 3.2.0
|
20
20
|
type: :runtime
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
24
|
- - '>='
|
25
25
|
- !ruby/object:Gem::Version
|
26
|
-
version: 3.
|
26
|
+
version: 3.2.0
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: rspec-rails
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
@@ -66,6 +66,20 @@ dependencies:
|
|
66
66
|
- - '>='
|
67
67
|
- !ruby/object:Gem::Version
|
68
68
|
version: '0'
|
69
|
+
- !ruby/object:Gem::Dependency
|
70
|
+
name: coveralls
|
71
|
+
requirement: !ruby/object:Gem::Requirement
|
72
|
+
requirements:
|
73
|
+
- - '>='
|
74
|
+
- !ruby/object:Gem::Version
|
75
|
+
version: '0'
|
76
|
+
type: :development
|
77
|
+
prerelease: false
|
78
|
+
version_requirements: !ruby/object:Gem::Requirement
|
79
|
+
requirements:
|
80
|
+
- - '>='
|
81
|
+
- !ruby/object:Gem::Version
|
82
|
+
version: '0'
|
69
83
|
description: Provides optional javascript url helpers, CORS configuration and a pool
|
70
84
|
of routes into which applications can dump their host information and routing table.
|
71
85
|
Other applications can then utilize application namespaced helper methods for redirecting,
|
@@ -82,7 +96,6 @@ files:
|
|
82
96
|
- lib/excursion/exceptions/pool.rb
|
83
97
|
- lib/excursion/exceptions/active_record.rb
|
84
98
|
- lib/excursion/exceptions/memcache.rb
|
85
|
-
- lib/excursion/asset_middleware.rb
|
86
99
|
- lib/excursion/pool/dummy_application.rb
|
87
100
|
- lib/excursion/pool/dsl.rb
|
88
101
|
- lib/excursion/pool/application.rb
|
@@ -150,6 +163,7 @@ files:
|
|
150
163
|
- spec/dummy/app/assets/images/rails.png
|
151
164
|
- spec/dummy/Rakefile
|
152
165
|
- spec/support/mocks.rb
|
166
|
+
- spec/excursion/cors_spec.rb
|
153
167
|
- spec/excursion/route_pool_spec.rb
|
154
168
|
- spec/excursion/pool/dsl_spec.rb
|
155
169
|
- spec/excursion/pool/application_spec.rb
|
@@ -164,6 +178,7 @@ files:
|
|
164
178
|
- spec/excursion/builders/url_builder_spec.rb
|
165
179
|
- spec/excursion/builders/application_builder_spec.rb
|
166
180
|
- spec/helpers/excursion/javascript_helper_spec.rb
|
181
|
+
- spec/controllers/excursion_controller_spec.rb
|
167
182
|
- spec/spec_helper.rb
|
168
183
|
homepage: http://github.com/markrebec/excursion
|
169
184
|
licenses:
|
@@ -231,6 +246,7 @@ test_files:
|
|
231
246
|
- spec/dummy/app/assets/images/rails.png
|
232
247
|
- spec/dummy/Rakefile
|
233
248
|
- spec/support/mocks.rb
|
249
|
+
- spec/excursion/cors_spec.rb
|
234
250
|
- spec/excursion/route_pool_spec.rb
|
235
251
|
- spec/excursion/pool/dsl_spec.rb
|
236
252
|
- spec/excursion/pool/application_spec.rb
|
@@ -245,5 +261,6 @@ test_files:
|
|
245
261
|
- spec/excursion/builders/url_builder_spec.rb
|
246
262
|
- spec/excursion/builders/application_builder_spec.rb
|
247
263
|
- spec/helpers/excursion/javascript_helper_spec.rb
|
264
|
+
- spec/controllers/excursion_controller_spec.rb
|
248
265
|
- spec/spec_helper.rb
|
249
266
|
has_rdoc:
|
@@ -1,18 +0,0 @@
|
|
1
|
-
module Excursion
|
2
|
-
class AssetMiddleware
|
3
|
-
def initialize(app)
|
4
|
-
@app = app
|
5
|
-
end
|
6
|
-
|
7
|
-
def call(env)
|
8
|
-
request = Rack::Request.new(env)
|
9
|
-
response = @app.call(env)
|
10
|
-
if request.path =~ /^\/assets\/excursion\//
|
11
|
-
response[1]["Cache-Control"] = 'no-cache, no-store'
|
12
|
-
response[1]["Etag"] = Digest::MD5.hexdigest(Excursion::Pool.all_applications.values.map(&:to_cache).to_json.to_s)
|
13
|
-
response[1]["Last-Modified"] = Time.at(Excursion::Pool.pool_updated).strftime('%a, %d %b %Y %H:%M:%S %Z')
|
14
|
-
end
|
15
|
-
response
|
16
|
-
end
|
17
|
-
end
|
18
|
-
end
|