piano 0.8.5 → 0.9.0

Sign up to get free protection for your applications and to get access to all the features.
data/bin/piano CHANGED
@@ -70,6 +70,8 @@ self.delegate Piano, :get, :patch, :put, :post, :delete,
70
70
 
71
71
  self.helpers Sinatra::Piano
72
72
 
73
+ $LOAD_PATH << Dir.pwd
74
+
73
75
  if File.exists?(File.expand_path(Dir.pwd) + "/Pianofile")
74
76
  piano_file = File.expand_path(Dir.pwd) + "/Pianofile"
75
77
  puts "Pianofile found, loading..."
@@ -134,4 +134,6 @@ class Piano < Sinatra::Base
134
134
  def self.play!
135
135
  self.run!
136
136
  end
137
- end
137
+ end
138
+
139
+ require "piano/controllerloader"
@@ -0,0 +1,11 @@
1
+ require "polyglot"
2
+
3
+ class Piano
4
+ class ControllerLoader
5
+ def self.load filename, options = nil, &block
6
+ Kernel.eval File.read filename
7
+ end
8
+ end
9
+ end
10
+
11
+ Polyglot.register "controller", Piano::ControllerLoader
@@ -4,12 +4,12 @@ class Piano
4
4
  try_haml "index"
5
5
  end
6
6
 
7
- get %r{/(.+?).css} do |something|
7
+ get %r{/(.+?).css$} do |something|
8
8
  content_type :css
9
9
  sass something
10
10
  end
11
11
 
12
- get %r{/(.+?).js} do |something|
12
+ get %r{/(.+?).js$} do |something|
13
13
  content_type :js
14
14
  coffee something
15
15
  end
@@ -1,3 +1,3 @@
1
1
  module Piano
2
- VERSION = "0.8.5"
2
+ VERSION = "0.9.0"
3
3
  end
@@ -18,6 +18,7 @@ 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"
21
22
  s.add_dependency "metafun"
22
23
 
23
24
  s.files = `git ls-files`.split("\n")
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.8.5
4
+ version: 0.9.0
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,12 +9,12 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2011-09-05 00:00:00.000000000 -03:00
12
+ date: 2011-10-12 00:00:00.000000000 -03:00
13
13
  default_executable:
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: sinatra
17
- requirement: &23082864 !ruby/object:Gem::Requirement
17
+ requirement: &22896720 !ruby/object:Gem::Requirement
18
18
  none: false
19
19
  requirements:
20
20
  - - ! '>='
@@ -22,10 +22,10 @@ dependencies:
22
22
  version: 1.2.6
23
23
  type: :runtime
24
24
  prerelease: false
25
- version_requirements: *23082864
25
+ version_requirements: *22896720
26
26
  - !ruby/object:Gem::Dependency
27
27
  name: haml
28
- requirement: &23082444 !ruby/object:Gem::Requirement
28
+ requirement: &22896420 !ruby/object:Gem::Requirement
29
29
  none: false
30
30
  requirements:
31
31
  - - ! '>='
@@ -33,10 +33,10 @@ dependencies:
33
33
  version: 3.1.1
34
34
  type: :runtime
35
35
  prerelease: false
36
- version_requirements: *23082444
36
+ version_requirements: *22896420
37
37
  - !ruby/object:Gem::Dependency
38
38
  name: sass
39
- requirement: &23081964 !ruby/object:Gem::Requirement
39
+ requirement: &22896108 !ruby/object:Gem::Requirement
40
40
  none: false
41
41
  requirements:
42
42
  - - ! '>='
@@ -44,10 +44,10 @@ dependencies:
44
44
  version: 3.1.1
45
45
  type: :runtime
46
46
  prerelease: false
47
- version_requirements: *23081964
47
+ version_requirements: *22896108
48
48
  - !ruby/object:Gem::Dependency
49
49
  name: coffee-script
50
- requirement: &23081544 !ruby/object:Gem::Requirement
50
+ requirement: &22895832 !ruby/object:Gem::Requirement
51
51
  none: false
52
52
  requirements:
53
53
  - - ! '>='
@@ -55,10 +55,10 @@ dependencies:
55
55
  version: 2.2.0
56
56
  type: :runtime
57
57
  prerelease: false
58
- version_requirements: *23081544
58
+ version_requirements: *22895832
59
59
  - !ruby/object:Gem::Dependency
60
60
  name: i18n
61
- requirement: &23081148 !ruby/object:Gem::Requirement
61
+ requirement: &22895556 !ruby/object:Gem::Requirement
62
62
  none: false
63
63
  requirements:
64
64
  - - ! '>='
@@ -66,10 +66,21 @@ dependencies:
66
66
  version: 0.6.0
67
67
  type: :runtime
68
68
  prerelease: false
69
- version_requirements: *23081148
69
+ version_requirements: *22895556
70
+ - !ruby/object:Gem::Dependency
71
+ name: polyglot
72
+ requirement: &22895268 !ruby/object:Gem::Requirement
73
+ none: false
74
+ requirements:
75
+ - - ! '>='
76
+ - !ruby/object:Gem::Version
77
+ version: 0.3.1
78
+ type: :runtime
79
+ prerelease: false
80
+ version_requirements: *22895268
70
81
  - !ruby/object:Gem::Dependency
71
82
  name: metafun
72
- requirement: &23080884 !ruby/object:Gem::Requirement
83
+ requirement: &22895016 !ruby/object:Gem::Requirement
73
84
  none: false
74
85
  requirements:
75
86
  - - ! '>='
@@ -77,7 +88,7 @@ dependencies:
77
88
  version: '0'
78
89
  type: :runtime
79
90
  prerelease: false
80
- version_requirements: *23080884
91
+ version_requirements: *22895016
81
92
  description: Out-of-the-box sinatra server for web site sketching using haml + sass
82
93
  + coffee-script
83
94
  email:
@@ -96,6 +107,7 @@ files:
96
107
  - features/step_definitions/i18n_steps.rb
97
108
  - features/support/env.rb
98
109
  - lib/piano.rb
110
+ - lib/piano/controllerloader.rb
99
111
  - lib/piano/routes.rb
100
112
  - lib/piano/version.rb
101
113
  - piano.gemspec