hajimeru 0.1.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/.gitignore +9 -0
- data/.travis.yml +4 -0
- data/Gemfile +4 -0
- data/LICENSE.txt +22 -0
- data/README.md +34 -0
- data/Rakefile +7 -0
- data/bin/console +14 -0
- data/bin/setup +7 -0
- data/exe/hajimeru +9 -0
- data/hajimeru.gemspec +32 -0
- data/lib/hajimeru.rb +5 -0
- data/lib/hajimeru/command.rb +16 -0
- data/lib/hajimeru/generator.rb +3 -0
- data/lib/hajimeru/generator/groonga_plugin.rb +44 -0
- data/lib/hajimeru/generator/javascript.rb +31 -0
- data/lib/hajimeru/generator/sinatra.rb +34 -0
- data/lib/hajimeru/generator/templates/groonga_plugin/.gitignore +26 -0
- data/lib/hajimeru/generator/templates/groonga_plugin/Makefile.am.tt +5 -0
- data/lib/hajimeru/generator/templates/groonga_plugin/autogen.sh +4 -0
- data/lib/hajimeru/generator/templates/groonga_plugin/configure.ac.tt +69 -0
- data/lib/hajimeru/generator/templates/groonga_plugin/plugin_name/Makefile.am.tt +14 -0
- data/lib/hajimeru/generator/templates/groonga_plugin/plugin_name/plugin_name.c.tt +47 -0
- data/lib/hajimeru/generator/templates/groonga_plugin/plugin_name/sources.am.tt +2 -0
- data/lib/hajimeru/generator/templates/groonga_plugin/test/Makefile.am +0 -0
- data/lib/hajimeru/generator/templates/groonga_plugin/test/run-test.sh +104 -0
- data/lib/hajimeru/generator/templates/groonga_plugin/test/suite/register.expected.tt +2 -0
- data/lib/hajimeru/generator/templates/groonga_plugin/test/suite/register.test.tt +1 -0
- data/lib/hajimeru/generator/templates/javascript/index.html +8 -0
- data/lib/hajimeru/generator/templates/javascript/index.js +0 -0
- data/lib/hajimeru/generator/templates/sinatra/.gitignore +3 -0
- data/lib/hajimeru/generator/templates/sinatra/Gemfile +3 -0
- data/lib/hajimeru/generator/templates/sinatra/app.rb +23 -0
- data/lib/hajimeru/generator/templates/sinatra/config.ru +2 -0
- data/lib/hajimeru/generator/templates/sinatra/views/index.haml +1 -0
- data/lib/hajimeru/generator/templates/sinatra/views/layout.haml.tt +6 -0
- data/lib/hajimeru/version.rb +3 -0
- metadata +140 -0
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA1:
|
3
|
+
metadata.gz: 94c54ba14df09a9eb904c4ee2cc4678c95dbcc06
|
4
|
+
data.tar.gz: 9bd5f516826afb13114df359c63b620243ddf3e6
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: ce80f98531af84de2dc174106b5869b632b1d57b8999cfa07af13df99a45326fc3e4faeb295dbf6bba38527e55190fb552ce853409b2641e5c63c20630753c73
|
7
|
+
data.tar.gz: c4a1e80758543b350cabc17eb3b35668e768447e6ae0896357b76c723b4aea549de0e27bb122818c461d5a8052b5ab49e79916b7c686bcc54c8f959461d6da9f
|
data/.gitignore
ADDED
data/.travis.yml
ADDED
data/Gemfile
ADDED
data/LICENSE.txt
ADDED
@@ -0,0 +1,22 @@
|
|
1
|
+
Copyright (c) 2015 Masafumi Yokoyama <myokoym@gmail.com>
|
2
|
+
|
3
|
+
MIT License
|
4
|
+
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining
|
6
|
+
a copy of this software and associated documentation files (the
|
7
|
+
"Software"), to deal in the Software without restriction, including
|
8
|
+
without limitation the rights to use, copy, modify, merge, publish,
|
9
|
+
distribute, sublicense, and/or sell copies of the Software, and to
|
10
|
+
permit persons to whom the Software is furnished to do so, subject to
|
11
|
+
the following conditions:
|
12
|
+
|
13
|
+
The above copyright notice and this permission notice shall be
|
14
|
+
included in all copies or substantial portions of the Software.
|
15
|
+
|
16
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
17
|
+
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
18
|
+
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
19
|
+
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
20
|
+
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
21
|
+
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
22
|
+
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
data/README.md
ADDED
@@ -0,0 +1,34 @@
|
|
1
|
+
# Hajimeru
|
2
|
+
|
3
|
+
[![Gem Version](https://badge.fury.io/rb/hajimeru.svg)](http://badge.fury.io/rb/hajimeru)
|
4
|
+
|
5
|
+
A scaffold generator for your project.
|
6
|
+
|
7
|
+
## Installation
|
8
|
+
|
9
|
+
$ gem install hajimeru
|
10
|
+
|
11
|
+
## Usage
|
12
|
+
|
13
|
+
$ hajimeru GENERATOR_NAME PROJECT_NAME
|
14
|
+
|
15
|
+
### Examples
|
16
|
+
|
17
|
+
#### [Groonga](http://groonga.org/) plugin
|
18
|
+
|
19
|
+
$ hajimeru groonga_plugin name
|
20
|
+
|
21
|
+
#### Sinatra
|
22
|
+
|
23
|
+
$ hajimeru sinatra mysite
|
24
|
+
|
25
|
+
## Development
|
26
|
+
|
27
|
+
After checking out the repo, run `bin/setup` to install dependencies. Then, run `rake false` to run the tests. You can also run `bin/console` for an interactive prompt that will allow you to experiment.
|
28
|
+
|
29
|
+
To install this gem onto your local machine, run `bundle exec rake install`. To release a new version, update the version number in `version.rb`, and then run `bundle exec rake release`, which will create a git tag for the version, push git commits and tags, and push the `.gem` file to [rubygems.org](https://rubygems.org).
|
30
|
+
|
31
|
+
## Contributing
|
32
|
+
|
33
|
+
Bug reports and pull requests are welcome on GitHub at https://github.com/myokoym/hajimeru.
|
34
|
+
|
data/Rakefile
ADDED
data/bin/console
ADDED
@@ -0,0 +1,14 @@
|
|
1
|
+
#!/usr/bin/env ruby
|
2
|
+
|
3
|
+
require "bundler/setup"
|
4
|
+
require "hajimeru"
|
5
|
+
|
6
|
+
# You can add fixtures and/or initialization code here to make experimenting
|
7
|
+
# with your gem easier. You can also use a different console, if you like.
|
8
|
+
|
9
|
+
# (If you use this, don't forget to add pry to your Gemfile!)
|
10
|
+
# require "pry"
|
11
|
+
# Pry.start
|
12
|
+
|
13
|
+
require "irb"
|
14
|
+
IRB.start
|
data/bin/setup
ADDED
data/exe/hajimeru
ADDED
data/hajimeru.gemspec
ADDED
@@ -0,0 +1,32 @@
|
|
1
|
+
# coding: utf-8
|
2
|
+
lib = File.expand_path('../lib', __FILE__)
|
3
|
+
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
4
|
+
require 'hajimeru/version'
|
5
|
+
|
6
|
+
Gem::Specification.new do |spec|
|
7
|
+
spec.name = "hajimeru"
|
8
|
+
spec.version = Hajimeru::VERSION
|
9
|
+
spec.authors = ["Masafumi Yokoyama"]
|
10
|
+
spec.email = ["myokoym@gmail.com"]
|
11
|
+
|
12
|
+
spec.summary = %q{A scaffold generator for your project.}
|
13
|
+
spec.description = spec.summary
|
14
|
+
spec.homepage = "https://github.com/myokoym/hajimeru"
|
15
|
+
spec.license = "MIT"
|
16
|
+
|
17
|
+
spec.files = `git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(test|spec|features)/}) }
|
18
|
+
spec.bindir = "exe"
|
19
|
+
spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
|
20
|
+
spec.require_paths = ["lib"]
|
21
|
+
|
22
|
+
spec.post_install_message = <<-MESSAGE
|
23
|
+
! The 'hajimeru' gem has been deprecated and has been replaced by 'hajimeru' gem.
|
24
|
+
! Because the name 'hajimeru' is used in the other project.
|
25
|
+
MESSAGE
|
26
|
+
|
27
|
+
spec.add_runtime_dependency "thor"
|
28
|
+
|
29
|
+
spec.add_development_dependency "bundler", "~> 1.10"
|
30
|
+
spec.add_development_dependency "rake", "~> 10.0"
|
31
|
+
spec.add_development_dependency "test-unit"
|
32
|
+
end
|
data/lib/hajimeru.rb
ADDED
@@ -0,0 +1,16 @@
|
|
1
|
+
require "thor"
|
2
|
+
require "hajimeru/generator"
|
3
|
+
require "hajimeru/version"
|
4
|
+
|
5
|
+
module Hajimeru
|
6
|
+
class Command < Thor
|
7
|
+
register(Generator::GroongaPlugin, "groonga_plugin", "groonga_plugin PLUGIN_NAME", "Scaffold the Groonga plugin")
|
8
|
+
register(Generator::JavaScript, "javascript", "javascript PROJECT_NAME", "Scaffold the JavaScript project")
|
9
|
+
register(Generator::Sinatra, "sinatra", "sinatra PROJECT_NAME", "Scaffold the Sinatra project")
|
10
|
+
|
11
|
+
desc "version", "Show version"
|
12
|
+
def version
|
13
|
+
puts(VERSION)
|
14
|
+
end
|
15
|
+
end
|
16
|
+
end
|
@@ -0,0 +1,44 @@
|
|
1
|
+
require "thor"
|
2
|
+
|
3
|
+
module Hajimeru
|
4
|
+
module Generator
|
5
|
+
class GroongaPlugin < Thor::Group
|
6
|
+
include Thor::Actions
|
7
|
+
|
8
|
+
argument :name
|
9
|
+
|
10
|
+
def self.source_root
|
11
|
+
File.join(File.dirname(__FILE__), "templates", "groonga_plugin")
|
12
|
+
end
|
13
|
+
|
14
|
+
def create_files
|
15
|
+
git_user_name = `git config user.name`.chomp
|
16
|
+
git_user_email = `git config user.email`.chomp
|
17
|
+
config = {
|
18
|
+
plugin_name: name,
|
19
|
+
author: (git_user_name || "TODO: YOUR NAME"),
|
20
|
+
email: (git_user_email || "TODO: YOUR EMAIL"),
|
21
|
+
}
|
22
|
+
[
|
23
|
+
"Makefile.am.tt",
|
24
|
+
"autogen.sh",
|
25
|
+
"configure.ac.tt",
|
26
|
+
"plugin_name/Makefile.am.tt",
|
27
|
+
"plugin_name/plugin_name.c.tt",
|
28
|
+
"plugin_name/sources.am.tt",
|
29
|
+
"test/Makefile.am",
|
30
|
+
"test/run-test.sh",
|
31
|
+
"test/suite/register.expected.tt",
|
32
|
+
"test/suite/register.test.tt",
|
33
|
+
].each do |path|
|
34
|
+
output_path = path.gsub(/plugin_name/, config[:plugin_name])
|
35
|
+
output_path = output_path.gsub(/\.tt\z/, "")
|
36
|
+
template(path, "#{name}/#{output_path}", config)
|
37
|
+
if /\.sh\z/ =~ output_path
|
38
|
+
File.chmod(0755, "#{name}/#{output_path}")
|
39
|
+
end
|
40
|
+
end
|
41
|
+
end
|
42
|
+
end
|
43
|
+
end
|
44
|
+
end
|
@@ -0,0 +1,31 @@
|
|
1
|
+
require "thor"
|
2
|
+
|
3
|
+
module Hajimeru
|
4
|
+
module Generator
|
5
|
+
class JavaScript < Thor::Group
|
6
|
+
include Thor::Actions
|
7
|
+
|
8
|
+
argument :name
|
9
|
+
|
10
|
+
def self.source_root
|
11
|
+
File.join(File.dirname(__FILE__), "templates", "javascript")
|
12
|
+
end
|
13
|
+
|
14
|
+
def create_files
|
15
|
+
[
|
16
|
+
].each do |path|
|
17
|
+
template("#{path}.tt", "#{name}/#{path}")
|
18
|
+
end
|
19
|
+
end
|
20
|
+
|
21
|
+
def copy_files
|
22
|
+
[
|
23
|
+
"index.html",
|
24
|
+
"index.js",
|
25
|
+
].each do |path|
|
26
|
+
copy_file(path, "#{name}/#{path}")
|
27
|
+
end
|
28
|
+
end
|
29
|
+
end
|
30
|
+
end
|
31
|
+
end
|
@@ -0,0 +1,34 @@
|
|
1
|
+
require "thor"
|
2
|
+
|
3
|
+
module Hajimeru
|
4
|
+
module Generator
|
5
|
+
class Sinatra < Thor::Group
|
6
|
+
include Thor::Actions
|
7
|
+
|
8
|
+
argument :name
|
9
|
+
|
10
|
+
def self.source_root
|
11
|
+
File.join(File.dirname(__FILE__), "templates", "sinatra")
|
12
|
+
end
|
13
|
+
|
14
|
+
def create_files
|
15
|
+
[
|
16
|
+
"views/layout.haml",
|
17
|
+
].each do |path|
|
18
|
+
template("#{path}.tt", "#{name}/#{path}")
|
19
|
+
end
|
20
|
+
end
|
21
|
+
|
22
|
+
def copy_files
|
23
|
+
[
|
24
|
+
"views/index.haml",
|
25
|
+
"app.rb",
|
26
|
+
"config.ru",
|
27
|
+
"Gemfile",
|
28
|
+
].each do |path|
|
29
|
+
copy_file(path, "#{name}/#{path}")
|
30
|
+
end
|
31
|
+
end
|
32
|
+
end
|
33
|
+
end
|
34
|
+
end
|
@@ -0,0 +1,26 @@
|
|
1
|
+
Makefile
|
2
|
+
Makefile.in
|
3
|
+
*.o
|
4
|
+
*.la
|
5
|
+
*.lo
|
6
|
+
.libs/
|
7
|
+
.deps/
|
8
|
+
/tmp
|
9
|
+
/m4/
|
10
|
+
/aclocal.m4
|
11
|
+
/autom4te.cache/
|
12
|
+
/config.guess
|
13
|
+
/config.h
|
14
|
+
/config.h.in
|
15
|
+
/config.log
|
16
|
+
/config.status
|
17
|
+
/config.sub
|
18
|
+
/configure
|
19
|
+
/compile
|
20
|
+
/depcomp
|
21
|
+
/install-sh
|
22
|
+
/libtool
|
23
|
+
/ltmain.sh
|
24
|
+
/missing
|
25
|
+
/stamp-h1
|
26
|
+
/test/tmp
|
@@ -0,0 +1,69 @@
|
|
1
|
+
AC_PREREQ(2.59)
|
2
|
+
AC_INIT([groonga-<%= config[:plugin_name] %>], 0.0.1, [<%= config[:email] %>])
|
3
|
+
|
4
|
+
AC_CONFIG_MACRO_DIR([m4])
|
5
|
+
AC_CONFIG_SRCDIR([<%= config[:plugin_name] %>/<%= config[:plugin_name] %>.c])
|
6
|
+
AM_CONFIG_HEADER([config.h])
|
7
|
+
|
8
|
+
AM_INIT_AUTOMAKE(foreign)
|
9
|
+
m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])])
|
10
|
+
|
11
|
+
AC_PROG_CXX
|
12
|
+
|
13
|
+
AC_PROG_LIBTOOL
|
14
|
+
|
15
|
+
if test "$GCC" = "yes"; then
|
16
|
+
CFLAGS="$CFLAGS -Wall -Wextra"
|
17
|
+
CFLAGS="$CFLAGS -Wmissing-declarations -Wmissing-prototypes"
|
18
|
+
fi
|
19
|
+
|
20
|
+
AC_ARG_ENABLE(debug,
|
21
|
+
[AS_HELP_STRING([--enable-debug],
|
22
|
+
[use debug flags (default=no)])],
|
23
|
+
[sample_debug="$enableval"],
|
24
|
+
[sample_debug="no"])
|
25
|
+
if test "x$sample_debug" != "xno"; then
|
26
|
+
if test "$CLANG" = "yes"; then
|
27
|
+
CFLAGS="$CFLAGS -O0 -g"
|
28
|
+
elif test "$GCC" = "yes"; then
|
29
|
+
CFLAGS="$CFLAGS -O0 -g3"
|
30
|
+
fi
|
31
|
+
fi
|
32
|
+
|
33
|
+
GROONGA_REQUIRED_VERSION=2.0.9
|
34
|
+
PKG_CHECK_MODULES([GROONGA], [groonga >= ${GROONGA_REQUIRED_VERSION}])
|
35
|
+
|
36
|
+
_PKG_CONFIG(GROONGA_PLUGINS_DIR, [variable=pluginsdir], [groonga])
|
37
|
+
_PKG_CONFIG(GROONGA, [variable=groonga], [groonga])
|
38
|
+
_PKG_CONFIG(GROONGA_HTTPD, [variable=groonga_httpd], [groonga])
|
39
|
+
|
40
|
+
GROONGA_PLUGINS_DIR="${pkg_cv_GROONGA_PLUGINS_DIR}"
|
41
|
+
GROONGA="${pkg_cv_GROONGA}"
|
42
|
+
GROONGA_HTTPD="${pkg_cv_GROONGA_HTTPD}"
|
43
|
+
|
44
|
+
AC_SUBST(GROONGA_PLUGINS_DIR)
|
45
|
+
AC_SUBST(GROONGA)
|
46
|
+
AC_SUBST(GROONGA_HTTPD)
|
47
|
+
|
48
|
+
<%= config[:plugin_name] %>_pluginsdir="\${GROONGA_PLUGINS_DIR}/<%= config[:plugin_name] %>"
|
49
|
+
AC_SUBST(<%= config[:plugin_name] %>_pluginsdir)
|
50
|
+
|
51
|
+
AC_CONFIG_FILES([
|
52
|
+
Makefile
|
53
|
+
<%= config[:plugin_name] %>/Makefile
|
54
|
+
test/Makefile
|
55
|
+
])
|
56
|
+
|
57
|
+
AC_OUTPUT
|
58
|
+
|
59
|
+
echo "$PACKAGE_NAME $PACKAGE_VERSION configuration:"
|
60
|
+
echo "-----------------------"
|
61
|
+
echo " Compiler: ${CC}"
|
62
|
+
echo " CFLAGS: ${CFLAGS}"
|
63
|
+
echo " CXXFLAGS: ${CXXFLAGS}"
|
64
|
+
echo " Libraries: ${LIBS}"
|
65
|
+
echo
|
66
|
+
echo "groonga-<%= config[:plugin_name] %>"
|
67
|
+
echo " CFLAGS: ${GROONGA_CFLAGS}"
|
68
|
+
echo " Libraries: ${GROONGA_LIBS}"
|
69
|
+
echo " install directory: ${<%= config[:plugin_name] %>_pluginsdir}"
|
@@ -0,0 +1,47 @@
|
|
1
|
+
/*
|
2
|
+
Copyright(C) <%= Time.now.year %> <%= config[:author] %> <%= config[:email] %>
|
3
|
+
|
4
|
+
This library is free software; you can redistribute it and/or
|
5
|
+
modify it under the terms of the GNU Lesser General Public
|
6
|
+
License version 2.1 as published by the Free Software Foundation.
|
7
|
+
|
8
|
+
This library is distributed in the hope that it will be useful,
|
9
|
+
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
10
|
+
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
11
|
+
Lesser General Public License for more details.
|
12
|
+
|
13
|
+
You should have received a copy of the GNU Lesser General Public
|
14
|
+
License along with this library; if not, write to the Free Software
|
15
|
+
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
16
|
+
*/
|
17
|
+
|
18
|
+
#include <groonga/plugin.h>
|
19
|
+
|
20
|
+
static grn_obj *
|
21
|
+
command_<%= config[:plugin_name] %>(grn_ctx *ctx, int nargs, grn_obj **args, grn_user_data *user_data)
|
22
|
+
{
|
23
|
+
grn_ctx_output_bool(ctx, GRN_FALSE);
|
24
|
+
return NULL;
|
25
|
+
}
|
26
|
+
|
27
|
+
grn_rc
|
28
|
+
GRN_PLUGIN_INIT(grn_ctx *ctx)
|
29
|
+
{
|
30
|
+
return GRN_SUCCESS;
|
31
|
+
}
|
32
|
+
|
33
|
+
grn_rc
|
34
|
+
GRN_PLUGIN_REGISTER(grn_ctx *ctx)
|
35
|
+
{
|
36
|
+
grn_expr_var vars[0];
|
37
|
+
|
38
|
+
grn_plugin_command_create(ctx, "<%= config[:plugin_name] %>", -1, command_<%= config[:plugin_name] %>, 0, vars);
|
39
|
+
|
40
|
+
return ctx->rc;
|
41
|
+
}
|
42
|
+
|
43
|
+
grn_rc
|
44
|
+
GRN_PLUGIN_FIN(grn_ctx *ctx)
|
45
|
+
{
|
46
|
+
return GRN_SUCCESS;
|
47
|
+
}
|
File without changes
|
@@ -0,0 +1,104 @@
|
|
1
|
+
#!/bin/bash
|
2
|
+
|
3
|
+
export BASE_DIR="`dirname $0`"
|
4
|
+
if test -z "$BUILD_DIR"; then
|
5
|
+
BUILD_DIR="$BASE_DIR"
|
6
|
+
fi
|
7
|
+
export BUILD_DIR
|
8
|
+
|
9
|
+
top_dir="$BUILD_DIR/.."
|
10
|
+
top_dir=$(cd -P "$top_dir" 2>/dev/null || cd "$top_dir"; pwd)
|
11
|
+
|
12
|
+
n_processors=1
|
13
|
+
case `uname` in
|
14
|
+
Linux)
|
15
|
+
n_processors="$(grep '^processor' /proc/cpuinfo | wc -l)"
|
16
|
+
;;
|
17
|
+
Darwin)
|
18
|
+
n_processors="$(/usr/sbin/sysctl -n hw.ncpu)"
|
19
|
+
;;
|
20
|
+
*)
|
21
|
+
:
|
22
|
+
;;
|
23
|
+
esac
|
24
|
+
|
25
|
+
if test x"$NO_MAKE" != x"yes"; then
|
26
|
+
MAKE_ARGS=
|
27
|
+
if test $n_processors -gt 1; then
|
28
|
+
MAKE_ARGS="${MAKE_ARGS} -j${n_processors}"
|
29
|
+
fi
|
30
|
+
make -C $top_dir ${MAKE_ARGS} > /dev/null || exit 1
|
31
|
+
fi
|
32
|
+
|
33
|
+
if test -z "$GROONGA"; then
|
34
|
+
GROONGA="groonga"
|
35
|
+
fi
|
36
|
+
export GROONGA
|
37
|
+
|
38
|
+
GRN_PLUGINS_DIR="$top_dir"
|
39
|
+
export GRN_PLUGINS_DIR
|
40
|
+
|
41
|
+
case `uname` in
|
42
|
+
Darwin)
|
43
|
+
DYLD_LIBRARY_PATH="$top_dir/lib/.libs:$DYLD_LIBRARY_PATH"
|
44
|
+
export DYLD_LIBRARY_PATH
|
45
|
+
;;
|
46
|
+
*)
|
47
|
+
:
|
48
|
+
;;
|
49
|
+
esac
|
50
|
+
|
51
|
+
if ! type grntest > /dev/null; then
|
52
|
+
ruby -S gem install grntest
|
53
|
+
fi
|
54
|
+
|
55
|
+
have_targets="false"
|
56
|
+
use_gdb="false"
|
57
|
+
next_argument_is_long_option_value="false"
|
58
|
+
for argument in "$@"; do
|
59
|
+
case "$argument" in
|
60
|
+
--*=*)
|
61
|
+
;;
|
62
|
+
--keep-database|--no-*|--version|--help)
|
63
|
+
# no argument options
|
64
|
+
;;
|
65
|
+
--gdb)
|
66
|
+
# no argument options
|
67
|
+
use_gdb="true"
|
68
|
+
;;
|
69
|
+
--*)
|
70
|
+
next_argument_is_long_option_value="true"
|
71
|
+
continue
|
72
|
+
;;
|
73
|
+
-*)
|
74
|
+
;;
|
75
|
+
*)
|
76
|
+
if test "$next_argument_is_long_option_value" != "true"; then
|
77
|
+
have_targets="true"
|
78
|
+
fi
|
79
|
+
;;
|
80
|
+
esac
|
81
|
+
next_argument_is_long_option_value="false"
|
82
|
+
done
|
83
|
+
|
84
|
+
grntest_options=("$@")
|
85
|
+
if test "$use_gdb" != "true"; then
|
86
|
+
grntest_options=("--n-workers" "${n_processors}" "${grntest_options[@]}")
|
87
|
+
fi
|
88
|
+
if test "$CI" = "true"; then
|
89
|
+
grntest_options=("--reporter" "mark" "${grntest_options[@]}")
|
90
|
+
fi
|
91
|
+
if test "$have_targets" != "true"; then
|
92
|
+
grntest_options=("${grntest_options[@]}" "${BASE_DIR}/suite")
|
93
|
+
fi
|
94
|
+
|
95
|
+
tmpfs=/run/shm
|
96
|
+
if test -d $tmpfs -a -w $tmpfs; then
|
97
|
+
rm -rf "tmp"
|
98
|
+
ln -s $tmpfs "tmp"
|
99
|
+
fi
|
100
|
+
|
101
|
+
grntest \
|
102
|
+
--groonga "$GROONGA" \
|
103
|
+
--base-directory "$BASE_DIR" \
|
104
|
+
"${grntest_options[@]}"
|
@@ -0,0 +1 @@
|
|
1
|
+
register <%= config[:plugin_name] %>/<%= config[:plugin_name] %>
|
File without changes
|
@@ -0,0 +1,23 @@
|
|
1
|
+
Bundler.require
|
2
|
+
|
3
|
+
# temporary solution against Encoding::InvalidByteSequenceError for passenger
|
4
|
+
Encoding.default_external = "UTF-8"
|
5
|
+
|
6
|
+
class App < Sinatra::Base
|
7
|
+
configure do
|
8
|
+
set :assets_precompile, %w(application.js)
|
9
|
+
set :assets_js_compressor, :uglifier
|
10
|
+
register Sinatra::AssetPipeline
|
11
|
+
|
12
|
+
# Actual Rails Assets integration, everything else is Sprockets
|
13
|
+
if defined?(RailsAssets)
|
14
|
+
RailsAssets.load_paths.each do |path|
|
15
|
+
settings.sprockets.append_path(path)
|
16
|
+
end
|
17
|
+
end
|
18
|
+
end
|
19
|
+
|
20
|
+
get "/" do
|
21
|
+
haml :index
|
22
|
+
end
|
23
|
+
end
|
@@ -0,0 +1 @@
|
|
1
|
+
%h1 Hello, Sinatra!
|
metadata
ADDED
@@ -0,0 +1,140 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: hajimeru
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.1.1
|
5
|
+
platform: ruby
|
6
|
+
authors:
|
7
|
+
- Masafumi Yokoyama
|
8
|
+
autorequire:
|
9
|
+
bindir: exe
|
10
|
+
cert_chain: []
|
11
|
+
date: 2015-12-05 00:00:00.000000000 Z
|
12
|
+
dependencies:
|
13
|
+
- !ruby/object:Gem::Dependency
|
14
|
+
name: thor
|
15
|
+
requirement: !ruby/object:Gem::Requirement
|
16
|
+
requirements:
|
17
|
+
- - ">="
|
18
|
+
- !ruby/object:Gem::Version
|
19
|
+
version: '0'
|
20
|
+
type: :runtime
|
21
|
+
prerelease: false
|
22
|
+
version_requirements: !ruby/object:Gem::Requirement
|
23
|
+
requirements:
|
24
|
+
- - ">="
|
25
|
+
- !ruby/object:Gem::Version
|
26
|
+
version: '0'
|
27
|
+
- !ruby/object:Gem::Dependency
|
28
|
+
name: bundler
|
29
|
+
requirement: !ruby/object:Gem::Requirement
|
30
|
+
requirements:
|
31
|
+
- - "~>"
|
32
|
+
- !ruby/object:Gem::Version
|
33
|
+
version: '1.10'
|
34
|
+
type: :development
|
35
|
+
prerelease: false
|
36
|
+
version_requirements: !ruby/object:Gem::Requirement
|
37
|
+
requirements:
|
38
|
+
- - "~>"
|
39
|
+
- !ruby/object:Gem::Version
|
40
|
+
version: '1.10'
|
41
|
+
- !ruby/object:Gem::Dependency
|
42
|
+
name: rake
|
43
|
+
requirement: !ruby/object:Gem::Requirement
|
44
|
+
requirements:
|
45
|
+
- - "~>"
|
46
|
+
- !ruby/object:Gem::Version
|
47
|
+
version: '10.0'
|
48
|
+
type: :development
|
49
|
+
prerelease: false
|
50
|
+
version_requirements: !ruby/object:Gem::Requirement
|
51
|
+
requirements:
|
52
|
+
- - "~>"
|
53
|
+
- !ruby/object:Gem::Version
|
54
|
+
version: '10.0'
|
55
|
+
- !ruby/object:Gem::Dependency
|
56
|
+
name: test-unit
|
57
|
+
requirement: !ruby/object:Gem::Requirement
|
58
|
+
requirements:
|
59
|
+
- - ">="
|
60
|
+
- !ruby/object:Gem::Version
|
61
|
+
version: '0'
|
62
|
+
type: :development
|
63
|
+
prerelease: false
|
64
|
+
version_requirements: !ruby/object:Gem::Requirement
|
65
|
+
requirements:
|
66
|
+
- - ">="
|
67
|
+
- !ruby/object:Gem::Version
|
68
|
+
version: '0'
|
69
|
+
description: A scaffold generator for your project.
|
70
|
+
email:
|
71
|
+
- myokoym@gmail.com
|
72
|
+
executables:
|
73
|
+
- hajimeru
|
74
|
+
extensions: []
|
75
|
+
extra_rdoc_files: []
|
76
|
+
files:
|
77
|
+
- ".gitignore"
|
78
|
+
- ".travis.yml"
|
79
|
+
- Gemfile
|
80
|
+
- LICENSE.txt
|
81
|
+
- README.md
|
82
|
+
- Rakefile
|
83
|
+
- bin/console
|
84
|
+
- bin/setup
|
85
|
+
- exe/hajimeru
|
86
|
+
- hajimeru.gemspec
|
87
|
+
- lib/hajimeru.rb
|
88
|
+
- lib/hajimeru/command.rb
|
89
|
+
- lib/hajimeru/generator.rb
|
90
|
+
- lib/hajimeru/generator/groonga_plugin.rb
|
91
|
+
- lib/hajimeru/generator/javascript.rb
|
92
|
+
- lib/hajimeru/generator/sinatra.rb
|
93
|
+
- lib/hajimeru/generator/templates/groonga_plugin/.gitignore
|
94
|
+
- lib/hajimeru/generator/templates/groonga_plugin/Makefile.am.tt
|
95
|
+
- lib/hajimeru/generator/templates/groonga_plugin/autogen.sh
|
96
|
+
- lib/hajimeru/generator/templates/groonga_plugin/configure.ac.tt
|
97
|
+
- lib/hajimeru/generator/templates/groonga_plugin/plugin_name/Makefile.am.tt
|
98
|
+
- lib/hajimeru/generator/templates/groonga_plugin/plugin_name/plugin_name.c.tt
|
99
|
+
- lib/hajimeru/generator/templates/groonga_plugin/plugin_name/sources.am.tt
|
100
|
+
- lib/hajimeru/generator/templates/groonga_plugin/test/Makefile.am
|
101
|
+
- lib/hajimeru/generator/templates/groonga_plugin/test/run-test.sh
|
102
|
+
- lib/hajimeru/generator/templates/groonga_plugin/test/suite/register.expected.tt
|
103
|
+
- lib/hajimeru/generator/templates/groonga_plugin/test/suite/register.test.tt
|
104
|
+
- lib/hajimeru/generator/templates/javascript/index.html
|
105
|
+
- lib/hajimeru/generator/templates/javascript/index.js
|
106
|
+
- lib/hajimeru/generator/templates/sinatra/.gitignore
|
107
|
+
- lib/hajimeru/generator/templates/sinatra/Gemfile
|
108
|
+
- lib/hajimeru/generator/templates/sinatra/app.rb
|
109
|
+
- lib/hajimeru/generator/templates/sinatra/config.ru
|
110
|
+
- lib/hajimeru/generator/templates/sinatra/views/index.haml
|
111
|
+
- lib/hajimeru/generator/templates/sinatra/views/layout.haml.tt
|
112
|
+
- lib/hajimeru/version.rb
|
113
|
+
homepage: https://github.com/myokoym/hajimeru
|
114
|
+
licenses:
|
115
|
+
- MIT
|
116
|
+
metadata: {}
|
117
|
+
post_install_message: |2
|
118
|
+
! The 'hajimeru' gem has been deprecated and has been replaced by 'hajimeru' gem.
|
119
|
+
! Because the name 'hajimeru' is used in the other project.
|
120
|
+
rdoc_options: []
|
121
|
+
require_paths:
|
122
|
+
- lib
|
123
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
124
|
+
requirements:
|
125
|
+
- - ">="
|
126
|
+
- !ruby/object:Gem::Version
|
127
|
+
version: '0'
|
128
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
129
|
+
requirements:
|
130
|
+
- - ">="
|
131
|
+
- !ruby/object:Gem::Version
|
132
|
+
version: '0'
|
133
|
+
requirements: []
|
134
|
+
rubyforge_project:
|
135
|
+
rubygems_version: 2.5.0
|
136
|
+
signing_key:
|
137
|
+
specification_version: 4
|
138
|
+
summary: A scaffold generator for your project.
|
139
|
+
test_files: []
|
140
|
+
has_rdoc:
|