pancake 0.1.20 → 0.1.22
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/pancake/generators/short_generator.rb +0 -3
- data/lib/pancake/mixins/request_helper.rb +1 -1
- data/lib/pancake/router.rb +3 -1
- data/spec/pancake/stack/router_spec.rb +5 -0
- metadata +2 -4
- data/lib/pancake/console.rb +0 -27
- data/lib/pancake/generators/templates/short/%stack_name%/lib/%stack_name%/script/console.tt +0 -15
@@ -10,9 +10,6 @@ module Pancake
|
|
10
10
|
template File.join(self.class.source_root, "common/dotgitignore"), "#{stack_name}/.gitignore"
|
11
11
|
template File.join(self.class.source_root, "common/dothtaccess"), "#{stack_name}/lib/#{stack_name}/public/.htaccess"
|
12
12
|
|
13
|
-
inside("#{stack_name}/lib/#{stack_name}/script") do
|
14
|
-
run 'chmod +x console'
|
15
|
-
end
|
16
13
|
end
|
17
14
|
|
18
15
|
|
data/lib/pancake/router.rb
CHANGED
@@ -123,6 +123,11 @@ describe "stack router" do
|
|
123
123
|
Pancake.url(FooApp, :simple).should == "/simple/route"
|
124
124
|
end
|
125
125
|
|
126
|
+
it "should generate a / when / is optional" do
|
127
|
+
FooApp.router.add("(/)").name(:foo)
|
128
|
+
Pancake.url(FooApp, :foo).should == "/"
|
129
|
+
end
|
130
|
+
|
126
131
|
it "should allow me to generate a non-named route for a stack" do
|
127
132
|
Pancake.url(FooApp, :complex, :var => "a_variable").should == "/complex/a_variable"
|
128
133
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: pancake
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.22
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Daniel Neighman
|
@@ -9,7 +9,7 @@ autorequire: pancake
|
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
11
|
|
12
|
-
date: 2009-11-
|
12
|
+
date: 2009-11-21 00:00:00 +11:00
|
13
13
|
default_executable: pancake-gen
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
@@ -112,7 +112,6 @@ files:
|
|
112
112
|
- lib/pancake.rb
|
113
113
|
- lib/pancake/bootloaders.rb
|
114
114
|
- lib/pancake/configuration.rb
|
115
|
-
- lib/pancake/console.rb
|
116
115
|
- lib/pancake/constants.rb
|
117
116
|
- lib/pancake/core_ext/class.rb
|
118
117
|
- lib/pancake/core_ext/object.rb
|
@@ -147,7 +146,6 @@ files:
|
|
147
146
|
- lib/pancake/generators/templates/short/%stack_name%/lib/%stack_name%/models/.empty_directory
|
148
147
|
- lib/pancake/generators/templates/short/%stack_name%/lib/%stack_name%/mounts/.empty_directory
|
149
148
|
- lib/pancake/generators/templates/short/%stack_name%/lib/%stack_name%/public/.empty_directory
|
150
|
-
- lib/pancake/generators/templates/short/%stack_name%/lib/%stack_name%/script/console.tt
|
151
149
|
- lib/pancake/generators/templates/short/%stack_name%/lib/%stack_name%/tasks/%stack_name%.rake.tt
|
152
150
|
- lib/pancake/generators/templates/short/%stack_name%/lib/%stack_name%/tmp/.empty_directory
|
153
151
|
- lib/pancake/generators/templates/short/%stack_name%/lib/%stack_name%/views/root.html.haml
|
data/lib/pancake/console.rb
DELETED
@@ -1,27 +0,0 @@
|
|
1
|
-
require 'rack/test'
|
2
|
-
class Pancake::Console
|
3
|
-
attr_accessor :app
|
4
|
-
include Rack::Test::Methods
|
5
|
-
|
6
|
-
def initialize(stack)
|
7
|
-
@stack = stack
|
8
|
-
@app = stack.stackup(:master => true)
|
9
|
-
app = self
|
10
|
-
Object.__send__(:define_method, :stack){ app }
|
11
|
-
Pancake.handle_errors! true
|
12
|
-
Pancake.configuration.log_to_file = false
|
13
|
-
|
14
|
-
require 'irb'
|
15
|
-
require 'irb/completion'
|
16
|
-
if File.exists? ".irbrc"
|
17
|
-
ENV['IRBRC'] = ".irbrc"
|
18
|
-
end
|
19
|
-
|
20
|
-
catch(:IRB_EXIT) do
|
21
|
-
IRB.start
|
22
|
-
exit
|
23
|
-
end
|
24
|
-
end
|
25
|
-
end
|
26
|
-
|
27
|
-
|
@@ -1,15 +0,0 @@
|
|
1
|
-
#!/usr/bin/env ruby
|
2
|
-
ENV['RACK_ENV'] ||= ARGV[0] || "development"
|
3
|
-
|
4
|
-
ARGV.clear # Don't pass args to irb
|
5
|
-
|
6
|
-
require 'rubygems'
|
7
|
-
require 'pancake'
|
8
|
-
|
9
|
-
Pancake.root = Pancake.get_root(__FILE__, "..")
|
10
|
-
|
11
|
-
# Load the <%= stack_name.camel_case %> stack
|
12
|
-
require File.join(Pancake.root, "..", "<%= stack_name %>")
|
13
|
-
Pancake::Console.new(<%= stack_name.camel_case %>)
|
14
|
-
|
15
|
-
|