mvc_one 0.1.0.pre.rc4 → 0.1.0.pre.rc6

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 584b655c4c21ec1bc91d22c75ad156d5589192a809cb57e9ef5a6429ece09ea5
4
- data.tar.gz: d5f3c5067a607a1ad7679e1ac41ab11bad2313a18a090610f7c40dae2f571d42
3
+ metadata.gz: 33312c38faf0286265795d2a627cfe60701f8628d3b8d20b19a19dd5d667be45
4
+ data.tar.gz: a489d6a1b46b36f68fcbb7d6bbadace5b63c120e3754893664d033d3c064759a
5
5
  SHA512:
6
- metadata.gz: a21a9373694e01b29bf60a578004b3d063c6ace39ec4ab8f1e3adea4dc6c8cd75d4f2d3b30bf7a78dec7bd7a45a58b25bd77f1816f901352d8c48eabd84ebd20
7
- data.tar.gz: a3ee6770db6b480a0665b6b4ea337abfc2ca6c81845e5e2466d92a4887fa87dd27624ab9bab9805a5245fe8236b475d6681914e913aa6ac956f06bf1b34dc3ba
6
+ metadata.gz: 670c5fdebac075f58192d7e24d1e6fa4af1a63ce044d44b7ce85acdbc341b5d132a82b0dff1a459c5b3e5777a1621417e7baa22025242f129e17ec2c53c87cac
7
+ data.tar.gz: a3e33e5a01d0133060372d604018e12eff95688c732cb1645906c621ed6a2e6a782f4484c501714028d383eaceb2052be91bc8ebda3ee519c895ee67aff881b6
data/.idea/mvc_one.iml CHANGED
@@ -12,11 +12,29 @@
12
12
  <orderEntry type="jdk" jdkName="RVM: ruby-2.7.4 [global]" jdkType="RUBY_SDK" />
13
13
  <orderEntry type="sourceFolder" forTests="false" />
14
14
  <orderEntry type="library" scope="PROVIDED" name="ast (v2.4.2, RVM: ruby-2.7.4 [global]) [gem]" level="application" />
15
+ <orderEntry type="library" scope="PROVIDED" name="bcrypt (v3.1.18, RVM: ruby-2.7.4 [global]) [gem]" level="application" />
15
16
  <orderEntry type="library" scope="PROVIDED" name="bundler (v2.4.7, RVM: ruby-2.7.4 [global]) [gem]" level="application" />
17
+ <orderEntry type="library" scope="PROVIDED" name="concurrent-ruby (v1.2.2, RVM: ruby-2.7.4 [global]) [gem]" level="application" />
16
18
  <orderEntry type="library" scope="PROVIDED" name="diff-lcs (v1.5.0, RVM: ruby-2.7.4 [global]) [gem]" level="application" />
19
+ <orderEntry type="library" scope="PROVIDED" name="dry-configurable (v1.0.1, RVM: ruby-2.7.4 [global]) [gem]" level="application" />
20
+ <orderEntry type="library" scope="PROVIDED" name="dry-core (v1.0.0, RVM: ruby-2.7.4 [global]) [gem]" level="application" />
21
+ <orderEntry type="library" scope="PROVIDED" name="dry-events (v1.0.1, RVM: ruby-2.7.4 [global]) [gem]" level="application" />
22
+ <orderEntry type="library" scope="PROVIDED" name="dry-inflector (v1.0.0, RVM: ruby-2.7.4 [global]) [gem]" level="application" />
23
+ <orderEntry type="library" scope="PROVIDED" name="dry-initializer (v3.1.1, RVM: ruby-2.7.4 [global]) [gem]" level="application" />
24
+ <orderEntry type="library" scope="PROVIDED" name="dry-logic (v1.5.0, RVM: ruby-2.7.4 [global]) [gem]" level="application" />
25
+ <orderEntry type="library" scope="PROVIDED" name="dry-matcher (v0.10.0, RVM: ruby-2.7.4 [global]) [gem]" level="application" />
26
+ <orderEntry type="library" scope="PROVIDED" name="dry-monads (v1.6.0, RVM: ruby-2.7.4 [global]) [gem]" level="application" />
27
+ <orderEntry type="library" scope="PROVIDED" name="dry-schema (v1.13.0, RVM: ruby-2.7.4 [global]) [gem]" level="application" />
28
+ <orderEntry type="library" scope="PROVIDED" name="dry-struct (v1.6.0, RVM: ruby-2.7.4 [global]) [gem]" level="application" />
29
+ <orderEntry type="library" scope="PROVIDED" name="dry-transaction (v0.15.0, RVM: ruby-2.7.4 [global]) [gem]" level="application" />
30
+ <orderEntry type="library" scope="PROVIDED" name="dry-types (v1.7.1, RVM: ruby-2.7.4 [global]) [gem]" level="application" />
31
+ <orderEntry type="library" scope="PROVIDED" name="dry-validation (v1.10.0, RVM: ruby-2.7.4 [global]) [gem]" level="application" />
32
+ <orderEntry type="library" scope="PROVIDED" name="ice_nine (v0.11.2, RVM: ruby-2.7.4 [global]) [gem]" level="application" />
17
33
  <orderEntry type="library" scope="PROVIDED" name="json (v2.6.3, RVM: ruby-2.7.4 [global]) [gem]" level="application" />
18
34
  <orderEntry type="library" scope="PROVIDED" name="parallel (v1.22.1, RVM: ruby-2.7.4 [global]) [gem]" level="application" />
19
35
  <orderEntry type="library" scope="PROVIDED" name="parser (v3.2.1.0, RVM: ruby-2.7.4 [global]) [gem]" level="application" />
36
+ <orderEntry type="library" scope="PROVIDED" name="rack (v3.0.4.2, RVM: ruby-2.7.4 [global]) [gem]" level="application" />
37
+ <orderEntry type="library" scope="PROVIDED" name="rack-session (v2.0.0, RVM: ruby-2.7.4 [global]) [gem]" level="application" />
20
38
  <orderEntry type="library" scope="PROVIDED" name="rainbow (v3.1.1, RVM: ruby-2.7.4 [global]) [gem]" level="application" />
21
39
  <orderEntry type="library" scope="PROVIDED" name="rake (v13.0.6, RVM: ruby-2.7.4 [global]) [gem]" level="application" />
22
40
  <orderEntry type="library" scope="PROVIDED" name="regexp_parser (v2.7.0, RVM: ruby-2.7.4 [global]) [gem]" level="application" />
@@ -28,29 +46,39 @@
28
46
  <orderEntry type="library" scope="PROVIDED" name="rspec-support (v3.12.0, RVM: ruby-2.7.4 [global]) [gem]" level="application" />
29
47
  <orderEntry type="library" scope="PROVIDED" name="rubocop (v1.46.0, RVM: ruby-2.7.4 [global]) [gem]" level="application" />
30
48
  <orderEntry type="library" scope="PROVIDED" name="rubocop-ast (v1.26.0, RVM: ruby-2.7.4 [global]) [gem]" level="application" />
49
+ <orderEntry type="library" scope="PROVIDED" name="rubocop-capybara (v2.17.1, RVM: ruby-2.7.4 [global]) [gem]" level="application" />
50
+ <orderEntry type="library" scope="PROVIDED" name="rubocop-rake (v0.6.0, RVM: ruby-2.7.4 [global]) [gem]" level="application" />
51
+ <orderEntry type="library" scope="PROVIDED" name="rubocop-rspec (v2.18.1, RVM: ruby-2.7.4 [global]) [gem]" level="application" />
52
+ <orderEntry type="library" scope="PROVIDED" name="rubocop-sequel (v0.3.4, RVM: ruby-2.7.4 [global]) [gem]" level="application" />
31
53
  <orderEntry type="library" scope="PROVIDED" name="ruby-progressbar (v1.11.0, RVM: ruby-2.7.4 [global]) [gem]" level="application" />
54
+ <orderEntry type="library" scope="PROVIDED" name="sequel (v5.66.0, RVM: ruby-2.7.4 [global]) [gem]" level="application" />
55
+ <orderEntry type="library" scope="PROVIDED" name="slim (v5.0.0, RVM: ruby-2.7.4 [global]) [gem]" level="application" />
56
+ <orderEntry type="library" scope="PROVIDED" name="sqlite3 (v1.6.1, RVM: ruby-2.7.4 [global]) [gem]" level="application" />
57
+ <orderEntry type="library" scope="PROVIDED" name="temple (v0.10.0, RVM: ruby-2.7.4 [global]) [gem]" level="application" />
32
58
  <orderEntry type="library" scope="PROVIDED" name="thor (v1.2.1, RVM: ruby-2.7.4 [global]) [gem]" level="application" />
59
+ <orderEntry type="library" scope="PROVIDED" name="tilt (v2.0.11, RVM: ruby-2.7.4 [global]) [gem]" level="application" />
33
60
  <orderEntry type="library" scope="PROVIDED" name="unicode-display_width (v2.4.2, RVM: ruby-2.7.4 [global]) [gem]" level="application" />
61
+ <orderEntry type="library" scope="PROVIDED" name="zeitwerk (v2.6.7, RVM: ruby-2.7.4 [global]) [gem]" level="application" />
34
62
  </component>
35
63
  <component name="RakeTasksCache">
36
64
  <option name="myRootTask">
37
65
  <RakeTaskImpl id="rake">
38
66
  <subtasks>
39
- <RakeTaskImpl description="Build mvc_one-0.1.0.gem into the pkg directory" fullCommand="build" id="build" />
67
+ <RakeTaskImpl description="Build mvc_one-0.1.0.pre.rc3.gem into the pkg directory" fullCommand="build" id="build" />
40
68
  <RakeTaskImpl id="build">
41
69
  <subtasks>
42
- <RakeTaskImpl description="Generate SHA512 checksum if mvc_one-0.1.0.gem into the checksums directory" fullCommand="build:checksum" id="checksum" />
70
+ <RakeTaskImpl description="Generate SHA512 checksum if mvc_one-0.1.0.pre.rc3.gem into the checksums directory" fullCommand="build:checksum" id="checksum" />
43
71
  </subtasks>
44
72
  </RakeTaskImpl>
45
73
  <RakeTaskImpl description="Remove any temporary products" fullCommand="clean" id="clean" />
46
74
  <RakeTaskImpl description="Remove any generated files" fullCommand="clobber" id="clobber" />
47
- <RakeTaskImpl description="Build and install mvc_one-0.1.0.gem into system gems" fullCommand="install" id="install" />
75
+ <RakeTaskImpl description="Build and install mvc_one-0.1.0.pre.rc3.gem into system gems" fullCommand="install" id="install" />
48
76
  <RakeTaskImpl id="install">
49
77
  <subtasks>
50
- <RakeTaskImpl description="Build and install mvc_one-0.1.0.gem into system gems without network access" fullCommand="install:local" id="local" />
78
+ <RakeTaskImpl description="Build and install mvc_one-0.1.0.pre.rc3.gem into system gems without network access" fullCommand="install:local" id="local" />
51
79
  </subtasks>
52
80
  </RakeTaskImpl>
53
- <RakeTaskImpl description="Create tag v0.1.0 and build and push mvc_one-0.1.0.gem to rubygems.org" fullCommand="release[remote]" id="release[remote]" />
81
+ <RakeTaskImpl description="Create tag v0.1.0.pre.rc3 and build and push mvc_one-0.1.0.pre.rc3.gem to rubygems.org" fullCommand="release[remote]" id="release[remote]" />
54
82
  <RakeTaskImpl description="Run RuboCop" fullCommand="rubocop" id="rubocop" />
55
83
  <RakeTaskImpl id="rubocop">
56
84
  <subtasks>
data/.rubocop.yml CHANGED
@@ -19,7 +19,7 @@ RSpec/MultipleMemoizedHelpers:
19
19
  Enabled: false
20
20
 
21
21
  Metrics/AbcSize:
22
- Max: 50
22
+ Max: 100
23
23
 
24
24
  Metrics/ClassLength:
25
25
  Max: 150
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- mvc_one (0.1.0.pre.rc4)
4
+ mvc_one (0.1.0.pre.rc6)
5
5
  bcrypt (~> 3.1)
6
6
  dry-struct (~> 1.5)
7
7
  dry-transaction (~> 0.14)
data/exe/mvc_one CHANGED
@@ -82,6 +82,15 @@ module MvcOne
82
82
 
83
83
  gemfile = ERB.new(File.read(File.join(gem_path, 'templates/general/gemfile.erb')))
84
84
  File.write "#{name_normalized}/Gemfile", gemfile.result(binding)
85
+
86
+ app_layout = ERB.new(File.read(File.join(gem_path, 'templates/app/application_layout.slim')))
87
+ File.write "#{name_normalized}/app/views/application_layout.slim", app_layout
88
+
89
+ welcome_controller = ERB.new(File.read(File.join(gem_path, 'templates/app/welcome_controller_rb.erb')))
90
+ File.write "#{name_normalized}/app/controllers/welcome_controller.rb", welcome_controller.result(binding)
91
+
92
+ welcome_index = ERB.new(File.read(File.join(gem_path, 'templates/app/welcome_index.slim')))
93
+ File.write "#{name_normalized}/app/views/welcome/index.slim", welcome_index
85
94
  end
86
95
 
87
96
  def make_default_dirs(root_dir_name)
@@ -98,10 +107,10 @@ module MvcOne
98
107
  Dir.mkdir("#{root_dir_name}/app/#{dir_name}")
99
108
  end
100
109
  end
101
- end
102
110
 
103
- def gem_path
104
- File.expand_path("#{File.dirname(__FILE__)}/..")
111
+ def gem_path
112
+ File.expand_path("#{File.dirname(__FILE__)}/..")
113
+ end
105
114
  end
106
115
  end
107
116
 
@@ -27,7 +27,7 @@ module MvcOne
27
27
  end
28
28
 
29
29
  def initialize
30
- @router = RegexpRouter.new(File.join(File.dirname(__FILE__), 'app', 'config', 'routes.rb'))
30
+ @router = RegexpRouter.new(File.join('app', 'config', 'routes.rb'))
31
31
  end
32
32
 
33
33
  def self.launch
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module MvcOne
4
- VERSION = '0.1.0-rc4'
4
+ VERSION = '0.1.0-rc6'
5
5
  end
@@ -0,0 +1,9 @@
1
+ | <!doctype html>
2
+ html[lang="en"]
3
+ head
4
+ meta[charset="utf-8"]
5
+ meta[name="viewport" content="width=device-width, initial-scale=1"]
6
+ title
7
+ | Application
8
+ body
9
+ == yield
@@ -0,0 +1,7 @@
1
+ # frozen_string_literal: true
2
+
3
+ class WelcomeController < MvcOne::ApplicationController
4
+ def index
5
+ render
6
+ end
7
+ end
@@ -0,0 +1,2 @@
1
+ h1
2
+ | Welcome to welcome controller
@@ -1,6 +1,8 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  lambda do
4
+ any to: 'welcome#index'
5
+
4
6
  # Example
5
7
  # get '/api/v1/users', to: 'api#v1#users#index'
6
8
  # get '/api/v1/users/:id', to: 'api#v1#users#show'
@@ -2,4 +2,6 @@
2
2
 
3
3
  # Rack friendly launcher for project
4
4
  class Application < MvcOne::Application
5
- end
5
+ end
6
+
7
+ Dir[File.join(File.dirname(__FILE__), 'app', '**', '*.rb')].each { |file| require file }
@@ -1,12 +1,12 @@
1
1
  development:
2
2
  db:
3
- name: '<%= name_normalized%>.db'
3
+ name: '<%= name_normalized%>.db'
4
4
  adapter: 'sqlite'
5
5
  connection_line: 'sqlite://db/<%= name_normalized%>.db'
6
6
  path: './db/<%= name_normalized%>.db'
7
7
  test:
8
8
  db:
9
- name: '<%= name_normalized%>.db'
9
+ name: '<%= name_normalized%>.db'
10
10
  adapter: 'sqlite'
11
11
  connection_line: 'sqlite://db/test_<%= name_normalized%>.db'
12
12
  path: './db/test_<%= name_normalized%>.db'
@@ -2,4 +2,6 @@
2
2
 
3
3
  source 'https://rubygems.org'
4
4
 
5
- gem 'mvc_one'
5
+ gem 'mvc_one', '0.1.0.pre.rc6'
6
+ gem 'puma'
7
+ gem 'rake', '~> 13.0'
@@ -1,4 +1,4 @@
1
1
  development:
2
- session_cookie: ""
2
+ session_cookie: "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000"
3
3
  test:
4
- session_cookie: ""
4
+ session_cookie: "00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000"
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: mvc_one
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0.pre.rc4
4
+ version: 0.1.0.pre.rc6
5
5
  platform: ruby
6
6
  authors:
7
7
  - Evgenii Sendziuk
@@ -185,8 +185,11 @@ files:
185
185
  - lib/mvc_one/views/404.slim
186
186
  - mvc_one.gemspec
187
187
  - sig/mvc_one.rbs
188
+ - templates/app/application_layout.slim
188
189
  - templates/app/controller_template.erb
189
190
  - templates/app/model_template.erb
191
+ - templates/app/welcome_controller_rb.erb
192
+ - templates/app/welcome_index.slim
190
193
  - templates/config/routes_rb.erb
191
194
  - templates/general/application_rb.erb
192
195
  - templates/general/config_ru.erb