discovery_v1 0.1.0 → 0.2.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: 137199efc3b5f475875b508cf68d20c51ea82f2d29d3d70d2218866f67d765a0
4
- data.tar.gz: 709788ca0001c121c94d5f95dfae6b794be0fa68f1c926e874c73a2e1aa028e1
3
+ metadata.gz: fde1c6614a635f843b6571f3aded90f26b1d1c5468b6aca77dbf593ce8ca9171
4
+ data.tar.gz: '0945b34e86bee4f36fb0a74caa6a60d65dac2e4dc0e77d4c5b68af80d2cc9338'
5
5
  SHA512:
6
- metadata.gz: 42b2fa6f84a491d7366d11539a50ae71e059526ce6d9f883e6f40027c1f61efb3c17e4bf05137e6827b8829a7f3aa309700b22bdb9ba116f0f85eee5dc3e0214
7
- data.tar.gz: 1f2e89c1dd89c67c22a1ff16ecf7c2f0ec03ff16e68d16292840b6b4d9bef0ef1db97fde783aabcf9411456072247cbffa10872feb4ef8ee57321a3f1c11a77f
6
+ metadata.gz: acec4cd8de56990b8b2ddb940c7f18d9e64f7dbd40d565083d6eabf8560101fe0852aa069427693de7db466d2448d8ba7181882150dd30b2a9e8471d138647c9
7
+ data.tar.gz: 7f86e5a69c105cf89627245428ea5f8a5317979e1c4a24e6505497ba45a2d08ed10a853e946f077b373359855b5fcaa9b1fbde444e066f4238bea1d4198395b8
data/.commitlintrc.yml ADDED
@@ -0,0 +1,16 @@
1
+ ---
2
+ extends: '@commitlint/config-conventional'
3
+
4
+ rules:
5
+ # See: https://commitlint.js.org/reference/rules.html
6
+ #
7
+ # Rules are made up by a name and a configuration array. The configuration array contains:
8
+ #
9
+ # * Severity [0..2]: 0 disable rule, 1 warning if violated, or 2 error if violated
10
+ # * Applicability [always|never]: never inverts the rule
11
+ # * Value: value to use for this rule
12
+ #
13
+ # Run `npx commitlint --print-config` to see the current setting for all rules.
14
+ #
15
+ body-leading-blank: [2, 'always']
16
+ footer-leading-blank: [2, 'always']
data/.husky/commit-msg ADDED
@@ -0,0 +1 @@
1
+ npx --no-install commitlint --edit "$1"
data/.markdownlint.yml ADDED
@@ -0,0 +1,25 @@
1
+ default: true
2
+
3
+ # Unordered list indentation
4
+ MD007: { indent: 2 }
5
+
6
+ # Line length
7
+ MD013: { line_length: 90, tables: false, code_blocks: false }
8
+
9
+ # Heading duplication is allowed for non-sibling headings
10
+ MD024: { siblings_only: true }
11
+
12
+ # Do not allow the specified trailing punctuation in a header
13
+ MD026: { punctuation: '.,;:' }
14
+
15
+ # Order list items must have a prefix that increases in numerical order
16
+ MD029: { style: 'ordered' }
17
+
18
+ # Lists do not need to be surrounded by blank lines
19
+ MD032: false
20
+
21
+ # Allow raw HTML in Markdown
22
+ MD033: false
23
+
24
+ # Allow emphasis to be used instead of a heading
25
+ MD036: false
data/.rubocop.yml CHANGED
@@ -1,36 +1,7 @@
1
+ inherit_gem:
2
+ main_branch_shared_rubocop_config: config/rubocop.yml
3
+
1
4
  AllCops:
2
- NewCops: enable
3
- # Output extra information for each offense to make it easier to diagnose:
4
- DisplayCopNames: true
5
- DisplayStyleGuide: true
6
- ExtraDetails: true
7
- SuggestExtensions: false
8
- # RuboCop enforces rules depending on the oldest version of Ruby which
9
- # your project supports:
5
+ # Pin this project to Ruby 3.1 in case the shared config above is upgraded to 3.2
6
+ # or later.
10
7
  TargetRubyVersion: 3.1
11
-
12
- Gemspec/DevelopmentDependencies:
13
- EnforcedStyle: gemspec
14
-
15
- # The default max line length is 80 characters
16
- Layout/LineLength:
17
- Max: 120
18
-
19
- # The DSL for RSpec and the gemspec file make it very hard to limit block length:
20
- Metrics/BlockLength:
21
- Exclude:
22
- - "spec/spec_helper.rb"
23
- - "spec/**/*_spec.rb"
24
- - "*.gemspec"
25
-
26
- Metrics/ModuleLength:
27
- CountAsOne: ['hash']
28
-
29
- # When writing minitest tests, it is very hard to limit test class length:
30
- Metrics/ClassLength:
31
- CountAsOne: ['hash']
32
- Exclude:
33
- - "test/**/*_test.rb"
34
-
35
- Style/AsciiComments:
36
- Enabled: false
data/.yardopts ADDED
@@ -0,0 +1,8 @@
1
+ --no-private
2
+ --hide-void-return
3
+ --markup-provider=redcarpet
4
+ --markup markdown
5
+ - CHANGELOG.md
6
+ - CONTRIBUTING.md
7
+ - RELEASING.md
8
+ - LICENSE.txt
data/CHANGELOG.md CHANGED
@@ -4,6 +4,31 @@ Changes for each release are listed in this file.
4
4
 
5
5
  This project adheres to [Semantic Versioning](https://semver.org/) for its releases.
6
6
 
7
+ ## v0.2.0 (2024-10-11)
8
+
9
+ [Full Changelog](https://github.com/main-branch/discovery_v1/compare/v0.1.0..v0.2.0)
10
+
11
+ Changes since v0.1.0:
12
+
13
+ * fbd2c75 build: remove semver pr label check
14
+ * 9234cb0 build: enforce conventional commit message formatting
15
+ * 70c72f9 Use shared Rubocop config (#16)
16
+ * 101cb6c Update copyright notice in this project (#15)
17
+ * 32986c4 Update links in gemspec (#14)
18
+ * ee4305f Add Slack badge for this project in README (#13)
19
+ * 1e05724 Use standard badges at the top of the README (#12)
20
+ * 02ec62a Update yardopts with new standard options (#11)
21
+ * 8b65f81 Standardize YARD and Markdown Lint configurations (#10)
22
+ * d105374 Update CODEOWNERS file (#9)
23
+ * 870934e Set JRuby --debug option when running tests in GitHub Actions workflows (#8)
24
+ * 351659c Integrate simplecov-rspec into the project (#7)
25
+ * 3ca83ee Update continuous integration and experimental ruby builds (#6)
26
+ * cb454b8 Enforce the use of semver tags on PRs (#5)
27
+ * 68d0136 Auto correct rubocop Gemspec/AddRuntimeDependency offense (#4)
28
+ * 5c4115a Add links to other gems in the Google API helpers series (#3)
29
+ * 2aa6534 Merge pull request #2 from main-branch/document_extensions
30
+ * 92d158c Document extensions to Google::Apis::DiscoveryV1 classes
31
+
7
32
  ## v0.1.0 (2023-11-21)
8
33
 
9
34
  [Full Changelog](https://github.com/main-branch/discovery_v1/compare/6e9fb12..v0.1.0)
data/LICENSE.txt CHANGED
@@ -1,6 +1,6 @@
1
1
  The MIT License (MIT)
2
2
 
3
- Copyright (c) 2023 James Couball
3
+ Copyright (c) 2024 James Couball
4
4
 
5
5
  Permission is hereby granted, free of charge, to any person obtaining a copy
6
6
  of this software and associated documentation files (the "Software"), to deal
data/README.md CHANGED
@@ -3,12 +3,24 @@
3
3
  [![Gem Version](https://badge.fury.io/rb/discovery_v1.svg)](https://badge.fury.io/rb/discovery_v1)
4
4
  [![Documentation](https://img.shields.io/badge/Documentation-Latest-green)](https://rubydoc.info/gems/discovery_v1/)
5
5
  [![Change Log](https://img.shields.io/badge/CHANGELOG-Latest-green)](https://rubydoc.info/gems/discovery_v1/file/CHANGELOG.md)
6
- [![Build Status](https://github.com/main-branch/discovery_v1/workflows/CI%20Build/badge.svg?branch=main)](https://github.com/main-branch/discovery_v1/actions?query=workflow%3ACI%20Build)
6
+ [![Build Status](https://github.com/main-branch/discovery_v1/actions/workflows/continuous_integration.yml/badge.svg)](https://github.com/main-branch/discovery_v1/actions/workflows/continuous_integration.yml)
7
7
  [![Maintainability](https://api.codeclimate.com/v1/badges/aeebc016487c5cad881e/maintainability)](https://codeclimate.com/github/main-branch/discovery_v1/maintainability)
8
8
  [![Test Coverage](https://api.codeclimate.com/v1/badges/aeebc016487c5cad881e/test_coverage)](https://codeclimate.com/github/main-branch/discovery_v1/test_coverage)
9
+ [![Conventional
10
+ Commits](https://img.shields.io/badge/Conventional%20Commits-1.0.0-%23FE5196?logo=conventionalcommits&logoColor=white)](https://conventionalcommits.org)
11
+ [![Slack](https://img.shields.io/badge/slack-main--branch/discovery__v1-yellow.svg?logo=slack)](https://main-branch.slack.com/archives/C07MT5MG7V1)
9
12
 
10
13
  Unofficial helpers and extensions for the Google Discovery V1 API
11
14
 
15
+ Gems in the Google API helper, extensions, and examples series:
16
+
17
+ * [discovery_v1](https://github.com/main-branch/discovery_v1)
18
+ * [drive_v3](https://github.com/main-branch/drive_v3)
19
+ * [sheets_v4](https://github.com/main-branch/sheets_v4)
20
+
21
+ ## Contents
22
+
23
+ * [Contents](#contents)
12
24
  * [Installation](#installation)
13
25
  * [Examples](#examples)
14
26
  * [Important links](#important-links)
@@ -19,8 +31,12 @@ Unofficial helpers and extensions for the Google Discovery V1 API
19
31
  * [Obtaining a DiscoveryService](#obtaining-a-discoveryservice)
20
32
  * [Downloading an API discovery document](#downloading-an-api-discovery-document)
21
33
  * [Validating API objects](#validating-api-objects)
34
+ * [Google Extensions](#google-extensions)
35
+ * [RestDescription Extensions](#restdescription-extensions)
22
36
  * [Development](#development)
23
37
  * [Contributing](#contributing)
38
+ * [Commit message guidelines](#commit-message-guidelines)
39
+ * [Pull request guidelines](#pull-request-guidelines)
24
40
  * [License](#license)
25
41
  * [Code of Conduct](#code-of-conduct)
26
42
 
@@ -159,6 +175,26 @@ will raise a RuntimeError noting where the object structure did not conform to
159
175
  the schema. `RuntimeError#message` will give details about where the structure did
160
176
  not conform.
161
177
 
178
+ ### Google Extensions
179
+
180
+ The `DiscoveryV1::GoogleExtensions` module provides extensions to the `Google::Apis::DiscoveryV1`
181
+ modules and classes to simplify use of the SheetsV4 API.
182
+
183
+ These extensions are not loaded by default and are not required to use other parts
184
+ of this Gem. To enable these extension, you must:
185
+
186
+ ```Ruby
187
+ require 'discovery_v1/google_extensions'
188
+ ```
189
+
190
+ #### RestDescription Extensions
191
+
192
+ Convenience methods are been added to `Google::Apis::DiscoveryV1::RestDescription`:
193
+ * [RestDescription#object_schema_names](https://rubydoc.info/gems/discovery_v1/Google/Apis/DiscoveryV1/RestDescription#object_schema_names-instance_method):
194
+ The names of the schemas defined by this `RestDescription`.
195
+ * [RestDescription#validate_object](https://rubydoc.info/gems/discovery_v1/Google/Apis/DiscoveryV1/RestDescription#validate_object-instance_method):
196
+ Raises an error if the given object does not conform to the named schema.
197
+
162
198
  ## Development
163
199
 
164
200
  After checking out the repo, run `bin/setup` to install dependencies. Then, run `rake spec` to run the tests. You can also run `bin/console` for an interactive prompt that will allow you to experiment.
@@ -169,6 +205,31 @@ To install this gem onto your local machine, run `bundle exec rake install`. To
169
205
 
170
206
  Bug reports and pull requests are welcome on GitHub at https://github.com/[USERNAME]/discovery_v1. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the [code of conduct](https://github.com/[USERNAME]/discovery_v1/blob/main/CODE_OF_CONDUCT.md).
171
207
 
208
+ ### Commit message guidelines
209
+
210
+ All commit messages must follow the [Conventional Commits
211
+ standard](https://www.conventionalcommits.org/en/v1.0.0/). This helps us maintain a
212
+ clear and structured commit history, automate versioning, and generate changelogs
213
+ effectively.
214
+
215
+ To ensure compliance, this project includes:
216
+
217
+ * A git commit-msg hook that validates your commit messages before they are accepted.
218
+
219
+ To activate the hook, you must have node installed and run `npm install`.
220
+
221
+ * A GitHub Actions workflow that will enforce the Conventional Commit standard as
222
+ part of the continuous integration pipeline.
223
+
224
+ Any commit message that does not conform to the Conventional Commits standard will
225
+ cause the workflow to fail and not allow the PR to be merged.
226
+
227
+ ### Pull request guidelines
228
+
229
+ All pull requests must be merged using rebase merges. This ensures that commit
230
+ messages from the feature branch are preserved in the release branch, keeping the
231
+ history clean and meaningful.
232
+
172
233
  ## License
173
234
 
174
235
  The gem is available as open source under the terms of the [MIT License](https://opensource.org/licenses/MIT).
data/Rakefile CHANGED
@@ -48,17 +48,9 @@ CLEAN << 'rspec-report.xml'
48
48
 
49
49
  require 'rubocop/rake_task'
50
50
 
51
- RuboCop::RakeTask.new do |t|
52
- t.options = %w[
53
- --display-cop-names
54
- --display-style-guide
55
- --extra-details
56
- --format progress
57
- --format json --out rubocop-report.json
58
- ]
59
- end
51
+ RuboCop::RakeTask.new
60
52
 
61
- CLEAN << 'rubocop-report.json'
53
+ # YARD
62
54
 
63
55
  unless RUBY_PLATFORM == 'java'
64
56
  # yard:build
@@ -2,5 +2,5 @@
2
2
 
3
3
  module DiscoveryV1
4
4
  # The version of this gem
5
- VERSION = '0.1.0'
5
+ VERSION = '0.2.0'
6
6
  end
data/package.json ADDED
@@ -0,0 +1,11 @@
1
+ {
2
+ "devDependencies": {
3
+ "@commitlint/cli": "^19.5.0",
4
+ "@commitlint/config-conventional": "^19.5.0",
5
+ "husky": "^9.1.0"
6
+ },
7
+ "scripts": {
8
+ "postinstall": "husky",
9
+ "prepare": "husky"
10
+ }
11
+ }
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: discovery_v1
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.2.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - James Couball
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2023-11-21 00:00:00.000000000 Z
11
+ date: 2024-10-11 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler-audit
@@ -30,56 +30,70 @@ dependencies:
30
30
  requirements:
31
31
  - - "~>"
32
32
  - !ruby/object:Gem::Version
33
- version: '1.0'
33
+ version: '2.1'
34
34
  type: :development
35
35
  prerelease: false
36
36
  version_requirements: !ruby/object:Gem::Requirement
37
37
  requirements:
38
38
  - - "~>"
39
39
  - !ruby/object:Gem::Version
40
- version: '1.0'
40
+ version: '2.1'
41
+ - !ruby/object:Gem::Dependency
42
+ name: main_branch_shared_rubocop_config
43
+ requirement: !ruby/object:Gem::Requirement
44
+ requirements:
45
+ - - "~>"
46
+ - !ruby/object:Gem::Version
47
+ version: '0.1'
48
+ type: :development
49
+ prerelease: false
50
+ version_requirements: !ruby/object:Gem::Requirement
51
+ requirements:
52
+ - - "~>"
53
+ - !ruby/object:Gem::Version
54
+ version: '0.1'
41
55
  - !ruby/object:Gem::Dependency
42
56
  name: rake
43
57
  requirement: !ruby/object:Gem::Requirement
44
58
  requirements:
45
59
  - - "~>"
46
60
  - !ruby/object:Gem::Version
47
- version: '13.0'
61
+ version: '13.2'
48
62
  type: :development
49
63
  prerelease: false
50
64
  version_requirements: !ruby/object:Gem::Requirement
51
65
  requirements:
52
66
  - - "~>"
53
67
  - !ruby/object:Gem::Version
54
- version: '13.0'
68
+ version: '13.2'
55
69
  - !ruby/object:Gem::Dependency
56
70
  name: rspec
57
71
  requirement: !ruby/object:Gem::Requirement
58
72
  requirements:
59
73
  - - "~>"
60
74
  - !ruby/object:Gem::Version
61
- version: '3.12'
75
+ version: '3.13'
62
76
  type: :development
63
77
  prerelease: false
64
78
  version_requirements: !ruby/object:Gem::Requirement
65
79
  requirements:
66
80
  - - "~>"
67
81
  - !ruby/object:Gem::Version
68
- version: '3.12'
82
+ version: '3.13'
69
83
  - !ruby/object:Gem::Dependency
70
84
  name: rubocop
71
85
  requirement: !ruby/object:Gem::Requirement
72
86
  requirements:
73
87
  - - "~>"
74
88
  - !ruby/object:Gem::Version
75
- version: '1.57'
89
+ version: '1.66'
76
90
  type: :development
77
91
  prerelease: false
78
92
  version_requirements: !ruby/object:Gem::Requirement
79
93
  requirements:
80
94
  - - "~>"
81
95
  - !ruby/object:Gem::Version
82
- version: '1.57'
96
+ version: '1.66'
83
97
  - !ruby/object:Gem::Dependency
84
98
  name: simplecov
85
99
  requirement: !ruby/object:Gem::Requirement
@@ -108,6 +122,20 @@ dependencies:
108
122
  - - "~>"
109
123
  - !ruby/object:Gem::Version
110
124
  version: '0.8'
125
+ - !ruby/object:Gem::Dependency
126
+ name: simplecov-rspec
127
+ requirement: !ruby/object:Gem::Requirement
128
+ requirements:
129
+ - - "~>"
130
+ - !ruby/object:Gem::Version
131
+ version: '0.3'
132
+ type: :development
133
+ prerelease: false
134
+ version_requirements: !ruby/object:Gem::Requirement
135
+ requirements:
136
+ - - "~>"
137
+ - !ruby/object:Gem::Version
138
+ version: '0.3'
111
139
  - !ruby/object:Gem::Dependency
112
140
  name: redcarpet
113
141
  requirement: !ruby/object:Gem::Requirement
@@ -190,28 +218,28 @@ dependencies:
190
218
  requirements:
191
219
  - - "~>"
192
220
  - !ruby/object:Gem::Version
193
- version: '0.14'
221
+ version: '0.19'
194
222
  type: :runtime
195
223
  prerelease: false
196
224
  version_requirements: !ruby/object:Gem::Requirement
197
225
  requirements:
198
226
  - - "~>"
199
227
  - !ruby/object:Gem::Version
200
- version: '0.14'
228
+ version: '0.19'
201
229
  - !ruby/object:Gem::Dependency
202
230
  name: json_schemer
203
231
  requirement: !ruby/object:Gem::Requirement
204
232
  requirements:
205
233
  - - "~>"
206
234
  - !ruby/object:Gem::Version
207
- version: '2.0'
235
+ version: '2.3'
208
236
  type: :runtime
209
237
  prerelease: false
210
238
  version_requirements: !ruby/object:Gem::Requirement
211
239
  requirements:
212
240
  - - "~>"
213
241
  - !ruby/object:Gem::Version
214
- version: '2.0'
242
+ version: '2.3'
215
243
  description: Unofficial helpers and extensions for the Google Discovery V1 API
216
244
  email:
217
245
  - jcouball@yahoo.com
@@ -219,8 +247,12 @@ executables: []
219
247
  extensions: []
220
248
  extra_rdoc_files: []
221
249
  files:
250
+ - ".commitlintrc.yml"
251
+ - ".husky/commit-msg"
252
+ - ".markdownlint.yml"
222
253
  - ".rspec"
223
254
  - ".rubocop.yml"
255
+ - ".yardopts"
224
256
  - CHANGELOG.md
225
257
  - CODE_OF_CONDUCT.md
226
258
  - LICENSE.txt
@@ -237,6 +269,7 @@ files:
237
269
  - lib/discovery_v1/validation/traverse_object_tree.rb
238
270
  - lib/discovery_v1/validation/validate_object.rb
239
271
  - lib/discovery_v1/version.rb
272
+ - package.json
240
273
  - sig/discovery_v1.rbs
241
274
  homepage: https://github.com/main-branch/discovery_v1
242
275
  licenses:
@@ -245,7 +278,8 @@ metadata:
245
278
  allowed_push_host: https://rubygems.org
246
279
  homepage_uri: https://github.com/main-branch/discovery_v1
247
280
  source_code_uri: https://github.com/main-branch/discovery_v1
248
- changelog_uri: https://rubydoc.info/gems/discovery_v1/file/CHANGELOG.md
281
+ documentation_uri: https://rubydoc.info/gems/discovery_v1/0.2.0
282
+ changelog_uri: https://rubydoc.info/gems/discovery_v1/0.2.0/file/CHANGELOG.md
249
283
  rubygems_mfa_required: 'true'
250
284
  post_install_message:
251
285
  rdoc_options: []
@@ -262,7 +296,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
262
296
  - !ruby/object:Gem::Version
263
297
  version: '0'
264
298
  requirements: []
265
- rubygems_version: 3.4.14
299
+ rubygems_version: 3.5.16
266
300
  signing_key:
267
301
  specification_version: 4
268
302
  summary: Unofficial helpers and extensions for the Google Discovery V1 API