xmvc 0.1.2 → 0.1.3
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.
- data/VERSION +1 -1
- data/bin/xmvc +2 -0
- data/lib/xmvc/builder.rb +2 -7
- data/lib/xmvc/cli.rb +7 -5
- data/lib/xmvc/environment.rb +89 -5
- data/lib/xmvc/generator.rb +37 -29
- data/lib/xmvc/generators/app.rb +54 -88
- data/lib/xmvc/generators/boot.rb +43 -0
- data/lib/xmvc/generators/controller.rb +18 -33
- data/lib/xmvc/generators/layout.rb +25 -0
- data/lib/xmvc/generators/model.rb +24 -33
- data/lib/xmvc/generators/scaffold.rb +10 -8
- data/lib/xmvc/generators/templates/Model.js +3 -3
- data/lib/xmvc/generators/templates/ModelSpec.js +2 -2
- data/lib/xmvc/generators/templates/app/{config → public/config}/environment.yml +0 -0
- data/lib/xmvc/generators/templates/{app/public/config/boot.js → boot.js} +9 -19
- data/lib/xmvc/generators/templates/layout.html.erb +24 -0
- data/lib/xmvc/generators/view.rb +19 -27
- data/lib/xmvc/stats.rb +1 -18
- data/lib/xmvc.rb +13 -23
- data/xmvc.gemspec +7 -9
- metadata +8 -10
- data/lib/xmvc/generators/base.rb +0 -99
- data/lib/xmvc/generators/templates/app/config/environments/development.yml +0 -0
- data/lib/xmvc/generators/templates/app/config/environments/production.yml +0 -0
- data/lib/xmvc/settings.rb +0 -134
- data/lib/xmvc/ui.rb +0 -55
data/lib/xmvc/ui.rb
DELETED
@@ -1,55 +0,0 @@
|
|
1
|
-
module Xmvc
|
2
|
-
class UI
|
3
|
-
def warn(message)
|
4
|
-
end
|
5
|
-
|
6
|
-
def error(message)
|
7
|
-
end
|
8
|
-
|
9
|
-
def info(message)
|
10
|
-
end
|
11
|
-
|
12
|
-
def confirm(message)
|
13
|
-
end
|
14
|
-
|
15
|
-
class Shell < UI
|
16
|
-
def initialize(shell)
|
17
|
-
@shell = shell
|
18
|
-
end
|
19
|
-
|
20
|
-
# TODO: Add debug mode
|
21
|
-
def debug(msg)
|
22
|
-
end
|
23
|
-
|
24
|
-
def info(msg)
|
25
|
-
@shell.say(msg)
|
26
|
-
end
|
27
|
-
|
28
|
-
def confirm(msg)
|
29
|
-
@shell.say(msg, :green)
|
30
|
-
end
|
31
|
-
|
32
|
-
def warn(msg)
|
33
|
-
@shell.say(msg, :yellow)
|
34
|
-
end
|
35
|
-
|
36
|
-
def error(msg)
|
37
|
-
@shell.say(msg, :red)
|
38
|
-
end
|
39
|
-
end
|
40
|
-
|
41
|
-
class RGProxy < Gem::SilentUI
|
42
|
-
def initialize(ui)
|
43
|
-
@ui = ui
|
44
|
-
end
|
45
|
-
|
46
|
-
def say(message)
|
47
|
-
if message =~ /native extensions/
|
48
|
-
@ui.info "with native extensions "
|
49
|
-
else
|
50
|
-
@ui.debug(message)
|
51
|
-
end
|
52
|
-
end
|
53
|
-
end
|
54
|
-
end
|
55
|
-
end
|