qodex-rails 0.1.8 → 0.1.10

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: 50c9fdf2734e600fcc50f191f56c69db6c3d573c15f45bda0e61db9971243d8e
4
- data.tar.gz: 7359015e40d8d9c9d1c03f3cc36b0a3f69e03a2deed88c897a56341a521423e3
3
+ metadata.gz: 412c62536ab0707422faa020f102a9c58a63f5ff475b2092ee28e86f6922bf1f
4
+ data.tar.gz: 2263a192cdf11f9e97a94a5f2664c354ce8d0cb1c728a20101141c3a37b15813
5
5
  SHA512:
6
- metadata.gz: '0960805548f39fc94b951164cbc7a3c1e1a0fbd0beab47d692949c6d3fb21c704e2eafdd06ec68a7af214906cd7949d517382e928e330cf160148f6f83116b56'
7
- data.tar.gz: f5b8974602327d861b001226325ede10bd819da4791d597a02cf33d48297e06d096ed9adb3ad0fcec06c3b42abb26acd6a0f49a531f4b17fd6d604ab19c076a4
6
+ metadata.gz: 25762008c98696dd7ef073f0db87717447d72b020d35ae19880c641acfc272ba9876dcf5d17c38f391e923a0a6b3d3281687c01aa82b75219e1aca46d3fb15c7
7
+ data.tar.gz: 8a4e7943394dba195e650157f41e347b922c8a0c3915927e79fdabe275175ad5736f266ed55a933104a023a05eb77e643e086f9e82d0853eb48b15c07d624c40
data/README.md CHANGED
@@ -1,8 +1,6 @@
1
1
  # Qodex::Rails
2
2
 
3
- Welcome to your new gem! In this directory, you'll find the files you need to be able to package up your Ruby library into a gem. Put your Ruby code in the file `lib/qodex/rails`. To experiment with that code, run `bin/console` for an interactive prompt.
4
-
5
- TODO: Delete this and the text above, and describe your gem
3
+ Qodex.ai leverages the power of AI to streamline and enhance your API testing processes. With its intuitive interface and intelligent capabilities, Qodex.ai allows developers and testers to automate their API testing workflows, ensuring robustness and reliability in deployed applications.
6
4
 
7
5
  ## Installation
8
6
 
@@ -10,9 +8,7 @@ Install the gem and add to the application's Gemfile by executing:
10
8
 
11
9
  $ # Gemfile
12
10
 
13
- group :staging do
14
- gem 'qodex-rails'
15
- end
11
+ gem 'qodex-rails'
16
12
 
17
13
  If bundler is not being used to manage dependencies, install the gem by executing:
18
14
 
@@ -21,32 +17,15 @@ If bundler is not being used to manage dependencies, install the gem by executin
21
17
  ## Configuration
22
18
  # config/initializers/qodex_rails.rb
23
19
 
20
+
24
21
  QodexRails.configure do |config|
25
- config.collection_name = 'Your_Collection_Name' # Name of the collection where logs will be stored
26
- config.api_key = 'Your_API_Key' # API key for authentication
27
- end
28
-
29
- # config/initializers/qodex_rails.rb
30
-
31
- if Rails.env.staging?
32
- QodexRails.configure do |config|
33
22
  # Your configuration settings for qodex-rails in the staging environment
34
23
  project_name = Rails.application.class.module_parent_name rescue 'qodex'
35
24
  config.collection_name = "#{project_name}-#{Rails.env}" # Name of the collection where logs will be stored
25
+ config.enabled_in_production = false # Set to true to enable in production
36
26
  config.api_key = 'Your API Key'
37
- end
38
- end
39
-
40
- ## Usage
41
-
42
- TODO: Write usage instructions here
43
-
44
- ## Development
45
-
46
- After checking out the repo, run `bin/setup` to install dependencies. You can also run `bin/console` for an interactive prompt that will allow you to experiment.
47
-
48
- To install this gem onto your local machine, run `bundle exec rake install`. To release a new version, update the version number in `version.rb`, and then run `bundle exec rake release`, which will create a git tag for the version, push git commits and the created tag, and push the `.gem` file to [rubygems.org](https://rubygems.org).
49
-
27
+ end
28
+
50
29
  ## Contributing
51
30
 
52
31
  Bug reports and pull requests are welcome on GitHub at https://github.com/[USERNAME]/qodex-rails. 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]/qodex-rails/blob/main/CODE_OF_CONDUCT.md).
@@ -2,6 +2,6 @@
2
2
 
3
3
  module Qodex
4
4
  module Rails
5
- VERSION = "0.1.8"
5
+ VERSION = "0.1.10"
6
6
  end
7
7
  end
@@ -5,6 +5,7 @@ module QodexRails
5
5
  def initialize
6
6
  @collection_name = nil
7
7
  @api_key = nil
8
+ @enabled_in_production = false
8
9
  end
9
10
  end
10
11
  end
@@ -10,6 +10,12 @@ module QodexRails
10
10
  end
11
11
 
12
12
  def call(env)
13
+
14
+ is_staging = Rails.env.staging?
15
+ enabled_in_production = Rails.env.production? && QodexRails.configuration.enabled_in_production
16
+
17
+ return @app.call(env) unless is_staging || enabled_in_production
18
+
13
19
  # Exit early if collection_name or api_key are not configured
14
20
  unless QodexRails.configuration.collection_name && QodexRails.configuration.api_key
15
21
  Rails.logger.warn "QodexRails: collection_name or api_key not configured. Skipping middleware."
@@ -1,3 +1,3 @@
1
1
  module QodexRails
2
- VERSION = "0.1.8"
2
+ VERSION = "0.1.10"
3
3
  end
Binary file
Binary file
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: qodex-rails
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.8
4
+ version: 0.1.10
5
5
  platform: ruby
6
6
  authors:
7
7
  - sid
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2023-10-09 00:00:00.000000000 Z
11
+ date: 2023-10-11 00:00:00.000000000 Z
12
12
  dependencies: []
13
13
  description: Intercept your rails application to power Qodex.ai AI copilot.
14
14
  email:
@@ -36,6 +36,8 @@ files:
36
36
  - qodex-rails-0.1.3.gem
37
37
  - qodex-rails-0.1.4.gem
38
38
  - qodex-rails-0.1.5.gem
39
+ - qodex-rails-0.1.8.gem
40
+ - qodex-rails-0.1.9.gem
39
41
  - sig/qodex/rails.rbs
40
42
  homepage: https://qodex.ai
41
43
  licenses: