ruhoh 0.1.2 → 0.1.3

Sign up to get free protection for your applications and to get access to all the features.
data/README.md CHANGED
@@ -7,44 +7,3 @@
7
7
 
8
8
  $ gem install ruhoh
9
9
  $ ruhoh help
10
-
11
-
12
- # SIMPLIFY SIMPLIFY SIMPLIFY
13
-
14
- # Fronts
15
-
16
- ## ruhoh hosting
17
-
18
- User Workflow:
19
-
20
- - user auths with ruhoh.com
21
- ruhoh expects a users blog to be in the GitHub repo: username.ruhoh.com
22
- - user gives GitHub the ruhoh.com POST receive hook for his username.ruhoh.com repo
23
-
24
- Implementation:
25
-
26
- Sinatra app
27
- handle POST requests from GitHub post receive hook.
28
- oAuth via GitHub provider.
29
- user accounts via GitHub oAuth.
30
- wildcard domain name mapping: *.ruhoh.com
31
-
32
- git clone/fetch repositories and compile the blog for hosting.
33
-
34
-
35
- x] create server on linode
36
- x] host sinatra app at app.ruhoh.com
37
- send post receive hook to app.ruhoh.com
38
-
39
- hook should trigger git clone if repo does not exist.
40
- hook should trigger git pull/fetch if repo does exist
41
- repo should compile after repo update
42
-
43
-
44
-
45
- ## Sbvtle
46
-
47
- Adopt the admin UI at /\_drafts
48
-
49
-
50
-
data/history.txt CHANGED
@@ -1,6 +1,10 @@
1
- 12.18.2012
2
- 0.1.2 : Fix bug with YAML psych/syck errors.
3
- 0.1.1 : @tkellen tidies up partials + fix 'paths.theme' error in theme scaffold.
1
+ 19.4.2012
2
+ 0.1.3 - BUG: Fix drafts not maintaining file extension when publishing
3
+ BUG: tags helper should use tags database.
4
+ BUG: Fix for properly handling filepaths on Windows machines.
5
+ 18.4.2012
6
+ 0.1.2 - BUG: Fix bug with YAML psych/syck errors.
7
+ 0.1.1 - @tkellen tidies up partials + fix 'paths.theme' error in theme scaffold.
4
8
  12.4.2012
5
- 0.1.0 : Initial public release.
9
+ 0.1.0 - Initial public release.
6
10
 
@@ -91,7 +91,7 @@ class Ruhoh
91
91
  exit
92
92
  } unless draft['data']['date']
93
93
 
94
- draft['data']['ext'] = @options.ext
94
+ draft['data']['ext'] = File.extname(id).gsub('.','')
95
95
  filename = Ruhoh::Parsers::Posts.to_filename(draft['data'])
96
96
 
97
97
  if File.exist?(filename)
@@ -33,14 +33,27 @@ class Ruhoh
33
33
  end
34
34
 
35
35
  def drafts
36
- html = '<h3>Drafts</h3>'
37
- html += '<ul>'
38
- Ruhoh::DB.drafts.each_value do |draft|
39
- html += "<li><a href='#{draft['url']}'>#{draft['id']}: #{draft['title']}</a></li>"
40
- end
41
- html += '</ul>'
36
+ #tmpl = File.open(File.join(Ruhoh::Root, 'dashboard.html'))
37
+ tmpl = File.open(File.join(Ruhoh.paths.site_source, 'dashboard.html'))
38
+ template = tmpl.read
39
+ tmpl.close
42
40
 
43
- [200, {'Content-Type' => 'text/html'}, [html]]
41
+ drafts = []
42
+ posts = []
43
+ pages = []
44
+ Ruhoh::DB.pages.each_value { |p| pages << p }
45
+ Ruhoh::DB.drafts.each_value { |draft| drafts << draft }
46
+ Ruhoh::DB.posts['dictionary'].each_value { |p| posts << p }
47
+
48
+ #Ruhoh::Templaters::Base.parse(template)
49
+ payload = {
50
+ "drafts" => drafts,
51
+ "posts" => posts,
52
+ "pages" => pages,
53
+ }
54
+ output = Mustache.render(template, payload)
55
+
56
+ [200, {'Content-Type' => 'text/html'}, [output]]
44
57
  end
45
58
 
46
59
  end #Previewer
@@ -26,7 +26,7 @@ class Ruhoh
26
26
 
27
27
  def tags
28
28
  tags = []
29
- self.context['db']['posts']['categories'].each_value { |tag| tags << tag }
29
+ self.context['db']['posts']['tags'].each_value { |tag| tags << tag }
30
30
  tags
31
31
  end
32
32
 
data/lib/ruhoh/utils.rb CHANGED
@@ -20,7 +20,6 @@ class Ruhoh
20
20
 
21
21
  def self.parse_file(*args)
22
22
  path = File.__send__(:join, args)
23
- path = File.join(Ruhoh.paths.site_source, path) unless path[0] == '/'
24
23
 
25
24
  raise "File not found: #{path}" unless File.exist?(path)
26
25
 
data/lib/ruhoh/version.rb CHANGED
@@ -1,4 +1,4 @@
1
1
  class Ruhoh
2
- Version = VERSION = '0.1.2'
2
+ Version = VERSION = '0.1.3'
3
3
  RuhohSpec = '0.1'
4
4
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ruhoh
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.2
4
+ version: 0.1.3
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: 2012-04-18 00:00:00.000000000Z
12
+ date: 2012-04-19 00:00:00.000000000Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: rack
16
- requirement: &70279041346020 !ruby/object:Gem::Requirement
16
+ requirement: &70227452372580 !ruby/object:Gem::Requirement
17
17
  none: false
18
18
  requirements:
19
19
  - - ~>
@@ -21,10 +21,10 @@ dependencies:
21
21
  version: '1.4'
22
22
  type: :runtime
23
23
  prerelease: false
24
- version_requirements: *70279041346020
24
+ version_requirements: *70227452372580
25
25
  - !ruby/object:Gem::Dependency
26
26
  name: mustache
27
- requirement: &70279041345520 !ruby/object:Gem::Requirement
27
+ requirement: &70227452372080 !ruby/object:Gem::Requirement
28
28
  none: false
29
29
  requirements:
30
30
  - - ~>
@@ -32,10 +32,10 @@ dependencies:
32
32
  version: '0.99'
33
33
  type: :runtime
34
34
  prerelease: false
35
- version_requirements: *70279041345520
35
+ version_requirements: *70227452372080
36
36
  - !ruby/object:Gem::Dependency
37
37
  name: directory_watcher
38
- requirement: &70279041345060 !ruby/object:Gem::Requirement
38
+ requirement: &70227452371620 !ruby/object:Gem::Requirement
39
39
  none: false
40
40
  requirements:
41
41
  - - ~>
@@ -43,10 +43,10 @@ dependencies:
43
43
  version: '1.4'
44
44
  type: :runtime
45
45
  prerelease: false
46
- version_requirements: *70279041345060
46
+ version_requirements: *70227452371620
47
47
  - !ruby/object:Gem::Dependency
48
48
  name: maruku
49
- requirement: &70279041344600 !ruby/object:Gem::Requirement
49
+ requirement: &70227452371160 !ruby/object:Gem::Requirement
50
50
  none: false
51
51
  requirements:
52
52
  - - ~>
@@ -54,7 +54,7 @@ dependencies:
54
54
  version: '0.6'
55
55
  type: :runtime
56
56
  prerelease: false
57
- version_requirements: *70279041344600
57
+ version_requirements: *70227452371160
58
58
  description: Ruhoh is a Universal API for your static blog.
59
59
  email: plusjade@gmail.com
60
60
  executables: