Skip to content

Commit

Permalink
rubocop fixup (#6)
Browse files Browse the repository at this point in the history
* update rubocop for the template
  • Loading branch information
thirunjuguna committed Nov 7, 2018
1 parent a2417b3 commit 2b72059
Show file tree
Hide file tree
Showing 9 changed files with 31 additions and 33 deletions.
18 changes: 9 additions & 9 deletions Gemfile.lock
@@ -1,7 +1,7 @@
PATH
remote: .
specs:
natra (0.0.6)
natra (0.0.7)
activesupport (~> 5.0)
thor (~> 0.18)

Expand All @@ -21,7 +21,7 @@ GEM
erubi (~> 1.4)
rails-dom-testing (~> 2.0)
rails-html-sanitizer (~> 1.0, >= 1.0.3)
active_model_serializers (0.10.7)
active_model_serializers (0.10.8)
actionpack (>= 4.1, < 6)
activemodel (>= 4.1, < 6)
case_transform (>= 0.2)
Expand All @@ -38,7 +38,7 @@ GEM
case_transform (0.2)
activesupport
coderay (1.1.2)
concurrent-ruby (1.0.5)
concurrent-ruby (1.1.3)
coveralls (0.8.22)
json (>= 1.8, < 3)
simplecov (~> 0.16.1)
Expand Down Expand Up @@ -77,11 +77,11 @@ GEM
rb-fsevent (~> 0.9, >= 0.9.4)
rb-inotify (~> 0.9, >= 0.9.7)
ruby_dep (~> 1.2)
loofah (2.2.2)
loofah (2.2.3)
crass (~> 1.0.2)
nokogiri (>= 1.5.9)
lumberjack (1.0.13)
method_source (0.9.0)
method_source (0.9.1)
mini_portile2 (2.3.0)
minitest (5.11.3)
nenv (0.3.0)
Expand All @@ -94,10 +94,10 @@ GEM
parser (2.5.3.0)
ast (~> 2.4.0)
powerpack (0.1.2)
pry (0.11.3)
pry (0.12.0)
coderay (~> 1.1.0)
method_source (~> 0.9.0)
rack (2.0.5)
rack (2.0.6)
rack-test (1.1.0)
rack (>= 1.0, < 3)
rails-dom-testing (2.0.3)
Expand Down Expand Up @@ -139,11 +139,11 @@ GEM
json (>= 1.8, < 3)
simplecov-html (~> 0.10.0)
simplecov-html (0.10.2)
term-ansicolor (1.6.0)
term-ansicolor (1.7.0)
tins (~> 1.0)
thor (0.19.4)
thread_safe (0.3.6)
tins (1.17.0)
tins (1.18.0)
tzinfo (1.2.5)
thread_safe (~> 0.1)
unicode-display_width (1.4.0)
Expand Down
14 changes: 7 additions & 7 deletions lib/natra/generators/app/templates/Gemfile
Expand Up @@ -3,17 +3,17 @@ ruby '2.5.3'
gem 'bcrypt'
gem 'coveralls'
gem 'natra'
gem 'oj'
gem 'pg', '~> 0.21.0'
gem 'puma'
gem 'rake'
gem 'rack-timeout'
gem 'require_all'
gem 'seed-fu'
gem 'scout_apm'
gem 'sinatra'
gem 'sinatra-activerecord', :require => 'sinatra/activerecord'
gem 'rake'
gem 'rack-timeout'
gem 'require_all'
gem "tux"
gem 'pg', '~> 0.21.0'
gem 'puma'
gem 'oj'
gem 'tux'
group :development, :test do
gem 'pry-byebug'
gem 'pry'
Expand Down
@@ -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
@@ -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 lib/natra/generators/app/templates/db/migrate/add_extensions.rb
@@ -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
@@ -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
2 changes: 1 addition & 1 deletion lib/natra/generators/app/templates/spec/spec_helper.rb
@@ -1,4 +1,4 @@
ENV["RACK_ENV"] = "test"
ENV['RACK_ENV'] = 'test'
require_relative '../config/environment'
require 'rack/test'
require 'capybara/rspec'
Expand Down
2 changes: 1 addition & 1 deletion lib/natra/generators/scaffold/scaffold_generator.rb
@@ -1,4 +1,4 @@
require "thor/group"
require 'thor/group'
require 'active_support/inflector'
module Natra
module Generators
Expand Down
2 changes: 1 addition & 1 deletion lib/natra/version.rb
@@ -1,3 +1,3 @@
module Natra
VERSION = '0.0.6'.freeze
VERSION = '0.0.7'.freeze
end

0 comments on commit 2b72059

Please sign in to comment.