ngxmodgen 0.0.2 → 0.0.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/ChangeLog +6 -0
- data/README.md +3 -3
- data/lib/ngxmodgen/srcgen.rb +15 -1
- data/lib/ngxmodgen/version.rb +1 -1
- data/ngxmodgen.gemspec +0 -1
- data/test/test.rb +1 -2
- metadata +2 -3
- data/README.rdoc +0 -24
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 2eaef23eb37b3cb53fc62ab6478710a17a3d3a0b
|
4
|
+
data.tar.gz: 24fad008f94d7471d845a8b1181672087810bb6c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 83c6917be1819ab9e4f04b48231bc218b568a6a8c03228ae09d59f6bcacab7902dbb47aff7452b1dff482c55c3a9ee7c11e79b46f14d972e14fe8c381563a10f
|
7
|
+
data.tar.gz: f0f72f3ddb9bc096c8241592228cc7be291970e7b257a39fc6beb8193481d5568bbd26c012ab9da4924ac6823264bbf72f9c9b41f4b068d3e7d1194e7d6fce73
|
data/ChangeLog
CHANGED
data/README.md
CHANGED
@@ -21,9 +21,9 @@ Or install it yourself as:
|
|
21
21
|
## Usage
|
22
22
|
|
23
23
|
$ NGINX_MODULE_NAME=hoge
|
24
|
-
$
|
25
|
-
$
|
26
|
-
$
|
24
|
+
$ ngxmodgen -n $NGINX_MODULE_NAME # generate ngx_http_hoge_module.c and config
|
25
|
+
$ ngxmodgen -n $NGINX_MODULE_NAME -t http # generate ngx_http_hoge_module.c and config
|
26
|
+
$ ngxmodgen -n $NGINX_MODULE_NAME -t http_filter # generate ngx_http_hoge_filter_module.c and config
|
27
27
|
|
28
28
|
## Contributing
|
29
29
|
|
data/lib/ngxmodgen/srcgen.rb
CHANGED
@@ -66,6 +66,20 @@ EOS
|
|
66
66
|
|
67
67
|
static ngx_int_t ngx_http_#{@module_name}_filter_init(ngx_conf_t *cf);
|
68
68
|
|
69
|
+
static ngx_command_t ngx_http_#{@module_name}_commands[] = {
|
70
|
+
/*
|
71
|
+
{
|
72
|
+
ngx_string("command_name"),
|
73
|
+
NGX_HTTP_LOC_CONF|NGX_CONF_NOARGS,
|
74
|
+
NULL,
|
75
|
+
0,
|
76
|
+
0,
|
77
|
+
NULL
|
78
|
+
},
|
79
|
+
*/
|
80
|
+
ngx_null_command
|
81
|
+
};
|
82
|
+
|
69
83
|
static ngx_http_module_t ngx_http_#{@module_name}_filter_module_ctx = {
|
70
84
|
NULL, /* preconfiguration */
|
71
85
|
ngx_http_#{@module_name}_filter_init, /* postconfiguration */
|
@@ -83,7 +97,7 @@ static ngx_http_module_t ngx_http_#{@module_name}_filter_module_ctx = {
|
|
83
97
|
ngx_module_t ngx_http_#{@module_name}_filter_module = {
|
84
98
|
NGX_MODULE_V1,
|
85
99
|
&ngx_http_#{@module_name}_filter_module_ctx, /* module context */
|
86
|
-
|
100
|
+
ngx_http_#{@module_name}_commands, /* module directives */
|
87
101
|
NGX_HTTP_MODULE, /* module type */
|
88
102
|
NULL, /* init master */
|
89
103
|
NULL, /* init module */
|
data/lib/ngxmodgen/version.rb
CHANGED
data/ngxmodgen.gemspec
CHANGED
@@ -17,7 +17,6 @@ Gem::Specification.new do |spec|
|
|
17
17
|
spec.executables = spec.files.grep(%r{^bin/}) { |f| File.basename(f) }
|
18
18
|
spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
|
19
19
|
spec.require_paths = ["lib"]
|
20
|
-
spec.has_rdoc = false
|
21
20
|
|
22
21
|
spec.add_development_dependency "bundler", "~> 1.3"
|
23
22
|
spec.add_development_dependency "rake"
|
data/test/test.rb
CHANGED
@@ -1,9 +1,8 @@
|
|
1
|
-
require "minitest/unit"
|
2
1
|
require "minitest/autorun"
|
3
2
|
require "ngxmodgen/configgen"
|
4
3
|
require "ngxmodgen/srcgen"
|
5
4
|
|
6
|
-
class TestNgxmodgen < MiniTest::
|
5
|
+
class TestNgxmodgen < MiniTest::Test
|
7
6
|
def setup
|
8
7
|
@module_name = "hoge"
|
9
8
|
@config_gen = NginxModuleConfigGenerator.new(@module_name)
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: ngxmodgen
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Tatsuhiko Kubo
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2013-
|
11
|
+
date: 2013-09-15 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -66,7 +66,6 @@ files:
|
|
66
66
|
- Gemfile
|
67
67
|
- LICENSE.txt
|
68
68
|
- README.md
|
69
|
-
- README.rdoc
|
70
69
|
- Rakefile
|
71
70
|
- bin/ngxmodgen
|
72
71
|
- lib/ngxmodgen.rb
|
data/README.rdoc
DELETED
@@ -1,24 +0,0 @@
|
|
1
|
-
# ngxmodgen
|
2
|
-
|
3
|
-
ngxmodgen is the code generator for a nginx module
|
4
|
-
|
5
|
-
## Installation
|
6
|
-
|
7
|
-
Add this line to your application's Gemfile:
|
8
|
-
|
9
|
-
gem 'ngxmodgen'
|
10
|
-
|
11
|
-
And then execute:
|
12
|
-
|
13
|
-
$ bundle
|
14
|
-
|
15
|
-
Or install it yourself as:
|
16
|
-
|
17
|
-
$ gem install ngxmodgen
|
18
|
-
|
19
|
-
## Usage
|
20
|
-
|
21
|
-
$ NGINX_MODULE_NAME=hoge
|
22
|
-
$ ngxcodegen -n $NGINX_MODULE_NAME # generate ngx_http_hoge_module.c and config
|
23
|
-
$ ngxcodegen -n $NGINX_MODULE_NAME -t http # generate ngx_http_hoge_module.c and config
|
24
|
-
$ ngxcodegen -n $NGINX_MODULE_NAME -t http_filter # generate ngx_http_hoge_filter_module.c and config
|