qodex-rails 0.1.7 → 0.1.9

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: 16721c7b0749a92cf79ba0e51ec16063a71f2e57110d6fd12a75def5d0c4c8b1
4
- data.tar.gz: 133dae5aa10a5b7fbf406997b23ae265212150ae36740e7a7d87ae570c24e626
3
+ metadata.gz: be575cfa95b47c2cedbd1b90f0e51b02ed7a7fffec9f3e66c931e80163c8d664
4
+ data.tar.gz: c51d7eceb44f936847593ba2b18b84cb4a1e2c0db85b3e9657d6d499bdda91e2
5
5
  SHA512:
6
- metadata.gz: e48e56a37f9905fd5740e81e5a942c6ee24d4a5218aa6565c3d29446b6ebc639f791936e7902395f17223b0c5675663681ef51a8cfacea0960015faf4f6393b6
7
- data.tar.gz: 0a58120daa94956608742aa0911a29c1fa307eeba6c5eb112f206943a757204fefbee96ea5babb8c55e449de534f230942a35a120709462f56a97fb76031418e
6
+ metadata.gz: 426406aa55371da0fcf01bf660a65a845930c5a2fffdc3c458a445ed6fb954af9237653af7ce9d5d5924f2bd692a7119474736355af5947d64e2bf96b8225983
7
+ data.tar.gz: 734240e481db0abe0637593af066a9e3dfc16d01669a33669e5e4bab0a07c52bdd390d29ba00221fa9585c5886d4158414c9285cee87f99aff9d4cc246b6a13c
data/README.md CHANGED
@@ -1,14 +1,14 @@
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
 
9
7
  Install the gem and add to the application's Gemfile by executing:
10
8
 
11
- $ bundle add qodex-rails
9
+ $ # Gemfile
10
+
11
+ gem 'qodex-rails'
12
12
 
13
13
  If bundler is not being used to manage dependencies, install the gem by executing:
14
14
 
@@ -17,22 +17,15 @@ If bundler is not being used to manage dependencies, install the gem by executin
17
17
  ## Configuration
18
18
  # config/initializers/qodex_rails.rb
19
19
 
20
+
20
21
  QodexRails.configure do |config|
21
- config.collection_name = 'Your_Collection_Name' # Name of the collection where logs will be stored
22
- config.api_key = 'Your_API_Key' # API key for authentication
23
- end
24
-
25
-
26
- ## Usage
27
-
28
- TODO: Write usage instructions here
29
-
30
- ## Development
31
-
32
- 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.
33
-
34
- 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).
35
-
22
+ # Your configuration settings for qodex-rails in the staging environment
23
+ project_name = Rails.application.class.module_parent_name rescue 'qodex'
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
26
+ config.api_key = 'Your API Key'
27
+ end
28
+
36
29
  ## Contributing
37
30
 
38
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.7"
5
+ VERSION = "0.1.9"
6
6
  end
7
7
  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.7"
2
+ VERSION = "0.1.9"
3
3
  end
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.7
4
+ version: 0.1.9
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-04 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,7 @@ 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
39
40
  - sig/qodex/rails.rbs
40
41
  homepage: https://qodex.ai
41
42
  licenses: