rails-frontend 0.1.1 → 0.1.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +8 -8
- data/lib/rails-frontend/version.rb +1 -1
- data/rails-frontend.gemspec +4 -3
- data/template/Gemfile +1 -1
- data/template/Guardfile +0 -2
- data/template/Rakefile +3 -3
- data/template/assets/images/troll.jpg +0 -0
- data/template/boot.rb.erb +16 -25
- metadata +3 -2
checksums.yaml
CHANGED
@@ -1,15 +1,15 @@
|
|
1
1
|
---
|
2
2
|
!binary "U0hBMQ==":
|
3
3
|
metadata.gz: !binary |-
|
4
|
-
|
4
|
+
MmNkNDJkZjBmYWU3MTMzNDdmY2RlYjhjYTdmYjI5ZmFiMDM4N2MxNg==
|
5
5
|
data.tar.gz: !binary |-
|
6
|
-
|
6
|
+
MTU0ODQ2ZDRmMzIwNjUxMjUxOWYwZGEzY2QwNWNiNmZhY2MzZWZjOQ==
|
7
7
|
SHA512:
|
8
8
|
metadata.gz: !binary |-
|
9
|
-
|
10
|
-
|
11
|
-
|
9
|
+
MzI4OWFhYjc0MGE3ZGEwYzQxNzcwOWVkMWRhODg1ZmJjYjAyYTdlZDMxMWFj
|
10
|
+
MWEyMTIyYjg4ZTU4YTY2ZWY5MzlhZDM2ZGMwOGQzNmIwZjg1Mjc5MDY3ZjFi
|
11
|
+
YzgwMGVlY2M2YmM5MmUzNzAzZWJkNjc2YTEyNzA0OGI1ODM2OTA=
|
12
12
|
data.tar.gz: !binary |-
|
13
|
-
|
14
|
-
|
15
|
-
|
13
|
+
ODdiYWNjNmZjM2FlNzMyNjUzMWFlNjg1MmZhZmY5Y2E5MTQzNzdlOTcwYmQz
|
14
|
+
M2I5Njk1NTgxM2E4ZGE1MWM2NTAyYTU4MTIzYWExNGNmM2U3NzRhZTk4MmFh
|
15
|
+
N2QzYjY0MDIzNzJmZTE4OTAwOTlkMzkxNTU5NTNkM2I1MmMxM2M=
|
data/rails-frontend.gemspec
CHANGED
@@ -2,15 +2,15 @@
|
|
2
2
|
# DO NOT EDIT THIS FILE DIRECTLY
|
3
3
|
# Instead, edit Jeweler::Tasks in Rakefile, and run 'rake gemspec'
|
4
4
|
# -*- encoding: utf-8 -*-
|
5
|
-
# stub: rails-frontend 0.1.
|
5
|
+
# stub: rails-frontend 0.1.2 ruby lib
|
6
6
|
|
7
7
|
Gem::Specification.new do |s|
|
8
8
|
s.name = "rails-frontend"
|
9
|
-
s.version = "0.1.
|
9
|
+
s.version = "0.1.2"
|
10
10
|
|
11
11
|
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
12
12
|
s.authors = ["Michael Bensoussan"]
|
13
|
-
s.date = "2014-05-
|
13
|
+
s.date = "2014-05-06"
|
14
14
|
s.description = "Build a static frontend app with rails"
|
15
15
|
s.email = "mbensoussan.is@gmail.com"
|
16
16
|
s.executables = ["rails-frontend"]
|
@@ -37,6 +37,7 @@ Gem::Specification.new do |s|
|
|
37
37
|
"template/Guardfile",
|
38
38
|
"template/Rakefile",
|
39
39
|
"template/app.rb",
|
40
|
+
"template/assets/images/troll.jpg",
|
40
41
|
"template/assets/javascripts/application.js.coffee",
|
41
42
|
"template/assets/stylesheets/application.css.scss",
|
42
43
|
"template/boot.rb.erb",
|
data/template/Gemfile
CHANGED
data/template/Guardfile
CHANGED
data/template/Rakefile
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
require File.expand_path('../
|
1
|
+
require File.expand_path('../boot', __FILE__)
|
2
2
|
require 'sprockets/rails/task'
|
3
3
|
|
4
4
|
Rails.application.load_tasks
|
@@ -16,8 +16,8 @@ task :dist do
|
|
16
16
|
sleep(3)
|
17
17
|
|
18
18
|
puts "scrap the website..."
|
19
|
-
`wget --recursive --page-requisites --html-extension --convert-links --domains localhost -P dist/ localhost:3002`
|
19
|
+
`wget --recursive --page-requisites --html-extension --convert-links ---no-host-directories --domains localhost -P dist/ localhost:3002`
|
20
20
|
|
21
21
|
puts "killing the server..."
|
22
|
-
`kill \`cat rack.pid\``
|
22
|
+
`kill \`cat rack-dist.pid\``
|
23
23
|
end
|
Binary file
|
data/template/boot.rb.erb
CHANGED
@@ -12,38 +12,29 @@ module <%= name.camelize %>; class Application < Rails::Application; end; end
|
|
12
12
|
require 'rails-frontend/controller'
|
13
13
|
require './app'
|
14
14
|
|
15
|
-
|
16
|
-
Rails.
|
17
|
-
config.
|
18
|
-
config.eager_load = false
|
19
|
-
config.consider_all_requests_local = true
|
20
|
-
config.action_controller.perform_caching = false
|
21
|
-
config.active_support.deprecation = :log
|
15
|
+
Rails.application.configure do
|
16
|
+
if Rails.env == "development"
|
17
|
+
config.consider_all_requests_local = true
|
22
18
|
config.assets.debug = true
|
23
19
|
config.assets.raise_runtime_errors = true
|
24
|
-
|
25
|
-
config.
|
26
|
-
config.assets.paths << Rails.root.join("assets", "javascripts").to_s
|
27
|
-
config.assets.precompile += %w( /(?:\/|\\|\A).*\.(css|js|scss|sass|coffee)$/ )
|
28
|
-
config.serve_static_assets = true
|
29
|
-
config.secret_key_base = 'secret'
|
30
|
-
config.session_store :cookie_store, key: '****************************************'
|
31
|
-
end
|
32
|
-
elsif Rails.env == "production"
|
33
|
-
Rails.application.configure do
|
34
|
-
config.eager_load = true
|
35
|
-
config.i18n.available_locales = [:fr]
|
36
|
-
config.cache_classes = true
|
37
|
-
config.consider_all_requests_local = false
|
38
|
-
config.action_controller.perform_caching = true
|
39
|
-
config.serve_static_assets = true
|
20
|
+
elsif Rails.env == "production"
|
21
|
+
config.consider_all_requests_local = false
|
40
22
|
config.assets.compress = true
|
41
23
|
config.assets.js_compressor = Uglifier.new(copyright: true)
|
42
24
|
config.assets.compile = false
|
43
25
|
config.assets.digest = true
|
44
|
-
config.assets.precompile += %w( /(?:\/|\\|\A).*\.(css|js|scss|sass|coffee)$/ )
|
45
|
-
config.secret_key_base = 'secret'
|
46
26
|
end
|
27
|
+
|
28
|
+
config.cache_classes = false
|
29
|
+
config.eager_load = false
|
30
|
+
config.action_controller.perform_caching = false
|
31
|
+
config.active_support.deprecation = :log
|
32
|
+
config.assets.paths << Rails.root.join("assets").to_s
|
33
|
+
config.assets.paths.push *Dir["#{Rails.root.join('assets')}/*/"]
|
34
|
+
config.assets.precompile += %w( /(?:\/|\\|\A).*\.(css|js|scss|sass|coffee)$/ )
|
35
|
+
config.serve_static_assets = true
|
36
|
+
config.secret_key_base = 'secret'
|
37
|
+
config.session_store :cookie_store, key: '****************************************'
|
47
38
|
end
|
48
39
|
|
49
40
|
Rails.application.initialize!
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rails-frontend
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Michael Bensoussan
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-05-
|
11
|
+
date: 2014-05-06 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: clamp
|
@@ -149,6 +149,7 @@ files:
|
|
149
149
|
- template/Guardfile
|
150
150
|
- template/Rakefile
|
151
151
|
- template/app.rb
|
152
|
+
- template/assets/images/troll.jpg
|
152
153
|
- template/assets/javascripts/application.js.coffee
|
153
154
|
- template/assets/stylesheets/application.css.scss
|
154
155
|
- template/boot.rb.erb
|