piano 0.8.0 → 0.8.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (4) hide show
  1. data/bin/piano +8 -0
  2. data/lib/piano.rb +1 -1
  3. data/lib/piano/version.rb +1 -1
  4. metadata +10 -10
data/bin/piano CHANGED
@@ -9,6 +9,12 @@ unless ARGV.empty?
9
9
  args[:port] = arg
10
10
  elsif arg =~ /^noetags$/
11
11
  args[:etags] = :off
12
+ elsif arg =~ /^views:/
13
+ matches = arg.match(/^views:(.+)$/)
14
+ args[:views] = matches[1]
15
+ elsif arg =~ /^public:/
16
+ matches = arg.match(/^public:(.+)$/)
17
+ args[:public] = matches[1]
12
18
  elsif arg =~ /^sample$/
13
19
  puts "Warning: the sample site folder files will be created in the current directory."
14
20
  puts "Any files with the same name will be overwritten."
@@ -39,6 +45,8 @@ if args
39
45
  Piano.port = args[:port] if args[:port]
40
46
  Piano.environment = args[:environment] if args[:environment]
41
47
  Piano.etags = args[:etags] if args[:etags]
48
+ Piano.views = File.expand_path(Dir.pwd) + "/" +args[:views] if args[:views]
49
+ Piano.public = File.expand_path(Dir.pwd) + "/" + args[:public] if args[:public]
42
50
  end
43
51
 
44
52
  def make_sample
@@ -78,7 +78,7 @@ class Piano < Sinatra::Base
78
78
  end
79
79
 
80
80
  def pwd
81
- File.expand_path(Dir.pwd)
81
+ settings.views
82
82
  end
83
83
 
84
84
  def bad_luck(path)
@@ -1,3 +1,3 @@
1
1
  module Piano
2
- VERSION = "0.8.0"
2
+ VERSION = "0.8.1"
3
3
  end
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.0
4
+ version: 0.8.1
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-05-26 00:00:00.000000000 -03:00
12
+ date: 2011-05-29 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: &18131160 !ruby/object:Gem::Requirement
17
+ requirement: &16340412 !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: *18131160
25
+ version_requirements: *16340412
26
26
  - !ruby/object:Gem::Dependency
27
27
  name: haml
28
- requirement: &18130860 !ruby/object:Gem::Requirement
28
+ requirement: &16340112 !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: *18130860
36
+ version_requirements: *16340112
37
37
  - !ruby/object:Gem::Dependency
38
38
  name: sass
39
- requirement: &18130584 !ruby/object:Gem::Requirement
39
+ requirement: &16339836 !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: *18130584
47
+ version_requirements: *16339836
48
48
  - !ruby/object:Gem::Dependency
49
49
  name: coffee-script
50
- requirement: &18130308 !ruby/object:Gem::Requirement
50
+ requirement: &16339560 !ruby/object:Gem::Requirement
51
51
  none: false
52
52
  requirements:
53
53
  - - ! '>='
@@ -55,7 +55,7 @@ dependencies:
55
55
  version: 2.2.0
56
56
  type: :runtime
57
57
  prerelease: false
58
- version_requirements: *18130308
58
+ version_requirements: *16339560
59
59
  description: Out-of-the-box sinatra server for web site sketching using haml + sass
60
60
  + coffee-script
61
61
  email: