Граф коммитов

51 Коммитов

Автор SHA1 Сообщение Дата
Nobuyoshi Nakada cf3b305c43 [ruby/un] wait_writable: close opened file
https://github.com/ruby/un/commit/b08aeb9c48
2022-11-30 10:09:17 +00:00
Nobuyoshi Nakada 116920cff8 [ruby/un] Use class methods of `File` over `Kernel.open`
https://github.com/ruby/un/commit/13bdd766fe
2022-11-21 13:15:48 +00:00
Nobuyoshi Nakada 025677560a [ruby/un] Support `FileUtils.cp_lr`
https://github.com/ruby/un/commit/e976ad8a7c
2022-07-14 16:26:47 +09:00
Kazuhiro NISHIYAMA 2eed62fb65
[ruby/un] Use STDIN if no arguments
https://github.com/ruby/un/commit/8e0d6f62cb
2021-08-24 18:02:44 +09:00
Kazuhiro NISHIYAMA 66abeb0370
[ruby/un] Add colorize command
https://github.com/ruby/un/commit/4d080eeec0
2021-08-24 18:02:44 +09:00
Kentaro Goto 689962eaea improves message. thanks to eregon 2021-08-23 09:59:09 +09:00
Kentaro Goto f18e1752dc Display httpd URLs supporting HTTPS 2021-08-23 09:59:09 +09:00
Kentaro Goto 8361675e3a Display httpd URLs 2021-08-23 09:59:09 +09:00
Kazuhiro NISHIYAMA d5dfc3f2c8
Use `abort(message)` instead of `puts` and `exit` 2020-12-10 21:06:10 +09:00
Hiroshi SHIBATA 880727f037 Added help message for gem i webrick in un.rb 2020-12-10 18:06:25 +09:00
NARUSE, Yui 3407b7d8a6 Revert "Prefer #send over #__send__ when it is clear there is no possible conflict"
This reverts commit 4dba0c1a8e.

Matz's comment is "send is not deprecated. __send__ is safer".
But "Prefer #send over #__send__" is not reasonable.
2020-11-05 20:54:34 +09:00
Benoit Daloze 4dba0c1a8e Prefer #send over #__send__ when it is clear there is no possible conflict
* Reverts part of 3198e7abd7.
* If the rule is #send should be deprecated, that should be ruled by matz,
  there is no such rule currently and gems seem to prefer #send
  overwhelmingly.
2020-11-05 11:23:27 +01:00
Nobuyoshi Nakada 3198e7abd7
Separate `send` into `public_send` and `__send__` 2020-10-27 16:12:45 +09:00
Kazuhiro NISHIYAMA 1de7941ff8
DocumentRoot is optional
since 2.3.0
0b9d86f29b
2020-01-21 18:13:54 +09:00
aycabta d4eef04883 Use double splat for keyword args by a hash object in lib/un.rb 2019-08-31 20:55:35 +09:00
kazu c01a5ee85e Use delete_prefix instead of `sub(/\Afixed-pattern/, '')`
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@66189 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-12-04 08:22:10 +00:00
kazu 9e2acbca2a un.rb: add more options for httpd to help message [ci skip]
see r65965

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@65981 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-11-26 02:31:46 +00:00
nobu 70751a240f un.rb: more options for httpd
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@65965 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2018-11-25 03:36:09 +00:00
rhe 650e758060 un.rb: use OpenSSL::PKey.read instead of OpenSSL::PKey::RSA.new
Also, error out if --ssl-private-key option is not given, since
specifying only the certificate makes no sense.  [Feature #13714]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@59268 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-07-05 09:05:53 +00:00
nobu 2c59dd61f1 un.rb: support https
* lib/un.rb: add https support.  based on the patch by Flavio
  Castelli <flavio@castelli.name> in [ruby-core:81901].
  [Feature #13714]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@59265 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2017-07-05 06:27:43 +00:00
nobu e3503ee218 Octal mode in un.rb
* lib/fileutils.rb (FileUtils#symbolic_modes_to_i): revert r55524.

* lib/un.rb (install, chmod): support octal mode string.  fix up
  r55513.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@55530 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-06-28 22:03:00 +00:00
nobu 2a5183c2e4 FileUtils#install: symbolic mode
* lib/fileutils.rb (FileUtils#install): accecpt symbolic mode, as
  well as chmod.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@55513 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-06-27 07:58:34 +00:00
nobu 10fcca8f15 FileUtils#install: owner/group options
* lib/fileutils.rb (FileUtils#install): add owner and group
  options.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@55512 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-06-27 07:55:17 +00:00
naruse 3e92b635fb Add frozen_string_literal: false for all files
When you change this to true, you may need to add more tests.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@53141 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-12-16 05:07:31 +00:00
shugo e4d925bf3a * lib/un.rb (help): change the name of a block parameter to avoid
a warning when the command line option -w of ruby is specified.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@52226 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-10-22 15:51:07 +00:00
nobu 0b9d86f29b un.rb: cwd by default
* lib/un.rb (httpd): set DocumentRoot to the current working
  directory by default.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@50956 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-06-18 13:58:26 +00:00
nobu 82c290983f un.rb: HTTP-alt by default
* lib/un.rb (httpd): changed default port number to 8080 (HTTP
  Alternate), which does not need root privilege.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@50955 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-06-18 13:45:26 +00:00
nobu eb06e8d3ad un.rb: help order
* lib/un.rb (UN#help): show help messages in the given order.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41801 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-07-05 13:43:25 +00:00
nobu 0fc3541664 un.rb: help message
* lib/un.rb (setup): show help message by help method.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41800 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-07-05 13:43:22 +00:00
nobu 4d076e91c8 un.rb: refine regexp
* lib/un.rb (help): refine regexp to extract method name.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41799 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-07-05 13:43:19 +00:00
nobu ed0cba79ca un.rb: nodoc setup
* lib/un.rb (setup): nodoc for internal use method.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41798 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-07-05 13:43:16 +00:00
nobu d0a4131709 un.rb: suppress warning
* lib/un.rb (wait_writable): show error messages only if -v is given.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@39368 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-02-22 00:05:55 +00:00
nobu 7ed6c4eec8 un.rb: reduce duplication
* lib/un.rb (httpd): reduce duplicated code.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@36609 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-08-03 08:23:18 +00:00
nobu a580c01dc0 un.rb: DocumentRoot
* lib/un.rb (httpd): document root is mandatory.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@36608 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-08-03 08:22:45 +00:00
nobu d371e3583e * lib: revert r31635-r31638 and untabify with expand(1).
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@31641 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-05-19 00:07:25 +00:00
drbrain 7bbf2f3085 * lib: Convert tabs to spaces for ruby files per
http://redmine.ruby-lang.org/projects/ruby/wiki/DeveloperHowto#coding-style
	  Patch by Steve Klabnik [Ruby 1.9 - Bug #4730]
	  Patch by Jason Dew [Ruby 1.9 - Feature #4718]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@31635 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-05-18 21:19:18 +00:00
usa 073ac4ff5a * lib/un.rb (httpd): SIGQUIT and SIGHUP are not guaranteed to exist.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@28944 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-08-10 02:29:04 +00:00
nobu 4fcc6f1ef1 * lib/un.rb (setup): fix of word splitting. [ruby-dev:41723]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@28426 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-06-24 21:15:33 +00:00
nobu a4d3911503 * lib/un.rb (setup): fix of word splitting. [ruby-dev:41723]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@28425 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-06-24 20:49:37 +00:00
nobu 6547a2bcbb * lib/un.rb (httpd): try to convert port number to integer.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@26111 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-12-16 07:58:01 +00:00
nobu 9689308994 * lib/un.rb (httpd): easy WEBrick HTTP server.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@26060 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-12-10 05:19:11 +00:00
nobu 287a34ae0d * {ext,lib,test}/**/*.rb: removed trailing spaces.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@22784 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-03-06 03:56:38 +00:00
nobu 97de7d1081 * Makefile.in, win32/Makefile.sub (RMDIRS): remove directory and
parents.

* Makefile.in, win32/Makefile.sub (distclean-rdoc): added to remove
  temprary rdoc.

* Makefile.in, win32/Makefile.sub (distclean): removes extout
  directory.

* Makefile.in, win32/Makefile.sub (clean-ext): skips non-existent
  directories.

* common.mk (clean, distclean): cleans rdoc.

* configure.in (RMDIRS, RMALL): added to clean extout.

* lib/fileutils.rb (FileUtils#rmdir): added :parents option.

* lib/mkmf.rb (create_makefile): cleans installed files at clean
  instead of distclean.

* lib/mkmf.rb (create_makefile): added clean-so and clean-rb.

* lib/mkmf.rb (def init_mkmf): added DISTCLEANDIRS.

* lib/un.rb (rmdir): added -p option.

* tool/rmdirs, win32/rmdirs.bat: removes directory and the parents.

* win32/rm.bat: added -r option.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@21764 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2009-01-25 02:06:29 +00:00
nobu 73567dc103 * lib/un.rb (mkmf): new command to create makefile.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@17596 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-06-27 03:29:00 +00:00
nobu 3d5cfe9a32 * lib/un.rb (wait_writable): added help message.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@17595 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-06-27 02:06:08 +00:00
nobu eaa3ffbae8 * lib/un.rb (wait_writable): wait until target files can be
written actually.

	* win32/Makefile.sub (LDSHARED_0, LINK_SO): get rid of failure of
	  mt.exe.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@16754 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-06-02 09:51:30 +00:00
eban e8262c8f04 * lib/un.rb: use OptionParser instead of getopts.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@5704 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2004-02-14 14:27:43 +00:00
eban d6653222e9 * lib/un.h (help): new. % ruby -run -e help cp
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@4301 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-08-03 09:32:23 +00:00
eban 9b5701bc6f * lib/un.rb: add each descriptions for the -v option.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@4280 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-08-02 04:21:10 +00:00
eban 32fcbb5b6b * lib/un.rb: add descriptions.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@4234 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-07-30 08:59:47 +00:00