torn_ruby 1.0.0.beta → 1.1.1

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: 634648b6a0f1b778a74732e842844962d03e5465e2370a1609b8d1e252169c68
4
- data.tar.gz: 7a6dab61ee4e8baa1104e02e4d9aa34f056bb42f6b68b4befd2d6339002b3325
3
+ metadata.gz: 93cbf60f4a1194c373729ae08c968902e63c338804eebb9dee0144d4985249a3
4
+ data.tar.gz: fd9125832469562ac451872048c17f7eeaf938b8c85069381b69fd681a3412c0
5
5
  SHA512:
6
- metadata.gz: 1a60fc569c524c38d77190d59d0b1dc33160e55d1ffc9cfe84edac921a5b0ef6794a226ce696b342a13d8905d973b103f8376c6fd97c27bfdc649dfa8b7d6031
7
- data.tar.gz: b015d5e1d740f647529856a4794a1d454bcef39ebdc6dc873578c0d49e124295c14ac3c746df4cefb82c411aff7884cd9e125292970257cd882014f7f511dbb6
6
+ metadata.gz: fe1064178eb5e23417f175ac6e9c5c5749feece565c30afa3b1d8c786e94f8f8af666e9062911f15acf9174b10a6515f8bae9a56eae364ca9749db49406c6085
7
+ data.tar.gz: e8114c8aa4e4b9ddcc209ecbb8628e556bafbc6a30e5af27474339a1fca7a1188f4c777924cf4e437a0eec74f090027ac3119dd12b55e4380539c674e4b3ce35
data/CHANGELOG.md CHANGED
@@ -15,3 +15,11 @@
15
15
  - Improved internal architecture by extracting common logic to `Base` endpoint class
16
16
  - Added comprehensive test coverage for all v2 endpoints
17
17
  - Refactored and documented code for maintainability and clarity
18
+
19
+ ## [1.0.1.beta] - 2025-04-18
20
+
21
+ - Fix Docs
22
+
23
+ ## [1.1.0] - 2025-04-18
24
+
25
+ - Added `Key` endpoint
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- torn_ruby (0.1.0.beta)
4
+ torn_ruby (1.1.1)
5
5
 
6
6
  GEM
7
7
  remote: https://rubygems.org/
@@ -8,6 +8,7 @@ require_relative "endpoints/market"
8
8
  require_relative "endpoints/torn"
9
9
  require_relative "endpoints/racing"
10
10
  require_relative "endpoints/forum"
11
+ require_relative "endpoints/key"
11
12
  require_relative "user"
12
13
  require_relative "property"
13
14
  require_relative "faction"
@@ -16,6 +17,7 @@ require_relative "market"
16
17
  require_relative "torn"
17
18
  require_relative "racing"
18
19
  require_relative "forum"
20
+ require_relative "key"
19
21
 
20
22
  module TornRuby
21
23
  # Responsible for interacting with the Torn API
@@ -64,5 +66,10 @@ module TornRuby
64
66
  data = TornRuby::Endpoints::Forum.new(@api_key).fetch(path:, selections:)
65
67
  TornRuby::Forum.new(data)
66
68
  end
69
+
70
+ def key(path: nil, selections: nil)
71
+ data = TornRuby::Endpoints::Key.new(@api_key).fetch(path:, selections:)
72
+ TornRuby::Key.new(data)
73
+ end
67
74
  end
68
75
  end
@@ -0,0 +1,15 @@
1
+ # frozen_string_literal: true
2
+
3
+ require "uri"
4
+ require "net/http"
5
+ require "json"
6
+ require_relative "base"
7
+
8
+ module TornRuby
9
+ module Endpoints
10
+ # Responsible for interacting with the Torn City API's key endpoint.
11
+ class Key < Base
12
+ AVAILABLE_FIELDS = %i[info].freeze
13
+ end
14
+ end
15
+ end
@@ -0,0 +1,10 @@
1
+ # frozen_string_literal: true
2
+
3
+ require_relative "utils"
4
+ require_relative "base"
5
+
6
+ module TornRuby
7
+ # Responsible for representing an api key in the Torn City game.
8
+ class Key < Base
9
+ end
10
+ end
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module TornRuby
4
- VERSION = "1.0.0.beta"
4
+ VERSION = "1.1.1"
5
5
  end
data/torn_ruby.gemspec CHANGED
@@ -10,7 +10,7 @@ Gem::Specification.new do |spec|
10
10
 
11
11
  spec.summary = "A Ruby gem for interacting with the Torn City API, providing easy access to" \
12
12
  "game data and functionality."
13
- spec.description = "A Ruby gem that provides a convenient wrapper around the Torn City API." \
13
+ spec.description = "A Ruby gem that provides a convenient wrapper around the Torn City API. " \
14
14
  "Ideal for developers looking to integrate Torn City data into Ruby applications."
15
15
 
16
16
  spec.homepage = "https://github.com/ibramsterdam/torn_ruby"
@@ -19,6 +19,13 @@ Gem::Specification.new do |spec|
19
19
  spec.required_ruby_version = ">= 3.1.0"
20
20
 
21
21
  spec.metadata["allowed_push_host"] = "https://rubygems.org"
22
+ spec.metadata = {
23
+ "homepage_uri" => spec.homepage,
24
+ "source_code_uri" => "https://github.com/ibramsterdam/torn_ruby",
25
+ "changelog_uri" => "https://github.com/ibramsterdam/torn_ruby/blob/main/CHANGELOG.md",
26
+ "documentation_uri" => "https://github.com/ibramsterdam/torn_ruby#readme",
27
+ "bug_tracker_uri" => "https://github.com/ibramsterdam/torn_ruby/issues"
28
+ }
22
29
 
23
30
  # Specify which files should be added to the gem when it is released.
24
31
  # The `git ls-files -z` loads the files in the RubyGem that have been added into git.
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: torn_ruby
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.0.beta
4
+ version: 1.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Bram
@@ -37,8 +37,8 @@ dependencies:
37
37
  - - "~>"
38
38
  - !ruby/object:Gem::Version
39
39
  version: '0.15'
40
- description: A Ruby gem that provides a convenient wrapper around the Torn City API.Ideal
41
- for developers looking to integrate Torn City data into Ruby applications.
40
+ description: A Ruby gem that provides a convenient wrapper around the Torn City API.
41
+ Ideal for developers looking to integrate Torn City data into Ruby applications.
42
42
  email:
43
43
  - bramjanssen@hey.com
44
44
  executables: []
@@ -66,6 +66,7 @@ files:
66
66
  - lib/torn_ruby/endpoints/company.rb
67
67
  - lib/torn_ruby/endpoints/faction.rb
68
68
  - lib/torn_ruby/endpoints/forum.rb
69
+ - lib/torn_ruby/endpoints/key.rb
69
70
  - lib/torn_ruby/endpoints/market.rb
70
71
  - lib/torn_ruby/endpoints/property.rb
71
72
  - lib/torn_ruby/endpoints/racing.rb
@@ -73,6 +74,7 @@ files:
73
74
  - lib/torn_ruby/endpoints/user.rb
74
75
  - lib/torn_ruby/faction.rb
75
76
  - lib/torn_ruby/forum.rb
77
+ - lib/torn_ruby/key.rb
76
78
  - lib/torn_ruby/market.rb
77
79
  - lib/torn_ruby/property.rb
78
80
  - lib/torn_ruby/racing.rb
@@ -107,7 +109,11 @@ homepage: https://github.com/ibramsterdam/torn_ruby
107
109
  licenses:
108
110
  - MIT
109
111
  metadata:
110
- allowed_push_host: https://rubygems.org
112
+ homepage_uri: https://github.com/ibramsterdam/torn_ruby
113
+ source_code_uri: https://github.com/ibramsterdam/torn_ruby
114
+ changelog_uri: https://github.com/ibramsterdam/torn_ruby/blob/main/CHANGELOG.md
115
+ documentation_uri: https://github.com/ibramsterdam/torn_ruby#readme
116
+ bug_tracker_uri: https://github.com/ibramsterdam/torn_ruby/issues
111
117
  rdoc_options: []
112
118
  require_paths:
113
119
  - lib