taql 0.2.5 → 0.2.7

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: 15ee79ff7f0dca8d5b599ca3ae84c95793acdfa1e8a46d66ac0fd57acbe98298
4
- data.tar.gz: 926398c4f0c84677638bbc15602336efbd0b5d56a96c74c5964bd51ddb750187
3
+ metadata.gz: b082583e00ba4c89bd7905a2c21226bc44145f559716a636c2f3e9d72ca6ee1b
4
+ data.tar.gz: 8b89177e2acdf34b5e176c9015493820e83a9cbb32a83f40a0b78e99fc669d0b
5
5
  SHA512:
6
- metadata.gz: 438695540cf0922a1b95138a1eaee8d98a0e618f895915b935420353759279305327f88c513a366edb5d0df29dfbdb3bbb46a527c1f78dfee74f43091bf21bba
7
- data.tar.gz: a60d55360eafafdc8f2ecdcded369c1287cc92cd032871af1ceb251162807631148b4ab4800c80d3c25a3f0a4fbf4cdf59e7f762614f716632e28a3037d73844
6
+ metadata.gz: c3e64fe6ca82e0d5312f8f77db5e71b5b497b3dca55fab05fb86628e50c649f1d8e6e62b18f20f69970edb88567b2ad37db99ae22878da7601f3c734b6112c69
7
+ data.tar.gz: 23b6985df223ba7ef6cba06989ab74c24dd0f37c7abde78151dd83b8196db020058aa8ba911b41b505846b3ca4f882b7d8b854f5b7244a0f28174c09c2a615d7
data/CHANGELOG.md CHANGED
@@ -1,5 +1,13 @@
1
1
  # Changelog
2
2
 
3
+ ## [0.2.7] - 2025-06-27
4
+
5
+ - Provide default options
6
+
7
+ ## [0.2.6] - 2025-05-17
8
+
9
+ - Fix version
10
+
3
11
  ## [0.2.5] - 2025-05-17
4
12
 
5
13
  - Added support for Markdown
data/README.md CHANGED
@@ -1,20 +1,20 @@
1
1
  # Taql
2
2
 
3
- TODO: Delete this and the text below, and describe your gem
4
-
5
- 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/taql`. To experiment with that code, run `bin/console` for an interactive prompt.
3
+ Taql is a lightweight Ruby gem that provides a convenient interface for executing SQL queries with beautifully formatted results. Whether you need a command-line SQL client for quick database exploration or a programmatic way to run queries within your Ruby application, Taql has you covered.
6
4
 
7
5
  ## Installation
8
6
 
9
- TODO: Replace `UPDATE_WITH_YOUR_GEM_NAME_IMMEDIATELY_AFTER_RELEASE_TO_RUBYGEMS_ORG` with your gem name right after releasing it to RubyGems.org. Please do not do it earlier due to security reasons. Alternatively, replace this section with instructions to install your gem from git if you don't plan to release to RubyGems.org.
10
-
11
7
  Install the gem and add to the application's Gemfile by executing:
12
8
 
13
- $ bundle add UPDATE_WITH_YOUR_GEM_NAME_IMMEDIATELY_AFTER_RELEASE_TO_RUBYGEMS_ORG
9
+ ```sh
10
+ $ bundle add taql
11
+ ```
14
12
 
15
13
  If bundler is not being used to manage dependencies, install the gem by executing:
16
14
 
17
- $ gem install UPDATE_WITH_YOUR_GEM_NAME_IMMEDIATELY_AFTER_RELEASE_TO_RUBYGEMS_ORG
15
+ ```sh
16
+ $ gem install taql
17
+ ```
18
18
 
19
19
  ## Usage
20
20
 
@@ -76,14 +76,18 @@ The return value is a native PG::Result object, which supports mapping or extrac
76
76
  | 20240815131806 |
77
77
  | 20240815131747 |
78
78
  +----------------+
79
- => \#<PG::Result:0x000000012ebf6a38 status=PGRES_TUPLES_OK ntuples=3 nfields=1 cmd_tuples=3>
79
+ => #<PG::Result:0x000000012ebf6a38 status=PGRES_TUPLES_OK ntuples=3 nfields=1 cmd_tuples=3>
80
80
  ```
81
81
 
82
82
  ## Development
83
83
 
84
84
  After checking out the repo, run `bin/setup` to install dependencies. Then, run `rake test` to run the tests. You can also run `bin/console` for an interactive prompt that will allow you to experiment.
85
85
 
86
- 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).
86
+ To install this gem onto your local machine, run `bundle exec rake install`.
87
+
88
+ ## Releasing
89
+
90
+ 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).
87
91
 
88
92
  ## Contributing
89
93
 
data/lib/taql/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module Taql
2
- VERSION = "0.2.5"
2
+ VERSION = "0.2.7"
3
3
  end
data/lib/taql.rb CHANGED
@@ -5,7 +5,7 @@ require_relative "taql/version"
5
5
  module Taql
6
6
  class Error < StandardError; end
7
7
 
8
- def self.execute(query, options, connection: ActiveRecord::Base.connection)
8
+ def self.execute(query, options = {}, connection: ActiveRecord::Base.connection)
9
9
  connection.execute(query).tap do |result|
10
10
  if (results = result.entries).any?
11
11
  $stdout.puts Table.new(results, markdown: options[:markdown])
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: taql
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.5
4
+ version: 0.2.7
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ariel Rzezak
@@ -51,7 +51,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
51
51
  - !ruby/object:Gem::Version
52
52
  version: '0'
53
53
  requirements: []
54
- rubygems_version: 3.6.7
54
+ rubygems_version: 3.6.9
55
55
  specification_version: 4
56
56
  summary: Tableize Rails SQL queries
57
57
  test_files: []