front_end_builds 0.0.19 → 0.0.20

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: 2d0062a2dc66d2aaf27e8f7d5b89aac72e34ab47
4
- data.tar.gz: 9f8a20ba073a3ebd36054294732808fae347e730
3
+ metadata.gz: 74b8bf7743b2180cd788c73f42cea7beb4105c63
4
+ data.tar.gz: bb180af8ee4fa50b691b2d20674006277c243c9a
5
5
  SHA512:
6
- metadata.gz: b45a41309333845d763eccb90991ffd8ef06422b1d040599a749d6ab26b238b4953fddf6aed357df6516564834f2dedc147966553aa767ed95b64ec49e9f4d50
7
- data.tar.gz: b51d329f26b67ebb9be42725751c02f04c61fcb59dd1005068e4d0fc851855d9014e73b454f8628cf890343ae48d45314cb57258a3be16de0a4758c02d99389f
6
+ metadata.gz: 4922d3fcb0ad4f8b739d4d48bce4125ec1d25ded7b97cd255a929c573d888ae86d853c525a7b32f7bbcd5cfff811a14d57f5c0cd06b61d5b12db7283af534ca5
7
+ data.tar.gz: 8ebaf4a14fa09e118a234c04c06531453beee77d36c0aa0991a109ed5cee6f62167e3864a3c4ce209b5c09d20d3c75063398ec920bf2a6296f4446c42fead83e
data/Rakefile CHANGED
@@ -24,20 +24,16 @@ end
24
24
 
25
25
  namespace :admin do
26
26
  task :build do
27
- copy_files = {
28
- 'admin/dist/assets/admin.css' => 'app/assets/stylesheets/front_end_builds/admin.css',
29
- 'admin/dist/assets/vendor.css' => 'app/assets/stylesheets/front_end_builds/vendor.css',
30
- 'admin/dist/assets/admin.js' => 'app/assets/javascripts/front_end_builds/admin.js',
31
- 'admin/dist/assets/vendor.js' => 'app/assets/javascripts/front_end_builds/vendor.js',
32
- }
33
-
34
27
  Dir.chdir('admin') do
35
28
  sh 'ember build --environment=production'
36
29
  end
37
30
 
38
- copy_files.each do |source, dest|
39
- FileUtils.cp(source, dest)
40
- end
31
+ # Copy the dist to public
32
+ FileUtils.rm_r 'public/front_end_builds'
33
+ FileUtils.mv 'admin/dist', 'public/front_end_builds'
34
+
35
+ # Move the index out of public
36
+ FileUtils.mv 'public/front_end_builds/index.html', 'app/views/front_end_builds/admin/index.html.erb'
41
37
  end
42
38
  end
43
39
 
@@ -8,9 +8,14 @@ module FrontEndBuilds
8
8
  # engine to into index.html.erb, so the ember app's router
9
9
  # will work appropriately.
10
10
 
11
- # Trim leading/trailing slash marks...
12
- @baseURL = request.fullpath[1..request.fullpath.length-2]
13
- render :index, layout: false
11
+ # Trim trailing slash marks
12
+ baseURL = admin_path[1..-2]
13
+
14
+ html = render_to_string
15
+ html = html.sub('BASEURL', baseURL)
16
+ html = html.sub("baseURL: ''", "baseURL: '#{baseURL}'")
17
+
18
+ render text: html
14
19
  end
15
20
 
16
21
  end
@@ -7,19 +7,25 @@
7
7
  <meta name="description" content="">
8
8
  <meta name="viewport" content="width=device-width, initial-scale=1">
9
9
 
10
+ <base href="/BASEURL/" />
11
+ <meta name="admin/config/environment" content="%7B%22modulePrefix%22%3A%22admin%22%2C%22environment%22%3A%22production%22%2C%22baseURL%22%3A%22BASEURL%22%2C%22locationType%22%3A%22auto%22%2C%22usePodsByDefault%22%3Atrue%2C%22podModulePrefix%22%3A%22admin/pods%22%2C%22EmberENV%22%3A%7B%22FEATURES%22%3A%7B%7D%7D%2C%22APP%22%3A%7B%7D%2C%22usePretender%22%3Afalse%2C%22contentSecurityPolicyHeader%22%3A%22Content-Security-Policy-Report-Only%22%2C%22contentSecurityPolicy%22%3A%7B%22default-src%22%3A%22%27none%27%22%2C%22script-src%22%3A%22%27self%27%22%2C%22font-src%22%3A%22%27self%27%22%2C%22connect-src%22%3A%22%27self%27%22%2C%22img-src%22%3A%22%27self%27%22%2C%22style-src%22%3A%22%27self%27%22%2C%22media-src%22%3A%22%27self%27%22%7D%2C%22exportApplicationGlobal%22%3Afalse%7D" />
12
+
10
13
  <script>
11
14
  window.RAILS_ENV = {
12
- baseURL: '<%=@baseURL%>'
15
+ baseURL: ''
13
16
  }
14
17
  </script>
15
- <base href="/<%=@baseURL%>">
16
- <meta name="admin/config/environment" content="%7B%22modulePrefix%22%3A%22admin%22%2C%22environment%22%3A%22development%22%2C%22baseURL%22%3A%22/%22%2C%22locationType%22%3A%22auto%22%2C%22usePodsByDefault%22%3Atrue%2C%22podModulePrefix%22%3A%22admin/pods%22%2C%22EmberENV%22%3A%7B%22FEATURES%22%3A%7B%7D%7D%2C%22APP%22%3A%7B%7D%2C%22usePretender%22%3Atrue%2C%22contentSecurityPolicyHeader%22%3A%22Content-Security-Policy-Report-Only%22%2C%22contentSecurityPolicy%22%3A%7B%22default-src%22%3A%22%27none%27%22%2C%22script-src%22%3A%22%27self%27%20%27unsafe-eval%27%22%2C%22font-src%22%3A%22%27self%27%22%2C%22connect-src%22%3A%22%27self%27%22%2C%22img-src%22%3A%22%27self%27%22%2C%22style-src%22%3A%22%27self%27%22%2C%22media-src%22%3A%22%27self%27%22%7D%2C%22exportApplicationGlobal%22%3Atrue%7D" />
18
+ <link rel="stylesheet" href="/front_end_builds/assets/vendor-a8105f0efcfa2b3ff559e3a06333c43e.css">
19
+ <link rel="stylesheet" href="/front_end_builds/assets/admin-17ea653cb1023146bd75fd3a119d4a74.css">
17
20
 
18
- <%= stylesheet_link_tag "front_end_builds/vendor.css" %>
19
- <%= stylesheet_link_tag "front_end_builds/admin.css" %>
21
+
20
22
  </head>
21
- <body></body>
23
+ <body>
24
+
25
+
26
+ <script src="/front_end_builds/assets/vendor-957e5671f27c990d4941b8fc8a6be455.js"></script>
27
+ <script src="/front_end_builds/assets/admin-1f5315079e52a2c06749ea766d6f47e5.js"></script>
22
28
 
23
- <%= javascript_include_tag "front_end_builds/vendor.js" %>
24
- <%= javascript_include_tag "front_end_builds/admin.js" %>
29
+
30
+ </body>
25
31
  </html>
data/config/routes.rb CHANGED
@@ -6,7 +6,7 @@ FrontEndBuilds::Engine.routes.draw do
6
6
  resources :host_apps, only: [:show]
7
7
  end
8
8
 
9
- get '/(*path)', to: 'admin#index'
9
+ get '/(*path)', to: 'admin#index', as: :admin
10
10
  end
11
11
 
12
12
  # This is for the posting of new apps.
@@ -9,13 +9,8 @@ module FrontEndBuilds
9
9
  g.helper false
10
10
  end
11
11
 
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
- )
12
+ initializer "static assets" do |app|
13
+ app.middleware.insert_before(::ActionDispatch::Static, ::ActionDispatch::Static, "#{root}/public")
19
14
  end
20
15
  end
21
16
  end
@@ -1,3 +1,3 @@
1
1
  module FrontEndBuilds
2
- VERSION = "0.0.19"
2
+ VERSION = "0.0.20"
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.19
4
+ version: 0.0.20
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-22 00:00:00.000000000 Z
12
+ date: 2015-01-23 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: sqlite3
@@ -119,17 +119,6 @@ extra_rdoc_files: []
119
119
  files:
120
120
  - MIT-LICENSE
121
121
  - Rakefile
122
- - app/assets/fonts/front_end_builds/FontAwesome.otf
123
- - app/assets/fonts/front_end_builds/fontawesome-webfont.eot
124
- - app/assets/fonts/front_end_builds/fontawesome-webfont.svg
125
- - app/assets/fonts/front_end_builds/fontawesome-webfont.ttf
126
- - app/assets/fonts/front_end_builds/fontawesome-webfont.woff
127
- - app/assets/javascripts/front_end_builds/admin.js
128
- - app/assets/javascripts/front_end_builds/application.js
129
- - app/assets/javascripts/front_end_builds/vendor.js
130
- - app/assets/stylesheets/front_end_builds/admin.css
131
- - app/assets/stylesheets/front_end_builds/application.css
132
- - app/assets/stylesheets/front_end_builds/vendor.css
133
122
  - app/controllers/front_end_builds/admin_controller.rb
134
123
  - app/controllers/front_end_builds/application_controller.rb
135
124
  - app/controllers/front_end_builds/apps_controller.rb