lex-tfe 0.1.0 → 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: 70b7f70e681039dbaccf9544ca6a99eba1506c8918fb3b01245e4d4c6e7e971e
4
- data.tar.gz: 44fac6f7f48a727df2d5d416b62c7f2572216434817560d0db75d9d323ba4084
3
+ metadata.gz: a2a8b21d8cdcf663bb47da120544bb293ceb1aaf92b113722e143f255174eb7f
4
+ data.tar.gz: 6bc758b7f1410e3b339d97e1d77d88a0daca6277cee2529ec9904539d8dd237d
5
5
  SHA512:
6
- metadata.gz: 618c76447a6b4091b56c77c85ee47c4c651239bdc242fef20d6d0eb01b60170e876ceb07c5d4d3149d5effdaebf72c9db140e883fc733936699322876dbac559
7
- data.tar.gz: 8486d8c5fae9938417fbde075d0153fbb0633087f9cf1f45586039a8ed805e006de90167ba761958f78f75d31052899a63c9979efcfb9b91fbe9ada6b60eb07e
6
+ metadata.gz: 40c50913a26b2f4abe7ca233f5e50995f228ba50a86f5fc6024c4366e12db31cc9b5ba512ebe8a089a74aefa9aefd1246739f83ff8481cee53cba974427f9063
7
+ data.tar.gz: 9d081989abf90703a757951fb506136f91b59e86cd9b22ff0dc6a9cf9e9096eeace07ed59ec7379e66d3c35fff36d46eceb2ce78b025d077d4d417ae981b7f07
@@ -0,0 +1,7 @@
1
+ # Auto-generated from team-config.yml
2
+ # Team: extensions
3
+ #
4
+ # To apply: scripts/apply-codeowners.sh lex-tfe
5
+
6
+ * @LegionIO/maintainers
7
+ * @LegionIO/extensions
@@ -0,0 +1,18 @@
1
+ version: 2
2
+ updates:
3
+ - package-ecosystem: bundler
4
+ directory: /
5
+ schedule:
6
+ interval: weekly
7
+ day: monday
8
+ open-pull-requests-limit: 5
9
+ labels:
10
+ - "type:dependencies"
11
+ - package-ecosystem: github-actions
12
+ directory: /
13
+ schedule:
14
+ interval: weekly
15
+ day: monday
16
+ open-pull-requests-limit: 5
17
+ labels:
18
+ - "type:dependencies"
@@ -3,13 +3,31 @@ on:
3
3
  push:
4
4
  branches: [main]
5
5
  pull_request:
6
+ schedule:
7
+ - cron: '0 9 * * 1'
6
8
 
7
9
  jobs:
8
10
  ci:
9
11
  uses: LegionIO/.github/.github/workflows/ci.yml@main
10
12
 
13
+ excluded-files:
14
+ uses: LegionIO/.github/.github/workflows/excluded-files.yml@main
15
+
16
+ security:
17
+ uses: LegionIO/.github/.github/workflows/security-scan.yml@main
18
+
19
+ version-changelog:
20
+ uses: LegionIO/.github/.github/workflows/version-changelog.yml@main
21
+
22
+ dependency-review:
23
+ uses: LegionIO/.github/.github/workflows/dependency-review.yml@main
24
+
25
+ stale:
26
+ if: github.event_name == 'schedule'
27
+ uses: LegionIO/.github/.github/workflows/stale.yml@main
28
+
11
29
  release:
12
- needs: ci
30
+ needs: [ci, excluded-files]
13
31
  if: github.event_name == 'push' && github.ref == 'refs/heads/main'
14
32
  uses: LegionIO/.github/.github/workflows/release.yml@main
15
33
  secrets:
data/.gitignore ADDED
@@ -0,0 +1 @@
1
+ Gemfile.lock
data/.rubocop.yml CHANGED
@@ -1,57 +1,2 @@
1
- AllCops:
2
- TargetRubyVersion: 3.4
3
- NewCops: enable
4
- SuggestExtensions: false
5
-
6
- Layout/LineLength:
7
- Max: 160
8
-
9
- Layout/SpaceAroundEqualsInParameterDefault:
10
- EnforcedStyle: space
11
-
12
- Layout/HashAlignment:
13
- EnforcedHashRocketStyle: table
14
- EnforcedColonStyle: table
15
-
16
- Metrics/MethodLength:
17
- Max: 50
18
-
19
- Metrics/ClassLength:
20
- Max: 1500
21
-
22
- Metrics/ModuleLength:
23
- Max: 1500
24
-
25
- Metrics/BlockLength:
26
- Max: 40
27
- Exclude:
28
- - 'spec/**/*'
29
-
30
- Metrics/ParameterLists:
31
- Max: 8
32
-
33
- Metrics/AbcSize:
34
- Max: 60
35
-
36
- Metrics/CyclomaticComplexity:
37
- Max: 15
38
-
39
- Metrics/PerceivedComplexity:
40
- Max: 17
41
-
42
- Style/Documentation:
43
- Enabled: false
44
-
45
- Style/SymbolArray:
46
- Enabled: true
47
-
48
- Style/FrozenStringLiteralComment:
49
- Enabled: true
50
- EnforcedStyle: always
51
-
52
- Naming/FileName:
53
- Enabled: false
54
-
55
- Naming/MethodParameterName:
56
- AllowedNames:
57
- - id
1
+ inherit_gem:
2
+ rubocop-legion: config/lex.yml
data/CHANGELOG.md CHANGED
@@ -1,5 +1,16 @@
1
1
  # Changelog
2
2
 
3
+ ## [0.1.2] - 2026-03-30
4
+
5
+ ### Changed
6
+ - update to rubocop-legion 0.1.7, resolve all offenses
7
+
8
+ ## [0.1.1]
9
+
10
+ ### Changed
11
+ - Add legion-cache, legion-crypt, legion-data, legion-json, legion-logging, legion-settings, legion-transport as runtime dependencies
12
+ - Update spec_helper to require sub-gem helpers before loading extension
13
+
3
14
  ## [0.1.0]
4
15
 
5
16
  ### Added
data/CLAUDE.md ADDED
@@ -0,0 +1,102 @@
1
+ # lex-tfe: Terraform Enterprise / HCP Terraform Integration for LegionIO
2
+
3
+ **Repository Level 3 Documentation**
4
+ - **Parent (Level 2)**: `/Users/miverso2/rubymine/legion/extensions/CLAUDE.md`
5
+ - **Parent (Level 1)**: `/Users/miverso2/rubymine/legion/CLAUDE.md`
6
+
7
+ ## Purpose
8
+
9
+ Legion Extension that connects LegionIO to Terraform Enterprise (TFE) and HCP Terraform. Provides runners for managing workspaces, runs, plans, applies, variables, variable sets, projects, organizations, state versions, and policy sets via the TFE REST API v2.
10
+
11
+ **GitHub**: https://github.com/LegionIO/lex-tfe
12
+ **License**: MIT
13
+ **Version**: 0.1.1
14
+
15
+ ## Architecture
16
+
17
+ ```
18
+ Legion::Extensions::Tfe
19
+ ├── Runners/
20
+ │ ├── Workspaces # list, get, create, update, delete, lock, unlock
21
+ │ ├── Runs # list_runs, get_run, create_run, apply_run, discard_run, cancel_run
22
+ │ ├── Plans # get_plan, get_plan_json_output, get_plan_log
23
+ │ ├── Applies # get_apply, get_apply_log
24
+ │ ├── Variables # list_variables, create_variable, update_variable, delete_variable
25
+ │ ├── VariableSets # list_variable_sets, get_variable_set, create_variable_set, update_variable_set,
26
+ │ │ # delete_variable_set, list_varset_variables, add_varset_variable
27
+ │ ├── Projects # list_projects, get_project, create_project, update_project, delete_project
28
+ │ ├── Organizations # list_organizations, get_organization
29
+ │ ├── StateVersions # list_state_versions, get_state_version, get_current_state_version
30
+ │ └── PolicySets # list_policy_sets, get_policy_set, list_workspace_policy_sets
31
+ ├── Helpers/
32
+ │ └── Client # Faraday connection builder (Bearer token auth)
33
+ ├── Errors # ReadOnlyError raised on write ops when read_only: true
34
+ └── Client # Standalone client class (includes all runners)
35
+ ```
36
+
37
+ ## Key Files
38
+
39
+ | Path | Purpose |
40
+ |------|---------|
41
+ | `lib/legion/extensions/tfe.rb` | Entry point, extension registration |
42
+ | `lib/legion/extensions/tfe/version.rb` | Version constant (0.1.0) |
43
+ | `lib/legion/extensions/tfe/helpers/client.rb` | Faraday connection builder with Bearer token auth |
44
+ | `lib/legion/extensions/tfe/errors.rb` | `ReadOnlyError` for read-only guard |
45
+ | `lib/legion/extensions/tfe/client.rb` | Standalone `Client` class |
46
+ | `lib/legion/extensions/tfe/runners/workspaces.rb` | Workspace CRUD + lock/unlock |
47
+ | `lib/legion/extensions/tfe/runners/runs.rb` | Run lifecycle management |
48
+ | `lib/legion/extensions/tfe/runners/plans.rb` | Plan retrieval and log streaming |
49
+ | `lib/legion/extensions/tfe/runners/applies.rb` | Apply retrieval and log streaming |
50
+ | `lib/legion/extensions/tfe/runners/variables.rb` | Workspace variable management |
51
+ | `lib/legion/extensions/tfe/runners/variable_sets.rb` | Variable set management |
52
+ | `lib/legion/extensions/tfe/runners/projects.rb` | Project CRUD |
53
+ | `lib/legion/extensions/tfe/runners/organizations.rb` | Organization list/get |
54
+ | `lib/legion/extensions/tfe/runners/state_versions.rb` | State version retrieval |
55
+ | `lib/legion/extensions/tfe/runners/policy_sets.rb` | Policy set list/get |
56
+
57
+ ## Connection
58
+
59
+ `Helpers::Client` builds a Faraday connection with `Authorization: Bearer <token>` header. The `url:` parameter accepts any TFE instance base URL (defaults to `https://app.terraform.io`). Supports both HCP Terraform SaaS and self-hosted TFE.
60
+
61
+ Common target URLs:
62
+ - `https://app.terraform.io` — HCP Terraform (SaaS)
63
+ - `https://terraform.uhg.com` — UHG app team TFE cluster
64
+ - `https://tfe-arc.uhg.com` — UHG Grid platform TFE cluster
65
+
66
+ ## Read-Only Guard
67
+
68
+ Each runner method that performs a write operation (create, update, delete, lock, unlock, apply, discard, cancel) accepts a `read_only:` boolean kwarg and raises `Legion::Extensions::Tfe::ReadOnlyError` before making any API call when it is `true`. The standalone `Client` class stores `read_only:` in `@opts` and forwards it automatically to all runner methods via `connection(**override)`.
69
+
70
+ ## Settings Reference
71
+
72
+ ```json
73
+ {
74
+ "extensions": {
75
+ "tfe": {
76
+ "url": "https://app.terraform.io",
77
+ "token": "vault://secret/tfe/api_token#value",
78
+ "read_only": false
79
+ }
80
+ }
81
+ }
82
+ ```
83
+
84
+ ## Dependencies
85
+
86
+ | Gem | Purpose |
87
+ |-----|---------|
88
+ | `faraday` (>= 2.0) | HTTP client for TFE REST API v2 |
89
+
90
+ ## Testing
91
+
92
+ 72 specs across 5 spec files.
93
+
94
+ ```bash
95
+ bundle install
96
+ bundle exec rspec
97
+ bundle exec rubocop
98
+ ```
99
+
100
+ ---
101
+
102
+ **Maintained By**: Matthew Iverson (@Esity)
data/Gemfile CHANGED
@@ -8,5 +8,6 @@ group :test do
8
8
  gem 'rspec'
9
9
  gem 'rspec_junit_formatter'
10
10
  gem 'rubocop'
11
+ gem 'rubocop-legion', '~> 0.1'
11
12
  gem 'simplecov'
12
13
  end
data/LICENSE CHANGED
@@ -1,21 +1,201 @@
1
- MIT License
2
-
3
- Copyright (c) 2026 Matthew Iverson
4
-
5
- Permission is hereby granted, free of charge, to any person obtaining a copy
6
- of this software and associated documentation files (the "Software"), to deal
7
- in the Software without restriction, including without limitation the rights
8
- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
- copies of the Software, and to permit persons to whom the Software is
10
- furnished to do so, subject to the following conditions:
11
-
12
- The above copyright notice and this permission notice shall be included in all
13
- copies or substantial portions of the Software.
14
-
15
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
- SOFTWARE.
1
+ Apache License
2
+ Version 2.0, January 2004
3
+ http://www.apache.org/licenses/
4
+
5
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
6
+
7
+ 1. Definitions.
8
+
9
+ "License" shall mean the terms and conditions for use, reproduction,
10
+ and distribution as defined by Sections 1 through 9 of this document.
11
+
12
+ "Licensor" shall mean the copyright owner or entity authorized by
13
+ the copyright owner that is granting the License.
14
+
15
+ "Legal Entity" shall mean the union of the acting entity and all
16
+ other entities that control, are controlled by, or are under common
17
+ control with that entity. For the purposes of this definition,
18
+ "control" means (i) the power, direct or indirect, to cause the
19
+ direction or management of such entity, whether by contract or
20
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
21
+ outstanding shares, or (iii) beneficial ownership of such entity.
22
+
23
+ "You" (or "Your") shall mean an individual or Legal Entity
24
+ exercising permissions granted by this License.
25
+
26
+ "Source" form shall mean the preferred form for making modifications,
27
+ including but not limited to software source code, documentation
28
+ source, and configuration files.
29
+
30
+ "Object" form shall mean any form resulting from mechanical
31
+ transformation or translation of a Source form, including but
32
+ not limited to compiled object code, generated documentation,
33
+ and conversions to other media types.
34
+
35
+ "Work" shall mean the work of authorship, whether in Source or
36
+ Object form, made available under the License, as indicated by a
37
+ copyright notice that is included in or attached to the work
38
+ (an example is provided in the Appendix below).
39
+
40
+ "Derivative Works" shall mean any work, whether in Source or Object
41
+ form, that is based on (or derived from) the Work and for which the
42
+ editorial revisions, annotations, elaborations, or other modifications
43
+ represent, as a whole, an original work of authorship. For the purposes
44
+ of this License, Derivative Works shall not include works that remain
45
+ separable from, or merely link (or bind by name) to the interfaces of,
46
+ the Work and Derivative Works thereof.
47
+
48
+ "Contribution" shall mean any work of authorship, including
49
+ the original version of the Work and any modifications or additions
50
+ to that Work or Derivative Works thereof, that is intentionally
51
+ submitted to Licensor for inclusion in the Work by the copyright owner
52
+ or by an individual or Legal Entity authorized to submit on behalf of
53
+ the copyright owner. For the purposes of this definition, "submitted"
54
+ means any form of electronic, verbal, or written communication sent
55
+ to the Licensor or its representatives, including but not limited to
56
+ communication on electronic mailing lists, source code control systems,
57
+ and issue tracking systems that are managed by, or on behalf of, the
58
+ Licensor for the purpose of discussing and improving the Work, but
59
+ excluding communication that is conspicuously marked or otherwise
60
+ designated in writing by the copyright owner as "Not a Contribution."
61
+
62
+ "Contributor" shall mean Licensor and any individual or Legal Entity
63
+ on behalf of whom a Contribution has been received by Licensor and
64
+ subsequently incorporated within the Work.
65
+
66
+ 2. Grant of Copyright License. Subject to the terms and conditions of
67
+ this License, each Contributor hereby grants to You a perpetual,
68
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
69
+ copyright license to reproduce, prepare Derivative Works of,
70
+ publicly display, publicly perform, sublicense, and distribute the
71
+ Work and such Derivative Works in Source or Object form.
72
+
73
+ 3. Grant of Patent License. Subject to the terms and conditions of
74
+ this License, each Contributor hereby grants to You a perpetual,
75
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
76
+ (except as stated in this section) patent license to make, have made,
77
+ use, offer to sell, sell, import, and otherwise transfer the Work,
78
+ where such license applies only to those patent claims licensable
79
+ by such Contributor that are necessarily infringed by their
80
+ Contribution(s) alone or by combination of their Contribution(s)
81
+ with the Work to which such Contribution(s) was submitted. If You
82
+ institute patent litigation against any entity (including a
83
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
84
+ or a Contribution incorporated within the Work constitutes direct
85
+ or contributory patent infringement, then any patent licenses
86
+ granted to You under this License for that Work shall terminate
87
+ as of the date such litigation is filed.
88
+
89
+ 4. Redistribution. You may reproduce and distribute copies of the
90
+ Work or Derivative Works thereof in any medium, with or without
91
+ modifications, and in Source or Object form, provided that You
92
+ meet the following conditions:
93
+
94
+ (a) You must give any other recipients of the Work or
95
+ Derivative Works a copy of this License; and
96
+
97
+ (b) You must cause any modified files to carry prominent notices
98
+ stating that You changed the files; and
99
+
100
+ (c) You must retain, in the Source form of any Derivative Works
101
+ that You distribute, all copyright, patent, trademark, and
102
+ attribution notices from the Source form of the Work,
103
+ excluding those notices that do not pertain to any part of
104
+ the Derivative Works; and
105
+
106
+ (d) If the Work includes a "NOTICE" text file as part of its
107
+ distribution, then any Derivative Works that You distribute must
108
+ include a readable copy of the attribution notices contained
109
+ within such NOTICE file, excluding those notices that do not
110
+ pertain to any part of the Derivative Works, in at least one
111
+ of the following places: within a NOTICE text file distributed
112
+ as part of the Derivative Works; within the Source form or
113
+ documentation, if provided along with the Derivative Works; or,
114
+ within a display generated by the Derivative Works, if and
115
+ wherever such third-party notices normally appear. The contents
116
+ of the NOTICE file are for informational purposes only and
117
+ do not modify the License. You may add Your own attribution
118
+ notices within Derivative Works that You distribute, alongside
119
+ or as an addendum to the NOTICE text from the Work, provided
120
+ that such additional attribution notices cannot be construed
121
+ as modifying the License.
122
+
123
+ You may add Your own copyright statement to Your modifications and
124
+ may provide additional or different license terms and conditions
125
+ for use, reproduction, or distribution of Your modifications, or
126
+ for any such Derivative Works as a whole, provided Your use,
127
+ reproduction, and distribution of the Work otherwise complies with
128
+ the conditions stated in this License.
129
+
130
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
131
+ any Contribution intentionally submitted for inclusion in the Work
132
+ by You to the Licensor shall be under the terms and conditions of
133
+ this License, without any additional terms or conditions.
134
+ Notwithstanding the above, nothing herein shall supersede or modify
135
+ the terms of any separate license agreement you may have executed
136
+ with Licensor regarding such Contributions.
137
+
138
+ 6. Trademarks. This License does not grant permission to use the trade
139
+ names, trademarks, service marks, or product names of the Licensor,
140
+ except as required for reasonable and customary use in describing the
141
+ origin of the Work and reproducing the content of the NOTICE file.
142
+
143
+ 7. Disclaimer of Warranty. Unless required by applicable law or
144
+ agreed to in writing, Licensor provides the Work (and each
145
+ Contributor provides its Contributions) on an "AS IS" BASIS,
146
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
147
+ implied, including, without limitation, any warranties or conditions
148
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
149
+ PARTICULAR PURPOSE. You are solely responsible for determining the
150
+ appropriateness of using or redistributing the Work and assume any
151
+ risks associated with Your exercise of permissions under this License.
152
+
153
+ 8. Limitation of Liability. In no event and under no legal theory,
154
+ whether in tort (including negligence), contract, or otherwise,
155
+ unless required by applicable law (such as deliberate and grossly
156
+ negligent acts) or agreed to in writing, shall any Contributor be
157
+ liable to You for damages, including any direct, indirect, special,
158
+ incidental, or consequential damages of any character arising as a
159
+ result of this License or out of the use or inability to use the
160
+ Work (including but not limited to damages for loss of goodwill,
161
+ work stoppage, computer failure or malfunction, or any and all
162
+ other commercial damages or losses), even if such Contributor
163
+ has been advised of the possibility of such damages.
164
+
165
+ 9. Accepting Warranty or Additional Liability. While redistributing
166
+ the Work or Derivative Works thereof, You may choose to offer,
167
+ and charge a fee for, acceptance of support, warranty, indemnity,
168
+ or other liability obligations and/or rights consistent with this
169
+ License. However, in accepting such obligations, You may act only
170
+ on Your own behalf and on Your sole responsibility, not on behalf
171
+ of any other Contributor, and only if You agree to indemnify,
172
+ defend, and hold each Contributor harmless for any liability
173
+ incurred by, or claims asserted against, such Contributor by reason
174
+ of your accepting any such warranty or additional liability.
175
+
176
+ END OF TERMS AND CONDITIONS
177
+
178
+ APPENDIX: How to apply the Apache License to your work.
179
+
180
+ To apply the Apache License to your work, attach the following
181
+ boilerplate notice, with the fields enclosed by brackets "[]"
182
+ replaced with your own identifying information. (Don't include
183
+ the brackets!) The text should be enclosed in the appropriate
184
+ comment syntax for the file format. We also recommend that a
185
+ file or class name and description of purpose be included on the
186
+ same "printed page" as the copyright notice for easier
187
+ identification within third-party archives.
188
+
189
+ Copyright 2021 Esity
190
+
191
+ Licensed under the Apache License, Version 2.0 (the "License");
192
+ you may not use this file except in compliance with the License.
193
+ You may obtain a copy of the License at
194
+
195
+ http://www.apache.org/licenses/LICENSE-2.0
196
+
197
+ Unless required by applicable law or agreed to in writing, software
198
+ distributed under the License is distributed on an "AS IS" BASIS,
199
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
200
+ See the License for the specific language governing permissions and
201
+ limitations under the License.
data/README.md CHANGED
@@ -35,7 +35,7 @@ Supported base URLs:
35
35
  ## Standalone Client Usage
36
36
 
37
37
  ```ruby
38
- require 'lex-tfe'
38
+ require 'legion/extensions/tfe'
39
39
 
40
40
  client = Legion::Extensions::Tfe::Client.new(
41
41
  url: 'https://terraform.uhg.com',
@@ -69,6 +69,8 @@ client.create_variable(
69
69
 
70
70
  ### Read-only mode
71
71
 
72
+ Pass `read_only: true` to `Client.new`. The flag is stored in `@opts` and forwarded automatically to every runner method — no need to pass it per call.
73
+
72
74
  ```ruby
73
75
  client = Legion::Extensions::Tfe::Client.new(
74
76
  url: 'https://terraform.uhg.com',
@@ -80,7 +82,7 @@ client = Legion::Extensions::Tfe::Client.new(
80
82
  client.list(organization: 'my-org')
81
83
 
82
84
  # Raises Legion::Extensions::Tfe::ReadOnlyError
83
- client.create(organization: 'my-org', name: 'ws', read_only: client.opts[:read_only])
85
+ client.create(organization: 'my-org', name: 'ws')
84
86
  ```
85
87
 
86
88
  ## Runners
@@ -177,10 +179,13 @@ client.create(organization: 'my-org', name: 'ws', read_only: client.opts[:read_o
177
179
  | `get_policy_set` | Get a policy set by ID |
178
180
  | `list_workspace_policy_sets`| List policy sets attached to a workspace |
179
181
 
180
- ## Development
182
+ ## Requirements
181
183
 
182
- ```bash
183
- bundle install
184
- bundle exec rspec
185
- bundle exec rubocop
186
- ```
184
+ - Ruby >= 3.4
185
+ - [LegionIO](https://github.com/LegionIO/LegionIO) framework (optional for standalone client usage)
186
+ - Terraform Enterprise or HCP Terraform API token
187
+ - `faraday` >= 2.0
188
+
189
+ ## License
190
+
191
+ MIT
data/lex-tfe.gemspec CHANGED
@@ -26,5 +26,12 @@ Gem::Specification.new do |spec|
26
26
  end
27
27
  spec.require_paths = ['lib']
28
28
 
29
- spec.add_dependency 'faraday', '>= 2.0'
29
+ spec.add_dependency 'faraday', '>= 2.0'
30
+ spec.add_dependency 'legion-cache', '>= 1.3.11'
31
+ spec.add_dependency 'legion-crypt', '>= 1.4.9'
32
+ spec.add_dependency 'legion-data', '>= 1.4.17'
33
+ spec.add_dependency 'legion-json', '>= 1.2.1'
34
+ spec.add_dependency 'legion-logging', '>= 1.3.2'
35
+ spec.add_dependency 'legion-settings', '>= 1.3.14'
36
+ spec.add_dependency 'legion-transport', '>= 1.3.9'
30
37
  end
@@ -19,8 +19,8 @@ module Legion
19
19
  resp.body
20
20
  end
21
21
 
22
- include Legion::Extensions::Helpers::Lex if Legion::Extensions.const_defined?(:Helpers) &&
23
- Legion::Extensions::Helpers.const_defined?(:Lex)
22
+ include Legion::Extensions::Helpers::Lex if Legion::Extensions.const_defined?(:Helpers, false) &&
23
+ Legion::Extensions::Helpers.const_defined?(:Lex, false)
24
24
  end
25
25
  end
26
26
  end
@@ -19,8 +19,8 @@ module Legion
19
19
  resp.body
20
20
  end
21
21
 
22
- include Legion::Extensions::Helpers::Lex if Legion::Extensions.const_defined?(:Helpers) &&
23
- Legion::Extensions::Helpers.const_defined?(:Lex)
22
+ include Legion::Extensions::Helpers::Lex if Legion::Extensions.const_defined?(:Helpers, false) &&
23
+ Legion::Extensions::Helpers.const_defined?(:Lex, false)
24
24
  end
25
25
  end
26
26
  end
@@ -24,8 +24,8 @@ module Legion
24
24
  resp.body
25
25
  end
26
26
 
27
- include Legion::Extensions::Helpers::Lex if Legion::Extensions.const_defined?(:Helpers) &&
28
- Legion::Extensions::Helpers.const_defined?(:Lex)
27
+ include Legion::Extensions::Helpers::Lex if Legion::Extensions.const_defined?(:Helpers, false) &&
28
+ Legion::Extensions::Helpers.const_defined?(:Lex, false)
29
29
  end
30
30
  end
31
31
  end
@@ -24,8 +24,8 @@ module Legion
24
24
  resp.body
25
25
  end
26
26
 
27
- include Legion::Extensions::Helpers::Lex if Legion::Extensions.const_defined?(:Helpers) &&
28
- Legion::Extensions::Helpers.const_defined?(:Lex)
27
+ include Legion::Extensions::Helpers::Lex if Legion::Extensions.const_defined?(:Helpers, false) &&
28
+ Legion::Extensions::Helpers.const_defined?(:Lex, false)
29
29
  end
30
30
  end
31
31
  end
@@ -42,8 +42,8 @@ module Legion
42
42
  connection(url: url, token: token).delete("/api/v2/projects/#{project_id}")
43
43
  end
44
44
 
45
- include Legion::Extensions::Helpers::Lex if Legion::Extensions.const_defined?(:Helpers) &&
46
- Legion::Extensions::Helpers.const_defined?(:Lex)
45
+ include Legion::Extensions::Helpers::Lex if Legion::Extensions.const_defined?(:Helpers, false) &&
46
+ Legion::Extensions::Helpers.const_defined?(:Lex, false)
47
47
  end
48
48
  end
49
49
  end
@@ -63,8 +63,8 @@ module Legion
63
63
  resp.body
64
64
  end
65
65
 
66
- include Legion::Extensions::Helpers::Lex if Legion::Extensions.const_defined?(:Helpers) &&
67
- Legion::Extensions::Helpers.const_defined?(:Lex)
66
+ include Legion::Extensions::Helpers::Lex if Legion::Extensions.const_defined?(:Helpers, false) &&
67
+ Legion::Extensions::Helpers.const_defined?(:Lex, false)
68
68
  end
69
69
  end
70
70
  end
@@ -25,8 +25,8 @@ module Legion
25
25
  resp.body
26
26
  end
27
27
 
28
- include Legion::Extensions::Helpers::Lex if Legion::Extensions.const_defined?(:Helpers) &&
29
- Legion::Extensions::Helpers.const_defined?(:Lex)
28
+ include Legion::Extensions::Helpers::Lex if Legion::Extensions.const_defined?(:Helpers, false) &&
29
+ Legion::Extensions::Helpers.const_defined?(:Lex, false)
30
30
  end
31
31
  end
32
32
  end
@@ -57,8 +57,8 @@ module Legion
57
57
  resp.body
58
58
  end
59
59
 
60
- include Legion::Extensions::Helpers::Lex if Legion::Extensions.const_defined?(:Helpers) &&
61
- Legion::Extensions::Helpers.const_defined?(:Lex)
60
+ include Legion::Extensions::Helpers::Lex if Legion::Extensions.const_defined?(:Helpers, false) &&
61
+ Legion::Extensions::Helpers.const_defined?(:Lex, false)
62
62
  end
63
63
  end
64
64
  end
@@ -49,8 +49,8 @@ module Legion
49
49
  connection(url: url, token: token).delete("/api/v2/vars/#{variable_id}")
50
50
  end
51
51
 
52
- include Legion::Extensions::Helpers::Lex if Legion::Extensions.const_defined?(:Helpers) &&
53
- Legion::Extensions::Helpers.const_defined?(:Lex)
52
+ include Legion::Extensions::Helpers::Lex if Legion::Extensions.const_defined?(:Helpers, false) &&
53
+ Legion::Extensions::Helpers.const_defined?(:Lex, false)
54
54
  end
55
55
  end
56
56
  end
@@ -59,8 +59,8 @@ module Legion
59
59
  resp.body
60
60
  end
61
61
 
62
- include Legion::Extensions::Helpers::Lex if Legion::Extensions.const_defined?(:Helpers) &&
63
- Legion::Extensions::Helpers.const_defined?(:Lex)
62
+ include Legion::Extensions::Helpers::Lex if Legion::Extensions.const_defined?(:Helpers, false) &&
63
+ Legion::Extensions::Helpers.const_defined?(:Lex, false)
64
64
  end
65
65
  end
66
66
  end
@@ -3,7 +3,7 @@
3
3
  module Legion
4
4
  module Extensions
5
5
  module Tfe
6
- VERSION = '0.1.0'
6
+ VERSION = '0.1.2'
7
7
  end
8
8
  end
9
9
  end
@@ -18,7 +18,7 @@ require 'legion/extensions/tfe/client'
18
18
  module Legion
19
19
  module Extensions
20
20
  module Tfe
21
- extend Legion::Extensions::Core if Legion::Extensions.const_defined? :Core
21
+ extend Legion::Extensions::Core if Legion::Extensions.const_defined? :Core, false
22
22
  end
23
23
  end
24
24
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: lex-tfe
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.1.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Matthew Iverson
@@ -23,6 +23,104 @@ dependencies:
23
23
  - - ">="
24
24
  - !ruby/object:Gem::Version
25
25
  version: '2.0'
26
+ - !ruby/object:Gem::Dependency
27
+ name: legion-cache
28
+ requirement: !ruby/object:Gem::Requirement
29
+ requirements:
30
+ - - ">="
31
+ - !ruby/object:Gem::Version
32
+ version: 1.3.11
33
+ type: :runtime
34
+ prerelease: false
35
+ version_requirements: !ruby/object:Gem::Requirement
36
+ requirements:
37
+ - - ">="
38
+ - !ruby/object:Gem::Version
39
+ version: 1.3.11
40
+ - !ruby/object:Gem::Dependency
41
+ name: legion-crypt
42
+ requirement: !ruby/object:Gem::Requirement
43
+ requirements:
44
+ - - ">="
45
+ - !ruby/object:Gem::Version
46
+ version: 1.4.9
47
+ type: :runtime
48
+ prerelease: false
49
+ version_requirements: !ruby/object:Gem::Requirement
50
+ requirements:
51
+ - - ">="
52
+ - !ruby/object:Gem::Version
53
+ version: 1.4.9
54
+ - !ruby/object:Gem::Dependency
55
+ name: legion-data
56
+ requirement: !ruby/object:Gem::Requirement
57
+ requirements:
58
+ - - ">="
59
+ - !ruby/object:Gem::Version
60
+ version: 1.4.17
61
+ type: :runtime
62
+ prerelease: false
63
+ version_requirements: !ruby/object:Gem::Requirement
64
+ requirements:
65
+ - - ">="
66
+ - !ruby/object:Gem::Version
67
+ version: 1.4.17
68
+ - !ruby/object:Gem::Dependency
69
+ name: legion-json
70
+ requirement: !ruby/object:Gem::Requirement
71
+ requirements:
72
+ - - ">="
73
+ - !ruby/object:Gem::Version
74
+ version: 1.2.1
75
+ type: :runtime
76
+ prerelease: false
77
+ version_requirements: !ruby/object:Gem::Requirement
78
+ requirements:
79
+ - - ">="
80
+ - !ruby/object:Gem::Version
81
+ version: 1.2.1
82
+ - !ruby/object:Gem::Dependency
83
+ name: legion-logging
84
+ requirement: !ruby/object:Gem::Requirement
85
+ requirements:
86
+ - - ">="
87
+ - !ruby/object:Gem::Version
88
+ version: 1.3.2
89
+ type: :runtime
90
+ prerelease: false
91
+ version_requirements: !ruby/object:Gem::Requirement
92
+ requirements:
93
+ - - ">="
94
+ - !ruby/object:Gem::Version
95
+ version: 1.3.2
96
+ - !ruby/object:Gem::Dependency
97
+ name: legion-settings
98
+ requirement: !ruby/object:Gem::Requirement
99
+ requirements:
100
+ - - ">="
101
+ - !ruby/object:Gem::Version
102
+ version: 1.3.14
103
+ type: :runtime
104
+ prerelease: false
105
+ version_requirements: !ruby/object:Gem::Requirement
106
+ requirements:
107
+ - - ">="
108
+ - !ruby/object:Gem::Version
109
+ version: 1.3.14
110
+ - !ruby/object:Gem::Dependency
111
+ name: legion-transport
112
+ requirement: !ruby/object:Gem::Requirement
113
+ requirements:
114
+ - - ">="
115
+ - !ruby/object:Gem::Version
116
+ version: 1.3.9
117
+ type: :runtime
118
+ prerelease: false
119
+ version_requirements: !ruby/object:Gem::Requirement
120
+ requirements:
121
+ - - ">="
122
+ - !ruby/object:Gem::Version
123
+ version: 1.3.9
26
124
  description: Connects LegionIO to Terraform Enterprise / HCP Terraform
27
125
  email:
28
126
  - matthewdiverson@gmail.com
@@ -30,10 +128,14 @@ executables: []
30
128
  extensions: []
31
129
  extra_rdoc_files: []
32
130
  files:
131
+ - ".github/CODEOWNERS"
132
+ - ".github/dependabot.yml"
33
133
  - ".github/workflows/ci.yml"
134
+ - ".gitignore"
34
135
  - ".rspec"
35
136
  - ".rubocop.yml"
36
137
  - CHANGELOG.md
138
+ - CLAUDE.md
37
139
  - Gemfile
38
140
  - LICENSE
39
141
  - README.md