front_end_builds 0.0.1 → 0.0.2

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 20481cc2b843d67d5fa16c51f35827c1e4700f9c
4
- data.tar.gz: e0be7cf579d0783f1c50439708d99a4cac240d1b
3
+ metadata.gz: 604bf9e0a83fad3c0c624698c52ec16bf00908a1
4
+ data.tar.gz: f9255252feb4be6a07fa6c145e731f68d17d577a
5
5
  SHA512:
6
- metadata.gz: 0e2c9ec15f9628b4e05715244efeb6e14839e6ecd1a807613f6ae30dc504bbadc0b9ce873b8471485cb667c8e5e6cfe5457c1bff35e10d02d00837bd7ed410ef
7
- data.tar.gz: a386fabf124d546256a923ad0d50737aafbaf4b293ae87a1364ff735f55bd490f9a068f0c987763ab336a74653fb87ff6d10366ab16a0695c50193e93b98f7b5
6
+ metadata.gz: 90a49d26638821a8a73055387eb7c35aa6a00c52a0164fbcfbcf5cbbf6566e08adf88dcedf325da54e5d4281fc7f515c6740fb79fb3a5cc30a777821ba0cbdb9
7
+ data.tar.gz: a6a76c787601104f793b6124565b1d1119ea94219b845dcebe20315121508c63c375e9b6efc6cc5d9d6d26ef8745d7c4dbf98ffce0adc63bd8a432e9ca4f1f96
@@ -1,3 +1,5 @@
1
+ require 'front_end_builds/routing_constraints/html_routing_constraint'
2
+
1
3
  module ActionDispatch::Routing
2
4
  class Mapper
3
5
 
@@ -19,14 +21,16 @@ module ActionDispatch::Routing
19
21
  }
20
22
  )
21
23
 
22
- # Fetch a build for this app.
23
- get(
24
- "/#{path}/(*path)" => "front_end_builds/builds#index",
25
- defaults: {
26
- branch: :master,
27
- app_name: name
28
- }.merge(options)
29
- )
24
+ # Get a build for this app.
25
+ constraints FrontEndBuilds::HtmlRoutingConstraint.new do
26
+ get(
27
+ "/#{path}/(*path)" => "front_end_builds/builds#index",
28
+ defaults: {
29
+ branch: :master,
30
+ app_name: name
31
+ }.merge(options)
32
+ )
33
+ end
30
34
  end
31
35
 
32
36
  end
@@ -0,0 +1,7 @@
1
+ module FrontEndBuilds
2
+ class HtmlRoutingConstraint
3
+ def matches?(request)
4
+ request.format == :html && !request.xhr?
5
+ end
6
+ end
7
+ end
@@ -1,3 +1,3 @@
1
1
  module FrontEndBuilds
2
- VERSION = "0.0.1"
2
+ VERSION = "0.0.2"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: front_end_builds
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.1
4
+ version: 0.0.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - 'Ryan Toronto '
@@ -145,6 +145,7 @@ files:
145
145
  - lib/front_end_builds.rb
146
146
  - lib/front_end_builds/engine.rb
147
147
  - lib/front_end_builds/ext/routes.rb
148
+ - lib/front_end_builds/routing_constraints/html_routing_constraint.rb
148
149
  - lib/front_end_builds/version.rb
149
150
  - lib/tasks/front_end_builds_tasks.rake
150
151
  homepage: http://github.com/tedconf/front_end_builds