Skip to content

Commit

Permalink
KBP-124 #time 15m - File and folder naming changed
Browse files Browse the repository at this point in the history
  • Loading branch information
esref.viduslu committed Oct 30, 2017
1 parent 6264cf3 commit 98e36cd
Show file tree
Hide file tree
Showing 7 changed files with 15 additions and 15 deletions.
2 changes: 1 addition & 1 deletion lib/cybele.rb
Original file line number Diff line number Diff line change
Expand Up @@ -9,5 +9,5 @@
require 'cybele/helpers/simple_form'
require 'cybele/helpers/show_for'
require 'cybele/helpers/recipient_interceptor'
require 'cybele/helpers/haml_and_haml_rails'
require 'cybele/helpers/haml'
require 'cybele/app_builder'
2 changes: 1 addition & 1 deletion lib/cybele/app_builder.rb
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ class AppBuilder < Rails::AppBuilder
include Cybele::Helpers::SimpleForm
include Cybele::Helpers::RecipientInterceptor
include Cybele::Helpers::ShowFor
include Cybele::Helpers::HamlAndHamlRails
include Cybele::Helpers::Haml

def readme
template 'README.md.erb',
Expand Down
12 changes: 6 additions & 6 deletions lib/cybele/generators/app_generator.rb
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ class AppGenerator < Rails::Generators::AppGenerator
default: false,
group: :cybele,
desc: 'Skip show_for integration. Default: don\'t skip'
class_option :skip_haml_and_haml_rails,
class_option :skip_haml,
type: :boolean,
aliases: nil,
default: false,
Expand All @@ -74,7 +74,7 @@ def initialize(*args)
option_with_ask_yes(:skip_sidekiq)
option_with_ask_yes(:skip_simple_form)
option_with_ask_yes(:skip_show_for)
option_with_ask_yes(:skip_haml_and_haml_rails)
option_with_ask_yes(:skip_haml)
@options.freeze
end

Expand All @@ -83,7 +83,7 @@ def customize_gemfile
build :add_gems
build :add_simple_form_gem unless @options[:skip_simple_form]
build :add_show_for_gem unless @options[:skip_show_for]
build :add_haml_and_haml_rails_gems unless @options[:skip_haml_and_haml_rails]
build :add_haml_gems unless @options[:skip_haml]
bundle_command 'install --binstubs=bin/stubs'
end

Expand Down Expand Up @@ -156,10 +156,10 @@ def setup_simple_form
build :configure_simple_form
end

def setup_haml_and_haml_rails
return if @options[:skip_haml_and_haml_rails]
def setup_haml
return if @options[:skip_haml]
say 'Setting up haml and generate haml-rails', :green
build :configure_haml_and_haml_rails
build :configure_haml
end

def add_staging_secret_key
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,16 @@

module Cybele
module Helpers
module HamlAndHamlRails
def configure_haml_and_haml_rails
module Haml
def configure_haml
# Add initializers
bundle_command 'exec rails generate haml:application_layout convert'
remove_file 'app/views/layouts/application.html.erb'
end

def add_haml_and_haml_rails_gems
def add_haml_gems
# Add Gems
append_file('Gemfile', template_content('haml_and_haml_rails/haml_Gemfile.erb'))
append_file('Gemfile', template_content('haml/haml_Gemfile.erb'))
end
end
end
Expand Down
2 changes: 1 addition & 1 deletion spec/features/new_default_project_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -170,7 +170,7 @@
expect(secret_file).to match('staging')
end

it 'uses haml and haml_rails' do
it 'uses haml' do
gemfile_file = content('Gemfile')
expect(gemfile_file).to match(/^gem 'haml'/)
expect(gemfile_file).to match(/^gem 'haml-rails'/)
Expand Down
4 changes: 2 additions & 2 deletions spec/features/new_not_default_project_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
drop_dummy_database
remove_project_directory
run_cybele('--database=sqlite3 --skip-create-database --skip-sidekiq --skip-simple-form --skip-show-for'\
' --skip-haml-and-haml-rails')
' --skip-haml')
setup_app_dependencies
end

Expand Down Expand Up @@ -154,7 +154,7 @@
expect(secret_file).to match('staging')
end

it 'do not use haml and haml_rails' do
it 'do not use haml' do
gemfile_file = content('Gemfile')
expect(gemfile_file).not_to match(/^gem 'haml'/)
expect(gemfile_file).not_to match(/^gem 'haml-rails'/)
Expand Down
File renamed without changes.

0 comments on commit 98e36cd

Please sign in to comment.