rack-handlers 0.7.0 → 0.7.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: e1f85445dc157422692fc335ec353709730565f5
4
- data.tar.gz: 7dc71015543eeaf78efd5dbfdd762647d6a11e79
3
+ metadata.gz: ff0a48e72ea02eb70e8123a00c158deb3959967f
4
+ data.tar.gz: 4376da2d796d2ddc2d7afb5bffd7a5adbd307ef2
5
5
  SHA512:
6
- metadata.gz: e37e57db9417a09ce77161e88b650e7f66814d2b3a8abc7e85462fc04903b4c2913bf3ee22eda593a4bcbab9fe179c06626e0e63e25e8f44e92a76779ecacda7
7
- data.tar.gz: 79bd7d6685695cc3f1fe53760559bde8f7d87a7ee43ff2e9a452a5ba19d206a27868321ef69db0ec3c2e2f8b2d1e8d650cf4c2043c17bb952b8fc416d75977f7
6
+ metadata.gz: 0134a1d29d980d25f78b00469bb9304eb3448f60196c3744d28a0231e23ba8a097cf551e75c7c9454b5599a8c75f11506bf11f12a2aa2aa23571e2acfbbd188a
7
+ data.tar.gz: 934d940b9eedcd21e52c5d9cb1a787b57f2f8a981e3546b36f811e0e0ba9a08f92c2e4f84deb42f169fedff7a131672abe2bf3abf2b287e460bd2ad92eac4623
data/.gitignore CHANGED
@@ -1,2 +1,2 @@
1
- pkg
1
+ /pkg/
2
2
  *.rbc
data/README.md CHANGED
@@ -15,7 +15,7 @@ Unicorn family Rack handlers for you. Mostly for `rails s`.
15
15
  ## REQUIREMENTS:
16
16
 
17
17
  * Rack
18
- * The web server you want to use (e.g. unicorn, rainbows, zbatery, etc).
18
+ * The web server you want to use (e.g. unicorn, yahns, rainbows, zbatery, etc)
19
19
 
20
20
  ## INSTALLATION:
21
21
 
@@ -27,12 +27,14 @@ Put `'rack-handlers'` and your favorite unicorns into Gemfile
27
27
  then you could do the followings:
28
28
 
29
29
  rails s unicorn
30
+ rails s yahns
30
31
  rails s rainbows
31
32
  rails s zbatery
32
33
 
33
34
  Because requiring `'rack-handlers'` would make `Rack::Handler.default`
34
35
  pick the server with the following order:
35
36
 
37
+ * yahns
36
38
  * zbatery
37
39
  * rainbows
38
40
  * unicorn
@@ -43,8 +45,8 @@ pick the server with the following order:
43
45
  Thus if you have rainbows installed, `rails s` would launch the server with
44
46
  rainbows instead of webrick (the original behaviour).
45
47
 
46
- Additionally, it would also try to load the config via `config/zbatery.rb`,
47
- or `config/rainbows.rb` depending on which server is picked.
48
+ Additionally, it would also try to load the config via `config/yahns.rb`,
49
+ or `config/unicorn.rb` depending on which server is picked.
48
50
 
49
51
  For people who likes to run `rails s`!
50
52
 
@@ -56,7 +58,7 @@ For people who likes to run `rails s`!
56
58
 
57
59
  Apache License 2.0
58
60
 
59
- Copyright (c) 2012-2013, Lin Jen-Shin (godfat)
61
+ Copyright (c) 2012-2015, Lin Jen-Shin (godfat)
60
62
 
61
63
  Licensed under the Apache License, Version 2.0 (the "License");
62
64
  you may not use this file except in compliance with the License.
data/Rakefile CHANGED
@@ -1,17 +1,14 @@
1
1
 
2
- require "#{dir = File.dirname(__FILE__)}/task/gemgem"
3
- Gemgem.dir = dir
4
-
5
- ($LOAD_PATH << File.expand_path("#{Gemgem.dir}/lib")).uniq!
6
-
7
- desc 'Generate gemspec'
8
- task 'gem:spec' do
9
- Gemgem.spec = Gemgem.create do |s|
10
- s.name = 'rack-handlers'
11
- s.version = '0.7.0'
12
-
13
- %w[rack].each{ |g| s.add_runtime_dependency(g) }
14
- end
2
+ begin
3
+ require "#{dir = File.dirname(__FILE__)}/task/gemgem"
4
+ rescue LoadError
5
+ sh 'git submodule update --init'
6
+ exec Gem.ruby, '-S', $PROGRAM_NAME, *ARGV
7
+ end
15
8
 
16
- Gemgem.write
9
+ Gemgem.init(dir) do |s|
10
+ s.name = 'rack-handlers'
11
+ s.version = '0.7.1'
12
+ %w[rack].each{ |g| s.add_runtime_dependency(g) }
13
+ %w[unicorn yahns rainbows zbatery]
17
14
  end
data/lib/rack-handlers.rb CHANGED
@@ -4,7 +4,7 @@
4
4
  require 'rack/handler'
5
5
 
6
6
  module Rack::Handler
7
- DEFAULT = %w[zbatery rainbows unicorn puma thin webrick]
7
+ DEFAULT = %w[yahns zbatery rainbows unicorn puma thin webrick]
8
8
 
9
9
  def self.default(options = {})
10
10
  # Guess.
@@ -1,6 +1,6 @@
1
1
 
2
2
  if ARGV[0] && ARGV[0] == 'server'[0, ARGV[0].size] && ARGV[1] !~ /^\w+/
3
- server = %w[zbatery rainbows unicorn puma thin webrick].find do |s|
3
+ server = %w[yahns zbatery rainbows unicorn puma thin webrick].find do |s|
4
4
  begin
5
5
  require s
6
6
  true
@@ -12,14 +12,17 @@ class Rack::Handler::Unicorn
12
12
  config_path = "#{File.dirname(opts[:config])}/config/#{server_name}.rb"
13
13
  config_file = config_path if File.exist?(config_path)
14
14
 
15
- server = server_class.new(app,
16
- :listeners => "#{opts[:Host]}:#{opts[:Port]}",
17
- :config_file => config_file)
15
+ server = initialize_server(app, opts, config_file)
18
16
 
19
17
  yield(server) if block_given?
20
18
 
21
19
  server.start.join
22
20
  end
21
+
22
+ def self.initialize_server app, opts, config_file
23
+ server_class.new(app, :listeners => "#{opts[:Host]}:#{opts[:Port]}",
24
+ :config_file => config_file)
25
+ end
23
26
  end
24
27
 
25
28
  Rack::Handler.register('unicorn', Rack::Handler::Unicorn)
@@ -0,0 +1,15 @@
1
+
2
+ require 'yahns'
3
+ require 'rack/handler/unicorn'
4
+
5
+ class Rack::Handler::Yahns < Rack::Handler::Unicorn
6
+ def self.initialize_server app, opts, config_file
7
+ config = ::Yahns::Config.new(config_file)
8
+ config.app(:rack, app) do
9
+ listen("#{opts[:Host]}:#{opts[:Port]}")
10
+ end
11
+ ::Yahns::Server.new(config)
12
+ end
13
+ end
14
+
15
+ Rack::Handler.register('yahns', Rack::Handler::Yahns)
@@ -1,12 +1,14 @@
1
1
  # -*- encoding: utf-8 -*-
2
+ # stub: rack-handlers 0.7.1 ruby lib
2
3
 
3
4
  Gem::Specification.new do |s|
4
5
  s.name = "rack-handlers"
5
- s.version = "0.7.0"
6
+ s.version = "0.7.1"
6
7
 
7
8
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
9
+ s.require_paths = ["lib"]
8
10
  s.authors = ["Lin Jen-Shin (godfat)"]
9
- s.date = "2013-08-22"
11
+ s.date = "2015-12-12"
10
12
  s.description = "Unicorn family Rack handlers for you. Mostly for `rails s`."
11
13
  s.email = ["godfat (XD) godfat.org"]
12
14
  s.files = [
@@ -19,13 +21,14 @@ Gem::Specification.new do |s|
19
21
  "lib/rack/handler/rails-server.rb",
20
22
  "lib/rack/handler/rainbows.rb",
21
23
  "lib/rack/handler/unicorn.rb",
24
+ "lib/rack/handler/yahns.rb",
22
25
  "lib/rack/handler/zbatery.rb",
23
26
  "rack-handlers.gemspec",
24
27
  "task/.gitignore",
25
28
  "task/gemgem.rb"]
26
29
  s.homepage = "https://github.com/godfat/rack-handlers"
27
- s.require_paths = ["lib"]
28
- s.rubygems_version = "2.0.6"
30
+ s.licenses = ["Apache License 2.0"]
31
+ s.rubygems_version = "2.5.0"
29
32
  s.summary = "Unicorn family Rack handlers for you. Mostly for `rails s`."
30
33
 
31
34
  if s.respond_to? :specification_version then
data/task/gemgem.rb CHANGED
@@ -1,177 +1,173 @@
1
1
 
2
- require 'pathname'
3
-
4
2
  module Gemgem
5
3
  class << self
6
- attr_accessor :dir, :spec
4
+ attr_accessor :dir, :spec, :spec_create
7
5
  end
8
6
 
9
7
  module_function
8
+ def gem_tag ; "#{spec.name}-#{spec.version}" ; end
9
+ def gem_path ; "#{pkg_dir}/#{gem_tag}.gem" ; end
10
+ def spec_path ; "#{dir}/#{spec.name}.gemspec" ; end
11
+ def pkg_dir ; "#{dir}/pkg" ; end
12
+ def escaped_dir; @escaped_dir ||= Regexp.escape(dir); end
13
+
14
+ def init dir, &block
15
+ self.dir = dir
16
+ $LOAD_PATH.unshift("#{dir}/lib")
17
+ ENV['RUBYLIB'] = "#{dir}/lib:#{ENV['RUBYLIB']}"
18
+ ENV['PATH'] = "#{dir}/bin:#{ENV['PATH']}"
19
+ self.spec_create = block
20
+ end
21
+
10
22
  def create
11
- yield(spec = Gem::Specification.new{ |s|
23
+ spec = Gem::Specification.new do |s|
12
24
  s.authors = ['Lin Jen-Shin (godfat)']
13
25
  s.email = ['godfat (XD) godfat.org']
14
26
 
15
27
  s.description = description.join
16
28
  s.summary = description.first
29
+ s.license = readme['LICENSE'].sub(/.+\n\n/, '').lines.first.strip
17
30
 
18
- s.rubygems_version = Gem::VERSION
19
- s.date = Time.now.strftime('%Y-%m-%d')
20
- s.files = gem_files
21
- s.test_files = gem_files.grep(%r{^test/(.+?/)*test_.+?\.rb$})
22
- s.executables = Dir['bin/*'].map{ |f| File.basename(f) }
23
- s.require_paths = %w[lib]
24
- })
25
- spec.homepage ||= "https://github.com/godfat/#{spec.name}"
26
- spec
31
+ s.date = Time.now.strftime('%Y-%m-%d')
32
+ s.files = gem_files
33
+ s.test_files = test_files
34
+ s.executables = bin_files
35
+ end
36
+ spec_create.call(spec)
37
+ spec.homepage = "https://github.com/godfat/#{spec.name}"
38
+ self.spec = spec
27
39
  end
28
40
 
29
- def readme
30
- path = %w[README.md README].find{ |name|
31
- File.exist?("#{Gemgem.dir}/#{name}")
32
- }
33
- @readme ||=
34
- if path
35
- ps = "##{File.read(path)}".
36
- scan(/((#+)[^\n]+\n\n.+?(?=\n\n\2[^#\n]+\n))/m).map(&:first)
37
- ps.inject({'HEADER' => ps.first}){ |r, s, i|
38
- r[s[/\w+/]] = s
39
- r
40
- }
41
+ def write
42
+ File.open(spec_path, 'w'){ |f| f << split_lines(spec.to_ruby) }
43
+ end
44
+
45
+ def split_lines ruby
46
+ ruby.gsub(/(.+?)\s*=\s*\[(.+?)\]/){ |s|
47
+ if $2.index(',')
48
+ "#{$1} = [\n #{$2.split(',').map(&:strip).join(",\n ")}]"
41
49
  else
42
- {}
50
+ s
43
51
  end
52
+ }
44
53
  end
45
54
 
46
- def description
47
- @description ||= (readme['DESCRIPTION']||'').sub(/.+\n\n/, '').lines.to_a
55
+ def strip_path path
56
+ strip_home_path(strip_cwd_path(path))
48
57
  end
49
58
 
50
- def changes
51
- path = %w[CHANGES.md CHANGES].find{ |name|
52
- File.exist?("#{Gemgem.dir}/#{name}")
53
- }
54
- @changes ||=
55
- if path
56
- date = '\d+{4}\-\d+{2}\-\d{2}'
57
- File.read(path).match(
58
- /([^\n]+#{date}\n\n(.+?))(?=\n\n[^\n]+#{date}\n|\Z)/m)[1]
59
- else
60
- ''
61
- end
59
+ def strip_home_path path
60
+ path.sub(ENV['HOME'], '~')
62
61
  end
63
62
 
64
- def ann_md
65
- "#{readme['HEADER'].sub(/([\w\-]+)/, "[\\1](#{spec.homepage})")}\n\n" \
66
- "##{readme['DESCRIPTION'][/[^\n]+\n\n[^\n]+/]}\n\n" \
67
- "### CHANGES:\n\n" \
68
- "###{changes}\n\n" \
69
- "##{readme['INSTALLATION']}\n\n" +
70
- if readme['SYNOPSIS'] then "##{readme['SYNOPSIS'][/[^\n]+\n\n[^\n]+/]}"
71
- else '' end
63
+ def strip_cwd_path path
64
+ path.sub(Dir.pwd, '.')
72
65
  end
73
66
 
74
- def ann_html
75
- gem 'nokogiri'
76
- gem 'kramdown'
77
-
78
- IO.popen('kramdown', 'r+') do |md|
79
- md.puts Gemgem.ann_md
80
- md.close_write
81
- require 'nokogiri'
82
- html = Nokogiri::XML.parse("<gemgem>#{md.read}</gemgem>")
83
- html.css('*').each{ |n| n.delete('id') }
84
- html.root.children.to_html
85
- end
67
+ def git *args
68
+ `git --git-dir=#{dir}/.git #{args.join(' ')}`
86
69
  end
87
70
 
88
- def ann_email
89
- "#{readme['HEADER'].sub(/([\w\-]+)/, "\\1 <#{spec.homepage}>")}\n\n" \
90
- "#{readme['DESCRIPTION']}\n\n" \
91
- "#{readme['INSTALLATION']}\n\n" +
92
- if readme['SYNOPSIS'] then "##{readme['SYNOPSIS']}\n\n" else '' end +
93
- "## CHANGES:\n\n" \
94
- "##{changes}\n\n"
71
+ def sh_git *args
72
+ Rake.sh('git', "--git-dir=#{dir}/.git", *args)
95
73
  end
96
74
 
97
- def gem_tag
98
- "#{spec.name}-#{spec.version}"
75
+ def sh_gem *args
76
+ Rake.sh(Gem.ruby, '-S', 'gem', *args)
99
77
  end
100
78
 
101
- def write
102
- File.open("#{dir}/#{spec.name}.gemspec", 'w'){ |f|
103
- f << split_lines(spec.to_ruby) }
79
+ def glob path=dir
80
+ Dir.glob("#{path}/**/*", File::FNM_DOTMATCH)
104
81
  end
105
82
 
106
- def split_lines ruby
107
- ruby.gsub(/(.+?)\[(.+?)\]/){ |s|
108
- if $2.index(',')
109
- "#{$1}[\n #{$2.split(',').map(&:strip).join(",\n ")}]"
83
+ def readme
84
+ @readme ||=
85
+ if (path = "#{Gemgem.dir}/README.md") && File.exist?(path)
86
+ ps = "##{File.read(path)}".
87
+ scan(/((#+)[^\n]+\n\n.+?(?=(\n\n\2[^#\n]+\n)|\Z))/m).map(&:first)
88
+ ps.inject('HEADER' => ps.first){ |r, s, i|
89
+ r[s[/\w+/]] = s
90
+ r
91
+ }
110
92
  else
111
- s
93
+ {}
112
94
  end
113
- }
95
+ end
96
+
97
+ def description
98
+ # JRuby String#lines is returning an enumerator
99
+ @description ||= (readme['DESCRIPTION']||'').sub(/.+\n\n/, '').lines.to_a
114
100
  end
115
101
 
116
102
  def all_files
117
- @all_files ||= find_files(Pathname.new(dir)).map{ |file|
118
- if file.to_s =~ %r{\.git/|\.git$}
119
- nil
103
+ @all_files ||= fold_files(glob).sort
104
+ end
105
+
106
+ def fold_files files
107
+ files.inject([]){ |r, path|
108
+ if File.file?(path) && path !~ %r{/\.git(/|$)} &&
109
+ (rpath = path[%r{^#{escaped_dir}/(.*$)}, 1])
110
+ r << rpath
111
+ elsif File.symlink?(path) # walk into symlinks...
112
+ r.concat(fold_files(glob(File.expand_path(path,
113
+ File.readlink(path)))))
120
114
  else
121
- file.to_s
115
+ r
122
116
  end
123
- }.compact.sort
117
+ }
124
118
  end
125
119
 
126
120
  def gem_files
127
- @gem_files ||= all_files - ignored_files
121
+ @gem_files ||= all_files.reject{ |f|
122
+ f =~ ignored_pattern && !git_files.include?(f)
123
+ }
128
124
  end
129
125
 
130
- def ignored_files
131
- @ignored_file ||= all_files.select{ |path| ignore_patterns.find{ |ignore|
132
- path =~ ignore && !git_files.include?(path)}}
126
+ def test_files
127
+ @test_files ||= gem_files.grep(%r{^test/(.+?/)*test_.+?\.rb$})
128
+ end
129
+
130
+ def bin_files
131
+ @bin_files ||= gem_files.grep(%r{^bin/}).map{ |f| File.basename(f) }
133
132
  end
134
133
 
135
134
  def git_files
136
135
  @git_files ||= if File.exist?("#{dir}/.git")
137
- `git ls-files`.split("\n")
136
+ git('ls-files').split("\n")
138
137
  else
139
138
  []
140
139
  end
141
140
  end
142
141
 
143
- # protected
144
- def find_files path
145
- path.children.select(&:file?).map{|file| file.to_s[(dir.size+1)..-1]} +
146
- path.children.select(&:directory?).map{|dir| find_files(dir)}.flatten
142
+ def ignored_files
143
+ @ignored_files ||= all_files.grep(ignored_pattern)
147
144
  end
148
145
 
149
- def ignore_patterns
150
- @ignore_files ||= expand_patterns(
151
- gitignore.split("\n").reject{ |pattern|
152
- pattern.strip == ''
153
- }).map{ |pattern| %r{^([^/]+/)*?#{Regexp.escape(pattern)}(/[^/]+)*?$} }
146
+ def ignored_pattern
147
+ @ignored_pattern ||= Regexp.new(expand_patterns(gitignore).join('|'))
154
148
  end
155
149
 
156
150
  def expand_patterns pathes
157
- pathes.map{ |path|
158
- if path !~ /\*/
159
- path
160
- else
161
- expand_patterns(
162
- Dir[path] +
163
- Pathname.new(File.dirname(path)).children.select(&:directory?).
164
- map{ |prefix| "#{prefix}/#{File.basename(path)}" })
151
+ # http://git-scm.com/docs/gitignore
152
+ pathes.flat_map{ |path|
153
+ case path
154
+ when %r{\*}
155
+ Regexp.escape(path).gsub(/\\\*/, '[^/]*')
156
+ when %r{^/}
157
+ "^#{Regexp.escape(path[1..-1])}"
158
+ else # we didn't implement negative pattern for now
159
+ Regexp.escape(path)
165
160
  end
166
- }.flatten
161
+ }
167
162
  end
168
163
 
169
164
  def gitignore
170
- if File.exist?(path = "#{dir}/.gitignore")
171
- File.read(path)
172
- else
173
- ''
174
- end
165
+ @gitignore ||= if File.exist?(path = "#{dir}/.gitignore")
166
+ File.read(path).lines.
167
+ reject{ |l| l == /^\s*(#|\s+$)/ }.map(&:strip)
168
+ else
169
+ []
170
+ end
175
171
  end
176
172
  end
177
173
 
@@ -179,22 +175,37 @@ namespace :gem do
179
175
 
180
176
  desc 'Install gem'
181
177
  task :install => [:build] do
182
- sh("#{Gem.ruby} -S gem install pkg/#{Gemgem.gem_tag}.gem")
178
+ Gemgem.sh_gem('install', Gemgem.gem_path)
183
179
  end
184
180
 
185
181
  desc 'Build gem'
186
182
  task :build => [:spec] do
187
- sh("#{Gem.ruby} -S gem build #{Gemgem.spec.name}.gemspec")
188
- sh("mkdir -p pkg")
189
- sh("mv #{Gemgem.gem_tag}.gem pkg/")
183
+ require 'fileutils'
184
+ require 'rubygems/package'
185
+ gem = nil
186
+ Dir.chdir(Gemgem.dir) do
187
+ gem = Gem::Package.build(Gem::Specification.load(Gemgem.spec_path))
188
+ FileUtils.mkdir_p(Gemgem.pkg_dir)
189
+ FileUtils.mv(gem, Gemgem.pkg_dir) # gem is relative path, but might be ok
190
+ end
191
+ puts "\e[35mGem built: \e[33m" \
192
+ "#{Gemgem.strip_path("#{Gemgem.pkg_dir}/#{gem}")}\e[0m"
193
+ end
194
+
195
+ desc 'Generate gemspec'
196
+ task :spec do
197
+ Gemgem.create
198
+ Gemgem.write
190
199
  end
191
200
 
192
201
  desc 'Release gem'
193
202
  task :release => [:spec, :check, :build] do
194
- sh("git tag #{Gemgem.gem_tag}")
195
- sh("git push")
196
- sh("git push --tags")
197
- sh("#{Gem.ruby} -S gem push pkg/#{Gemgem.gem_tag}.gem")
203
+ Gemgem.module_eval do
204
+ sh_git('tag', Gemgem.gem_tag)
205
+ sh_git('push')
206
+ sh_git('push', '--tags')
207
+ sh_gem('push', Gemgem.gem_path)
208
+ end
198
209
  end
199
210
 
200
211
  task :check do
@@ -217,51 +228,37 @@ end # of gem namespace
217
228
 
218
229
  desc 'Run tests in memory'
219
230
  task :test do
231
+ next if Gemgem.test_files.empty?
232
+
220
233
  require 'bacon'
221
234
  Bacon.extend(Bacon::TestUnitOutput)
222
235
  Bacon.summary_on_exit
223
- $LOAD_PATH.unshift('lib')
224
- Dir['./test/**/test_*.rb'].each{ |file| require file[0..-4] }
225
- end
226
-
227
- desc 'Run tests with shell'
228
- task 'test:shell', :RUBY_OPTS do |t, args|
229
- files = Dir['test/**/test_*.rb'].join(' ')
230
-
231
- cmd = [Gem.ruby, args[:RUBY_OPTS],
232
- '-I', 'lib', '-S', 'bacon', '--quiet', files]
233
-
234
- sh(cmd.compact.join(' '))
236
+ Gemgem.test_files.each{ |file| require "#{Gemgem.dir}/#{file[0..-4]}" }
235
237
  end
236
238
 
237
- desc 'Generate ann markdown'
238
- task 'ann:md' => ['gem:spec'] do
239
- puts Gemgem.ann_md
240
- end
239
+ desc 'Remove ignored files'
240
+ task :clean => ['gem:spec'] do
241
+ next if Gemgem.ignored_files.empty?
241
242
 
242
- desc 'Generate ann html'
243
- task 'ann:html' => ['gem:spec'] do
244
- puts Gemgem.ann_html
245
- end
243
+ require 'fileutils'
244
+ trash = File.expand_path("~/.Trash/#{Gemgem.spec.name}")
245
+ puts "Move the following files into:" \
246
+ " \e[35m#{Gemgem.strip_path(trash)}\e[33m"
246
247
 
247
- desc 'Generate ann email'
248
- task 'ann:email' => ['gem:spec'] do
249
- puts Gemgem.ann_email
250
- end
248
+ Gemgem.ignored_files.each do |file|
249
+ from = "#{Gemgem.dir}/#{file}"
250
+ to = "#{trash}/#{File.dirname(file)}"
251
+ puts Gemgem.strip_path(from)
251
252
 
252
- desc 'Generate rdoc'
253
- task :doc => ['gem:spec'] do
254
- sh("yardoc -o rdoc --main README.md" \
255
- " --files #{Gemgem.spec.extra_rdoc_files.join(',')}")
256
- end
253
+ FileUtils.mkdir_p(to)
254
+ FileUtils.mv(from, to)
255
+ end
257
256
 
258
- desc 'Remove ignored files'
259
- task :clean => ['gem:spec'] do
260
- trash = "~/.Trash/#{Gemgem.spec.name}/"
261
- sh "mkdir -p #{trash}" unless File.exist?(File.expand_path(trash))
262
- Gemgem.ignored_files.each{ |file| sh "mv #{file} #{trash}" }
257
+ print "\e[0m"
263
258
  end
264
259
 
265
260
  task :default do
266
- puts `#{Gem.ruby} -S #{$PROGRAM_NAME} -T`
261
+ # Is there a reliable way to do this in the current process?
262
+ # It failed miserably before between Rake versions...
263
+ exec "#{Gem.ruby} -S #{$PROGRAM_NAME} -f #{Rake.application.rakefile} -T"
267
264
  end
metadata CHANGED
@@ -1,27 +1,27 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rack-handlers
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.7.0
4
+ version: 0.7.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Lin Jen-Shin (godfat)
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2013-08-22 00:00:00.000000000 Z
11
+ date: 2015-12-12 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rack
15
15
  requirement: !ruby/object:Gem::Requirement
16
16
  requirements:
17
- - - '>='
17
+ - - ">="
18
18
  - !ruby/object:Gem::Version
19
19
  version: '0'
20
20
  type: :runtime
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
- - - '>='
24
+ - - ">="
25
25
  - !ruby/object:Gem::Version
26
26
  version: '0'
27
27
  description: Unicorn family Rack handlers for you. Mostly for `rails s`.
@@ -31,8 +31,8 @@ executables: []
31
31
  extensions: []
32
32
  extra_rdoc_files: []
33
33
  files:
34
- - .gitignore
35
- - .gitmodules
34
+ - ".gitignore"
35
+ - ".gitmodules"
36
36
  - CHANGES.md
37
37
  - README.md
38
38
  - Rakefile
@@ -40,12 +40,14 @@ files:
40
40
  - lib/rack/handler/rails-server.rb
41
41
  - lib/rack/handler/rainbows.rb
42
42
  - lib/rack/handler/unicorn.rb
43
+ - lib/rack/handler/yahns.rb
43
44
  - lib/rack/handler/zbatery.rb
44
45
  - rack-handlers.gemspec
45
46
  - task/.gitignore
46
47
  - task/gemgem.rb
47
48
  homepage: https://github.com/godfat/rack-handlers
48
- licenses: []
49
+ licenses:
50
+ - Apache License 2.0
49
51
  metadata: {}
50
52
  post_install_message:
51
53
  rdoc_options: []
@@ -53,17 +55,17 @@ require_paths:
53
55
  - lib
54
56
  required_ruby_version: !ruby/object:Gem::Requirement
55
57
  requirements:
56
- - - '>='
58
+ - - ">="
57
59
  - !ruby/object:Gem::Version
58
60
  version: '0'
59
61
  required_rubygems_version: !ruby/object:Gem::Requirement
60
62
  requirements:
61
- - - '>='
63
+ - - ">="
62
64
  - !ruby/object:Gem::Version
63
65
  version: '0'
64
66
  requirements: []
65
67
  rubyforge_project:
66
- rubygems_version: 2.0.6
68
+ rubygems_version: 2.5.0
67
69
  signing_key:
68
70
  specification_version: 4
69
71
  summary: Unicorn family Rack handlers for you. Mostly for `rails s`.