sinator 3.0.4 → 3.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +8 -0
- data/README.md +17 -19
- data/lib/sinator/templates/Gemfile.erb +1 -1
- data/lib/sinator/templates/config/puma/production.erb +2 -1
- data/lib/sinator/version.rb +1 -1
- data/spec/fixtures/config/puma/production.txt +2 -1
- data/spec/fixtures/with_db/gemfile.txt +1 -1
- data/spec/fixtures/without_db/gemfile.txt +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 1aa4ae2029c77358b5a30a2232bc6ef5d5d9d9d5cfa3743d1d21cfd6b189fb6c
|
4
|
+
data.tar.gz: e6dbac172b17d025023a058879efd22987707769a71071067e2a73176168585b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 8b892090a3aa9f4fab41999064d4cbbe2cdbeacf2ddbd75febd404e9209be9612256006c3564d05ed77d56f1be56676a1dfd8bb150d20c9be68971283112fc0d
|
7
|
+
data.tar.gz: 7f92e1055c30eb4c86b5e92a16139b0f5e0a9860b1100c58aa6ce4f956da36e09eb4d49d33bfc4d20208e56f9664c7299379a89f6093badcd68012ef1ab99df7
|
data/CHANGELOG.md
CHANGED
data/README.md
CHANGED
@@ -25,25 +25,38 @@ gem 'sinator'
|
|
25
25
|
```
|
26
26
|
|
27
27
|
### How to Use
|
28
|
-
|
28
|
+
|
29
|
+
Generate app in current directory without database.
|
29
30
|
|
30
31
|
```
|
31
32
|
sinator -n my_app
|
32
33
|
```
|
33
34
|
|
34
|
-
|
35
|
+
Generate app in target directory without database.
|
35
36
|
|
36
37
|
```
|
37
38
|
sinator -n my_app -t target/dir
|
38
39
|
```
|
39
40
|
|
40
|
-
|
41
|
+
Generate app in current directory with database. `-d` option will generate app with `Sequel` ORM and PostgreSQL adapter.
|
41
42
|
|
42
43
|
```
|
43
44
|
sinator -n my_app -d
|
44
45
|
```
|
46
|
+
Run web server on localhost.
|
47
|
+
|
48
|
+
```
|
49
|
+
bundle exec puma
|
50
|
+
```
|
51
|
+
|
52
|
+
Run application console / interactive mode / IRB.
|
53
|
+
|
54
|
+
```
|
55
|
+
bundle exec tux
|
56
|
+
```
|
45
57
|
|
46
58
|
### Example Usage
|
59
|
+
|
47
60
|
This example assume that PostgreSQL is already running.
|
48
61
|
See [github.com/kuntoaji/todo_sinator](https://github.com/kuntoaji/todo_sinator) for Todo Application generated with Sinator.
|
49
62
|
1. run `sinator -n my_app -d`
|
@@ -114,19 +127,4 @@ See [github.com/kuntoaji/todo_sinator](https://github.com/kuntoaji/todo_sinator)
|
|
114
127
|
|
115
128
|
11. run the server `bundle exec puma`
|
116
129
|
12. open url `localhost:9292/artists`
|
117
|
-
|
118
|
-
### List of Ruby Gems
|
119
|
-
|
120
|
-
* sinatra
|
121
|
-
* sinatra-contrib
|
122
|
-
* encrypted_cookie
|
123
|
-
* `Sinatra::Reloader` in development environment only
|
124
|
-
* puma
|
125
|
-
* `Rack::Session::EncryptedCookie`
|
126
|
-
* `Rack::Csrf`
|
127
|
-
* sequel
|
128
|
-
* sequel_pg as PostgreSQL adapter
|
129
|
-
* sprockets
|
130
|
-
* sass
|
131
|
-
* uglifier
|
132
|
-
* tux for console, run with `bundle exec tux`.
|
130
|
+
13. Enjoy! :)
|
@@ -2,7 +2,7 @@ source 'https://rubygems.org'
|
|
2
2
|
|
3
3
|
gem 'sinatra', '~> 2.0'
|
4
4
|
gem 'sinatra-contrib', '~> 2.0', require: false
|
5
|
-
gem 'encrypted_cookie', '0.0
|
5
|
+
gem 'encrypted_cookie', '0.1.0'
|
6
6
|
gem 'rack_csrf', '~> 2.6', require: 'rack/csrf'
|
7
7
|
gem 'puma', '~> 4.3'
|
8
8
|
gem 'tux', '~> 0.3', require: false
|
@@ -3,6 +3,7 @@ bind 'unix:///path/to/shared/tmp/sockets/puma.sock'
|
|
3
3
|
pidfile '/path/to/shared/tmp/pids/puma.pid'
|
4
4
|
ctl_socket = '/path/to/shared/tmp/sockets/pumactl.sock'
|
5
5
|
state_path '/path/to/shared/tmp/sockets/puma.state'
|
6
|
+
stdout_redirect '/path/to/shared/log/stdout.log', '/path/to/shared/log/stderr.log'
|
6
7
|
activate_control_app 'unix:///path/to/shared/tmp/sockets/pumactl.sock'
|
7
8
|
daemonize
|
8
9
|
quiet
|
@@ -13,4 +14,4 @@ preload_app!
|
|
13
14
|
|
14
15
|
before_fork do
|
15
16
|
<%= @app_class_name %>::DB.disconnect if defined?(<%= @app_class_name %>::DB)
|
16
|
-
end
|
17
|
+
end
|
data/lib/sinator/version.rb
CHANGED
@@ -3,6 +3,7 @@ bind 'unix:///path/to/shared/tmp/sockets/puma.sock'
|
|
3
3
|
pidfile '/path/to/shared/tmp/pids/puma.pid'
|
4
4
|
ctl_socket = '/path/to/shared/tmp/sockets/pumactl.sock'
|
5
5
|
state_path '/path/to/shared/tmp/sockets/puma.state'
|
6
|
+
stdout_redirect '/path/to/shared/log/stdout.log', '/path/to/shared/log/stderr.log'
|
6
7
|
activate_control_app 'unix:///path/to/shared/tmp/sockets/pumactl.sock'
|
7
8
|
daemonize
|
8
9
|
quiet
|
@@ -13,4 +14,4 @@ preload_app!
|
|
13
14
|
|
14
15
|
before_fork do
|
15
16
|
MyApp::DB.disconnect if defined?(MyApp::DB)
|
16
|
-
end
|
17
|
+
end
|
@@ -2,7 +2,7 @@ source 'https://rubygems.org'
|
|
2
2
|
|
3
3
|
gem 'sinatra', '~> 2.0'
|
4
4
|
gem 'sinatra-contrib', '~> 2.0', require: false
|
5
|
-
gem 'encrypted_cookie', '0.0
|
5
|
+
gem 'encrypted_cookie', '0.1.0'
|
6
6
|
gem 'rack_csrf', '~> 2.6', require: 'rack/csrf'
|
7
7
|
gem 'puma', '~> 4.3'
|
8
8
|
gem 'tux', '~> 0.3', require: false
|
@@ -2,7 +2,7 @@ source 'https://rubygems.org'
|
|
2
2
|
|
3
3
|
gem 'sinatra', '~> 2.0'
|
4
4
|
gem 'sinatra-contrib', '~> 2.0', require: false
|
5
|
-
gem 'encrypted_cookie', '0.0
|
5
|
+
gem 'encrypted_cookie', '0.1.0'
|
6
6
|
gem 'rack_csrf', '~> 2.6', require: 'rack/csrf'
|
7
7
|
gem 'puma', '~> 4.3'
|
8
8
|
gem 'tux', '~> 0.3', require: false
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: sinator
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 3.0
|
4
|
+
version: 3.1.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Kunto Aji Kristianto
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2020-08-22 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -133,7 +133,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
133
133
|
- !ruby/object:Gem::Version
|
134
134
|
version: '0'
|
135
135
|
requirements: []
|
136
|
-
rubygems_version: 3.
|
136
|
+
rubygems_version: 3.1.2
|
137
137
|
signing_key:
|
138
138
|
specification_version: 4
|
139
139
|
summary: Sinatra application generator
|