sinator 3.0.3 → 3.1.1
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/.github/FUNDING.yml +12 -0
- data/.gitignore +1 -0
- data/CHANGELOG.md +11 -0
- data/Gemfile.lock +9 -1
- data/README.md +18 -19
- data/lib/sinator/templates/Gemfile.erb +12 -11
- data/lib/sinator/templates/config/puma/production.erb +2 -1
- data/lib/sinator/version.rb +1 -1
- data/sinator.gemspec +1 -0
- data/spec/fixtures/config/puma/production.txt +2 -1
- data/spec/fixtures/with_db/gemfile.txt +12 -11
- data/spec/fixtures/without_db/gemfile.txt +10 -9
- data/spec/spec_helper.rb +3 -0
- metadata +18 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 7a63710b6c5c35b11d696ace428df494205183305b61132365338db6f1d344f6
|
4
|
+
data.tar.gz: 3b315314240dfaac92b1da348b0ab2b1120e24b1aa55ecc1c0b7a15f68177c79
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 186a2afb345abb59708dfcf5405b972a68ce5c94c03ebd66cf3da14ffad313797c00c8a8a618c6d17b4cd289fa809b6c7ba230213cf4091429821c9174da0062
|
7
|
+
data.tar.gz: a0c896ca5bfff3d17c9d87882494296b91acc2b9000b34311ce8b55240a9ff93d8261e2a58c33d976ff99711a89a5cbff0a9711070d54261f124125b76f577d2
|
data/.github/FUNDING.yml
ADDED
@@ -0,0 +1,12 @@
|
|
1
|
+
# These are supported funding model platforms
|
2
|
+
|
3
|
+
github: # Replace with up to 4 GitHub Sponsors-enabled usernames e.g., [user1, user2]
|
4
|
+
patreon: # Replace with a single Patreon username
|
5
|
+
open_collective: # Replace with a single Open Collective username
|
6
|
+
ko_fi: kuntoaji
|
7
|
+
tidelift: # Replace with a single Tidelift platform-name/package-name e.g., npm/babel
|
8
|
+
community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry
|
9
|
+
liberapay: # Replace with a single Liberapay username
|
10
|
+
issuehunt: # Replace with a single IssueHunt username
|
11
|
+
otechie: # Replace with a single Otechie username
|
12
|
+
custom: # Replace with up to 4 custom sponsorship URLs e.g., ['link1', 'link2']
|
data/.gitignore
CHANGED
data/CHANGELOG.md
CHANGED
@@ -1,3 +1,14 @@
|
|
1
|
+
3.1.1:
|
2
|
+
* Update Ruby gems
|
3
|
+
|
4
|
+
3.1.0:
|
5
|
+
* update encrypted_cookie to version 0.1.0
|
6
|
+
* set stdout and stderr puma on production
|
7
|
+
|
8
|
+
3.0.4:
|
9
|
+
* update existing gems with non specific version
|
10
|
+
* add sassc gem to generated app
|
11
|
+
|
1
12
|
3.0.3:
|
2
13
|
* update gems
|
3
14
|
|
data/Gemfile.lock
CHANGED
@@ -1,12 +1,14 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
sinator (3.0
|
4
|
+
sinator (3.1.0)
|
5
5
|
|
6
6
|
GEM
|
7
7
|
remote: https://rubygems.org/
|
8
8
|
specs:
|
9
9
|
diff-lcs (1.2.5)
|
10
|
+
docile (1.3.2)
|
11
|
+
json (2.3.1)
|
10
12
|
rspec (3.2.0)
|
11
13
|
rspec-core (~> 3.2.0)
|
12
14
|
rspec-expectations (~> 3.2.0)
|
@@ -20,6 +22,11 @@ GEM
|
|
20
22
|
diff-lcs (>= 1.2.0, < 2.0)
|
21
23
|
rspec-support (~> 3.2.0)
|
22
24
|
rspec-support (3.2.2)
|
25
|
+
simplecov (0.17.0)
|
26
|
+
docile (~> 1.1)
|
27
|
+
json (>= 1.8, < 3)
|
28
|
+
simplecov-html (~> 0.10.0)
|
29
|
+
simplecov-html (0.10.2)
|
23
30
|
|
24
31
|
PLATFORMS
|
25
32
|
ruby
|
@@ -27,6 +34,7 @@ PLATFORMS
|
|
27
34
|
DEPENDENCIES
|
28
35
|
bundler (~> 1.7)
|
29
36
|
rspec (= 3.2.0)
|
37
|
+
simplecov
|
30
38
|
sinator!
|
31
39
|
|
32
40
|
BUNDLED WITH
|
data/README.md
CHANGED
@@ -1,3 +1,4 @@
|
|
1
|
+
[](https://badge.fury.io/rb/sinator)
|
1
2
|
[](https://codeclimate.com/github/kuntoaji/sinator/maintainability)
|
2
3
|
[](https://codeclimate.com/github/kuntoaji/sinator/test_coverage)
|
3
4
|
|
@@ -24,25 +25,38 @@ gem 'sinator'
|
|
24
25
|
```
|
25
26
|
|
26
27
|
### How to Use
|
27
|
-
|
28
|
+
|
29
|
+
Generate app in current directory without database.
|
28
30
|
|
29
31
|
```
|
30
32
|
sinator -n my_app
|
31
33
|
```
|
32
34
|
|
33
|
-
|
35
|
+
Generate app in target directory without database.
|
34
36
|
|
35
37
|
```
|
36
38
|
sinator -n my_app -t target/dir
|
37
39
|
```
|
38
40
|
|
39
|
-
|
41
|
+
Generate app in current directory with database. `-d` option will generate app with `Sequel` ORM and PostgreSQL adapter.
|
40
42
|
|
41
43
|
```
|
42
44
|
sinator -n my_app -d
|
43
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
|
+
```
|
44
57
|
|
45
58
|
### Example Usage
|
59
|
+
|
46
60
|
This example assume that PostgreSQL is already running.
|
47
61
|
See [github.com/kuntoaji/todo_sinator](https://github.com/kuntoaji/todo_sinator) for Todo Application generated with Sinator.
|
48
62
|
1. run `sinator -n my_app -d`
|
@@ -113,19 +127,4 @@ See [github.com/kuntoaji/todo_sinator](https://github.com/kuntoaji/todo_sinator)
|
|
113
127
|
|
114
128
|
11. run the server `bundle exec puma`
|
115
129
|
12. open url `localhost:9292/artists`
|
116
|
-
|
117
|
-
### List of Ruby Gems
|
118
|
-
|
119
|
-
* sinatra
|
120
|
-
* sinatra-contrib
|
121
|
-
* encrypted_cookie
|
122
|
-
* `Sinatra::Reloader` in development environment only
|
123
|
-
* puma
|
124
|
-
* `Rack::Session::EncryptedCookie`
|
125
|
-
* `Rack::Csrf`
|
126
|
-
* sequel
|
127
|
-
* sequel_pg as PostgreSQL adapter
|
128
|
-
* sprockets
|
129
|
-
* sass
|
130
|
-
* uglifier
|
131
|
-
* tux for console, run with `bundle exec tux`.
|
130
|
+
13. Enjoy! :)
|
@@ -1,15 +1,16 @@
|
|
1
1
|
source 'https://rubygems.org'
|
2
2
|
|
3
|
-
gem 'sinatra', '2.
|
4
|
-
gem 'sinatra-contrib', '2.
|
5
|
-
gem 'encrypted_cookie', '0.0
|
6
|
-
gem 'rack_csrf', '2.6
|
7
|
-
gem 'puma', '
|
8
|
-
gem 'tux', '0.3
|
9
|
-
gem 'uglifier', '4.
|
10
|
-
gem 'sass', '3.7
|
11
|
-
gem '
|
3
|
+
gem 'sinatra', '~> 2.2'
|
4
|
+
gem 'sinatra-contrib', '~> 2.2', require: false
|
5
|
+
gem 'encrypted_cookie', '0.1.0'
|
6
|
+
gem 'rack_csrf', '~> 2.6', require: 'rack/csrf'
|
7
|
+
gem 'puma', '~> 5.6'
|
8
|
+
gem 'tux', '~> 0.3', require: false
|
9
|
+
gem 'uglifier', '~> 4.2', require: false
|
10
|
+
gem 'sass', '~> 3.7', require: false
|
11
|
+
gem 'sassc', '~> 2.4', require: false
|
12
|
+
gem 'sprockets', '~> 4.0'
|
12
13
|
<% if @with_database -%>
|
13
|
-
gem 'sequel', '5
|
14
|
-
gem 'sequel_pg', '1.
|
14
|
+
gem 'sequel', '>= 5'
|
15
|
+
gem 'sequel_pg', '>= 1.15', require: 'sequel'
|
15
16
|
<% end -%>
|
@@ -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
data/sinator.gemspec
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
|
@@ -1,13 +1,14 @@
|
|
1
1
|
source 'https://rubygems.org'
|
2
2
|
|
3
|
-
gem 'sinatra', '2.
|
4
|
-
gem 'sinatra-contrib', '2.
|
5
|
-
gem 'encrypted_cookie', '0.0
|
6
|
-
gem 'rack_csrf', '2.6
|
7
|
-
gem 'puma', '
|
8
|
-
gem 'tux', '0.3
|
9
|
-
gem 'uglifier', '4.
|
10
|
-
gem 'sass', '3.7
|
11
|
-
gem '
|
12
|
-
gem '
|
13
|
-
gem '
|
3
|
+
gem 'sinatra', '~> 2.2'
|
4
|
+
gem 'sinatra-contrib', '~> 2.2', require: false
|
5
|
+
gem 'encrypted_cookie', '0.1.0'
|
6
|
+
gem 'rack_csrf', '~> 2.6', require: 'rack/csrf'
|
7
|
+
gem 'puma', '~> 5.6'
|
8
|
+
gem 'tux', '~> 0.3', require: false
|
9
|
+
gem 'uglifier', '~> 4.2', require: false
|
10
|
+
gem 'sass', '~> 3.7', require: false
|
11
|
+
gem 'sassc', '~> 2.4', require: false
|
12
|
+
gem 'sprockets', '~> 4.0'
|
13
|
+
gem 'sequel', '>= 5'
|
14
|
+
gem 'sequel_pg', '>= 1.15', require: 'sequel'
|
@@ -1,11 +1,12 @@
|
|
1
1
|
source 'https://rubygems.org'
|
2
2
|
|
3
|
-
gem 'sinatra', '2.
|
4
|
-
gem 'sinatra-contrib', '2.
|
5
|
-
gem 'encrypted_cookie', '0.0
|
6
|
-
gem 'rack_csrf', '2.6
|
7
|
-
gem 'puma', '
|
8
|
-
gem 'tux', '0.3
|
9
|
-
gem 'uglifier', '4.
|
10
|
-
gem 'sass', '3.7
|
11
|
-
gem '
|
3
|
+
gem 'sinatra', '~> 2.2'
|
4
|
+
gem 'sinatra-contrib', '~> 2.2', require: false
|
5
|
+
gem 'encrypted_cookie', '0.1.0'
|
6
|
+
gem 'rack_csrf', '~> 2.6', require: 'rack/csrf'
|
7
|
+
gem 'puma', '~> 5.6'
|
8
|
+
gem 'tux', '~> 0.3', require: false
|
9
|
+
gem 'uglifier', '~> 4.2', require: false
|
10
|
+
gem 'sass', '~> 3.7', require: false
|
11
|
+
gem 'sassc', '~> 2.4', require: false
|
12
|
+
gem 'sprockets', '~> 4.0'
|
data/spec/spec_helper.rb
CHANGED
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.
|
4
|
+
version: 3.1.1
|
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: 2022-05-14 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -38,6 +38,20 @@ dependencies:
|
|
38
38
|
- - '='
|
39
39
|
- !ruby/object:Gem::Version
|
40
40
|
version: 3.2.0
|
41
|
+
- !ruby/object:Gem::Dependency
|
42
|
+
name: simplecov
|
43
|
+
requirement: !ruby/object:Gem::Requirement
|
44
|
+
requirements:
|
45
|
+
- - ">="
|
46
|
+
- !ruby/object:Gem::Version
|
47
|
+
version: '0'
|
48
|
+
type: :development
|
49
|
+
prerelease: false
|
50
|
+
version_requirements: !ruby/object:Gem::Requirement
|
51
|
+
requirements:
|
52
|
+
- - ">="
|
53
|
+
- !ruby/object:Gem::Version
|
54
|
+
version: '0'
|
41
55
|
description: Sinator will generate Sinatra application with minimum configuration
|
42
56
|
email: kuntoaji@kaklabs.com
|
43
57
|
executables:
|
@@ -45,6 +59,7 @@ executables:
|
|
45
59
|
extensions: []
|
46
60
|
extra_rdoc_files: []
|
47
61
|
files:
|
62
|
+
- ".github/FUNDING.yml"
|
48
63
|
- ".gitignore"
|
49
64
|
- ".rspec"
|
50
65
|
- CHANGELOG.md
|
@@ -119,7 +134,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
119
134
|
- !ruby/object:Gem::Version
|
120
135
|
version: '0'
|
121
136
|
requirements: []
|
122
|
-
rubygems_version: 3.
|
137
|
+
rubygems_version: 3.3.7
|
123
138
|
signing_key:
|
124
139
|
specification_version: 4
|
125
140
|
summary: Sinatra application generator
|