okta-terraform-generator 0.1.1 → 0.1.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 5dde92813729b82cfc384cc31546bcdea4ee8b4f164d7677f1d14547f0398b53
4
- data.tar.gz: 135e23f9790529c46511f9139ad73ec1421daccad07008fe251d8ffc0ca24aa8
3
+ metadata.gz: 489381a58a9b430ccf19a8405f78648d41feff3f395193b6b60bd2b10209699e
4
+ data.tar.gz: 34c8903e835a1ad4ee21805370020f3191bffd53ad71616a6a9e48c6dfc5876e
5
5
  SHA512:
6
- metadata.gz: 57cd4b06c7f2b252c4a7c3cdf9305c0fe368b7d57c9a1c7845082c7717d0a1a04bcfa14564a2a6f9f52f7208f3763988db096b9fd187ec2907ced36d3425dd8b
7
- data.tar.gz: 9814108190b3a1ec30966d3083a1438f3f624212c9a9bf35a65143e191105fea15ca29f1ecf5f37f0faf8d5b5b5bbd4780e272197cf20b00bf46cebf86b03b9d
6
+ metadata.gz: 55c293adb0498fb6c0928515920e26e978c037dbb40585ac2a6481d2ba9f72db18712004d4325a3ba834507d50eb18c1fab0d719199c08c377511bf79e0d8270
7
+ data.tar.gz: 450b8f6db62a88fcca704300d304bd0619381a445361a4f84978b1c75a9c0ad0e3ed0e0255ae7360fd955ed098c2bfe950fe727a29b8876359486be2d9f65c19
@@ -1,10 +1,12 @@
1
1
  Metrics/AbcSize:
2
2
  Max: 20
3
3
  Metrics/BlockLength:
4
- Max: 81
4
+ Enabled: false
5
5
  Metrics/LineLength:
6
6
  Max: 152
7
7
  Naming/FileName:
8
8
  Enabled: false
9
9
  Style/Documentation:
10
10
  Enabled: false
11
+ Style/GlobalVars:
12
+ Enabled: false
@@ -4,6 +4,10 @@ All notable changes to this project will be documented in this file.
4
4
 
5
5
  The format is based on [Keep a Changelog](http://keepachangelog.com/) and this project adheres to [Semantic Versioning](http://semver.org/).
6
6
 
7
+ ## 0.1.2 (2018-07-11)
8
+
9
+ Added `--treat-suspended-as-active` option to prevent removing resources that have been temporarily suspended.
10
+
7
11
  ## 0.1.1 (2018-07-06)
8
12
 
9
13
  Fixed bug that removes users that had a state of `LOCKED_OUT`, `PASSWORD_EXPIRED` or `RECOVERY`; these users still exist and should not be ignored.
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- okta-terraform-generator (0.1.0)
4
+ okta-terraform-generator (0.1.1)
5
5
  facets (~> 3.1)
6
6
  mixlib-cli (~> 1.7)
7
7
  octokit (~> 4.0)
@@ -18,9 +18,9 @@ GEM
18
18
  safe_yaml (~> 1.0.0)
19
19
  diff-lcs (1.3)
20
20
  facets (3.1.0)
21
- faraday (0.15.0)
21
+ faraday (0.15.2)
22
22
  multipart-post (>= 1.2, < 3)
23
- ffi (1.9.23)
23
+ ffi (1.9.25)
24
24
  formatador (0.2.5)
25
25
  guard (2.14.2)
26
26
  formatador (>= 0.2.4)
@@ -37,6 +37,7 @@ GEM
37
37
  guard-compat (~> 1.1)
38
38
  rspec (>= 2.99.0, < 4.0)
39
39
  hashdiff (0.3.7)
40
+ jaro_winkler (1.5.1)
40
41
  listen (3.1.5)
41
42
  rb-fsevent (~> 0.9, >= 0.9.4)
42
43
  rb-inotify (~> 0.9, >= 0.9.7)
@@ -56,9 +57,9 @@ GEM
56
57
  oktakit (0.2.0)
57
58
  sawyer (~> 0.8.1)
58
59
  parallel (1.12.1)
59
- parser (2.5.1.0)
60
+ parser (2.5.1.2)
60
61
  ast (~> 2.4.0)
61
- powerpack (0.1.1)
62
+ powerpack (0.1.2)
62
63
  pry (0.11.3)
63
64
  coderay (~> 1.1.0)
64
65
  method_source (~> 0.9.0)
@@ -88,9 +89,10 @@ GEM
88
89
  diff-lcs (>= 1.2.0, < 2.0)
89
90
  rspec-support (~> 3.7.0)
90
91
  rspec-support (3.7.1)
91
- rubocop (0.55.0)
92
+ rubocop (0.58.1)
93
+ jaro_winkler (~> 1.5.1)
92
94
  parallel (~> 1.10)
93
- parser (>= 2.5)
95
+ parser (>= 2.5, != 2.5.1.1)
94
96
  powerpack (~> 0.1)
95
97
  rainbow (>= 2.2.2, < 4.0)
96
98
  ruby-progressbar (~> 1.7)
@@ -104,9 +106,9 @@ GEM
104
106
  shellany (0.0.1)
105
107
  terminal-notifier-guard (1.7.0)
106
108
  thor (0.20.0)
107
- unicode-display_width (1.3.2)
109
+ unicode-display_width (1.4.0)
108
110
  vcr (4.0.0)
109
- webmock (3.4.1)
111
+ webmock (3.4.2)
110
112
  addressable (>= 2.3.6)
111
113
  crack (>= 0.3.2)
112
114
  hashdiff
data/README.md CHANGED
@@ -38,6 +38,7 @@ Options:
38
38
  -g OKTA_GITHUB_USER_GROUP, Specifies the Okta group containing GitHub users (can be a comma separated list) (required)
39
39
  --okta-github-user-group
40
40
  -t, --okta-token OKTA_TOKEN Specifies the Okta API token (required)
41
+ --treat-suspended-as-active Treat suspended users as active
41
42
  ```
42
43
 
43
44
  ## Contributing
@@ -16,5 +16,5 @@
16
16
  #
17
17
 
18
18
  module OktaTerraformGenerator
19
- VERSION = '0.1.1'.freeze
19
+ VERSION = '0.1.2'.freeze
20
20
  end
@@ -61,6 +61,12 @@ module OktaTerraformGenerator
61
61
  description: 'Specifies the Okta API token',
62
62
  required: true
63
63
 
64
+ option :treat_suspended_as_active,
65
+ long: '--treat-suspended-as-active',
66
+ boolean: true,
67
+ description: 'Treat suspended users as active',
68
+ proc: proc { |treat_suspended_as_active| $treat_suspended_as_active = true if treat_suspended_as_active }
69
+
64
70
  def run(argv = ARGV.dup)
65
71
  if argv.size == 1
66
72
  print_usage
@@ -22,11 +22,13 @@ module Oktakit
22
22
  module ExtendedGroups
23
23
  include Oktakit::Client::Groups
24
24
 
25
- VALID_STATUSES = %w[ACTIVE LOCKED_OUT PASSWORD_EXPIRED RECOVERY].freeze
25
+ ACTIVE_STATUSES = %w[ACTIVE LOCKED_OUT PASSWORD_EXPIRED RECOVERY].freeze
26
26
 
27
27
  def list_active_group_members(group_id)
28
28
  list_group_members(group_id).shift.select do |user|
29
- VALID_STATUSES.include?(user.status)
29
+ active_statuses = ACTIVE_STATUSES.dup
30
+ active_statuses.push('SUSPENDED') if $treat_suspended_as_active
31
+ active_statuses.include?(user.status)
30
32
  end
31
33
  end
32
34
 
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: okta-terraform-generator
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.1
4
+ version: 0.1.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Stephen Hoekstra
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2018-07-06 00:00:00.000000000 Z
11
+ date: 2018-07-11 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: facets