makanai 0.1.6 → 0.1.7
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.rubocop.yml +1 -1
- data/.ruby-version +1 -1
- data/.travis.yml +3 -2
- data/CHANGELOG.md +5 -0
- data/Gemfile.lock +35 -33
- data/README.md +5 -3
- data/lib/makanai/application.rb +2 -2
- data/lib/makanai/generator/application/templates/gemfile.erb +6 -1
- data/lib/makanai/model.rb +2 -0
- data/lib/makanai/template_engine/erb.rb +1 -0
- data/lib/makanai/version.rb +1 -1
- data/makanai.gemspec +2 -1
- data/sample/Gemfile +9 -0
- metadata +23 -8
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: e74d48c4c10a817b2dfad39c4aafb057a660152d27f9edd66cbfbb9293688749
|
4
|
+
data.tar.gz: 67ea0e86c3b9ad4228e623628f81b70bb2c6ff40de415790a1a8812180d6c002
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 99c175dffd8df4f05d1d371ac6eb2e2ba58bc4a90937606dc3c174c910642519da29fc8dcaa0a14e29a1b8b737e1fedfbacc8c6eff0d7bf8fad773ba5e891cb1
|
7
|
+
data.tar.gz: 44e7b1185134b873bda34309925422a46838e616641575dc03700cf8a8194d8cb393adf7fe22d33d823bc76df9be4bcbba22b4d6a8b1c3fe281848c956fbc706
|
data/.rubocop.yml
CHANGED
data/.ruby-version
CHANGED
@@ -1 +1 @@
|
|
1
|
-
|
1
|
+
3.0.0
|
data/.travis.yml
CHANGED
@@ -6,12 +6,13 @@ services:
|
|
6
6
|
- mysql
|
7
7
|
rvm:
|
8
8
|
- 2.6.6
|
9
|
-
- 2.7.
|
9
|
+
- 2.7.2
|
10
|
+
- 3.0.0
|
10
11
|
- ruby-head
|
11
12
|
os:
|
12
13
|
- linux
|
13
14
|
before_install:
|
14
|
-
- gem install bundler -v 2.
|
15
|
+
- gem install bundler -v 2.2.3
|
15
16
|
- mysql -e 'CREATE DATABASE IF NOT EXISTS makanai;'
|
16
17
|
before_script:
|
17
18
|
- psql -c "create user makanai WITH PASSWORD 'password';" -U postgres
|
data/CHANGELOG.md
CHANGED
@@ -46,3 +46,8 @@
|
|
46
46
|
|
47
47
|
* :zap: remove sqlite3 from runtime_dependency.
|
48
48
|
https://github.com/Madogiwa0124/makanai/commit/d63c3b12cf6fc412a8d88806dca9710e210e5fe0
|
49
|
+
|
50
|
+
## :gift: 2021/01/05 `v.1.7` released.
|
51
|
+
* :package: dependency update.
|
52
|
+
* :gem: supported ruby `3.0.0`.
|
53
|
+
https://github.com/Madogiwa0124/makanai/pull/82
|
data/Gemfile.lock
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
makanai (0.1.
|
4
|
+
makanai (0.1.7)
|
5
5
|
rack (>= 2.0.7, < 2.3.0)
|
6
6
|
rake (>= 10, < 14)
|
7
7
|
|
@@ -9,60 +9,61 @@ GEM
|
|
9
9
|
remote: https://rubygems.org/
|
10
10
|
specs:
|
11
11
|
ast (2.4.1)
|
12
|
-
codecov (0.2.
|
13
|
-
colorize
|
12
|
+
codecov (0.2.12)
|
14
13
|
json
|
15
14
|
simplecov
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
haml (5.1.2)
|
15
|
+
diff-lcs (1.4.4)
|
16
|
+
docile (1.3.4)
|
17
|
+
haml (5.2.1)
|
20
18
|
temple (>= 0.8.0)
|
21
19
|
tilt
|
22
|
-
json (2.
|
20
|
+
json (2.5.1)
|
23
21
|
mysql2 (0.5.3)
|
24
|
-
parallel (1.
|
25
|
-
parser (
|
22
|
+
parallel (1.20.1)
|
23
|
+
parser (3.0.0.0)
|
26
24
|
ast (~> 2.4.1)
|
27
25
|
pg (1.2.3)
|
28
26
|
rack (2.2.3)
|
29
27
|
rainbow (3.0.0)
|
30
|
-
rake (13.0.
|
31
|
-
regexp_parser (
|
28
|
+
rake (13.0.3)
|
29
|
+
regexp_parser (2.0.2)
|
32
30
|
rexml (3.2.4)
|
33
|
-
rspec (3.
|
34
|
-
rspec-core (~> 3.
|
35
|
-
rspec-expectations (~> 3.
|
36
|
-
rspec-mocks (~> 3.
|
37
|
-
rspec-core (3.
|
38
|
-
rspec-support (~> 3.
|
39
|
-
rspec-expectations (3.
|
31
|
+
rspec (3.10.0)
|
32
|
+
rspec-core (~> 3.10.0)
|
33
|
+
rspec-expectations (~> 3.10.0)
|
34
|
+
rspec-mocks (~> 3.10.0)
|
35
|
+
rspec-core (3.10.0)
|
36
|
+
rspec-support (~> 3.10.0)
|
37
|
+
rspec-expectations (3.10.0)
|
40
38
|
diff-lcs (>= 1.2.0, < 2.0)
|
41
|
-
rspec-support (~> 3.
|
42
|
-
rspec-mocks (3.
|
39
|
+
rspec-support (~> 3.10.0)
|
40
|
+
rspec-mocks (3.10.0)
|
43
41
|
diff-lcs (>= 1.2.0, < 2.0)
|
44
|
-
rspec-support (~> 3.
|
45
|
-
rspec-support (3.
|
46
|
-
rubocop (
|
42
|
+
rspec-support (~> 3.10.0)
|
43
|
+
rspec-support (3.10.0)
|
44
|
+
rubocop (1.7.0)
|
47
45
|
parallel (~> 1.10)
|
48
|
-
parser (>= 2.7.1.
|
46
|
+
parser (>= 2.7.1.5)
|
49
47
|
rainbow (>= 2.2.2, < 4.0)
|
50
|
-
regexp_parser (>= 1.
|
48
|
+
regexp_parser (>= 1.8, < 3.0)
|
51
49
|
rexml
|
52
|
-
rubocop-ast (>=
|
50
|
+
rubocop-ast (>= 1.2.0, < 2.0)
|
53
51
|
ruby-progressbar (~> 1.7)
|
54
52
|
unicode-display_width (>= 1.4.0, < 2.0)
|
55
|
-
rubocop-ast (
|
56
|
-
parser (>= 2.7.1.
|
53
|
+
rubocop-ast (1.3.0)
|
54
|
+
parser (>= 2.7.1.5)
|
57
55
|
ruby-progressbar (1.10.1)
|
58
|
-
simplecov (0.
|
56
|
+
simplecov (0.21.1)
|
59
57
|
docile (~> 1.1)
|
60
58
|
simplecov-html (~> 0.11)
|
61
|
-
|
59
|
+
simplecov_json_formatter (~> 0.1)
|
60
|
+
simplecov-html (0.12.3)
|
61
|
+
simplecov_json_formatter (0.1.2)
|
62
62
|
sqlite3 (1.4.2)
|
63
63
|
temple (0.8.2)
|
64
64
|
tilt (2.0.10)
|
65
65
|
unicode-display_width (1.7.0)
|
66
|
+
webrick (1.7.0)
|
66
67
|
|
67
68
|
PLATFORMS
|
68
69
|
ruby
|
@@ -75,8 +76,9 @@ DEPENDENCIES
|
|
75
76
|
mysql2 (~> 0.5)
|
76
77
|
pg (~> 1.2)
|
77
78
|
rspec (~> 3.0)
|
78
|
-
rubocop (~> 0
|
79
|
+
rubocop (~> 1.0)
|
79
80
|
sqlite3 (~> 1.4.1)
|
81
|
+
webrick (~> 1.7.0)
|
80
82
|
|
81
83
|
BUNDLED WITH
|
82
|
-
2.
|
84
|
+
2.2.3
|
data/README.md
CHANGED
@@ -32,9 +32,9 @@ $ mkdir sample
|
|
32
32
|
$ cd sample
|
33
33
|
$ makanai init
|
34
34
|
$ ruby app.rb
|
35
|
-
[
|
36
|
-
[
|
37
|
-
[
|
35
|
+
[2021-01-05 09:37:09] INFO WEBrick 1.7.0
|
36
|
+
[2021-01-05 09:37:09] INFO ruby 3.0.0 (2020-12-25) [x86_64-darwin18]
|
37
|
+
[2021-01-05 09:37:09] INFO WEBrick::HTTPServer#start: pid=10675 port=8080
|
38
38
|
```
|
39
39
|
|
40
40
|
# Usage
|
@@ -68,6 +68,8 @@ root ┬ app.rb # main application file
|
|
68
68
|
├ views # views files(ex. index.erb)
|
69
69
|
├ models # models files(ex. post.rb)
|
70
70
|
├ migration # migration files(ex. 00_create_resources.sql)
|
71
|
+
├ Rakefile # rake tasks
|
72
|
+
├ Gemfile # dependencies
|
71
73
|
└ db # use Sqlite3 dabase file
|
72
74
|
```
|
73
75
|
|
data/lib/makanai/application.rb
CHANGED
@@ -20,7 +20,7 @@ module Makanai
|
|
20
20
|
def run!
|
21
21
|
app_config = config.rack_app_config
|
22
22
|
handler = Rack::Handler.get(app_config[:handler])
|
23
|
-
handler.run(self, { Host: app_config[:host], Port: app_config[:port] })
|
23
|
+
handler.run(self, **{ Host: app_config[:host], Port: app_config[:port] })
|
24
24
|
rescue Interrupt
|
25
25
|
handler.shutdown
|
26
26
|
puts '==== Goodbye! :) ===='
|
@@ -30,7 +30,7 @@ module Makanai
|
|
30
30
|
@request = Makanai::Request.new(env)
|
31
31
|
@response = Makanai::Response.new
|
32
32
|
route_result = execute_route
|
33
|
-
return route_result.result if route_result.
|
33
|
+
return route_result.result if route_result.instance_of?(Response)
|
34
34
|
@response.body << execute_route
|
35
35
|
@response.result
|
36
36
|
end
|
data/lib/makanai/model.rb
CHANGED
@@ -55,11 +55,13 @@ module Makanai
|
|
55
55
|
end
|
56
56
|
|
57
57
|
def self.buid_sql_text(value)
|
58
|
+
# rubocop:disable Lint/DuplicateBranch
|
58
59
|
case value
|
59
60
|
when String then "'#{value.gsub(/'/, "''")}'"
|
60
61
|
when Numeric, Integer then value
|
61
62
|
else value
|
62
63
|
end
|
64
|
+
# rubocop:enable Lint/DuplicateBranch
|
63
65
|
end
|
64
66
|
|
65
67
|
def assign_attributes(attributes)
|
data/lib/makanai/version.rb
CHANGED
data/makanai.gemspec
CHANGED
@@ -28,10 +28,11 @@ Gem::Specification.new do |spec|
|
|
28
28
|
spec.add_dependency "rake", ">= 10", "< 14"
|
29
29
|
spec.add_dependency "rack", ">= 2.0.7", "< 2.3.0"
|
30
30
|
spec.add_development_dependency "sqlite3", "~> 1.4.1"
|
31
|
-
spec.add_development_dependency "rubocop", "~> 0
|
31
|
+
spec.add_development_dependency "rubocop", "~> 1.0"
|
32
32
|
spec.add_development_dependency "bundler", "~> 2.0"
|
33
33
|
spec.add_development_dependency "rspec", "~> 3.0"
|
34
34
|
spec.add_development_dependency "pg", "~> 1.2"
|
35
35
|
spec.add_development_dependency "mysql2", "~> 0.5"
|
36
|
+
spec.add_development_dependency "webrick", "~> 1.7.0"
|
36
37
|
spec.add_development_dependency "haml", "~> 5.0"
|
37
38
|
end
|
data/sample/Gemfile
ADDED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: makanai
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.7
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Madogiwa
|
8
|
-
autorequire:
|
8
|
+
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2021-01-05 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rake
|
@@ -70,14 +70,14 @@ dependencies:
|
|
70
70
|
requirements:
|
71
71
|
- - "~>"
|
72
72
|
- !ruby/object:Gem::Version
|
73
|
-
version: '0
|
73
|
+
version: '1.0'
|
74
74
|
type: :development
|
75
75
|
prerelease: false
|
76
76
|
version_requirements: !ruby/object:Gem::Requirement
|
77
77
|
requirements:
|
78
78
|
- - "~>"
|
79
79
|
- !ruby/object:Gem::Version
|
80
|
-
version: '0
|
80
|
+
version: '1.0'
|
81
81
|
- !ruby/object:Gem::Dependency
|
82
82
|
name: bundler
|
83
83
|
requirement: !ruby/object:Gem::Requirement
|
@@ -134,6 +134,20 @@ dependencies:
|
|
134
134
|
- - "~>"
|
135
135
|
- !ruby/object:Gem::Version
|
136
136
|
version: '0.5'
|
137
|
+
- !ruby/object:Gem::Dependency
|
138
|
+
name: webrick
|
139
|
+
requirement: !ruby/object:Gem::Requirement
|
140
|
+
requirements:
|
141
|
+
- - "~>"
|
142
|
+
- !ruby/object:Gem::Version
|
143
|
+
version: 1.7.0
|
144
|
+
type: :development
|
145
|
+
prerelease: false
|
146
|
+
version_requirements: !ruby/object:Gem::Requirement
|
147
|
+
requirements:
|
148
|
+
- - "~>"
|
149
|
+
- !ruby/object:Gem::Version
|
150
|
+
version: 1.7.0
|
137
151
|
- !ruby/object:Gem::Dependency
|
138
152
|
name: haml
|
139
153
|
requirement: !ruby/object:Gem::Requirement
|
@@ -199,6 +213,7 @@ files:
|
|
199
213
|
- lib/makanai/template_engine/haml.rb
|
200
214
|
- lib/makanai/version.rb
|
201
215
|
- makanai.gemspec
|
216
|
+
- sample/Gemfile
|
202
217
|
- sample/Rakefile
|
203
218
|
- sample/app.rb
|
204
219
|
- sample/db/.keep
|
@@ -211,7 +226,7 @@ licenses:
|
|
211
226
|
metadata:
|
212
227
|
homepage_uri: https://github.com/Madogiwa0124/makanai
|
213
228
|
source_code_uri: https://github.com/Madogiwa0124/makanai
|
214
|
-
post_install_message:
|
229
|
+
post_install_message:
|
215
230
|
rdoc_options: []
|
216
231
|
require_paths:
|
217
232
|
- lib
|
@@ -226,8 +241,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
226
241
|
- !ruby/object:Gem::Version
|
227
242
|
version: '0'
|
228
243
|
requirements: []
|
229
|
-
rubygems_version: 3.
|
230
|
-
signing_key:
|
244
|
+
rubygems_version: 3.2.3
|
245
|
+
signing_key:
|
231
246
|
specification_version: 4
|
232
247
|
summary: simple web application framework for learning.
|
233
248
|
test_files: []
|