foundation-rails 6.1.1.0 → 6.1.1.1

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: 184fa4cda534faaff0ed4cb7eef5eac3ec9c8c96
4
- data.tar.gz: acfa709e896c85af7e044fc9dd518a94666070bd
3
+ metadata.gz: dd443f4e1ba793e2319dc38153c0902decb48ba6
4
+ data.tar.gz: a7067499ad0b516977c2a07c34674fc45c962c8a
5
5
  SHA512:
6
- metadata.gz: b4635bea8262a3e46084e37ed344b43bfe70d2c3923d92c94a43f5ac03e396acc0bb5010db75f64e63fd900f450d22eb36ac017f4dd97c48189c97dd966c64dc
7
- data.tar.gz: 5460f6676a961f4476047c23c1664d3c32777cb30f72ebb26465478cae88e2aa4f61bbf0c183d2d3293303d73b244fe21ace923c807de4dfd9ce97326122ca33
6
+ metadata.gz: b4618cc5d4da3fe059b93b500a0e7b8dbf26112e4c853362710a0a408937d555d3e522953bd714c50689b50a1a049b5e7c76deaaa7fb79d2ceb710919bb4bcc8
7
+ data.tar.gz: cd5982ef40eab86284abdd907900165a7509eb69c3d029a75e4ee7a7a18352ae2bac04e7eb393ee30777c2b1c3703820a8c3cfc5c6c7eb7a78cd67f23259bc13
data/.travis.yml CHANGED
@@ -7,3 +7,4 @@ before_install:
7
7
  install: bundle install
8
8
  notifications:
9
9
  email: false
10
+
data/README.md CHANGED
@@ -1,6 +1,8 @@
1
1
  # Foundation::Rails
2
2
 
3
- Foundation::Rails is a gem to make 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.
3
+ [![Gem Version](https://badge.fury.io/rb/foundation-rails.svg)](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
@@ -1,5 +1,5 @@
1
1
  module Foundation
2
2
  module Rails
3
- VERSION = "6.1.1.0"
3
+ VERSION = "6.1.1.1"
4
4
  end
5
5
  end
@@ -19,26 +19,33 @@ module Foundation
19
19
  end
20
20
 
21
21
  def detect_js_format
22
- return ['.coffee', '#=', "\n() ->\n $(document).foundation()\n"] if File.exist?(File.join(javascripts_base_dir, 'application.coffee'))
23
- return ['.coffee.erb', '#=', "\n() ->\n $(document).foundation()\n"] if File.exist?(File.join(javascripts_base_dir, 'application.coffee.erb'))
24
- return ['.js.coffee', '#=', "\n() ->\n $(document).foundation()\n"] if File.exist?(File.join(javascripts_base_dir, 'application.js.coffee'))
25
- return ['.js.coffee.erb', '#=', "\n() ->\n $(document).foundation()\n"] if File.exist?(File.join(javascripts_base_dir, 'application.js.coffee.erb'))
26
- return ['.js', '//=', "\n$(function(){ $(document).foundation(); });\n"] if File.exist?(File.join(javascripts_base_dir, 'application.js'))
27
- return ['.js.erb', '//=', "\n$(function(){ $(document).foundation(); });\n"] if File.exist?(File.join(javascripts_base_dir, 'application.js.erb'))
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
- return ['.css', ' *='] if File.exist?(File.join(stylesheets_base_dir, 'application.css'))
32
- return ['.css.sass', ' //='] if File.exist?(File.join(stylesheets_base_dir, 'application.css.sass'))
33
- return ['.sass', ' //='] if File.exist?(File.join(stylesheets_base_dir, 'application.sass'))
34
- return ['.css.scss', ' //='] if File.exist?(File.join(stylesheets_base_dir, 'application.css.scss'))
35
- return ['.scss', ' //='] if File.exist?(File.join(stylesheets_base_dir, 'application.scss'))
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?||(defined?(Haml) && 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?||(defined?(Slim) && 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) : "foundation-rails" %></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", 'data-turbolinks-track' => true
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", 'data-turbolinks-track' => true
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
@@ -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.0
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-12 00:00:00.000000000 Z
11
+ date: 2016-01-14 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: sass