happy-cli 0.1.0.pre2 → 0.1.0.pre3
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/happy-cli/templates/minimal/Gemfile +1 -1
- data/lib/happy-cli/templates/minimal/config.ru +7 -5
- data/lib/happy-cli/templates/standard/Gemfile +1 -1
- data/lib/happy-cli/templates/standard/app/context.rb +8 -10
- data/lib/happy-cli/templates/standard/app/permissions.rb +8 -10
- data/lib/happy-cli/templates/standard/app/route.rb +7 -0
- data/lib/happy-cli/templates/standard/config.ru +6 -3
- data/lib/happy-cli/templates/standard/views/home.erb +3 -0
- data/lib/happy-cli/version.rb +1 -1
- metadata +6 -5
- data/lib/happy-cli/templates/standard/app/routes.rb +0 -9
@@ -2,10 +2,12 @@ require 'rubygems'
|
|
2
2
|
require 'bundler/setup'
|
3
3
|
Bundler.require
|
4
4
|
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
end
|
5
|
+
Happy.route do
|
6
|
+
# path 'foo' do
|
7
|
+
# render 'foo.erb'
|
8
|
+
# end
|
9
|
+
|
10
|
+
'Hello world!'
|
9
11
|
end
|
10
12
|
|
11
|
-
run
|
13
|
+
run Happy
|
@@ -1,10 +1,8 @@
|
|
1
|
-
context
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
# end
|
10
|
-
end
|
1
|
+
# Methods added here will be available on your request context object
|
2
|
+
# as well as in your views.
|
3
|
+
#
|
4
|
+
# Example:
|
5
|
+
#
|
6
|
+
# def current_user
|
7
|
+
# session[:current_user_id] ? User.find(session[:current_user_id]) : nil
|
8
|
+
# end
|
@@ -1,10 +1,8 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
# end
|
10
|
-
end
|
1
|
+
# Examples:
|
2
|
+
#
|
3
|
+
# can.dance!
|
4
|
+
# can.sing!
|
5
|
+
#
|
6
|
+
# if context.current_user.admin?
|
7
|
+
# can.play!
|
8
|
+
# end
|
@@ -2,7 +2,10 @@ require 'rubygems'
|
|
2
2
|
require 'bundler/setup'
|
3
3
|
Bundler.require
|
4
4
|
|
5
|
-
require 'happy/
|
6
|
-
require 'happy/utils/app_spawner'
|
5
|
+
require 'happy/extras/scriptable'
|
7
6
|
|
8
|
-
|
7
|
+
Happy.route do
|
8
|
+
run Happy::Extras::Scriptable, :directory => './app'
|
9
|
+
end
|
10
|
+
|
11
|
+
run Happy
|
data/lib/happy-cli/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: happy-cli
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.0.
|
4
|
+
version: 0.1.0.pre3
|
5
5
|
prerelease: 6
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,11 +9,11 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2012-
|
12
|
+
date: 2012-06-07 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: thor
|
16
|
-
requirement: &
|
16
|
+
requirement: &70332669738720 !ruby/object:Gem::Requirement
|
17
17
|
none: false
|
18
18
|
requirements:
|
19
19
|
- - ~>
|
@@ -21,7 +21,7 @@ dependencies:
|
|
21
21
|
version: '0.15'
|
22
22
|
type: :runtime
|
23
23
|
prerelease: false
|
24
|
-
version_requirements: *
|
24
|
+
version_requirements: *70332669738720
|
25
25
|
description: Command line tool for the Happy web application toolkit.
|
26
26
|
email:
|
27
27
|
- hendrik@mans.de
|
@@ -43,8 +43,9 @@ files:
|
|
43
43
|
- lib/happy-cli/templates/standard/Gemfile
|
44
44
|
- lib/happy-cli/templates/standard/app/context.rb
|
45
45
|
- lib/happy-cli/templates/standard/app/permissions.rb
|
46
|
-
- lib/happy-cli/templates/standard/app/
|
46
|
+
- lib/happy-cli/templates/standard/app/route.rb
|
47
47
|
- lib/happy-cli/templates/standard/config.ru
|
48
|
+
- lib/happy-cli/templates/standard/views/home.erb
|
48
49
|
- lib/happy-cli/version.rb
|
49
50
|
homepage: https://github.com/hmans/happy-cli
|
50
51
|
licenses: []
|