cmor_core_backend 0.0.6.pre → 0.0.7.pre

Sign up to get free protection for your applications and to get access to all the features.
Files changed (49) hide show
  1. checksums.yaml +4 -4
  2. data/lib/cmor/core/backend/gemspec.rb +2 -0
  3. data/lib/generators/cmor/core/backend/new/new_generator.rb +88 -0
  4. data/lib/generators/cmor/core/backend/new/templates/Gemfile +15 -0
  5. data/lib/generators/cmor/core/backend/new/templates/Guardfile +82 -0
  6. data/lib/generators/cmor/core/backend/new/templates/MIT-LICENSE +20 -0
  7. data/lib/generators/cmor/core/backend/new/templates/README.md +28 -0
  8. data/lib/generators/cmor/core/backend/new/templates/Rakefile +19 -0
  9. data/lib/generators/cmor/core/backend/new/templates/app/assets/config/foo_bar_manifest.js +1 -0
  10. data/lib/generators/cmor/core/backend/new/templates/app/assets/javascripts/foo_bar/application/keep.js +0 -0
  11. data/lib/generators/cmor/core/backend/new/templates/app/assets/javascripts/foo_bar/application.js +2 -0
  12. data/lib/generators/cmor/core/backend/new/templates/app/assets/javascripts/foo_bar.js +2 -0
  13. data/lib/generators/cmor/core/backend/new/templates/app/assets/stylesheets/foo_bar/application/keep.css +0 -0
  14. data/lib/generators/cmor/core/backend/new/templates/app/assets/stylesheets/foo_bar/application.css +3 -0
  15. data/lib/generators/cmor/core/backend/new/templates/app/assets/stylesheets/foo_bar.css +3 -0
  16. data/lib/generators/cmor/core/backend/new/templates/app/controllers/foo_bar/application_controller.rb +5 -0
  17. data/lib/generators/cmor/core/backend/new/templates/app/controllers/foo_bar/home_controller.rb +4 -0
  18. data/lib/generators/cmor/core/backend/new/templates/app/view_helpers/foo_bar/application_view_helper.rb +4 -0
  19. data/lib/generators/cmor/core/backend/new/templates/bin/rails +25 -0
  20. data/lib/generators/cmor/core/backend/new/templates/config/initializers/assets.rb +2 -0
  21. data/lib/generators/cmor/core/backend/new/templates/config/initializers/cmor.rb +3 -0
  22. data/lib/generators/cmor/core/backend/new/templates/config/locales/de.yml +1 -0
  23. data/lib/generators/cmor/core/backend/new/templates/config/locales/en.yml +1 -0
  24. data/lib/generators/cmor/core/backend/new/templates/config/routes.rb +3 -0
  25. data/lib/generators/cmor/core/backend/new/templates/foo_bar.gemspec +50 -0
  26. data/lib/generators/cmor/core/backend/new/templates/initialize_dummy.sh +31 -0
  27. data/lib/generators/cmor/core/backend/new/templates/lib/foo_bar/configuration.rb +23 -0
  28. data/lib/generators/cmor/core/backend/new/templates/lib/foo_bar/engine.rb +5 -0
  29. data/lib/generators/cmor/core/backend/new/templates/lib/foo_bar/version.rb +1 -0
  30. data/lib/generators/cmor/core/backend/new/templates/lib/foo_bar.rb +6 -0
  31. data/lib/generators/cmor/core/backend/new/templates/lib/generators/foo_bar/install/install_generator.rb +25 -0
  32. data/lib/generators/cmor/core/backend/new/templates/lib/generators/foo_bar/install/templates/initializer.rb +25 -0
  33. data/lib/generators/cmor/core/backend/new/templates/lib/generators/foo_bar/install/templates/routes.source +4 -0
  34. data/lib/generators/cmor/core/backend/new/templates/lib/tasks/foo_bar_tasks.rake +4 -0
  35. data/lib/generators/cmor/core/backend/new/templates/spec/lib/foo_bar/version_spec.rb +5 -0
  36. data/lib/generators/cmor/core/backend/new/templates/spec/rails_helper.rb +62 -0
  37. data/lib/generators/cmor/core/backend/new/templates/spec/spec_helper.rb +98 -0
  38. data/lib/generators/cmor/core/backend/new/templates/spec/support/capybara.rb +1 -0
  39. data/lib/generators/cmor/core/backend/new/templates/spec/support/factory_bot.rb +9 -0
  40. data/lib/generators/cmor/core/backend/new/templates/spec/support/rao-shoulda_matchers.rb +5 -0
  41. data/lib/generators/cmor/core/backend/resource_controller/resource_controller_generator.rb +38 -0
  42. data/lib/generators/cmor/core/backend/resource_controller/templates/resource_controller.rb +13 -0
  43. data/lib/generators/cmor/core/backend/resources_controller/resources_controller_generator.rb +54 -0
  44. data/lib/generators/cmor/core/backend/resources_controller/templates/resources_controller.rb +13 -0
  45. data/lib/generators/cmor/core/backend/service_controller/service_controller_generator.rb +38 -0
  46. data/lib/generators/cmor/core/backend/service_controller/templates/service_controller.rb +13 -0
  47. data/spec/dummy/config/initializers/administador.rb +2 -2
  48. data/spec/dummy/tmp/development_secret.txt +1 -1
  49. metadata +62 -4
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 798b26cd7ed07e066c18a3fb987445b2291b2db0ffbcdc1c6d2f903e7dc7ef52
4
- data.tar.gz: 70fd50fc00e032e4947597df714f8f70602dfa841f407c03ade89e409d541d15
3
+ metadata.gz: c10539cf8c5dc685a45801eed687861532ed408da9b506679200b01ffb493944
4
+ data.tar.gz: f6aa87a33e4e13ef28ed0e816ba24199cf89ae081c1f5cc6e9dafe50a85c117d
5
5
  SHA512:
6
- metadata.gz: '0800865fd9f04ed62ece6a1cbb83540a59223ae8892e347bbcd910754d627d910a60c209eeb6dd3dd97cb7214a4b2b5a1fcef83636392c1e6bc947571058d120'
7
- data.tar.gz: 7ee88554d75be02930f6885b6ac50ee63b7bb4f0d74facf178e74f18de227e2bcdbca37457c7c83bc24452f080f815f49e09e6d33f32a7d29e37bfee869b3e46
6
+ metadata.gz: 5aabf5a3b881005717098dbed4c035549c94655e8d2e053ecf9c5c519ec4d79964b6c8729cc82021235168ab5bf7dba8ccbfd1840f40511ff52a29fe0fda13cd
7
+ data.tar.gz: 962277e4f76c53dbaad2c77db37d17f09ce05371163331b3cb102cb78f7dbec1016759b93806d7c399269a39bfed156f61af3296fb55f1321e6f58099f1ca1ff
@@ -12,6 +12,8 @@ module Cmor
12
12
  s.files = Dir["{app,config,db,lib,spec}/**/*", "MIT-LICENSE", "Rakefile", "README.md"]
13
13
 
14
14
  s.add_dependency "rails", ">= 5.2.0"
15
+ # s.add_dependency "cmor", "= #{Cmor::VERSION}"
16
+ s.add_dependency "cmor_core", "= #{Cmor::VERSION}"
15
17
  s.add_dependency "cmor_core_backend", "= #{Cmor::VERSION}" unless s.files.include?("lib/cmor/core/backend.rb")
16
18
 
17
19
  s.add_development_dependency "sqlite3", '~> 1.3.6'
@@ -0,0 +1,88 @@
1
+ module Cmor
2
+ module Core
3
+ module Backend
4
+ module Generators
5
+ # Example:
6
+ #
7
+ # rails g cmor:core:backend:new --name=Cmor::Partners
8
+ #
9
+ class NewGenerator < Rails::Generators::Base
10
+ desc 'Installs the initializer, routes and itsf_backend integration'
11
+
12
+ source_root File.expand_path('../templates', __FILE__)
13
+
14
+ class_option :name, type: 'string', aliases: '-n' # Cmor::Faq
15
+ class_option :author, type: 'string', aliases: '-ga'
16
+ class_option :email, type: 'string', aliases: '-ge'
17
+
18
+ def generate_engine
19
+ empty_directory "engines/#{flat_path}"
20
+ templates_dir = "#{__dir__}/templates/"
21
+ Dir.glob("#{templates_dir}**/*").each do |f|
22
+ next unless File.file?(f)
23
+ f.gsub!(templates_dir, '')
24
+ target = build_target_filename(f)
25
+ template f, "engines/#{flat_path}/#{target}"
26
+ end
27
+ end
28
+
29
+ def set_permissions
30
+ chmod "engines/#{flat_path}/initialize_dummy.sh", 0755
31
+ end
32
+
33
+ private
34
+
35
+ def build_target_filename(f)
36
+ if flat_filename_exceptions.include?(f)
37
+ f.gsub("foo_bar", flat_path)
38
+ else
39
+ f.gsub('foo_bar', nested_path)
40
+ end
41
+ end
42
+
43
+ def name
44
+ @name ||= options[:name]
45
+ end
46
+
47
+ def nested_modules(options = nil)
48
+ content = options.delete(:content)
49
+ nm = ''
50
+ s = name.split('::')
51
+ nm << s.each_with_index.collect { |p,i| "#{ ' ' * (2 * i) }module #{p}\n" }.join
52
+ nm << content.indent(s.size * 2) if content.present?
53
+ (s.size - 1).downto(0) { |i| nm << "#{ ' ' * (2 * i) }end\n" }
54
+ return nm
55
+ end
56
+
57
+ def nested_path
58
+ @nested_path ||= name.underscore
59
+ end
60
+
61
+ def flat_path
62
+ @flat_path ||= name.underscore.gsub('/', '_')
63
+ end
64
+
65
+ def flat_filename_exceptions
66
+ %w(foo_bar.gemspec app/assets/javascripts/foo_bar.js app/assets/stylesheets/foo_bar.css lib/foo_bar.rb)
67
+ end
68
+
69
+ def gemspec
70
+ {
71
+ name: flat_path,
72
+ authors: "[\"#{options[:author] || `git config user.name`.chomp }\"]",
73
+ email: "[\"#{options[:email] || `git config user.email`.chomp }\"]"
74
+ }
75
+ end
76
+
77
+ def cmor_version
78
+ Cmor::VERSION
79
+ end
80
+
81
+ def mountpoint
82
+ "/backend/#{name.underscore.tr("/_", "-")}-engine"
83
+ end
84
+ end
85
+ end
86
+ end
87
+ end
88
+ end
@@ -0,0 +1,15 @@
1
+ source 'https://rubygems.org'
2
+ git_source(:github) { |repo| "https://github.com/#{repo}.git" }
3
+
4
+ # Declare your gem's dependencies in <%= name.underscore %>.gemspec.
5
+ # Bundler will treat runtime dependencies like base dependencies, and
6
+ # development dependencies will be added by default to the :development group.
7
+ gemspec
8
+
9
+ # Declare any dependencies that are still in development here instead of in
10
+ # your gemspec. These might include edge Rails or gems from your path or
11
+ # Git. Remember to move these dependencies to your gemspec before releasing
12
+ # your gem to rubygems.org.
13
+
14
+ # To use a debugger
15
+ # gem 'byebug', group: [:development, :test]
@@ -0,0 +1,82 @@
1
+ # A sample Guardfile
2
+ # More info at https://github.com/guard/guard#readme
3
+
4
+ ## Uncomment and set this to only include directories you want to watch
5
+ # directories %w(app lib config test spec features) \
6
+ # .select{|d| Dir.exist?(d) ? d : UI.warning("Directory #{d} does not exist")}
7
+
8
+ ## Note: if you are using the `directories` clause above and you are not
9
+ ## watching the project directory ('.'), then you will want to move
10
+ ## the Guardfile to a watched dir and symlink it back, e.g.
11
+ #
12
+ # $ mkdir config
13
+ # $ mv Guardfile config/
14
+ # $ ln -s config/Guardfile .
15
+ #
16
+ # and, you'll have to watch "config/Guardfile" instead of "Guardfile"
17
+
18
+ guard :bundler do
19
+ require 'guard/bundler'
20
+ require 'guard/bundler/verify'
21
+ helper = Guard::Bundler::Verify.new
22
+
23
+ files = ['Gemfile']
24
+ files += Dir['*.gemspec'] if files.any? { |f| helper.uses_gemspec?(f) }
25
+
26
+ # Assume files are symlinked from somewhere
27
+ files.each { |file| watch(helper.real_path(file)) }
28
+ end
29
+
30
+ # Note: The cmd option is now required due to the increasing number of ways
31
+ # rspec may be run, below are examples of the most common uses.
32
+ # * bundler: 'bundle exec rspec'
33
+ # * bundler binstubs: 'bin/rspec'
34
+ # * spring: 'bin/rspec' (This will use spring if running and you have
35
+ # installed the spring binstubs per the docs)
36
+ # * zeus: 'zeus rspec' (requires the server to be started separately)
37
+ # * 'just' rspec: 'rspec'
38
+
39
+ guard :rspec, cmd: "bundle exec rspec" do
40
+ require "guard/rspec/dsl"
41
+ dsl = Guard::RSpec::Dsl.new(self)
42
+
43
+ # Feel free to open issues for suggestions and improvements
44
+
45
+ # RSpec files
46
+ rspec = dsl.rspec
47
+ watch(rspec.spec_helper) { rspec.spec_dir }
48
+ watch(rspec.spec_support) { rspec.spec_dir }
49
+ watch(rspec.spec_files)
50
+
51
+ # Ruby files
52
+ ruby = dsl.ruby
53
+ dsl.watch_spec_files_for(ruby.lib_files)
54
+
55
+ # Rails files
56
+ rails = dsl.rails(view_extensions: %w(erb haml slim))
57
+ dsl.watch_spec_files_for(rails.app_files)
58
+ dsl.watch_spec_files_for(rails.views)
59
+
60
+ watch(rails.controllers) do |m|
61
+ [
62
+ rspec.spec.call("routing/#{m[1]}_routing"),
63
+ rspec.spec.call("controllers/#{m[1]}_controller"),
64
+ rspec.spec.call("acceptance/#{m[1]}")
65
+ ]
66
+ end
67
+
68
+ # Rails config changes
69
+ watch(rails.spec_helper) { rspec.spec_dir }
70
+ watch(rails.routes) { "#{rspec.spec_dir}/routing" }
71
+ watch(rails.app_controller) { "#{rspec.spec_dir}/controllers" }
72
+
73
+ # Capybara features specs
74
+ watch(rails.view_dirs) { |m| rspec.spec.call("features/#{m[1]}") }
75
+ watch(rails.layouts) { |m| rspec.spec.call("features/#{m[1]}") }
76
+
77
+ # Turnip features and steps
78
+ watch(%r{^spec/acceptance/(.+)\.feature$})
79
+ watch(%r{^spec/acceptance/steps/(.+)_steps\.rb$}) do |m|
80
+ Dir[File.join("**/#{m[1]}.feature")][0] || "spec/acceptance"
81
+ end
82
+ end
@@ -0,0 +1,20 @@
1
+ Copyright 2019 Roberto Vasquez Angel
2
+
3
+ Permission is hereby granted, free of charge, to any person obtaining
4
+ a copy of this software and associated documentation files (the
5
+ "Software"), to deal in the Software without restriction, including
6
+ without limitation the rights to use, copy, modify, merge, publish,
7
+ distribute, sublicense, and/or sell copies of the Software, and to
8
+ permit persons to whom the Software is furnished to do so, subject to
9
+ the following conditions:
10
+
11
+ The above copyright notice and this permission notice shall be
12
+ included in all copies or substantial portions of the Software.
13
+
14
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
15
+ EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
16
+ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
17
+ NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
18
+ LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
19
+ OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
20
+ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
@@ -0,0 +1,28 @@
1
+ # <%= name %>
2
+ Short description and motivation.
3
+
4
+ ## Usage
5
+ How to use my plugin.
6
+
7
+ ## Installation
8
+ Add this line to your application's Gemfile:
9
+
10
+ ```ruby
11
+ gem '<%= name.underscore %>'
12
+ ```
13
+
14
+ And then execute:
15
+ ```bash
16
+ $ bundle
17
+ ```
18
+
19
+ Or install it yourself as:
20
+ ```bash
21
+ $ gem install <%= name.underscore %>
22
+ ```
23
+
24
+ ## Contributing
25
+ Contribution directions go here.
26
+
27
+ ## License
28
+ The gem is available as open source under the terms of the [MIT License](https://opensource.org/licenses/MIT).
@@ -0,0 +1,19 @@
1
+ begin
2
+ require 'bundler/setup'
3
+ rescue LoadError
4
+ puts 'You must `gem install bundler` and `bundle install` to run rake tasks'
5
+ end
6
+
7
+ require 'rdoc/task'
8
+
9
+ RDoc::Task.new(:rdoc) do |rdoc|
10
+ rdoc.rdoc_dir = 'rdoc'
11
+ rdoc.title = '<%= name %>'
12
+ rdoc.options << '--line-numbers'
13
+ rdoc.rdoc_files.include('README.md')
14
+ rdoc.rdoc_files.include('lib/**/*.rb')
15
+ end
16
+
17
+ Bundler::GemHelper.install_tasks
18
+
19
+ require 'rails/dummy/tasks'
@@ -0,0 +1 @@
1
+ //= link_directory ../stylesheets/<%= name.underscore %> .css
@@ -0,0 +1,2 @@
1
+ //= require ./<%= nested_path %>/application
2
+
@@ -0,0 +1,3 @@
1
+ /*
2
+ *= require ./<%= nested_path %>/application
3
+ */
@@ -0,0 +1,5 @@
1
+ module <%= name %>
2
+ class ApplicationController < ActionController::Base
3
+ protect_from_forgery with: :exception
4
+ end
5
+ end
@@ -0,0 +1,4 @@
1
+ module <%= name %>
2
+ class HomeController < Cmor::Core::Backend::HomeController::Base
3
+ end
4
+ end
@@ -0,0 +1,4 @@
1
+ module <%= name %>
2
+ class ApplicationViewHelper < Rao::ViewHelper::Base
3
+ end
4
+ end
@@ -0,0 +1,25 @@
1
+ #!/usr/bin/env ruby
2
+ # This command will automatically be run when you run "rails" with Rails gems
3
+ # installed from the root of your application.
4
+
5
+ ENGINE_ROOT = File.expand_path('..', __dir__)
6
+ ENGINE_PATH = File.expand_path('../lib/<%= name.underscore %>/engine', __dir__)
7
+ APP_PATH = File.expand_path('../spec/dummy/config/application', __dir__)
8
+
9
+ # Set up gems listed in the Gemfile.
10
+ ENV['BUNDLE_GEMFILE'] ||= File.expand_path('../Gemfile', __dir__)
11
+ require 'bundler/setup' if File.exist?(ENV['BUNDLE_GEMFILE'])
12
+
13
+ require "rails"
14
+ # Pick the frameworks you want:
15
+ require "active_model/railtie"
16
+ require "active_job/railtie"
17
+ require "active_record/railtie"
18
+ require "active_storage/engine"
19
+ require "action_controller/railtie"
20
+ require "action_mailer/railtie"
21
+ require "action_view/railtie"
22
+ require "action_cable/engine"
23
+ require "sprockets/railtie"
24
+ # require "rails/test_unit/railtie"
25
+ require 'rails/engine/commands'
@@ -0,0 +1,2 @@
1
+ Rails.application.config.assets.precompile += %w( <%= flat_path %>.css )
2
+ Rails.application.config.assets.precompile += %w( <%= flat_path %>.js )
@@ -0,0 +1,3 @@
1
+ Cmor.configure do |config|
2
+ config.administrador.register_engine('<%= name %>::Engine', {})
3
+ end
@@ -0,0 +1,3 @@
1
+ <%= name %>::Engine.routes.draw do
2
+ root to: 'home#index'
3
+ end
@@ -0,0 +1,50 @@
1
+ $:.push File.expand_path("lib", __dir__)
2
+
3
+ # Maintain your gem's version:
4
+ require "<%= name.underscore %>/version"
5
+
6
+ # Describe your gem and declare its dependencies:
7
+ Gem::Specification.new do |spec|
8
+ spec.name = "<%= gemspec[:name] %>"
9
+ spec.version = <%= name %>::VERSION
10
+ spec.authors = <%= gemspec[:authors] %>
11
+ spec.email = <%= gemspec[:email] %>
12
+ spec.homepage = "https://content-management-on-rails/cmor"
13
+ spec.summary = "<%= name %> Module."
14
+ spec.license = "MIT"
15
+
16
+ # Prevent pushing this gem to RubyGems.org. To allow pushes either set the 'allowed_push_host'
17
+ # to allow pushing to a single host or delete this section to allow pushing to any host.
18
+ if spec.respond_to?(:metadata)
19
+ spec.metadata["allowed_push_host"] = 'https://rubygems.com'
20
+ else
21
+ raise "RubyGems 2.0 or newer is required to protect against " \
22
+ "public gem pushes."
23
+ end
24
+
25
+ spec.files = Dir["{app,config,db,lib}/**/*", "MIT-LICENSE", "Rakefile", "README.md"]
26
+
27
+ # Defaults
28
+ spec.add_dependency "rails", ">= 5.2.0"
29
+ spec.add_dependency "cmor", "= <%= cmor_version %>"
30
+ spec.add_dependency "cmor_core_backend", "= <%= cmor_version %>"
31
+
32
+ spec.add_development_dependency "sqlite3", '~> 1.3.6'
33
+
34
+ spec.add_development_dependency 'capybara'
35
+ spec.add_development_dependency 'coveralls'
36
+ spec.add_development_dependency 'git_log_generator'
37
+ spec.add_development_dependency 'guard-bundler'
38
+ spec.add_development_dependency 'guard-rails'
39
+ spec.add_development_dependency 'guard-rspec'
40
+ spec.add_development_dependency 'pry-rails'
41
+ spec.add_development_dependency 'rails-dummy'
42
+ spec.add_development_dependency 'rails-i18n'
43
+ spec.add_development_dependency 'rao-shoulda_matchers'
44
+ spec.add_development_dependency 'rspec-rails'
45
+ spec.add_development_dependency 'factory_bot_rails' # This has to be after rspec-rails
46
+ spec.add_development_dependency 'rubocop'
47
+ spec.add_development_dependency 'shoulda-matchers'
48
+ spec.add_development_dependency 'simplecov'
49
+ spec.add_development_dependency 'simplecov-console'
50
+ end
@@ -0,0 +1,31 @@
1
+ #!/bin/bash
2
+ GEM_NAME=${PWD##*/}
3
+ INSTALL_NAME=${GEM_NAME//cmor_/cmor\:}
4
+
5
+ # Delete old dummy app
6
+ rm -rf spec/dummy
7
+
8
+ # Generate new dummy app
9
+ DISABLE_MIGRATE=true rake dummy:app
10
+ rm spec/dummy/.ruby-version
11
+
12
+ # Satisfy prerequisites
13
+ cd spec/dummy
14
+
15
+ # Add ActiveStorage
16
+ rails active_storage:install
17
+
18
+ # I18n configuration
19
+ touch config/initializers/i18n.rb
20
+ echo "Rails.application.config.i18n.available_locales = [:en, :de]" >> config/initializers/i18n.rb
21
+ echo "Rails.application.config.i18n.default_locale = :de" >> config/initializers/i18n.rb
22
+
23
+ # I18n routing
24
+ touch config/initializers/route_translator.rb
25
+ echo "RouteTranslator.config do |config|" >> config/initializers/route_translator.rb
26
+ echo " config.force_locale = true" >> config/initializers/route_translator.rb
27
+ echo "end" >> config/initializers/route_translator.rb
28
+
29
+ # Install
30
+ rails generate $INSTALL_NAME:install
31
+ rails $GEM_NAME:install:migrations db:migrate db:test:prepare
@@ -0,0 +1,23 @@
1
+ module <%= name %>
2
+ module Configuration
3
+ def configure
4
+ yield self
5
+ end
6
+
7
+ mattr_accessor :resources_controllers do
8
+ -> {[]}
9
+ end
10
+
11
+ mattr_accessor :resource_controllers do
12
+ -> {[]}
13
+ end
14
+
15
+ mattr_accessor :service_controllers do
16
+ -> {[]}
17
+ end
18
+
19
+ mattr_accessor :sidebar_controllers do
20
+ -> {[]}
21
+ end
22
+ end
23
+ end
@@ -0,0 +1,5 @@
1
+ module <%= name %>
2
+ class Engine < ::Rails::Engine
3
+ isolate_namespace <%= name %>
4
+ end
5
+ end
@@ -0,0 +1 @@
1
+ <%= nested_modules(content: "VERSION = '0.0.1'.freeze\n") %>
@@ -0,0 +1,6 @@
1
+ require "cmor_core_backend"
2
+
3
+ require "<%= name.underscore %>/configuration"
4
+ require "<%= name.underscore %>/engine"
5
+
6
+ <%= nested_modules(content: "extend Configuration\n") %>
@@ -0,0 +1,25 @@
1
+ module <%= name %>
2
+ module Generators
3
+ class InstallGenerator < Rails::Generators::Base
4
+ desc 'Generates the initializer'
5
+
6
+ source_root File.expand_path('../templates', __FILE__)
7
+
8
+ attr_reader :base_controller_class_name
9
+
10
+ def initialize(*args)
11
+ super
12
+ @base_controller_class_name = ENV.fetch('BASE_CONTROLLER_CLASS_NAME') { '::ApplicationController' }
13
+ end
14
+
15
+ def generate_initializer
16
+ template 'initializer.rb', 'config/initializers/<%= flat_path %>.rb'
17
+ end
18
+
19
+ def generate_routes
20
+ route File.read(File.join(File.expand_path('../templates', __FILE__), 'routes.source'))
21
+ end
22
+ end
23
+ end
24
+ end
25
+
@@ -0,0 +1,25 @@
1
+ <%= name %>.configure do |config|
2
+ # Set the resources, that will be shown in the backend menu.
3
+ #
4
+ # Default: config.resources_controllers = -> {[]}
5
+ #
6
+ config.resources_controllers = -> {[]}
7
+
8
+ # Set the resources, that will be shown in the backend menu.
9
+ #
10
+ # Default: config.resource_controllers = -> {[]}
11
+ #
12
+ config.resource_controllers = -> {[]}
13
+
14
+ # Set the services, that will be shown in the backend menu.
15
+ #
16
+ # Default: config.service_controllers = -> {[]}
17
+ #
18
+ config.service_controllers = -> {[]}
19
+
20
+ # Set the sidebars, that will be shown in the backend menu.
21
+ #
22
+ # Default: config.sidebar_controllers = -> {[]}
23
+ #
24
+ config.sidebar_controllers = -> {[]}
25
+ end
@@ -0,0 +1,4 @@
1
+
2
+ localized do
3
+ mount <%= name %>::Engine, at: '<%= mountpoint %>'
4
+ end
@@ -0,0 +1,4 @@
1
+ # desc "Explaining what the task does"
2
+ # task :<%= name.underscore %> do
3
+ # # Task goes here
4
+ # end
@@ -0,0 +1,5 @@
1
+ require 'rails_helper'
2
+
3
+ RSpec.describe <%= name %> do
4
+ it { expect(described_class).to be_const_defined('VERSION') }
5
+ end
@@ -0,0 +1,62 @@
1
+ # This file is copied to spec/ when you run 'rails generate rspec:install'
2
+ require 'spec_helper'
3
+ ENV['RAILS_ENV'] ||= 'test'
4
+ require File.expand_path('../dummy/config/environment', __FILE__)
5
+ # Prevent database truncation if the environment is production
6
+ abort("The Rails environment is running in production mode!") if Rails.env.production?
7
+ require 'rspec/rails'
8
+ # Add additional requires below this line. Rails is not loaded until this point!
9
+
10
+ # Requires supporting ruby files with custom matchers and macros, etc, in
11
+ # spec/support/ and its subdirectories. Files matching `spec/**/*_spec.rb` are
12
+ # run as spec files by default. This means that files in spec/support that end
13
+ # in _spec.rb will both be required and run as specs, causing the specs to be
14
+ # run twice. It is recommended that you do not name files matching this glob to
15
+ # end with _spec.rb. You can configure this pattern with the --pattern
16
+ # option on the command line or in ~/.rspec, .rspec or `.rspec-local`.
17
+ #
18
+ # The following line is provided for convenience purposes. It has the downside
19
+ # of increasing the boot-up time by auto-requiring all files in the support
20
+ # directory. Alternatively, in the individual `*_spec.rb` files, manually
21
+ # require only the support files necessary.
22
+ #
23
+ # Dir[Rails.root.join('spec', 'support', '**', '*.rb')].each { |f| require f }
24
+ Dir[<%= name %>::Engine.root.join('spec', 'support', '**', '*.rb')].each { |f| require f }
25
+
26
+ # Checks for pending migrations and applies them before tests are run.
27
+ # If you are not using ActiveRecord, you can remove these lines.
28
+ # begin
29
+ # ActiveRecord::Migration.maintain_test_schema!
30
+ # rescue ActiveRecord::PendingMigrationError => e
31
+ # puts e.to_s.strip
32
+ # exit 1
33
+ # end
34
+ RSpec.configure do |config|
35
+ # Remove this line if you're not using ActiveRecord or ActiveRecord fixtures
36
+ config.fixture_path = "#{::Rails.root}/spec/fixtures"
37
+
38
+ # If you're not using ActiveRecord, or you'd prefer not to run each of your
39
+ # examples within a transaction, remove the following line or assign false
40
+ # instead of true.
41
+ config.use_transactional_fixtures = true
42
+
43
+ # RSpec Rails can automatically mix in different behaviours to your tests
44
+ # based on their file location, for example enabling you to call `get` and
45
+ # `post` in specs under `spec/controllers`.
46
+ #
47
+ # You can disable this behaviour by removing the line below, and instead
48
+ # explicitly tag your specs with their type, e.g.:
49
+ #
50
+ # RSpec.describe UsersController, :type => :controller do
51
+ # # ...
52
+ # end
53
+ #
54
+ # The different available types are documented in the features, such as in
55
+ # https://relishapp.com/rspec/rspec-rails/docs
56
+ config.infer_spec_type_from_file_location!
57
+
58
+ # Filter lines from Rails gems in backtraces.
59
+ config.filter_rails_from_backtrace!
60
+ # arbitrary gems may also be filtered via:
61
+ # config.filter_gems_from_backtrace("gem name")
62
+ end
@@ -0,0 +1,98 @@
1
+ require 'coveralls'
2
+ Coveralls.wear!
3
+ # This file was generated by the `rails generate rspec:install` command. Conventionally, all
4
+ # specs live under a `spec` directory, which RSpec adds to the `$LOAD_PATH`.
5
+ # The generated `.rspec` file contains `--require spec_helper` which will cause
6
+ # this file to always be loaded, without a need to explicitly require it in any
7
+ # files.
8
+ #
9
+ # Given that it is always loaded, you are encouraged to keep this file as
10
+ # light-weight as possible. Requiring heavyweight dependencies from this file
11
+ # will add to the boot time of your test suite on EVERY test run, even for an
12
+ # individual file that may not need all of that loaded. Instead, consider making
13
+ # a separate helper file that requires the additional dependencies and performs
14
+ # the additional setup, and require it from the spec files that actually need
15
+ # it.
16
+ #
17
+ # See http://rubydoc.info/gems/rspec-core/RSpec/Core/Configuration
18
+ RSpec.configure do |config|
19
+ # rspec-expectations config goes here. You can use an alternate
20
+ # assertion/expectation library such as wrong or the stdlib/minitest
21
+ # assertions if you prefer.
22
+ config.expect_with :rspec do |expectations|
23
+ # This option will default to `true` in RSpec 4. It makes the `description`
24
+ # and `failure_message` of custom matchers include text for helper methods
25
+ # defined using `chain`, e.g.:
26
+ # be_bigger_than(2).and_smaller_than(4).description
27
+ # # => "be bigger than 2 and smaller than 4"
28
+ # ...rather than:
29
+ # # => "be bigger than 2"
30
+ expectations.include_chain_clauses_in_custom_matcher_descriptions = true
31
+ end
32
+
33
+ # rspec-mocks config goes here. You can use an alternate test double
34
+ # library (such as bogus or mocha) by changing the `mock_with` option here.
35
+ config.mock_with :rspec do |mocks|
36
+ # Prevents you from mocking or stubbing a method that does not exist on
37
+ # a real object. This is generally recommended, and will default to
38
+ # `true` in RSpec 4.
39
+ mocks.verify_partial_doubles = true
40
+ end
41
+
42
+ # This option will default to `:apply_to_host_groups` in RSpec 4 (and will
43
+ # have no way to turn it off -- the option exists only for backwards
44
+ # compatibility in RSpec 3). It causes shared context metadata to be
45
+ # inherited by the metadata hash of host groups and examples, rather than
46
+ # triggering implicit auto-inclusion in groups with matching metadata.
47
+ config.shared_context_metadata_behavior = :apply_to_host_groups
48
+
49
+ # The settings below are suggested to provide a good initial experience
50
+ # with RSpec, but feel free to customize to your heart's content.
51
+ =begin
52
+ # This allows you to limit a spec run to individual examples or groups
53
+ # you care about by tagging them with `:focus` metadata. When nothing
54
+ # is tagged with `:focus`, all examples get run. RSpec also provides
55
+ # aliases for `it`, `describe`, and `context` that include `:focus`
56
+ # metadata: `fit`, `fdescribe` and `fcontext`, respectively.
57
+ config.filter_run_when_matching :focus
58
+
59
+ # Allows RSpec to persist some state between runs in order to support
60
+ # the `--only-failures` and `--next-failure` CLI options. We recommend
61
+ # you configure your source control system to ignore this file.
62
+ config.example_status_persistence_file_path = "spec/examples.txt"
63
+
64
+ # Limits the available syntax to the non-monkey patched syntax that is
65
+ # recommended. For more details, see:
66
+ # - http://rspec.info/blog/2012/06/rspecs-new-expectation-syntax/
67
+ # - http://www.teaisaweso.me/blog/2013/05/27/rspecs-new-message-expectation-syntax/
68
+ # - http://rspec.info/blog/2014/05/notable-changes-in-rspec-3/#zero-monkey-patching-mode
69
+ config.disable_monkey_patching!
70
+
71
+ # Many RSpec users commonly either run the entire suite or an individual
72
+ # file, and it's useful to allow more verbose output when running an
73
+ # individual spec file.
74
+ if config.files_to_run.one?
75
+ # Use the documentation formatter for detailed output,
76
+ # unless a formatter has already been configured
77
+ # (e.g. via a command-line flag).
78
+ config.default_formatter = "doc"
79
+ end
80
+
81
+ # Print the 10 slowest examples and example groups at the
82
+ # end of the spec run, to help surface which specs are running
83
+ # particularly slow.
84
+ config.profile_examples = 10
85
+
86
+ # Run specs in random order to surface order dependencies. If you find an
87
+ # order dependency and want to debug it, you can fix the order by providing
88
+ # the seed, which is printed after each run.
89
+ # --seed 1234
90
+ config.order = :random
91
+
92
+ # Seed global randomization in this process using the `--seed` CLI option.
93
+ # Setting this allows you to use `--seed` to deterministically reproduce
94
+ # test failures related to randomization by passing the same `--seed` value
95
+ # as the one that triggered the failure.
96
+ Kernel.srand config.seed
97
+ =end
98
+ end
@@ -0,0 +1,9 @@
1
+ require 'factory_bot_rails'
2
+
3
+ RSpec.configure do |config|
4
+ config.include FactoryBot::Syntax::Methods
5
+ end
6
+
7
+ FactoryBot.factories.clear
8
+ FactoryBot.definition_file_paths += [Rails.root.join(*%w(spec factories))]
9
+ FactoryBot.find_definitions
@@ -0,0 +1,5 @@
1
+ require 'rao/shoulda/matchers'
2
+
3
+ RSpec.configure do |config|
4
+ config.include Rao::Shoulda::Matchers, type: :feature
5
+ end
@@ -0,0 +1,38 @@
1
+ module Cmor
2
+ module Core
3
+ module Backend
4
+ module Generators
5
+ class ResourceControllerGenerator < Rails::Generators::Base
6
+ desc 'Generates a singular resource controller with CRUD actions.'
7
+
8
+ source_root File.expand_path('../templates', __FILE__)
9
+
10
+ class_option :controller_class, type: 'string', aliases: '-c'
11
+ class_option :resource_class, type: 'string', aliases: '-m'
12
+
13
+ def generate_controller
14
+ template 'resource_controller.rb', target_filename
15
+ end
16
+
17
+ private
18
+
19
+ def target_filename
20
+ "app/controllers/#{controller_class.underscore}.rb"
21
+ end
22
+
23
+ def controller_class
24
+ @controller_class ||= options[:controller_class]
25
+ end
26
+
27
+ def resource_class
28
+ controller_class.chomp('Controller').singularize
29
+ end
30
+
31
+ def params_name
32
+ resource_class.demodulize.underscore
33
+ end
34
+ end
35
+ end
36
+ end
37
+ end
38
+ end
@@ -0,0 +1,13 @@
1
+ module <%= controller_class.deconstantize %>
2
+ class <%= controller_class.demodulize %> < Cmor::Core::Backend::ResourceController::Base
3
+ def self.resource_class
4
+ <%= resource_class %>
5
+ end
6
+
7
+ private
8
+
9
+ def permitted_params
10
+ params.require(:<%= params_name %>).permit()
11
+ end
12
+ end
13
+ end
@@ -0,0 +1,54 @@
1
+ module Cmor
2
+ module Core
3
+ module Backend
4
+ module Generators
5
+ # Example:
6
+ #
7
+ # rails g cmor:core:backend:resources_controller -c Cmor::Services::ServicesController
8
+ #
9
+ class ResourcesControllerGenerator < Rails::Generators::Base
10
+ desc 'Generates a resources controller with CRUD actions.'
11
+
12
+ source_root File.expand_path('../templates', __FILE__)
13
+
14
+ class_option :controller_class, type: 'string', aliases: '-c'
15
+ class_option :resource_class, type: 'string', aliases: '-m'
16
+
17
+ def generate_controller
18
+ template 'resources_controller.rb', target_filename
19
+ end
20
+
21
+ def generate_routes
22
+ route "resources :#{resources_route_name}"
23
+ end
24
+
25
+ private
26
+
27
+ def resources_route_name
28
+ @resources_route_name ||= controller_class.gsub(current_engine.chomp('Engine'), '').chomp('Controller').underscore
29
+ end
30
+
31
+ def current_engine
32
+ @current_engine ||= File.open("config/routes.rb", &:readline).split('.').first
33
+ end
34
+
35
+ def target_filename
36
+ @target_filename ||= "app/controllers/#{controller_class.underscore}.rb"
37
+ end
38
+
39
+ def controller_class
40
+ @controller_class ||= options[:controller_class]
41
+ end
42
+
43
+ def resource_class
44
+ controller_class.chomp('Controller').singularize
45
+ end
46
+
47
+ def params_name
48
+ resource_class.demodulize.underscore
49
+ end
50
+ end
51
+ end
52
+ end
53
+ end
54
+ end
@@ -0,0 +1,13 @@
1
+ module <%= controller_class.deconstantize %>
2
+ class <%= controller_class.demodulize %> < Cmor::Core::Backend::ResourcesController::Base
3
+ def self.resource_class
4
+ <%= resource_class %>
5
+ end
6
+
7
+ private
8
+
9
+ def permitted_params
10
+ params.require(:<%= params_name %>).permit()
11
+ end
12
+ end
13
+ end
@@ -0,0 +1,38 @@
1
+ module Cmor
2
+ module Core
3
+ module Backend
4
+ module Generators
5
+ class ServiceControllerGenerator < Rails::Generators::Base
6
+ desc 'Generates a service controller.'
7
+
8
+ source_root File.expand_path('../templates', __FILE__)
9
+
10
+ class_option :controller_class, type: 'string', aliases: '-c'
11
+ class_option :service_class, type: 'string', aliases: '-s'
12
+
13
+ def generate_controller
14
+ template 'service_controller.rb', target_filename
15
+ end
16
+
17
+ private
18
+
19
+ def target_filename
20
+ "app/controllers/#{controller_class.underscore}.rb"
21
+ end
22
+
23
+ def controller_class
24
+ @controller_class ||= options[:controller_class]
25
+ end
26
+
27
+ def service_class
28
+ controller_class.gsub('Controller').singularize.append('Service')
29
+ end
30
+
31
+ def params_name
32
+ service_class.demodulize.underscore
33
+ end
34
+ end
35
+ end
36
+ end
37
+ end
38
+ end
@@ -0,0 +1,13 @@
1
+ module <%= controller_class.deconstantize %>
2
+ class <%= controller_class.demodulize %> < Cmor::Core::Backend::ServiceController::Base
3
+ def self.service_class
4
+ <%= service_class %>
5
+ end
6
+
7
+ private
8
+
9
+ def permitted_params
10
+ params.require(:<%= params_name %>).permit()
11
+ end
12
+ end
13
+ end
@@ -1,9 +1,9 @@
1
1
  Administrador.configure do |config|
2
2
  # Methods, that will be tried on a resource to generate a nice title
3
3
  #
4
- # Default: config.resource_label_methods = [:human, :name, :email, :to_s]
4
+ # Default: config.resource_label_methods = [:administrador_title, :human, :name, :identifier, :to_s]
5
5
  #
6
- config.resource_label_methods = [:human, :name, :email, :to_s]
6
+ config.resource_label_methods = [:administrador_title, :human, :name, :identifier, :to_s]
7
7
 
8
8
  # config.register_engine 'Ecm::Blog::Backend::Engine', {}
9
9
 
@@ -1 +1 @@
1
- 963f12ff656b4a35e0ea55b6eff9c3f30e5dbfc1cc049896c33dce287f3047009c7dd99040cbb76d054f2661b6dec0623df56c2a510ce523e401f97faa940bd8
1
+ e5aa070e148f80893e1ca2ab2bb36936caaceb3b8a7d8c452f4c2edb1277fd4c34c110565f23d51629147271c1ab90075c382197ee0e57768fcc243d73afb67d
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: cmor_core_backend
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.6.pre
4
+ version: 0.0.7.pre
5
5
  platform: ruby
6
6
  authors:
7
7
  - Roberto Vasquez Angel
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2019-04-01 00:00:00.000000000 Z
11
+ date: 2019-04-25 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails
@@ -24,6 +24,20 @@ dependencies:
24
24
  - - ">="
25
25
  - !ruby/object:Gem::Version
26
26
  version: 5.2.0
27
+ - !ruby/object:Gem::Dependency
28
+ name: cmor_core
29
+ requirement: !ruby/object:Gem::Requirement
30
+ requirements:
31
+ - - '='
32
+ - !ruby/object:Gem::Version
33
+ version: 0.0.7.pre
34
+ type: :runtime
35
+ prerelease: false
36
+ version_requirements: !ruby/object:Gem::Requirement
37
+ requirements:
38
+ - - '='
39
+ - !ruby/object:Gem::Version
40
+ version: 0.0.7.pre
27
41
  - !ruby/object:Gem::Dependency
28
42
  name: sqlite3
29
43
  requirement: !ruby/object:Gem::Requirement
@@ -282,14 +296,14 @@ dependencies:
282
296
  requirements:
283
297
  - - ">="
284
298
  - !ruby/object:Gem::Version
285
- version: 0.0.8.pre
299
+ version: 0.0.11.pre
286
300
  type: :runtime
287
301
  prerelease: false
288
302
  version_requirements: !ruby/object:Gem::Requirement
289
303
  requirements:
290
304
  - - ">="
291
305
  - !ruby/object:Gem::Version
292
- version: 0.0.8.pre
306
+ version: 0.0.11.pre
293
307
  description:
294
308
  email:
295
309
  - roberto@vasquez-angel.de
@@ -325,6 +339,50 @@ files:
325
339
  - lib/generators/cmor/core/backend/install/install_generator.rb
326
340
  - lib/generators/cmor/core/backend/install/templates/backend_controller.rb
327
341
  - lib/generators/cmor/core/backend/install/templates/initializer.rb
342
+ - lib/generators/cmor/core/backend/new/new_generator.rb
343
+ - lib/generators/cmor/core/backend/new/templates/Gemfile
344
+ - lib/generators/cmor/core/backend/new/templates/Guardfile
345
+ - lib/generators/cmor/core/backend/new/templates/MIT-LICENSE
346
+ - lib/generators/cmor/core/backend/new/templates/README.md
347
+ - lib/generators/cmor/core/backend/new/templates/Rakefile
348
+ - lib/generators/cmor/core/backend/new/templates/app/assets/config/foo_bar_manifest.js
349
+ - lib/generators/cmor/core/backend/new/templates/app/assets/javascripts/foo_bar.js
350
+ - lib/generators/cmor/core/backend/new/templates/app/assets/javascripts/foo_bar/application.js
351
+ - lib/generators/cmor/core/backend/new/templates/app/assets/javascripts/foo_bar/application/keep.js
352
+ - lib/generators/cmor/core/backend/new/templates/app/assets/stylesheets/foo_bar.css
353
+ - lib/generators/cmor/core/backend/new/templates/app/assets/stylesheets/foo_bar/application.css
354
+ - lib/generators/cmor/core/backend/new/templates/app/assets/stylesheets/foo_bar/application/keep.css
355
+ - lib/generators/cmor/core/backend/new/templates/app/controllers/foo_bar/application_controller.rb
356
+ - lib/generators/cmor/core/backend/new/templates/app/controllers/foo_bar/home_controller.rb
357
+ - lib/generators/cmor/core/backend/new/templates/app/view_helpers/foo_bar/application_view_helper.rb
358
+ - lib/generators/cmor/core/backend/new/templates/bin/rails
359
+ - lib/generators/cmor/core/backend/new/templates/config/initializers/assets.rb
360
+ - lib/generators/cmor/core/backend/new/templates/config/initializers/cmor.rb
361
+ - lib/generators/cmor/core/backend/new/templates/config/locales/de.yml
362
+ - lib/generators/cmor/core/backend/new/templates/config/locales/en.yml
363
+ - lib/generators/cmor/core/backend/new/templates/config/routes.rb
364
+ - lib/generators/cmor/core/backend/new/templates/foo_bar.gemspec
365
+ - lib/generators/cmor/core/backend/new/templates/initialize_dummy.sh
366
+ - lib/generators/cmor/core/backend/new/templates/lib/foo_bar.rb
367
+ - lib/generators/cmor/core/backend/new/templates/lib/foo_bar/configuration.rb
368
+ - lib/generators/cmor/core/backend/new/templates/lib/foo_bar/engine.rb
369
+ - lib/generators/cmor/core/backend/new/templates/lib/foo_bar/version.rb
370
+ - lib/generators/cmor/core/backend/new/templates/lib/generators/foo_bar/install/install_generator.rb
371
+ - lib/generators/cmor/core/backend/new/templates/lib/generators/foo_bar/install/templates/initializer.rb
372
+ - lib/generators/cmor/core/backend/new/templates/lib/generators/foo_bar/install/templates/routes.source
373
+ - lib/generators/cmor/core/backend/new/templates/lib/tasks/foo_bar_tasks.rake
374
+ - lib/generators/cmor/core/backend/new/templates/spec/lib/foo_bar/version_spec.rb
375
+ - lib/generators/cmor/core/backend/new/templates/spec/rails_helper.rb
376
+ - lib/generators/cmor/core/backend/new/templates/spec/spec_helper.rb
377
+ - lib/generators/cmor/core/backend/new/templates/spec/support/capybara.rb
378
+ - lib/generators/cmor/core/backend/new/templates/spec/support/factory_bot.rb
379
+ - lib/generators/cmor/core/backend/new/templates/spec/support/rao-shoulda_matchers.rb
380
+ - lib/generators/cmor/core/backend/resource_controller/resource_controller_generator.rb
381
+ - lib/generators/cmor/core/backend/resource_controller/templates/resource_controller.rb
382
+ - lib/generators/cmor/core/backend/resources_controller/resources_controller_generator.rb
383
+ - lib/generators/cmor/core/backend/resources_controller/templates/resources_controller.rb
384
+ - lib/generators/cmor/core/backend/service_controller/service_controller_generator.rb
385
+ - lib/generators/cmor/core/backend/service_controller/templates/service_controller.rb
328
386
  - spec/dummy/Rakefile
329
387
  - spec/dummy/app/assets/config/manifest.js
330
388
  - spec/dummy/app/assets/javascripts/application.js