foundation-rails 6.1.1.0 → 6.1.1.1
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/.travis.yml +1 -0
- data/README.md +4 -2
- data/lib/foundation/rails/engine.rb +2 -3
- data/lib/foundation/rails/version.rb +1 -1
- data/lib/generators/foundation/install_generator.rb +20 -13
- data/lib/generators/foundation/templates/application.html.erb +1 -1
- data/lib/generators/foundation/templates/application.html.haml +2 -2
- data/lib/generators/foundation/templates/application.html.slim +1 -1
- data/spec/features/generator_spec.rb +0 -1
- data/spec/support/helpers.rb +7 -1
- data/vendor/assets/js/foundation.js +2 -2
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: dd443f4e1ba793e2319dc38153c0902decb48ba6
|
4
|
+
data.tar.gz: a7067499ad0b516977c2a07c34674fc45c962c8a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b4618cc5d4da3fe059b93b500a0e7b8dbf26112e4c853362710a0a408937d555d3e522953bd714c50689b50a1a049b5e7c76deaaa7fb79d2ceb710919bb4bcc8
|
7
|
+
data.tar.gz: cd5982ef40eab86284abdd907900165a7509eb69c3d029a75e4ee7a7a18352ae2bac04e7eb393ee30777c2b1c3703820a8c3cfc5c6c7eb7a78cd67f23259bc13
|
data/.travis.yml
CHANGED
data/README.md
CHANGED
@@ -1,6 +1,8 @@
|
|
1
1
|
# Foundation::Rails
|
2
2
|
|
3
|
-
|
3
|
+
[](https://badge.fury.io/rb/foundation-rails)
|
4
|
+
|
5
|
+
Foundation::Rails is a gem that makes it super easy to use Foundation in your upcoming Rails project. You can start using Foundation::Rails in your projects by following the instructions below.
|
4
6
|
|
5
7
|
## Installation
|
6
8
|
|
@@ -28,7 +30,7 @@ You can run the following command to add Foundation:
|
|
28
30
|
|
29
31
|
Append the following line to your `app/assets/stylesheets/application.css` file:
|
30
32
|
|
31
|
-
/*= require foundation
|
33
|
+
/*= require foundation
|
32
34
|
|
33
35
|
If you're planning on using Sass, then you'll want to rename `application.css` to `application.scss`. That file should then look like:
|
34
36
|
|
@@ -1,10 +1,9 @@
|
|
1
|
+
require 'rails'
|
2
|
+
|
1
3
|
module Foundation
|
2
4
|
module Rails
|
3
5
|
class Engine < ::Rails::Engine
|
4
6
|
isolate_namespace Foundation::Rails
|
5
|
-
initializer "foundation-rails.assets.precompile" do |app|
|
6
|
-
app.config.assets.precompile += %w( vendor/modernizr.js )
|
7
|
-
end
|
8
7
|
end
|
9
8
|
end
|
10
9
|
end
|
@@ -19,26 +19,33 @@ module Foundation
|
|
19
19
|
end
|
20
20
|
|
21
21
|
def detect_js_format
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
22
|
+
%w(.coffee .coffee.erb .js.coffee .js.coffee.erb .js .js.erb).each do |ext|
|
23
|
+
if File.exist?(File.join(javascripts_base_dir, "application#{ext}"))
|
24
|
+
if ext.include?(".coffee")
|
25
|
+
return [ext, "#=", "\n() ->\n $(document).foundation()\n"]
|
26
|
+
else
|
27
|
+
return [ext, "//=", "\n$(function(){ $(document).foundation(); });\n"]
|
28
|
+
end
|
29
|
+
end
|
30
|
+
end
|
28
31
|
end
|
29
32
|
|
30
33
|
def detect_css_format
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
34
|
+
%w(.css .css.sass .sass .css.scss .scss).each do |ext|
|
35
|
+
if File.exist?(File.join(stylesheets_base_dir, "application#{ext}"))
|
36
|
+
if ext.include?(".sass") || ext.include?(".scss")
|
37
|
+
return [ext, "//="]
|
38
|
+
else
|
39
|
+
return [ext, " *="]
|
40
|
+
end
|
41
|
+
end
|
42
|
+
end
|
36
43
|
end
|
37
44
|
|
38
45
|
def create_layout
|
39
|
-
if options.haml
|
46
|
+
if options.haml? || (defined?(Haml) && options.haml?)
|
40
47
|
template 'application.html.haml', File.join(layouts_base_dir, "#{file_name}.html.haml")
|
41
|
-
elsif options.slim
|
48
|
+
elsif options.slim? || (defined?(Slim) && options.slim?)
|
42
49
|
template 'application.html.slim', File.join(layouts_base_dir, "#{file_name}.html.slim")
|
43
50
|
else
|
44
51
|
template 'application.html.erb', File.join(layouts_base_dir, "#{file_name}.html.erb")
|
@@ -4,7 +4,7 @@
|
|
4
4
|
<meta charset="utf-8" />
|
5
5
|
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
6
6
|
|
7
|
-
<title><%%= content_for?(:title) ? yield(:title) : "
|
7
|
+
<title><%%= content_for?(:title) ? yield(:title) : "Untitled" %></title>
|
8
8
|
|
9
9
|
<%%= stylesheet_link_tag "application" %>
|
10
10
|
<%%= javascript_include_tag "application", 'data-turbolinks-track' => true %>
|
@@ -1,5 +1,5 @@
|
|
1
1
|
!!! 5
|
2
|
-
%html{ :lang => "en"}
|
2
|
+
%html{ :lang => "en" }
|
3
3
|
%head
|
4
4
|
%meta{ :charset => "utf-8" }
|
5
5
|
|
@@ -8,7 +8,7 @@
|
|
8
8
|
%title= content_for?(:title) ? yield(:title) : "Untitled"
|
9
9
|
|
10
10
|
= stylesheet_link_tag "application"
|
11
|
-
= javascript_include_tag "application",
|
11
|
+
= javascript_include_tag "application", "data-turbolinks-track" => true
|
12
12
|
= csrf_meta_tag
|
13
13
|
|
14
14
|
%body
|
@@ -7,7 +7,7 @@ html lang="en"
|
|
7
7
|
title == content_for?(:title) ? yield(:title) : "Untitled"
|
8
8
|
|
9
9
|
= stylesheet_link_tag "application"
|
10
|
-
= javascript_include_tag "application",
|
10
|
+
= javascript_include_tag "application", "data-turbolinks-track" => true
|
11
11
|
= csrf_meta_tag
|
12
12
|
|
13
13
|
body
|
@@ -19,7 +19,6 @@ feature 'Foundation install succeeds' do
|
|
19
19
|
layout_file = IO.read("#{dummy_app_path}/app/views/layouts/application.html.erb")
|
20
20
|
|
21
21
|
expect(layout_file).to match(/stylesheet_link_tag "application"/)
|
22
|
-
expect(layout_file).to match(/javascript_include_tag "vendor\/modernizr"/)
|
23
22
|
expect(layout_file).to match(/javascript_include_tag "application/)
|
24
23
|
end
|
25
24
|
end
|
data/spec/support/helpers.rb
CHANGED
@@ -1,7 +1,13 @@
|
|
1
1
|
module FoundationRailsTestHelpers
|
2
2
|
def create_dummy_app
|
3
3
|
FileUtils.cd(tmp_path) do
|
4
|
-
%x(rails new dummy --skip-active-record --skip-test-unit --skip-spring)
|
4
|
+
%x(rails new dummy --skip-active-record --skip-test-unit --skip-spring --skip-bundle)
|
5
|
+
File.open(dummy_app_path + '/Gemfile', 'a') do |f|
|
6
|
+
f.puts "gem 'foundation-rails', path: '#{File.join(File.dirname(__FILE__), '..', '..')}'"
|
7
|
+
end
|
8
|
+
end
|
9
|
+
FileUtils.cd(dummy_app_path) do
|
10
|
+
%x(bundle install)
|
5
11
|
end
|
6
12
|
end
|
7
13
|
|
@@ -1,7 +1,7 @@
|
|
1
|
+
//= require foundation.core
|
1
2
|
//= require foundation.abide
|
2
3
|
//= require foundation.accordion
|
3
4
|
//= require foundation.accordionMenu
|
4
|
-
//= require foundation.core
|
5
5
|
//= require foundation.drilldown
|
6
6
|
//= require foundation.dropdown
|
7
7
|
//= require foundation.dropdownMenu
|
@@ -25,4 +25,4 @@
|
|
25
25
|
//= require foundation.util.nest
|
26
26
|
//= require foundation.util.timerAndImageLoader
|
27
27
|
//= require foundation.util.touch
|
28
|
-
//= require foundation.util.triggers
|
28
|
+
//= require foundation.util.triggers
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: foundation-rails
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 6.1.1.
|
4
|
+
version: 6.1.1.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- ZURB
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-01-
|
11
|
+
date: 2016-01-14 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: sass
|