source-tools 0.6.0 → 0.6.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/.gitignore +1 -6
- data/.gitmodules +3 -0
- data/CHANGES.md +14 -0
- data/{README → README.md} +14 -13
- data/Rakefile +11 -50
- data/{TODO → TODO.md} +1 -1
- data/bin/source-tools +0 -0
- data/lib/source-tools.rb +1 -1
- data/lib/source-tools/bin.rb +3 -0
- data/lib/source-tools/default.rb +1 -0
- data/lib/source-tools/tasks/template.rb +1 -0
- data/lib/source-tools/templates/t.profile.erb +3 -0
- data/lib/source-tools/templates/tRakefile.erb +21 -33
- data/lib/source-tools/templates/tnginx-for-unicorn.conf.erb +61 -0
- data/lib/source-tools/version.rb +2 -1
- data/source-tools.gemspec +50 -21
- data/task/README.md +54 -0
- data/task/gemgem.rb +258 -0
- metadata +50 -85
- data/CHANGES +0 -10
- data/lib/source-tools/templates/t.bashrc.erb +0 -5
- data/tasks/ann.rake +0 -80
- data/tasks/bones.rake +0 -20
- data/tasks/gem.rake +0 -201
- data/tasks/git.rake +0 -40
- data/tasks/notes.rake +0 -27
- data/tasks/post_load.rake +0 -34
- data/tasks/rdoc.rake +0 -51
- data/tasks/rubyforge.rake +0 -55
- data/tasks/setup.rb +0 -292
- data/tasks/spec.rake +0 -54
- data/tasks/svn.rake +0 -47
- data/tasks/test.rake +0 -40
- data/tasks/zentest.rake +0 -36
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA1:
|
3
|
+
metadata.gz: 0b4fff8b9cc724fd7f3350026821f1d7aca596ef
|
4
|
+
data.tar.gz: b1b43711b4a29b989366c0303a4d20d9cb5d97f2
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: 99b134907274d77fbb0e4f28f45ed574bf9336cd64b2b18941c612c7a9b3f50ba25ac6fc0dbf445044c23daf8117b6092f1cf489ddde5f64a3ae244c985be181
|
7
|
+
data.tar.gz: 23e5473f4b61cfd07b515670df48e6ef329ce8afd22328384e58c6d636da2a39178c2825b44dcefbd8cc871d35fe7f38c2a59f37230f57ebb524ec1bbcff1eea
|
data/.gitmodules
ADDED
data/CHANGES.md
ADDED
data/{README → README.md}
RENAMED
@@ -1,17 +1,18 @@
|
|
1
|
-
|
2
|
-
by Lin Jen-Shin (a.k.a. godfat-真常[http://godfat.org])
|
3
|
-
godfat (XD) godfat.org
|
1
|
+
# source-tools 0.6
|
4
2
|
|
5
|
-
|
3
|
+
by Lin Jen-Shin ([godfat](http://godfat.org))
|
6
4
|
|
7
|
-
|
8
|
-
* rubyforge-project[http://rubyforge.org/projects/ludy]
|
5
|
+
## LINKS:
|
9
6
|
|
10
|
-
|
7
|
+
* [github](https://github.com/godfat/source-tools)
|
8
|
+
* [rubygems](https://rubygems.org/gems/source-tools)
|
9
|
+
* [rdoc](http://rdoc.info/github/godfat/source-tools)
|
10
|
+
|
11
|
+
## DESCRIPTION:
|
11
12
|
|
12
13
|
source code tools collection
|
13
14
|
|
14
|
-
|
15
|
+
## FEATURES:
|
15
16
|
|
16
17
|
$ source-tools
|
17
18
|
source-tools st:chmod # fix files(644) and directories(755) permission recursively.
|
@@ -27,19 +28,19 @@ source-tools st:t:config.fish # create a common config.fish file
|
|
27
28
|
source-tools st:t:mime.types # create a common mime.types file
|
28
29
|
source-tools st:t:nginx.conf[project] # create an nginx config file
|
29
30
|
|
30
|
-
|
31
|
+
## SYNOPSIS:
|
31
32
|
|
32
|
-
|
33
|
+
## REQUIREMENTS:
|
33
34
|
|
34
|
-
|
35
|
+
## INSTALL:
|
35
36
|
|
36
37
|
* gem install source-tools
|
37
38
|
|
38
|
-
|
39
|
+
## LICENSE:
|
39
40
|
|
40
41
|
Apache License 2.0
|
41
42
|
|
42
|
-
Copyright (c) 2008-2009, Lin Jen-Shin (
|
43
|
+
Copyright (c) 2008-2009, Lin Jen-Shin (godfat)
|
43
44
|
|
44
45
|
Licensed under the Apache License, Version 2.0 (the "License");
|
45
46
|
you may not use this file except in compliance with the License.
|
data/Rakefile
CHANGED
@@ -1,53 +1,14 @@
|
|
1
|
-
# encoding: utf-8
|
2
1
|
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
PROJ.name = 'source-tools'
|
10
|
-
PROJ.authors = 'Lin Jen-Shin (a.k.a. godfat 真常)'
|
11
|
-
PROJ.email = 'godfat (XD) godfat.org'
|
12
|
-
PROJ.url = 'http://github.com/godfat/source-tools'
|
13
|
-
PROJ.rubyforge.name = 'ludy'
|
14
|
-
|
15
|
-
# begin workaround
|
16
|
-
# PROJ.include << 'lib/.+'
|
17
|
-
PROJ.gem.files = manifest << 'lib/source-tools/templates/t.git/hooks/post-receive.erb'
|
18
|
-
# end workaround
|
19
|
-
|
20
|
-
# PROJ.gem.dependencies << ['source-tools', '>=0.5.0']
|
21
|
-
# PROJ.gem.development_dependencies << ['minitest', '>=1.3.0']
|
22
|
-
PROJ.gem.executables = ["bin/#{PROJ.name}"]
|
23
|
-
|
24
|
-
# PROJ.ruby_opts.delete '-w'
|
25
|
-
|
26
|
-
PROJ.description = PROJ.summary = paragraphs_of('README', 'description').join("\n\n")
|
27
|
-
PROJ.changes = paragraphs_of('CHANGES', 0..1).join("\n\n")
|
28
|
-
PROJ.version = File.read("lib/#{PROJ.name}/version.rb").gsub(/.*VERSION = '(.*)'.*/m, '\1')
|
29
|
-
|
30
|
-
PROJ.exclude += ['^tmp', 'tmp$', '^pkg', '^\.gitignore$',
|
31
|
-
'^ann-', '\.sqlite3$', '\.db$']
|
32
|
-
|
33
|
-
PROJ.rdoc.remote_dir = PROJ.name
|
34
|
-
|
35
|
-
PROJ.readme_file = 'README'
|
36
|
-
PROJ.rdoc.main = 'README'
|
37
|
-
PROJ.rdoc.exclude += ['Rakefile', '^tasks', '^test']
|
38
|
-
PROJ.rdoc.include << '\w+'
|
39
|
-
# PROJ.rdoc.opts << '--diagram' if !Rake::Win32 and `which dot` =~ %r/\/dot/
|
40
|
-
PROJ.rdoc.opts += ['--charset=utf-8', '--inline-source',
|
41
|
-
'--line-numbers', '--promiscuous']
|
42
|
-
|
43
|
-
PROJ.spec.opts << '--color'
|
44
|
-
|
45
|
-
PROJ.ann.file = "ann-#{PROJ.name}-#{PROJ.version}"
|
46
|
-
PROJ.ann.paragraphs.concat %w[LINKS SYNOPSIS REQUIREMENTS INSTALL LICENSE]
|
47
|
-
|
48
|
-
CLEAN.include Dir['**/*.rbc']
|
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
|
49
8
|
|
50
|
-
|
51
|
-
|
52
|
-
|
9
|
+
Gemgem.init(dir) do |s|
|
10
|
+
require 'source-tools/version'
|
11
|
+
s.name = 'source-tools'
|
12
|
+
s.version = SourceTools::VERSION
|
13
|
+
s.add_runtime_dependency('rake', '>= 10')
|
53
14
|
end
|
data/{TODO → TODO.md}
RENAMED
data/bin/source-tools
CHANGED
File without changes
|
data/lib/source-tools.rb
CHANGED
@@ -50,7 +50,7 @@ module SourceTools
|
|
50
50
|
end
|
51
51
|
|
52
52
|
def task_template path, *args, &block
|
53
|
-
task(*
|
53
|
+
task(*[File.basename(path)] + args) do |t, task_args|
|
54
54
|
SourceTools.generate(path, args, task_args, &block)
|
55
55
|
end
|
56
56
|
end
|
data/lib/source-tools/bin.rb
CHANGED
data/lib/source-tools/default.rb
CHANGED
@@ -1,43 +1,31 @@
|
|
1
1
|
# encoding: utf-8
|
2
2
|
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
PROJ.name = '<%= args[:project] %>'
|
9
|
-
PROJ.authors = '<%= args[:author] %>'
|
10
|
-
PROJ.email = '<%= args[:author] %>@<%= args[:author] %>.org'
|
11
|
-
PROJ.url = 'http://github.com/<%= args[:author] %>/<%= args[:project] %>'
|
12
|
-
PROJ.rubyforge.name = '<%= args[:project] %>'
|
13
|
-
|
14
|
-
# PROJ.gem.dependencies << ['source-tools', '>=0.5.0']
|
15
|
-
# PROJ.gem.development_dependencies << ['minitest', '>=1.3.0']
|
16
|
-
# PROJ.gem.executables = ["bin/#{PROJ.name}"]
|
17
|
-
|
18
|
-
# PROJ.ruby_opts.delete '-w'
|
19
|
-
|
20
|
-
PROJ.description = PROJ.summary = paragraphs_of('README', 'description').join("\n\n")
|
21
|
-
PROJ.changes = paragraphs_of('CHANGES', 0..1).join("\n\n")
|
22
|
-
PROJ.version = File.read("lib/#{PROJ.name}/version.rb").gsub(/.*VERSION = '(.*)'.*/m, '\1')
|
3
|
+
begin
|
4
|
+
require 'bones'
|
5
|
+
rescue LoadError
|
6
|
+
abort '### Please install the "bones" gem ###'
|
7
|
+
end
|
23
8
|
|
24
|
-
|
25
|
-
|
9
|
+
ensure_in_path 'lib'
|
10
|
+
require '<%= args[:project] %>/version'
|
26
11
|
|
27
|
-
|
12
|
+
Bones{
|
13
|
+
name '<%= args[:project] %>'
|
14
|
+
url 'http://github.com/<%= args[:author] %>/<%= args[:project] %>'
|
15
|
+
version <%= args[:project].capitalize %>::VERSION
|
28
16
|
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
PROJ.rdoc.include << '\w+'
|
33
|
-
# PROJ.rdoc.opts << '--diagram' if !Rake::Win32 and `which dot` =~ %r/\/dot/
|
34
|
-
PROJ.rdoc.opts += ['--charset=utf-8', '--inline-source',
|
35
|
-
'--line-numbers', '--promiscuous']
|
17
|
+
# gem.executables ['bin/<%= args[:project] %>']
|
18
|
+
# depend_on 'source-tools', :development => true, :version => '>=0.6.0'
|
19
|
+
# rubyforge.name '<%= args[:project] %>'
|
36
20
|
|
37
|
-
|
21
|
+
authors '<%= args[:author] %>'
|
22
|
+
email '<%= args[:author] %>@<%= args[:author] %>.org'
|
38
23
|
|
39
|
-
|
40
|
-
|
24
|
+
history_file 'CHANGES'
|
25
|
+
readme_file 'README'
|
26
|
+
ignore_file '.gitignore'
|
27
|
+
rdoc.include ['\w+']
|
28
|
+
}
|
41
29
|
|
42
30
|
CLEAN.include Dir['**/*.rbc']
|
43
31
|
|
@@ -0,0 +1,61 @@
|
|
1
|
+
# template from http://unicorn.bogomips.org/examples/nginx.conf
|
2
|
+
user nobody nobody;
|
3
|
+
worker_processes 1;
|
4
|
+
|
5
|
+
pid /tmp/nginx.pid;
|
6
|
+
error_log /tmp/nginx.error.log;
|
7
|
+
|
8
|
+
events {
|
9
|
+
worker_connections 2048;
|
10
|
+
accept_mutex off;
|
11
|
+
use epoll;
|
12
|
+
}
|
13
|
+
|
14
|
+
http {
|
15
|
+
include mime.types;
|
16
|
+
default_type application/octet-stream;
|
17
|
+
access_log /tmp/nginx.access.log combined;
|
18
|
+
|
19
|
+
sendfile on;
|
20
|
+
tcp_nopush on;
|
21
|
+
tcp_nodelay on;
|
22
|
+
|
23
|
+
keepalive_timeout 5;
|
24
|
+
client_max_body_size 100M;
|
25
|
+
index index.xhtml index.html index.htm;
|
26
|
+
|
27
|
+
gzip on;
|
28
|
+
gzip_http_version 1.0;
|
29
|
+
gzip_proxied any;
|
30
|
+
gzip_min_length 500;
|
31
|
+
gzip_disable "MSIE [1-6]\.";
|
32
|
+
gzip_types text/plain text/html text/xml text/css
|
33
|
+
text/comma-separated-values
|
34
|
+
text/javascript
|
35
|
+
application/x-javascript application/javascript
|
36
|
+
application/xhtml+xml application/atom+xml;
|
37
|
+
|
38
|
+
upstream unicorn {
|
39
|
+
server 127.0.0.1:8080 fail_timeout=0;
|
40
|
+
server unix:/tmp/unicorn.sock fail_timeout=0;
|
41
|
+
}
|
42
|
+
|
43
|
+
server {
|
44
|
+
listen 80;
|
45
|
+
server_name _;
|
46
|
+
root /dev/null;
|
47
|
+
|
48
|
+
location / {
|
49
|
+
proxy_set_header X-Real-IP $remote_addr;
|
50
|
+
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
|
51
|
+
proxy_set_header Host $http_host;
|
52
|
+
proxy_redirect off;
|
53
|
+
|
54
|
+
if (!-f $request_filename) {
|
55
|
+
proxy_pass http://unicorn;
|
56
|
+
break;
|
57
|
+
}
|
58
|
+
}
|
59
|
+
}
|
60
|
+
}
|
61
|
+
|
data/lib/source-tools/version.rb
CHANGED
data/source-tools.gemspec
CHANGED
@@ -1,35 +1,64 @@
|
|
1
1
|
# -*- encoding: utf-8 -*-
|
2
|
+
# stub: source-tools 0.6.1 ruby lib
|
2
3
|
|
3
4
|
Gem::Specification.new do |s|
|
4
|
-
s.name =
|
5
|
-
s.version = "0.6.
|
5
|
+
s.name = "source-tools"
|
6
|
+
s.version = "0.6.1"
|
6
7
|
|
7
8
|
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
8
|
-
s.authors = ["Lin Jen-Shin (a.k.a. godfat 真常)"]
|
9
|
-
s.date = %q{2009-11-22}
|
10
|
-
s.default_executable = %q{source-tools}
|
11
|
-
s.description = %q{ source code tools collection}
|
12
|
-
s.email = %q{godfat (XD) godfat.org}
|
13
|
-
s.executables = ["source-tools"]
|
14
|
-
s.extra_rdoc_files = [".gitignore", "CHANGES", "README", "TODO", "bin/source-tools", "lib/source-tools/templates/t.bashrc.erb", "lib/source-tools/templates/t.config/fish/config.fish.erb", "lib/source-tools/templates/t.gemrc.erb", "lib/source-tools/templates/t.gitconfig.erb", "lib/source-tools/templates/t.gitignore.erb", "lib/source-tools/templates/t.profile.erb", "lib/source-tools/templates/t.screenrc.erb", "lib/source-tools/templates/t.vimrc.erb", "lib/source-tools/templates/tconfig/mime.types.erb", "lib/source-tools/templates/tconfig/nginx.conf.erb", "source-tools.gemspec", "lib/source-tools/templates/t.git/hooks/post-receive.erb"]
|
15
|
-
s.files = [".gitignore", "CHANGES", "README", "Rakefile", "TODO", "bin/source-tools", "lib/source-tools.rb", "lib/source-tools/bin.rb", "lib/source-tools/default.rb", "lib/source-tools/tasks.rb", "lib/source-tools/tasks/chmod.rb", "lib/source-tools/tasks/html_wrap.rb", "lib/source-tools/tasks/ruby_magic_encoding.rb", "lib/source-tools/tasks/strip.rb", "lib/source-tools/tasks/template.rb", "lib/source-tools/templates/t.bashrc.erb", "lib/source-tools/templates/t.config/fish/config.fish.erb", "lib/source-tools/templates/t.gemrc.erb", "lib/source-tools/templates/t.gitconfig.erb", "lib/source-tools/templates/t.gitignore.erb", "lib/source-tools/templates/t.profile.erb", "lib/source-tools/templates/t.screenrc.erb", "lib/source-tools/templates/t.vimrc.erb", "lib/source-tools/templates/tRakefile.erb", "lib/source-tools/templates/tconfig/mime.types.erb", "lib/source-tools/templates/tconfig/nginx.conf.erb", "lib/source-tools/version.rb", "source-tools.gemspec", "lib/source-tools/templates/t.git/hooks/post-receive.erb"]
|
16
|
-
s.homepage = %q{http://github.com/godfat/source-tools}
|
17
|
-
s.rdoc_options = ["--charset=utf-8", "--inline-source", "--line-numbers", "--promiscuous", "--main", "README"]
|
18
9
|
s.require_paths = ["lib"]
|
19
|
-
s.
|
20
|
-
s.
|
21
|
-
s.
|
10
|
+
s.authors = ["Lin Jen-Shin (godfat)"]
|
11
|
+
s.date = "2014-10-03"
|
12
|
+
s.description = " source code tools collection"
|
13
|
+
s.email = ["godfat (XD) godfat.org"]
|
14
|
+
s.executables = ["source-tools"]
|
15
|
+
s.files = [
|
16
|
+
".gitignore",
|
17
|
+
".gitmodules",
|
18
|
+
"CHANGES.md",
|
19
|
+
"README.md",
|
20
|
+
"Rakefile",
|
21
|
+
"TODO.md",
|
22
|
+
"bin/source-tools",
|
23
|
+
"lib/source-tools.rb",
|
24
|
+
"lib/source-tools/bin.rb",
|
25
|
+
"lib/source-tools/default.rb",
|
26
|
+
"lib/source-tools/tasks.rb",
|
27
|
+
"lib/source-tools/tasks/chmod.rb",
|
28
|
+
"lib/source-tools/tasks/html_wrap.rb",
|
29
|
+
"lib/source-tools/tasks/ruby_magic_encoding.rb",
|
30
|
+
"lib/source-tools/tasks/strip.rb",
|
31
|
+
"lib/source-tools/tasks/template.rb",
|
32
|
+
"lib/source-tools/templates/t.config/fish/config.fish.erb",
|
33
|
+
"lib/source-tools/templates/t.gemrc.erb",
|
34
|
+
"lib/source-tools/templates/t.git/hooks/post-receive.erb",
|
35
|
+
"lib/source-tools/templates/t.gitconfig.erb",
|
36
|
+
"lib/source-tools/templates/t.gitignore.erb",
|
37
|
+
"lib/source-tools/templates/t.profile.erb",
|
38
|
+
"lib/source-tools/templates/t.screenrc.erb",
|
39
|
+
"lib/source-tools/templates/t.vimrc.erb",
|
40
|
+
"lib/source-tools/templates/tRakefile.erb",
|
41
|
+
"lib/source-tools/templates/tconfig/mime.types.erb",
|
42
|
+
"lib/source-tools/templates/tconfig/nginx.conf.erb",
|
43
|
+
"lib/source-tools/templates/tnginx-for-unicorn.conf.erb",
|
44
|
+
"lib/source-tools/version.rb",
|
45
|
+
"source-tools.gemspec",
|
46
|
+
"task/README.md",
|
47
|
+
"task/gemgem.rb"]
|
48
|
+
s.homepage = "https://github.com/godfat/source-tools"
|
49
|
+
s.licenses = ["Apache License 2.0"]
|
50
|
+
s.rubygems_version = "2.4.2"
|
51
|
+
s.summary = "source code tools collection"
|
22
52
|
|
23
53
|
if s.respond_to? :specification_version then
|
24
|
-
|
25
|
-
s.specification_version = 3
|
54
|
+
s.specification_version = 4
|
26
55
|
|
27
|
-
if Gem::Version.new(Gem::
|
28
|
-
s.
|
56
|
+
if Gem::Version.new(Gem::VERSION) >= Gem::Version.new('1.2.0') then
|
57
|
+
s.add_runtime_dependency(%q<rake>, [">= 10"])
|
29
58
|
else
|
30
|
-
s.add_dependency(%q<
|
59
|
+
s.add_dependency(%q<rake>, [">= 10"])
|
31
60
|
end
|
32
61
|
else
|
33
|
-
s.add_dependency(%q<
|
62
|
+
s.add_dependency(%q<rake>, [">= 10"])
|
34
63
|
end
|
35
64
|
end
|
data/task/README.md
ADDED
@@ -0,0 +1,54 @@
|
|
1
|
+
# Gemgem
|
2
|
+
|
3
|
+
## DESCRIPTION:
|
4
|
+
|
5
|
+
Provided tasks:
|
6
|
+
|
7
|
+
rake clean # Remove ignored files
|
8
|
+
rake gem:build # Build gem
|
9
|
+
rake gem:install # Install gem
|
10
|
+
rake gem:release # Release gem
|
11
|
+
rake gem:spec # Generate gemspec
|
12
|
+
rake test # Run tests in memory
|
13
|
+
|
14
|
+
## REQUIREMENTS:
|
15
|
+
|
16
|
+
* Tested with MRI (official CRuby) 1.9.3, 2.0.0, Rubinius and JRuby.
|
17
|
+
|
18
|
+
## INSTALLATION:
|
19
|
+
|
20
|
+
git submodule add git://github.com/godfat/gemgem.git task
|
21
|
+
|
22
|
+
And in Rakefile:
|
23
|
+
|
24
|
+
``` ruby
|
25
|
+
begin
|
26
|
+
require "#{dir = File.dirname(__FILE__)}/task/gemgem"
|
27
|
+
rescue LoadError
|
28
|
+
sh 'git submodule update --init'
|
29
|
+
exec Gem.ruby, '-S', $PROGRAM_NAME, *ARGV
|
30
|
+
end
|
31
|
+
|
32
|
+
Gemgem.init(dir) do |s|
|
33
|
+
s.name = 'your-gem'
|
34
|
+
s.version = '0.1.0'
|
35
|
+
end
|
36
|
+
```
|
37
|
+
|
38
|
+
## LICENSE:
|
39
|
+
|
40
|
+
Apache License 2.0
|
41
|
+
|
42
|
+
Copyright (c) 2011-2013, Lin Jen-Shin (godfat)
|
43
|
+
|
44
|
+
Licensed under the Apache License, Version 2.0 (the "License");
|
45
|
+
you may not use this file except in compliance with the License.
|
46
|
+
You may obtain a copy of the License at
|
47
|
+
|
48
|
+
<http://www.apache.org/licenses/LICENSE-2.0>
|
49
|
+
|
50
|
+
Unless required by applicable law or agreed to in writing, software
|
51
|
+
distributed under the License is distributed on an "AS IS" BASIS,
|
52
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
53
|
+
See the License for the specific language governing permissions and
|
54
|
+
limitations under the License.
|