make sure the generated subdomain is a valid one
did
committed May 30, 2014
commit 4729ee89824291b3cbeb847864db808b81a4a3ae
Showing 16
changed files with
23 additions
and 22 deletions
Gemfile
+1
-1
| @@ | @@ -6,7 +6,7 @@ gemspec |
| # Development | |
| # gem 'locomotivecms-liquid', path: '../gems/liquid', require: false | |
| # gem 'locomotivecms-solid', path: '../gems/solid', require: false | |
| - | gem 'locomotivecms_mounter', path: '../gems/mounter', require: false |
| + | # gem 'locomotivecms_mounter', path: '../gems/mounter', require: false |
| # gem 'locomotivecms_mounter', github: 'locomotivecms/mounter', ref: '34d24feeb8', require: false | |
| gem 'rb-fsevent', '~> 0.9.1' | |
generators/blank/Gemfile.tt
+1
-1
| @@ | @@ -7,7 +7,7 @@ group :development do |
| gem 'rb-fsevent', '~> 0.9.1', require: RUBY_PLATFORM.include?('darwin') && 'rb-fsevent' | |
| # Unix | |
| - | gem 'therubyracer', require: 'v8', platforms: :ruby |
| + | gem 'therubyracer', require: 'v8', platforms: :ruby unless RUBY_PLATFORM.include?('darwin') |
| gem 'rb-inotify', '~> 0.9', require: RUBY_PLATFORM.include?('linux') && 'rb-inotify' | |
| # Windows | |
generators/blank/config/site.yml.tt
+2
-2
| @@ | @@ -1,12 +1,12 @@ |
| # The name of this site | |
| # This text displays in the back-office and | |
| # can be used in templates through the site.name global variable | |
| - | name: <%= config[:name] %> |
| + | name: "<%= config[:name] %>" |
| # The site's subdomain | |
| # This option is for sites on multi-site engines | |
| # The value determines where the site can be accessed under the engine's primary domain | |
| - | subdomain: <%= config[:name].gsub(' ', '-').dasherize.downcase %> |
| + | subdomain: <%= config[:name].parameterize %> |
| # An array of domain aliases for the site | |
| # This option is for sites on multi-site engines | |
generators/bootstrap/config/site.yml.tt
+2
-2
| @@ | @@ -1,12 +1,12 @@ |
| # The name of this site | |
| # This text displays in the back-office and | |
| # can be used in templates through the site.name global variable | |
| - | name: <%= config[:name] %> |
| + | name: "<%= config[:name] %>" |
| # The site's subdomain | |
| # This option is for sites on multi-site engines | |
| # The value determines where the site can be accessed under the engine's primary domain | |
| - | subdomain: <%= config[:name].gsub(' ', '-').dasherize.downcase %> |
| + | subdomain: <%= config[:name].parameterize %> |
| # An array of domain aliases for the site | |
| # This option is for sites on multi-site engines | |
generators/bootstrap2/Gemfile.tt
+1
-1
| @@ | @@ -7,7 +7,7 @@ group :development do |
| gem 'rb-fsevent', '~> 0.9.1', require: RUBY_PLATFORM.include?('darwin') && 'rb-fsevent' | |
| # Unix | |
| - | gem 'therubyracer', require: 'v8', platforms: :ruby |
| + | gem 'therubyracer', require: 'v8', platforms: :ruby unless RUBY_PLATFORM.include?('darwin') |
| gem 'rb-inotify', '~> 0.9', require: RUBY_PLATFORM.include?('linux') && 'rb-inotify' | |
| # Windows | |
generators/bootstrap2/config/site.yml.tt
+2
-2
| @@ | @@ -1,12 +1,12 @@ |
| # The name of this site | |
| # This text displays in the back-office and | |
| # can be used in templates through the site.name global variable | |
| - | name: <%= config[:name] %> |
| + | name: "<%= config[:name] %>" |
| # The site's subdomain | |
| # This option is for sites on multi-site engines | |
| # The value determines where the site can be accessed under the engine's primary domain | |
| - | subdomain: <%= config[:name].gsub(' ', '-').dasherize.downcase %> |
| + | subdomain: <%= config[:name].parameterize %> |
| # An array of domain aliases for the site | |
| # This option is for sites on multi-site engines | |
generators/bootstrap3/Gemfile.tt
+1
-1
| @@ | @@ -7,7 +7,7 @@ group :development do |
| gem 'rb-fsevent', '~> 0.9.1', require: RUBY_PLATFORM.include?('darwin') && 'rb-fsevent' | |
| # Unix | |
| - | gem 'therubyracer', require: 'v8', platforms: :ruby |
| + | gem 'therubyracer', require: 'v8', platforms: :ruby unless RUBY_PLATFORM.include?('darwin') |
| gem 'rb-inotify', '~> 0.9', require: RUBY_PLATFORM.include?('linux') && 'rb-inotify' | |
| # Windows | |
generators/bootstrap3/config/site.yml.tt
+2
-2
| @@ | @@ -1,12 +1,12 @@ |
| # The name of this site | |
| # This text displays in the back-office and | |
| # can be used in templates through the site.name global variable | |
| - | name: <%= config[:name] %> |
| + | name: "<%= config[:name] %>" |
| # The site's subdomain | |
| # This option is for sites on multi-site engines | |
| # The value determines where the site can be accessed under the engine's primary domain | |
| - | subdomain: <%= config[:name].gsub(' ', '-').dasherize.downcase %> |
| + | subdomain: <%= config[:name].parameterize %> |
| # An array of domain aliases for the site | |
| # This option is for sites on multi-site engines | |
generators/cloned/Gemfile.tt
+1
-1
| @@ | @@ -7,7 +7,7 @@ group :development do |
| gem 'rb-fsevent', '~> 0.9.1', require: RUBY_PLATFORM.include?('darwin') && 'rb-fsevent' | |
| # Unix | |
| - | gem 'therubyracer', require: 'v8', platforms: :ruby |
| + | gem 'therubyracer', require: 'v8', platforms: :ruby unless RUBY_PLATFORM.include?('darwin') |
| gem 'rb-inotify', '~> 0.9', require: RUBY_PLATFORM.include?('linux') && 'rb-inotify' | |
| # Windows | |
generators/foundation4/Gemfile.tt
+1
-1
| @@ | @@ -7,7 +7,7 @@ group :development do |
| gem 'rb-fsevent', '~> 0.9.1', require: RUBY_PLATFORM.include?('darwin') && 'rb-fsevent' | |
| # Unix | |
| - | gem 'therubyracer', require: 'v8', platforms: :ruby |
| + | gem 'therubyracer', require: 'v8', platforms: :ruby unless RUBY_PLATFORM.include?('darwin') |
| gem 'rb-inotify', '~> 0.9', require: RUBY_PLATFORM.include?('linux') && 'rb-inotify' | |
| # Windows | |
generators/foundation4/config/site.yml.tt
+2
-2
| @@ | @@ -1,12 +1,12 @@ |
| # The name of this site | |
| # This text displays in the back-office and | |
| # can be used in templates through the site.name global variable | |
| - | name: <%= config[:name] %> |
| + | name: "<%= config[:name] %>" |
| # The site's subdomain | |
| # This option is for sites on multi-site engines | |
| # The value determines where the site can be accessed under the engine's primary domain | |
| - | subdomain: <%= config[:name].gsub(' ', '-').dasherize.downcase %> |
| + | subdomain: <%= config[:name].parameterize %> |
| # An array of domain aliases for the site | |
| # This option is for sites on multi-site engines | |
generators/foundation5/Gemfile.tt
+1
-1
| @@ | @@ -7,7 +7,7 @@ group :development do |
| gem 'rb-fsevent', '~> 0.9.1', require: RUBY_PLATFORM.include?('darwin') && 'rb-fsevent' | |
| # Unix | |
| - | gem 'therubyracer', require: 'v8', platforms: :ruby |
| + | gem 'therubyracer', require: 'v8', platforms: :ruby unless RUBY_PLATFORM.include?('darwin') |
| gem 'rb-inotify', '~> 0.9', require: RUBY_PLATFORM.include?('linux') && 'rb-inotify' | |
| # Windows | |
generators/foundation5/config/site.yml.tt
+2
-2
| @@ | @@ -1,12 +1,12 @@ |
| # The name of this site | |
| # This text displays in the back-office and | |
| # can be used in templates through the site.name global variable | |
| - | name: <%= config[:name] %> |
| + | name: "<%= config[:name] %>" |
| # The site's subdomain | |
| # This option is for sites on multi-site engines | |
| # The value determines where the site can be accessed under the engine's primary domain | |
| - | subdomain: <%= config[:name].gsub(' ', '-').dasherize.downcase %> |
| + | subdomain: <%= config[:name].parameterize %> |
| # An array of domain aliases for the site | |
| # This option is for sites on multi-site engines | |
generators/line_case/Gemfile.tt
+1
-1
| @@ | @@ -7,7 +7,7 @@ group :development do |
| gem 'rb-fsevent', '~> 0.9.1', require: RUBY_PLATFORM.include?('darwin') && 'rb-fsevent' | |
| # Unix | |
| - | gem 'therubyracer', require: 'v8', platforms: :ruby |
| + | gem 'therubyracer', require: 'v8', platforms: :ruby unless RUBY_PLATFORM.include?('darwin') |
| gem 'rb-inotify', '~> 0.9', require: RUBY_PLATFORM.include?('linux') && 'rb-inotify' | |
| # Windows | |
generators/line_case/config/site.yml.tt
+2
-2
| @@ | @@ -1,12 +1,12 @@ |
| # The name of this site | |
| # This text displays in the back-office and | |
| # can be used in templates through the site.name global variable | |
| - | name: <%= config[:name] %> |
| + | name: "<%= config[:name] %>" |
| # The site's subdomain | |
| # This option is for sites on multi-site engines | |
| # The value determines where the site can be accessed under the engine's primary domain | |
| - | subdomain: <%= config[:name].gsub(' ', '-').dasherize.downcase %> |
| + | subdomain: <%= config[:name].parameterize %> |
| # An array of domain aliases for the site | |
| # This option is for sites on multi-site engines | |
locomotive/wagon/generators/site/base.rb b/lib/locomotive/wagon/generators/site/base.rb
+1
-0
| @@ | @@ -1,6 +1,7 @@ |
| require 'thor/group' | |
| require 'active_support' | |
| require 'active_support/core_ext' | |
| + | require 'active_support/core_ext/string/inflections' |
| module Locomotive | |
| module Wagon | |