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.
@@ -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/.gitignore CHANGED
@@ -1,6 +1 @@
1
- tmp
2
- pkg
3
- doc
4
- ann-*
5
-
6
- *.rbc
1
+ /pkg/
@@ -0,0 +1,3 @@
1
+ [submodule "task"]
2
+ path = task
3
+ url = git://github.com/godfat/gemgem.git
@@ -0,0 +1,14 @@
1
+ # CHANGES
2
+
3
+ ## source-tools 0.6.1 -- 2014-10-03
4
+
5
+ * Adopt rake > 10
6
+
7
+ ## source-tools 0.6 -- 2009-11-21
8
+
9
+ * first rubyforge and gemcutter release
10
+
11
+ ## source-tools 0.5 -- 2008-12-12
12
+
13
+ * 1 major enhancement
14
+ * Birthday!
@@ -1,17 +1,18 @@
1
- = source-tools 0.6
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
- == LINKS:
3
+ by Lin Jen-Shin ([godfat](http://godfat.org))
6
4
 
7
- * github-project[http://github.com/godfat/source-tools]
8
- * rubyforge-project[http://rubyforge.org/projects/ludy]
5
+ ## LINKS:
9
6
 
10
- == DESCRIPTION:
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
- == FEATURES:
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
- == SYNOPSIS:
31
+ ## SYNOPSIS:
31
32
 
32
- == REQUIREMENTS:
33
+ ## REQUIREMENTS:
33
34
 
34
- == INSTALL:
35
+ ## INSTALL:
35
36
 
36
37
  * gem install source-tools
37
38
 
38
- == LICENSE:
39
+ ## LICENSE:
39
40
 
40
41
  Apache License 2.0
41
42
 
42
- Copyright (c) 2008-2009, Lin Jen-Shin (a.k.a. godfat 真常)
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
- SUDO = '' # this prevent `rake gem:install` to use sudo
4
-
5
- gem 'bones', '<3.0'
6
- require 'bones'
7
- Bones.setup
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
- task :default do
51
- Rake.application.options.show_task_pattern = /./
52
- Rake.application.display_tasks_and_comments
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
@@ -1,4 +1,4 @@
1
- = source-tools todo list
1
+ # TODO
2
2
 
3
3
  * adding --verbose option.
4
4
  * adding task that generate all template.
File without changes
@@ -50,7 +50,7 @@ module SourceTools
50
50
  end
51
51
 
52
52
  def task_template path, *args, &block
53
- task(*args.dup.unshift(File.basename(path))) do |t, task_args|
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
@@ -1,5 +1,8 @@
1
1
 
2
2
  require 'rake'
3
+ include Rake::DSL
4
+ Rake::TaskManager.record_task_metadata = true
5
+
3
6
  require 'source-tools/tasks'
4
7
  require 'source-tools/default'
5
8
 
@@ -1,5 +1,6 @@
1
1
 
2
2
  task :default do
3
3
  Rake.application.options.show_task_pattern = /./
4
+ Rake.application.options.show_tasks = :tasks
4
5
  Rake.application.display_tasks_and_comments
5
6
  end
@@ -19,6 +19,7 @@ namespace :st do
19
19
 
20
20
  %w[ .gitignore .vimrc .bashrc .config/fish/config.fish
21
21
  config/mime.types .git/hooks/post-receive .screenrc
22
+ nginx-for-unicorn.conf
22
23
  ].each{ |path|
23
24
 
24
25
  desc "create a common #{File.basename(path)} file"
@@ -6,6 +6,9 @@ export PATH=\
6
6
  ~/.gem/ruby/1.8/bin/:\
7
7
  $PATH
8
8
 
9
+ #export GEM_HOME=$HOME/.gem/ruby/1.8
10
+ #export GEM_PATH=$GEM_HOME
11
+
9
12
  export LC_ALL=en_US.UTF-8
10
13
  export LANG=en_US.UTF-8
11
14
 
@@ -1,43 +1,31 @@
1
1
  # encoding: utf-8
2
2
 
3
- SUDO = '' # this prevent `rake gem:install` to use sudo
4
-
5
- require 'bones'
6
- Bones.setup
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
- PROJ.exclude += ['^tmp', 'tmp$', '^pkg', '^\.gitignore$',
25
- '^ann-', '\.sqlite3$', '\.db$']
9
+ ensure_in_path 'lib'
10
+ require '<%= args[:project] %>/version'
26
11
 
27
- PROJ.rdoc.remote_dir = PROJ.name
12
+ Bones{
13
+ name '<%= args[:project] %>'
14
+ url 'http://github.com/<%= args[:author] %>/<%= args[:project] %>'
15
+ version <%= args[:project].capitalize %>::VERSION
28
16
 
29
- PROJ.readme_file = 'README'
30
- PROJ.rdoc.main = 'README'
31
- PROJ.rdoc.exclude += ['Rakefile', '^tasks', '^test']
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
- PROJ.spec.opts << '--color'
21
+ authors '<%= args[:author] %>'
22
+ email '<%= args[:author] %>@<%= args[:author] %>.org'
38
23
 
39
- PROJ.ann.file = "ann-#{PROJ.name}-#{PROJ.version}"
40
- PROJ.ann.paragraphs.concat %w[LINKS SYNOPSIS REQUIREMENTS INSTALL LICENSE]
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
+
@@ -1,3 +1,4 @@
1
+
1
2
  module SourceTools
2
- VERSION = '0.6.0'
3
+ VERSION = '0.6.1'
3
4
  end
@@ -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 = %q{source-tools}
5
- s.version = "0.6.0"
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.rubyforge_project = %q{ludy}
20
- s.rubygems_version = %q{1.3.5}
21
- s.summary = %q{source code tools collection}
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
- current_version = Gem::Specification::CURRENT_SPECIFICATION_VERSION
25
- s.specification_version = 3
54
+ s.specification_version = 4
26
55
 
27
- if Gem::Version.new(Gem::RubyGemsVersion) >= Gem::Version.new('1.2.0') then
28
- s.add_development_dependency(%q<bones>, [">= 2.5.1"])
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<bones>, [">= 2.5.1"])
59
+ s.add_dependency(%q<rake>, [">= 10"])
31
60
  end
32
61
  else
33
- s.add_dependency(%q<bones>, [">= 2.5.1"])
62
+ s.add_dependency(%q<rake>, [">= 10"])
34
63
  end
35
64
  end
@@ -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.