makeki 0.0.5 → 0.1.6

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
  SHA1:
3
- metadata.gz: db288b641e9c1244f3a2612d8537f3fe919063e6
4
- data.tar.gz: 629e63ad4e8ce4442e5589db84aec8f3ff50633c
3
+ metadata.gz: bb331abc776bb566ee5fcbcb03994de5d5c5540e
4
+ data.tar.gz: c4b4bc144c14827eb334bc7c4ffa27fcc3e6009d
5
5
  SHA512:
6
- metadata.gz: c5d3ed91375b69a38f96bee57fb420d0075bacaf4a123e235f698ed301435ad3c8311e3c7174af938eb0b95510f4424f44742ece53cd0bda70896f84a6985db4
7
- data.tar.gz: 4182df33695a69f658c4b6e1fcb2ac0e0185850e3abccfd291d66ddd18b5a2e183aae1749218a9fe024f00b7d83d1473d6fb4ec56f0d0243b52e8b9a50dce87d
6
+ metadata.gz: 1bc9e04bb99a44ccbb59fd09f576cf24f1bea5d9d7bd07a2e85ada81bff8fd8b7620b797955211bdfad11ff5764d9aca5e9ea03a470fc4aa996747eab42671e8
7
+ data.tar.gz: 5b6d4ad8011333b5c95c59b7003d3683b76bb4923730f7d312784a51ff766de34f0cc4cf57ce89746d5a79d41a29ae61dea904b51aeeac268849ded8f2f50cf9
data/README.md CHANGED
@@ -1,9 +1,5 @@
1
1
  # Makeki
2
-
3
- Welcome to your new gem! In this directory, you'll find the files you need to be able to package up your Ruby library into a gem. Put your Ruby code in the file `lib/makeki`. To experiment with that code, run `bin/console` for an interactive prompt.
4
-
5
- TODO: Delete this and the text above, and describe your gem
6
-
2
+ A framework that feels familiar but simpler to navigate as you build your app. That's the goal. Navigating through multiple directories to complete a feature feels unnecessary. This is an experiment to see if it's possible to simplify some things that can take take away from focus while programming.
7
3
  ## Installation
8
4
 
9
5
  Add this line to your application's Gemfile:
@@ -14,15 +10,29 @@ gem 'makeki'
14
10
 
15
11
  And then execute:
16
12
 
17
- $ bundle
13
+ $ bundle
18
14
 
19
15
  Or install it yourself as:
20
16
 
21
17
  $ gem install makeki
22
18
 
23
- ## Usage
19
+ ## Goals
20
+
21
+ The folder structure of this framework will be a little bit different than that of Rails, of which I am basing this entire app from. I notice that I have to navigate to multiple folders in a way that doesn't feel streamlined enough. It should be simpler in my opinion. Certain things could be grouped differently. Everything that is in Rails will be in here but structured differently, simpler in terms of navigating and sequence.
24
22
 
25
- TODO: Write usage instructions here
23
+ ## Current Objectives
24
+ - Basic Architecture
25
+ - Basic Nomencalture for directories that seldom get used in the course of building an application so they are out of the way and I don't have it in my head that I am supposed to do something with them when in fact I never use them unless it's at a more sophisticated level.
26
+
27
+
28
+
29
+ ## Future Objectives
30
+ - Structuring routes and controllers together where possible.
31
+ - Creating Prime-Routes
32
+ - Creating directories with routes and controllers, maybe models.
33
+ - Create simplified pathway for Front-End incorporation to newer frameworks.
34
+
35
+ ## Usage
26
36
 
27
37
  ## Development
28
38
 
@@ -32,7 +42,7 @@ To install this gem onto your local machine, run `bundle exec rake install`. To
32
42
 
33
43
  ## Contributing
34
44
 
35
- Bug reports and pull requests are welcome on GitHub at https://github.com/[USERNAME]/makeki. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the [Contributor Covenant](http://contributor-covenant.org) code of conduct.
45
+ Bug reports and pull requests are welcome on GitHub at https://github.com/cronwel/makeki. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the [Contributor Covenant](http://contributor-covenant.org) code of conduct.
36
46
 
37
47
  ## License
38
48
 
@@ -0,0 +1,6 @@
1
+ class Array
2
+ def msum(start = 0)
3
+ inject(start, &:+)
4
+
5
+ end
6
+ end
@@ -0,0 +1,11 @@
1
+ module Makeki
2
+ class Application
3
+ def get_controller_and_action(env)
4
+ _, cont, action, after =
5
+ env["PATH_INFO"].split('/', 4)
6
+ cont = cont.capitalize
7
+ cont += "Controller"
8
+ [Object.const_get(cont), action]
9
+ end
10
+ end
11
+ end
@@ -1,3 +1,3 @@
1
1
  module Makeki
2
- VERSION = "0.0.5"
2
+ VERSION = "0.1.6"
3
3
  end
data/lib/makeki.rb CHANGED
@@ -1,11 +1,25 @@
1
1
  require "makeki/version"
2
+ require "makeki/array"
3
+ require "makeki/routing"
2
4
 
3
5
  module Makeki
4
6
  class Application
5
7
  def call(env)
6
- `echo debug > debug.txt`;
8
+ classic, act = get_controller_and_action(env)
9
+ controller = classic.new(env)
10
+ text = controller.send(act)
7
11
  [200, {'Content-Type' => 'text/html'},
8
- ["Hello from Ruby on Makeki"]]
12
+ [text]]
13
+ end
14
+ end
15
+
16
+ class Controller
17
+ def initialize(env)
18
+ @env = env
19
+ end
20
+
21
+ def env
22
+ @env
9
23
  end
10
24
  end
11
25
  end
data/makeki.gemspec CHANGED
@@ -34,4 +34,6 @@ Gem::Specification.new do |spec|
34
34
  spec.add_development_dependency "rake", "~> 10.0"
35
35
  spec.add_development_dependency "rspec", "~> 3.0"
36
36
  spec.add_runtime_dependency "rack", "~> 2.0", ">= 2.0.5"
37
+ spec.add_development_dependency "rack-test", '~> 0'
38
+ spec.add_development_dependency "test-unit", '~> 0'
37
39
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: makeki
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.5
4
+ version: 0.1.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - Cronwel Irias
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2018-06-23 00:00:00.000000000 Z
11
+ date: 2018-06-26 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -72,6 +72,34 @@ dependencies:
72
72
  - - ">="
73
73
  - !ruby/object:Gem::Version
74
74
  version: 2.0.5
75
+ - !ruby/object:Gem::Dependency
76
+ name: rack-test
77
+ requirement: !ruby/object:Gem::Requirement
78
+ requirements:
79
+ - - "~>"
80
+ - !ruby/object:Gem::Version
81
+ version: '0'
82
+ type: :development
83
+ prerelease: false
84
+ version_requirements: !ruby/object:Gem::Requirement
85
+ requirements:
86
+ - - "~>"
87
+ - !ruby/object:Gem::Version
88
+ version: '0'
89
+ - !ruby/object:Gem::Dependency
90
+ name: test-unit
91
+ requirement: !ruby/object:Gem::Requirement
92
+ requirements:
93
+ - - "~>"
94
+ - !ruby/object:Gem::Version
95
+ version: '0'
96
+ type: :development
97
+ prerelease: false
98
+ version_requirements: !ruby/object:Gem::Requirement
99
+ requirements:
100
+ - - "~>"
101
+ - !ruby/object:Gem::Version
102
+ version: '0'
75
103
  description: Framework built from scratch
76
104
  email:
77
105
  - noelirias@gmail.com
@@ -91,6 +119,8 @@ files:
91
119
  - bin/console
92
120
  - bin/setup
93
121
  - lib/makeki.rb
122
+ - lib/makeki/array.rb
123
+ - lib/makeki/routing.rb
94
124
  - lib/makeki/version.rb
95
125
  - makeki.gemspec
96
126
  homepage: http://rubygems.org/gems/makeki