faqmarkdown 0.0.1 → 0.0.2

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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: e97e7d37b6ca257059b481870e27fbaff846542f
4
- data.tar.gz: b18e95c7f427c492b80d6e3722321c2a20c92dc3
3
+ metadata.gz: 0e7ac22bc13a127eee477728230b679172ba7e18
4
+ data.tar.gz: 1054ac9a2b0b2e7178779370e880c9a14bc44cc3
5
5
  SHA512:
6
- metadata.gz: 715e48611684b253eb7f7a2373a3581e8d7f566532ce33a9b6e8f792044b3b8ba791997167ffa79b3c7e0b9b67800d3419db01dbf2878f6b770bf4bbc84e317e
7
- data.tar.gz: d368e527772a7fac12bd77fd065754db16b21468259cc5fe9d2db3277178a785b39fed624b488faefe4eb9cde77818a99f69feedc5cac3b1b88506b7dc1ecc84
6
+ metadata.gz: 1f43f6eec3284953184abe2b58fbc42f46dd627aa5059e5f85fa9f7d1d91fd5ee1bb64b6a872d2d9becee5642411b956ce7eae618bcc90169b7c003ec7154ec2
7
+ data.tar.gz: aae05d3ccd23c0287b1cd13d5a964a7984bb4900079c65bbc371277c753aac26c7f401069b6f4d4ab7dbd89b0bdc1f865da909fde8b37e0a1e000d44a4a72edb
@@ -69,6 +69,10 @@ class Faq
69
69
  metadata[:categories]
70
70
  end
71
71
 
72
+ def action
73
+ metadata[:action]
74
+ end
75
+
72
76
  def categories_to_url
73
77
  categories = []
74
78
  self.categories.each {|x| categories << x.to_url}
@@ -1,3 +1,3 @@
1
1
  module Faqmarkdown
2
- VERSION = '0.0.1'
2
+ VERSION = '0.0.2'
3
3
  end
@@ -13,7 +13,7 @@ module Faqmarkdown
13
13
  end
14
14
 
15
15
  def add_routes
16
- insert_into_file 'config/routes.rb', " faqmarkdown :as => :faqs\n\n", :after => "::Application.routes.draw do\n"
16
+ insert_into_file 'config/routes.rb', "\n faqmarkdown :as => :faqs\n", :after => "::Application.routes.draw do\n"
17
17
  end
18
18
  end
19
19
  end
@@ -1,6 +1,7 @@
1
1
  ---
2
2
  title: Faq with full metadata
3
3
  author: John Smith
4
+ action: for-you
4
5
  email: john.smith@example.com
5
6
  summary: This is another custom & test summary.
6
7
  categories:
@@ -55,6 +55,11 @@ describe Faq do
55
55
  its(:email) { should == 'john.smith@example.com' }
56
56
  end
57
57
 
58
+ context 'with action' do
59
+ subject { test_faq '2011-05-01-full-metadata.markdown' }
60
+ its(:action) { should == 'for-you' }
61
+ end
62
+
58
63
  context "with categories" do
59
64
  subject { test_faq '2011-05-01-full-metadata.markdown' }
60
65
  its(:categories) { should == ['full', 'metadata']}
@@ -1,6 +1,7 @@
1
1
  ---
2
2
  title: Faq with full metadata
3
3
  author: John Smith
4
+ action: for-you
4
5
  email: john.smith@example.com
5
6
  summary: This is another custom & test summary.
6
7
  categories:
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: faqmarkdown
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.1
4
+ version: 0.0.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Rodrigo Martins
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2013-06-10 00:00:00.000000000 Z
11
+ date: 2013-07-16 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails