front_end_builds 0.0.13 → 0.0.14
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/Rakefile +17 -7
- data/app/assets/javascripts/front_end_builds/admin.js +1 -1
- data/app/assets/javascripts/front_end_builds/vendor.js +20 -20
- data/app/assets/stylesheets/front_end_builds/admin.css +1 -1
- data/app/controllers/front_end_builds/apps_controller.rb +18 -40
- data/app/controllers/front_end_builds/bests_controller.rb +58 -0
- data/app/controllers/front_end_builds/builds_controller.rb +13 -19
- data/app/controllers/front_end_builds/host_apps_controller.rb +16 -0
- data/app/models/front_end_builds/app.rb +43 -4
- data/app/models/front_end_builds/build.rb +23 -5
- data/app/views/front_end_builds/admin/index.html.erb +0 -1
- data/config/routes.rb +9 -3
- data/db/migrate/20150114202950_require_manual_activation.rb +8 -0
- data/lib/front_end_builds/engine.rb +8 -13
- data/lib/front_end_builds/ext/routes.rb +18 -5
- data/lib/front_end_builds/version.rb +1 -1
- metadata +5 -2
data/config/routes.rb
CHANGED
@@ -1,12 +1,18 @@
|
|
1
|
-
#
|
1
|
+
# This is for the admin area.
|
2
2
|
FrontEndBuilds::Engine.routes.draw do
|
3
|
-
|
3
|
+
scope :api do
|
4
|
+
resources :apps, only: [:index, :show, :create, :edit, :destroy]
|
5
|
+
resources :builds, only: [:index, :show, :edit]
|
6
|
+
resources :host_apps, only: [:show]
|
7
|
+
end
|
4
8
|
|
5
9
|
get '/(*path)', to: 'admin#index'
|
6
10
|
end
|
7
11
|
|
12
|
+
# This is for the posting of new apps.
|
8
13
|
Rails.application.routes.draw do
|
9
14
|
namespace :front_end_builds do
|
10
|
-
resources :builds, only: [:
|
15
|
+
resources :builds, only: [:create]
|
16
|
+
resource :best, only: [:show]
|
11
17
|
end
|
12
18
|
end
|
@@ -9,18 +9,13 @@ module FrontEndBuilds
|
|
9
9
|
g.helper false
|
10
10
|
end
|
11
11
|
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
#front_end_builds/admin.css
|
21
|
-
#front_end_builds/vendor.js
|
22
|
-
#front_end_builds/admin.js
|
23
|
-
#)
|
24
|
-
#end
|
12
|
+
initializer "front_end_assets.assets.precompile", group: :all do |app|
|
13
|
+
app.config.assets.precompile += %w(
|
14
|
+
front_end_builds/vendor.css
|
15
|
+
front_end_builds/admin.css
|
16
|
+
front_end_builds/vendor.js
|
17
|
+
front_end_builds/admin.js
|
18
|
+
)
|
19
|
+
end
|
25
20
|
end
|
26
21
|
end
|
@@ -5,6 +5,11 @@ module ActionDispatch::Routing
|
|
5
5
|
|
6
6
|
# Create a front end in your rails router.
|
7
7
|
def front_end(name, path = name, options = {})
|
8
|
+
defaults = {
|
9
|
+
branch: 'master',
|
10
|
+
app_name: name
|
11
|
+
}.merge(options)
|
12
|
+
|
8
13
|
# Create a new build for this app.
|
9
14
|
post(
|
10
15
|
"#{path}" => "front_end_builds/builds#create",
|
@@ -16,13 +21,21 @@ module ActionDispatch::Routing
|
|
16
21
|
# Get a build for this app.
|
17
22
|
constraints FrontEndBuilds::HtmlRoutingConstraint.new do
|
18
23
|
get(
|
19
|
-
"/#{path}/(*path)" => "front_end_builds/
|
20
|
-
defaults:
|
21
|
-
branch: 'master',
|
22
|
-
app_name: name
|
23
|
-
}.merge(options)
|
24
|
+
"/#{path}/(*path)" => "front_end_builds/bests#show",
|
25
|
+
defaults: defaults
|
24
26
|
)
|
27
|
+
|
28
|
+
# Need a better way to do this
|
29
|
+
front_end_route = Rails.application.routes.routes.routes.find do |route|
|
30
|
+
route.defaults == defaults.merge(
|
31
|
+
controller: "front_end_builds/bests",
|
32
|
+
action: "show"
|
33
|
+
)
|
34
|
+
end
|
35
|
+
|
36
|
+
FrontEndBuilds::App.register_url(name, front_end_route.format({}))
|
25
37
|
end
|
38
|
+
|
26
39
|
end
|
27
40
|
|
28
41
|
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.
|
4
|
+
version: 0.0.14
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Ryan Toronto
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2015-01-
|
12
|
+
date: 2015-01-15 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: sqlite3
|
@@ -133,7 +133,9 @@ files:
|
|
133
133
|
- app/controllers/front_end_builds/admin_controller.rb
|
134
134
|
- app/controllers/front_end_builds/application_controller.rb
|
135
135
|
- app/controllers/front_end_builds/apps_controller.rb
|
136
|
+
- app/controllers/front_end_builds/bests_controller.rb
|
136
137
|
- app/controllers/front_end_builds/builds_controller.rb
|
138
|
+
- app/controllers/front_end_builds/host_apps_controller.rb
|
137
139
|
- app/helpers/front_end_builds/application_helper.rb
|
138
140
|
- app/models/front_end_builds/app.rb
|
139
141
|
- app/models/front_end_builds/build.rb
|
@@ -142,6 +144,7 @@ files:
|
|
142
144
|
- db/migrate/20141010162405_create_front_end_builds_builds.rb
|
143
145
|
- db/migrate/20141010165726_create_front_end_builds_apps.rb
|
144
146
|
- db/migrate/20141105222855_add_endpoint_to_front_end_builds_build.rb
|
147
|
+
- db/migrate/20150114202950_require_manual_activation.rb
|
145
148
|
- lib/front_end_builds.rb
|
146
149
|
- lib/front_end_builds/engine.rb
|
147
150
|
- lib/front_end_builds/ext/routes.rb
|