mousevc 0.0.2.pre.alpha → 0.0.2

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: 965d70e8bc3b4614747881cd88769b7f9fb85110
4
- data.tar.gz: fb52f433c36a3fd4eddcfb7348da73786b0bf3f1
3
+ metadata.gz: 8d9fa6dd0f403e43b06f4776aeaff121d204cee5
4
+ data.tar.gz: b5343d26fdd055e2f9c72309f5201c6b399dfca9
5
5
  SHA512:
6
- metadata.gz: fbe673e788f873d53c27c9e0794f50ff19dcf72294764cab4ccdb01e6a66797b3cee6d957b1beb877397742464d97b3309c1e16f253f740f7f6bbe4479f737a1
7
- data.tar.gz: 3b86905ff2c32ff61949c1b46c0f4d74b772cfb02e2d0612d12af74aa0c864e95bfac23c690acde03987267c60b164041b31a428f568ae43f479344783e7b909
6
+ metadata.gz: addba491d0f09d2db745cb45a9d5b2028a1f7d48bccfdf8ea31fe10f9a057f1fb805b020e15d902e13e15fd270d926a405abfe79c1ac7f14b6730d9ae3fc42c5
7
+ data.tar.gz: fc70704ed24d5bb3a1a362b9f3abe650b5877e79a4969fbe967014a1a6828d85e6e812a27d64cd1317c1fce7003cba048436ef57fefe4a39dfdd5c4dada0681d
data/README.md CHANGED
@@ -10,10 +10,6 @@
10
10
 
11
11
  A tiny mouse sized MVC framework to jump start command line apps. Written in Ruby.
12
12
 
13
- [![Gem Version](https://badge.fury.io/rb/mousevc.svg)](http://badge.fury.io/rb/mousevc)
14
-
15
- [View the documentation](http://www.rubydoc.info/gems/mousevc)
16
-
17
13
  ## Installation
18
14
 
19
15
  Add this line to your application's Gemfile:
data/lib/mousevc/app.rb CHANGED
@@ -31,15 +31,6 @@ module Mousevc
31
31
 
32
32
  attr_accessor :looping
33
33
 
34
- ##
35
- # @!attribute router
36
- #
37
- # Returns the current router
38
- #
39
- # @return [Mousevc::Router] the router
40
-
41
- attr_reader :router
42
-
43
34
  ##
44
35
  # Creates a new +Mousevc::App+ instance
45
36
  #
@@ -61,13 +52,11 @@ module Mousevc
61
52
  end
62
53
 
63
54
  ##
64
- # Runs the application
55
+ # Run the application
65
56
 
66
57
  def run
67
58
  reset
68
59
  @looping ? listen : single
69
- Input.clear
70
- nil
71
60
  end
72
61
 
73
62
  ##
@@ -101,12 +90,10 @@ module Mousevc
101
90
  )
102
91
  end
103
92
 
104
- ##
105
- # Runs the application without looping automatically
106
-
107
93
  def single
108
- clear_view
109
- @router.route
94
+ Kernel.system('clear') if system_clear?
95
+ @router.route unless Input.quit?
96
+ reset if Input.reset?
110
97
  end
111
98
 
112
99
  ##
@@ -119,17 +106,9 @@ module Mousevc
119
106
 
120
107
  def listen
121
108
  begin
122
- clear_view
123
- @router.route unless Input.quit?
124
- reset if Input.reset?
109
+ single
125
110
  end until Input.quit?
126
- end
127
-
128
- ##
129
- # Executes a system clear if system clearing is enabled
130
-
131
- def clear_view
132
- Kernel.system('clear') if system_clear?
111
+ Input.clear
133
112
  end
134
113
  end
135
114
  end
@@ -18,7 +18,7 @@ module Mousevc
18
18
  # Allows clearing of all or some of the models currently stored.
19
19
  # Clears all data and models stored if no keys are provided
20
20
  #
21
- # @param args [Symbol] a list of keys to clear from the currently stored models
21
+ # @param [Symbol] a list of keys to clear from the currently stored models
22
22
 
23
23
  def self.clear(*args)
24
24
  if args.empty?
@@ -29,21 +29,12 @@ module Mousevc
29
29
  end
30
30
 
31
31
  ##
32
- # Get a stored model by key
33
- #
34
- # @param key [Symbol] the key under which the model is stored
35
- # @return [Mousevc::Model, Any] the stored model or value
32
+ #
36
33
 
37
34
  def self.get(key)
38
35
  @@models[key]
39
36
  end
40
37
 
41
- ##
42
- # Set the value of a storage key
43
- # @raise [Mousevc::Error] if the key already exists
44
- #
45
- # @param key [Symbol] the key under which the model is stored
46
-
47
38
  def self.set(key, value)
48
39
  raise Error.new("Cannot persist, a value already exists at: #{key}") unless @@models[key].nil?
49
40
  @@models.store(key, value)
@@ -3,5 +3,5 @@ module Mousevc
3
3
  ##
4
4
  # The current version
5
5
 
6
- VERSION = "0.0.2-alpha"
6
+ VERSION = "0.0.2"
7
7
  end
data/lib/mousevc.rb CHANGED
@@ -24,13 +24,11 @@ module Mousevc
24
24
  "",
25
25
  "by",
26
26
  "Bideo Wego",
27
- "http://bideowego.com/mousevc",
28
27
  "",
29
- "Documentation",
30
- "http://www.rubydoc.info/gems/mousevc"
28
+ "http://bideowego.com",
29
+ ""
31
30
  ]
32
31
  width = lines.max.length
33
- width = width.even? ? width + 1 : width
34
32
  lines.map do |s|
35
33
  s.center(width)
36
34
  end.join("\n")
data/mousevc.gemspec CHANGED
@@ -11,7 +11,7 @@ Gem::Specification.new do |spec|
11
11
 
12
12
  spec.summary = %q{A tiny mouse sized MVC framework to jump start command line apps.}
13
13
  #spec.description = %q{TODO: Write a longer description or delete this line.}
14
- spec.homepage = "http://bideowego.com/mousevc"
14
+ spec.homepage = "http://bideowego.com"
15
15
  spec.license = "MIT"
16
16
 
17
17
  # Prevent pushing this gem to RubyGems.org by setting 'allowed_push_host', or
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.2.pre.alpha
4
+ version: 0.0.2
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-23 00:00:00.000000000 Z
11
+ date: 2015-08-22 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -82,7 +82,7 @@ files:
82
82
  - lib/mousevc/version.rb
83
83
  - lib/mousevc/view.rb
84
84
  - mousevc.gemspec
85
- homepage: http://bideowego.com/mousevc
85
+ homepage: http://bideowego.com
86
86
  licenses:
87
87
  - MIT
88
88
  metadata:
@@ -98,9 +98,9 @@ required_ruby_version: !ruby/object:Gem::Requirement
98
98
  version: '0'
99
99
  required_rubygems_version: !ruby/object:Gem::Requirement
100
100
  requirements:
101
- - - ">"
101
+ - - ">="
102
102
  - !ruby/object:Gem::Version
103
- version: 1.3.1
103
+ version: '0'
104
104
  requirements: []
105
105
  rubyforge_project:
106
106
  rubygems_version: 2.4.6