Skip to content

Commit b3ddf7f

Browse files
committed
chore: add documentation server and adjust Ruby compatibility
- Add Rakefile task for local documentation server using WEBrick - Update Ruby version requirement to support 2.6-3.2 - Update configuration files and CI workflow accordingly - Update CHANGELOG.md release date
1 parent eb0d452 commit b3ddf7f

File tree

7 files changed

+28
-6
lines changed

7 files changed

+28
-6
lines changed

.github/workflows/main.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ jobs:
1717
strategy:
1818
matrix:
1919
os: [ubuntu-latest, macos-latest, windows-latest]
20-
ruby: ['3.2.3']
20+
ruby: ['2.6', '3.2']
2121

2222
runs-on: ${{ matrix.os }}
2323
name: Ruby ${{ matrix.ruby }} on ${{ matrix.os }}

.rubocop.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
AllCops:
2-
TargetRubyVersion: 3.0
2+
TargetRubyVersion: 2.6
33

44
Style/StringLiterals:
55
Enabled: true

CHANGELOG.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
1515
- Renamed main file from `lib/ta_lib.rb` to `lib/ta_lib_ffi.rb`
1616
- Updated require statements in specs and gemspec
1717

18-
## [0.1.0] - 2024-01-21
18+
## [0.1.0] - 2025-01-21
1919

2020
### Added
2121
- Initial release of ta_lib_ffi

Gemfile.lock

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,7 @@ GEM
6363
unicode-display_width (3.1.4)
6464
unicode-emoji (~> 4.0, >= 4.0.4)
6565
unicode-emoji (4.0.4)
66+
webrick (1.9.1)
6667

6768
PLATFORMS
6869
ruby
@@ -74,6 +75,7 @@ DEPENDENCIES
7475
rubocop-rspec (~> 3.3)
7576
ruby-lsp-rspec (~> 0.1.20)
7677
ta_lib_ffi!
78+
webrick (~> 1.9)
7779

7880
BUNDLED WITH
79-
2.5.6
81+
2.4.22

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ TALibFFI is a Ruby binding for [TA-Lib](https://ta-lib.org/) (Technical Analysis
88

99
## Requirements
1010

11-
- Ruby >= 3.0.0
11+
- Ruby >= 2.6.0
1212
- TA-Lib >= 0.6.4
1313

1414
## Installation

Rakefile

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,3 +10,22 @@ require "rubocop/rake_task"
1010
RuboCop::RakeTask.new
1111

1212
task default: %i[spec rubocop]
13+
14+
namespace :doc do
15+
desc "Start a local server to view RDoc documentation"
16+
task :server do
17+
require "webrick"
18+
server = WEBrick::HTTPServer.new(
19+
Port: 8808,
20+
DocumentRoot: File.expand_path("./doc"),
21+
AccessLog: [],
22+
Logger: WEBrick::Log.new(File::NULL)
23+
)
24+
25+
puts "Documentation server started at http://localhost:8808"
26+
puts "Press Ctrl+C to stop"
27+
28+
trap("INT") { server.shutdown }
29+
server.start
30+
end
31+
end

ta_lib_ffi.gemspec

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ Gem::Specification.new do |spec|
1111
spec.description = "A Ruby wrapper for TA-Lib using FFI, providing technical analysis functions for financial market data"
1212
spec.homepage = "https://github.com/TA-Lib/ta-lib-ruby"
1313
spec.license = "MIT"
14-
spec.required_ruby_version = ">= 3.0.0"
14+
spec.required_ruby_version = ">= 2.6.0"
1515
spec.metadata["allowed_push_host"] = "https://rubygems.org"
1616
spec.metadata["homepage_uri"] = spec.homepage
1717
spec.metadata["source_code_uri"] = "https://github.com/TA-Lib/ta-lib-ruby"
@@ -34,6 +34,7 @@ Gem::Specification.new do |spec|
3434
spec.add_development_dependency "rspec", "~> 3.13"
3535
spec.add_development_dependency "rubocop-rspec", "~> 3.3"
3636
spec.add_development_dependency "ruby-lsp-rspec", "~> 0.1.20"
37+
spec.add_development_dependency "webrick", "~> 1.9"
3738

3839
# For more information and examples about making a new gem, check out our
3940
# guide at: https://bundler.io/guides/creating_gem.html

0 commit comments

Comments
 (0)