Skip to content

Commit c362b9f

Browse files
Add frozen string literal to all the files
Because we inherit the rubocop file from discourse/discourse we now need to add `frozen_string_literal: true` support.
1 parent 3d756c7 commit c362b9f

Some content is hidden

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

50 files changed

+50
-0
lines changed

Gemfile

+1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
# frozen_string_literal: true
12
source 'https://rubygems.org'
23

34
# Specify your gem's dependencies in discourse_api.gemspec

Guardfile

+1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
# frozen_string_literal: true
12
guard :rspec do
23
watch(%r{^spec/.+_spec\.rb$})
34
watch(%r{^lib/(.+)\.rb$}) { |m| "spec/lib/#{m[1]}_spec.rb" }

Rakefile

+1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
# frozen_string_literal: true
12
require 'bundler/gem_tasks'
23

34
require 'rspec/core/rake_task'

discourse_api.gemspec

+1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
# frozen_string_literal: true
12
lib = File.expand_path('lib', __dir__)
23
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
34
require 'discourse_api/version'

examples/backups.rb

+1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
# frozen_string_literal: true
12
$LOAD_PATH.unshift File.expand_path('../../lib', __FILE__)
23
require File.expand_path('../../lib/discourse_api', __FILE__)
34

examples/badges.rb

+1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
# frozen_string_literal: true
12
$LOAD_PATH.unshift File.expand_path('../../lib', __FILE__)
23
require File.expand_path('../../lib/discourse_api', __FILE__)
34

examples/category.rb

+1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
# frozen_string_literal: true
12
$LOAD_PATH.unshift File.expand_path('../../lib', __FILE__)
23
require File.expand_path('../../lib/discourse_api', __FILE__)
34

examples/change_topic_status.rb

+1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
# frozen_string_literal: true
12
$LOAD_PATH.unshift File.expand_path('../../lib', __FILE__)
23
require File.expand_path('../../lib/discourse_api', __FILE__)
34

examples/create_private_message.rb

+1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
# frozen_string_literal: true
12
$LOAD_PATH.unshift File.expand_path('../../lib', __FILE__)
23
require File.expand_path('../../lib/discourse_api', __FILE__)
34

examples/create_topic.rb

+1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
# frozen_string_literal: true
12
$LOAD_PATH.unshift File.expand_path('../../lib', __FILE__)
23
require File.expand_path('../../lib/discourse_api', __FILE__)
34

examples/create_update_category.rb

+1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
# frozen_string_literal: true
12
$LOAD_PATH.unshift File.expand_path('../../lib', __FILE__)
23
require File.expand_path('../../lib/discourse_api', __FILE__)
34

examples/create_user.rb

+1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
# frozen_string_literal: true
12
$LOAD_PATH.unshift File.expand_path('../../lib', __FILE__)
23
require File.expand_path('../../lib/discourse_api', __FILE__)
34

examples/dashboard.rb

+1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
# frozen_string_literal: true
12
$LOAD_PATH.unshift File.expand_path('../../lib', __FILE__)
23
require File.expand_path('../../lib/discourse_api', __FILE__)
34

examples/disposable_invite_tokens.rb

+1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
# frozen_string_literal: true
12
# requires this plugin => https://github.com/discourse/discourse-invite-tokens
23

34
require 'csv'

examples/example.rb

+1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
# frozen_string_literal: true
12
$LOAD_PATH.unshift File.expand_path('../../lib', __FILE__)
23
require File.expand_path('../../lib/discourse_api', __FILE__)
34

examples/group_set_user_notification_level.rb

+1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
# frozen_string_literal: true
12
$LOAD_PATH.unshift File.expand_path('../../lib', __FILE__)
23
require File.expand_path('../../lib/discourse_api', __FILE__)
34

examples/groups.rb

+1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
# frozen_string_literal: true
12
$LOAD_PATH.unshift File.expand_path('../../lib', __FILE__)
23
require File.expand_path('../../lib/discourse_api', __FILE__)
34

examples/invite_users.rb

+1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
# frozen_string_literal: true
12
$LOAD_PATH.unshift File.expand_path('../../lib', __FILE__)
23
require File.expand_path('../../lib/discourse_api', __FILE__)
34

examples/post_action.rb

+1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
# frozen_string_literal: true
12
$LOAD_PATH.unshift File.expand_path('../../lib', __FILE__)
23
require File.expand_path('../../lib/discourse_api', __FILE__)
34

examples/search.rb

+1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
# frozen_string_literal: true
12
$LOAD_PATH.unshift File.expand_path('../../lib', __FILE__)
23
require File.expand_path('../../lib/discourse_api', __FILE__)
34

examples/sent_private_messages.rb

+1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
# frozen_string_literal: true
12
$LOAD_PATH.unshift File.expand_path('../../lib', __FILE__)
23
require File.expand_path('../../lib/discourse_api', __FILE__)
34

examples/sso.rb

+1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
# frozen_string_literal: true
12
$LOAD_PATH.unshift File.expand_path('../../lib', __FILE__)
23
require File.expand_path('../../lib/discourse_api', __FILE__)
34

examples/topic_lists.rb

+1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
# frozen_string_literal: true
12
$LOAD_PATH.unshift File.expand_path('../../lib', __FILE__)
23
require File.expand_path('../../lib/discourse_api', __FILE__)
34

examples/update_user.rb

+1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
# frozen_string_literal: true
12
$LOAD_PATH.unshift File.expand_path('../../lib', __FILE__)
23
require File.expand_path('../../lib/discourse_api', __FILE__)
34

examples/upload_file.rb

+1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
# frozen_string_literal: true
12
$LOAD_PATH.unshift File.expand_path('../../lib', __FILE__)
23
require File.expand_path('../../lib/discourse_api', __FILE__)
34

lib/discourse_api.rb

+1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
# frozen_string_literal: true
12
require "discourse_api/api/params"
23
require "discourse_api/client"
34
require "discourse_api/error"

lib/discourse_api/api/api_key.rb

+1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
# frozen_string_literal: true
12
module DiscourseApi
23
module API
34
module ApiKey

lib/discourse_api/api/backups.rb

+1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
# frozen_string_literal: true
12
module DiscourseApi
23
module API
34
module Backups

lib/discourse_api/api/badges.rb

+1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
# frozen_string_literal: true
12
module DiscourseApi
23
module API
34
module Badges

lib/discourse_api/api/categories.rb

+1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
# frozen_string_literal: true
12
module DiscourseApi
23
module API
34
module Categories

lib/discourse_api/api/dashboard.rb

+1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
# frozen_string_literal: true
12
module DiscourseApi
23
module API
34
module Dashboard

lib/discourse_api/api/email.rb

+1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
# frozen_string_literal: true
12
module DiscourseApi
23
module API
34
module Email

lib/discourse_api/api/groups.rb

+1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
# frozen_string_literal: true
12
module DiscourseApi
23
module API
34
module Groups

lib/discourse_api/api/invite.rb

+1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
# frozen_string_literal: true
12
module DiscourseApi
23
module API
34
module Invite

lib/discourse_api/api/notifications.rb

+1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
# frozen_string_literal: true
12
module DiscourseApi
23
module API
34
module Notifications

lib/discourse_api/api/params.rb

+1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
# frozen_string_literal: true
12
module DiscourseApi
23
module API
34
def self.params(args)

lib/discourse_api/api/posts.rb

+1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
# frozen_string_literal: true
12
module DiscourseApi
23
module API
34
module Posts

lib/discourse_api/api/private_messages.rb

+1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
# frozen_string_literal: true
12
module DiscourseApi
23
module API
34
module PrivateMessages

lib/discourse_api/api/search.rb

+1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
# frozen_string_literal: true
12
module DiscourseApi
23
module API
34
module Search

lib/discourse_api/api/site_settings.rb

+1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
# frozen_string_literal: true
12
module DiscourseApi
23
module API
34
module SiteSettings

lib/discourse_api/api/sso.rb

+1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
# frozen_string_literal: true
12
module DiscourseApi
23
module API
34
module SSO

lib/discourse_api/api/tags.rb

+1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
# frozen_string_literal: true
12
module DiscourseApi
23
module API
34
module Tags

lib/discourse_api/api/topics.rb

+1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
# frozen_string_literal: true
12
module DiscourseApi
23
module API
34
module Topics

lib/discourse_api/api/uploads.rb

+1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
# frozen_string_literal: true
12
module DiscourseApi
23
module API
34
module Uploads

lib/discourse_api/api/user_actions.rb

+1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
# frozen_string_literal: true
12
module DiscourseApi
23
module API
34
module UserActions

lib/discourse_api/api/users.rb

+1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
# frozen_string_literal: true
12
module DiscourseApi
23
module API
34
module Users

lib/discourse_api/client.rb

+1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
# frozen_string_literal: true
12
require 'faraday'
23
require 'faraday_middleware'
34
require 'json'

lib/discourse_api/error.rb

+1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
# frozen_string_literal: true
12
module DiscourseApi
23
class DiscourseError < StandardError
34
attr_reader :response

lib/discourse_api/single_sign_on.rb

+1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
# frozen_string_literal: true
12
require 'base64'
23
require 'rack'
34
require 'openssl'

lib/discourse_api/version.rb

+1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
# frozen_string_literal: true
12
module DiscourseApi
23
VERSION = "0.34.0"
34
end

0 commit comments

Comments
 (0)