peony 0.0.1 → 0.0.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/.rspec +2 -0
- data/README.md +2 -0
- data/bin/peony +43 -0
- data/lib/peony/default.rb +18 -0
- data/lib/peony/rake.rb +3 -0
- data/lib/peony/settings.rb +29 -0
- data/lib/peony/template_binding.rb +22 -0
- data/lib/peony/utils.rb +173 -0
- data/lib/peony/version.rb +1 -1
- data/lib/peony.rb +12 -1
- data/peony.gemspec +5 -4
- data/recipes/db/pg.rake +47 -0
- data/recipes/nginx/www.rake +24 -0
- data/recipes/nginx.rake +50 -0
- data/spec/settings_in_rake_spec.rb +39 -0
- data/spec/settings_spec.rb +73 -0
- data/spec/spec_helper.rb +40 -0
- data/templates/nginx/conf/fastcgi.conf +25 -0
- data/templates/nginx/conf/fastcgi.conf.default +25 -0
- data/templates/nginx/conf/fastcgi_params +24 -0
- data/templates/nginx/conf/fastcgi_params.default +24 -0
- data/templates/nginx/conf/koi-utf +109 -0
- data/templates/nginx/conf/koi-win +103 -0
- data/templates/nginx/conf/mime.types +80 -0
- data/templates/nginx/conf/mime.types.default +80 -0
- data/templates/nginx/conf/nginx.conf +118 -0
- data/templates/nginx/conf/nginx.conf.default +118 -0
- data/templates/nginx/conf/scgi_params +16 -0
- data/templates/nginx/conf/scgi_params.default +16 -0
- data/templates/nginx/conf/uwsgi_params +16 -0
- data/templates/nginx/conf/uwsgi_params.default +16 -0
- data/templates/nginx/conf/win-utf +126 -0
- data/templates/nginx/sites-enabled/static.conf.erb +11 -0
- data/templates/nginx/www.conf.erb +91 -0
- metadata +55 -7
@@ -0,0 +1,16 @@
|
|
1
|
+
|
2
|
+
scgi_param REQUEST_METHOD $request_method;
|
3
|
+
scgi_param REQUEST_URI $request_uri;
|
4
|
+
scgi_param QUERY_STRING $query_string;
|
5
|
+
scgi_param CONTENT_TYPE $content_type;
|
6
|
+
|
7
|
+
scgi_param DOCUMENT_URI $document_uri;
|
8
|
+
scgi_param DOCUMENT_ROOT $document_root;
|
9
|
+
scgi_param SCGI 1;
|
10
|
+
scgi_param SERVER_PROTOCOL $server_protocol;
|
11
|
+
scgi_param HTTPS $https if_not_empty;
|
12
|
+
|
13
|
+
scgi_param REMOTE_ADDR $remote_addr;
|
14
|
+
scgi_param REMOTE_PORT $remote_port;
|
15
|
+
scgi_param SERVER_PORT $server_port;
|
16
|
+
scgi_param SERVER_NAME $server_name;
|
@@ -0,0 +1,16 @@
|
|
1
|
+
|
2
|
+
uwsgi_param QUERY_STRING $query_string;
|
3
|
+
uwsgi_param REQUEST_METHOD $request_method;
|
4
|
+
uwsgi_param CONTENT_TYPE $content_type;
|
5
|
+
uwsgi_param CONTENT_LENGTH $content_length;
|
6
|
+
|
7
|
+
uwsgi_param REQUEST_URI $request_uri;
|
8
|
+
uwsgi_param PATH_INFO $document_uri;
|
9
|
+
uwsgi_param DOCUMENT_ROOT $document_root;
|
10
|
+
uwsgi_param SERVER_PROTOCOL $server_protocol;
|
11
|
+
uwsgi_param HTTPS $https if_not_empty;
|
12
|
+
|
13
|
+
uwsgi_param REMOTE_ADDR $remote_addr;
|
14
|
+
uwsgi_param REMOTE_PORT $remote_port;
|
15
|
+
uwsgi_param SERVER_PORT $server_port;
|
16
|
+
uwsgi_param SERVER_NAME $server_name;
|
@@ -0,0 +1,16 @@
|
|
1
|
+
|
2
|
+
uwsgi_param QUERY_STRING $query_string;
|
3
|
+
uwsgi_param REQUEST_METHOD $request_method;
|
4
|
+
uwsgi_param CONTENT_TYPE $content_type;
|
5
|
+
uwsgi_param CONTENT_LENGTH $content_length;
|
6
|
+
|
7
|
+
uwsgi_param REQUEST_URI $request_uri;
|
8
|
+
uwsgi_param PATH_INFO $document_uri;
|
9
|
+
uwsgi_param DOCUMENT_ROOT $document_root;
|
10
|
+
uwsgi_param SERVER_PROTOCOL $server_protocol;
|
11
|
+
uwsgi_param HTTPS $https if_not_empty;
|
12
|
+
|
13
|
+
uwsgi_param REMOTE_ADDR $remote_addr;
|
14
|
+
uwsgi_param REMOTE_PORT $remote_port;
|
15
|
+
uwsgi_param SERVER_PORT $server_port;
|
16
|
+
uwsgi_param SERVER_NAME $server_name;
|
@@ -0,0 +1,126 @@
|
|
1
|
+
|
2
|
+
# This map is not a full windows-1251 <> utf8 map: it does not
|
3
|
+
# contain Serbian and Macedonian letters. If you need a full map,
|
4
|
+
# use contrib/unicode2nginx/win-utf map instead.
|
5
|
+
|
6
|
+
charset_map windows-1251 utf-8 {
|
7
|
+
|
8
|
+
82 E2809A ; # single low-9 quotation mark
|
9
|
+
|
10
|
+
84 E2809E ; # double low-9 quotation mark
|
11
|
+
85 E280A6 ; # ellipsis
|
12
|
+
86 E280A0 ; # dagger
|
13
|
+
87 E280A1 ; # double dagger
|
14
|
+
88 E282AC ; # euro
|
15
|
+
89 E280B0 ; # per mille
|
16
|
+
|
17
|
+
91 E28098 ; # left single quotation mark
|
18
|
+
92 E28099 ; # right single quotation mark
|
19
|
+
93 E2809C ; # left double quotation mark
|
20
|
+
94 E2809D ; # right double quotation mark
|
21
|
+
95 E280A2 ; # bullet
|
22
|
+
96 E28093 ; # en dash
|
23
|
+
97 E28094 ; # em dash
|
24
|
+
|
25
|
+
99 E284A2 ; # trade mark sign
|
26
|
+
|
27
|
+
A0 C2A0 ; #
|
28
|
+
A1 D18E ; # capital Byelorussian short U
|
29
|
+
A2 D19E ; # small Byelorussian short u
|
30
|
+
|
31
|
+
A4 C2A4 ; # currency sign
|
32
|
+
A5 D290 ; # capital Ukrainian soft G
|
33
|
+
A6 C2A6 ; # borken bar
|
34
|
+
A7 C2A7 ; # section sign
|
35
|
+
A8 D081 ; # capital YO
|
36
|
+
A9 C2A9 ; # (C)
|
37
|
+
AA D084 ; # capital Ukrainian YE
|
38
|
+
AB C2AB ; # left-pointing double angle quotation mark
|
39
|
+
AC C2AC ; # not sign
|
40
|
+
AD C2AD ; # soft hypen
|
41
|
+
AE C2AE ; # (R)
|
42
|
+
AF D087 ; # capital Ukrainian YI
|
43
|
+
|
44
|
+
B0 C2B0 ; # °
|
45
|
+
B1 C2B1 ; # plus-minus sign
|
46
|
+
B2 D086 ; # capital Ukrainian I
|
47
|
+
B3 D196 ; # small Ukrainian i
|
48
|
+
B4 D291 ; # small Ukrainian soft g
|
49
|
+
B5 C2B5 ; # micro sign
|
50
|
+
B6 C2B6 ; # pilcrow sign
|
51
|
+
B7 C2B7 ; # ·
|
52
|
+
B8 D191 ; # small yo
|
53
|
+
B9 E28496 ; # numero sign
|
54
|
+
BA D194 ; # small Ukrainian ye
|
55
|
+
BB C2BB ; # right-pointing double angle quotation mark
|
56
|
+
|
57
|
+
BF D197 ; # small Ukrainian yi
|
58
|
+
|
59
|
+
C0 D090 ; # capital A
|
60
|
+
C1 D091 ; # capital B
|
61
|
+
C2 D092 ; # capital V
|
62
|
+
C3 D093 ; # capital G
|
63
|
+
C4 D094 ; # capital D
|
64
|
+
C5 D095 ; # capital YE
|
65
|
+
C6 D096 ; # capital ZH
|
66
|
+
C7 D097 ; # capital Z
|
67
|
+
C8 D098 ; # capital I
|
68
|
+
C9 D099 ; # capital J
|
69
|
+
CA D09A ; # capital K
|
70
|
+
CB D09B ; # capital L
|
71
|
+
CC D09C ; # capital M
|
72
|
+
CD D09D ; # capital N
|
73
|
+
CE D09E ; # capital O
|
74
|
+
CF D09F ; # capital P
|
75
|
+
|
76
|
+
D0 D0A0 ; # capital R
|
77
|
+
D1 D0A1 ; # capital S
|
78
|
+
D2 D0A2 ; # capital T
|
79
|
+
D3 D0A3 ; # capital U
|
80
|
+
D4 D0A4 ; # capital F
|
81
|
+
D5 D0A5 ; # capital KH
|
82
|
+
D6 D0A6 ; # capital TS
|
83
|
+
D7 D0A7 ; # capital CH
|
84
|
+
D8 D0A8 ; # capital SH
|
85
|
+
D9 D0A9 ; # capital SHCH
|
86
|
+
DA D0AA ; # capital hard sign
|
87
|
+
DB D0AB ; # capital Y
|
88
|
+
DC D0AC ; # capital soft sign
|
89
|
+
DD D0AD ; # capital E
|
90
|
+
DE D0AE ; # capital YU
|
91
|
+
DF D0AF ; # capital YA
|
92
|
+
|
93
|
+
E0 D0B0 ; # small a
|
94
|
+
E1 D0B1 ; # small b
|
95
|
+
E2 D0B2 ; # small v
|
96
|
+
E3 D0B3 ; # small g
|
97
|
+
E4 D0B4 ; # small d
|
98
|
+
E5 D0B5 ; # small ye
|
99
|
+
E6 D0B6 ; # small zh
|
100
|
+
E7 D0B7 ; # small z
|
101
|
+
E8 D0B8 ; # small i
|
102
|
+
E9 D0B9 ; # small j
|
103
|
+
EA D0BA ; # small k
|
104
|
+
EB D0BB ; # small l
|
105
|
+
EC D0BC ; # small m
|
106
|
+
ED D0BD ; # small n
|
107
|
+
EE D0BE ; # small o
|
108
|
+
EF D0BF ; # small p
|
109
|
+
|
110
|
+
F0 D180 ; # small r
|
111
|
+
F1 D181 ; # small s
|
112
|
+
F2 D182 ; # small t
|
113
|
+
F3 D183 ; # small u
|
114
|
+
F4 D184 ; # small f
|
115
|
+
F5 D185 ; # small kh
|
116
|
+
F6 D186 ; # small ts
|
117
|
+
F7 D187 ; # small ch
|
118
|
+
F8 D188 ; # small sh
|
119
|
+
F9 D189 ; # small shch
|
120
|
+
FA D18A ; # small hard sign
|
121
|
+
FB D18B ; # small y
|
122
|
+
FC D18C ; # small soft sign
|
123
|
+
FD D18D ; # small e
|
124
|
+
FE D18E ; # small yu
|
125
|
+
FF D18F ; # small ya
|
126
|
+
}
|
@@ -0,0 +1,91 @@
|
|
1
|
+
#user usergroup
|
2
|
+
user <%= user %> <%= group %>;
|
3
|
+
|
4
|
+
worker_processes <%= worker_processes %>;
|
5
|
+
|
6
|
+
#[debug, info, notice, warn, error, crit]
|
7
|
+
error_log www_error.log debug;
|
8
|
+
pid <%= nginx_run_dir %>/www.pid;
|
9
|
+
|
10
|
+
worker_rlimit_nofile 8192;
|
11
|
+
|
12
|
+
#async IO event model.
|
13
|
+
events {
|
14
|
+
worker_connections 8192;
|
15
|
+
}
|
16
|
+
|
17
|
+
http {
|
18
|
+
include conf/mime.types;
|
19
|
+
default_type application/octet-stream;
|
20
|
+
|
21
|
+
log_format main '$remote_addr – $remote_user [$time_local] $status '
|
22
|
+
'"$request" $body_bytes_sent "$http_referer" '
|
23
|
+
'"$http_user_agent" "$http_x_forwarded_for"';
|
24
|
+
|
25
|
+
access_log www_access.log main;
|
26
|
+
|
27
|
+
server_names_hash_bucket_size 128;
|
28
|
+
client_header_buffer_size 32k;
|
29
|
+
large_client_header_buffers 4 128k;
|
30
|
+
client_max_body_size 32m;
|
31
|
+
client_body_buffer_size 512k;
|
32
|
+
|
33
|
+
sendfile on;
|
34
|
+
tcp_nopush on;
|
35
|
+
tcp_nodelay on;
|
36
|
+
|
37
|
+
keepalive_timeout 60;
|
38
|
+
|
39
|
+
fastcgi_connect_timeout 300;
|
40
|
+
fastcgi_send_timeout 300;
|
41
|
+
fastcgi_read_timeout 300;
|
42
|
+
fastcgi_buffer_size 64k;
|
43
|
+
fastcgi_buffers 4 64k;
|
44
|
+
fastcgi_busy_buffers_size 128k;
|
45
|
+
fastcgi_temp_file_write_size 128k;
|
46
|
+
|
47
|
+
gzip on;
|
48
|
+
gzip_min_length 1k;
|
49
|
+
gzip_buffers 4 16k;
|
50
|
+
gzip_http_version 1.1;
|
51
|
+
gzip_comp_level 2;
|
52
|
+
gzip_types text/plain application/x-javascript text/css application/xml;
|
53
|
+
gzip_vary on;
|
54
|
+
|
55
|
+
|
56
|
+
<%- upstreams.each do|up| -%>
|
57
|
+
upstream <%= up[:name] %> {
|
58
|
+
<%- up[:servers].each do|config| -%>
|
59
|
+
server <%= config %>;
|
60
|
+
<%- end -%>
|
61
|
+
}
|
62
|
+
<%- end -%>
|
63
|
+
|
64
|
+
server {
|
65
|
+
listen <%= www_http_port %>;
|
66
|
+
server_name <%= server_name || "localhost" %>;
|
67
|
+
access_log http.access.log main;
|
68
|
+
|
69
|
+
index index.html index.htm index.php;
|
70
|
+
|
71
|
+
include sites-enabled/*.http.conf;
|
72
|
+
}
|
73
|
+
|
74
|
+
<%- if use_ssl -%>
|
75
|
+
server {
|
76
|
+
listen <%= www_https_port %>;
|
77
|
+
server_name <%= server_name || "localhost" %>;
|
78
|
+
access_log https.access.log main;
|
79
|
+
ssl on;
|
80
|
+
ssl_certificate <%= ssl_certificate %>;
|
81
|
+
ssl_certificate_key <%= ssl_certificate_key %>;
|
82
|
+
ssl_session_timeout 5m;
|
83
|
+
ssl_protocols SSLv2 SSLv3 TLSv1;
|
84
|
+
ssl_ciphers ALL:!ADH:!EXPORT56:RC4+RSA:+HIGH:+MEDIUM:+LOW:+SSLv2:+EXP;
|
85
|
+
ssl_prefer_server_ciphers on;
|
86
|
+
|
87
|
+
include sites-enabled/*.https.conf;
|
88
|
+
}
|
89
|
+
<%- end -%>
|
90
|
+
}
|
91
|
+
|
metadata
CHANGED
@@ -1,15 +1,29 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: peony
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- James Zhan
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2013-08-
|
11
|
+
date: 2013-08-20 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
|
+
- !ruby/object:Gem::Dependency
|
14
|
+
name: rake
|
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'
|
13
27
|
- !ruby/object:Gem::Dependency
|
14
28
|
name: bundler
|
15
29
|
requirement: !ruby/object:Gem::Requirement
|
@@ -25,7 +39,7 @@ dependencies:
|
|
25
39
|
- !ruby/object:Gem::Version
|
26
40
|
version: '1.3'
|
27
41
|
- !ruby/object:Gem::Dependency
|
28
|
-
name:
|
42
|
+
name: rspec
|
29
43
|
requirement: !ruby/object:Gem::Requirement
|
30
44
|
requirements:
|
31
45
|
- - '>='
|
@@ -41,19 +55,50 @@ dependencies:
|
|
41
55
|
description: Local Script Management System Using Rake
|
42
56
|
email:
|
43
57
|
- zhiqiangzhan@gmail.com
|
44
|
-
executables:
|
58
|
+
executables:
|
59
|
+
- peony
|
45
60
|
extensions: []
|
46
61
|
extra_rdoc_files: []
|
47
62
|
files:
|
48
63
|
- .gitignore
|
64
|
+
- .rspec
|
49
65
|
- Gemfile
|
50
66
|
- LICENSE.txt
|
51
67
|
- README.md
|
52
68
|
- Rakefile
|
69
|
+
- bin/peony
|
53
70
|
- lib/peony.rb
|
71
|
+
- lib/peony/default.rb
|
72
|
+
- lib/peony/rake.rb
|
73
|
+
- lib/peony/settings.rb
|
74
|
+
- lib/peony/template_binding.rb
|
75
|
+
- lib/peony/utils.rb
|
54
76
|
- lib/peony/version.rb
|
55
77
|
- peony.gemspec
|
56
|
-
|
78
|
+
- recipes/db/pg.rake
|
79
|
+
- recipes/nginx.rake
|
80
|
+
- recipes/nginx/www.rake
|
81
|
+
- spec/settings_in_rake_spec.rb
|
82
|
+
- spec/settings_spec.rb
|
83
|
+
- spec/spec_helper.rb
|
84
|
+
- templates/nginx/conf/fastcgi.conf
|
85
|
+
- templates/nginx/conf/fastcgi.conf.default
|
86
|
+
- templates/nginx/conf/fastcgi_params
|
87
|
+
- templates/nginx/conf/fastcgi_params.default
|
88
|
+
- templates/nginx/conf/koi-utf
|
89
|
+
- templates/nginx/conf/koi-win
|
90
|
+
- templates/nginx/conf/mime.types
|
91
|
+
- templates/nginx/conf/mime.types.default
|
92
|
+
- templates/nginx/conf/nginx.conf
|
93
|
+
- templates/nginx/conf/nginx.conf.default
|
94
|
+
- templates/nginx/conf/scgi_params
|
95
|
+
- templates/nginx/conf/scgi_params.default
|
96
|
+
- templates/nginx/conf/uwsgi_params
|
97
|
+
- templates/nginx/conf/uwsgi_params.default
|
98
|
+
- templates/nginx/conf/win-utf
|
99
|
+
- templates/nginx/sites-enabled/static.conf.erb
|
100
|
+
- templates/nginx/www.conf.erb
|
101
|
+
homepage: https://github.com/jameszhan/peony
|
57
102
|
licenses:
|
58
103
|
- MIT
|
59
104
|
metadata: {}
|
@@ -76,6 +121,9 @@ rubyforge_project:
|
|
76
121
|
rubygems_version: 2.0.6
|
77
122
|
signing_key:
|
78
123
|
specification_version: 4
|
79
|
-
summary: Local Script Management System Using Rake
|
80
|
-
test_files:
|
124
|
+
summary: Local Script Management System Using Rake.
|
125
|
+
test_files:
|
126
|
+
- spec/settings_in_rake_spec.rb
|
127
|
+
- spec/settings_spec.rb
|
128
|
+
- spec/spec_helper.rb
|
81
129
|
has_rdoc:
|