包装红宝石宝石后缺少一些文件夹

时间:2016-01-12 10:44:50

标签: ruby rubygems

我在ext/extconf.rb ruby​​ gem的eventmachine-1.0.0文件中进行了一些编译更改,然后我运行了gem build

解压缩相同的gem之后,ext文件夹是单独的,剩下的文件夹丢失了。有什么想法吗?

在这里你可以找到日志:

eventmachine-1.0.0]$ ls
docs  eventmachine.gemspec  examples  ext  Gemfile  GNU  java  lib  LICENSE  Rakefile  rakelib  README.md  tests  tmp
eventmachine-1.0.0]$
eventmachine-1.0.0]$
eventmachine-1.0.0]$ gem build eventmachine.gemspec
  Successfully built RubyGem
  Name: eventmachine
  Version: 1.0.0
  File: eventmachine-1.0.0.gem
eventmachine-1.0.0]$
eventmachine-1.0.0]$
eventmachine-1.0.0]$ mkdir Temp
eventmachine-1.0.0]$
eventmachine-1.0.0]$ mv eventmachine-1.0.0.gem Temp
eventmachine-1.0.0]$
eventmachine-1.0.0]$ cd Temp/
Temp]$
Temp]$ gem unpack eventmachine-1.0.0.gem
Unpacked gem: '/home/irgpan/temp/ruby_gems/Gem_compile/eventmachine-1.0.0/Temp/eventmachine-1.0.0'
Temp]$
Temp]$ cd eventmachine-1.0.0/
eventmachine-1.0.0]$
eventmachine-1.0.0]$ ls
ext  README.md
eventmachine-1.0.0]$


**find the spec file below**

# -*- encoding: utf-8 -*-
require File.expand_path('../lib/em/version', __FILE__)

Gem::Specification.new do |s|
  s.name = 'eventmachine'
  s.version = EventMachine::VERSION
  s.homepage = 'http://rubyeventmachine.com'
  s.rubyforge_project = 'eventmachine'

  s.authors = ["Francis Cianfrocca", "Aman Gupta"]
  s.email   = ["garbagecat10@gmail.com", "aman@tmm1.net"]

  s.files = `git ls-files`.split("\n")
  s.extensions = ["ext/extconf.rb", "ext/fastfilereader/extconf.rb"]
  s.add_development_dependency 'rake-compiler', '~> 0.8.1'
  s.add_development_dependency 'yard', ">= 0.7.2"
  s.add_development_dependency 'bluecloth'

  s.summary = 'Ruby/EventMachine library'
  s.description = "EventMachine implements a fast, single-threaded engine for arbitrary network
communications. It's extremely easy to use in Ruby. EventMachine wraps all
interactions with IP sockets, allowing programs to concentrate on the
implementation of network protocols. It can be used to create both network
servers and clients. To create a server or client, a Ruby program only needs
to specify the IP address and port, and provide a Module that implements the
communications protocol. Implementations of several standard network protocols
are provided with the package, primarily to serve as examples. The real goal
of EventMachine is to enable programs to easily interface with other programs
using TCP/IP, especially if custom protocols are required."

  s.rdoc_options = ["--title", "EventMachine", "--main", "README.md", "-x", "lib/em/version", "-x", "lib/jeventmachine"]
  s.extra_rdoc_files = ["README.md"] + `git ls-files -- docs/*`.split("\n")
end

1 个答案:

答案 0 :(得分:0)

尝试在gem根目录的控制台中执行此操作:git add -A然后再次构建gem。

正如您在此处看到的那样s.files = git ls-files .split("\n")文件通过git ls-file cmd附加,因此您应该维护需要通过本地git存储库包含的文件。