gpt4 book ai didi

ruby - 项目骨架

转载 作者:太空宇宙 更新时间:2023-11-03 16:00:35 25 4
gpt4 key购买 nike

<分区>

我无法制作项目框架。 TEST_NAME.rb:

    require "./lib/NAME.rb"
require "test/unit"

class TestNAME < Test::Unit::TestCase

def test_sample
assert_equal(4, 2+2)
end

end

gemspec 文件名 NAME.gemspec 将描述我们的项目:

    # coding: utf-8
lib = File.expand_path('../lib', __FILE__)
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)

Gem::Specification.new do |spec|
spec.name = "NAME"
spec.version = '1.0'
spec.authors = ["Yanzhe"]
spec.email = ["awesomeyanzhe@gmail.com"]
spec.summary = %q{About me}
spec.description = %q{This page is mainly about me.}
spec.homepage = "http://yanzhefeng.com/"
spec.license = "MIT"

spec.files = ['lib/NAME.rb']
spec.executables = ['bin/NAME']
spec.test_files = ['tests/test_NAME.rb']
spec.require_paths = ["lib"]
end

当你完成所有这些设置后,你的目录应该和我的一样:

    skeleton/
NAME.gemspec
Rakefile
data
ext/
tests/
bin/
NAME
doc/
lib/
NAME
NAME.rb
lib/NAME
tests/
test_NAME.rb

任何答案都可以

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com