mvc_one 0.1.0.pre.rc4 → 0.1.0.pre.rc5

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: 69e5e06df9043af06f3c3cad8f62755e91a772a2b894726f7a5f49edb566ae60
4
+ data.tar.gz: 984bfbd6a6428678c6096e300cc0a0c161f80ccf01a04eeb6d259020c25178b5
5
5
  SHA512:
6
- metadata.gz: a21a9373694e01b29bf60a578004b3d063c6ace39ec4ab8f1e3adea4dc6c8cd75d4f2d3b30bf7a78dec7bd7a45a58b25bd77f1816f901352d8c48eabd84ebd20
7
- data.tar.gz: a3ee6770db6b480a0665b6b4ea337abfc2ca6c81845e5e2466d92a4887fa87dd27624ab9bab9805a5245fe8236b475d6681914e913aa6ac956f06bf1b34dc3ba
6
+ metadata.gz: 864f1663d0f62f71dcaa7cdc46dd6adff1b67bec0ff5a7b0530bac44e149b4207dd252936a0b7194e4371b457457c65a616bb352fad6c4247eeeac543555f582
7
+ data.tar.gz: 7902064cb8b39c02722285d7692fc1c6a588fac5039bd1af54d6789bc0827629892cd1b410c1e536537b7926e6c5ba743415317231291dbc174f39c20cf6b4bf
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.rc5)
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.erb')))
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-rc5'
5
5
  end
@@ -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.rc4'
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.rc5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Evgenii Sendziuk