ogam 1.2.1 → 1.3.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: b13e20a9f3b62122570f2092073fff66aa7dd1975e227e2a6405f09e1e1c7486
4
- data.tar.gz: 78c58573ff0f8fd67d9d40f0b22332d25ebd77d1d9bc8ac179f0f2a3619dfb43
3
+ metadata.gz: bddb0b22c81d3f2620aff1a49023151d69c34c258d92307f0ddfc6f6fb022d36
4
+ data.tar.gz: bbcffc1503fdc93a50a274578b9a123a756a4a994fbc9b7ad9be4c59c9a6106e
5
5
  SHA512:
6
- metadata.gz: 7b375c92621f8045718aeaaae1f58bdab49d53e4aa4a8b0a0fb22715ce543d5f06f84e1a8ceb01c0c32a406bdf0da515dc4d29d337cab0e5f6b1592ed64ec18d
7
- data.tar.gz: cc4ba8455c411b1861877ba043e4803ff689ad36751ad6d3ead902ec9c8f27e00eaaada1066c41112906bbe9182a03fe15535189a45ccac20ce5875c141286f5
6
+ metadata.gz: 7762c8924dc94be667db497efd57e5e80113700fb1da301123ff0ea86d821fb4dcdfe89ba6c4f776c908de5f08da37276be0118401d174b714baa24f90dfe111
7
+ data.tar.gz: 2b806186ef4e6bfb0073137c265d3f452ad6f36f9529db2f8c67de0fa9a238ec8cccb358a7492d1a931eb87e5ad116f38c6a172b21b2e34be56b3ae9eb1370e1
@@ -1,6 +1,5 @@
1
1
  inherit_from:
2
2
  - .rubocop_todo.yml
3
- - .rubocop_metrics_todo.yml
4
3
 
5
4
  inherit_gem:
6
5
  rubocop-ogat:
@@ -9,16 +8,5 @@ inherit_gem:
9
8
  AllCops:
10
9
  TargetRubyVersion: 2.6
11
10
 
12
- Layout/LineLength:
13
- Max: 120
14
-
15
- Metrics/BlockLength:
16
- Exclude:
17
- - 'spec/**/*.rb'
18
- - 'ogatstyle.gemspec'
19
-
20
- Rails/Output:
21
- Enabled: false
22
-
23
- Rails/SaveBang:
11
+ Rails:
24
12
  Enabled: false
@@ -1,7 +1,52 @@
1
1
  # This configuration was generated by
2
- # `rubocop --auto-gen-config --exclude-limit 1000 --no-offense-counts --no-auto-gen-timestamp`
3
- # using RuboCop version 0.80.0.
2
+ # `rubocop --auto-gen-config --auto-gen-only-exclude --exclude-limit 10000 --no-offense-counts --no-auto-gen-timestamp`
3
+ # using RuboCop version 0.80.1.
4
4
  # The point is for the user to remove these configuration records
5
5
  # one by one as the offenses are removed from the code base.
6
6
  # Note that changes in the inspected code, or installation of new
7
7
  # versions of RuboCop, may require this file to be generated again.
8
+
9
+ # Configuration parameters: Max.
10
+ Metrics/AbcSize:
11
+ Exclude:
12
+ - 'spec/**/*'
13
+ - 'db/migrate/*'
14
+ - 'config/routes.rb'
15
+ - 'config/environments/*.rb'
16
+ - 'lib/ogam/group_assigner.rb'
17
+
18
+ # Configuration parameters: CountComments, Max.
19
+ Metrics/ClassLength:
20
+ Exclude:
21
+ - 'spec/**/*'
22
+ - 'db/migrate/*'
23
+ - 'config/routes.rb'
24
+ - 'config/environments/*.rb'
25
+ - 'lib/ogam/group_assigner.rb'
26
+
27
+ # Configuration parameters: Max.
28
+ Metrics/CyclomaticComplexity:
29
+ Exclude:
30
+ - 'spec/**/*'
31
+ - 'db/migrate/*'
32
+ - 'config/routes.rb'
33
+ - 'config/environments/*.rb'
34
+ - 'lib/ogam/group_assigner.rb'
35
+
36
+ # Configuration parameters: CountComments, Max, ExcludedMethods.
37
+ Metrics/MethodLength:
38
+ Exclude:
39
+ - 'spec/**/*'
40
+ - 'db/migrate/*'
41
+ - 'config/routes.rb'
42
+ - 'config/environments/*.rb'
43
+ - 'lib/ogam/group_assigner.rb'
44
+
45
+ # Configuration parameters: Max.
46
+ Metrics/PerceivedComplexity:
47
+ Exclude:
48
+ - 'spec/**/*'
49
+ - 'db/migrate/*'
50
+ - 'config/routes.rb'
51
+ - 'config/environments/*.rb'
52
+ - 'lib/ogam/group_assigner.rb'
data/Gemfile CHANGED
@@ -1,6 +1,6 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- source 'https://rubygems.org'
3
+ source "https://rubygems.org"
4
4
 
5
5
  git_source(:github) { |repo_name| "https://github.com/#{repo_name}" }
6
6
 
data/Rakefile CHANGED
@@ -1,7 +1,7 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- require 'bundler/gem_tasks'
4
- require 'rspec/core/rake_task'
3
+ require "bundler/gem_tasks"
4
+ require "rspec/core/rake_task"
5
5
 
6
6
  RSpec::Core::RakeTask.new(:spec)
7
7
 
data/bin/ogam CHANGED
@@ -97,6 +97,21 @@ class CLI < Thor
97
97
  desc('set_signature user/domain EMAIL/DOMAIN', 'Set email signatures for users/domains based on user attributes')
98
98
  subcommand 'set_signature', SignatureCLI
99
99
 
100
+ desc('delicense_suspended_ou', 'De-licenses GSEfE from all users under /Suspended')
101
+ def delicense_suspended_ou
102
+ Ogam::Execute.single('gam ou "/Suspended" delete license 1010310002', pretend: options[:pretend])
103
+ end
104
+
105
+ desc('suspend USER', 'Suspends a user, moves them to /Suspended, and delicenses GSEfE')
106
+ def suspend(user)
107
+ Ogam::Execute.single(
108
+ "gam update user #{user} suspended on org \"/Suspended\"", pretend: options[:pretend]
109
+ )
110
+ puts "Waiting 5 seconds before delicensing..."
111
+ sleep(5)
112
+ Ogam::Execute.single("gam user #{user} delete license 1010310002", pretend: options[:pretend])
113
+ end
114
+
100
115
  private
101
116
 
102
117
  def validate_job_title!(title)
@@ -1,15 +1,15 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- require 'active_support/all'
4
- require 'attr_extras'
5
- require 'ogam/version'
6
- require 'ogam/execute'
7
- require 'ogam/group'
8
- require 'ogam/job_title'
9
- require 'ogam/user'
10
- require 'ogam/group_assigner'
11
- require 'ogam/signature'
12
- require 'ogam/organisation'
3
+ require "active_support/all"
4
+ require "attr_extras"
5
+ require "ogam/version"
6
+ require "ogam/execute"
7
+ require "ogam/group"
8
+ require "ogam/job_title"
9
+ require "ogam/user"
10
+ require "ogam/group_assigner"
11
+ require "ogam/signature"
12
+ require "ogam/organisation"
13
13
 
14
14
  module Ogam
15
15
  class Error < StandardError; end
@@ -1,21 +1,21 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- require 'csv'
4
- require 'tempfile'
5
- require 'English'
3
+ require "csv"
4
+ require "tempfile"
5
+ require "English"
6
6
 
7
7
  module Ogam
8
8
  # Methods to execute GAM commands
9
9
  class Execute
10
10
  def self.single(command, pretend: true)
11
- puts "#{pretend ? '[PRETEND] ' : nil}Executing #{command}"
11
+ puts "#{pretend ? "[PRETEND] " : nil}Executing #{command}"
12
12
  return if pretend
13
13
 
14
14
  system("~/bin/gam/#{command.strip}", exception: true)
15
15
  end
16
16
 
17
17
  def self.fetch(command, pretend: true)
18
- puts "#{pretend ? '[PRETEND] ' : nil}Fetching results from #{command}"
18
+ puts "#{pretend ? "[PRETEND] " : nil}Fetching results from #{command}"
19
19
  return if pretend
20
20
 
21
21
  `~/bin/gam/#{command.strip}`
@@ -35,7 +35,7 @@ module Ogam
35
35
  def self.multiple(commands, pretend: true)
36
36
  return if commands.empty?
37
37
 
38
- puts "#{pretend ? '[PRETEND] ' : nil}Executing multiple commands:"
38
+ puts "#{pretend ? "[PRETEND] " : nil}Executing multiple commands:"
39
39
  commands.each do |command|
40
40
  puts "\t#{command}"
41
41
  end
@@ -1,11 +1,11 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- require 'shellwords'
3
+ require "shellwords"
4
4
  module Ogam
5
5
  # Methods relating to groups
6
6
  class Group
7
7
  def self.groups_for_domain(domain)
8
- Ogam::Execute.fetch_csv("gam print groups domain #{domain}", pretend: false).map { |r| r['Email'] }
8
+ Ogam::Execute.fetch_csv("gam print groups domain #{domain}", pretend: false).map { |r| r["Email"] }
9
9
  end
10
10
 
11
11
  def self.add_group_member_command(user:, group:)
@@ -26,7 +26,7 @@ module Ogam
26
26
 
27
27
  def self.create_distribution_list_command(email_address, name, moderated)
28
28
  <<~COMMAND
29
- gam create group #{email_address} name #{Shellwords.escape(name)} allow_external_members false who_can_join invited_can_join primary_language en-GB who_can_view_membership all_in_domain_can_view include_in_global_address_list true is_archived false members_can_post_as_the_group false allow_web_posting false send_message_deny_notification true reply_to reply_to_sender message_moderation_level #{moderated ? 'moderate_all_messages' : 'moderate_none'} who_can_contact_owner all_managers_can_contact who_can_leave_group none_can_leave who_can_add none_can_add who_can_post_message all_in_domain_can_post who_can_invite none_can_invite who_can_view_group all_managers_can_view show_in_group_directory true archive_only false spam_moderation_level moderate
29
+ gam create group #{email_address} name #{Shellwords.escape(name)} allow_external_members false who_can_join invited_can_join primary_language en-GB who_can_view_membership all_in_domain_can_view include_in_global_address_list true is_archived false members_can_post_as_the_group false allow_web_posting false send_message_deny_notification true reply_to reply_to_sender message_moderation_level #{moderated ? "moderate_all_messages" : "moderate_none"} who_can_contact_owner all_managers_can_contact who_can_leave_group none_can_leave who_can_add none_can_add who_can_post_message all_in_domain_can_post who_can_invite none_can_invite who_can_view_group all_managers_can_view show_in_group_directory true archive_only false spam_moderation_level moderate
30
30
  COMMAND
31
31
  end
32
32
 
@@ -5,28 +5,28 @@ module Ogam
5
5
  class GroupAssigner
6
6
  static_facade :call, :users, :domain, [pretend: true]
7
7
 
8
- SUBJECT_TEACHER_TITLES = ['Teacher of ', 'Head of ', 'Second in ', 'Third in '].freeze
8
+ SUBJECT_TEACHER_TITLES = ["Teacher of ", "Head of ", "Second in ", "Third in "].freeze
9
9
  SUBJECT_MAPPING = {
10
- 'art-teachers' => ['Art', 'Creative Arts'],
11
- 'business-teachers' => ['Business Studies', 'Business & IT'],
12
- 'dance-teachers' => ['Dance', 'Performing Arts', 'Creative Arts'],
13
- 'design-technology-teachers' => %w[Technology Engineering],
14
- 'drama-teachers' => ['Drama', 'Music & Drama', 'Performing Arts', 'Creative Arts'],
15
- 'english-teachers' => ['English'],
16
- 'epq-teachers' => [],
17
- 'geography-teachers' => ['Humanities'],
18
- 'guidance-teachers' => [],
19
- 'health-social-care-teachers' => ['Health & Social Care'],
20
- 'history-teachers' => %w[Humanities History],
21
- 'ict-teachers' => ['Computer Science', 'Business & IT'],
22
- 'law-teachers' => ['Law'],
23
- 'maths-teachers' => ['Maths'],
24
- 'mfl-teachers' => ['MFL'],
25
- 'music-teachers' => ['Music', 'Music & Drama', 'Creative Arts'],
26
- 'pe-teachers' => ['PE'],
27
- 're-life-teachers' => ['Humanities', 'Religious Studies'],
28
- 'science-teachers' => ['Science'],
29
- 'social-sciences-teachers' => ['Social Sciences']
10
+ "art-teachers" => ["Art", "Creative Arts"],
11
+ "business-teachers" => ["Business Studies", "Business & IT"],
12
+ "dance-teachers" => ["Dance", "Performing Arts", "Creative Arts"],
13
+ "design-technology-teachers" => %w[Technology Engineering],
14
+ "drama-teachers" => ["Drama", "Music & Drama", "Performing Arts", "Creative Arts"],
15
+ "english-teachers" => ["English"],
16
+ "epq-teachers" => [],
17
+ "geography-teachers" => ["Humanities"],
18
+ "guidance-teachers" => [],
19
+ "health-social-care-teachers" => ["Health & Social Care"],
20
+ "history-teachers" => %w[Humanities History],
21
+ "ict-teachers" => ["Computer Science", "Business & IT"],
22
+ "law-teachers" => ["Law"],
23
+ "maths-teachers" => ["Maths"],
24
+ "mfl-teachers" => ["MFL"],
25
+ "music-teachers" => ["Music", "Music & Drama", "Creative Arts"],
26
+ "pe-teachers" => ["PE"],
27
+ "re-life-teachers" => ["Humanities", "Religious Studies"],
28
+ "science-teachers" => ["Science"],
29
+ "social-sciences-teachers" => ["Social Sciences"]
30
30
  }.freeze
31
31
 
32
32
  def self.for_domain(domain, pretend: true)
@@ -34,37 +34,37 @@ module Ogam
34
34
  end
35
35
 
36
36
  def self.for_user(email, pretend: true)
37
- call(User.active_by_email(email), email.split('@').last, pretend: pretend)
37
+ call(User.active_by_email(email), email.split("@").last, pretend: pretend)
38
38
  end
39
39
 
40
40
  def self.groups_for_job_title(job_title, entry, domain)
41
41
  groups_domain = "groups.#{domain}"
42
42
 
43
43
  groups = groups_from_entry(entry, groups_domain)
44
- groups += subject_groups(job_title, groups_domain) if entry['Teaching']
44
+ groups += subject_groups(job_title, groups_domain) if entry["Teaching"]
45
45
 
46
- groups << "heads-of-departments@#{groups_domain}" if entry['Teaching'] && job_title.include?('Head of ')
47
- groups << "principal@#{groups_domain}" if entry['SLT'] && ['Principal', 'Acting Principal'].include?(job_title)
46
+ groups << "heads-of-departments@#{groups_domain}" if entry["Teaching"] && job_title.include?("Head of ")
47
+ groups << "principal@#{groups_domain}" if entry["SLT"] && ["Principal", "Acting Principal"].include?(job_title)
48
48
 
49
- groups << "learning-managers@#{groups_domain}" if job_title.include?('Learning Manager')
50
- groups << "academy-council@#{groups_domain}" if job_title.include?('Academy Council')
51
- groups << 'business-managers@trust-wide.outwood.com' if job_title == 'Business Manager'
49
+ groups << "learning-managers@#{groups_domain}" if job_title.include?("Learning Manager")
50
+ groups << "academy-council@#{groups_domain}" if job_title.include?("Academy Council")
51
+ groups << "business-managers@trust-wide.outwood.com" if job_title == "Business Manager"
52
52
 
53
53
  groups
54
54
  end
55
55
 
56
56
  def self.groups_from_entry(entry, groups_domain)
57
- groups = []
58
- groups << "teaching-staff@#{groups_domain}" if entry['Teaching']
59
- groups << "support-staff@#{groups_domain}" if entry['Support']
60
- if entry['SLT']
57
+ groups = ["all-staff-direct@trust-wide.outwood.com"]
58
+ groups << "teaching-staff@#{groups_domain}" if entry["Teaching"]
59
+ groups << "support-staff@#{groups_domain}" if entry["Support"]
60
+ if entry["SLT"]
61
61
  groups << "slt@#{groups_domain}"
62
62
  groups << "leadership-team@#{groups_domain}"
63
63
  end
64
- groups << 'finance@trust-wide.outwood.com' if entry['Finance']
65
- groups << 'data-exams@trust-wide.outwood.com' if entry['Data and Exams']
66
- groups << 'human-resources@trust-wide.outwood.com' if entry['HR']
67
- groups << 'ict-support@trust-wide.outwood.com' if entry['ICT Support']
64
+ groups << "finance@trust-wide.outwood.com" if entry["Finance"]
65
+ groups << "data-exams@trust-wide.outwood.com" if entry["Data and Exams"]
66
+ groups << "human-resources@trust-wide.outwood.com" if entry["HR"]
67
+ groups << "ict-support@trust-wide.outwood.com" if entry["ICT Support"]
68
68
  groups
69
69
  end
70
70
 
@@ -74,9 +74,9 @@ module Ogam
74
74
  groups = []
75
75
  SUBJECT_MAPPING.each do |group_prefix, subject_words|
76
76
  has_subject =
77
- subject_words.any? do |subject|
77
+ subject_words.any? { |subject|
78
78
  SUBJECT_TEACHER_TITLES.any? { |title| job_title.include? "#{title}#{subject}" }
79
- end
79
+ }
80
80
  next unless has_subject
81
81
 
82
82
  groups << "#{group_prefix}@#{groups_domain}"
@@ -97,7 +97,7 @@ module Ogam
97
97
  end
98
98
 
99
99
  def valid_groups
100
- @valid_groups ||= Group.groups_for_domain("groups.#{domain}") + Group.groups_for_domain('trust-wide.outwood.com')
100
+ @valid_groups ||= Group.groups_for_domain("groups.#{domain}") + Group.groups_for_domain("trust-wide.outwood.com")
101
101
  end
102
102
 
103
103
  def generate_group_assignments
@@ -110,7 +110,7 @@ module Ogam
110
110
 
111
111
  def group_assignments_for_user(user)
112
112
  group_assignments = []
113
- email = user['primaryEmail']
113
+ email = user["primaryEmail"]
114
114
  User.job_titles_for_user(user).each do |job_title|
115
115
  entry = approved_job_titles.fetch(job_title, nil)
116
116
  if entry.nil?
@@ -1,19 +1,19 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- require 'open-uri'
4
- require 'csv'
3
+ require "open-uri"
4
+ require "csv"
5
5
 
6
6
  module Ogam
7
7
  # Allows working with a list of approved job titles
8
8
  class JobTitle
9
9
  static_facade :all
10
10
 
11
- CSV_URL = 'https://docs.google.com/spreadsheets/d/12nl5OBGSmOSsWilzWfflmAHO-8EyfCjVXYLeUDqjB60/export?format=csv&id=12nl5OBGSmOSsWilzWfflmAHO-8EyfCjVXYLeUDqjB60&gid=1604665254'
11
+ CSV_URL = "https://docs.google.com/spreadsheets/d/12nl5OBGSmOSsWilzWfflmAHO-8EyfCjVXYLeUDqjB60/export?format=csv&id=12nl5OBGSmOSsWilzWfflmAHO-8EyfCjVXYLeUDqjB60&gid=1604665254"
12
12
 
13
13
  def self.job_titles(str)
14
14
  return [] if str.blank?
15
15
 
16
- str.split(' / ')
16
+ str.split(" / ")
17
17
  end
18
18
 
19
19
  def all
@@ -23,16 +23,16 @@ module Ogam
23
23
  private
24
24
 
25
25
  def download
26
- puts 'Fetching list of accepted job titles'
26
+ puts "Fetching list of accepted job titles"
27
27
  URI.parse(CSV_URL).read
28
28
  end
29
29
 
30
30
  def parse(str)
31
31
  data = {}
32
32
  CSV.parse(str, headers: true).each do |row|
33
- next if row['Job Title'].blank?
33
+ next if row["Job Title"].blank?
34
34
 
35
- data[row['Job Title']] = entry_for_row(row)
35
+ data[row["Job Title"]] = entry_for_row(row)
36
36
  end
37
37
 
38
38
  data
@@ -40,8 +40,8 @@ module Ogam
40
40
 
41
41
  def entry_for_row(row)
42
42
  entry = {}
43
- (row.headers - ['Job Title']).each do |col|
44
- entry[col] = row[col] == 'TRUE'
43
+ (row.headers - ["Job Title"]).each do |col|
44
+ entry[col] = row[col] == "TRUE"
45
45
  end
46
46
  entry
47
47
  end
@@ -1,14 +1,14 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- require 'open-uri'
4
- require 'csv'
3
+ require "open-uri"
4
+ require "csv"
5
5
 
6
6
  module Ogam
7
7
  # Allows working with a list of approved organisations
8
8
  class Organisation
9
9
  static_facade :all
10
10
 
11
- CSV_URL = 'https://docs.google.com/spreadsheets/d/12nl5OBGSmOSsWilzWfflmAHO-8EyfCjVXYLeUDqjB60/export?format=csv&id=12nl5OBGSmOSsWilzWfflmAHO-8EyfCjVXYLeUDqjB60&gid=46181347'
11
+ CSV_URL = "https://docs.google.com/spreadsheets/d/12nl5OBGSmOSsWilzWfflmAHO-8EyfCjVXYLeUDqjB60/export?format=csv&id=12nl5OBGSmOSsWilzWfflmAHO-8EyfCjVXYLeUDqjB60&gid=46181347"
12
12
 
13
13
  def all
14
14
  @all ||= parse(download)
@@ -17,16 +17,16 @@ module Ogam
17
17
  private
18
18
 
19
19
  def download
20
- puts 'Fetching list of accepted organisations'
20
+ puts "Fetching list of accepted organisations"
21
21
  URI.parse(CSV_URL).read
22
22
  end
23
23
 
24
24
  def parse(str)
25
25
  data = {}
26
26
  CSV.parse(str, headers: true).each do |row|
27
- next if row['Domain'].blank?
27
+ next if row["Domain"].blank?
28
28
 
29
- data[row['Domain'].strip] = row['Organisation Name'].strip
29
+ data[row["Domain"].strip] = row["Organisation Name"].strip
30
30
  end
31
31
 
32
32
  data
@@ -4,11 +4,11 @@ module Ogam
4
4
  # Methods relating to signatures
5
5
  class Signature
6
6
  def self.update_signature_command(user)
7
- email = user.fetch('primaryEmail')
7
+ email = user.fetch("primaryEmail")
8
8
  html = signature_html(
9
- user.fetch('name.fullName', nil),
10
- user.fetch('organizations.0.title', nil),
11
- user.fetch('organizations.0.name', nil)
9
+ user.fetch("name.fullName", nil),
10
+ user.fetch("organizations.0.title", nil),
11
+ user.fetch("organizations.0.name", nil)
12
12
  )
13
13
 
14
14
  "gam user #{email} signature \"#{html}\""
@@ -16,7 +16,7 @@ module Ogam
16
16
 
17
17
  def self.signature_html(name, job_title, organisation)
18
18
  parts = [name, job_title, organisation].reject(&:blank?)
19
- "<p>#{parts.join('<br />')}</p><hr color=#5b3293 />"
19
+ "<p>#{parts.join("<br />")}</p><hr color=#5b3293 />"
20
20
  end
21
21
  end
22
22
  end
@@ -15,7 +15,7 @@ module Ogam
15
15
  end
16
16
 
17
17
  def self.job_titles_for_user(user)
18
- JobTitle.job_titles(user['organizations.0.title'])
18
+ JobTitle.job_titles(user["organizations.0.title"])
19
19
  end
20
20
  end
21
21
  end
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Ogam
4
- VERSION = '1.2.1'
4
+ VERSION = "1.3.0"
5
5
  end
@@ -1,20 +1,20 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- lib = File.expand_path('lib', __dir__)
3
+ lib = File.expand_path("lib", __dir__)
4
4
  $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
5
- require 'ogam/version'
5
+ require "ogam/version"
6
6
 
7
7
  Gem::Specification.new do |spec|
8
- spec.name = 'ogam'
9
- spec.version = Ogam::VERSION
10
- spec.authors = ['Elliot Bowes']
11
- spec.email = ['e.bowes@outwood.com']
8
+ spec.name = "ogam"
9
+ spec.version = Ogam::VERSION
10
+ spec.authors = ["Elliot Bowes"]
11
+ spec.email = ["e.bowes@outwood.com"]
12
12
 
13
- spec.summary = "Wrapper around GAM for common tasks with OGAT's G Suite instance."
13
+ spec.summary = "Wrapper around GAM for common tasks with OGAT's G Suite instance."
14
14
  # spec.description = %q{TODO: Write a longer description or delete this line.}
15
- spec.homepage = 'https://github.com/Outwood/ogam'
16
- spec.metadata['homepage_uri'] = spec.homepage
17
- spec.metadata['source_code_uri'] = 'https://github.com/Outwood/ogam'
15
+ spec.homepage = "https://github.com/Outwood/ogam"
16
+ spec.metadata["homepage_uri"] = spec.homepage
17
+ spec.metadata["source_code_uri"] = "https://github.com/Outwood/ogam"
18
18
 
19
19
  # Specify which files should be added to the gem when it is released.
20
20
  # The `git ls-files -z` loads the files in the RubyGem that have been added into git.
@@ -22,17 +22,17 @@ Gem::Specification.new do |spec|
22
22
  Dir.chdir(File.expand_path(__dir__)) do
23
23
  `git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(test|spec|features)/}) }
24
24
  end
25
- spec.bindir = 'bin'
26
- spec.executables << 'ogam'
27
- spec.require_paths = ['lib']
25
+ spec.bindir = "bin"
26
+ spec.executables << "ogam"
27
+ spec.require_paths = ["lib"]
28
28
 
29
- spec.add_runtime_dependency 'activesupport', '~> 6.0.2'
30
- spec.add_runtime_dependency 'attr_extras', '~> 6.2.3'
31
- spec.add_runtime_dependency 'thor', '~> 1.0.1'
29
+ spec.add_runtime_dependency "activesupport", "~> 6.0.2"
30
+ spec.add_runtime_dependency "attr_extras", "~> 6.2.3"
31
+ spec.add_runtime_dependency "thor", "~> 1.0.1"
32
32
 
33
- spec.add_development_dependency 'bundler', '~> 2.1'
34
- spec.add_development_dependency 'rake', '~> 13.0'
35
- spec.add_development_dependency 'rspec', '~> 3.0'
36
- spec.add_development_dependency 'rubocop-ogat', '~> 1.47.0'
37
- spec.add_development_dependency 'simplecov', '~> 0.18.4'
33
+ spec.add_development_dependency "bundler", "~> 2.1"
34
+ spec.add_development_dependency "rake", "~> 13.0"
35
+ spec.add_development_dependency "rspec", "~> 3.0"
36
+ spec.add_development_dependency "rubocop-ogat", "~> 2.0.1"
37
+ spec.add_development_dependency "simplecov", "~> 0.18.4"
38
38
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ogam
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.2.1
4
+ version: 1.3.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Elliot Bowes
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2020-03-09 00:00:00.000000000 Z
11
+ date: 2020-04-27 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activesupport
@@ -100,14 +100,14 @@ dependencies:
100
100
  requirements:
101
101
  - - "~>"
102
102
  - !ruby/object:Gem::Version
103
- version: 1.47.0
103
+ version: 2.0.1
104
104
  type: :development
105
105
  prerelease: false
106
106
  version_requirements: !ruby/object:Gem::Requirement
107
107
  requirements:
108
108
  - - "~>"
109
109
  - !ruby/object:Gem::Version
110
- version: 1.47.0
110
+ version: 2.0.1
111
111
  - !ruby/object:Gem::Dependency
112
112
  name: simplecov
113
113
  requirement: !ruby/object:Gem::Requirement
@@ -133,7 +133,6 @@ files:
133
133
  - ".gitignore"
134
134
  - ".rspec"
135
135
  - ".rubocop.yml"
136
- - ".rubocop_metrics_todo.yml"
137
136
  - ".rubocop_todo.yml"
138
137
  - ".ruby-version"
139
138
  - ".travis.yml"
@@ -1,59 +0,0 @@
1
- Metrics/AbcSize:
2
- Exclude:
3
- - db/**/*
4
- - spec/**/*
5
- - config/routes.rb
6
- - lib/ogam/group_assigner.rb
7
-
8
- Metrics/BlockLength:
9
- Exclude:
10
- - db/**/*
11
- - spec/**/*
12
- - config/routes.rb
13
-
14
- Metrics/BlockNesting:
15
- Exclude:
16
- - db/**/*
17
- - spec/**/*
18
- - config/routes.rb
19
-
20
- Metrics/ClassLength:
21
- Exclude:
22
- - db/**/*
23
- - spec/**/*
24
- - config/routes.rb
25
- - lib/ogam/group_assigner.rb
26
-
27
- Metrics/CyclomaticComplexity:
28
- Exclude:
29
- - db/**/*
30
- - spec/**/*
31
- - config/routes.rb
32
- - lib/ogam/group_assigner.rb
33
-
34
- Metrics/MethodLength:
35
- Exclude:
36
- - db/**/*
37
- - spec/**/*
38
- - config/routes.rb
39
- - lib/ogam/group_assigner.rb
40
-
41
- Metrics/ModuleLength:
42
- Exclude:
43
- - db/**/*
44
- - spec/**/*
45
- - config/routes.rb
46
-
47
- Metrics/ParameterLists:
48
- Exclude:
49
- - db/**/*
50
- - spec/**/*
51
- - config/routes.rb
52
-
53
- Metrics/PerceivedComplexity:
54
- Exclude:
55
- - db/**/*
56
- - spec/**/*
57
- - config/routes.rb
58
- - lib/ogam/group_assigner.rb
59
-