Merge branch 'master' of github.com:johnbintz/attentive
This commit is contained in:
commit
67c1c8797a
@ -16,6 +16,7 @@ Gem::Specification.new do |gem|
|
|||||||
gem.version = Attentive::VERSION
|
gem.version = Attentive::VERSION
|
||||||
|
|
||||||
gem.add_dependency 'sinatra'
|
gem.add_dependency 'sinatra'
|
||||||
|
gem.add_dependency 'naturalsort', '~> 1.1.1'
|
||||||
|
|
||||||
gem.add_dependency 'sprockets'
|
gem.add_dependency 'sprockets'
|
||||||
gem.add_dependency 'sprockets-vendor_gems'
|
gem.add_dependency 'sprockets-vendor_gems'
|
||||||
|
@ -13,6 +13,8 @@ require 'rack/builder'
|
|||||||
|
|
||||||
require 'forwardable'
|
require 'forwardable'
|
||||||
|
|
||||||
|
require 'natural_sort_kernel'
|
||||||
|
|
||||||
module Attentive
|
module Attentive
|
||||||
module Helpers
|
module Helpers
|
||||||
def image_path(path, options)
|
def image_path(path, options)
|
||||||
@ -150,7 +152,7 @@ module Attentive
|
|||||||
def slides
|
def slides
|
||||||
slides = []
|
slides = []
|
||||||
|
|
||||||
Dir['presentation/*.slides'].sort.each do |file|
|
Dir['presentation/*.slides'].natural_sort.each do |file|
|
||||||
File.readlines(file).each do |line|
|
File.readlines(file).each do |line|
|
||||||
if line[%r{^!SLIDE}]
|
if line[%r{^!SLIDE}]
|
||||||
slides << Slide.new(:classes => line.split(' ')[1..-1])
|
slides << Slide.new(:classes => line.split(' ')[1..-1])
|
||||||
|
Loading…
Reference in New Issue
Block a user