baron 1.0.18 → 1.0.20

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 177c7e1d5b2f1c53a8e32d71ffd5ae59dcb0e811
4
- data.tar.gz: 791a3a4d4a76f709079ab8f6d57c4147debe0fa0
3
+ metadata.gz: e89f92d362719ab9949fb661afd7b15fbed8c6af
4
+ data.tar.gz: d29abe97cedc71a906a8c41b7f2550292e0f4b6e
5
5
  SHA512:
6
- metadata.gz: 6f02a3a5ef69582747194f9f0fc3823d2d755d1401ba428a33ef89f38cbe2b246fa1febe80a429ef7672c42978094ef4ba6f32d55e7699f29dfb93314686bece
7
- data.tar.gz: 1f66c8ec9d82f7ed0d09d79c0fc15d67f69a817677539927515184ed0eb12b9cc8bbc3c00cbba43e09aaee4fcdda3dcaab5e2a9eca489761b2e89c65a50e9fef
6
+ metadata.gz: 37f7099fb31794508c6a796312b3f56413e1e52a028a952f382b47d457a54503c7f969a67ffe1ad9290351c0baf7d48032cac31450b3f31c808eb53be9763236
7
+ data.tar.gz: fef3367575b6ace44c65ca20bc382cec6f65bac75bd7dec5cf13ace6b035834f27eb9acb95fd947af65508b313b0eb1a0cafd742166a04ea5fe15cac767fd22e
@@ -0,0 +1,38 @@
1
+ BACKLOG & VERSION HISTORY
2
+
3
+ [ ] Revisit naming to delineate path, url and filepath
4
+ [ ] Support feed_max_articles in the feed.atom file
5
+ [ ] Page title definition happens inside blog_engine.rb. Should happen within
6
+ page_controller.rb as a Private or Protected method.
7
+ [ ] Can I reduce the number of downcase calls by doing it to the whole path at
8
+ the beginning?
9
+ [ ] Add integration tests to ensure each page type loads with 200, and redirects
10
+ work
11
+ [ ] Consider creating a class to handle all filesystem work and better document
12
+ conventions. rename baron_engine to routing
13
+ [ ] Add letsencrypt free SSL support to rakefile tasks
14
+ [ ] Add comments
15
+ [ ] Convert font icon set to Zurb's, they have github and slideshare http://www.zurb.com/playground/foundation-icons
16
+ [ ] Add .gitkeep files to the downloads and drafts folder so I don't lose them in the repo
17
+ [ ] Setup a sample blog on a custom domain, host on heroku.
18
+ [ ] Document SEO tips & tricks
19
+ [ ] Add a sitemap template
20
+ [ ] Add 'publish' task to the rake file
21
+ [ ] Add 'clean' task to the rake file to remove all articles (should use Git to make it safer)
22
+ [ ] Add support for Author pages
23
+ [ ] Render article attributes as content name/ value pairs in the header
24
+ [ ] Incorporate 'getting started' into the default content for the blog
25
+
26
+ Version 1.1 - In progress
27
+ * Support image-based template
28
+
29
+ Version 1.0 - Initial Release
30
+ * Author articles or custom pages in markdown or HTML
31
+ * Article categories supported by simply putting articles in a folder
32
+ * Many permalink formats are supported, including a custom prefix and several
33
+ date formats
34
+ * 301 or 302 redirects are supported for easy porting from your current blog
35
+ * SEO optimized with built-in support for Robots.txt, Google Analytics, Google web master tools
36
+ * Easy to customize the look & feel via a common site layout template
37
+ * Rakefile supports deploy to git, publish to rubygems.org and install on local
38
+ system.
data/Readme.md CHANGED
@@ -1,31 +1,23 @@
1
1
  #Baron Blog Engine Gem
2
2
 
3
- This is my first project in Ruby. I wanted to create the simplest blog engine I
4
- could that included all the features I was looking for in my person blog.
3
+ No one needs another blog engine. This is just a fun side project to play around
4
+ with Ruby and a small web-based app. I wanted to create the simplest content
5
+ management engine I could that included all the features I was looking for to
6
+ power my blog.
7
+
5
8
  There are two parts, the [Baron Blog Engine Gem](https://rubygems.org/gems/baron)
6
9
  and the [Baron Blog](https://github.com/nbuggia/baron-blog) project. The gem
7
10
  contains the code for routing, HTTP, and the MVC components of a simple blog.
8
11
  The blog project instantiates the gem and includes the blog UI templates and
9
12
  content.
10
13
 
11
- ---
12
-
13
- While writing this blog engine, I borrowed some code and design approaches
14
- from many existing blog engines. Following were the most useful.
15
-
16
- Toto
17
-
18
- * URL: https://github.com/cloudhead/toto
19
- * Author: http://cloudhead.io/ (Alexis Sellier)
20
- * License: https://github.com/cloudhead/toto/blob/master/LICENSE
21
-
22
- Jekyll
23
-
24
- * URL: https://github.com/mojombo/jekyll
25
- * Author: http://tom.preston-werner.com/ (Tom Preston-Werner)
26
- * License: https://github.com/mojombo/jekyll/blob/master/LICENSE
27
-
28
- Scanty
14
+ ## Features
29
15
 
30
- * URL: https://github.com/adamwiggins/scanty
31
- * Author: http://about.adamwiggins.com/ (Adam Wiggins)
16
+ * Publish to Heroku (or similar) using Git
17
+ * Easy to customize the look & feel via a common site layout template
18
+ * Author posts or custom pages in markdown or HTML
19
+ * Organize content into categories
20
+ * Several permalink formats are supported, including a custom prefix and several date formats
21
+ * 301 or 302 redirects are supported for easy porting from your current blog
22
+ * SEO optimized with built-in support for Robots.txt, Google Analytics, Google web master tools
23
+ * Fun tech used: Ruby, Rack, RSpec, Bootstrap, Disqus
data/VERSION CHANGED
@@ -1 +1 @@
1
- 1.0.18
1
+ 1.0.20
@@ -2,22 +2,23 @@
2
2
  # DO NOT EDIT THIS FILE DIRECTLY
3
3
  # Instead, edit Jeweler::Tasks in Rakefile, and run 'rake gemspec'
4
4
  # -*- encoding: utf-8 -*-
5
- # stub: baron 1.0.18 ruby lib
5
+ # stub: baron 1.0.20 ruby lib
6
6
 
7
7
  Gem::Specification.new do |s|
8
8
  s.name = "baron"
9
- s.version = "1.0.18"
9
+ s.version = "1.0.20"
10
10
 
11
11
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
12
12
  s.require_paths = ["lib"]
13
13
  s.authors = ["Nathan Buggia"]
14
- s.date = "2016-07-07"
14
+ s.date = "2016-07-12"
15
15
  s.description = "What's in the box: (1) Publish to Heroku using Git (2) Author articles in markdown (3) Article categories (4) Multiple permalink formats supported (5) Redirects (6) Advanced SEO optimizations and Google Analytics/ Webmaster Tools support. Uses Rack, RSpec, Bootstrap, JQuery, Disqus, Thin"
16
16
  s.email = "nbuggia@gmail.com"
17
17
  s.extra_rdoc_files = [
18
18
  "LICENSE"
19
19
  ]
20
20
  s.files = [
21
+ "Backlog.txt",
21
22
  "LICENSE",
22
23
  "Rakefile",
23
24
  "Readme.md",
@@ -117,6 +117,7 @@ module Baron
117
117
  date: parts.last[0..9],
118
118
  # trims date and extention
119
119
  filename: parts.last[11..(-1 * (@config[:ext].length + 2))].downcase,
120
+ filename_without_extension: parts.last[0..(-1 * (@config[:ext].length + 2))].downcase,
120
121
  category: parts[parts.count-2] == 'articles' ? '' : parts[parts.count-2]
121
122
  }
122
123
  end
@@ -2,7 +2,7 @@ module Baron
2
2
 
3
3
  class Article < Hash
4
4
 
5
- def self.create_slug title, date
5
+ def self.create_filename_without_extension title, date
6
6
  slug = title.empty? ? "Untitled" : title.strip.downcase
7
7
  slug_encoded = slug.gsub(/[^a-z0-9]/, '-')
8
8
  "#{date.strftime("%Y-%m-%d-") + slug_encoded}"
@@ -11,6 +11,7 @@ module Baron
11
11
  def initialize file_parts, config = {}
12
12
  @config = config
13
13
  self[:filename_and_path] = file_parts[:filename_and_path]
14
+ self[:filename_without_extension] = file_parts[:filename_without_extension]
14
15
  self[:slug] = file_parts[:filename]
15
16
  self[:category] = file_parts[:category].empty? ? '' : file_parts[:category]
16
17
  self[:date] = Date.parse(file_parts[:date].gsub('/', '-')) rescue Date.today
@@ -73,6 +74,10 @@ module Baron
73
74
  self[:slug]
74
75
  end
75
76
 
77
+ def slug_with_date
78
+
79
+ end
80
+
76
81
  protected
77
82
 
78
83
  def load_article filename_and_path
@@ -52,7 +52,7 @@ describe "Baron::Article" do
52
52
  end
53
53
 
54
54
  it "should create values correctly" do
55
- expect(Baron::Article.create_slug "B's Cookies & Cream 2,3,4", Date.new(2016,6,15)).to eq("2016-06-15-b-s-cookies---cream-2-3-4")
55
+ expect(Baron::Article.create_filename_without_extension "B's Cookies & Cream 2,3,4", Date.new(2016,6,15)).to eq("2016-06-15-b-s-cookies---cream-2-3-4")
56
56
  end
57
57
 
58
58
  end
@@ -45,14 +45,17 @@ describe "Baron::BlogEngine" do
45
45
  expect(articles_fileparts[0][:filename_and_path]).to eq(SAMPLE_DATA_PATH + 'articles/favorites/1916-01-01-the-road-not-taken.txt')
46
46
  expect(articles_fileparts[0][:date]).to eq('1916-01-01')
47
47
  expect(articles_fileparts[0][:filename]).to eq('the-road-not-taken')
48
- expect(articles_fileparts[0][:category]).to eq('favorites')
48
+ expect(articles_fileparts[0][:filename_without_extension]).to eq('1916-01-01-the-road-not-taken')
49
+ expect(articles_fileparts[0][:category]).to eq('favorites')
49
50
  expect(articles_fileparts[1][:filename_and_path]).to eq(SAMPLE_DATA_PATH + 'articles/north of boston/1914-01-05-A-Hundred-callers.txt')
50
51
  expect(articles_fileparts[1][:date]).to eq('1914-01-05')
51
52
  expect(articles_fileparts[1][:filename]).to eq('a-hundred-callers')
53
+ expect(articles_fileparts[1][:filename_without_extension]).to eq('1914-01-05-a-hundred-callers')
52
54
  expect(articles_fileparts[1][:category]).to eq('north of boston')
53
55
  expect(articles_fileparts.last[:filename_and_path]).to eq(SAMPLE_DATA_PATH + 'articles/other authors/1909-01-02-If.txt')
54
56
  expect(articles_fileparts.last[:date]).to eq('1909-01-02')
55
57
  expect(articles_fileparts.last[:filename]).to eq('if')
58
+ expect(articles_fileparts.last[:filename_without_extension]).to eq('1909-01-02-if')
56
59
  expect(articles_fileparts.last[:category]).to eq('other authors')
57
60
  end
58
61
 
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: baron
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.18
4
+ version: 1.0.20
5
5
  platform: ruby
6
6
  authors:
7
7
  - Nathan Buggia
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-07-07 00:00:00.000000000 Z
11
+ date: 2016-07-12 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rspec
@@ -48,6 +48,7 @@ extensions: []
48
48
  extra_rdoc_files:
49
49
  - LICENSE
50
50
  files:
51
+ - Backlog.txt
51
52
  - LICENSE
52
53
  - Rakefile
53
54
  - Readme.md