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.
@@ -1,3 +1,3 @@
1
1
  source :rubygems
2
2
 
3
- gem 'happy', '>= 0.1.0.pre'
3
+ gem 'happy', '>= 0.1.0.pre16'
@@ -2,10 +2,12 @@ require 'rubygems'
2
2
  require 'bundler/setup'
3
3
  Bundler.require
4
4
 
5
- app = Happy::Controller.build do
6
- route do
7
- 'Hello world!'
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 app
13
+ run Happy
@@ -1,3 +1,3 @@
1
1
  source :rubygems
2
2
 
3
- gem 'happy', '>= 0.1.0.pre'
3
+ gem 'happy', '>= 0.1.0.pre16'
@@ -1,10 +1,8 @@
1
- context do
2
- # Methods added here will be available on your request context object
3
- # as well as in your views.
4
- #
5
- # Example:
6
- #
7
- # def current_user
8
- # session[:current_user_id] ? User.find(session[:current_user_id]) : nil
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
- permissions do |can, context|
2
- # Examples:
3
- #
4
- # can.dance!
5
- # can.sing!
6
- #
7
- # if context.current_user.admin?
8
- # can.play!
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
@@ -0,0 +1,7 @@
1
+ # path 'hello' do
2
+ # path :name do
3
+ # "Hello, #{params['name']}!"
4
+ # end
5
+ # end
6
+
7
+ render 'home.erb'
@@ -2,7 +2,10 @@ require 'rubygems'
2
2
  require 'bundler/setup'
3
3
  Bundler.require
4
4
 
5
- require 'happy/ext/permissions'
6
- require 'happy/utils/app_spawner'
5
+ require 'happy/extras/scriptable'
7
6
 
8
- run Happy::Utils::AppSpawner.new
7
+ Happy.route do
8
+ run Happy::Extras::Scriptable, :directory => './app'
9
+ end
10
+
11
+ run Happy
@@ -0,0 +1,3 @@
1
+ <h1>Welcome!</h1>
2
+
3
+ <p>This is your new Happy app. Enjoy!</p>
@@ -1,3 +1,3 @@
1
1
  module HappyCLI
2
- VERSION = "0.1.0.pre2"
2
+ VERSION = "0.1.0.pre3"
3
3
  end
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.pre2
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-05-31 00:00:00.000000000 Z
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: &70332015716180 !ruby/object:Gem::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: *70332015716180
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/routes.rb
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: []
@@ -1,9 +0,0 @@
1
- route do
2
- # if can? :dance
3
- # 'dancing'
4
- # else
5
- # 'not dancing'
6
- # end
7
-
8
- "Welcome to my new Happy application!"
9
- end