ogam 1.0.0 → 1.1.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: d4a72e5717ef8b802f79499f53fb603ddc9ba61dbd06fa166c9a3045d877b748
4
- data.tar.gz: d4cf4b93af132811e4a6ba058e0440ddc60115a414a7c967bb96c0a34363ffbd
3
+ metadata.gz: 01aa2307589a72f9316e069ea9d7980dccc74c52c2cc8deb87d5eea2a71da94f
4
+ data.tar.gz: fa83f2d5035bceae5b3f9d389f6b4ec9ccc65eb5d40316a0ee13d3b97dea3e94
5
5
  SHA512:
6
- metadata.gz: d4443a1c829534b5ebea13518d00e8d7d1b66dd8cfb2a2b095bbec52478392ac9f09cb8fc0d240482dfaa202e04ef210149e310ecc3a65316be51960a72440bf
7
- data.tar.gz: 93d3527909a5d33d90f66cb70dcd170622ae9a947294548552431052005e3e2cd66235d6930cbe6e4e5f57a02952f09baa36cb9c3804bdad5672dcb42d0d986c
6
+ metadata.gz: 8e55ca322c7c97c468a810ead4bd530d034a29151cb0a02b15923fcf658173f331124b26cae58e0271709bae70c6ef6f69e0b35385365e60abb2a87c62aaefdc
7
+ data.tar.gz: 3e8a1f8844d692da9093da34ac1a28c4bf82182df32ba8406ddcbd381c203490aa07d98ddb10055fef3148072fe1982453d73e08be3f15c4271dceeb8f987cf3
data/.gitignore CHANGED
@@ -9,3 +9,5 @@
9
9
 
10
10
  # rspec failure tracking
11
11
  .rspec_status
12
+
13
+ Gemfile.lock
data/.travis.yml CHANGED
@@ -3,6 +3,8 @@ language: ruby
3
3
  cache: bundler
4
4
  rvm:
5
5
  - 2.6.5
6
+ before_install:
7
+ - gem install bundler -v '~> 2.1'
6
8
  before_script:
7
9
  - curl -L https://codeclimate.com/downloads/test-reporter/test-reporter-latest-linux-amd64
8
10
  > ./cc-test-reporter
data/bin/ogam CHANGED
@@ -57,6 +57,11 @@ class CLI < Thor
57
57
  Ogam::Execute.single(Ogam::Group.create_shared_mailbox_command(email, name), pretend: options[:pretend])
58
58
  end
59
59
 
60
+ desc('create_exec_mailbox EMAIL NAME', 'Create an Exec mailbox')
61
+ def create_exec_mailbox(email, name)
62
+ Ogam::Execute.single(Ogam::Group.create_exec_mailbox_command(email, name), pretend: options[:pretend])
63
+ end
64
+
60
65
  option :moderated, type: :boolean, default: false
61
66
  desc('create_group EMAIL NAME [--moderated]', 'Create a distribution list group, optionally moderated')
62
67
  def create_group(email, name)
data/lib/ogam/group.rb CHANGED
@@ -14,7 +14,13 @@ module Ogam
14
14
 
15
15
  def self.create_shared_mailbox_command(email_address, name)
16
16
  <<~COMMAND
17
- 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 true members_can_post_as_the_group false allow_web_posting true send_message_deny_notification false reply_to reply_to_ignore message_moderation_level moderate_none who_can_contact_owner all_in_domain_can_contact who_can_leave_group all_members_can_leave who_can_add all_managers_can_add who_can_post_message anyone_can_post who_can_invite all_managers_can_invite who_can_view_group all_members_can_view show_in_group_directory true archive_only false spam_moderation_level moderate
17
+ 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 true members_can_post_as_the_group true allow_web_posting true send_message_deny_notification false reply_to reply_to_ignore message_moderation_level moderate_none who_can_contact_owner all_in_domain_can_contact who_can_leave_group all_members_can_leave who_can_add all_managers_can_add who_can_post_message anyone_can_post who_can_invite all_managers_can_invite who_can_view_group all_members_can_view show_in_group_directory false archive_only false spam_moderation_level moderate enable_collaborative_inbox true who_can_assist_content all_members
18
+ COMMAND
19
+ end
20
+
21
+ def self.create_exec_mailbox_command(email_address, name)
22
+ <<~COMMAND
23
+ 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 true members_can_post_as_the_group true allow_web_posting true send_message_deny_notification false reply_to reply_to_ignore message_moderation_level moderate_none who_can_contact_owner all_members_can_contact who_can_leave_group none_can_leave who_can_add all_managers_can_add who_can_post_message anyone_can_post who_can_invite all_managers_can_invite who_can_view_group all_members_can_view show_in_group_directory false archive_only false spam_moderation_level moderate include_in_global_address_list true who_can_discover_group all_members_can_discover enable_collaborative_inbox true who_can_assist_content all_members
18
24
  COMMAND
19
25
  end
20
26
 
@@ -9,8 +9,8 @@ module Ogam
9
9
  SUBJECT_MAPPING = {
10
10
  'art-teachers' => ['Art'],
11
11
  'business-teachers' => ['Business Studies'],
12
- 'dance-teachers' => ['Performing Arts'],
13
- 'design-technology-teachers' => ['Technology'],
12
+ 'dance-teachers' => ['Dance', 'Performing Arts'],
13
+ 'design-technology-teachers' => %w[Technology Engineering],
14
14
  'drama-teachers' => ['Drama', 'Music & Drama', 'Performing Arts'],
15
15
  'english-teachers' => ['English'],
16
16
  'epq-teachers' => [],
@@ -24,7 +24,7 @@ module Ogam
24
24
  'mfl-teachers' => ['MFL'],
25
25
  'music-teachers' => ['Music', 'Music & Drama'],
26
26
  'pe-teachers' => ['PE'],
27
- 're-life-teachers' => ['Humanities'],
27
+ 're-life-teachers' => ['Humanities', 'Religious Studies'],
28
28
  'science-teachers' => ['Science'],
29
29
  'social-sciences-teachers' => ['Social Sciences']
30
30
  }.freeze
@@ -75,7 +75,7 @@ module Ogam
75
75
  SUBJECT_MAPPING.each do |group_prefix, subject_words|
76
76
  has_subject =
77
77
  subject_words.any? do |subject|
78
- SUBJECT_TEACHER_TITLES.any? { |title| job_title.ends_with? "#{title}#{subject}" }
78
+ SUBJECT_TEACHER_TITLES.any? { |title| job_title.include? "#{title}#{subject}" }
79
79
  end
80
80
  next unless has_subject
81
81
 
data/lib/ogam/version.rb CHANGED
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Ogam
4
- VERSION = '1.0.0'
4
+ VERSION = '1.1.0'
5
5
  end
data/ogam.gemspec CHANGED
@@ -34,5 +34,5 @@ Gem::Specification.new do |spec|
34
34
  spec.add_development_dependency 'rake', '~> 13.0'
35
35
  spec.add_development_dependency 'rspec', '~> 3.0'
36
36
  spec.add_development_dependency 'rubocop-ogat', '~> 1.47.0'
37
- spec.add_development_dependency 'simplecov', '~> 0.17.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.0.0
4
+ version: 1.1.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-02-20 00:00:00.000000000 Z
11
+ date: 2020-02-27 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activesupport
@@ -114,14 +114,14 @@ dependencies:
114
114
  requirements:
115
115
  - - "~>"
116
116
  - !ruby/object:Gem::Version
117
- version: 0.17.1
117
+ version: 0.18.4
118
118
  type: :development
119
119
  prerelease: false
120
120
  version_requirements: !ruby/object:Gem::Requirement
121
121
  requirements:
122
122
  - - "~>"
123
123
  - !ruby/object:Gem::Version
124
- version: 0.17.1
124
+ version: 0.18.4
125
125
  description:
126
126
  email:
127
127
  - e.bowes@outwood.com
@@ -138,7 +138,6 @@ files:
138
138
  - ".ruby-version"
139
139
  - ".travis.yml"
140
140
  - Gemfile
141
- - Gemfile.lock
142
141
  - README.md
143
142
  - Rakefile
144
143
  - bin/console
data/Gemfile.lock DELETED
@@ -1,93 +0,0 @@
1
- PATH
2
- remote: .
3
- specs:
4
- ogam (1.0.0)
5
- activesupport (~> 6.0.2)
6
- attr_extras (~> 6.2.3)
7
- thor (~> 1.0.1)
8
-
9
- GEM
10
- remote: https://rubygems.org/
11
- specs:
12
- activesupport (6.0.2.1)
13
- concurrent-ruby (~> 1.0, >= 1.0.2)
14
- i18n (>= 0.7, < 2)
15
- minitest (~> 5.1)
16
- tzinfo (~> 1.1)
17
- zeitwerk (~> 2.2)
18
- ast (2.4.0)
19
- attr_extras (6.2.3)
20
- concurrent-ruby (1.1.6)
21
- diff-lcs (1.3)
22
- docile (1.3.2)
23
- i18n (1.8.2)
24
- concurrent-ruby (~> 1.0)
25
- jaro_winkler (1.5.4)
26
- json (2.3.0)
27
- minitest (5.14.0)
28
- parallel (1.19.1)
29
- parser (2.7.0.2)
30
- ast (~> 2.4.0)
31
- rack (2.2.2)
32
- rainbow (3.0.0)
33
- rake (13.0.1)
34
- rexml (3.2.4)
35
- rspec (3.9.0)
36
- rspec-core (~> 3.9.0)
37
- rspec-expectations (~> 3.9.0)
38
- rspec-mocks (~> 3.9.0)
39
- rspec-core (3.9.1)
40
- rspec-support (~> 3.9.1)
41
- rspec-expectations (3.9.0)
42
- diff-lcs (>= 1.2.0, < 2.0)
43
- rspec-support (~> 3.9.0)
44
- rspec-mocks (3.9.1)
45
- diff-lcs (>= 1.2.0, < 2.0)
46
- rspec-support (~> 3.9.0)
47
- rspec-support (3.9.2)
48
- rubocop (0.80.0)
49
- jaro_winkler (~> 1.5.1)
50
- parallel (~> 1.10)
51
- parser (>= 2.7.0.1)
52
- rainbow (>= 2.2.2, < 4.0)
53
- rexml
54
- ruby-progressbar (~> 1.7)
55
- unicode-display_width (>= 1.4.0, < 1.7)
56
- rubocop-ogat (1.47.0)
57
- rubocop (= 0.80.0)
58
- rubocop-performance (= 1.5.2)
59
- rubocop-rails (= 2.4.2)
60
- rubocop-rspec (= 1.38.1)
61
- rubocop-performance (1.5.2)
62
- rubocop (>= 0.71.0)
63
- rubocop-rails (2.4.2)
64
- rack (>= 1.1)
65
- rubocop (>= 0.72.0)
66
- rubocop-rspec (1.38.1)
67
- rubocop (>= 0.68.1)
68
- ruby-progressbar (1.10.1)
69
- simplecov (0.17.1)
70
- docile (~> 1.1)
71
- json (>= 1.8, < 3)
72
- simplecov-html (~> 0.10.0)
73
- simplecov-html (0.10.2)
74
- thor (1.0.1)
75
- thread_safe (0.3.6)
76
- tzinfo (1.2.6)
77
- thread_safe (~> 0.1)
78
- unicode-display_width (1.6.1)
79
- zeitwerk (2.2.2)
80
-
81
- PLATFORMS
82
- ruby
83
-
84
- DEPENDENCIES
85
- bundler (~> 2.1)
86
- ogam!
87
- rake (~> 13.0)
88
- rspec (~> 3.0)
89
- rubocop-ogat (~> 1.47.0)
90
- simplecov (~> 0.17.1)
91
-
92
- BUNDLED WITH
93
- 2.1.4