[go: nahoru, domu]

Skip to content

Commit

Permalink
rename generator_templates to templates
Browse files Browse the repository at this point in the history
use `ActionController::Base` instead `ApplicationController`
prep for next PR and release
  • Loading branch information
ytbryan committed Jan 4, 2019
1 parent 761055f commit e5df256
Show file tree
Hide file tree
Showing 16 changed files with 8 additions and 7 deletions.
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,3 +11,5 @@
- Vue UI ready
- State management with simple store https://vuejs.org/v2/guide/state-management.html
- Vue on Rails application template using `rails new app -m https://vueonrails.com/vue -d postgresql`
- Support Babel 7
- Support webpack 4 & Webpacker 4
2 changes: 1 addition & 1 deletion app/controllers/vue_controller.rb
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
class VueController < ApplicationController
class VueController < ActionController::Base
end
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
2 changes: 1 addition & 1 deletion lib/generators/vue/vue_generator.rb
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ class VueGenerator < Rails::Generators::NamedBase
PARTS_PATH = "app/javascript/parts"
TESTS_PATH = "app/javascript/tests"

source_root File.expand_path('../../generator_templates', __FILE__)
source_root File.expand_path('../../templates', __FILE__)

argument :name, type: :string, default: nil

Expand Down
8 changes: 4 additions & 4 deletions lib/installs/setup.rb
Original file line number Diff line number Diff line change
Expand Up @@ -70,11 +70,11 @@
babelrc, before: " \"presets\": ["

# Insert locale.js as a default i18n and add second locale cn.yml
copy_file "#{__dir__}/../generators/generator_templates/i18n/index.js", Rails.root.join("app/javascript/locales/locale.js").to_s
copy_file "#{__dir__}/../generators/generator_templates/i18n/cn.yml", Rails.root.join("config/locales/cn.yml").to_s
copy_file "#{__dir__}/../generators/templates/i18n/index.js", Rails.root.join("app/javascript/locales/locale.js").to_s
copy_file "#{__dir__}/../generators/templates/i18n/cn.yml", Rails.root.join("config/locales/cn.yml").to_s

# Insert store.js as a simple store for components' state
copy_file "#{__dir__}/../generators/generator_templates/stores/index.js", Rails.root.join("app/javascript/parts/store.js").to_s
copy_file "#{__dir__}/../generators/templates/stores/index.js", Rails.root.join("app/javascript/parts/store.js").to_s

# Add Procfile for foreman
template "#{__dir__}/Procfile", Rails.root.join("Procfile").to_s
Expand All @@ -83,4 +83,4 @@
gsub_file Rails.root.join("app/views/layouts/application.html.erb").to_s,
/<body>/, '<%= content_tag :body, class: specific_page_vue do %>'
gsub_file Rails.root.join("app/views/layouts/application.html.erb").to_s,
/<\/body>/, '<% end %>'
/<\/body>/, '<% end %>'
1 change: 0 additions & 1 deletion vueonrails.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -21,5 +21,4 @@ Gem::Specification.new do |spec|

spec.add_development_dependency "bundler", "~> 1.11"
spec.add_development_dependency "rake", "~> 10.0"
spec.add_development_dependency 'rspec', '~> 3.8', '>= 3.8.0'
end

0 comments on commit e5df256

Please sign in to comment.