Skip to content

Commit ac35122

Browse files
committed
Rubocop
1 parent d625502 commit ac35122

File tree

9 files changed

+71
-42
lines changed

9 files changed

+71
-42
lines changed

.rubocop.yml

Lines changed: 24 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,28 @@
1+
plugins:
2+
- rubocop-rake
3+
- rubocop-rspec
4+
15
AllCops:
26
TargetRubyVersion: 3.2
7+
NewCops: enable
8+
9+
Lint/UnusedMethodArgument:
10+
AllowUnusedKeywordArguments: true
11+
12+
Metrics/AbcSize:
13+
Enabled: false
14+
15+
Metrics/CyclomaticComplexity:
16+
Enabled: false
17+
18+
Metrics/PerceivedComplexity:
19+
Enabled: false
20+
21+
Metrics/MethodLength:
22+
Enabled: false
323

4-
Style/StringLiterals:
5-
EnforcedStyle: double_quotes
24+
Metrics/ParameterLists:
25+
Enabled: false
626

7-
Style/StringLiteralsInInterpolation:
8-
EnforcedStyle: double_quotes
27+
Style/Documentation:
28+
Enabled: false

Gemfile

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,14 @@
11
# frozen_string_literal: true
22

3-
source "https://rubygems.org"
3+
source 'https://rubygems.org'
44

5-
# Specify your gem's dependencies in ruby_llm-docker.gemspec
5+
# Specify your gem's dependencies in docker_mcp.gemspec
66
gemspec
77

8-
gem "irb"
9-
gem "rake", "~> 13.0"
10-
11-
gem "rspec", "~> 3.0"
12-
13-
gem "rubocop", "~> 1.21"
8+
gem 'irb'
9+
gem 'rake'
10+
gem 'rspec'
11+
gem 'rubocop'
12+
gem 'rubocop-rake'
13+
gem 'rubocop-rspec'
14+
gem 'simplecov'

Rakefile

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
# frozen_string_literal: true
22

3-
require "bundler/gem_tasks"
4-
require "rspec/core/rake_task"
3+
require 'bundler/gem_tasks'
4+
require 'rspec/core/rake_task'
55

66
RSpec::Core::RakeTask.new(:spec)
77

8-
require "rubocop/rake_task"
8+
require 'rubocop/rake_task'
99

1010
RuboCop::RakeTask.new
1111

bin/console

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
#!/usr/bin/env ruby
22
# frozen_string_literal: true
33

4-
require "bundler/setup"
5-
require "ruby_llm/docker"
4+
require 'bundler/setup'
5+
require 'ruby_llm/docker'
66

77
# You can add fixtures and/or initialization code here to make experimenting
88
# with your gem easier. You can also use a different console, if you like.
99

10-
require "irb"
10+
require 'irb'
1111
IRB.start(__FILE__)

lib/ruby_llm/docker.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# frozen_string_literal: true
22

3-
require_relative "docker/version"
3+
require_relative 'docker/version'
44

55
module RubyLlm
66
module Docker

lib/ruby_llm/docker/version.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,6 @@
22

33
module RubyLlm
44
module Docker
5-
VERSION = "0.0.1"
5+
VERSION = '0.0.1'
66
end
77
end

ruby_llm-docker.gemspec

Lines changed: 20 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,23 @@
11
# frozen_string_literal: true
22

3-
require_relative "lib/ruby_llm/docker/version"
3+
require_relative 'lib/ruby_llm/docker/version'
44

55
Gem::Specification.new do |spec|
6-
spec.name = "ruby_llm-docker"
6+
spec.name = 'ruby_llm-docker'
77
spec.version = RubyLlm::Docker::VERSION
8-
spec.authors = ["Aaron F Stanton"]
9-
spec.email = ["afstanton@gmail.com"]
8+
spec.authors = ['Aaron F Stanton']
9+
spec.email = ['afstanton@gmail.com']
1010

11-
spec.summary = "A Ruby gem for interacting with Docker containers directly with RubyLLM."
12-
spec.description = "This gem provides a simple interface for managing Docker containers from Ruby via RubyLLM."
13-
spec.homepage = "https://github.com/afstanton/ruby_llm-docker"
14-
spec.license = "MIT"
15-
spec.required_ruby_version = ">= 3.2.0"
11+
spec.summary = 'A Ruby gem for interacting with Docker containers directly with RubyLLM.'
12+
spec.description = 'This gem provides a simple interface for managing Docker containers from Ruby via RubyLLM.'
13+
spec.homepage = 'https://github.com/afstanton/ruby_llm-docker'
14+
spec.license = 'MIT'
15+
spec.required_ruby_version = '>= 3.2.0'
1616

17-
spec.metadata["allowed_push_host"] = "https://rubygems.org"
18-
spec.metadata["homepage_uri"] = spec.homepage
19-
spec.metadata["source_code_uri"] = spec.homepage
17+
spec.metadata['allowed_push_host'] = 'https://rubygems.org'
18+
spec.metadata['homepage_uri'] = spec.homepage
19+
spec.metadata['source_code_uri'] = spec.homepage
20+
spec.metadata['rubygems_mfa_required'] = 'true'
2021

2122
# Specify which files should be added to the gem when it is released.
2223
# The `git ls-files -z` loads the files in the RubyGem that have been added into git.
@@ -27,13 +28,18 @@ Gem::Specification.new do |spec|
2728
f.start_with?(*%w[bin/ Gemfile .gitignore .rspec spec/ .github/ .rubocop.yml])
2829
end
2930
end
30-
spec.bindir = "exe"
31+
spec.bindir = 'exe'
3132
spec.executables = spec.files.grep(%r{\Aexe/}) { |f| File.basename(f) }
32-
spec.require_paths = ["lib"]
33+
spec.require_paths = ['lib']
3334

3435
# Uncomment to register a new dependency of your gem
3536
# spec.add_dependency "example-gem", "~> 1.0"
3637

38+
spec.add_dependency 'base64'
39+
spec.add_dependency 'docker-api'
40+
spec.add_dependency 'ruby_llm'
41+
spec.add_dependency 'zeitwerk'
42+
3743
# For more information and examples about making a new gem, check out our
3844
# guide at: https://bundler.io/guides/creating_gem.html
3945
end

spec/ruby_llm/docker_spec.rb

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,7 @@
11
# frozen_string_literal: true
22

33
RSpec.describe RubyLlm::Docker do
4-
it "has a version number" do
5-
expect(RubyLlm::Docker::VERSION).not_to be nil
6-
end
7-
8-
it "does something useful" do
9-
expect(false).to eq(true)
4+
it 'has a version number' do
5+
expect(RubyLlm::Docker::VERSION).not_to be_nil
106
end
117
end

spec/spec_helper.rb

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,16 @@
11
# frozen_string_literal: true
22

3-
require "ruby_llm/docker"
3+
require 'simplecov'
4+
5+
SimpleCov.start do
6+
enable_coverage :branch
7+
end
8+
9+
require 'ruby_llm/docker'
410

511
RSpec.configure do |config|
612
# Enable flags like --only-failures and --next-failure
7-
config.example_status_persistence_file_path = ".rspec_status"
13+
config.example_status_persistence_file_path = '.rspec_status'
814

915
# Disable RSpec exposing methods globally on `Module` and `main`
1016
config.disable_monkey_patching!

0 commit comments

Comments
 (0)