Module: BackboneGenerator

Defined in:
lib/backbone_generator/cli.rb,
lib/backbone_generator.rb,
lib/backbone_generator/version.rb,
lib/backbone_generator/auxilliary.rb,
lib/backbone_generator/post_install_message.rb,
lib/backbone_generator/generators/new/new_generator.rb,
lib/backbone_generator/generators/route/route_generator.rb,
lib/backbone_generator/generators/tests/tests_generator.rb,
lib/backbone_generator/generators/views/views_generator.rb,
lib/backbone_generator/generators/models/models_generator.rb,
lib/backbone_generator/generators/library/library_generator.rb,
lib/backbone_generator/generators/templates/templates_generator.rb,
lib/backbone_generator/generators/utilities/utilities_generator.rb,
lib/backbone_generator/generators/collections/collections_generator.rb

Overview

Namespace for all the classess

Since:

  • 0.0.3

Defined Under Namespace

Classes: CLI, CollectionGenerator, ModelGenerator, NewGenerator, RouteGenerator, TemplateGenerator, TestGenerator, UtilityGenerator, ViewGenerator

Constant Summary collapse

VERSION =

Since:

  • 0.0.3

"0.0.5"
@@option_details =

This app hold the details of the app

Since:

  • 0.0.3

{}

Class Method Summary collapse

Class Method Details

.compile_and_copy(source_file, *args) ⇒ Object

This code is dummed down version of template_method in the bundler gem. Original version can be found God Bless all the great and awesome people who brought us open source God Bless all the ruby developers out there!



17
18
19
20
21
22
23
# File 'lib/backbone_generator/auxilliary.rb', line 17

def compile_and_copy(source_file, *args)
    config = args.last.is_a?(Hash) ? args.pop : {}
    destination = args.first
    context = instance_eval('binding')
    content = ERB.new(::File.binread(source_file)).result(context)
    open(destination, 'w') { |f| f << content }
end

.option_detailsObject

Getter for the option_details hash

Since:

  • 0.0.3



34
35
36
# File 'lib/backbone_generator/auxilliary.rb', line 34

def option_details
    @@option_details
end

.option_details=(value) ⇒ Object

Setter for the option_details hash

Since:

  • 0.0.3



39
40
41
# File 'lib/backbone_generator/auxilliary.rb', line 39

def option_details=(value)
    @@option_details = value
end

.post_install_messageObject

Since:

  • 0.0.3



3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
# File 'lib/backbone_generator/post_install_message.rb', line 3

def post_install_message
  footer = "\n======== Release notes for BackboneGenerator ===========\n\nThank you very much for downloading the backbone_generator\ngem. I would like to hear your feedback on possible bugs\nand also potential features that you would like to see in\nthe next release!\n\nHappy Coding :-)\n- Tawheed \n\n==========================================================\n\n"
end

.start_server(port) ⇒ Object

Function used to start server

Since:

  • 0.0.3



26
27
28
29
30
31
# File 'lib/backbone_generator/auxilliary.rb', line 26

def start_server(port)
    root = Dir.getwd
    server = WEBrick::HTTPServer.new :Port => port, :DocumentRoot => root
    trap 'INT' do server.shutdown end
    server.start
end