gumdrop 0.2.15 → 0.2.16

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
data/ChangeLog.md CHANGED
@@ -1,3 +1,7 @@
1
+ # v0.2.16
2
+ - Added option to specify output folder, still defaults to "output"
3
+ - Bugfix: content wasn't looking for layouts right, causing exception
4
+
1
5
  # v0.2.15
2
6
  - Fixed minor regression.
3
7
  - CLI now will report gumdrop version when show help.
data/Notes.md CHANGED
@@ -1,8 +1,4 @@
1
1
  # Future Features/Changes
2
- - Add support for `data.pager_for(key, opts={})`
3
2
  - Add support for Sprockets
4
- - Add support for js and css compression
5
- - Add options to config for `source/` and `output/` folder names. `data/` too?
6
- - Page generation from lib/site.rb
7
3
  - HTML Manifest generation??
8
4
  - Some kind of admin? What would that even do?
data/Readme.md CHANGED
@@ -59,4 +59,4 @@ When you run `gumdrop --build` or `rake build` it will generate an `output/` fol
59
59
  scripts/
60
60
  app.js
61
61
 
62
- You'll notice the templates and partials aren't included in the output.
62
+ You'll notice the templates and partials aren't included in the output.
@@ -114,7 +114,7 @@ module Gumdrop
114
114
  page= Gumdrop.site[path]
115
115
  page= Gumdrop.site["#{path}.html"] if page.nil? # Bit of a hack...
116
116
  page= Gumdrop.partials[path] if page.nil?
117
- page= Gumdrop.templates[path] if page.nil? # ???
117
+ page= Gumdrop.layouts[path] if page.nil? # ???
118
118
  page
119
119
  end
120
120
 
@@ -7,7 +7,7 @@ USER='user'
7
7
  SERVER='server.com'
8
8
  FOLDER="~/#{SERVER}"
9
9
 
10
- desc "Build source files into output"
10
+ desc "Build source files into output_dir"
11
11
  task :build do
12
12
  system("bundle exec gumdrop -b")
13
13
  end
@@ -7,7 +7,7 @@ USER='user'
7
7
  SERVER='server.com'
8
8
  FOLDER="~/#{SERVER}"
9
9
 
10
- desc "Build source files into output"
10
+ desc "Build source files into output_dir"
11
11
  task :build do
12
12
  system("bundle exec gumdrop -b")
13
13
  end
@@ -1,5 +1,5 @@
1
1
  module Gumdrop
2
2
 
3
- VERSION = "0.2.15" unless defined?(::Gumdrop::VERSION)
3
+ VERSION = "0.2.16" unless defined?(::Gumdrop::VERSION)
4
4
 
5
5
  end
data/lib/gumdrop.rb CHANGED
@@ -8,7 +8,8 @@ DEFAULT_OPTIONS= {
8
8
  :auto_run => false,
9
9
  :force_reload => false,
10
10
  :root => ".",
11
- :log_level => :info
11
+ :log_level => :info,
12
+ :output_dir => "./output"
12
13
  }
13
14
 
14
15
  LOG_LEVELS = {
@@ -17,6 +18,12 @@ LOG_LEVELS = {
17
18
  :error => 2
18
19
  }
19
20
 
21
+ # LOG_LEVELS = {
22
+ # info: 0,
23
+ # warning: 1,
24
+ # error: 2
25
+ # }
26
+
20
27
  module Gumdrop
21
28
 
22
29
  autoload :Context, "gumdrop/context"
@@ -105,10 +112,11 @@ module Gumdrop
105
112
 
106
113
  # Render
107
114
  unless opts[:dry_run]
115
+ output_base_path= File.expand_path(Gumdrop.config.output_dir)
108
116
  site.keys.sort.each do |path|
109
117
  #unless @blacklist.detect {|p| path.starts_with?(p) }
110
118
  node= site[path]
111
- output_path= "output/#{node.to_s}"
119
+ output_path= File.join(output_base_path, node.to_s)
112
120
  FileUtils.mkdir_p File.dirname(output_path)
113
121
  node.renderTo output_path, @content_filters
114
122
  # else
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: gumdrop
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.15
4
+ version: 0.2.16
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -13,7 +13,7 @@ date: 2011-07-22 00:00:00.000000000Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: sinatra
16
- requirement: &70349166759560 !ruby/object:Gem::Requirement
16
+ requirement: &70132697222300 !ruby/object:Gem::Requirement
17
17
  none: false
18
18
  requirements:
19
19
  - - ! '>='
@@ -21,10 +21,10 @@ dependencies:
21
21
  version: '0'
22
22
  type: :runtime
23
23
  prerelease: false
24
- version_requirements: *70349166759560
24
+ version_requirements: *70132697222300
25
25
  - !ruby/object:Gem::Dependency
26
26
  name: tilt
27
- requirement: &70349166759100 !ruby/object:Gem::Requirement
27
+ requirement: &70132697221740 !ruby/object:Gem::Requirement
28
28
  none: false
29
29
  requirements:
30
30
  - - ! '>='
@@ -32,10 +32,10 @@ dependencies:
32
32
  version: '0'
33
33
  type: :runtime
34
34
  prerelease: false
35
- version_requirements: *70349166759100
35
+ version_requirements: *70132697221740
36
36
  - !ruby/object:Gem::Dependency
37
37
  name: active_support
38
- requirement: &70349166758620 !ruby/object:Gem::Requirement
38
+ requirement: &70132697221280 !ruby/object:Gem::Requirement
39
39
  none: false
40
40
  requirements:
41
41
  - - ! '>='
@@ -43,10 +43,10 @@ dependencies:
43
43
  version: '0'
44
44
  type: :runtime
45
45
  prerelease: false
46
- version_requirements: *70349166758620
46
+ version_requirements: *70132697221280
47
47
  - !ruby/object:Gem::Dependency
48
48
  name: trollop
49
- requirement: &70349166758160 !ruby/object:Gem::Requirement
49
+ requirement: &70132697220820 !ruby/object:Gem::Requirement
50
50
  none: false
51
51
  requirements:
52
52
  - - ! '>='
@@ -54,10 +54,10 @@ dependencies:
54
54
  version: '0'
55
55
  type: :runtime
56
56
  prerelease: false
57
- version_requirements: *70349166758160
57
+ version_requirements: *70132697220820
58
58
  - !ruby/object:Gem::Dependency
59
59
  name: haml
60
- requirement: &70349166757720 !ruby/object:Gem::Requirement
60
+ requirement: &70132697220260 !ruby/object:Gem::Requirement
61
61
  none: false
62
62
  requirements:
63
63
  - - ! '>='
@@ -65,10 +65,10 @@ dependencies:
65
65
  version: '0'
66
66
  type: :runtime
67
67
  prerelease: false
68
- version_requirements: *70349166757720
68
+ version_requirements: *70132697220260
69
69
  - !ruby/object:Gem::Dependency
70
70
  name: sass
71
- requirement: &70349166757280 !ruby/object:Gem::Requirement
71
+ requirement: &70132697219820 !ruby/object:Gem::Requirement
72
72
  none: false
73
73
  requirements:
74
74
  - - ! '>='
@@ -76,7 +76,7 @@ dependencies:
76
76
  version: '0'
77
77
  type: :runtime
78
78
  prerelease: false
79
- version_requirements: *70349166757280
79
+ version_requirements: *70132697219820
80
80
  description: A simple cms/prototyping tool.
81
81
  email: matt@elucidata.net
82
82
  executables: