<commit_before>;;; packages.el --- Ruby on Rails Layer packages File for Spacemacs
;;
;; Copyright (c) 2012-2016 <NAME> & Contributors
;;
;; Author: <NAME> <<EMAIL>>
;; URL: https://github.com/syl20bnr/spacemacs
;;
;; This file is not part of GNU Emacs.
;;
;;; License: GPLv3

(setq ruby-on-rails-packages
  '(
    feature-mode
    projectile-rails
    ))

(defun ruby-on-rails/init-projectile-rails ()
  (use-package projectile-rails
    :defer t
    :init
    (progn
      (add-hook 'projectile-mode-hook 'projectile-rails-on))
    :config
    (progn
      (spacemacs|diminish projectile-rails-mode " ⇋" " RoR")

      ;; Find files
      (dolist (mode '(ruby-mode enh-ruby-mode))
        (spacemacs/set-leader-keys-for-major-mode mode
          "rfa" 'projectile-rails-find-locale
          "rfc" 'projectile-rails-find-controller
          "rfe" 'projectile-rails-find-environment
          "rff" 'projectile-rails-find-feature
          "rfh" 'projectile-rails-find-helper
          "rfi" 'projectile-rails-find-initializer
          "rfj" 'projectile-rails-find-javascript
          "rfl" 'projectile-rails-find-lib
          "rfm" 'projectile-rails-find-model
          "rfn" 'projectile-rails-find-migration
          "rfo" 'projectile-rails-find-log
          "rfp" 'projectile-rails-find-spec
          "rfr" 'projectile-rails-find-rake-task
          "rfs" 'projectile-rails-find-stylesheet
          "rft" 'projectile-rails-find-test
          "rfu" 'projectile-rails-find-fixture
          "rfv" 'projectile-rails-find-view
          "rfy" 'projectile-rails-find-layout
          "rf@" 'projectile-rails-find-mailer
          ;; Goto file
          "rgc" 'projectile-rails-find-current-controller
          "rgd" 'projectile-rails-goto-schema
          "rge" 'projectile-rails-goto-seeds
          "rgh" 'projectile-rails-find-current-helper
          "rgj" 'projectile-rails-find-current-javascript
          "rgg" 'projectile-rails-goto-gemfile
          "rgm" 'projectile-rails-find-current-model
          "rgn" 'projectile-rails-find-current-migration
          "rgp" 'projectile-rails-find-current-spec
          "rgr" 'projectile-rails-goto-routes
          "rgs" 'projectile-rails-find-current-stylesheet
          "rgt" 'projectile-rails-find-current-test
          "rgu" 'projectile-rails-find-current-fixture
          "rgv" 'projectile-rails-find-current-view
          "rgz" 'projectile-rails-goto-spec-helper
          "rg." 'projectile-rails-goto-file-at-point
          ;; Rails external commands
          "r:" 'projectile-rails-rake
          "rcc" 'projectile-rails-generate
          "ri" 'projectile-rails-console
          "rxs" 'projectile-rails-server
          ;; Refactoring 'projectile-rails-mode
          "rRx" 'projectile-rails-extract-region))
      ;; Ex-commands
      (evil-ex-define-cmd "A" 'projectile-toggle-between-implementation-and-test))))

(defun ruby-on-rails/init-feature-mode ()
  "Initialize Cucumber feature mode"
  (use-package feature-mode
    :mode (("\\.feature\\'" . feature-mode))))
<commit_msg>rails: add which key prefixes for rails<commit_after>;;; packages.el --- Ruby on Rails Layer packages File for Spacemacs
;;
;; Copyright (c) 2012-2016 <NAME> & Contributors
;;
;; Author: <NAME> <<EMAIL>>
;; URL: https://github.com/syl20bnr/spacemacs
;;
;; This file is not part of GNU Emacs.
;;
;;; License: GPLv3

(setq ruby-on-rails-packages
  '(
    feature-mode
    projectile-rails
    which-key
    ))

(defun ruby-on-rails/init-projectile-rails ()
  (use-package projectile-rails
    :defer t
    :init
    (progn
      (add-hook 'projectile-mode-hook 'projectile-rails-on))
    :config
    (progn
      (spacemacs|diminish projectile-rails-mode " ⇋" " RoR")

      ;; Find files
      (dolist (mode '(ruby-mode enh-ruby-mode))
        (spacemacs/set-leader-keys-for-major-mode mode
          "rfa" 'projectile-rails-find-locale
          "rfc" 'projectile-rails-find-controller
          "rfe" 'projectile-rails-find-environment
          "rff" 'projectile-rails-find-feature
          "rfh" 'projectile-rails-find-helper
          "rfi" 'projectile-rails-find-initializer
          "rfj" 'projectile-rails-find-javascript
          "rfl" 'projectile-rails-find-lib
          "rfm" 'projectile-rails-find-model
          "rfn" 'projectile-rails-find-migration
          "rfo" 'projectile-rails-find-log
          "rfp" 'projectile-rails-find-spec
          "rfr" 'projectile-rails-find-rake-task
          "rfs" 'projectile-rails-find-stylesheet
          "rft" 'projectile-rails-find-test
          "rfu" 'projectile-rails-find-fixture
          "rfv" 'projectile-rails-find-view
          "rfy" 'projectile-rails-find-layout
          "rf@" 'projectile-rails-find-mailer
          ;; Goto file
          "rgc" 'projectile-rails-find-current-controller
          "rgd" 'projectile-rails-goto-schema
          "rge" 'projectile-rails-goto-seeds
          "rgh" 'projectile-rails-find-current-helper
          "rgj" 'projectile-rails-find-current-javascript
          "rgg" 'projectile-rails-goto-gemfile
          "rgm" 'projectile-rails-find-current-model
          "rgn" 'projectile-rails-find-current-migration
          "rgp" 'projectile-rails-find-current-spec
          "rgr" 'projectile-rails-goto-routes
          "rgs" 'projectile-rails-find-current-stylesheet
          "rgt" 'projectile-rails-find-current-test
          "rgu" 'projectile-rails-find-current-fixture
          "rgv" 'projectile-rails-find-current-view
          "rgz" 'projectile-rails-goto-spec-helper
          "rg." 'projectile-rails-goto-file-at-point
          ;; Rails external commands
          "r:" 'projectile-rails-rake
          "rcc" 'projectile-rails-generate
          "ri" 'projectile-rails-console
          "rxs" 'projectile-rails-server
          ;; Refactoring 'projectile-rails-mode
          "rRx" 'projectile-rails-extract-region))

      (spacemacs/declare-prefix-for-mode 'ruby-mode "mr" "rails/rubocop")
      (spacemacs/declare-prefix-for-mode 'ruby-mode "mrf" "file")
      (spacemacs/declare-prefix-for-mode 'ruby-mode "mrg" "goto")

      ;; Ex-commands
      (evil-ex-define-cmd "A" 'projectile-toggle-between-implementation-and-test))))

(defun ruby-on-rails/init-feature-mode ()
  "Initialize Cucumber feature mode"
  (use-package feature-mode
    :mode (("\\.feature\\'" . feature-mode))))

(defun ruby-on-rails/post-init-which-key ()
  (push '("projectile-rails-\\(.+\\)" . "\\1")
        which-key-description-replacement-alist))

{'fraction_non_alphanumeric': 0.14296683046683048, 'fraction_numerical': 0.003531941031941032, 'mean_word_length': 2.4242902208201893, 'pattern_counts': {'":': 0, '<': 11, '<?xml version=': 0, '>': 11, 'https://': 2, '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': '2130301', 'n_tokens_mistral': 2330, 'n_tokens_neox': 2163, 'n_words': 347}