mirror of
https://github.com/moparisthebest/android.moparisthebest.org
synced 2024-12-26 09:28:52 -05:00
Merge branch 'master' into site
This commit is contained in:
commit
143520898a
1
Gemfile
1
Gemfile
@ -10,3 +10,4 @@ gem 'haml', '>= 3.1'
|
|||||||
gem 'compass', '>= 0.11'
|
gem 'compass', '>= 0.11'
|
||||||
gem 'rubypants'
|
gem 'rubypants'
|
||||||
gem 'rb-fsevent'
|
gem 'rb-fsevent'
|
||||||
|
gem 'stringex'
|
@ -40,6 +40,7 @@ GEM
|
|||||||
blankslate (>= 2.1.2.3)
|
blankslate (>= 2.1.2.3)
|
||||||
ffi (~> 1.0.7)
|
ffi (~> 1.0.7)
|
||||||
sass (3.1.5)
|
sass (3.1.5)
|
||||||
|
stringex (1.3.0)
|
||||||
syntax (1.0.0)
|
syntax (1.0.0)
|
||||||
|
|
||||||
PLATFORMS
|
PLATFORMS
|
||||||
@ -56,3 +57,4 @@ DEPENDENCIES
|
|||||||
rb-fsevent
|
rb-fsevent
|
||||||
rdiscount
|
rdiscount
|
||||||
rubypants
|
rubypants
|
||||||
|
stringex
|
||||||
|
3
Rakefile
3
Rakefile
@ -1,5 +1,6 @@
|
|||||||
require "rubygems"
|
require "rubygems"
|
||||||
require "bundler/setup"
|
require "bundler/setup"
|
||||||
|
require "stringex"
|
||||||
|
|
||||||
## -- Rsync Deploy config -- ##
|
## -- Rsync Deploy config -- ##
|
||||||
# Be sure your public key is listed in your server's ~/.ssh/authorized_keys file
|
# Be sure your public key is listed in your server's ~/.ssh/authorized_keys file
|
||||||
@ -64,7 +65,7 @@ task :new_post, :title do |t, args|
|
|||||||
mkdir_p "#{source_dir}/#{posts_dir}"
|
mkdir_p "#{source_dir}/#{posts_dir}"
|
||||||
args.with_defaults(:title => 'new-post')
|
args.with_defaults(:title => 'new-post')
|
||||||
title = args.title
|
title = args.title
|
||||||
filename = "#{source_dir}/#{posts_dir}/#{Time.now.strftime('%Y-%m-%d')}-#{title.downcase.gsub(/&/,'and').gsub(/[,'":\?!\(\)\[\]]/,'').gsub(/[\W\.]/, '-').gsub(/-+$/,'')}.#{new_post_ext}"
|
filename = "#{source_dir}/#{posts_dir}/#{Time.now.strftime('%Y-%m-%d')}-#{title.to_url}.#{new_post_ext}"
|
||||||
puts "Creating new post: #{filename}"
|
puts "Creating new post: #{filename}"
|
||||||
open(filename, 'w') do |post|
|
open(filename, 'w') do |post|
|
||||||
system "mkdir -p #{source_dir}/#{posts_dir}/";
|
system "mkdir -p #{source_dir}/#{posts_dir}/";
|
||||||
|
Loading…
Reference in New Issue
Block a user