vitreous_share 0.0.11 → 0.0.13
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/vitreous/share/element.rb +4 -0
- data/lib/vitreous/share/version.rb +1 -1
- data/lib/vitreous_share.rb +1 -0
- data/test/element_test.rb +32 -0
- data/vitreous_share.gemspec +18 -17
- metadata +23 -10
data/lib/vitreous_share.rb
CHANGED
data/test/element_test.rb
CHANGED
@@ -15,4 +15,36 @@ class ElementTest < Test::Unit::TestCase
|
|
15
15
|
|
16
16
|
assert_equal( '/subfolder-1', element.elements.first.link )
|
17
17
|
end
|
18
|
+
|
19
|
+
def test_render
|
20
|
+
element_hash = {
|
21
|
+
"title" => "the title",
|
22
|
+
"link" => "the link",
|
23
|
+
"jpg" => "the jpg",
|
24
|
+
"txt" => "the txt"
|
25
|
+
}
|
26
|
+
|
27
|
+
element = Vitreous::Share::Element.new( element_hash )
|
28
|
+
|
29
|
+
result =
|
30
|
+
Mustache.render(
|
31
|
+
"{{#element}}{{title}} | {{link}} | {{jpg}} | {{txt}}{{/element}}",
|
32
|
+
{ :element => element }
|
33
|
+
)
|
34
|
+
|
35
|
+
assert_equal( 'the title | the link | the jpg | the txt', result )
|
36
|
+
end
|
37
|
+
|
38
|
+
def test_to_md
|
39
|
+
element_hash = { "txt" => "Eo! MarkDown *rules*." }
|
40
|
+
element = Vitreous::Share::Element.new( element_hash )
|
41
|
+
|
42
|
+
result =
|
43
|
+
Mustache.render(
|
44
|
+
"{{#element}}{{#to_md}}{{txt}}{{/to_md}}{{/element}}",
|
45
|
+
{ :element => element }
|
46
|
+
)
|
47
|
+
|
48
|
+
assert_equal( "<p>Eo! MarkDown <em>rules</em>.</p>\n", result )
|
49
|
+
end
|
18
50
|
end
|
data/vitreous_share.gemspec
CHANGED
@@ -1,29 +1,30 @@
|
|
1
1
|
# -*- encoding: utf-8 -*-
|
2
|
-
$:.push File.expand_path(
|
3
|
-
require
|
2
|
+
$:.push File.expand_path('../lib', __FILE__)
|
3
|
+
require 'vitreous/share/version'
|
4
4
|
|
5
5
|
Gem::Specification.new do |s|
|
6
|
-
s.name =
|
6
|
+
s.name = 'vitreous_share'
|
7
7
|
s.version = Vitreous::Share::VERSION
|
8
|
-
s.authors = [
|
9
|
-
s.email = [
|
10
|
-
s.homepage =
|
11
|
-
s.summary =
|
12
|
-
s.description =
|
8
|
+
s.authors = ['Fernando Guillen']
|
9
|
+
s.email = ['fguillen.mail@gmail.com']
|
10
|
+
s.homepage = 'https://github.com/fguillen/VitreousShare'
|
11
|
+
s.summary = 'Shared components for Vitreous'
|
12
|
+
s.description = 'Shared components for Vitreous'
|
13
13
|
|
14
|
-
s.rubyforge_project =
|
14
|
+
s.rubyforge_project = 'vitreous_share'
|
15
15
|
|
16
16
|
s.files = `git ls-files`.split("\n")
|
17
17
|
s.test_files = `git ls-files -- {test,spec,features}/*`.split("\n")
|
18
18
|
s.executables = `git ls-files -- bin/*`.split("\n").map{ |f| File.basename(f) }
|
19
|
-
s.require_paths = [
|
19
|
+
s.require_paths = ['lib']
|
20
20
|
|
21
|
-
s.add_dependency
|
22
|
-
s.add_dependency
|
23
|
-
s.add_dependency
|
21
|
+
s.add_dependency 'json'
|
22
|
+
s.add_dependency 'dropbox'
|
23
|
+
s.add_dependency 'mustache'
|
24
|
+
s.add_dependency 'rdiscount'
|
24
25
|
|
25
|
-
s.add_development_dependency
|
26
|
-
s.add_development_dependency
|
27
|
-
s.add_development_dependency
|
28
|
-
s.add_development_dependency
|
26
|
+
s.add_development_dependency 'bundler', '>= 1.0.0.rc.6'
|
27
|
+
s.add_development_dependency 'mocha'
|
28
|
+
s.add_development_dependency 'dummy_dropbox'
|
29
|
+
s.add_development_dependency 'rake'
|
29
30
|
end
|
metadata
CHANGED
@@ -5,8 +5,8 @@ version: !ruby/object:Gem::Version
|
|
5
5
|
segments:
|
6
6
|
- 0
|
7
7
|
- 0
|
8
|
-
-
|
9
|
-
version: 0.0.
|
8
|
+
- 13
|
9
|
+
version: 0.0.13
|
10
10
|
platform: ruby
|
11
11
|
authors:
|
12
12
|
- Fernando Guillen
|
@@ -57,9 +57,22 @@ dependencies:
|
|
57
57
|
type: :runtime
|
58
58
|
version_requirements: *id003
|
59
59
|
- !ruby/object:Gem::Dependency
|
60
|
-
name:
|
60
|
+
name: rdiscount
|
61
61
|
prerelease: false
|
62
62
|
requirement: &id004 !ruby/object:Gem::Requirement
|
63
|
+
none: false
|
64
|
+
requirements:
|
65
|
+
- - ">="
|
66
|
+
- !ruby/object:Gem::Version
|
67
|
+
segments:
|
68
|
+
- 0
|
69
|
+
version: "0"
|
70
|
+
type: :runtime
|
71
|
+
version_requirements: *id004
|
72
|
+
- !ruby/object:Gem::Dependency
|
73
|
+
name: bundler
|
74
|
+
prerelease: false
|
75
|
+
requirement: &id005 !ruby/object:Gem::Requirement
|
63
76
|
none: false
|
64
77
|
requirements:
|
65
78
|
- - ">="
|
@@ -72,11 +85,11 @@ dependencies:
|
|
72
85
|
- 6
|
73
86
|
version: 1.0.0.rc.6
|
74
87
|
type: :development
|
75
|
-
version_requirements: *
|
88
|
+
version_requirements: *id005
|
76
89
|
- !ruby/object:Gem::Dependency
|
77
90
|
name: mocha
|
78
91
|
prerelease: false
|
79
|
-
requirement: &
|
92
|
+
requirement: &id006 !ruby/object:Gem::Requirement
|
80
93
|
none: false
|
81
94
|
requirements:
|
82
95
|
- - ">="
|
@@ -85,11 +98,11 @@ dependencies:
|
|
85
98
|
- 0
|
86
99
|
version: "0"
|
87
100
|
type: :development
|
88
|
-
version_requirements: *
|
101
|
+
version_requirements: *id006
|
89
102
|
- !ruby/object:Gem::Dependency
|
90
103
|
name: dummy_dropbox
|
91
104
|
prerelease: false
|
92
|
-
requirement: &
|
105
|
+
requirement: &id007 !ruby/object:Gem::Requirement
|
93
106
|
none: false
|
94
107
|
requirements:
|
95
108
|
- - ">="
|
@@ -98,11 +111,11 @@ dependencies:
|
|
98
111
|
- 0
|
99
112
|
version: "0"
|
100
113
|
type: :development
|
101
|
-
version_requirements: *
|
114
|
+
version_requirements: *id007
|
102
115
|
- !ruby/object:Gem::Dependency
|
103
116
|
name: rake
|
104
117
|
prerelease: false
|
105
|
-
requirement: &
|
118
|
+
requirement: &id008 !ruby/object:Gem::Requirement
|
106
119
|
none: false
|
107
120
|
requirements:
|
108
121
|
- - ">="
|
@@ -111,7 +124,7 @@ dependencies:
|
|
111
124
|
- 0
|
112
125
|
version: "0"
|
113
126
|
type: :development
|
114
|
-
version_requirements: *
|
127
|
+
version_requirements: *id008
|
115
128
|
description: Shared components for Vitreous
|
116
129
|
email:
|
117
130
|
- fguillen.mail@gmail.com
|