Skip to content

Commit

Permalink
fixed several bugs
Browse files Browse the repository at this point in the history
  • Loading branch information
revans committed Feb 6, 2015
1 parent 6690c16 commit 64d764a
Show file tree
Hide file tree
Showing 7 changed files with 51 additions and 56 deletions.
2 changes: 1 addition & 1 deletion lib/diesel/actions.rb
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ def add_import_to_stylesheet_manifest(filename, opts = {})
def add_to_javascript_manifest(filename, options={})
log :add_to_javascript_manifest, filename

sentinel = options.has_key?(:after) ? " //= require #{filename}\n" : "\n //= require #{filename}"
sentinel = options.has_key?(:after) ? "//= require #{filename}\n" : "\n//= require #{filename}"

in_root do
inject_into_file 'app/assets/javascripts/application.js', sentinel, options.merge(verobose: false)
Expand Down
16 changes: 10 additions & 6 deletions lib/generators/admin/admin_generator.rb
Original file line number Diff line number Diff line change
Expand Up @@ -28,21 +28,25 @@ def add_admin_namespaced_route
log :add_admin_namespaced_route, ""
admin_namespace = <<-NAMESPACE
namespace :admin do
# ....
end
namespace :admin do
# ....
end
NAMESPACE

inject_into_file "config/routes.rb",
content,
before: "end\n"
end


def add_is_user_admin_check
log :add_is_user_admin_check, ""
content = <<-EOF
def is_admin?
false
end
def is_admin?
false
end
EOF

inject_into_file "app/models/user.rb",
Expand Down
16 changes: 8 additions & 8 deletions lib/generators/auth/auth_generator.rb
Original file line number Diff line number Diff line change
Expand Up @@ -102,16 +102,16 @@ def add_auth_routes
log :add_auth_routes, ""
auth_routes = <<-ROUTE
# User Resource
resources :users
# User Resource
resources :users
# Login & Logout
delete "/logout", to: "sessions#destroy", as: :logout
post "/login", to: "sessions#create", as: :perform_login
get "/login", to: "sessions#new", as: :login
# Login & Logout
delete "/logout", to: "sessions#destroy", as: :logout
post "/login", to: "sessions#create", as: :perform_login
get "/login", to: "sessions#new", as: :login
# Default Route should go to the login page
root "sessions#new"
# Default Route should go to the login page
root "sessions#new"
ROUTE

Expand Down
14 changes: 7 additions & 7 deletions lib/generators/bootstrap/bootstrap_generator.rb
Original file line number Diff line number Diff line change
Expand Up @@ -78,8 +78,8 @@ def customize_error_pages
log :customize_error_pages, ''

meta_tags = <<-EOS
<meta charset='utf-8' />
<meta name='ROBOTS' content='NOODP' />
<meta charset='utf-8' />
<meta name='ROBOTS' content='NOODP' />
EOS

in_root do
Expand Down Expand Up @@ -143,11 +143,11 @@ def configure_app_generators
log :configure_app_generators, ''
generators_config = <<-CON
# don't have rails create stylesheets or javascript files
config.generators do |g|
g.assets false
g.helper false
end
# don't have rails create stylesheets or javascript files
config.generators do |g|
g.assets false
g.helper false
end
CON

Expand Down
13 changes: 2 additions & 11 deletions lib/generators/bootstrap/templates/assets/stylesheets/fonts.scss
Original file line number Diff line number Diff line change
Expand Up @@ -38,13 +38,13 @@

/* Font-Awesome
-------------------------------------------------------------------*/
@include font-face(FontAwesome, 'font-awesome/fontawesome-webfont', normal, normal, $asset-pipeline: true);
// @include font-face(FontAwesome, 'font-awesome/fontawesome-webfont', normal, normal, $asset-pipeline: true);



/* Glyphicons
-------------------------------------------------------------------*/
@include font-face(Glyphicons, 'glyphicons/flat-ui-pro-icons-regular', normal, normal, $asset-pipeline: true);
// @include font-face(Glyphicons, 'glyphicons/flat-ui-pro-icons-regular', normal, normal, $asset-pipeline: true);



Expand All @@ -56,12 +56,3 @@
// @include font-face(Lato-Italic, 'lato/lato-italic', normal, italic, $asset-pipeline: true);
// @include font-face(Lato-Light, 'lato/lato-light', thin, normal, $asset-pipeline: true);
// @include font-face(Lato, 'lato/lato-regular', normal, normal, $asset-pipeline: true);



/* TaylorMade Font
-------------------------------------------------------------------*/
// @include font-face(ClubHaus, '/fonts/ClubHaus/ClubHaus-Regular.ttf', normal, $asset-pipeline: true);
// @include font-face(ClubHaus-Bold, '/fonts/ClubHaus/ClubHaus-Bold.ttf', bold, $asset-pipeline: true);
// @include font-face(ClubHaus-Oblique, '/fonts/ClubHaus/ClubHaus-Oblique.ttf', normal, italic, $asset-pipeline: true);
// @include font-face(ClubHaus-BoldOblique, '/fonts/ClubHaus/ClubHaus-BoldOblique.ttf', bold, italic, $asset-pipeline: true);
36 changes: 18 additions & 18 deletions lib/generators/bower/bower_generator.rb
Original file line number Diff line number Diff line change
Expand Up @@ -19,31 +19,31 @@ def initialize(args = [], options = {}, config = {})
def create_bowerrc
create_file ".bowerrc", <<-BOW
{
"directory": "vendor/assets/bower_components",
"json": "bower.json"
"directory": "vendor/assets/bower_components",
"json": "bower.json"
}
BOW
end

def run_bower_init
create_file "bower.json", <<-BOWERJSON
{
"name": "#{application_name}",
"version": "0.0.01",
"authors": [
"#{`whoami`.chomp}"
],
"license": "MIT",
"ignore": [
"**/.*",
"node_modules",
"bower_components",
"vendor/assets/bower_components",
"test",
"tests"
],
"dependencies": {
}
"name": "#{application_name}",
"version": "0.0.01",
"authors": [
"#{`whoami`.chomp}"
],
"license": "MIT",
"ignore": [
"**/.*",
"node_modules",
"bower_components",
"vendor/assets/bower_components",
"test",
"tests"
],
"dependencies": {
}
}
BOWERJSON
end
Expand Down
10 changes: 5 additions & 5 deletions lib/generators/registration/register_generator.rb
Original file line number Diff line number Diff line change
Expand Up @@ -46,12 +46,12 @@ def copy_reg_files
def add_reg_routes
reg_routes = <<-ROUTE
# regisration
get "/register", to: "registrations#new", as: :registration
post "/register", to: "registrations#create", as: :create_registration
# regisration
get "/register", to: "registrations#new", as: :registration
post "/register", to: "registrations#create", as: :create_registration
# dashboard
get "/dashboard", to: "dashboard#index", as: :dashboard
# dashboard
get "/dashboard", to: "dashboard#index", as: :dashboard
ROUTE

route reg_routes
Expand Down

0 comments on commit 64d764a

Please sign in to comment.