piano 0.10.7 → 0.10.8
Sign up to get free protection for your applications and to get access to all the features.
- data/README.rdoc +3 -1
- data/lib/piano/controllerloader.rb +2 -14
- data/lib/piano/version.rb +1 -1
- data/piano.gemspec +0 -3
- metadata +15 -36
data/README.rdoc
CHANGED
@@ -194,7 +194,7 @@ Another helper you may find useful is <tt>extract("source_text/html", word_count
|
|
194
194
|
|
195
195
|
Most times on a POST request the server performs an action and you want to give the user some feedback about that action. The data for that feedback has become known as "flash text" steming from the Rails argot.
|
196
196
|
|
197
|
-
Piano provides <tt>flash</tt> for you,
|
197
|
+
Piano provides <tt>flash</tt> for you, easy to use. A sample
|
198
198
|
|
199
199
|
==== Pianofile
|
200
200
|
|
@@ -203,6 +203,8 @@ Piano provides <tt>flash</tt> for you, ease to use. A sample
|
|
203
203
|
|
204
204
|
flash "The article was created" # You set the flash text by calling `flash`
|
205
205
|
# with an argument
|
206
|
+
|
207
|
+
redirect "/articles"
|
206
208
|
end
|
207
209
|
|
208
210
|
==== articles.haml
|
@@ -1,20 +1,10 @@
|
|
1
|
-
require "polyglot"
|
2
|
-
|
3
1
|
module Piano
|
4
|
-
# Controller loader especifically for polyglot
|
5
|
-
class PolyglotControllerLoader
|
6
|
-
# Loads the file, no more settings for the moment
|
7
|
-
def self.load filename, options = nil, &block
|
8
|
-
Kernel.eval File.read filename
|
9
|
-
end
|
10
|
-
end
|
11
|
-
|
12
2
|
# Handler of .controller files loading
|
13
3
|
class ControllerLoader
|
14
4
|
def self.folder path
|
15
5
|
$LOAD_PATH << Dir.pwd
|
16
6
|
recursive path do |item|
|
17
|
-
|
7
|
+
load item
|
18
8
|
end
|
19
9
|
end
|
20
10
|
|
@@ -28,12 +18,10 @@ module Piano
|
|
28
18
|
files << "#{item}"
|
29
19
|
end unless file == ".." or file == "."
|
30
20
|
elsif file.end_with? ".controller"
|
31
|
-
files << "#{path}/#{file
|
21
|
+
files << "#{path}/#{file}"
|
32
22
|
end
|
33
23
|
end
|
34
24
|
files.each { |item| block.call(item) }
|
35
25
|
end
|
36
26
|
end
|
37
27
|
end
|
38
|
-
|
39
|
-
Polyglot.register "controller", Piano::PolyglotControllerLoader
|
data/lib/piano/version.rb
CHANGED
data/piano.gemspec
CHANGED
@@ -18,11 +18,8 @@ Gem::Specification.new do |s|
|
|
18
18
|
s.add_dependency "sass", ">= 3.1.1"
|
19
19
|
s.add_dependency "coffee-script", ">= 2.2.0"
|
20
20
|
s.add_dependency "i18n", ">= 0.6.0"
|
21
|
-
s.add_dependency "polyglot", ">= 0.3.1"
|
22
21
|
s.add_dependency "metafun"
|
23
22
|
|
24
|
-
s.add_development_dependency "rspec"
|
25
|
-
|
26
23
|
s.files = `git ls-files`.split("\n")
|
27
24
|
s.test_files = `git ls-files -- {test,spec,features}/*`.split("\n")
|
28
25
|
s.executables = `git ls-files -- bin/*`.split("\n").map{ |f| File.basename(f) }
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: piano
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.10.
|
4
|
+
version: 0.10.8
|
5
5
|
prerelease:
|
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:
|
12
|
+
date: 2012-01-08 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: sinatra
|
16
|
-
requirement: &
|
16
|
+
requirement: &5684900 !ruby/object:Gem::Requirement
|
17
17
|
none: false
|
18
18
|
requirements:
|
19
19
|
- - ! '>='
|
@@ -21,10 +21,10 @@ dependencies:
|
|
21
21
|
version: 1.2.6
|
22
22
|
type: :runtime
|
23
23
|
prerelease: false
|
24
|
-
version_requirements: *
|
24
|
+
version_requirements: *5684900
|
25
25
|
- !ruby/object:Gem::Dependency
|
26
26
|
name: haml
|
27
|
-
requirement: &
|
27
|
+
requirement: &5684180 !ruby/object:Gem::Requirement
|
28
28
|
none: false
|
29
29
|
requirements:
|
30
30
|
- - ! '>='
|
@@ -32,10 +32,10 @@ dependencies:
|
|
32
32
|
version: 3.1.1
|
33
33
|
type: :runtime
|
34
34
|
prerelease: false
|
35
|
-
version_requirements: *
|
35
|
+
version_requirements: *5684180
|
36
36
|
- !ruby/object:Gem::Dependency
|
37
37
|
name: sass
|
38
|
-
requirement: &
|
38
|
+
requirement: &5683620 !ruby/object:Gem::Requirement
|
39
39
|
none: false
|
40
40
|
requirements:
|
41
41
|
- - ! '>='
|
@@ -43,10 +43,10 @@ dependencies:
|
|
43
43
|
version: 3.1.1
|
44
44
|
type: :runtime
|
45
45
|
prerelease: false
|
46
|
-
version_requirements: *
|
46
|
+
version_requirements: *5683620
|
47
47
|
- !ruby/object:Gem::Dependency
|
48
48
|
name: coffee-script
|
49
|
-
requirement: &
|
49
|
+
requirement: &5682760 !ruby/object:Gem::Requirement
|
50
50
|
none: false
|
51
51
|
requirements:
|
52
52
|
- - ! '>='
|
@@ -54,10 +54,10 @@ dependencies:
|
|
54
54
|
version: 2.2.0
|
55
55
|
type: :runtime
|
56
56
|
prerelease: false
|
57
|
-
version_requirements: *
|
57
|
+
version_requirements: *5682760
|
58
58
|
- !ruby/object:Gem::Dependency
|
59
59
|
name: i18n
|
60
|
-
requirement: &
|
60
|
+
requirement: &5681280 !ruby/object:Gem::Requirement
|
61
61
|
none: false
|
62
62
|
requirements:
|
63
63
|
- - ! '>='
|
@@ -65,21 +65,10 @@ dependencies:
|
|
65
65
|
version: 0.6.0
|
66
66
|
type: :runtime
|
67
67
|
prerelease: false
|
68
|
-
version_requirements: *
|
69
|
-
- !ruby/object:Gem::Dependency
|
70
|
-
name: polyglot
|
71
|
-
requirement: &70449430 !ruby/object:Gem::Requirement
|
72
|
-
none: false
|
73
|
-
requirements:
|
74
|
-
- - ! '>='
|
75
|
-
- !ruby/object:Gem::Version
|
76
|
-
version: 0.3.1
|
77
|
-
type: :runtime
|
78
|
-
prerelease: false
|
79
|
-
version_requirements: *70449430
|
68
|
+
version_requirements: *5681280
|
80
69
|
- !ruby/object:Gem::Dependency
|
81
70
|
name: metafun
|
82
|
-
requirement: &
|
71
|
+
requirement: &5680880 !ruby/object:Gem::Requirement
|
83
72
|
none: false
|
84
73
|
requirements:
|
85
74
|
- - ! '>='
|
@@ -87,18 +76,7 @@ dependencies:
|
|
87
76
|
version: '0'
|
88
77
|
type: :runtime
|
89
78
|
prerelease: false
|
90
|
-
version_requirements: *
|
91
|
-
- !ruby/object:Gem::Dependency
|
92
|
-
name: rspec
|
93
|
-
requirement: &70448160 !ruby/object:Gem::Requirement
|
94
|
-
none: false
|
95
|
-
requirements:
|
96
|
-
- - ! '>='
|
97
|
-
- !ruby/object:Gem::Version
|
98
|
-
version: '0'
|
99
|
-
type: :development
|
100
|
-
prerelease: false
|
101
|
-
version_requirements: *70448160
|
79
|
+
version_requirements: *5680880
|
102
80
|
description: Out-of-the-box sinatra server for web site sketching using haml + sass
|
103
81
|
+ coffee-script
|
104
82
|
email:
|
@@ -150,3 +128,4 @@ specification_version: 3
|
|
150
128
|
summary: Out-of-the-box sinatra server for web site sketching using haml + sass +
|
151
129
|
coffee-script
|
152
130
|
test_files: []
|
131
|
+
has_rdoc:
|