net-http-structured_field_values 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: 50d5376e269e9e8cf277cb12a3dcf3fbf22d7f047b0a72654bce858e5e60994a
4
- data.tar.gz: 3bdc2d923d5d9aeb32238fe9ce07ea12d9a570f5e47b85077ce0d950d20715b5
3
+ metadata.gz: b245981ee6d0924e318d18f056a93f55c5d16ef5465bf2f94bfc1c8f5aac25bf
4
+ data.tar.gz: f4d71b2ee8ea01ba55b6f28f562434f68af4b7f85517225616ede3f0b523cf12
5
5
  SHA512:
6
- metadata.gz: 6862b163faa570c59554c2174a3d5b10b0477de62909f57e7c5887d58c80a65dbc8fabdf19eaa45c007327dfdb53b6dbfc5b6dfd16e6e3b4a4c815b5a3706c74
7
- data.tar.gz: 173d2bb39bce5245778b3916dc3e8d9c975d8400ad4f096b4c3ed81a1970d7fe78e50699499f6f81d1f6938e57055fbcfa7a02a97a633bf60a9ffd24f81b2756
6
+ metadata.gz: cbe6dc0a36009ccd9960a053129f57cf3173543304a0d53911ac7bceb35d7abe80ac823f00235c17c593b9e9c32047786a71418ae48b39612c3ff1f29264f634
7
+ data.tar.gz: 860b392edab711de9015dba56b9bd96e4eeeb0af97b0222156b6f9203474dd00e4bd380fbd5379dd4b96eccfb4e8f6925703395ff7d206a7bd1ace2ac78830ae
@@ -18,8 +18,6 @@ jobs:
18
18
  shell: bash
19
19
  steps:
20
20
  - uses: actions/checkout@v4
21
- with:
22
- fetch-depth: 0
23
21
 
24
22
  - name: Install and Run Actionlint
25
23
  run: |
@@ -17,8 +17,6 @@ jobs:
17
17
 
18
18
  steps:
19
19
  - uses: actions/checkout@v4
20
- with:
21
- fetch-depth: 0
22
20
 
23
21
  - name: Set up Ruby
24
22
  uses: ruby/setup-ruby@v1
@@ -41,8 +39,6 @@ jobs:
41
39
 
42
40
  steps:
43
41
  - uses: actions/checkout@v4
44
- with:
45
- fetch-depth: 0
46
42
 
47
43
  - name: Set up Ruby
48
44
  uses: ruby/setup-ruby@v1
@@ -0,0 +1,19 @@
1
+ #!/usr/bin/env ruby
2
+ # frozen_string_literal: true
3
+
4
+ case ARGV[0]
5
+ when 'source'
6
+ require_relative '../../lib/net/http/structured_field_values/version'
7
+ when 'gem'
8
+ require 'bundler/inline'
9
+
10
+ gemfile do
11
+ source 'https://rubygems.org'
12
+
13
+ gem 'net-http-structured_field_values'
14
+ end
15
+ else
16
+ raise ArgumentError, "Unknown argument: #{ARGV[0]}"
17
+ end
18
+
19
+ puts Net::HTTP::StructuredFieldValues::VERSION
@@ -0,0 +1,60 @@
1
+ name: Release Gem
2
+
3
+ on:
4
+ push:
5
+ branches:
6
+ - main
7
+ paths:
8
+ - '.github/workflows/release-gem.yml'
9
+ - 'lib/net/http/structured_field_values/version.rb'
10
+
11
+ jobs:
12
+ check:
13
+ outputs:
14
+ source_version: ${{ steps.versions.outputs.source_version }}
15
+ gem_version: ${{ steps.versions.outputs.gem_version }}
16
+
17
+ runs-on: ubuntu-latest
18
+
19
+ steps:
20
+ - uses: actions/checkout@v4
21
+
22
+ - name: Set up Ruby
23
+ uses: ruby/setup-ruby@v1
24
+ with:
25
+ ruby-version: .ruby-version
26
+
27
+ - name: Set versions
28
+ id: versions
29
+ run: |
30
+ echo "source_version=$(.github/workflows/print-version.rb source)" >> "$GITHUB_OUTPUT"
31
+ echo "gem_version=$(.github/workflows/print-version.rb gem)" >> "$GITHUB_OUTPUT"
32
+
33
+ release:
34
+ needs: check
35
+ if: ${{ needs.check.outputs.source_version != needs.check.outputs.gem_version }}
36
+
37
+ runs-on: ubuntu-latest
38
+
39
+ permissions:
40
+ contents: write
41
+
42
+ steps:
43
+ - uses: actions/checkout@v4
44
+
45
+ - name: Set up Ruby
46
+ uses: ruby/setup-ruby@v1
47
+ with:
48
+ ruby-version: .ruby-version
49
+ bundler-cache: true
50
+
51
+ - name: Release gem
52
+ run: |
53
+ sudo apt-get update
54
+ sudo apt-get install -y oathtool
55
+ git config --global user.name "github-actions[bot]"
56
+ git config --global user.email "41898282+github-actions[bot]@users.noreply.github.com"
57
+ GEM_HOST_OTP_CODE=$(oathtool --totp -d 6 -b ${{ secrets.RUBYGEMS_OTP_SECRET }})\
58
+ bundle exec rake release
59
+ env:
60
+ GEM_HOST_API_KEY: ${{ secrets.RUBYGEMS_API_KEY }}
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- net-http-structured_field_values (0.1.0)
4
+ net-http-structured_field_values (0.1.2)
5
5
 
6
6
  GEM
7
7
  remote: https://rubygems.org/
data/README.md CHANGED
@@ -1,4 +1,4 @@
1
- # Net::Http::StructuredFieldValues
1
+ # Net::HTTP::StructuredFieldValues
2
2
 
3
3
  A Ruby implementation of [RFC 8941 - Structured Field Values for HTTP](https://datatracker.ietf.org/doc/html/rfc8941).
4
4
 
@@ -1,7 +1,9 @@
1
1
  # frozen_string_literal: true
2
2
 
3
+ require 'net/http'
4
+
3
5
  module Net
4
- module HTTP
6
+ class HTTP
5
7
  module StructuredFieldValues
6
8
  # ParameterizedValue represents a value with parameters.
7
9
  class ParameterizedValue
@@ -1,6 +1,7 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  require 'base64'
4
+ require 'net/http'
4
5
  require 'strscan'
5
6
 
6
7
  require 'net/http/structured_field_values/parameterized_value'
@@ -12,7 +13,7 @@ require 'net/http/structured_field_values/parameterized_value'
12
13
  # rubocop:enable Lint/MissingCopEnableDirective
13
14
 
14
15
  module Net
15
- module HTTP
16
+ class HTTP
16
17
  module StructuredFieldValues
17
18
  # RFC8941 compliant parser which parses HTTP fields into Ruby objects.
18
19
  #
@@ -1,7 +1,9 @@
1
1
  # frozen_string_literal: true
2
2
 
3
+ require 'net/http'
4
+
3
5
  module Net
4
- module HTTP
6
+ class HTTP
5
7
  module StructuredFieldValues
6
8
  # RFC8941 compliant serializer which serializes Ruby objects into HTTP fields.
7
9
  #
@@ -1,9 +1,11 @@
1
1
  # frozen_string_literal: true
2
2
 
3
+ require 'net/http'
4
+
3
5
  module Net
4
- module Http
6
+ class HTTP
5
7
  module StructuredFieldValues
6
- VERSION = '0.1.0'
8
+ VERSION = '0.1.2'
7
9
  end
8
10
  end
9
11
  end
@@ -1,11 +1,13 @@
1
1
  # frozen_string_literal: true
2
2
 
3
+ require 'net/http'
4
+
3
5
  require 'net/http/structured_field_values/parameterized_value'
4
6
  require 'net/http/structured_field_values/parser'
5
7
  require 'net/http/structured_field_values/version'
6
8
 
7
9
  module Net
8
- module Http
10
+ class HTTP
9
11
  # A Ruby implementation of RFC 8941 - Structured Field Values for HTTP.
10
12
  #
11
13
  # @see https://datatracker.ietf.org/doc/html/rfc8941
@@ -6,7 +6,7 @@ require 'net/http/structured_field_values/version'
6
6
 
7
7
  Gem::Specification.new do |spec|
8
8
  spec.name = 'net-http-structured_field_values'
9
- spec.version = Net::Http::StructuredFieldValues::VERSION
9
+ spec.version = Net::HTTP::StructuredFieldValues::VERSION
10
10
  spec.authors = ['kyori19']
11
11
  spec.email = ['kyori@accelf.net']
12
12
 
metadata CHANGED
@@ -1,16 +1,16 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: net-http-structured_field_values
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
  - kyori19
8
- autorequire:
8
+ autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2023-09-23 00:00:00.000000000 Z
11
+ date: 2023-09-24 00:00:00.000000000 Z
12
12
  dependencies: []
13
- description:
13
+ description:
14
14
  email:
15
15
  - kyori@accelf.net
16
16
  executables: []
@@ -19,6 +19,8 @@ extra_rdoc_files: []
19
19
  files:
20
20
  - ".github/workflows/check-actions.yml"
21
21
  - ".github/workflows/check-project.yml"
22
+ - ".github/workflows/print-version.rb"
23
+ - ".github/workflows/release-gem.yml"
22
24
  - ".gitignore"
23
25
  - ".rspec"
24
26
  - ".rubocop.yml"
@@ -45,7 +47,7 @@ metadata:
45
47
  rubygems_mfa_required: 'true'
46
48
  homepage_uri: https://github.com/kyori19/net-http-structured_field_values
47
49
  source_code_uri: https://github.com/kyori19/net-http-structured_field_values
48
- post_install_message:
50
+ post_install_message:
49
51
  rdoc_options: []
50
52
  require_paths:
51
53
  - lib
@@ -61,7 +63,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
61
63
  version: '0'
62
64
  requirements: []
63
65
  rubygems_version: 3.4.10
64
- signing_key:
66
+ signing_key:
65
67
  specification_version: 4
66
68
  summary: A Ruby implementation of RFC 8941 - Structured Field Values for HTTP
67
69
  test_files: []