Giter Site home page Giter Site logo

vmcilwain / myrails Goto Github PK

View Code? Open in Web Editor NEW
1.0 1.0 0.0 345 KB

A ruby gem to help quickly spin up a rails app and start coding

Home Page: https://rubygems.org/gems/myrails

License: MIT License

Ruby 76.68% Shell 2.23% CSS 2.62% JavaScript 0.09% HTML 18.34% CoffeeScript 0.04%

myrails's People

Contributors

lovellnoinc avatar vmcilwain avatar

Stargazers

 avatar

Watchers

 avatar  avatar

myrails's Issues

Add material

Just as with the bootstrap layout, there should be a material layout to choose from as well.

add api authorization code

Add api authorization code. figure out a way to categorize it like what was don with the install code.

Update rspec templates

Actions should only require the object not object.id
All specs should have a subject that points to the assigns object
All specs should use is_expected.to where possible
All specs should have flash specs already filled out

add additional headers to nginx config

proxy_pass        http://myapp;
proxy_set_header  Host $host;
proxy_set_header  X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header  X-Forwarded-Proto $scheme;
proxy_set_header  X-Forwarded-Ssl on; # Optional
proxy_set_header  X-Forwarded-Port $server_port;
proxy_set_header  X-Forwarded-Host $host;

Address issue with nested controllers

myrails controller --name admin/articles generates code like:

let(:admin/articles) {[]}
let(:admin/article) {create :admin/article}

describe 'GET index' do
before do
3.times {admin/articles << create(:admin/article)}
get :index
end

it 'sets @admin/articles' do
  expect(assigns[:admin/articles]).to eq admin/articles
end

end

Add capistrano setup

Add action to generate capistrano setup including rake tasks, templates and notification.

Add record identifier to rails helper

config.include ActionView::RecordIdentifier, type: :feature

Adding the above line will allow use of record identifiers such as dom_id to be used in the feature spec.

add figaro

Add option to install figaro instead of dotenv. Be sure to check if one or the other has been installed before installing.

css import statement is nested

When choosing a css style the import statement in the application.css.sass file is nested.

@import animate
  @import spacelab
@import will_paginate

Add rspec feature creation

There should be an action to generate a generic rspec feature file. Something like:

myrails feature --name=directory/filename

Action should add the file with _.spec.rb to the end of it in the sub directory specified in the spec/features directory.

ui_install generated an error

$ myrails ui_install
create app/controllers/ui_controller.rb
create app/views/ui/index.html.haml
/Users/lovell.m/.rvm/gems/ruby-2.3.0/gems/thor-0.19.1/lib/thor/actions.rb:90:in action': wrong number of arguments (given 0, expected 1) (ArgumentError) from /Users/lovell.m/.rvm/gems/ruby-2.3.0/gems/myrails-1.0.0/lib/myrails.rb:65:inblock in ui_install'
from /Users/lovell.m/.rvm/gems/ruby-2.3.0/gems/thor-0.19.1/lib/thor/actions/inject_into_file.rb:46:in initialize' from /Users/lovell.m/.rvm/gems/ruby-2.3.0/gems/thor-0.19.1/lib/thor/actions/inject_into_file.rb:30:innew'
from /Users/lovell.m/.rvm/gems/ruby-2.3.0/gems/thor-0.19.1/lib/thor/actions/inject_into_file.rb:30:in insert_into_file' from /Users/lovell.m/.rvm/gems/ruby-2.3.0/gems/myrails-1.0.0/lib/myrails.rb:61:inui_install'
from /Users/lovell.m/.rvm/gems/ruby-2.3.0/gems/thor-0.19.1/lib/thor/command.rb:27:in run' from /Users/lovell.m/.rvm/gems/ruby-2.3.0/gems/thor-0.19.1/lib/thor/invocation.rb:126:ininvoke_command'

    from /Users/lovell.m/.rvm/gems/ruby-2.3.0/gems/thor-0.19.1/lib/thor.rb:359:in `dispatch'
    from /Users/lovell.m/.rvm/gems/ruby-2.3.0/gems/thor-0.19.1/lib/thor/base.rb:440:in `start'
    from /Users/lovell.m/.rvm/gems/ruby-2.3.0/gems/myrails-1.0.0/lib/myrails.rb:399:in `<top (required)>'
    from /Users/lovell.m/.rvm/gems/ruby-2.3.0/gems/myrails-1.0.0/bin/myrails:3:in `require_relative'
    from /Users/lovell.m/.rvm/gems/ruby-2.3.0/gems/myrails-1.0.0/bin/myrails:3:in `<top (required)>'
    from /Users/lovell.m/.rvm/gems/ruby-2.3.0/bin/myrails:23:in `load'
    from /Users/lovell.m/.rvm/gems/ruby-2.3.0/bin/myrails:23:in `<main>'
    from /Users/lovell.m/.rvm/gems/ruby-2.3.0/bin/ruby_executable_hooks:15:in `eval'
    from /Users/lovell.m/.rvm/gems/ruby-2.3.0/bin/ruby_executable_hooks:15:in `<main>'

Pundit updates

The pundit rescue clause should be added above protect

Including pundit should happen just after the class declaration.

controller generator should create asset files as well

For .coffee files:

# 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/

For .scss files:

// Place all the styles related to the organizations controller here.
// They will automatically be included in application.css.
// You can use Sass (SCSS) here: http://sass-lang.com/

Footer should be optional

Layout assumes a footer is created. Most likely css as well.

Change code to only insert footer render code if a footer is actually generated

Combine related tasks

Combine related tasks based on initial install order:

install gems
install application helper
combine:
install assets
install layout
install css
install footer
install ui
install pundit
combine:
install rspec
install rails_helper
install footnotes
git_init

add namespace option to controllers action

Initial thought is to have option called nspace that takes a path from app to handle nesting controllers when needed.

The namespace option should take of adding a top level controller for named controller to inherit from.

if namespace is admin with a controller of users then the following:
app

  • controllers
    -- admin
    --- admin controller (which inherits from application controller)
    --- user controller (which inherits from admin controller)

This should also be mimicked in the rspec file structure as well.

Add api authentication

After creating an api authentication setup, it should be added to this so that the setup can be automated.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.