chatpdf 1.0.1 → 1.0.3

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: 9a47d9b3731d5c619f7b0aa8098dc7e5a42540af691c88878d37b592e34425b0
4
- data.tar.gz: cdf237a65af3119680f7d712f19b73f78d0456ec79d061b1da5d1bada0fe9b2d
3
+ metadata.gz: 6ad26d10c64d768f198a3591155f1913bc212b281425ad890a18bb3a31a040d5
4
+ data.tar.gz: ae310766314c09d0aa5ce5f983afdec8feb5a02b78e61f011ee6e973e33f2894
5
5
  SHA512:
6
- metadata.gz: fc300f54db07b7969ca5a0507fe6f2d34c6ce62f0eb4d82f622c0155689841239dc3fa6e6a2de81be38cbd19b0272beccfd2d86298f0e35a9d36b32b2286bb1c
7
- data.tar.gz: 64e146a96eb7a27b8e7fcd5ed1e46a2267413414fc7e85b4cdd416aba520f078108bc7da89f1ef0891e92a16905d1acb667efa8b9692d63329338ac5afc640b0
6
+ metadata.gz: 9cff76ccd0c1b1ea021cff3dea3680f2423d504f3545653a24673a55bf24d3f5a5197782b3b9086f314f42cfb6b95488a045934307112a8e7bee34781d47308d
7
+ data.tar.gz: 6c3a1e04be6f1f743f699f8ce53b981502ab9c5cbf6731d5e73d5c812667140c054fdbca4cf080e0e842b97091d401aba0fa8d0ddecd56513aed19afdaf98207
data/CHANGELOG.md CHANGED
@@ -1,6 +1,13 @@
1
1
  ## [Unreleased]
2
2
  - None
3
3
 
4
+ ## [1.0.3] - 2025-06-03
5
+ - Update Gem details
6
+
7
+ ## [1.0.2] - 2025-06-03
8
+ - Allow working without Rails.
9
+ - Raise error if api key is not configured.
10
+
4
11
  ## [1.0.1] - 2025-06-03
5
12
  - Bump version 1.0.1
6
13
 
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- chatpdf (1.0.1)
4
+ chatpdf (1.0.3)
5
5
  httparty (~> 0.23.1)
6
6
 
7
7
  GEM
data/chatpdf.gemspec CHANGED
@@ -6,15 +6,17 @@ require 'chatpdf/version'
6
6
  Gem::Specification.new do |s|
7
7
  s.name = "chatpdf"
8
8
  s.version = Chatpdf::VERSION
9
- s.summary = "[WIP] ChatPDF ruby gem around the ChatPDF API"
10
- s.description = "[WIP] Chatpdf is a ruby gem around the ChatPDF API"
9
+ s.summary = "ChatPDF ruby gem around the ChatPDF API"
10
+ s.description = "Chatpdf is a ruby gem around the ChatPDF API"
11
11
  s.authors = ["Abhishek Kanojia"]
12
- s.email = "abhishek.kanojia3193@gmail.com"
12
+ s.email = "abhishekka3193@gmail.com"
13
+ s.homepage = "https://github.com/abhishekkanojia/chatpdf"
13
14
  s.files = `git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(test|spec|features)/}) }
14
15
  s.bindir = "exe"
15
16
  s.executables = s.files.grep(%r{^exe/}) { |f| File.basename(f) }
16
17
  s.homepage = "https://rubygems.org/gems/chatpdf"
17
18
  s.license = "MIT"
19
+ s.require_paths = ["lib"]
18
20
 
19
21
  s.add_development_dependency "rspec", "~> 3.12.0"
20
22
 
@@ -35,6 +35,7 @@ module Chatpdf
35
35
  end
36
36
 
37
37
  def api_key_or_raise
38
+ raise Chatpdf::InvalidConfiguration, "Chatpdf is not configured" if Chatpdf.configuration.nil?
38
39
  Chatpdf.configuration.api_key || raise(Chatpdf::InvalidConfiguration, "API key is not set")
39
40
  end
40
41
  end
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Chatpdf
4
- VERSION = "1.0.1"
4
+ VERSION = "1.0.3"
5
5
  end
data/lib/chatpdf.rb CHANGED
@@ -1,31 +1,27 @@
1
1
  # frozen_string_literal: true
2
2
 
3
+ require 'chatpdf/version'
3
4
  require 'chatpdf/configuration'
4
5
  require 'chatpdf/concerns/actionable'
5
-
6
6
  require 'chatpdf/client'
7
- require 'chatpdf/version'
8
-
9
7
  require 'chatpdf/api/base'
10
8
  require 'chatpdf/api/file_upload'
11
9
  require 'chatpdf/api/chat'
12
10
  require 'chatpdf/api/delete_source'
13
11
  require 'chatpdf/api/chat_stream'
14
-
15
12
  require 'chatpdf/exceptions/invalid_session_initialization'
16
13
  require 'chatpdf/exceptions/invalid_configuration'
17
-
18
14
  require 'chatpdf/session/question'
19
15
  require 'chatpdf/session/answer'
20
16
  require 'chatpdf/session/conversation'
21
17
  require 'chatpdf/message'
22
-
23
18
  require 'chatpdf/response_handler'
24
19
 
25
- Gem.find_files("chatpdf/**/*.rb").each { |path| require_relative path }
26
-
27
- require "chatpdf/railtie" if defined?(Rails)
28
-
20
+ begin
21
+ require "chatpdf/railtie" if defined?(Rails::Railtie)
22
+ rescue LoadError
23
+ # Rails is not present
24
+ end
29
25
 
30
26
  module Chatpdf
31
27
  class << self
@@ -34,6 +30,7 @@ module Chatpdf
34
30
 
35
31
  def self.configure
36
32
  self.configuration ||= Configuration.new
37
- yield(configuration)
33
+ yield(configuration) if block_given?
34
+ configuration
38
35
  end
39
36
  end
metadata CHANGED
@@ -1,13 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: chatpdf
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.1
4
+ version: 1.0.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Abhishek Kanojia
8
+ autorequire:
8
9
  bindir: exe
9
10
  cert_chain: []
10
- date: 1980-01-02 00:00:00.000000000 Z
11
+ date: 2025-06-03 00:00:00.000000000 Z
11
12
  dependencies:
12
13
  - !ruby/object:Gem::Dependency
13
14
  name: rspec
@@ -37,8 +38,8 @@ dependencies:
37
38
  - - "~>"
38
39
  - !ruby/object:Gem::Version
39
40
  version: 0.23.1
40
- description: "[WIP] Chatpdf is a ruby gem around the ChatPDF API"
41
- email: abhishek.kanojia3193@gmail.com
41
+ description: Chatpdf is a ruby gem around the ChatPDF API
42
+ email: abhishekka3193@gmail.com
42
43
  executables: []
43
44
  extensions: []
44
45
  extra_rdoc_files: []
@@ -80,6 +81,7 @@ homepage: https://rubygems.org/gems/chatpdf
80
81
  licenses:
81
82
  - MIT
82
83
  metadata: {}
84
+ post_install_message:
83
85
  rdoc_options: []
84
86
  require_paths:
85
87
  - lib
@@ -94,7 +96,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
94
96
  - !ruby/object:Gem::Version
95
97
  version: '0'
96
98
  requirements: []
97
- rubygems_version: 3.6.7
99
+ rubygems_version: 3.3.7
100
+ signing_key:
98
101
  specification_version: 4
99
- summary: "[WIP] ChatPDF ruby gem around the ChatPDF API"
102
+ summary: ChatPDF ruby gem around the ChatPDF API
100
103
  test_files: []