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' | source 'https://rubygems.org' | ||||||
| 
 | 
 | ||||||
| group :development do | group :development do | ||||||
|  |  | ||||||
|  | @ -1,3 +1,5 @@ | ||||||
|  | # frozen_string_literal: true | ||||||
|  | 
 | ||||||
| module ::AdPlugin | module ::AdPlugin | ||||||
|   class HouseAdSettingsController < ::ApplicationController |   class HouseAdSettingsController < ::ApplicationController | ||||||
|     requires_plugin AdPlugin.plugin_name |     requires_plugin AdPlugin.plugin_name | ||||||
|  |  | ||||||
|  | @ -1,3 +1,5 @@ | ||||||
|  | # frozen_string_literal: true | ||||||
|  | 
 | ||||||
| module ::AdPlugin | module ::AdPlugin | ||||||
|   class HouseAdsController < ::ApplicationController |   class HouseAdsController < ::ApplicationController | ||||||
|     requires_plugin AdPlugin.plugin_name |     requires_plugin AdPlugin.plugin_name | ||||||
|  |  | ||||||
|  | @ -1,3 +1,5 @@ | ||||||
|  | # frozen_string_literal: true | ||||||
|  | 
 | ||||||
| module ::AdPlugin | module ::AdPlugin | ||||||
|   class HouseAd |   class HouseAd | ||||||
|     include ActiveModel::Validations |     include ActiveModel::Validations | ||||||
|  |  | ||||||
|  | @ -1,3 +1,5 @@ | ||||||
|  | # frozen_string_literal: true | ||||||
|  | 
 | ||||||
| module ::AdPlugin | module ::AdPlugin | ||||||
|   class HouseAdSetting |   class HouseAdSetting | ||||||
|     DEFAULTS = { |     DEFAULTS = { | ||||||
|  |  | ||||||
|  | @ -1,4 +1,5 @@ | ||||||
| #!/usr/bin/env ruby | #!/usr/bin/env ruby | ||||||
|  | # frozen_string_literal: true | ||||||
| 
 | 
 | ||||||
| # Usage: | # Usage: | ||||||
| #   bundle install | #   bundle install | ||||||
|  |  | ||||||
|  | @ -1,3 +1,5 @@ | ||||||
|  | # frozen_string_literal: true | ||||||
|  | 
 | ||||||
| # name: discourse-adplugin | # name: discourse-adplugin | ||||||
| # about: Ad Plugin for Discourse | # about: Ad Plugin for Discourse | ||||||
| # version: 1.2.0 | # version: 1.2.0 | ||||||
|  |  | ||||||
|  | @ -1,3 +1,5 @@ | ||||||
|  | # frozen_string_literal: true | ||||||
|  | 
 | ||||||
| require 'rails_helper' | require 'rails_helper' | ||||||
| 
 | 
 | ||||||
| describe AdPlugin::HouseAdSetting do | describe AdPlugin::HouseAdSetting do | ||||||
|  |  | ||||||
|  | @ -1,3 +1,5 @@ | ||||||
|  | # frozen_string_literal: true | ||||||
|  | 
 | ||||||
| require 'rails_helper' | require 'rails_helper' | ||||||
| 
 | 
 | ||||||
| describe AdPlugin::HouseAd do | describe AdPlugin::HouseAd do | ||||||
|  | @ -117,7 +119,7 @@ describe AdPlugin::HouseAd do | ||||||
|     end |     end | ||||||
| 
 | 
 | ||||||
|     it "validates attributes" do |     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 be_a(AdPlugin::HouseAd) | ||||||
|       expect(ad).to_not be_valid |       expect(ad).to_not be_valid | ||||||
|       expect(ad.errors.full_messages).to be_present |       expect(ad.errors.full_messages).to be_present | ||||||
|  |  | ||||||
|  | @ -1,3 +1,5 @@ | ||||||
|  | # frozen_string_literal: true | ||||||
|  | 
 | ||||||
| require 'rails_helper' | require 'rails_helper' | ||||||
| 
 | 
 | ||||||
| describe AdPlugin::HouseAdSettingsController do | describe AdPlugin::HouseAdSettingsController do | ||||||
|  |  | ||||||
		Loading…
	
		Reference in New Issue