-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Showing
9 changed files
with
31 additions
and
33 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
4 changes: 1 addition & 3 deletions
4
lib/natra/generators/app/templates/app/controllers/application_controller.rb
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,12 @@ | ||
require './config/environment' | ||
|
||
class ApplicationController < Sinatra::Base | ||
|
||
configure do | ||
set :public_folder, 'public' | ||
set :views, 'app/views' | ||
end | ||
|
||
get "/" do | ||
get '/' do | ||
erb :welcome | ||
end | ||
|
||
end |
4 changes: 2 additions & 2 deletions
4
lib/natra/generators/app/templates/config/initializers/redis.rb
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
require "yaml" | ||
require 'yaml' | ||
|
||
# Redis Configuration | ||
unless ENV['RACK_ENV'] == 'test' | ||
redis_settings = YAML::load_file("config/redis.yml") | ||
redis_settings = YAML.load_file('config/redis.yml') | ||
REDIS = Redis.new(redis_settings[ENV['RACK_ENV']]) | ||
end |
12 changes: 6 additions & 6 deletions
12
lib/natra/generators/app/templates/db/migrate/add_extensions.rb
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
class AddExtensions < ActiveRecord::Migration[5.2] | ||
def change | ||
enable_extension 'hstore' | ||
enable_extension 'uuid-ossp' | ||
enable_extension 'pgcrypto' | ||
end | ||
end | ||
def change | ||
enable_extension 'hstore' | ||
enable_extension 'uuid-ossp' | ||
enable_extension 'pgcrypto' | ||
end | ||
end |
6 changes: 3 additions & 3 deletions
6
lib/natra/generators/app/templates/spec/application_controller_spec.rb
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,13 @@ | ||
require_relative "spec_helper" | ||
require_relative 'spec_helper' | ||
|
||
def app | ||
ApplicationController | ||
end | ||
|
||
describe ApplicationController do | ||
it "responds with a welcome message" do | ||
it 'responds with a welcome message' do | ||
get '/' | ||
expect(last_response.status).to eq(200) | ||
expect(last_response.body).to include("Welcome to the Sinatra Template!") | ||
expect(last_response.body).to include('Welcome to the Sinatra Template!') | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
require "thor/group" | ||
require 'thor/group' | ||
require 'active_support/inflector' | ||
module Natra | ||
module Generators | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,3 @@ | ||
module Natra | ||
VERSION = '0.0.6'.freeze | ||
VERSION = '0.0.7'.freeze | ||
end |