octopress 3.0.0.rc.13 → 3.0.0.rc.14

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: fead3f71ad05e8d4ae9bb9037cd98bf46f2dcc6c
4
- data.tar.gz: 9d4cbd900dcd2b381282d46acbb4cc103c133c24
3
+ metadata.gz: ffe17080aee39ad3f2fae040eca71842cbd65f84
4
+ data.tar.gz: a699d7ff76b6b0ec4d4b062a488180eb5cbabcfb
5
5
  SHA512:
6
- metadata.gz: 40a3dd0146e0a4d5ab3d3d911f595a774fae90de19522e5b602065d622dfbcc4f31eaac3888ff28e63b9c02a3aa0628d6b0d13dfb913f7c1e6da2d89c77cfb7a
7
- data.tar.gz: 79683e347d84488151bfdde5848f4383ffb40b206adafbea9470ab216810622f32f3997b2d4d9d1ecbf06b2737d896c35863deaa44325c11fc16d22823f1230e
6
+ metadata.gz: e5bf0d1a2d1543581a9e895db7d3f16eca165e3716990d3697dc36724e827dc043c78c188fa786521320106a34f46ee9aed34e88b9fe87f9ed57065437ec65e7
7
+ data.tar.gz: a9bc9fc37b590ce5f1c638a312ff1032ed56e4af9f946f3fbb875fae7c3216150b43be6e4404b61f41974e01fbb5912a50873e27222e72970b632a542b5b416e
@@ -2,14 +2,19 @@
2
2
 
3
3
  ## Current released version
4
4
 
5
- ### 3.0.0 RC13 - 2014-07-24
5
+ ### 3.0.0 RC14 - 2014-07-26
6
6
 
7
- - Templates are no longer required unless passed as an option.
8
- - Drafts template default doesn't have a date anymore.
9
- - Now using octopress filters for titlecase
7
+ - Simplified configuration management.
8
+ - Now requiring titlecase gem directly.
10
9
 
11
10
  ## Past versions
12
11
 
12
+ ### 3.0.0 RC13 - 2014-07-24
13
+
14
+ - Templates are no longer required unless passed as an option.
15
+ - The default drafts template doesn't have a date anymore.
16
+ - Now using octopress filters for titlecase.
17
+
13
18
  ### 3.0.0 RC12 - 2014-05-23
14
19
 
15
20
  - Change: Default page template no longer includes a date.
data/README.md CHANGED
@@ -95,7 +95,7 @@ title: "My Title"
95
95
  date: YYYY-MM-DDTHH:MM:SS-00:00
96
96
  ```
97
97
 
98
- "OK, great? What else can I do?" Great question! Check out these other options:
98
+ "OK, great. What else can I do?" Great question! Check out these other options:
99
99
 
100
100
  | Option | Description |
101
101
  |:---------------------|:----------------------------------------|
@@ -121,8 +121,9 @@ $ octopress new page about.html # ./about.html
121
121
  | `--force` | Overwrite existing file. |
122
122
 
123
123
  Note: The default page template doesn't expect a date. If you want to add dates
124
- to your posts, consider adding `date: {{ date }}` to the default template
125
- `_templates/page`, or create a new template to use for dated pages.
124
+ to your pages, consider adding `date: {{ date }}` to the default template
125
+ `_templates/page`, or create a new template to use for dated pages. Otherwise,
126
+ you will have the `--date` option to add a date to a page.
126
127
 
127
128
  ### New Draft
128
129
 
@@ -1,5 +1,5 @@
1
1
  require 'mercenary'
2
- require 'octopress-filters'
2
+ require 'titlecase'
3
3
 
4
4
  module Octopress
5
5
  require 'octopress/configuration'
@@ -9,22 +9,34 @@ module Octopress
9
9
  'titlecase' => true
10
10
  }
11
11
 
12
+ # Read _octopress.yml and merge with defaults
13
+ #
12
14
  def self.config(options={})
13
- return @config if @config
14
15
 
15
- file = options['octopress-config'] || '_octopress.yml'
16
- user_config = {}
16
+ # Cache loading the config file
17
+ unless @user_config
18
+ file = options['octopress-config'] || '_octopress.yml'
17
19
 
18
- if File.exist? file
19
- user_config = SafeYAML.load_file(file) || {}
20
- end
20
+ if File.exist? file
21
+ config = SafeYAML.load_file(file) || {}
22
+ else
23
+ config = {}
24
+ end
25
+
26
+ # Allow cli extensioins to override default user configuration
27
+ if options['override']
28
+ config = Jekyll::Utils.deep_merge_hashes(config, options['override'])
29
+ end
21
30
 
22
- user_config = Jekyll::Utils.deep_merge_hashes(user_config, options['override'] || {})
23
- user_config = Jekyll::Utils.deep_merge_hashes(options['defaults'] || {}, user_config)
31
+ # Merge Octopress defaults
32
+ @user_config = Jekyll::Utils.deep_merge_hashes(DEFAULTS, config)
33
+ end
24
34
 
25
- @config = Jekyll::Utils.deep_merge_hashes(DEFAULTS, user_config)
35
+ @user_config
26
36
  end
27
37
 
38
+ # Read Jekyll's _config.yml merged with Jekyll's defaults
39
+ #
28
40
  def self.jekyll_config(options={})
29
41
  return @jekyll_config if @jekyll_config
30
42
 
@@ -115,7 +115,7 @@ module Octopress
115
115
  def parse_template(input)
116
116
 
117
117
  if @config['titlecase']
118
- @options['title'] = Octopress::Filters.titlecase(@options['title'])
118
+ @options['title'].titlecase!
119
119
  end
120
120
  # If possible only parse the YAML front matter.
121
121
  # If YAML front-matter dashes aren't present parse the whole
@@ -1,3 +1,3 @@
1
1
  module Octopress
2
- VERSION = "3.0.0.rc.13"
2
+ VERSION = "3.0.0.rc.14"
3
3
  end
@@ -20,7 +20,7 @@ Gem::Specification.new do |spec|
20
20
 
21
21
  spec.add_runtime_dependency "mercenary", "~> 0.3.2"
22
22
  spec.add_runtime_dependency "jekyll", "~> 2.0"
23
- spec.add_runtime_dependency "octopress-filters", "~> 1.1"
23
+ spec.add_runtime_dependency "titlecase"
24
24
 
25
25
  spec.add_development_dependency "octopress-ink"
26
26
  spec.add_development_dependency "bundler", "~> 1.3"
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: octopress
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.0.0.rc.13
4
+ version: 3.0.0.rc.14
5
5
  platform: ruby
6
6
  authors:
7
7
  - Brandon Mathis
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2014-07-25 00:00:00.000000000 Z
12
+ date: 2014-07-26 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: mercenary
@@ -40,19 +40,19 @@ dependencies:
40
40
  - !ruby/object:Gem::Version
41
41
  version: '2.0'
42
42
  - !ruby/object:Gem::Dependency
43
- name: octopress-filters
43
+ name: titlecase
44
44
  requirement: !ruby/object:Gem::Requirement
45
45
  requirements:
46
- - - "~>"
46
+ - - ">="
47
47
  - !ruby/object:Gem::Version
48
- version: '1.1'
48
+ version: '0'
49
49
  type: :runtime
50
50
  prerelease: false
51
51
  version_requirements: !ruby/object:Gem::Requirement
52
52
  requirements:
53
- - - "~>"
53
+ - - ">="
54
54
  - !ruby/object:Gem::Version
55
- version: '1.1'
55
+ version: '0'
56
56
  - !ruby/object:Gem::Dependency
57
57
  name: octopress-ink
58
58
  requirement: !ruby/object:Gem::Requirement