Skip to content
This repository was archived by the owner on Oct 19, 2018. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions lib/generators/hyper/templates/component_template.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
module Components

<%- @modules.each do |module_name| %><%= " "* @indet %>module <%= module_name.camelize %><%- @indet += 1 %>
<%- end %><%=" "* @indet %>class <%= @file_name %> < Hyperloop::Component

Expand Down Expand Up @@ -38,4 +38,4 @@ module Components
<%=" "* @indet %>end
<%=" "* @indet %>end
<%- @modules.each do %><%- @indet -= 1 %><%=" "* @indet %>end
<%- end %>end
<%- end %>
26 changes: 19 additions & 7 deletions lib/generators/hyperloop/install_generator.rb
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ def inject_react_file_js
end

def inject_engine_to_routes
route 'mount Hyperloop::Engine => \'/hyperloop\''
route 'mount Hyperloop::Engine => \'/rr\''
end

def create_hyperloop_directories
Expand All @@ -22,13 +22,13 @@ def create_hyperloop_directories
end

def create_policies_directory
create_file 'app/policies/hyperloop_application_policy.rb', <<-RUBY
# app/policies/application_policy
create_file 'app/policies/application_policy.rb', <<-RUBY
# app/policies/application_policy

# Policies regulate access to your public models
# The following policy will open up full access (but only in development)
# The policy system is very flexible and powerful. See the documentation
# for complete details.
# Policies regulate access to your public models
# The following policy will open up full access (but only in development)
# The policy system is very flexible and powerful. See the documentation
# for complete details.
class Hyperloop::ApplicationPolicy
# Allow any session to connect:
always_allow_connection
Expand All @@ -40,6 +40,18 @@ class Hyperloop::ApplicationPolicy
RUBY
end

def create_initializer
create_file 'config/initializers/hyperloop.rb', <<-RUBY

Hyperloop.configuration do |config|
config.transport = :simple_poller
config.import 'reactrb/auto-import'
end

RUBY

end

def add_gems
end
end
Expand Down