<commit_before>steroids = require "../../../steroids"
spawn = require("child_process").spawn
path = require "path"
fs = require "fs"
ejs = require "ejs"
util = require "util"

Base = require "../Base"

class Default extends Base
  @usageParams: ->
    "<resource>"

  @usage: ()->
    """
    Generates a stub resource consisting of a controller and a single index view.

    Options:
      - resource: name of resource to use. example: car will result in a carController and views/car/index.html
    """

  templatePath: ->
    path.join(steroids.paths.templates.resources, "default")

  generate: -><commit_msg>better help<commit_after>steroids = require "../../../steroids"
spawn = require("child_process").spawn
path = require "path"
fs = require "fs"
ejs = require "ejs"
util = require "util"

Base = require "../Base"

class Default extends Base
  @usageParams: ->
    "<resource>"

  @usage: ()->
    """
    Generates a stub resource consisting of a controller and index show views.

    Options:
      - resource: name of resource to use. example: car will result in a app/controllers/car.js and views/car/index.html & show.html
    """

  templatePath: ->
    path.join(steroids.paths.templates.resources, "default")

  generate: ->
{'fraction_non_alphanumeric': 0.13768115942028986, 'fraction_numerical': 0.0, 'mean_word_length': 3.2135593220338983, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 13, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5929326', 'n_tokens_mistral': 372, 'n_tokens_neox': 366, 'n_words': 121}