mvc_one 0.1.0.pre.rc3 → 0.1.0.pre.rc4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.rubocop.yml +32 -9
- data/Gemfile +7 -6
- data/Gemfile.lock +89 -3
- data/Rakefile +3 -3
- data/exe/mvc_one +11 -8
- data/lib/mvc_one/application.rb +56 -0
- data/lib/mvc_one/contracts/application_contract.rb +5 -1
- data/lib/mvc_one/controllers/application_controller.rb +50 -48
- data/lib/mvc_one/models/application_model.rb +3 -1
- data/lib/mvc_one/regexp_router.rb +89 -85
- data/lib/mvc_one/repositories/application_relation.rb +24 -22
- data/lib/mvc_one/repositories/application_repository.rb +13 -9
- data/lib/mvc_one/serializers/application_serializer.rb +100 -98
- data/lib/mvc_one/version.rb +1 -1
- data/lib/mvc_one.rb +3 -3
- data/mvc_one.gemspec +25 -24
- data/templates/general/application_rb.erb +2 -40
- data/templates/general/config_ru.erb +0 -1
- metadata +54 -52
@@ -1,43 +1,5 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
-
require 'yaml'
|
4
|
-
|
5
3
|
# Rack friendly launcher for project
|
6
|
-
class Application
|
7
|
-
|
8
|
-
class Config
|
9
|
-
def self.env
|
10
|
-
ENV.fetch('APP_ENV', 'development')
|
11
|
-
end
|
12
|
-
|
13
|
-
def self.test?
|
14
|
-
env == 'test'
|
15
|
-
end
|
16
|
-
|
17
|
-
def self.secrets
|
18
|
-
YAML.load_file('config/secrets.yml')[Application::Config.env]
|
19
|
-
end
|
20
|
-
end
|
21
|
-
|
22
|
-
def initialize
|
23
|
-
@router = RegexpRouter.new(File.join(File.dirname(__FILE__), 'app', 'config', 'routes.rb'))
|
24
|
-
end
|
25
|
-
|
26
|
-
def self.launch
|
27
|
-
Rack::Builder.new do |builder|
|
28
|
-
builder.use Rack::Session::Cookie, domain: 'localhost', path: '/', expire_after: 3600 * 24,
|
29
|
-
secret: Application::Config.secrets['session_cookie']
|
30
|
-
builder.run Application.new
|
31
|
-
end
|
32
|
-
end
|
33
|
-
|
34
|
-
def call(env)
|
35
|
-
request = Rack::Request.new(env)
|
36
|
-
result = @router.resolve(request.path, request.request_method)
|
37
|
-
controller = result.controller.new(env, result.params, request)
|
38
|
-
controller.resolve(result.action)
|
39
|
-
end
|
40
|
-
end
|
41
|
-
|
42
|
-
# Dir[File.join(File.dirname(__FILE__), 'lib', '**', '*.rb')].each { |file| require file }
|
43
|
-
Dir[File.join(File.dirname(__FILE__), 'app', '**', '*.rb')].each { |file| require file }
|
4
|
+
class Application < MvcOne::Application
|
5
|
+
end
|
metadata
CHANGED
@@ -1,155 +1,155 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: mvc_one
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.0.pre.
|
4
|
+
version: 0.1.0.pre.rc4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Evgenii Sendziuk
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2023-03-
|
11
|
+
date: 2023-03-05 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
|
-
name:
|
14
|
+
name: bcrypt
|
15
15
|
requirement: !ruby/object:Gem::Requirement
|
16
16
|
requirements:
|
17
|
-
- - "
|
17
|
+
- - "~>"
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version: '
|
19
|
+
version: '3.1'
|
20
20
|
type: :runtime
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
|
-
- - "
|
24
|
+
- - "~>"
|
25
25
|
- !ruby/object:Gem::Version
|
26
|
-
version: '
|
26
|
+
version: '3.1'
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
|
-
name:
|
28
|
+
name: dry-struct
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
30
30
|
requirements:
|
31
|
-
- - "
|
31
|
+
- - "~>"
|
32
32
|
- !ruby/object:Gem::Version
|
33
|
-
version: '
|
33
|
+
version: '1.5'
|
34
34
|
type: :runtime
|
35
35
|
prerelease: false
|
36
36
|
version_requirements: !ruby/object:Gem::Requirement
|
37
37
|
requirements:
|
38
|
-
- - "
|
38
|
+
- - "~>"
|
39
39
|
- !ruby/object:Gem::Version
|
40
|
-
version: '
|
40
|
+
version: '1.5'
|
41
41
|
- !ruby/object:Gem::Dependency
|
42
|
-
name:
|
42
|
+
name: dry-transaction
|
43
43
|
requirement: !ruby/object:Gem::Requirement
|
44
44
|
requirements:
|
45
|
-
- - "
|
45
|
+
- - "~>"
|
46
46
|
- !ruby/object:Gem::Version
|
47
|
-
version: '0'
|
47
|
+
version: '0.14'
|
48
48
|
type: :runtime
|
49
49
|
prerelease: false
|
50
50
|
version_requirements: !ruby/object:Gem::Requirement
|
51
51
|
requirements:
|
52
|
-
- - "
|
52
|
+
- - "~>"
|
53
53
|
- !ruby/object:Gem::Version
|
54
|
-
version: '0'
|
54
|
+
version: '0.14'
|
55
55
|
- !ruby/object:Gem::Dependency
|
56
|
-
name:
|
56
|
+
name: dry-validation
|
57
57
|
requirement: !ruby/object:Gem::Requirement
|
58
58
|
requirements:
|
59
|
-
- - "
|
59
|
+
- - "~>"
|
60
60
|
- !ruby/object:Gem::Version
|
61
|
-
version: '
|
61
|
+
version: '1.9'
|
62
62
|
type: :runtime
|
63
63
|
prerelease: false
|
64
64
|
version_requirements: !ruby/object:Gem::Requirement
|
65
65
|
requirements:
|
66
|
-
- - "
|
66
|
+
- - "~>"
|
67
67
|
- !ruby/object:Gem::Version
|
68
|
-
version: '
|
68
|
+
version: '1.9'
|
69
69
|
- !ruby/object:Gem::Dependency
|
70
|
-
name: rack
|
70
|
+
name: rack
|
71
71
|
requirement: !ruby/object:Gem::Requirement
|
72
72
|
requirements:
|
73
|
-
- - "
|
73
|
+
- - "~>"
|
74
74
|
- !ruby/object:Gem::Version
|
75
|
-
version: '
|
75
|
+
version: '3'
|
76
76
|
type: :runtime
|
77
77
|
prerelease: false
|
78
78
|
version_requirements: !ruby/object:Gem::Requirement
|
79
79
|
requirements:
|
80
|
-
- - "
|
80
|
+
- - "~>"
|
81
81
|
- !ruby/object:Gem::Version
|
82
|
-
version: '
|
82
|
+
version: '3'
|
83
83
|
- !ruby/object:Gem::Dependency
|
84
|
-
name:
|
84
|
+
name: rack-session
|
85
85
|
requirement: !ruby/object:Gem::Requirement
|
86
86
|
requirements:
|
87
|
-
- - "
|
87
|
+
- - "~>"
|
88
88
|
- !ruby/object:Gem::Version
|
89
|
-
version: '
|
89
|
+
version: '2'
|
90
90
|
type: :runtime
|
91
91
|
prerelease: false
|
92
92
|
version_requirements: !ruby/object:Gem::Requirement
|
93
93
|
requirements:
|
94
|
-
- - "
|
94
|
+
- - "~>"
|
95
95
|
- !ruby/object:Gem::Version
|
96
|
-
version: '
|
96
|
+
version: '2'
|
97
97
|
- !ruby/object:Gem::Dependency
|
98
|
-
name:
|
98
|
+
name: sequel
|
99
99
|
requirement: !ruby/object:Gem::Requirement
|
100
100
|
requirements:
|
101
|
-
- - "
|
101
|
+
- - "~>"
|
102
102
|
- !ruby/object:Gem::Version
|
103
|
-
version: '
|
103
|
+
version: '5.60'
|
104
104
|
type: :runtime
|
105
105
|
prerelease: false
|
106
106
|
version_requirements: !ruby/object:Gem::Requirement
|
107
107
|
requirements:
|
108
|
-
- - "
|
108
|
+
- - "~>"
|
109
109
|
- !ruby/object:Gem::Version
|
110
|
-
version: '
|
110
|
+
version: '5.60'
|
111
111
|
- !ruby/object:Gem::Dependency
|
112
|
-
name:
|
112
|
+
name: slim
|
113
113
|
requirement: !ruby/object:Gem::Requirement
|
114
114
|
requirements:
|
115
|
-
- - "
|
115
|
+
- - "~>"
|
116
116
|
- !ruby/object:Gem::Version
|
117
|
-
version: '
|
117
|
+
version: '5'
|
118
118
|
type: :runtime
|
119
119
|
prerelease: false
|
120
120
|
version_requirements: !ruby/object:Gem::Requirement
|
121
121
|
requirements:
|
122
|
-
- - "
|
122
|
+
- - "~>"
|
123
123
|
- !ruby/object:Gem::Version
|
124
|
-
version: '
|
124
|
+
version: '5'
|
125
125
|
- !ruby/object:Gem::Dependency
|
126
|
-
name:
|
126
|
+
name: sqlite3
|
127
127
|
requirement: !ruby/object:Gem::Requirement
|
128
128
|
requirements:
|
129
|
-
- - "
|
129
|
+
- - "~>"
|
130
130
|
- !ruby/object:Gem::Version
|
131
|
-
version: '
|
131
|
+
version: '1.5'
|
132
132
|
type: :runtime
|
133
133
|
prerelease: false
|
134
134
|
version_requirements: !ruby/object:Gem::Requirement
|
135
135
|
requirements:
|
136
|
-
- - "
|
136
|
+
- - "~>"
|
137
137
|
- !ruby/object:Gem::Version
|
138
|
-
version: '
|
138
|
+
version: '1.5'
|
139
139
|
- !ruby/object:Gem::Dependency
|
140
|
-
name:
|
140
|
+
name: thor
|
141
141
|
requirement: !ruby/object:Gem::Requirement
|
142
142
|
requirements:
|
143
|
-
- - "
|
143
|
+
- - "~>"
|
144
144
|
- !ruby/object:Gem::Version
|
145
|
-
version: '
|
145
|
+
version: '1.2'
|
146
146
|
type: :runtime
|
147
147
|
prerelease: false
|
148
148
|
version_requirements: !ruby/object:Gem::Requirement
|
149
149
|
requirements:
|
150
|
-
- - "
|
150
|
+
- - "~>"
|
151
151
|
- !ruby/object:Gem::Version
|
152
|
-
version: '
|
152
|
+
version: '1.2'
|
153
153
|
description: Simple mvc framework, not for production purposes
|
154
154
|
email:
|
155
155
|
- evgeniisendziuk@taxdome.com
|
@@ -173,6 +173,7 @@ files:
|
|
173
173
|
- Rakefile
|
174
174
|
- exe/mvc_one
|
175
175
|
- lib/mvc_one.rb
|
176
|
+
- lib/mvc_one/application.rb
|
176
177
|
- lib/mvc_one/contracts/application_contract.rb
|
177
178
|
- lib/mvc_one/controllers/application_controller.rb
|
178
179
|
- lib/mvc_one/models/application_model.rb
|
@@ -199,6 +200,7 @@ licenses:
|
|
199
200
|
metadata:
|
200
201
|
source_code_uri: https://github.com/senzpo/mvc_one.git
|
201
202
|
changelog_uri: https://github.com/senzpo/mvc_one.git
|
203
|
+
rubygems_mfa_required: 'true'
|
202
204
|
post_install_message:
|
203
205
|
rdoc_options: []
|
204
206
|
require_paths:
|