foundation-rails 5.5.2.0 → 5.5.2.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (77) hide show
  1. checksums.yaml +7 -0
  2. data/.ruby-version +1 -0
  3. data/.travis.yml +9 -0
  4. data/Rakefile +8 -1
  5. data/bower.json +1 -1
  6. data/foundation-rails.gemspec +5 -1
  7. data/lib/foundation/rails.rb +0 -1
  8. data/lib/foundation/rails/version.rb +1 -1
  9. data/lib/generators/foundation/install_generator.rb +69 -0
  10. data/lib/{foundation/rails → generators/foundation}/templates/application.html.erb +0 -0
  11. data/lib/{foundation/rails → generators/foundation}/templates/application.html.haml +0 -0
  12. data/lib/{foundation/rails → generators/foundation}/templates/application.html.slim +0 -0
  13. data/spec/features/generator_spec.rb +25 -0
  14. data/spec/spec_helper.rb +19 -0
  15. data/spec/support/helpers.rb +25 -0
  16. data/vendor/assets/javascripts/foundation.js +1 -1
  17. metadata +85 -162
  18. data/lib/foundation/rails/generators/install_generator.rb +0 -59
  19. data/test/dummy/.gitignore +0 -16
  20. data/test/dummy/.ruby-version +0 -1
  21. data/test/dummy/Gemfile +0 -47
  22. data/test/dummy/README.rdoc +0 -28
  23. data/test/dummy/Rakefile +0 -6
  24. data/test/dummy/app/assets/images/.keep +0 -0
  25. data/test/dummy/app/assets/javascripts/application.js +0 -8
  26. data/test/dummy/app/assets/stylesheets/application.css +0 -4
  27. data/test/dummy/app/assets/stylesheets/foundation_and_overrides.scss +0 -4
  28. data/test/dummy/app/controllers/application_controller.rb +0 -5
  29. data/test/dummy/app/controllers/concerns/.keep +0 -0
  30. data/test/dummy/app/controllers/styleguide_controller.rb +0 -4
  31. data/test/dummy/app/helpers/application_helper.rb +0 -2
  32. data/test/dummy/app/helpers/styleguide_helper.rb +0 -2
  33. data/test/dummy/app/mailers/.keep +0 -0
  34. data/test/dummy/app/models/.keep +0 -0
  35. data/test/dummy/app/models/concerns/.keep +0 -0
  36. data/test/dummy/app/views/layouts/application.html.erb +0 -19
  37. data/test/dummy/app/views/styleguide/show.html.erb +0 -109
  38. data/test/dummy/bin/bundle +0 -3
  39. data/test/dummy/bin/rails +0 -4
  40. data/test/dummy/bin/rake +0 -4
  41. data/test/dummy/config.ru +0 -4
  42. data/test/dummy/config/application.rb +0 -23
  43. data/test/dummy/config/boot.rb +0 -4
  44. data/test/dummy/config/database.yml +0 -25
  45. data/test/dummy/config/environment.rb +0 -5
  46. data/test/dummy/config/environments/development.rb +0 -29
  47. data/test/dummy/config/environments/production.rb +0 -80
  48. data/test/dummy/config/environments/test.rb +0 -36
  49. data/test/dummy/config/initializers/backtrace_silencers.rb +0 -7
  50. data/test/dummy/config/initializers/filter_parameter_logging.rb +0 -4
  51. data/test/dummy/config/initializers/inflections.rb +0 -16
  52. data/test/dummy/config/initializers/mime_types.rb +0 -5
  53. data/test/dummy/config/initializers/secret_token.rb +0 -12
  54. data/test/dummy/config/initializers/session_store.rb +0 -3
  55. data/test/dummy/config/initializers/wrap_parameters.rb +0 -14
  56. data/test/dummy/config/locales/en.yml +0 -23
  57. data/test/dummy/config/routes.rb +0 -3
  58. data/test/dummy/db/seeds.rb +0 -7
  59. data/test/dummy/lib/assets/.keep +0 -0
  60. data/test/dummy/lib/tasks/.keep +0 -0
  61. data/test/dummy/log/.keep +0 -0
  62. data/test/dummy/public/404.html +0 -58
  63. data/test/dummy/public/422.html +0 -58
  64. data/test/dummy/public/500.html +0 -57
  65. data/test/dummy/public/favicon.ico +0 -0
  66. data/test/dummy/public/robots.txt +0 -5
  67. data/test/dummy/test/controllers/.keep +0 -0
  68. data/test/dummy/test/controllers/styleguide_controller_test.rb +0 -9
  69. data/test/dummy/test/fixtures/.keep +0 -0
  70. data/test/dummy/test/helpers/.keep +0 -0
  71. data/test/dummy/test/helpers/styleguide_helper_test.rb +0 -4
  72. data/test/dummy/test/integration/.keep +0 -0
  73. data/test/dummy/test/mailers/.keep +0 -0
  74. data/test/dummy/test/models/.keep +0 -0
  75. data/test/dummy/test/test_helper.rb +0 -15
  76. data/test/dummy/vendor/assets/javascripts/.keep +0 -0
  77. data/test/dummy/vendor/assets/stylesheets/.keep +0 -0
@@ -1,59 +0,0 @@
1
- require 'rails/generators'
2
-
3
- module Foundation
4
- # module Rails
5
- module Generators
6
- class InstallGenerator < ::Rails::Generators::Base
7
- source_root File.join(File.dirname(__FILE__), '..', 'templates')
8
- argument :layout_name, :type => :string, :default => 'application', :banner => 'layout_name'
9
-
10
- class_option :haml, :desc => 'Generate HAML layout instead of erb', :type => :boolean
11
- class_option :slim, :desc => 'Generate Slim layout instead of erb', :type => :boolean
12
-
13
- def add_assets
14
- # rails_ujs breaks, need to incorporate rails-behavior plugin for this to work seamlessly
15
- # gsub_file "app/assets/javascripts/application#{detect_js_format[0]}", /\/\/= require jquery\n/, ""
16
- insert_into_file "app/assets/javascripts/application#{detect_js_format[0]}", "#{detect_js_format[1]} require foundation\n", :after => "jquery_ujs\n"
17
- append_to_file "app/assets/javascripts/application#{detect_js_format[0]}", "#{detect_js_format[2]}"
18
- settings_file = File.join(File.dirname(__FILE__),"..", "..", "..", "..", "vendor", "assets", "stylesheets", "foundation", "_settings.scss")
19
- create_file "app/assets/stylesheets/foundation_and_overrides.scss", File.read(settings_file)
20
- append_to_file "app/assets/stylesheets/foundation_and_overrides.scss", "\n@import 'foundation';\n"
21
- insert_into_file "app/assets/stylesheets/application#{detect_css_format[0]}", "\n#{detect_css_format[1]} require foundation_and_overrides\n", :after => "require_self"
22
- end
23
-
24
- def detect_js_format
25
- return ['.coffee', '#=', "\n() ->\n $(document).foundation()\n"] if File.exist?('app/assets/javascripts/application.coffee')
26
- return ['.coffee.erb', '#=', "\n() ->\n $(document).foundation()\n"] if File.exist?('app/assets/javascripts/application.coffee.erb')
27
- return ['.js.coffee', '#=', "\n() ->\n $(document).foundation()\n"] if File.exist?('app/assets/javascripts/application.js.coffee')
28
- return ['.js.coffee.erb', '#=', "\n() ->\n $(document).foundation()\n"] if File.exist?('app/assets/javascripts/application.js.coffee.erb')
29
- return ['.js', '//=', "\n$(function(){ $(document).foundation(); });\n"] if File.exist?('app/assets/javascripts/application.js')
30
- return ['.js.erb', '//=', "\n$(function(){ $(document).foundation(); });\n"] if File.exist?('app/assets/javascripts/application.js.erb')
31
- end
32
-
33
- def detect_css_format
34
- return ['.css', ' *='] if File.exist?('app/assets/stylesheets/application.css')
35
- return ['.css.sass', ' //='] if File.exist?('app/assets/stylesheets/application.css.sass')
36
- return ['.sass', ' //='] if File.exist?('app/assets/stylesheets/application.sass')
37
- return ['.css.scss', ' //='] if File.exist?('app/assets/stylesheets/application.css.scss')
38
- return ['.scss', ' //='] if File.exist?('app/assets/stylesheets/application.scss')
39
- end
40
-
41
- def create_layout
42
- if options.haml?||(defined?(Haml) && options.haml?)
43
- template 'application.html.haml', "app/views/layouts/#{file_name}.html.haml"
44
- elsif options.slim?||(defined?(Slim) && options.slim?)
45
- template 'application.html.slim', "app/views/layouts/#{file_name}.html.slim"
46
- else
47
- template 'application.html.erb', "app/views/layouts/#{file_name}.html.erb"
48
- end
49
- end
50
-
51
- private
52
-
53
- def file_name
54
- layout_name.underscore.downcase
55
- end
56
- end
57
- end
58
- # end
59
- end
@@ -1,16 +0,0 @@
1
- # See https://help.github.com/articles/ignoring-files for more about ignoring files.
2
- #
3
- # If you find yourself ignoring temporary files generated by your text editor
4
- # or operating system, you probably want to add a global ignore instead:
5
- # git config --global core.excludesfile '~/.gitignore_global'
6
-
7
- # Ignore bundler config.
8
- /.bundle
9
-
10
- # Ignore the default SQLite database.
11
- /db/*.sqlite3
12
- /db/*.sqlite3-journal
13
-
14
- # Ignore all logfiles and tempfiles.
15
- /log/*.log
16
- /tmp
@@ -1 +0,0 @@
1
- 2.0.0-p247
data/test/dummy/Gemfile DELETED
@@ -1,47 +0,0 @@
1
- source 'https://rubygems.org'
2
-
3
- # Bundle edge Rails instead: gem 'rails', github: 'rails/rails'
4
- gem 'foundation-rails'#, :path => '../../'
5
-
6
- gem 'rails', '4.0.1'
7
-
8
- # Use sqlite3 as the database for Active Record
9
- gem 'sqlite3'
10
-
11
- # Use SCSS for stylesheets
12
- gem 'sass-rails', '~> 4.0.0'
13
-
14
- # Use Uglifier as compressor for JavaScript assets
15
- gem 'uglifier', '>= 1.3.0'
16
-
17
- # Use CoffeeScript for .js.coffee assets and views
18
- gem 'coffee-rails', '~> 4.0.0'
19
-
20
- # See https://github.com/sstephenson/execjs#readme for more supported runtimes
21
- # gem 'therubyracer', platforms: :ruby
22
-
23
- # Use jquery as the JavaScript library
24
- gem 'jquery-rails'
25
-
26
- # Turbolinks makes following links in your web application faster. Read more: https://github.com/rails/turbolinks
27
- gem 'turbolinks'
28
-
29
- # Build JSON APIs with ease. Read more: https://github.com/rails/jbuilder
30
- gem 'jbuilder', '~> 1.2'
31
-
32
- group :doc do
33
- # bundle exec rake doc:rails generates the API under doc/api.
34
- gem 'sdoc', require: false
35
- end
36
-
37
- # Use ActiveModel has_secure_password
38
- # gem 'bcrypt-ruby', '~> 3.1.2'
39
-
40
- # Use unicorn as the app server
41
- # gem 'unicorn'
42
-
43
- # Use Capistrano for deployment
44
- # gem 'capistrano', group: :development
45
-
46
- # Use debugger
47
- # gem 'debugger', group: [:development, :test]
@@ -1,28 +0,0 @@
1
- == README
2
-
3
- This README would normally document whatever steps are necessary to get the
4
- application up and running.
5
-
6
- Things you may want to cover:
7
-
8
- * Ruby version
9
-
10
- * System dependencies
11
-
12
- * Configuration
13
-
14
- * Database creation
15
-
16
- * Database initialization
17
-
18
- * How to run the test suite
19
-
20
- * Services (job queues, cache servers, search engines, etc.)
21
-
22
- * Deployment instructions
23
-
24
- * ...
25
-
26
-
27
- Please feel free to use a different markup language if you do not plan to run
28
- <tt>rake doc:app</tt>.
data/test/dummy/Rakefile DELETED
@@ -1,6 +0,0 @@
1
- # Add your own tasks in files placed in lib/tasks ending in .rake,
2
- # for example lib/tasks/capistrano.rake, and they will automatically be available to Rake.
3
-
4
- require File.expand_path('../config/application', __FILE__)
5
-
6
- Foundation::Application.load_tasks
File without changes
@@ -1,8 +0,0 @@
1
- //= require jquery
2
- //= require jquery_ujs
3
- //= require foundation
4
-
5
- $(function(){
6
- $(document).foundation();
7
- });
8
- $(function(){ $(document).foundation(); });
@@ -1,4 +0,0 @@
1
- /*
2
- *= require_self
3
- *= require foundation_and_overrides
4
- */
@@ -1,4 +0,0 @@
1
- // Foundation Sass Variables Go Here!
2
- // More information about Foundation + Sass can be found here:
3
- // http://foundation.zurb.com/docs/
4
- @import 'foundation';
@@ -1,5 +0,0 @@
1
- class ApplicationController < ActionController::Base
2
- # Prevent CSRF attacks by raising an exception.
3
- # For APIs, you may want to use :null_session instead.
4
- protect_from_forgery with: :exception
5
- end
File without changes
@@ -1,4 +0,0 @@
1
- class StyleguideController < ApplicationController
2
- def show
3
- end
4
- end
@@ -1,2 +0,0 @@
1
- module ApplicationHelper
2
- end
@@ -1,2 +0,0 @@
1
- module StyleguideHelper
2
- end
File without changes
File without changes
File without changes
@@ -1,19 +0,0 @@
1
- <!DOCTYPE html>
2
- <html lang="en">
3
- <head>
4
- <meta charset="utf-8" />
5
- <meta name="viewport" content="width=device-width, initial-scale=1.0" />
6
-
7
- <title><%= content_for?(:title) ? yield(:title) : "foundation-rails" %></title>
8
-
9
- <%= stylesheet_link_tag "application" %>
10
- <%= javascript_include_tag "vendor/custom.modernizr" %>
11
- <%= csrf_meta_tags %>
12
- </head>
13
-
14
- <body>
15
-
16
- <%= yield %>
17
- <%= javascript_include_tag "application" %>
18
- </body>
19
- </html>
@@ -1,109 +0,0 @@
1
- <nav class="top-bar" data-topbar>
2
- <ul class="title-area">
3
- <li class="name">
4
- <h1><a href="http://foundation.zurb.com">Foundation</a></h1>
5
- </li>
6
- </ul>
7
-
8
- <section class="top-bar-section">
9
- <!-- Right Nav Section -->
10
- <ul class="right">
11
- <li class="active"><a href="https://github.com/zurb/foundation-rails">GitHub</a></li>
12
- <li class="has-dropdown">
13
- <a href="http://foundation.zurb.com/docs/">Foundation Docs</a>
14
- <ul class="dropdown">
15
- <li><a href="http://foundation.zurb.com/support/support.html">Support</a></li>
16
- </ul>
17
- </li>
18
- <li class="has-form">
19
- <a href="" class="button" data-reveal-id="signupModal">Sign Up</a>
20
- </li>
21
- </ul>
22
- </section>
23
- </nav>
24
-
25
-
26
-
27
- <ul data-orbit="">
28
- <li><img src="http://placehold.it/1800x350/0079a1/ffffff&text=foundation-rails"></li>
29
- <li><img src="http://placehold.it/1800x350/0079a1/ffffff&text=foundation-rails"></li>
30
- <li><img src="http://placehold.it/1800x350/0079a1/ffffff&text=foundation-rails"></li>
31
- </ul>
32
-
33
-
34
- <div class="row">
35
- <div class="large-4 columns">
36
- <ul class="pricing-table">
37
- <li class="title">Freelancer</li>
38
- <li class="price">$99.99</li>
39
- <li class="description">An awesome description</li>
40
- <li class="bullet-item">1 Database</li>
41
- <li class="bullet-item">5GB Storage</li>
42
- <li class="bullet-item">20 Users</li>
43
- <li class="cta-button"><a class="button" href="#">Buy Now</a></li>
44
- </ul>
45
- </div>
46
- <div class="large-4 columns">
47
- <ul class="pricing-table">
48
- <li class="title">Startup</li>
49
- <li class="price">$199.99</li>
50
- <li class="description">An awesome description</li>
51
- <li class="bullet-item">1 Database</li>
52
- <li class="bullet-item">5GB Storage</li>
53
- <li class="bullet-item">20 Users</li>
54
- <li class="cta-button"><a class="button" href="#">Buy Now</a></li>
55
- </ul>
56
- </div>
57
- <div class="large-4 columns">
58
- <ul class="pricing-table">
59
- <li class="title">Enterprise</li>
60
- <li class="price">$999.99</li>
61
- <li class="description">An awesome description</li>
62
- <li class="bullet-item">1 Database</li>
63
- <li class="bullet-item">5GB Storage</li>
64
- <li class="bullet-item">20 Users</li>
65
- <li class="cta-button"><a class="button" href="#">Buy Now</a></li>
66
- </ul>
67
- </div>
68
- </div>
69
-
70
- <hr>
71
-
72
- <div class="row">
73
- <div class="large-12 columns">
74
- <h3 class="subheader">Find out more!</h3>
75
- </div>
76
- </div>
77
-
78
- <div class="row">
79
- <div class="large-12 columns">
80
- <dl class="tabs" data-tab>
81
- <dd class="active"><a href="#panel2-1">Overview</a></dd>
82
- <dd><a href="#panel2-2">Features</a></dd>
83
- <dd><a href="#panel2-3">Testimonials</a></dd>
84
- <dd><a href="#panel2-4">History</a></dd>
85
- </dl>
86
- <div class="tabs-content">
87
- <div class="content active" id="panel2-1">
88
- <p>This is the first panel of the basic tab example. This is the first panel of the basic tab example.</p>
89
- </div>
90
- <div class="content" id="panel2-2">
91
- <p>This is the second panel of the basic tab example. This is the second panel of the basic tab example.</p>
92
- </div>
93
- <div class="content" id="panel2-3">
94
- <p>This is the third panel of the basic tab example. This is the third panel of the basic tab example.</p>
95
- </div>
96
- <div class="content" id="panel2-4">
97
- <p>This is the fourth panel of the basic tab example. This is the fourth panel of the basic tab example.</p>
98
- </div>
99
- </div>
100
- </div>
101
- </div>
102
-
103
-
104
- <div id="signupModal" data-reveal-modal class="reveal-modal">
105
- <h2>Awesome. I have it.</h2>
106
- <p class="lead">Your couch. It is mine.</p>
107
- <p>Im a cool paragraph that lives inside of an even cooler modal. Wins</p>
108
- <a class="close-reveal-modal">&#215;</a>
109
- </div>
@@ -1,3 +0,0 @@
1
- #!/usr/bin/env ruby
2
- ENV['BUNDLE_GEMFILE'] ||= File.expand_path('../../Gemfile', __FILE__)
3
- load Gem.bin_path('bundler', 'bundle')
data/test/dummy/bin/rails DELETED
@@ -1,4 +0,0 @@
1
- #!/usr/bin/env ruby
2
- APP_PATH = File.expand_path('../../config/application', __FILE__)
3
- require_relative '../config/boot'
4
- require 'rails/commands'
data/test/dummy/bin/rake DELETED
@@ -1,4 +0,0 @@
1
- #!/usr/bin/env ruby
2
- require_relative '../config/boot'
3
- require 'rake'
4
- Rake.application.run
data/test/dummy/config.ru DELETED
@@ -1,4 +0,0 @@
1
- # This file is used by Rack-based servers to start the application.
2
-
3
- require ::File.expand_path('../config/environment', __FILE__)
4
- run Rails.application
@@ -1,23 +0,0 @@
1
- require File.expand_path('../boot', __FILE__)
2
-
3
- require 'rails/all'
4
-
5
- # Require the gems listed in Gemfile, including any gems
6
- # you've limited to :test, :development, or :production.
7
- Bundler.require(:default, Rails.env)
8
-
9
- module Dummy
10
- class Application < Rails::Application
11
- # Settings in config/environments/* take precedence over those specified here.
12
- # Application configuration should go into files in config/initializers
13
- # -- all .rb files in that directory are automatically loaded.
14
-
15
- # Set Time.zone default to the specified zone and make Active Record auto-convert to this zone.
16
- # Run "rake -D time" for a list of tasks for finding time zone names. Default is UTC.
17
- # config.time_zone = 'Central Time (US & Canada)'
18
-
19
- # The default locale is :en and all translations from config/locales/*.rb,yml are auto loaded.
20
- # config.i18n.load_path += Dir[Rails.root.join('my', 'locales', '*.{rb,yml}').to_s]
21
- # config.i18n.default_locale = :de
22
- end
23
- end
@@ -1,4 +0,0 @@
1
- # Set up gems listed in the Gemfile.
2
- ENV['BUNDLE_GEMFILE'] ||= File.expand_path('../../Gemfile', __FILE__)
3
-
4
- require 'bundler/setup' if File.exists?(ENV['BUNDLE_GEMFILE'])
@@ -1,25 +0,0 @@
1
- # SQLite version 3.x
2
- # gem install sqlite3
3
- #
4
- # Ensure the SQLite 3 gem is defined in your Gemfile
5
- # gem 'sqlite3'
6
- development:
7
- adapter: sqlite3
8
- database: db/development.sqlite3
9
- pool: 5
10
- timeout: 5000
11
-
12
- # Warning: The database defined as "test" will be erased and
13
- # re-generated from your development database when you run "rake".
14
- # Do not set this db to the same as development or production.
15
- test:
16
- adapter: sqlite3
17
- database: db/test.sqlite3
18
- pool: 5
19
- timeout: 5000
20
-
21
- production:
22
- adapter: sqlite3
23
- database: db/production.sqlite3
24
- pool: 5
25
- timeout: 5000
@@ -1,5 +0,0 @@
1
- # Load the Rails application.
2
- require File.expand_path('../application', __FILE__)
3
-
4
- # Initialize the Rails application.
5
- Dummy::Application.initialize!