Skip to content

Commit 5f8853d

Browse files
committed
chore: rubocop
1 parent 7dbe8cc commit 5f8853d

File tree

67 files changed

+215
-83
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

67 files changed

+215
-83
lines changed

Gemfile

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
1-
source 'https://rubygems.org'
1+
# frozen_string_literal: true
2+
3+
source "https://rubygems.org"
24
git_source(:github) { |repo| "https://github.com/#{repo}.git" }
35

46
# Declare your gem's dependencies in wechat_third_party_platform.gemspec.
@@ -12,5 +14,5 @@ gemspec
1214
# your gem to rubygems.org.
1315

1416
# To use a debugger
15-
gem 'byebug', group: [:development, :test]
16-
gem 'dotenv-rails', groups: [:development, :test]
17+
gem "byebug", group: [:development, :test]
18+
gem "dotenv-rails", groups: [:development, :test]

Rakefile

Lines changed: 16 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,31 +1,33 @@
1+
# frozen_string_literal: true
2+
13
begin
2-
require 'bundler/setup'
4+
require "bundler/setup"
35
rescue LoadError
4-
puts 'You must `gem install bundler` and `bundle install` to run rake tasks'
6+
puts "You must `gem install bundler` and `bundle install` to run rake tasks"
57
end
68

7-
require 'rdoc/task'
9+
require "rdoc/task"
810

911
RDoc::Task.new(:rdoc) do |rdoc|
10-
rdoc.rdoc_dir = 'rdoc'
11-
rdoc.title = 'WechatThirdPartyPlatform'
12-
rdoc.options << '--line-numbers'
13-
rdoc.rdoc_files.include('README.md')
14-
rdoc.rdoc_files.include('lib/**/*.rb')
12+
rdoc.rdoc_dir = "rdoc"
13+
rdoc.title = "WechatThirdPartyPlatform"
14+
rdoc.options << "--line-numbers"
15+
rdoc.rdoc_files.include("README.md")
16+
rdoc.rdoc_files.include("lib/**/*.rb")
1517
end
1618

1719
APP_RAKEFILE = File.expand_path("test/dummy/Rakefile", __dir__)
18-
load 'rails/tasks/engine.rake'
20+
load "rails/tasks/engine.rake"
1921

20-
load 'rails/tasks/statistics.rake'
22+
load "rails/tasks/statistics.rake"
2123

22-
require 'bundler/gem_tasks'
24+
require "bundler/gem_tasks"
2325

24-
require 'rake/testtask'
26+
require "rake/testtask"
2527

2628
Rake::TestTask.new(:test) do |t|
27-
t.libs << 'test'
28-
t.pattern = 'test/**/*_test.rb'
29+
t.libs << "test"
30+
t.pattern = "test/**/*_test.rb"
2931
t.verbose = false
3032
end
3133

app/controllers/wechat_third_party_platform/application_controller.rb

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
# frozen_string_literal: true
2+
13
module WechatThirdPartyPlatform
24
class ApplicationController < ActionController::Base
35
protect_from_forgery with: :exception

app/controllers/wechat_third_party_platform/wechat_controller.rb

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,11 @@
1+
# frozen_string_literal: true
2+
13
module WechatThirdPartyPlatform
24
class WechatController < ApplicationController
35
skip_before_action :verify_authenticity_token
46
before_action :set_app_id_params, only: :authorization_events
57

6-
LOGGER = ::Logger.new('./log/wechat_third_party_platform_event.log')
8+
LOGGER = ::Logger.new("./log/wechat_third_party_platform_event.log")
79

810
def authorization_events
911
LOGGER.debug("request: params: #{params.inspect}, msg_hash: #{msg_hash.inspect}")

app/helpers/wechat_third_party_platform/application_helper.rb

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
# frozen_string_literal: true
2+
13
module WechatThirdPartyPlatform
24
module ApplicationHelper
35
end

app/jobs/wechat_third_party_platform/application_job.rb

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
# frozen_string_literal: true
2+
13
module WechatThirdPartyPlatform
24
class ApplicationJob < ActiveJob::Base
35
end
Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
1+
# frozen_string_literal: true
2+
13
module WechatThirdPartyPlatform
24
class ApplicationMailer < ActionMailer::Base
3-
default from: '[email protected]'
4-
layout 'mailer'
5+
default from: "[email protected]"
6+
layout "mailer"
57
end
68
end

app/models/wechat_third_party_platform/application_record.rb

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
# frozen_string_literal: true
2+
13
module WechatThirdPartyPlatform
24
class ApplicationRecord < ActiveRecord::Base
35
self.abstract_class = true

app/models/wechat_third_party_platform/submition.rb

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
# frozen_string_literal: true
2+
13
module WechatThirdPartyPlatform
24
class Submition < ApplicationRecord
35
belongs_to :application, class_name: WechatThirdPartyPlatform.application_class_name

app/models/wechat_third_party_platform/tester.rb

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
# frozen_string_literal: true
2+
13
module WechatThirdPartyPlatform
24
class Tester < ApplicationRecord
35
belongs_to :application, class_name: WechatThirdPartyPlatform.application_class_name

0 commit comments

Comments
 (0)