From e4ea205947fb0824ac3ac9e8677e5a962884b29d Mon Sep 17 00:00:00 2001 From: kakubin Date: Mon, 10 Jun 2024 19:06:31 +0900 Subject: [PATCH] tweak --- .gitignore | 2 ++ .rubocop.yml | 5 +++++ bin/console | 11 ---------- bin/setup | 8 ------- factory_bot-scoped_sequence.gemspec | 27 +++++++----------------- spec/factory_bot/scoped_sequence_spec.rb | 8 +------ 6 files changed, 16 insertions(+), 45 deletions(-) delete mode 100755 bin/console delete mode 100755 bin/setup diff --git a/.gitignore b/.gitignore index b04a8c8..5c249f1 100644 --- a/.gitignore +++ b/.gitignore @@ -9,3 +9,5 @@ # rspec failure tracking .rspec_status + +Gemfile.lock diff --git a/.rubocop.yml b/.rubocop.yml index 762eebb..c7c68c7 100644 --- a/.rubocop.yml +++ b/.rubocop.yml @@ -1,5 +1,10 @@ AllCops: TargetRubyVersion: 3.0 + NewCops: disable + SuggestExtensions: false + +Style/Documentation: + Enabled: false Style/StringLiterals: EnforcedStyle: double_quotes diff --git a/bin/console b/bin/console deleted file mode 100755 index deb6a37..0000000 --- a/bin/console +++ /dev/null @@ -1,11 +0,0 @@ -#!/usr/bin/env ruby -# frozen_string_literal: true - -require "bundler/setup" -require "factory_bot/scoped_sequence" - -# You can add fixtures and/or initialization code here to make experimenting -# with your gem easier. You can also use a different console, if you like. - -require "irb" -IRB.start(__FILE__) diff --git a/bin/setup b/bin/setup deleted file mode 100755 index dce67d8..0000000 --- a/bin/setup +++ /dev/null @@ -1,8 +0,0 @@ -#!/usr/bin/env bash -set -euo pipefail -IFS=$'\n\t' -set -vx - -bundle install - -# Do any other automated setup that you need to do here diff --git a/factory_bot-scoped_sequence.gemspec b/factory_bot-scoped_sequence.gemspec index 5683bfd..5c84f53 100644 --- a/factory_bot-scoped_sequence.gemspec +++ b/factory_bot-scoped_sequence.gemspec @@ -8,33 +8,22 @@ Gem::Specification.new do |spec| spec.authors = ["kakubin"] spec.email = ["wetsand.wfs@gmail.com"] - spec.summary = "TODO: Write a short summary, because RubyGems requires one." - spec.description = "TODO: Write a longer description or delete this line." - spec.homepage = "TODO: Put your gem's website or public repo URL here." + spec.summary = "Extension to add scope to factory_bot's sequence" + spec.description = "Extension to add scope to factory_bot's sequence" + spec.homepage = "https://github.com/kakubin/factory_bot-scoped_sequence" spec.license = "MIT" spec.required_ruby_version = ">= 3.0.0" - spec.metadata["allowed_push_host"] = "TODO: Set to your gem server 'https://example.com'" + spec.metadata["allowed_push_host"] = "https://rubygems.org" spec.metadata["homepage_uri"] = spec.homepage - spec.metadata["source_code_uri"] = "TODO: Put your gem's public repo URL here." - spec.metadata["changelog_uri"] = "TODO: Put your gem's CHANGELOG.md URL here." - - # Specify which files should be added to the gem when it is released. - # The `git ls-files -z` loads the files in the RubyGem that have been added into git. - gemspec = File.basename(__FILE__) - spec.files = IO.popen(%w[git ls-files -z], chdir: __dir__, err: IO::NULL) do |ls| - ls.readlines("\x0", chomp: true).reject do |f| - (f == gemspec) || - f.start_with?(*%w[bin/ test/ spec/ features/ .git .github appveyor Gemfile]) - end - end - spec.bindir = "exe" - spec.executables = spec.files.grep(%r{\Aexe/}) { |f| File.basename(f) } + spec.metadata["source_code_uri"] = spec.homepage + + spec.files = Dir.glob("lib/**/*") + [File.basename(__FILE__)] spec.require_paths = ["lib"] # Uncomment to register a new dependency of your gem - # spec.add_dependency "example-gem", "~> 1.0" + spec.add_dependency "factory_bot" # For more information and examples about making a new gem, check out our # guide at: https://bundler.io/guides/creating_gem.html diff --git a/spec/factory_bot/scoped_sequence_spec.rb b/spec/factory_bot/scoped_sequence_spec.rb index 132c7f5..91a2dc0 100644 --- a/spec/factory_bot/scoped_sequence_spec.rb +++ b/spec/factory_bot/scoped_sequence_spec.rb @@ -1,11 +1,5 @@ # frozen_string_literal: true RSpec.describe FactoryBot::ScopedSequence do - it "has a version number" do - expect(FactoryBot::ScopedSequence::VERSION).not_to be nil - end - - it "does something useful" do - expect(false).to eq(true) - end + pending end