mousevc 0.0.5 → 0.0.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 568bf7fd10f91463d4715fd59cbda78648196289
4
- data.tar.gz: 32b5275d0bd34f5c8f1dfc7451bb585041b3b116
3
+ metadata.gz: 978ca63287897dec05517d6ebffd326b9b299c04
4
+ data.tar.gz: e990eacffb2fae27849e512c68b2a5d5cbe7a45d
5
5
  SHA512:
6
- metadata.gz: 6ee9ab708ea3d70a53b67b1a674f514dbb6d23a5e20a26c14aa4cefd64b4ef4c919a61ee4d6dab9f730a7814bc305bad903d5a362535959868388b20e93a7ed6
7
- data.tar.gz: fed7fdb6f5dcfd0aaeb0c8027b22d345fd34c5d33197682c2502bdc6674eec37d45235b72d257d7ff9e4310ebaa5369c6e221c8b5efc53ebc5186e46e3cc8601
6
+ metadata.gz: dac7c773246d44e9192ea9a60c9580f9d762241bea02d077327d1c56f666b0c02741e694b71ee647ef3790c264327d3bf9810afcdf9a8ed03e77b5897fc877ff
7
+ data.tar.gz: 9ad1493ca1e1bb623b9f4e555d973095d4bdf32bdc7bb5c44541ec703c2e21c5d948855265ac7d8733a7acc727521dc09df7bc5a82e7f4b322d62f562045a651
data/README.md CHANGED
@@ -86,6 +86,7 @@ $ gem install mousevc
86
86
  ```
87
87
 
88
88
  1. Create a class that extends `Mousevc::App`
89
+ - NOTE: as of v0.0.6 Mousevc requires that the views path be absolute, e.g `"#{File.dirname(__FILE__)}/views"`
89
90
 
90
91
  ```ruby
91
92
 
@@ -98,7 +99,7 @@ $ gem install mousevc
98
99
  :controller => 'JerryController',
99
100
  :model => 'JerryModel',
100
101
  :action => :find_cheese,
101
- :views => 'relative/views/directory/path'
102
+ :views => "#{File.dirname(__FILE__)}/views"
102
103
  ).run
103
104
  ```
104
105
 
@@ -43,6 +43,8 @@ module Mousevc
43
43
  ##
44
44
  # Creates a new +Mousevc::App+ instance
45
45
  #
46
+ # @note as of v0.0.6 Mousevc requires that the views path be absolute, e.g +"#{File.dirname(__FILE__)}/views"+
47
+ #
46
48
  # @param options [Hash] expects the following keys:
47
49
  # - :controller => [String] name of default controller class
48
50
  # - :model => [String] name of default model class
@@ -90,6 +92,8 @@ module Mousevc
90
92
 
91
93
  ##
92
94
  # Instantiates the router instance.
95
+ # @todo add callback where a block is called on reset, and event listener functionality
96
+ #
93
97
  # Passes the router instance the initialization options.
94
98
 
95
99
  def reset
@@ -62,6 +62,7 @@ module Mousevc
62
62
 
63
63
  def route
64
64
  model = Persistence.get(@controller.to_sym)
65
+ # TODO if reset, reset Persistence?
65
66
  model = Persistence.get(@model) if @model.is_a?(Symbol)
66
67
  unless model
67
68
  model = Mousevc.factory(@model).new
@@ -3,5 +3,5 @@ module Mousevc
3
3
  ##
4
4
  # The current version
5
5
 
6
- VERSION = "0.0.5"
6
+ VERSION = "0.0.6"
7
7
  end
@@ -11,6 +11,8 @@ module Mousevc
11
11
  ##
12
12
  # @!attribute dir
13
13
  #
14
+ # @note as of v0.0.6 Mousevc requires that the views path be absolute, e.g +"#{File.dirname(__FILE__)}/views"+
15
+ #
14
16
  # @return [String] the absolute path to the views directory
15
17
 
16
18
  attr_reader :dir
@@ -10,7 +10,7 @@ Gem::Specification.new do |spec|
10
10
  spec.email = ["bideowego@gmail.com"]
11
11
 
12
12
  spec.summary = %q{A tiny mouse sized MVC framework to jump start command line apps.}
13
- #spec.description = %q{TODO: Write a longer description or delete this line.}
13
+ # spec.description = %q{}
14
14
  spec.homepage = "http://bideowego.com/mousevc"
15
15
  spec.license = "MIT"
16
16
 
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: mousevc
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.5
4
+ version: 0.0.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - Chris Scavello
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2015-08-26 00:00:00.000000000 Z
11
+ date: 2015-08-29 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -83,7 +83,6 @@ files:
83
83
  - Rakefile
84
84
  - bin/console
85
85
  - bin/setup
86
- - examples/example.rb
87
86
  - lib/mousevc.rb
88
87
  - lib/mousevc/app.rb
89
88
  - lib/mousevc/controller.rb
@@ -1,65 +0,0 @@
1
- require 'mousevc'
2
-
3
- # 1. Create your default controller
4
- # --------------------------------
5
-
6
- # jerry_controller.rb
7
-
8
- class JerryController < Mousevc::Controller
9
- def find_cheese
10
- view = %Q{<%# views/show_cheese.txt.erb %>\nHello Mousevc!\nI like <%= @cheese %>!\nWhat kind of cheese do you like?}
11
- cheese = @model.cheese
12
- @view.render(view, :cheese => cheese)
13
- Mousevc::Input.prompt
14
- end
15
- end
16
-
17
- # 1. Create the corresponding model
18
- # --------------------------------
19
-
20
- # jerry_model.rb
21
-
22
- class JerryModel < Mousevc::Model
23
- def cheese
24
- @cheese = "Swiss cheese"
25
- end
26
- end
27
-
28
- # 1. Create a class that extends `Mousevc::App`
29
- # --------------------------------
30
-
31
- # jerry.rb
32
-
33
- class Jerry < Mousevc::App
34
- end
35
-
36
- Jerry.new(
37
- :controller => 'JerryController',
38
- :model => 'JerryModel',
39
- :action => :find_cheese,
40
- :views => 'relative/views/directory/path'
41
- ).run
42
-
43
- # 1. Create a view in your views directory
44
- # --------------------------------
45
-
46
- # <%# views/show_cheese.txt.erb %>
47
-
48
- # Hello Mousevc!
49
- # I like <%= @cheese %>!
50
- # What kind of cheese do you like?
51
-
52
- # # 1. Run mouse run!
53
- # --------------------------------
54
-
55
- # $ ruby jerry.rb
56
-
57
- # 1. Enjoy the view!
58
- # --------------------------------
59
- # =>
60
-
61
- # Hello Mousevc!
62
- # I like Swiss cheese!
63
- # What kind of cheese do you like?
64
-
65
- # >