model_base_generators 0.3.3 → 0.3.4

Sign up to get free protection for your applications and to get access to all the features.
Files changed (98) hide show
  1. checksums.yaml +4 -4
  2. data/example/.rubocop.yml +1 -0
  3. data/example/Rakefile +1 -0
  4. data/example/app/channels/application_cable/channel.rb +1 -0
  5. data/example/app/channels/application_cable/connection.rb +1 -0
  6. data/example/app/controllers/application_controller.rb +1 -0
  7. data/example/app/controllers/concerns/authentication.rb +1 -0
  8. data/example/app/controllers/issue_comments_controller.rb +1 -0
  9. data/example/app/controllers/issues_controller.rb +1 -0
  10. data/example/app/controllers/phases_controller.rb +1 -0
  11. data/example/app/controllers/project_assignments_controller.rb +1 -0
  12. data/example/app/controllers/projects_controller.rb +1 -0
  13. data/example/app/helpers/application_helper.rb +1 -0
  14. data/example/app/helpers/issue_comments_helper.rb +1 -0
  15. data/example/app/helpers/issues_helper.rb +1 -0
  16. data/example/app/helpers/phases_helper.rb +1 -0
  17. data/example/app/helpers/projects_helper.rb +1 -0
  18. data/example/app/jobs/application_job.rb +1 -0
  19. data/example/app/mailers/application_mailer.rb +1 -0
  20. data/example/app/models/ability.rb +1 -0
  21. data/example/app/models/application_record.rb +1 -0
  22. data/example/app/models/issue.rb +1 -0
  23. data/example/app/models/issue_comment.rb +1 -0
  24. data/example/app/models/phase.rb +1 -0
  25. data/example/app/models/project.rb +1 -0
  26. data/example/app/models/project_assignment.rb +1 -0
  27. data/example/app/models/user.rb +1 -0
  28. data/example/app/validations/ar_internal_metadatum_validation.rb +1 -0
  29. data/example/app/validations/issue_validation.rb +1 -0
  30. data/example/app/validations/phase_validation.rb +1 -0
  31. data/example/app/validations/project_assignment_validation.rb +1 -0
  32. data/example/app/validations/project_validation.rb +1 -0
  33. data/example/app/validations/user_validation.rb +1 -0
  34. data/example/bin/bundle +1 -0
  35. data/example/bin/rails +1 -0
  36. data/example/bin/rake +1 -0
  37. data/example/bin/setup +1 -0
  38. data/example/bin/update +1 -0
  39. data/example/config.ru +1 -0
  40. data/example/spec/controllers/issue_comments_controller_spec.rb +1 -0
  41. data/example/spec/controllers/issues_controller_spec.rb +1 -0
  42. data/example/spec/controllers/phases_controller_spec.rb +1 -0
  43. data/example/spec/controllers/project_assignments_controller_spec.rb +1 -0
  44. data/example/spec/controllers/projects_controller_spec.rb +1 -0
  45. data/example/spec/factories/issue_comments.rb +1 -0
  46. data/example/spec/factories/issues.rb +1 -0
  47. data/example/spec/factories/phases.rb +1 -0
  48. data/example/spec/factories/project_assignments.rb +1 -0
  49. data/example/spec/factories/projects.rb +1 -0
  50. data/example/spec/factories/users.rb +1 -0
  51. data/example/spec/helpers/issue_comments_helper_spec.rb +1 -0
  52. data/example/spec/rails_helper.rb +1 -0
  53. data/example/spec/requests/issue_comments_spec.rb +1 -0
  54. data/example/spec/routing/issue_comments_routing_spec.rb +1 -0
  55. data/example/spec/routing/issues_routing_spec.rb +1 -0
  56. data/example/spec/routing/phases_routing_spec.rb +1 -0
  57. data/example/spec/routing/project_assignments_routing_spec.rb +1 -0
  58. data/example/spec/routing/projects_routing_spec.rb +1 -0
  59. data/example/spec/spec_helper.rb +1 -0
  60. data/example/spec/support/controller_macros.rb +1 -0
  61. data/example/spec/support/devise.rb +1 -0
  62. data/example/spec/support/field_assertions.rb +1 -0
  63. data/example/spec/support/time_match_support.rb +1 -0
  64. data/example/spec/views/issue_comments/edit.html.erb_spec.rb +1 -0
  65. data/example/spec/views/issue_comments/index.html.erb_spec.rb +1 -0
  66. data/example/spec/views/issue_comments/new.html.erb_spec.rb +1 -0
  67. data/example/spec/views/issue_comments/show.html.erb_spec.rb +1 -0
  68. data/example/spec/views/issues/edit.html.erb_spec.rb +1 -0
  69. data/example/spec/views/issues/index.html.erb_spec.rb +1 -0
  70. data/example/spec/views/issues/new.html.erb_spec.rb +1 -0
  71. data/example/spec/views/issues/show.html.erb_spec.rb +1 -0
  72. data/example/spec/views/phases/edit.html.erb_spec.rb +1 -0
  73. data/example/spec/views/phases/index.html.erb_spec.rb +1 -0
  74. data/example/spec/views/phases/new.html.erb_spec.rb +1 -0
  75. data/example/spec/views/phases/show.html.erb_spec.rb +1 -0
  76. data/example/spec/views/project_assignments/edit.html.erb_spec.rb +1 -0
  77. data/example/spec/views/project_assignments/index.html.erb_spec.rb +1 -0
  78. data/example/spec/views/project_assignments/new.html.erb_spec.rb +1 -0
  79. data/example/spec/views/project_assignments/show.html.erb_spec.rb +1 -0
  80. data/example/spec/views/projects/edit.html.erb_spec.rb +1 -0
  81. data/example/spec/views/projects/index.html.erb_spec.rb +1 -0
  82. data/example/spec/views/projects/new.html.erb_spec.rb +1 -0
  83. data/example/spec/views/projects/show.html.erb_spec.rb +1 -0
  84. data/lib/model_base/config.rb +4 -0
  85. data/lib/model_base/version.rb +1 -1
  86. data/lib/templates/api_controller.rb +3 -0
  87. data/lib/templates/controller.rb +3 -0
  88. data/lib/templates/factory_girl/factory.rb +3 -0
  89. data/lib/templates/rspec/helper/helper_spec.rb +3 -0
  90. data/lib/templates/rspec/integration/request_spec.rb +3 -0
  91. data/lib/templates/rspec/model/model_spec.rb +3 -0
  92. data/lib/templates/rspec/scaffold/controller_spec.rb +3 -0
  93. data/lib/templates/rspec/scaffold/edit_spec.rb +3 -0
  94. data/lib/templates/rspec/scaffold/index_spec.rb +3 -0
  95. data/lib/templates/rspec/scaffold/new_spec.rb +3 -0
  96. data/lib/templates/rspec/scaffold/routing_spec.rb +3 -0
  97. data/lib/templates/rspec/scaffold/show_spec.rb +3 -0
  98. metadata +2 -2
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 49e0e50790434d7d12129f476e7608332f6060e0
4
- data.tar.gz: 765a08e5183688dcf746bc44f08d7595fa22db62
3
+ metadata.gz: 7cad258ccf6f0f24af56363688b12926dc4dc9bc
4
+ data.tar.gz: 31f6fa6e9f3b953769a8e65acace6f5b6af492eb
5
5
  SHA512:
6
- metadata.gz: 9dd2c2021adbb1e1e0bd4a53fc3d1288dc921bd332ac9ec055a7aa6ae27fd1a588249b80c0f658f77982afcfb2691702cc3fe3c41070da4cc02fefd4aa2e5ef5
7
- data.tar.gz: 7fe0b2352577b699f58ef09bc8e9ca35862f657d48bc18f92327f982651cea551d93af2025650674bcb5b19de7883e3626e65275a22fcec1280f4f82f5a43270
6
+ metadata.gz: 54a7840bc376155e844c9105a373ca43ba573899699bad72b092e66a34a70a3a6475f601b8ab4c59aa3215aa3381adb3264724af315e5d8de1bb76886a7c5b15
7
+ data.tar.gz: 71c2c0e2015e657ba6c9430796002fc9a89130b5cd07012c94d80af6953b5627bba47708292e09c8e9aebfa0392a700870d82ea8077355e2faef75f7d6bfe23a
data/example/.rubocop.yml CHANGED
@@ -10,6 +10,7 @@ AllCops:
10
10
  - 'db/**/*'
11
11
  - 'config/**/*'
12
12
  DisplayCopNames: true
13
+ TargetRubyVersion: 2.3
13
14
 
14
15
  Rails:
15
16
  Enabled: true
data/example/Rakefile CHANGED
@@ -1,3 +1,4 @@
1
+ # frozen_string_literal: true
1
2
  # Add your own tasks in files placed in lib/tasks ending in .rake,
2
3
  # for example lib/tasks/capistrano.rake, and they will automatically be available to Rake.
3
4
 
@@ -1,3 +1,4 @@
1
+ # frozen_string_literal: true
1
2
  module ApplicationCable
2
3
  class Channel < ActionCable::Channel::Base
3
4
  end
@@ -1,3 +1,4 @@
1
+ # frozen_string_literal: true
1
2
  module ApplicationCable
2
3
  class Connection < ActionCable::Connection::Base
3
4
  end
@@ -1,3 +1,4 @@
1
+ # frozen_string_literal: true
1
2
  class ApplicationController < ActionController::Base
2
3
  protect_from_forgery with: :exception
3
4
  end
@@ -1,3 +1,4 @@
1
+ # frozen_string_literal: true
1
2
  module Authentication
2
3
  def self.included(klass)
3
4
  klass.class_eval do
@@ -1,3 +1,4 @@
1
+ # frozen_string_literal: true
1
2
  class IssueCommentsController < ApplicationController
2
3
  include Authentication
3
4
  load_and_authorize_resource except: [:index]
@@ -1,3 +1,4 @@
1
+ # frozen_string_literal: true
1
2
  class IssuesController < ApplicationController
2
3
  include Authentication
3
4
  load_and_authorize_resource except: [:index]
@@ -1,3 +1,4 @@
1
+ # frozen_string_literal: true
1
2
  class PhasesController < ApplicationController
2
3
  include Authentication
3
4
  load_and_authorize_resource except: [:index]
@@ -1,3 +1,4 @@
1
+ # frozen_string_literal: true
1
2
  class ProjectAssignmentsController < ApplicationController
2
3
  include Authentication
3
4
  load_and_authorize_resource except: [:index]
@@ -1,3 +1,4 @@
1
+ # frozen_string_literal: true
1
2
  class ProjectsController < ApplicationController
2
3
  include Authentication
3
4
  load_and_authorize_resource except: [:index]
@@ -1,2 +1,3 @@
1
+ # frozen_string_literal: true
1
2
  module ApplicationHelper
2
3
  end
@@ -1,2 +1,3 @@
1
+ # frozen_string_literal: true
1
2
  module IssueCommentsHelper
2
3
  end
@@ -1,2 +1,3 @@
1
+ # frozen_string_literal: true
1
2
  module IssuesHelper
2
3
  end
@@ -1,2 +1,3 @@
1
+ # frozen_string_literal: true
1
2
  module PhasesHelper
2
3
  end
@@ -1,2 +1,3 @@
1
+ # frozen_string_literal: true
1
2
  module ProjectsHelper
2
3
  end
@@ -1,2 +1,3 @@
1
+ # frozen_string_literal: true
1
2
  class ApplicationJob < ActiveJob::Base
2
3
  end
@@ -1,3 +1,4 @@
1
+ # frozen_string_literal: true
1
2
  class ApplicationMailer < ActionMailer::Base
2
3
  default from: 'from@example.com'
3
4
  layout 'mailer'
@@ -1,3 +1,4 @@
1
+ # frozen_string_literal: true
1
2
  class Ability
2
3
  include CanCan::Ability
3
4
 
@@ -1,3 +1,4 @@
1
+ # frozen_string_literal: true
1
2
  class ApplicationRecord < ActiveRecord::Base
2
3
  self.abstract_class = true
3
4
  end
@@ -1,3 +1,4 @@
1
+ # frozen_string_literal: true
1
2
  class Issue < ApplicationRecord
2
3
  extend Enumerize
3
4
 
@@ -1,3 +1,4 @@
1
+ # frozen_string_literal: true
1
2
  class IssueComment < ApplicationRecord
2
3
  belongs_to :issue
3
4
  belongs_to :user
@@ -1,3 +1,4 @@
1
+ # frozen_string_literal: true
1
2
  class Phase < ApplicationRecord
2
3
  belongs_to :project
3
4
  end
@@ -1,3 +1,4 @@
1
+ # frozen_string_literal: true
1
2
  class Project < ApplicationRecord
2
3
  belongs_to :owner, class_name: 'User'
3
4
  has_many :issues
@@ -1,3 +1,4 @@
1
+ # frozen_string_literal: true
1
2
  class ProjectAssignment < ApplicationRecord
2
3
  belongs_to :project
3
4
  belongs_to :user
@@ -1,3 +1,4 @@
1
+ # frozen_string_literal: true
1
2
  class User < ApplicationRecord
2
3
  # Include default devise modules. Others available are:
3
4
  # :confirmable, :lockable, :timeoutable and :omniauthable
@@ -1,3 +1,4 @@
1
+ # frozen_string_literal: true
1
2
  module ArInternalMetadatumValidation
2
3
  extend ActiveSupport::Concern
3
4
 
@@ -1,3 +1,4 @@
1
+ # frozen_string_literal: true
1
2
  module IssueValidation
2
3
  extend ActiveSupport::Concern
3
4
 
@@ -1,3 +1,4 @@
1
+ # frozen_string_literal: true
1
2
  module PhaseValidation
2
3
  extend ActiveSupport::Concern
3
4
 
@@ -1,3 +1,4 @@
1
+ # frozen_string_literal: true
1
2
  module ProjectAssignmentValidation
2
3
  extend ActiveSupport::Concern
3
4
 
@@ -1,3 +1,4 @@
1
+ # frozen_string_literal: true
1
2
  module ProjectValidation
2
3
  extend ActiveSupport::Concern
3
4
 
@@ -1,3 +1,4 @@
1
+ # frozen_string_literal: true
1
2
  module UserValidation
2
3
  extend ActiveSupport::Concern
3
4
 
data/example/bin/bundle CHANGED
@@ -1,3 +1,4 @@
1
1
  #!/usr/bin/env ruby
2
+ # frozen_string_literal: true
2
3
  ENV['BUNDLE_GEMFILE'] ||= File.expand_path('../../Gemfile', __FILE__)
3
4
  load Gem.bin_path('bundler', 'bundle')
data/example/bin/rails CHANGED
@@ -1,4 +1,5 @@
1
1
  #!/usr/bin/env ruby
2
+ # frozen_string_literal: true
2
3
  APP_PATH = File.expand_path('../config/application', __dir__)
3
4
  require_relative '../config/boot'
4
5
  require 'rails/commands'
data/example/bin/rake CHANGED
@@ -1,4 +1,5 @@
1
1
  #!/usr/bin/env ruby
2
+ # frozen_string_literal: true
2
3
  require_relative '../config/boot'
3
4
  require 'rake'
4
5
  Rake.application.run
data/example/bin/setup CHANGED
@@ -1,4 +1,5 @@
1
1
  #!/usr/bin/env ruby
2
+ # frozen_string_literal: true
2
3
  require 'pathname'
3
4
  require 'fileutils'
4
5
  include FileUtils
data/example/bin/update CHANGED
@@ -1,4 +1,5 @@
1
1
  #!/usr/bin/env ruby
2
+ # frozen_string_literal: true
2
3
  require 'pathname'
3
4
  require 'fileutils'
4
5
  include FileUtils
data/example/config.ru CHANGED
@@ -1,3 +1,4 @@
1
+ # frozen_string_literal: true
1
2
  # This file is used by Rack-based servers to start the application.
2
3
 
3
4
  require_relative 'config/environment'
@@ -1,3 +1,4 @@
1
+ # frozen_string_literal: true
1
2
  require 'rails_helper'
2
3
 
3
4
  # This spec was generated by rspec-rails when you ran the scaffold generator.
@@ -1,3 +1,4 @@
1
+ # frozen_string_literal: true
1
2
  require 'rails_helper'
2
3
 
3
4
  # This spec was generated by rspec-rails when you ran the scaffold generator.
@@ -1,3 +1,4 @@
1
+ # frozen_string_literal: true
1
2
  require 'rails_helper'
2
3
 
3
4
  # This spec was generated by rspec-rails when you ran the scaffold generator.
@@ -1,3 +1,4 @@
1
+ # frozen_string_literal: true
1
2
  require 'rails_helper'
2
3
 
3
4
  # This spec was generated by rspec-rails when you ran the scaffold generator.
@@ -1,3 +1,4 @@
1
+ # frozen_string_literal: true
1
2
  require 'rails_helper'
2
3
 
3
4
  # This spec was generated by rspec-rails when you ran the scaffold generator.
@@ -1,3 +1,4 @@
1
+ # frozen_string_literal: true
1
2
  FactoryGirl.define do
2
3
  factory :issue_comment do
3
4
  association :issue, factory: :issue
@@ -1,3 +1,4 @@
1
+ # frozen_string_literal: true
1
2
  FactoryGirl.define do
2
3
  factory :issue do
3
4
  association :project, factory: :project
@@ -1,3 +1,4 @@
1
+ # frozen_string_literal: true
1
2
  FactoryGirl.define do
2
3
  factory :phase do
3
4
  association :project, factory: :project
@@ -1,3 +1,4 @@
1
+ # frozen_string_literal: true
1
2
  FactoryGirl.define do
2
3
  factory :project_assignment do
3
4
  association :project, factory: :project
@@ -1,3 +1,4 @@
1
+ # frozen_string_literal: true
1
2
  FactoryGirl.define do
2
3
  factory :project do
3
4
  association :owner, factory: :user
@@ -1,3 +1,4 @@
1
+ # frozen_string_literal: true
1
2
  FactoryGirl.define do
2
3
  factory :user do
3
4
  email 'user1@example.com'
@@ -1,3 +1,4 @@
1
+ # frozen_string_literal: true
1
2
  require 'rails_helper'
2
3
 
3
4
  # Specs in this file have access to a helper object that includes
@@ -1,3 +1,4 @@
1
+ # frozen_string_literal: true
1
2
  # This file is copied to spec/ when you run 'rails generate rspec:install'
2
3
  ENV['RAILS_ENV'] ||= 'test'
3
4
  require File.expand_path('../../config/environment', __FILE__)
@@ -1,3 +1,4 @@
1
+ # frozen_string_literal: true
1
2
  require 'rails_helper'
2
3
 
3
4
  RSpec.describe 'IssueComments', type: :request do
@@ -1,3 +1,4 @@
1
+ # frozen_string_literal: true
1
2
  require 'rails_helper'
2
3
 
3
4
  RSpec.describe IssueCommentsController, type: :routing do
@@ -1,3 +1,4 @@
1
+ # frozen_string_literal: true
1
2
  require 'rails_helper'
2
3
 
3
4
  RSpec.describe IssuesController, type: :routing do
@@ -1,3 +1,4 @@
1
+ # frozen_string_literal: true
1
2
  require 'rails_helper'
2
3
 
3
4
  RSpec.describe PhasesController, type: :routing do
@@ -1,3 +1,4 @@
1
+ # frozen_string_literal: true
1
2
  require 'rails_helper'
2
3
 
3
4
  RSpec.describe ProjectAssignmentsController, type: :routing do
@@ -1,3 +1,4 @@
1
+ # frozen_string_literal: true
1
2
  require 'rails_helper'
2
3
 
3
4
  RSpec.describe ProjectsController, type: :routing do
@@ -1,3 +1,4 @@
1
+ # frozen_string_literal: true
1
2
  # This file was generated by the `rails generate rspec:install` command. Conventionally, all
2
3
  # specs live under a `spec` directory, which RSpec adds to the `$LOAD_PATH`.
3
4
  # The generated `.rspec` file contains `--require spec_helper` which will cause
@@ -1,3 +1,4 @@
1
+ # frozen_string_literal: true
1
2
  module ControllerMacros
2
3
  def devise_login(key, user)
3
4
  @request.env['devise.mapping'] = Devise.mappings[key]
@@ -1,3 +1,4 @@
1
+ # frozen_string_literal: true
1
2
  # https://github.com/plataformatec/devise/wiki/How-To:-Test-controllers-with-Rails-3-and-4-(and-RSpec)
2
3
  RSpec.configure do |config|
3
4
  config.with_options(type: :controller) do |c|
@@ -1,3 +1,4 @@
1
+ # frozen_string_literal: true
1
2
  def assert_select_datetime_field(object, field, n = 5)
2
3
  (1..n).each do |i|
3
4
  assert_select "select##{object}_#{field}_#{i}i[name=?]", "#{object}[#{field}(#{i}i)]"
@@ -1,3 +1,4 @@
1
+ # frozen_string_literal: true
1
2
  module TimeMatchSupport
2
3
  def localized_time_re(time_str)
3
4
  Regexp.new(Regexp.escape(localize(Time.zone.parse(time_str))))
@@ -1,3 +1,4 @@
1
+ # frozen_string_literal: true
1
2
  require 'rails_helper'
2
3
 
3
4
  RSpec.describe 'issue_comments/edit', type: :view do
@@ -1,3 +1,4 @@
1
+ # frozen_string_literal: true
1
2
  require 'rails_helper'
2
3
 
3
4
  RSpec.describe 'issue_comments/index', type: :view do
@@ -1,3 +1,4 @@
1
+ # frozen_string_literal: true
1
2
  require 'rails_helper'
2
3
 
3
4
  RSpec.describe 'issue_comments/new', type: :view do
@@ -1,3 +1,4 @@
1
+ # frozen_string_literal: true
1
2
  require 'rails_helper'
2
3
 
3
4
  RSpec.describe 'issue_comments/show', type: :view do
@@ -1,3 +1,4 @@
1
+ # frozen_string_literal: true
1
2
  require 'rails_helper'
2
3
 
3
4
  RSpec.describe 'issues/edit', type: :view do
@@ -1,3 +1,4 @@
1
+ # frozen_string_literal: true
1
2
  require 'rails_helper'
2
3
 
3
4
  RSpec.describe 'issues/index', type: :view do
@@ -1,3 +1,4 @@
1
+ # frozen_string_literal: true
1
2
  require 'rails_helper'
2
3
 
3
4
  RSpec.describe 'issues/new', type: :view do
@@ -1,3 +1,4 @@
1
+ # frozen_string_literal: true
1
2
  require 'rails_helper'
2
3
 
3
4
  RSpec.describe 'issues/show', type: :view do
@@ -1,3 +1,4 @@
1
+ # frozen_string_literal: true
1
2
  require 'rails_helper'
2
3
 
3
4
  RSpec.describe 'phases/edit', type: :view do
@@ -1,3 +1,4 @@
1
+ # frozen_string_literal: true
1
2
  require 'rails_helper'
2
3
 
3
4
  RSpec.describe 'phases/index', type: :view do
@@ -1,3 +1,4 @@
1
+ # frozen_string_literal: true
1
2
  require 'rails_helper'
2
3
 
3
4
  RSpec.describe 'phases/new', type: :view do
@@ -1,3 +1,4 @@
1
+ # frozen_string_literal: true
1
2
  require 'rails_helper'
2
3
 
3
4
  RSpec.describe 'phases/show', type: :view do
@@ -1,3 +1,4 @@
1
+ # frozen_string_literal: true
1
2
  require 'rails_helper'
2
3
 
3
4
  RSpec.describe 'project_assignments/edit', type: :view do
@@ -1,3 +1,4 @@
1
+ # frozen_string_literal: true
1
2
  require 'rails_helper'
2
3
 
3
4
  RSpec.describe 'project_assignments/index', type: :view do
@@ -1,3 +1,4 @@
1
+ # frozen_string_literal: true
1
2
  require 'rails_helper'
2
3
 
3
4
  RSpec.describe 'project_assignments/new', type: :view do
@@ -1,3 +1,4 @@
1
+ # frozen_string_literal: true
1
2
  require 'rails_helper'
2
3
 
3
4
  RSpec.describe 'project_assignments/show', type: :view do
@@ -1,3 +1,4 @@
1
+ # frozen_string_literal: true
1
2
  require 'rails_helper'
2
3
 
3
4
  RSpec.describe 'projects/edit', type: :view do
@@ -1,3 +1,4 @@
1
+ # frozen_string_literal: true
1
2
  require 'rails_helper'
2
3
 
3
4
  RSpec.describe 'projects/index', type: :view do
@@ -1,3 +1,4 @@
1
+ # frozen_string_literal: true
1
2
  require 'rails_helper'
2
3
 
3
4
  RSpec.describe 'projects/new', type: :view do
@@ -1,3 +1,4 @@
1
+ # frozen_string_literal: true
1
2
  require 'rails_helper'
2
3
 
3
4
  RSpec.describe 'projects/show', type: :view do
@@ -38,5 +38,9 @@ module ModelBase
38
38
  '2020-01-01 00:00:00'
39
39
  end
40
40
 
41
+ config_accessor(:frozen_string_literal) do
42
+ true
43
+ end
44
+
41
45
  end
42
46
  end
@@ -1,3 +1,3 @@
1
1
  module ModelBase
2
- VERSION = "0.3.3"
2
+ VERSION = "0.3.4"
3
3
  end
@@ -1,3 +1,6 @@
1
+ <%- unless ModelBase.config.frozen_string_literal.nil? -%>
2
+ # frozen_string_literal: <%= ModelBase.config.frozen_string_literal.inspect %>
3
+ <%- end -%>
1
4
  <% if namespaced? -%>
2
5
  require_dependency "<%= namespaced_path %>/application_controller"
3
6
 
@@ -1,3 +1,6 @@
1
+ <%- unless ModelBase.config.frozen_string_literal.nil? -%>
2
+ # frozen_string_literal: <%= ModelBase.config.frozen_string_literal.inspect %>
3
+ <%- end -%>
1
4
  <% if namespaced? -%>
2
5
  require_dependency "<%= namespaced_path %>/application_controller"
3
6
 
@@ -1,3 +1,6 @@
1
+ <%- unless ModelBase.config.frozen_string_literal.nil? -%>
2
+ # frozen_string_literal: <%= ModelBase.config.frozen_string_literal.inspect %>
3
+ <%- end -%>
1
4
  FactoryGirl.define do
2
5
  factory :<%= model.full_resource_name %> do
3
6
  <%- model.columns_for(:factory).each do |col| -%>
@@ -1,3 +1,6 @@
1
+ <%- unless ModelBase.config.frozen_string_literal.nil? -%>
2
+ # frozen_string_literal: <%= ModelBase.config.frozen_string_literal.inspect %>
3
+ <%- end -%>
1
4
  require 'rails_helper'
2
5
 
3
6
  # Specs in this file have access to a helper object that includes
@@ -1,3 +1,6 @@
1
+ <%- unless ModelBase.config.frozen_string_literal.nil? -%>
2
+ # frozen_string_literal: <%= ModelBase.config.frozen_string_literal.inspect %>
3
+ <%- end -%>
1
4
  require 'rails_helper'
2
5
 
3
6
  RSpec.describe "<%= class_name.pluralize %>", <%= type_metatag(:request) %> do
@@ -1,3 +1,6 @@
1
+ <%- unless ModelBase.config.frozen_string_literal.nil? -%>
2
+ # frozen_string_literal: <%= ModelBase.config.frozen_string_literal.inspect %>
3
+ <%- end -%>
1
4
  require 'rails_helper'
2
5
 
3
6
  <% module_namespacing do -%>
@@ -1,3 +1,6 @@
1
+ <%- unless ModelBase.config.frozen_string_literal.nil? -%>
2
+ # frozen_string_literal: <%= ModelBase.config.frozen_string_literal.inspect %>
3
+ <%- end -%>
1
4
  <%-
2
5
  # ns_file_name incldues namespace.
3
6
  # file_name doesn't include namespace.
@@ -1,3 +1,6 @@
1
+ <%- unless ModelBase.config.frozen_string_literal.nil? -%>
2
+ # frozen_string_literal: <%= ModelBase.config.frozen_string_literal.inspect %>
3
+ <%- end -%>
1
4
  require 'rails_helper'
2
5
 
3
6
  RSpec.describe '<%= ns_table_name %>/edit', <%= type_metatag(:view) %> do
@@ -1,3 +1,6 @@
1
+ <%- unless ModelBase.config.frozen_string_literal.nil? -%>
2
+ # frozen_string_literal: <%= ModelBase.config.frozen_string_literal.inspect %>
3
+ <%- end -%>
1
4
  require 'rails_helper'
2
5
 
3
6
  <% output_attributes = model.columns.reject{|attribute| [:datetime, :timestamp, :time, :date].index(attribute.type) } -%>
@@ -1,3 +1,6 @@
1
+ <%- unless ModelBase.config.frozen_string_literal.nil? -%>
2
+ # frozen_string_literal: <%= ModelBase.config.frozen_string_literal.inspect %>
3
+ <%- end -%>
1
4
  require 'rails_helper'
2
5
 
3
6
  <% output_attributes = model.columns.reject{|attribute| [:datetime, :timestamp, :time, :date].index(attribute.type) } -%>
@@ -1,3 +1,6 @@
1
+ <%- unless ModelBase.config.frozen_string_literal.nil? -%>
2
+ # frozen_string_literal: <%= ModelBase.config.frozen_string_literal.inspect %>
3
+ <%- end -%>
1
4
  require 'rails_helper'
2
5
 
3
6
  <% module_namespacing do -%>
@@ -1,3 +1,6 @@
1
+ <%- unless ModelBase.config.frozen_string_literal.nil? -%>
2
+ # frozen_string_literal: <%= ModelBase.config.frozen_string_literal.inspect %>
3
+ <%- end -%>
1
4
  require 'rails_helper'
2
5
 
3
6
  RSpec.describe '<%= ns_table_name %>/show', <%= type_metatag(:view) %> do
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: model_base_generators
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.3
4
+ version: 0.3.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - akm
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2016-10-31 00:00:00.000000000 Z
11
+ date: 2016-11-04 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails