middleman-vcard 0.9.9 → 0.9.10

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
- SHA1:
3
- metadata.gz: 4097cd5e5c5489a15e27ccd021009b66b4a71222
4
- data.tar.gz: 4b0a232ccc14030904d299d2f0339ca85f440127
2
+ SHA256:
3
+ metadata.gz: 5c2e4cb489ac3d279d5f5a0e849270e866dd1206d61baa89e2391c0f2f633945
4
+ data.tar.gz: f8342147c823610e0d1832565a6c3c1a034c5db2c47c303ea91b3eb0d7484d15
5
5
  SHA512:
6
- metadata.gz: f65904b14583a4bf8cb6ff1e5ada9408453affb18f054959ff92842935037432c633a71aca6b387f150e8fa6c173aee6f905fabb69c430b318b6acee36f72783
7
- data.tar.gz: 447f2ab3fbbdc565c1c1507e7079901eca4566d597b576e6f63365d721010d81d260aa95318493792f71c62c22440aed88919cb7dae13589f08e113493978528
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
- # {{{ Ignores for tools
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/
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- middleman-vcard (0.9.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 (4.1.10)
13
- i18n (~> 0.6, >= 0.6.9)
14
- json (~> 1.7, >= 1.7.7)
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
- celluloid (0.16.0)
19
- timers (~> 4.0.0)
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
- contracts (0.8)
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
- ffi (1.9.8)
28
- hitimes (1.2.2)
29
- hooks (0.4.0)
30
- uber (~> 0.0.4)
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
- json (1.8.2)
33
- listen (2.10.0)
34
- celluloid (~> 0.16.0)
35
- rb-fsevent (>= 0.9.3)
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 (3.3.10)
39
- activesupport (~> 4.1.0)
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
- hooks (~> 0.3)
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 (>= 2.7.9, < 3.0)
45
- padrino-helpers (~> 0.12.3)
46
- rack (>= 1.4.5, < 2.0)
47
- rack-test (~> 0.6.2)
48
- thor (>= 0.15.2, < 2.0)
49
- tilt (~> 1.4.1, < 2.0)
50
- minitest (5.6.0)
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.12.5)
67
+ padrino-helpers (0.13.3.4)
53
68
  i18n (~> 0.6, >= 0.6.7)
54
- padrino-support (= 0.12.5)
55
- tilt (~> 1.4.1)
56
- padrino-support (0.12.5)
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
- rack (1.6.0)
63
- rack-test (0.6.3)
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.9.4)
67
- rb-inotify (0.9.5)
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
- thor (0.19.1)
89
- thread_safe (0.3.5)
90
- tilt (1.4.1)
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
- uber (0.0.13)
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, options_hash={}, &block)
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 @dst_path
37
- unless @dst_path.start_with?(source_dir_path.to_s)
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(@dst_path))
41
- @vcard_file_name = File.basename(@dst_path)
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 = "#{@name}.vcf"
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, @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
- @vcard_generator.generate(@vcard_dir_path.join(@vcard_file_name).to_s)
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
@@ -14,7 +14,7 @@ module Middleman
14
14
  ##
15
15
  # The current patch version.
16
16
  #
17
- VERSION_PATCH = 9
17
+ VERSION_PATCH = 10
18
18
 
19
19
  ##
20
20
  # The version string, following the semvers conventions.
@@ -1,5 +1,3 @@
1
- # -*- encoding: utf-8 -*-
2
-
3
1
  $:.push File.expand_path("../lib", __FILE__)
4
2
  require "middleman-vcard/version"
5
3
 
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.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: 2015-04-14 00:00:00.000000000 Z
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.4.5
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: