hackety_hack-lessons 0.0.1 → 1.0.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,3 +1,6 @@
1
+ ---
2
+ title: "Data Types"
3
+ ---
1
4
  # Data Types
2
5
 
3
6
  ## This is where it starts getting fun!
@@ -1,3 +1,7 @@
1
+ ---
2
+ title: "Data Structures"
3
+ ---
4
+
1
5
  # Beginner Data Structures
2
6
 
3
7
  ## Hello there!
@@ -1,3 +1,7 @@
1
+ ---
2
+ title: "Programming"
3
+ ---
4
+
1
5
  # Beginner Programming
2
6
 
3
7
  ## Hello there!
data/content/ruby.md CHANGED
@@ -1,3 +1,7 @@
1
+ ---
2
+ title: "Ruby"
3
+ ---
4
+
1
5
  # Beginner Ruby
2
6
 
3
7
  ## Hello there!
data/content/shoes.md CHANGED
@@ -1,3 +1,7 @@
1
+ ---
2
+ title: "Shoes"
3
+ ---
4
+
1
5
  # Beginner Shoes
2
6
 
3
7
  ## Hello there!
data/content/tour.md CHANGED
@@ -1,3 +1,7 @@
1
+ ---
2
+ title: "Tour"
3
+ ---
4
+
1
5
  # A Tour of Hackety Hack
2
6
 
3
7
  ## Welcome!
@@ -14,4 +14,6 @@ Gem::Specification.new do |gem|
14
14
  gem.name = "hackety_hack-lessons"
15
15
  gem.require_paths = ["lib"]
16
16
  gem.version = HacketyHack::Lessons::VERSION
17
+
18
+ gem.add_runtime_dependency "metadown"
17
19
  end
@@ -1,8 +1,22 @@
1
- require "hackety_hack/lessons/version"
2
-
3
- puts "Nothing to see here yet..."
1
+ require 'hackety_hack/lessons/version'
2
+ require 'metadown'
4
3
 
5
4
  module HacketyHack
6
5
  module Lessons
6
+ extend self
7
+
8
+ FILE_LIST = Dir["content/*.md"]
9
+
10
+ def titles
11
+ all.collect{|data| data.metadata["title"]}
12
+ end
13
+
14
+ def find_by_title(title)
15
+ all.find{|data| data.metadata["title"] == title}
16
+ end
17
+
18
+ def all
19
+ FILE_LIST.collect{|file| Metadown.render(File.read(file)) }
20
+ end
7
21
  end
8
22
  end
@@ -1,5 +1,5 @@
1
1
  module HacketyHack
2
2
  module Lessons
3
- VERSION = "0.0.1"
3
+ VERSION = "1.0.0"
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: hackety_hack-lessons
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.1
4
+ version: 1.0.0
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -10,7 +10,18 @@ autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
12
  date: 2012-01-25 00:00:00.000000000 Z
13
- dependencies: []
13
+ dependencies:
14
+ - !ruby/object:Gem::Dependency
15
+ name: metadown
16
+ requirement: &2161112480 !ruby/object:Gem::Requirement
17
+ none: false
18
+ requirements:
19
+ - - ! '>='
20
+ - !ruby/object:Gem::Version
21
+ version: '0'
22
+ type: :runtime
23
+ prerelease: false
24
+ version_requirements: *2161112480
14
25
  description: A set of lessons to learn Ruby programming, from the Hackety Hack project.
15
26
  email:
16
27
  - steve@steveklabnik.com