Add frozen string literal to all the 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.

diff --git a/Gemfile b/Gemfile
index 88dc588..1ce1838 100644
--- a/Gemfile
+++ b/Gemfile
@@ -1,3 +1,4 @@
+# frozen_string_literal: true
 source 'https://rubygems.org'
 
 # Specify your gem's dependencies in discourse_api.gemspec
diff --git a/Guardfile b/Guardfile
index d44306a..e3b82fd 100644
--- a/Guardfile
+++ b/Guardfile
@@ -1,3 +1,4 @@
+# frozen_string_literal: true
 guard :rspec do
   watch(%r{^spec/.+_spec\.rb$})
   watch(%r{^lib/(.+)\.rb$})     { |m| "spec/lib/#{m[1]}_spec.rb" }
diff --git a/Rakefile b/Rakefile
index 405e289..9be3e03 100644
--- a/Rakefile
+++ b/Rakefile
@@ -1,3 +1,4 @@
+# frozen_string_literal: true
 require 'bundler/gem_tasks'
 
 require 'rspec/core/rake_task'
diff --git a/discourse_api.gemspec b/discourse_api.gemspec
index edc6674..0f2f60d 100644
--- a/discourse_api.gemspec
+++ b/discourse_api.gemspec
@@ -1,3 +1,4 @@
+# frozen_string_literal: true
 lib = File.expand_path('lib', __dir__)
 $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
 require 'discourse_api/version'
diff --git a/examples/backups.rb b/examples/backups.rb
index a59e481..9c844d2 100644
--- a/examples/backups.rb
+++ b/examples/backups.rb
@@ -1,3 +1,4 @@
+# frozen_string_literal: true
 $LOAD_PATH.unshift File.expand_path('../../lib', __FILE__)
 require File.expand_path('../../lib/discourse_api', __FILE__)
 
diff --git a/examples/badges.rb b/examples/badges.rb
index 7a5ff01..30c1359 100644
--- a/examples/badges.rb
+++ b/examples/badges.rb
@@ -1,3 +1,4 @@
+# frozen_string_literal: true
 $LOAD_PATH.unshift File.expand_path('../../lib', __FILE__)
 require File.expand_path('../../lib/discourse_api', __FILE__)
 
diff --git a/examples/category.rb b/examples/category.rb
index 6790029..96d352e 100644
--- a/examples/category.rb
+++ b/examples/category.rb
@@ -1,3 +1,4 @@
+# frozen_string_literal: true
 $LOAD_PATH.unshift File.expand_path('../../lib', __FILE__)
 require File.expand_path('../../lib/discourse_api', __FILE__)
 
diff --git a/examples/change_topic_status.rb b/examples/change_topic_status.rb
index 16bdb86..eaf9984 100644
--- a/examples/change_topic_status.rb
+++ b/examples/change_topic_status.rb
@@ -1,3 +1,4 @@
+# frozen_string_literal: true
 $LOAD_PATH.unshift File.expand_path('../../lib', __FILE__)
 require File.expand_path('../../lib/discourse_api', __FILE__)
 
diff --git a/examples/create_private_message.rb b/examples/create_private_message.rb
index cc1b012..bee9221 100644
--- a/examples/create_private_message.rb
+++ b/examples/create_private_message.rb
@@ -1,3 +1,4 @@
+# frozen_string_literal: true
 $LOAD_PATH.unshift File.expand_path('../../lib', __FILE__)
 require File.expand_path('../../lib/discourse_api', __FILE__)
 
diff --git a/examples/create_topic.rb b/examples/create_topic.rb
index b6dd977..1999329 100644
--- a/examples/create_topic.rb
+++ b/examples/create_topic.rb
@@ -1,3 +1,4 @@
+# frozen_string_literal: true
 $LOAD_PATH.unshift File.expand_path('../../lib', __FILE__)
 require File.expand_path('../../lib/discourse_api', __FILE__)
 
diff --git a/examples/create_update_category.rb b/examples/create_update_category.rb
index 6a84ebd..346fa69 100644
--- a/examples/create_update_category.rb
+++ b/examples/create_update_category.rb
@@ -1,3 +1,4 @@
+# frozen_string_literal: true
 $LOAD_PATH.unshift File.expand_path('../../lib', __FILE__)
 require File.expand_path('../../lib/discourse_api', __FILE__)
 
diff --git a/examples/create_user.rb b/examples/create_user.rb
index 2a9bd3c..d5299b4 100644
--- a/examples/create_user.rb
+++ b/examples/create_user.rb
@@ -1,3 +1,4 @@
+# frozen_string_literal: true
 $LOAD_PATH.unshift File.expand_path('../../lib', __FILE__)
 require File.expand_path('../../lib/discourse_api', __FILE__)
 
diff --git a/examples/dashboard.rb b/examples/dashboard.rb
index bc64880..00151f1 100644
--- a/examples/dashboard.rb
+++ b/examples/dashboard.rb
@@ -1,3 +1,4 @@
+# frozen_string_literal: true
 $LOAD_PATH.unshift File.expand_path('../../lib', __FILE__)
 require File.expand_path('../../lib/discourse_api', __FILE__)
 
diff --git a/examples/disposable_invite_tokens.rb b/examples/disposable_invite_tokens.rb
index 1d40b54..6a3d45f 100644
--- a/examples/disposable_invite_tokens.rb
+++ b/examples/disposable_invite_tokens.rb
@@ -1,3 +1,4 @@
+# frozen_string_literal: true
 # requires this plugin => https://github.com/discourse/discourse-invite-tokens
 
 require 'csv'
diff --git a/examples/example.rb b/examples/example.rb
index 1291a70..56ebe3e 100644
--- a/examples/example.rb
+++ b/examples/example.rb
@@ -1,3 +1,4 @@
+# frozen_string_literal: true
 $LOAD_PATH.unshift File.expand_path('../../lib', __FILE__)
 require File.expand_path('../../lib/discourse_api', __FILE__)
 
diff --git a/examples/group_set_user_notification_level.rb b/examples/group_set_user_notification_level.rb
index fdf2fc0..61dd3c4 100644
--- a/examples/group_set_user_notification_level.rb
+++ b/examples/group_set_user_notification_level.rb
@@ -1,3 +1,4 @@
+# frozen_string_literal: true
 $LOAD_PATH.unshift File.expand_path('../../lib', __FILE__)
 require File.expand_path('../../lib/discourse_api', __FILE__)
 
diff --git a/examples/groups.rb b/examples/groups.rb
index f301e73..56171c5 100644
--- a/examples/groups.rb
+++ b/examples/groups.rb
@@ -1,3 +1,4 @@
+# frozen_string_literal: true
 $LOAD_PATH.unshift File.expand_path('../../lib', __FILE__)
 require File.expand_path('../../lib/discourse_api', __FILE__)
 
diff --git a/examples/invite_users.rb b/examples/invite_users.rb
index 530a714..60e578d 100644
--- a/examples/invite_users.rb
+++ b/examples/invite_users.rb
@@ -1,3 +1,4 @@
+# frozen_string_literal: true
 $LOAD_PATH.unshift File.expand_path('../../lib', __FILE__)
 require File.expand_path('../../lib/discourse_api', __FILE__)
 
diff --git a/examples/post_action.rb b/examples/post_action.rb
index 6e39793..2aa9b60 100644
--- a/examples/post_action.rb
+++ b/examples/post_action.rb
@@ -1,3 +1,4 @@
+# frozen_string_literal: true
 $LOAD_PATH.unshift File.expand_path('../../lib', __FILE__)
 require File.expand_path('../../lib/discourse_api', __FILE__)
 
diff --git a/examples/search.rb b/examples/search.rb
index 98255bf..0c89b42 100644
--- a/examples/search.rb
+++ b/examples/search.rb
@@ -1,3 +1,4 @@
+# frozen_string_literal: true
 $LOAD_PATH.unshift File.expand_path('../../lib', __FILE__)
 require File.expand_path('../../lib/discourse_api', __FILE__)
 
diff --git a/examples/sent_private_messages.rb b/examples/sent_private_messages.rb
index fcbe68b..75f0672 100644
--- a/examples/sent_private_messages.rb
+++ b/examples/sent_private_messages.rb
@@ -1,3 +1,4 @@
+# frozen_string_literal: true
 $LOAD_PATH.unshift File.expand_path('../../lib', __FILE__)
 require File.expand_path('../../lib/discourse_api', __FILE__)
 
diff --git a/examples/sso.rb b/examples/sso.rb
index fb0f37d..86ab925 100644
--- a/examples/sso.rb
+++ b/examples/sso.rb
@@ -1,3 +1,4 @@
+# frozen_string_literal: true
 $LOAD_PATH.unshift File.expand_path('../../lib', __FILE__)
 require File.expand_path('../../lib/discourse_api', __FILE__)
 
diff --git a/examples/topic_lists.rb b/examples/topic_lists.rb
index dba133b..388a8cd 100644
--- a/examples/topic_lists.rb
+++ b/examples/topic_lists.rb
@@ -1,3 +1,4 @@
+# frozen_string_literal: true
 $LOAD_PATH.unshift File.expand_path('../../lib', __FILE__)
 require File.expand_path('../../lib/discourse_api', __FILE__)
 
diff --git a/examples/update_user.rb b/examples/update_user.rb
index afdf745..299c192 100644
--- a/examples/update_user.rb
+++ b/examples/update_user.rb
@@ -1,3 +1,4 @@
+# frozen_string_literal: true
 $LOAD_PATH.unshift File.expand_path('../../lib', __FILE__)
 require File.expand_path('../../lib/discourse_api', __FILE__)
 
diff --git a/examples/upload_file.rb b/examples/upload_file.rb
index 34a10dc..0c08d74 100644
--- a/examples/upload_file.rb
+++ b/examples/upload_file.rb
@@ -1,3 +1,4 @@
+# frozen_string_literal: true
 $LOAD_PATH.unshift File.expand_path('../../lib', __FILE__)
 require File.expand_path('../../lib/discourse_api', __FILE__)
 
diff --git a/lib/discourse_api.rb b/lib/discourse_api.rb

[... diff too long, it was truncated ...]

GitHub sha: c362b9f3