Add frozen string literal to files.
This commit is contained in:
parent
d3a5927ede
commit
546101a357
2
Gemfile
2
Gemfile
|
@ -1,3 +1,5 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
source 'https://rubygems.org'
|
||||
|
||||
group :development do
|
||||
|
|
|
@ -1,3 +1,5 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
module ::AdPlugin
|
||||
class HouseAdSettingsController < ::ApplicationController
|
||||
requires_plugin AdPlugin.plugin_name
|
||||
|
|
|
@ -1,3 +1,5 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
module ::AdPlugin
|
||||
class HouseAdsController < ::ApplicationController
|
||||
requires_plugin AdPlugin.plugin_name
|
||||
|
|
|
@ -1,3 +1,5 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
module ::AdPlugin
|
||||
class HouseAd
|
||||
include ActiveModel::Validations
|
||||
|
|
|
@ -1,3 +1,5 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
module ::AdPlugin
|
||||
class HouseAdSetting
|
||||
DEFAULTS = {
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
#!/usr/bin/env ruby
|
||||
# frozen_string_literal: true
|
||||
|
||||
# Usage:
|
||||
# bundle install
|
||||
|
|
|
@ -1,3 +1,5 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
# name: discourse-adplugin
|
||||
# about: Ad Plugin for Discourse
|
||||
# version: 1.2.0
|
||||
|
|
|
@ -1,3 +1,5 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
require 'rails_helper'
|
||||
|
||||
describe AdPlugin::HouseAdSetting do
|
||||
|
|
|
@ -1,3 +1,5 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
require 'rails_helper'
|
||||
|
||||
describe AdPlugin::HouseAd do
|
||||
|
@ -117,7 +119,7 @@ describe AdPlugin::HouseAd do
|
|||
end
|
||||
|
||||
it "validates attributes" do
|
||||
ad = AdPlugin::HouseAd.create({name: '', html: ''})
|
||||
ad = AdPlugin::HouseAd.create(name: '', html: '')
|
||||
expect(ad).to be_a(AdPlugin::HouseAd)
|
||||
expect(ad).to_not be_valid
|
||||
expect(ad.errors.full_messages).to be_present
|
||||
|
|
|
@ -1,3 +1,5 @@
|
|||
# frozen_string_literal: true
|
||||
|
||||
require 'rails_helper'
|
||||
|
||||
describe AdPlugin::HouseAdSettingsController do
|
||||
|
|
Loading…
Reference in New Issue