middleman-vcard 0.9.9 → 0.9.10
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +5 -5
- data/.gitignore +3 -15
- data/Gemfile.lock +66 -44
- data/lib/middleman-vcard/extension.rb +15 -24
- data/lib/middleman-vcard/version.rb +1 -1
- data/middleman-vcard.gemspec +0 -2
- metadata +3 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
|
-
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: 5c2e4cb489ac3d279d5f5a0e849270e866dd1206d61baa89e2391c0f2f633945
|
4
|
+
data.tar.gz: f8342147c823610e0d1832565a6c3c1a034c5db2c47c303ea91b3eb0d7484d15
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c851838844ac3f60f4611b35d21ac9e5c7c1ed7e094a2dc244abb4a4bd409b87c3d1d8cb56cfcc27f0b7fcdf61e5145c7e3e8b53d87560aa080368931707fd7d
|
7
|
+
data.tar.gz: 4034b3a7c1b2350b6eb2529ca090cba3996c8d20ba7f273185078836f666c89cabcc5c0cdb787fcb0db55fd9e1e09fdb447eb942d090e230610afa68d0783c63
|
data/.gitignore
CHANGED
@@ -1,5 +1,3 @@
|
|
1
|
-
# {{{ Ignores for generated/temporary files
|
2
|
-
|
3
1
|
# Generated documentation
|
4
2
|
doc/
|
5
3
|
|
@@ -11,16 +9,6 @@ tmp/
|
|
11
9
|
pkg/
|
12
10
|
vendor/cache/*.gem
|
13
11
|
|
14
|
-
#
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
# IntelliJ IDEA project files
|
19
|
-
.idea/
|
20
|
-
*.iml
|
21
|
-
|
22
|
-
# SublimeText project files
|
23
|
-
*.sublime-project
|
24
|
-
*.sublime-workspace
|
25
|
-
|
26
|
-
# }}}
|
12
|
+
# Bundler
|
13
|
+
vendor/
|
14
|
+
.bundle/
|
data/Gemfile.lock
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
middleman-vcard (0.9.
|
4
|
+
middleman-vcard (0.9.10)
|
5
5
|
contracts
|
6
6
|
middleman-core (>= 3.3.10)
|
7
7
|
vpim
|
@@ -9,63 +9,78 @@ PATH
|
|
9
9
|
GEM
|
10
10
|
remote: https://rubygems.org/
|
11
11
|
specs:
|
12
|
-
activesupport (
|
13
|
-
|
14
|
-
|
12
|
+
activesupport (5.0.6)
|
13
|
+
concurrent-ruby (~> 1.0, >= 1.0.2)
|
14
|
+
i18n (~> 0.7)
|
15
15
|
minitest (~> 5.1)
|
16
|
-
thread_safe (~> 0.1)
|
17
16
|
tzinfo (~> 1.1)
|
18
|
-
|
19
|
-
|
17
|
+
addressable (2.5.2)
|
18
|
+
public_suffix (>= 2.0.2, < 4.0)
|
19
|
+
backports (3.11.1)
|
20
20
|
codeclimate-test-reporter (0.4.7)
|
21
21
|
simplecov (>= 0.7.1, < 1.0.0)
|
22
22
|
coderay (1.1.0)
|
23
|
-
|
23
|
+
concurrent-ruby (1.0.5)
|
24
|
+
contracts (0.13.0)
|
24
25
|
diff-lcs (1.2.5)
|
25
26
|
docile (1.1.5)
|
27
|
+
dotenv (2.2.1)
|
26
28
|
erubis (2.7.0)
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
29
|
+
execjs (2.7.0)
|
30
|
+
fast_blank (1.0.0)
|
31
|
+
fastimage (2.1.1)
|
32
|
+
ffi (1.9.21)
|
33
|
+
hamster (3.0.0)
|
34
|
+
concurrent-ruby (~> 1.0)
|
35
|
+
hashie (3.5.7)
|
31
36
|
i18n (0.7.0)
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
rb-inotify (>= 0.9)
|
37
|
+
listen (3.0.8)
|
38
|
+
rb-fsevent (~> 0.9, >= 0.9.4)
|
39
|
+
rb-inotify (~> 0.9, >= 0.9.7)
|
40
|
+
memoist (0.16.0)
|
37
41
|
method_source (0.8.2)
|
38
|
-
middleman-core (
|
39
|
-
activesupport (
|
42
|
+
middleman-core (4.2.1)
|
43
|
+
activesupport (>= 4.2, < 5.1)
|
44
|
+
addressable (~> 2.3)
|
45
|
+
backports (~> 3.6)
|
40
46
|
bundler (~> 1.1)
|
47
|
+
contracts (~> 0.13.0)
|
48
|
+
dotenv
|
41
49
|
erubis
|
42
|
-
|
50
|
+
execjs (~> 2.0)
|
51
|
+
fast_blank
|
52
|
+
fastimage (~> 2.0)
|
53
|
+
hamster (~> 3.0)
|
54
|
+
hashie (~> 3.4)
|
43
55
|
i18n (~> 0.7.0)
|
44
|
-
listen (
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
56
|
+
listen (~> 3.0.0)
|
57
|
+
memoist (~> 0.14)
|
58
|
+
padrino-helpers (~> 0.13.0)
|
59
|
+
parallel
|
60
|
+
rack (>= 1.4.5, < 3)
|
61
|
+
sass (>= 3.4)
|
62
|
+
servolux
|
63
|
+
tilt (~> 2.0)
|
64
|
+
uglifier (~> 3.0)
|
65
|
+
minitest (5.11.3)
|
51
66
|
multi_json (1.11.0)
|
52
|
-
padrino-helpers (0.
|
67
|
+
padrino-helpers (0.13.3.4)
|
53
68
|
i18n (~> 0.6, >= 0.6.7)
|
54
|
-
padrino-support (= 0.
|
55
|
-
tilt (
|
56
|
-
padrino-support (0.
|
69
|
+
padrino-support (= 0.13.3.4)
|
70
|
+
tilt (>= 1.4.1, < 3)
|
71
|
+
padrino-support (0.13.3.4)
|
57
72
|
activesupport (>= 3.1)
|
73
|
+
parallel (1.12.1)
|
58
74
|
pry (0.10.1)
|
59
75
|
coderay (~> 1.1.0)
|
60
76
|
method_source (~> 0.8.1)
|
61
77
|
slop (~> 3.4)
|
62
|
-
|
63
|
-
rack
|
64
|
-
rack (>= 1.0)
|
78
|
+
public_suffix (3.0.2)
|
79
|
+
rack (2.0.4)
|
65
80
|
rake (10.4.2)
|
66
|
-
rb-fsevent (0.
|
67
|
-
rb-inotify (0.9.
|
68
|
-
ffi (>= 0.5.0)
|
81
|
+
rb-fsevent (0.10.2)
|
82
|
+
rb-inotify (0.9.10)
|
83
|
+
ffi (>= 0.5.0, < 2)
|
69
84
|
rspec (3.2.0)
|
70
85
|
rspec-core (~> 3.2.0)
|
71
86
|
rspec-expectations (~> 3.2.0)
|
@@ -79,20 +94,24 @@ GEM
|
|
79
94
|
diff-lcs (>= 1.2.0, < 2.0)
|
80
95
|
rspec-support (~> 3.2.0)
|
81
96
|
rspec-support (3.2.2)
|
97
|
+
sass (3.5.5)
|
98
|
+
sass-listen (~> 4.0.0)
|
99
|
+
sass-listen (4.0.0)
|
100
|
+
rb-fsevent (~> 0.9, >= 0.9.4)
|
101
|
+
rb-inotify (~> 0.9, >= 0.9.7)
|
102
|
+
servolux (0.13.0)
|
82
103
|
simplecov (0.9.2)
|
83
104
|
docile (~> 1.1.0)
|
84
105
|
multi_json (~> 1.0)
|
85
106
|
simplecov-html (~> 0.9.0)
|
86
107
|
simplecov-html (0.9.0)
|
87
108
|
slop (3.6.0)
|
88
|
-
|
89
|
-
|
90
|
-
|
91
|
-
timers (4.0.1)
|
92
|
-
hitimes
|
93
|
-
tzinfo (1.2.2)
|
109
|
+
thread_safe (0.3.6)
|
110
|
+
tilt (2.0.8)
|
111
|
+
tzinfo (1.2.5)
|
94
112
|
thread_safe (~> 0.1)
|
95
|
-
|
113
|
+
uglifier (3.2.0)
|
114
|
+
execjs (>= 0.3.0, < 3)
|
96
115
|
vpim (13.11.11)
|
97
116
|
yard (0.8.7.6)
|
98
117
|
|
@@ -107,3 +126,6 @@ DEPENDENCIES
|
|
107
126
|
rake
|
108
127
|
rspec
|
109
128
|
yard
|
129
|
+
|
130
|
+
BUNDLED WITH
|
131
|
+
1.16.1
|
@@ -20,44 +20,28 @@ module Middleman
|
|
20
20
|
##
|
21
21
|
# Create the VCardExtension.
|
22
22
|
#
|
23
|
-
def initialize(app,
|
23
|
+
def initialize(app, options={}, &block)
|
24
24
|
super
|
25
25
|
|
26
|
-
@name = options_hash[:name]
|
27
|
-
@emails = options_hash[:emails]
|
28
|
-
@phones = options_hash[:phones]
|
29
|
-
@addresses = options_hash[:addresses]
|
30
|
-
@photo = options_hash[:photo]
|
31
|
-
|
32
|
-
@dst_path = options_hash[:dst_path]
|
33
|
-
|
34
26
|
source_dir_path = Pathname.new(app.root).join(app.config.source)
|
35
27
|
|
36
|
-
if
|
37
|
-
unless
|
28
|
+
if options[:dst_path]
|
29
|
+
unless options[:dst_path].start_with?(source_dir_path.to_s)
|
38
30
|
error("Invalid `dst_path`. It's not inside the source folder.")
|
39
31
|
end
|
40
|
-
@vcard_dir_path = Pathname.new(File.dirname(
|
41
|
-
@vcard_file_name = File.basename(
|
32
|
+
@vcard_dir_path = Pathname.new(File.dirname(options[:dst_path]))
|
33
|
+
@vcard_file_name = File.basename(options[:dst_path])
|
42
34
|
else
|
43
35
|
@vcard_dir_path = source_dir_path
|
44
|
-
@vcard_file_name = "#{
|
36
|
+
@vcard_file_name = "#{options[:name]}.vcf"
|
45
37
|
end
|
46
38
|
|
47
|
-
@vcard_generator = Middleman::VCard::Generator.new(
|
48
|
-
@name,
|
49
|
-
emails: @emails,
|
50
|
-
phones: @phones,
|
51
|
-
addresses: @addresses,
|
52
|
-
photo: @photo,
|
53
|
-
logger: logger)
|
54
|
-
|
55
39
|
# Define some config used later
|
56
40
|
#
|
57
41
|
# NOTE: We want to be consistent with Middleman conventions, so
|
58
42
|
# `vcard_dir_path` is a `String` because all Middleman paths are
|
59
43
|
# `String`s.
|
60
|
-
app.config.define_setting :vcard_name,
|
44
|
+
app.config.define_setting :vcard_name, options[:name]
|
61
45
|
app.config.define_setting :vcard_file_name, @vcard_file_name
|
62
46
|
app.config.define_setting :vcard_dir_path, @vcard_dir_path.to_s
|
63
47
|
end
|
@@ -67,7 +51,14 @@ module Middleman
|
|
67
51
|
# generate the VCard.
|
68
52
|
#
|
69
53
|
def after_configuration
|
70
|
-
|
54
|
+
vcard_generator = Middleman::VCard::Generator.new(
|
55
|
+
options[:name],
|
56
|
+
emails: options[:emails],
|
57
|
+
phones: options[:phones],
|
58
|
+
addresses: options[:addresses],
|
59
|
+
photo: options[:photo],
|
60
|
+
logger: logger)
|
61
|
+
vcard_generator.generate(@vcard_dir_path.join(@vcard_file_name).to_s)
|
71
62
|
end
|
72
63
|
|
73
64
|
helpers do
|
data/middleman-vcard.gemspec
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: middleman-vcard
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.9.
|
4
|
+
version: 0.9.10
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Alessandro Molari
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2018-02-14 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: middleman-core
|
@@ -171,11 +171,10 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
171
171
|
version: '0'
|
172
172
|
requirements: []
|
173
173
|
rubyforge_project:
|
174
|
-
rubygems_version: 2.
|
174
|
+
rubygems_version: 2.7.3
|
175
175
|
signing_key:
|
176
176
|
specification_version: 4
|
177
177
|
summary: Middleman extension to generate VCards
|
178
178
|
test_files:
|
179
179
|
- spec/middleman-vcard_version_spec.rb
|
180
180
|
- spec/spec_helper.rb
|
181
|
-
has_rdoc:
|