Skip to content
Open
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
3 changes: 3 additions & 0 deletions app/assets/javascripts/structure.coffee
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# Place all the behaviors and hooks related to the matching controller here.
# All this logic will automatically be available in application.js.
# You can use CoffeeScript in this file: http://coffeescript.org/
3 changes: 3 additions & 0 deletions app/assets/stylesheets/structure.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
// Place all the styles related to the structure controller here.
// They will automatically be included in application.css.
// You can use Sass (SCSS) here: http://sass-lang.com/
7 changes: 7 additions & 0 deletions app/controllers/structure_controller.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
class StructureController < ApplicationController
def glob
end

def tree
end
end
2 changes: 2 additions & 0 deletions app/helpers/structure_helper.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
module StructureHelper
end
2 changes: 2 additions & 0 deletions app/views/structure/glob.html.erb
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
<h1>Structure#glob</h1>
<p>Find me in app/views/structure/glob.html.erb</p>
2 changes: 2 additions & 0 deletions app/views/structure/tree.html.erb
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
<h1>Structure#tree</h1>
<p>Find me in app/views/structure/tree.html.erb</p>
15 changes: 10 additions & 5 deletions bin/functions.sh
Original file line number Diff line number Diff line change
Expand Up @@ -12,15 +12,15 @@ function renderCommands() {
echo -e "${ORANGE}Available commands for localhost environment:${NC}"
echo -e " ${GREEN}start${NC} Start and setup development environment."
echo -e " ${GREEN}stop${NC} Stop development environment."
echo -e " ${GREEN}in${NC} Go into a container."
echo -e " ${GREEN}in${NC} Go into a container as current user."
echo -e " ${GREEN}indef${NC} Go into a container as default user."
echo ""
exit 0;
}


function start() {
docker-compose up -d --build;
echo "== All done, happy coding. ==";
docker-compose up --build;
}


Expand All @@ -29,6 +29,11 @@ function stop() {
}


function goIntoContainer() {
docker exec -t -i ${APP_CONTAINER} bash;
function goIntoContainerCurrentUser() {
docker exec -t -i -u `id -u $UID` ${APP_CONTAINER} bash;
}


function goIntoContainerDefaultUser() {
docker exec -t -i ${APP_CONTAINER} bash;
}
5 changes: 4 additions & 1 deletion bin/helper
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,12 @@ case "$1" in
;;

in)
goIntoContainer;
goIntoContainerCurrentUser;
;;

indef)
goIntoContainerDefaultUser;
;;
*)
echo "Sorry, I don't know want you want"
esac
4 changes: 4 additions & 0 deletions config/routes.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
Rails.application.routes.draw do
get 'structure/glob'

get 'structure/tree'

# For details on the DSL available within this file, see http://guides.rubyonrails.org/routing.html
end
14 changes: 14 additions & 0 deletions test/controllers/structure_controller_test.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
require 'test_helper'

class StructureControllerTest < ActionDispatch::IntegrationTest
test "should get glob" do
get structure_glob_url
assert_response :success
end

test "should get tree" do
get structure_tree_url
assert_response :success
end

end