harp2hugo 0.0.3 → 0.0.4
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 +4 -4
- data/harp2hugo.gemspec +1 -1
- data/lib/harp2hugo/meta_data.rb +1 -2
- data/lib/harp2hugo/version.rb +1 -1
- data/spec/Spit-up-on-light-gray-carpet-instead-of-adjacent-linoleum-chew-iPad-power-cord.md +7 -0
- data/spec/_data.json +6 -6
- data/spec/data.yml +4 -4
- data/spec/harp2hugo_spec.rb +1 -1
- data/spec/meta_data_spec.rb +7 -8
- data/spec/output.md +10 -22
- metadata +5 -4
- data/spec/dropwizard-https-jerseyclient-with-runtime-jssecacerts.md +0 -18
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 3464897bfce2b3616b86d292875ba8c3a7c896cf
|
4
|
+
data.tar.gz: 0e443397ea8d92891cbbf150425cda90197edf87
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: aa7375108ac1a427c8384622176c3afe137ed694a7eca35ca6140810776f0cabd9798cda2111ffdddcebd7c663264c720501d2551579f9f34ff763325511e672
|
7
|
+
data.tar.gz: 01cdeddacd1908316f621e5be2d48756b82b7195d6160fe8d0eb71cba4cbec85ebbb4262764e3e477fa289ee1a0cd452b1c7554cc4ab98cce6435981b5e7298e
|
data/harp2hugo.gemspec
CHANGED
@@ -6,7 +6,7 @@ require 'harp2hugo/version'
|
|
6
6
|
Gem::Specification.new do |spec|
|
7
7
|
spec.name = "harp2hugo"
|
8
8
|
spec.version = Harp2hugoVersion::VERSION
|
9
|
-
spec.authors = ["Yun Zhi Lin"]
|
9
|
+
spec.authors = ["Yun Zhi Lin", "Evgeny Dudin"]
|
10
10
|
spec.email = ["yun@yunspace.com"]
|
11
11
|
spec.summary = %q{harp to hugo converter}
|
12
12
|
spec.description = %q{converts your Harp _data.json meta data into Hugo's front matter format}
|
data/lib/harp2hugo/meta_data.rb
CHANGED
data/lib/harp2hugo/version.rb
CHANGED
@@ -0,0 +1,7 @@
|
|
1
|
+
|
2
|
+
Kitty loves pigs spot something, big eyes, big eyes, crouch, shake butt, prepare to pounce hiss at vacuum cleaner
|
3
|
+
|
4
|
+
Chase imaginary bugs inspect anything brought into the house, or chase ball of string mew but always hungry.
|
5
|
+
Mark territory pee in the shoe. Favor packaging over toy roll on the floor purring your whiskers off yet sleep on
|
6
|
+
keyboard, yet leave fur on owners clothes but pee in the shoe but chase red laser dot. Use lap as chair climb leg,
|
7
|
+
for sleep nap so hack up furballs.
|
data/spec/_data.json
CHANGED
@@ -2,14 +2,14 @@
|
|
2
2
|
"feed": {
|
3
3
|
"layout": false
|
4
4
|
},
|
5
|
-
"
|
6
|
-
"title": "
|
5
|
+
"Spit-up-on-light-gray-carpet-instead-of-adjacent-linoleum-chew-iPad-power-cord": {
|
6
|
+
"title": "Spit up on light gray carpet instead of adjacent linoleum chew iPad power cord",
|
7
7
|
"date": "2015-05-16",
|
8
8
|
"tags": [
|
9
|
-
"
|
10
|
-
"
|
11
|
-
"
|
9
|
+
"cat",
|
10
|
+
"lipsum",
|
11
|
+
"meow"
|
12
12
|
],
|
13
|
-
"author": "
|
13
|
+
"author": "catlipsum"
|
14
14
|
}
|
15
15
|
}
|
data/spec/data.yml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
date: 2015-05-16
|
3
|
-
linktitle:
|
4
|
-
title:
|
5
|
-
author:
|
6
|
-
tags: ["
|
3
|
+
linktitle: Spit up on light gray carpet instead of adjacent linoleum chew iPad powercord
|
4
|
+
title: Spit up on light gray carpet instead of adjacent linoleum chew iPad powercord
|
5
|
+
author: catlipsum
|
6
|
+
tags: ["cat", "lipsum", "meow"]
|
7
7
|
---
|
data/spec/harp2hugo_spec.rb
CHANGED
@@ -9,7 +9,7 @@ describe(Harp2Hugo::Converter) do
|
|
9
9
|
|
10
10
|
harp2hugo.convert "output"
|
11
11
|
|
12
|
-
result_file = "output/
|
12
|
+
result_file = "output/Spit-up-on-light-gray-carpet-instead-of-adjacent-linoleum-chew-iPad-power-cord.md"
|
13
13
|
expect(File.exists?result_file).to be_truthy
|
14
14
|
|
15
15
|
expected_file = "output.md"
|
data/spec/meta_data_spec.rb
CHANGED
@@ -5,21 +5,20 @@ describe(Harp2Hugo::MetaData) do
|
|
5
5
|
|
6
6
|
expected_yaml = <<-eos
|
7
7
|
---
|
8
|
-
title:
|
8
|
+
title: Spit up on light gray carpet instead of adjacent linoleum chew iPad power cord
|
9
9
|
date: '2015-05-16'
|
10
10
|
tags:
|
11
|
-
-
|
12
|
-
-
|
13
|
-
-
|
11
|
+
- cat
|
12
|
+
- lipsum
|
13
|
+
- meow
|
14
14
|
author: yunspace
|
15
|
-
linktitle: Dropwizard HTTPS JerseyClient with runtime JSSE CA Certificates
|
16
15
|
---
|
17
16
|
eos
|
18
17
|
|
19
|
-
it "should convert json to yaml" do
|
20
|
-
json_data = {"title" => "
|
18
|
+
it "should convert json to yaml without linewrap" do
|
19
|
+
json_data = {"title" => "Spit up on light gray carpet instead of adjacent linoleum chew iPad power cord",
|
21
20
|
"date" => "2015-05-16",
|
22
|
-
"tags" => ["
|
21
|
+
"tags" => ["cat", "lipsum", "meow"],
|
23
22
|
"author" => "yunspace"}
|
24
23
|
metadata = Harp2Hugo::MetaData.new(json_data)
|
25
24
|
|
data/spec/output.md
CHANGED
@@ -1,28 +1,16 @@
|
|
1
1
|
---
|
2
|
-
title:
|
2
|
+
title: Spit up on light gray carpet instead of adjacent linoleum chew iPad power cord
|
3
3
|
date: '2015-05-16'
|
4
4
|
tags:
|
5
|
-
-
|
6
|
-
-
|
7
|
-
-
|
8
|
-
author:
|
9
|
-
linktitle: Dropwizard HTTPS JerseyClient with runtime JSSE CA Certificates
|
5
|
+
- cat
|
6
|
+
- lipsum
|
7
|
+
- meow
|
8
|
+
author: catlipsum
|
10
9
|
---
|
11
10
|
|
12
|
-
|
13
|
-
installed as `jssecacerts` files into your JRE truststore at `$JAVA_HOME\jre\lib\security`. This is painful if you don't have access
|
14
|
-
to infrastructure, or don't want to patch/update your server/base Docker container everytime your SSL certificate changes. I will
|
15
|
-
show you a more elegant solution for JerseyClient/Dropwizard JerseyClient, where the certificate is loaded from file during runtime
|
16
|
-
and doesn't need to live in the JRE.
|
11
|
+
Kitty loves pigs spot something, big eyes, big eyes, crouch, shake butt, prepare to pounce hiss at vacuum cleaner
|
17
12
|
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
Simply replace the default `SSLSocketConnectionFactory` with one initialised using your `jssecacerts` TrustStore. A gist is worth a thounsand words:
|
23
|
-
<script src="https://gist.github.com/yunspace/7687f67a8eeade0c92d5.js"></script>
|
24
|
-
|
25
|
-
[mkyong]: http://www.mkyong.com/webservices/jax-ws/suncertpathbuilderexception-unable-to-find-valid-certification-path-to-requested-target/
|
26
|
-
[InstallCert]: https://github.com/escline/InstallCert
|
27
|
-
[answer]: http://stackoverflow.com/questions/2145431/https-using-jersey-client
|
28
|
-
[test]: https://github.com/dropwizard/dropwizard/blob/7ce0d065133cf68191389cf129dffa157c239cb0/dropwizard-client/src/test/java/io/dropwizard/client/JerseyClientBuilderTest.java#L280
|
13
|
+
Chase imaginary bugs inspect anything brought into the house, or chase ball of string mew but always hungry.
|
14
|
+
Mark territory pee in the shoe. Favor packaging over toy roll on the floor purring your whiskers off yet sleep on
|
15
|
+
keyboard, yet leave fur on owners clothes but pee in the shoe but chase red laser dot. Use lap as chair climb leg,
|
16
|
+
for sleep nap so hack up furballs.
|
metadata
CHANGED
@@ -1,14 +1,15 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: harp2hugo
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Yun Zhi Lin
|
8
|
+
- Evgeny Dudin
|
8
9
|
autorequire:
|
9
10
|
bindir: bin
|
10
11
|
cert_chain: []
|
11
|
-
date: 2015-
|
12
|
+
date: 2015-10-04 00:00:00.000000000 Z
|
12
13
|
dependencies:
|
13
14
|
- !ruby/object:Gem::Dependency
|
14
15
|
name: bundler
|
@@ -86,9 +87,9 @@ files:
|
|
86
87
|
- lib/harp2hugo/converter.rb
|
87
88
|
- lib/harp2hugo/meta_data.rb
|
88
89
|
- lib/harp2hugo/version.rb
|
90
|
+
- spec/Spit-up-on-light-gray-carpet-instead-of-adjacent-linoleum-chew-iPad-power-cord.md
|
89
91
|
- spec/_data.json
|
90
92
|
- spec/data.yml
|
91
|
-
- spec/dropwizard-https-jerseyclient-with-runtime-jssecacerts.md
|
92
93
|
- spec/harp2hugo_spec.rb
|
93
94
|
- spec/meta_data_spec.rb
|
94
95
|
- spec/output.md
|
@@ -118,9 +119,9 @@ signing_key:
|
|
118
119
|
specification_version: 4
|
119
120
|
summary: harp to hugo converter
|
120
121
|
test_files:
|
122
|
+
- spec/Spit-up-on-light-gray-carpet-instead-of-adjacent-linoleum-chew-iPad-power-cord.md
|
121
123
|
- spec/_data.json
|
122
124
|
- spec/data.yml
|
123
|
-
- spec/dropwizard-https-jerseyclient-with-runtime-jssecacerts.md
|
124
125
|
- spec/harp2hugo_spec.rb
|
125
126
|
- spec/meta_data_spec.rb
|
126
127
|
- spec/output.md
|
@@ -1,18 +0,0 @@
|
|
1
|
-
|
2
|
-
For Jersey Client (or any Java web client for that matter) to connect to a SSL endpoint, the target server certificate must be
|
3
|
-
installed as `jssecacerts` files into your JRE truststore at `$JAVA_HOME\jre\lib\security`. This is painful if you don't have access
|
4
|
-
to infrastructure, or don't want to patch/update your server/base Docker container everytime your SSL certificate changes. I will
|
5
|
-
show you a more elegant solution for JerseyClient/Dropwizard JerseyClient, where the certificate is loaded from file during runtime
|
6
|
-
and doesn't need to live in the JRE.
|
7
|
-
|
8
|
-
1. Extract server certificate in JSSE format - Mkyong has a very good tutorial on [extracting server certificate into jssecacerts][mkyong] using [InstallCert][InstallCert].
|
9
|
-
2. Once you have the `jssecacerts` file, put it inside your application's `src/main/resources` folder.
|
10
|
-
3. For a vanillar Jersey Client, you can enable HTTPS following this [answer][answer] and referenced links.
|
11
|
-
4. Dropwizard JerseyClient is built using its own `JerseyClientBuilder`, which you need to confirm to. The answer can be found [JerseyClientBuilderTest][test].
|
12
|
-
Simply replace the default `SSLSocketConnectionFactory` with one initialised using your `jssecacerts` TrustStore. A gist is worth a thounsand words:
|
13
|
-
<script src="https://gist.github.com/yunspace/7687f67a8eeade0c92d5.js"></script>
|
14
|
-
|
15
|
-
[mkyong]: http://www.mkyong.com/webservices/jax-ws/suncertpathbuilderexception-unable-to-find-valid-certification-path-to-requested-target/
|
16
|
-
[InstallCert]: https://github.com/escline/InstallCert
|
17
|
-
[answer]: http://stackoverflow.com/questions/2145431/https-using-jersey-client
|
18
|
-
[test]: https://github.com/dropwizard/dropwizard/blob/7ce0d065133cf68191389cf129dffa157c239cb0/dropwizard-client/src/test/java/io/dropwizard/client/JerseyClientBuilderTest.java#L280
|