postmarkdown 0.0.6 → 0.0.7
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/.travis.yml +9 -0
- data/Appraisals +2 -6
- data/Gemfile +0 -1
- data/{readme.md → README.markdown} +2 -0
- data/Rakefile +5 -1
- data/app/models/post.rb +1 -1
- data/gemfiles/rails3_1.gemfile +1 -2
- data/gemfiles/rails3_2.gemfile +1 -2
- data/lib/postmarkdown/util.rb +2 -2
- data/lib/postmarkdown/version.rb +1 -1
- data/postmarkdown.gemspec +2 -2
- data/spec/internal/config/environments/test.rb +0 -1
- data/spec/lib/generators/postmarkdown/post_generator_spec.rb +12 -0
- data/spec/spec_helper.rb +2 -7
- metadata +16 -31
- data/spec/support/rails_app/.gitignore +0 -4
- data/spec/support/rails_app/app/controllers/application_controller.rb +0 -3
- data/spec/support/rails_app/config/application.rb +0 -42
- data/spec/support/rails_app/config/boot.rb +0 -10
- data/spec/support/rails_app/config/database.yml +0 -22
- data/spec/support/rails_app/config/environment.rb +0 -5
- data/spec/support/rails_app/config/initializers/secret_token.rb +0 -7
- data/spec/support/rails_app/config/routes.rb +0 -3
- data/spec/support/rails_app/config.ru +0 -4
- data/spec/support/rails_app/db/seeds.rb +0 -7
- data/spec/support/rails_app/doc/README_FOR_APP +0 -2
data/.travis.yml
ADDED
data/Appraisals
CHANGED
@@ -1,13 +1,9 @@
|
|
1
|
-
appraise 'rails3_0' do
|
2
|
-
gem 'rails', '~> 3.0.0'
|
3
|
-
end
|
4
|
-
|
5
1
|
appraise 'rails3_1' do
|
6
2
|
gem 'rails', '~> 3.1.0'
|
7
|
-
gem 'combustion', '~> 0.
|
3
|
+
gem 'combustion', '~> 0.4.0'
|
8
4
|
end
|
9
5
|
|
10
6
|
appraise 'rails3_2' do
|
11
7
|
gem 'rails', '~> 3.2.0'
|
12
|
-
gem 'combustion', '~> 0.
|
8
|
+
gem 'combustion', '~> 0.4.0'
|
13
9
|
end
|
data/Gemfile
CHANGED
@@ -4,6 +4,8 @@ A simple Rails blog engine powered by Markdown.
|
|
4
4
|
|
5
5
|
Postmarkdown is compatible with Rails 3 only and the gem is hosted on [RubyGems.org](http://rubygems.org/gems/postmarkdown).
|
6
6
|
|
7
|
+
[](http://travis-ci.org/ennova/postmarkdown)
|
8
|
+
|
7
9
|
## Features
|
8
10
|
|
9
11
|
* Markdown files for blog posts
|
data/Rakefile
CHANGED
data/app/models/post.rb
CHANGED
@@ -88,7 +88,7 @@ class Post
|
|
88
88
|
file_extensions = Postmarkdown::Config.options[:markdown_file_extensions].join(',')
|
89
89
|
@@posts ||= Dir.glob("#{directory}/*.{#{file_extensions}}").map do |filename|
|
90
90
|
Post.new filename
|
91
|
-
end.select(&:visible?).sort_by
|
91
|
+
end.select(&:visible?).sort_by { |post| [post.date, post.slug] }.reverse
|
92
92
|
end
|
93
93
|
|
94
94
|
def directory
|
data/gemfiles/rails3_1.gemfile
CHANGED
@@ -2,10 +2,9 @@
|
|
2
2
|
|
3
3
|
source "http://rubygems.org"
|
4
4
|
|
5
|
-
gem "ruby-debug19", :require=>false
|
6
5
|
gem "timecop", :require=>false
|
7
6
|
gem "generator_spec", :require=>false
|
8
7
|
gem "rails", "~> 3.1.0"
|
9
|
-
gem "combustion", "~> 0.
|
8
|
+
gem "combustion", "~> 0.4.0"
|
10
9
|
|
11
10
|
gemspec :path=>"../"
|
data/gemfiles/rails3_2.gemfile
CHANGED
@@ -2,10 +2,9 @@
|
|
2
2
|
|
3
3
|
source "http://rubygems.org"
|
4
4
|
|
5
|
-
gem "ruby-debug19", :require=>false
|
6
5
|
gem "timecop", :require=>false
|
7
6
|
gem "generator_spec", :require=>false
|
8
7
|
gem "rails", "~> 3.2.0"
|
9
|
-
gem "combustion", "~> 0.
|
8
|
+
gem "combustion", "~> 0.4.0"
|
10
9
|
|
11
10
|
gemspec :path=>"../"
|
data/lib/postmarkdown/util.rb
CHANGED
data/lib/postmarkdown/version.rb
CHANGED
data/postmarkdown.gemspec
CHANGED
@@ -21,8 +21,8 @@ Gem::Specification.new do |s|
|
|
21
21
|
s.executables = `git ls-files -- bin/*`.split("\n").map{ |f| File.basename(f) }
|
22
22
|
s.require_paths = ['lib', 'public']
|
23
23
|
|
24
|
-
s.add_dependency 'rails', '~> 3.
|
25
|
-
s.add_dependency 'haml', '
|
24
|
+
s.add_dependency 'rails', '~> 3.1'
|
25
|
+
s.add_dependency 'haml', ['>= 3.1', '< 5']
|
26
26
|
s.add_dependency 'gravtastic'
|
27
27
|
s.add_dependency 'nokogiri'
|
28
28
|
s.add_dependency 'rdiscount'
|
@@ -4,6 +4,5 @@ Rails.application.class.configure do
|
|
4
4
|
config.consider_all_requests_local = true
|
5
5
|
config.action_controller.perform_caching = false
|
6
6
|
config.action_dispatch.show_exceptions = false
|
7
|
-
config.action_mailer.delivery_method = :test
|
8
7
|
config.active_support.deprecation = :stderr
|
9
8
|
end
|
@@ -95,5 +95,17 @@ module Postmarkdown
|
|
95
95
|
Dir['app/posts/*'].should be_empty
|
96
96
|
end
|
97
97
|
end
|
98
|
+
|
99
|
+
it 'does not error if git is unavailable' do
|
100
|
+
begin
|
101
|
+
old_path = ENV['PATH']
|
102
|
+
ENV['PATH'] = ''
|
103
|
+
expect {
|
104
|
+
run_generator %w(test)
|
105
|
+
}.to_not raise_error
|
106
|
+
ensure
|
107
|
+
ENV['PATH'] = old_path
|
108
|
+
end
|
109
|
+
end
|
98
110
|
end
|
99
111
|
end
|
data/spec/spec_helper.rb
CHANGED
@@ -6,13 +6,8 @@ Bundler.setup :default, :development
|
|
6
6
|
|
7
7
|
require 'postmarkdown'
|
8
8
|
|
9
|
-
require '
|
10
|
-
|
11
|
-
require 'support/rails_app/config/environment'
|
12
|
-
else
|
13
|
-
require 'combustion'
|
14
|
-
Combustion.initialize!
|
15
|
-
end
|
9
|
+
require 'combustion'
|
10
|
+
Combustion.initialize! :action_controller, :action_view, :sprockets
|
16
11
|
|
17
12
|
require 'capybara/rspec'
|
18
13
|
require 'rspec/rails'
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: postmarkdown
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.7
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -12,7 +12,7 @@ authors:
|
|
12
12
|
autorequire:
|
13
13
|
bindir: bin
|
14
14
|
cert_chain: []
|
15
|
-
date:
|
15
|
+
date: 2013-03-22 00:00:00.000000000 Z
|
16
16
|
dependencies:
|
17
17
|
- !ruby/object:Gem::Dependency
|
18
18
|
name: rails
|
@@ -21,7 +21,7 @@ dependencies:
|
|
21
21
|
requirements:
|
22
22
|
- - ~>
|
23
23
|
- !ruby/object:Gem::Version
|
24
|
-
version: '3.
|
24
|
+
version: '3.1'
|
25
25
|
type: :runtime
|
26
26
|
prerelease: false
|
27
27
|
version_requirements: !ruby/object:Gem::Requirement
|
@@ -29,23 +29,29 @@ dependencies:
|
|
29
29
|
requirements:
|
30
30
|
- - ~>
|
31
31
|
- !ruby/object:Gem::Version
|
32
|
-
version: '3.
|
32
|
+
version: '3.1'
|
33
33
|
- !ruby/object:Gem::Dependency
|
34
34
|
name: haml
|
35
35
|
requirement: !ruby/object:Gem::Requirement
|
36
36
|
none: false
|
37
37
|
requirements:
|
38
|
-
- -
|
38
|
+
- - ! '>='
|
39
39
|
- !ruby/object:Gem::Version
|
40
40
|
version: '3.1'
|
41
|
+
- - <
|
42
|
+
- !ruby/object:Gem::Version
|
43
|
+
version: '5'
|
41
44
|
type: :runtime
|
42
45
|
prerelease: false
|
43
46
|
version_requirements: !ruby/object:Gem::Requirement
|
44
47
|
none: false
|
45
48
|
requirements:
|
46
|
-
- -
|
49
|
+
- - ! '>='
|
47
50
|
- !ruby/object:Gem::Version
|
48
51
|
version: '3.1'
|
52
|
+
- - <
|
53
|
+
- !ruby/object:Gem::Version
|
54
|
+
version: '5'
|
49
55
|
- !ruby/object:Gem::Dependency
|
50
56
|
name: gravtastic
|
51
57
|
requirement: !ruby/object:Gem::Requirement
|
@@ -219,8 +225,10 @@ files:
|
|
219
225
|
- .gitignore
|
220
226
|
- .rspec
|
221
227
|
- .rvmrc
|
228
|
+
- .travis.yml
|
222
229
|
- Appraisals
|
223
230
|
- Gemfile
|
231
|
+
- README.markdown
|
224
232
|
- Rakefile
|
225
233
|
- app/controllers/application_controller.rb
|
226
234
|
- app/controllers/posts_controller.rb
|
@@ -251,7 +259,6 @@ files:
|
|
251
259
|
- lib/postmarkdown/util.rb
|
252
260
|
- lib/postmarkdown/version.rb
|
253
261
|
- postmarkdown.gemspec
|
254
|
-
- readme.md
|
255
262
|
- spec/helpers/post_helper_spec.rb
|
256
263
|
- spec/integrations/posts_spec.rb
|
257
264
|
- spec/internal/.gitignore
|
@@ -283,17 +290,6 @@ files:
|
|
283
290
|
- spec/support/data/posts/2012-02-13-102030-custom-title-and-timestamp.markdown
|
284
291
|
- spec/support/data/posts/2015-02-13-custom-title.markdown
|
285
292
|
- spec/support/data/posts/missing-date-from-filename.markdown
|
286
|
-
- spec/support/rails_app/.gitignore
|
287
|
-
- spec/support/rails_app/app/controllers/application_controller.rb
|
288
|
-
- spec/support/rails_app/config.ru
|
289
|
-
- spec/support/rails_app/config/application.rb
|
290
|
-
- spec/support/rails_app/config/boot.rb
|
291
|
-
- spec/support/rails_app/config/database.yml
|
292
|
-
- spec/support/rails_app/config/environment.rb
|
293
|
-
- spec/support/rails_app/config/initializers/secret_token.rb
|
294
|
-
- spec/support/rails_app/config/routes.rb
|
295
|
-
- spec/support/rails_app/db/seeds.rb
|
296
|
-
- spec/support/rails_app/doc/README_FOR_APP
|
297
293
|
- vendor/assets/stylesheets/postmarkdown/postmarkdown.css
|
298
294
|
homepage: ''
|
299
295
|
licenses:
|
@@ -311,7 +307,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
311
307
|
version: '0'
|
312
308
|
segments:
|
313
309
|
- 0
|
314
|
-
hash:
|
310
|
+
hash: 3995996797349439592
|
315
311
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
316
312
|
none: false
|
317
313
|
requirements:
|
@@ -320,7 +316,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
320
316
|
version: '0'
|
321
317
|
segments:
|
322
318
|
- 0
|
323
|
-
hash:
|
319
|
+
hash: 3995996797349439592
|
324
320
|
requirements: []
|
325
321
|
rubyforge_project: postmarkdown
|
326
322
|
rubygems_version: 1.8.24
|
@@ -359,14 +355,3 @@ test_files:
|
|
359
355
|
- spec/support/data/posts/2012-02-13-102030-custom-title-and-timestamp.markdown
|
360
356
|
- spec/support/data/posts/2015-02-13-custom-title.markdown
|
361
357
|
- spec/support/data/posts/missing-date-from-filename.markdown
|
362
|
-
- spec/support/rails_app/.gitignore
|
363
|
-
- spec/support/rails_app/app/controllers/application_controller.rb
|
364
|
-
- spec/support/rails_app/config.ru
|
365
|
-
- spec/support/rails_app/config/application.rb
|
366
|
-
- spec/support/rails_app/config/boot.rb
|
367
|
-
- spec/support/rails_app/config/database.yml
|
368
|
-
- spec/support/rails_app/config/environment.rb
|
369
|
-
- spec/support/rails_app/config/initializers/secret_token.rb
|
370
|
-
- spec/support/rails_app/config/routes.rb
|
371
|
-
- spec/support/rails_app/db/seeds.rb
|
372
|
-
- spec/support/rails_app/doc/README_FOR_APP
|
@@ -1,42 +0,0 @@
|
|
1
|
-
require File.expand_path('../boot', __FILE__)
|
2
|
-
|
3
|
-
require 'rails/all'
|
4
|
-
|
5
|
-
# If you have a Gemfile, require the gems listed there, including any gems
|
6
|
-
# you've limited to :test, :development, or :production.
|
7
|
-
Bundler.require(:default, Rails.env) if defined?(Bundler)
|
8
|
-
|
9
|
-
module RailsApp
|
10
|
-
class Application < Rails::Application
|
11
|
-
# Settings in config/environments/* take precedence over those specified here.
|
12
|
-
# Application configuration should go into files in config/initializers
|
13
|
-
# -- all .rb files in that directory are automatically loaded.
|
14
|
-
|
15
|
-
# Custom directories with classes and modules you want to be autoloadable.
|
16
|
-
# config.autoload_paths += %W(#{config.root}/extras)
|
17
|
-
|
18
|
-
# Only load the plugins named here, in the order given (default is alphabetical).
|
19
|
-
# :all can be used as a placeholder for all plugins not explicitly named.
|
20
|
-
# config.plugins = [ :exception_notification, :ssl_requirement, :all ]
|
21
|
-
|
22
|
-
# Activate observers that should always be running.
|
23
|
-
# config.active_record.observers = :cacher, :garbage_collector, :forum_observer
|
24
|
-
|
25
|
-
# Set Time.zone default to the specified zone and make Active Record auto-convert to this zone.
|
26
|
-
# Run "rake -D time" for a list of tasks for finding time zone names. Default is UTC.
|
27
|
-
# config.time_zone = 'Central Time (US & Canada)'
|
28
|
-
|
29
|
-
# The default locale is :en and all translations from config/locales/*.rb,yml are auto loaded.
|
30
|
-
# config.i18n.load_path += Dir[Rails.root.join('my', 'locales', '*.{rb,yml}').to_s]
|
31
|
-
# config.i18n.default_locale = :de
|
32
|
-
|
33
|
-
# JavaScript files you want as :defaults (application.js is always included).
|
34
|
-
# config.action_view.javascript_expansions[:defaults] = %w(jquery rails)
|
35
|
-
|
36
|
-
# Configure the default encoding used in templates for Ruby 1.9.
|
37
|
-
config.encoding = "utf-8"
|
38
|
-
|
39
|
-
# Configure sensitive parameters which will be filtered from the log file.
|
40
|
-
config.filter_parameters += [:password]
|
41
|
-
end
|
42
|
-
end
|
@@ -1,22 +0,0 @@
|
|
1
|
-
# SQLite version 3.x
|
2
|
-
# gem install sqlite3
|
3
|
-
development:
|
4
|
-
adapter: sqlite3
|
5
|
-
database: db/development.sqlite3
|
6
|
-
pool: 5
|
7
|
-
timeout: 5000
|
8
|
-
|
9
|
-
# Warning: The database defined as "test" will be erased and
|
10
|
-
# re-generated from your development database when you run "rake".
|
11
|
-
# Do not set this db to the same as development or production.
|
12
|
-
test:
|
13
|
-
adapter: sqlite3
|
14
|
-
database: db/test.sqlite3
|
15
|
-
pool: 5
|
16
|
-
timeout: 5000
|
17
|
-
|
18
|
-
production:
|
19
|
-
adapter: sqlite3
|
20
|
-
database: db/production.sqlite3
|
21
|
-
pool: 5
|
22
|
-
timeout: 5000
|
@@ -1,7 +0,0 @@
|
|
1
|
-
# Be sure to restart your server when you modify this file.
|
2
|
-
|
3
|
-
# Your secret key for verifying the integrity of signed cookies.
|
4
|
-
# If you change this key, all old signed cookies will become invalid!
|
5
|
-
# Make sure the secret is at least 30 characters and all random,
|
6
|
-
# no regular words or you'll be exposed to dictionary attacks.
|
7
|
-
RailsApp::Application.config.secret_token = '68e0d835c6a664dca507ac5fd7f0117855bb2f53ded695b1f5136b714a9a3407f227fef3517bbfef38ac2afa18f3cdf975be590a0ba609b636760a4ac5b3f588'
|
@@ -1,7 +0,0 @@
|
|
1
|
-
# This file should contain all the record creation needed to seed the database with its default values.
|
2
|
-
# The data can then be loaded with the rake db:seed (or created alongside the db with db:setup).
|
3
|
-
#
|
4
|
-
# Examples:
|
5
|
-
#
|
6
|
-
# cities = City.create([{ :name => 'Chicago' }, { :name => 'Copenhagen' }])
|
7
|
-
# Mayor.create(:name => 'Daley', :city => cities.first)
|