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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: f9f11ebe604bc4fa41bd85c7b2bf694cf5a53e8f
4
- data.tar.gz: 4635b919daa0a8ec7bfdc10f753818461b3f306c
3
+ metadata.gz: 3464897bfce2b3616b86d292875ba8c3a7c896cf
4
+ data.tar.gz: 0e443397ea8d92891cbbf150425cda90197edf87
5
5
  SHA512:
6
- metadata.gz: 37da2c9b637ab8d4bda8d7eccd120689b99b1748151e5e4630be4f48eca09e946b9bf942a01788410c3af0f46a57d9fe5b4720bce501c130c53cf3d91af6bab6
7
- data.tar.gz: 472a91e073e5a264010af27f7e93410e6492a6a1e4a438cf2ca5056308bfd55f805d0d3c5999b3f14a444ff2bf02c0b6b62778b885f0c32e5ecd103aea6f5a60
6
+ metadata.gz: aa7375108ac1a427c8384622176c3afe137ed694a7eca35ca6140810776f0cabd9798cda2111ffdddcebd7c663264c720501d2551579f9f34ff763325511e672
7
+ data.tar.gz: 01cdeddacd1908316f621e5be2d48756b82b7195d6160fe8d0eb71cba4cbec85ebbb4262764e3e477fa289ee1a0cd452b1c7554cc4ab98cce6435981b5e7298e
@@ -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}
@@ -7,8 +7,7 @@ module Harp2Hugo
7
7
  end
8
8
 
9
9
  def to_yaml
10
- @json_data["linktitle"] = @json_data["title"]
11
- "#{@json_data.to_yaml}---\n"
10
+ "#{@json_data.to_yaml()}---\n"
12
11
  end
13
12
  end
14
13
  end
@@ -1,3 +1,3 @@
1
1
  class Harp2hugoVersion
2
- VERSION = "0.0.3"
2
+ VERSION = "0.0.4"
3
3
  end
@@ -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.
@@ -2,14 +2,14 @@
2
2
  "feed": {
3
3
  "layout": false
4
4
  },
5
- "dropwizard-https-jerseyclient-with-runtime-jssecacerts": {
6
- "title": "Dropwizard HTTPS JerseyClient with runtime JSSE CA Certificates",
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
- "dropwizard",
10
- "ssl",
11
- "jersey"
9
+ "cat",
10
+ "lipsum",
11
+ "meow"
12
12
  ],
13
- "author": "yunspace"
13
+ "author": "catlipsum"
14
14
  }
15
15
  }
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  date: 2015-05-16
3
- linktitle: Dropwizard HTTPS JerseyClient with runtime JSSE CA Certificates
4
- title: Dropwizard HTTPS JerseyClient with runtime JSSE CA Certificates
5
- author: yunspace
6
- tags: ["dropwizard", "ssl", "jersey"]
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
  ---
@@ -9,7 +9,7 @@ describe(Harp2Hugo::Converter) do
9
9
 
10
10
  harp2hugo.convert "output"
11
11
 
12
- result_file = "output/dropwizard-https-jerseyclient-with-runtime-jssecacerts.md"
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"
@@ -5,21 +5,20 @@ describe(Harp2Hugo::MetaData) do
5
5
 
6
6
  expected_yaml = <<-eos
7
7
  ---
8
- title: Dropwizard HTTPS JerseyClient with runtime JSSE CA Certificates
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
- - dropwizard
12
- - ssl
13
- - jersey
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" => "Dropwizard HTTPS JerseyClient with runtime JSSE CA Certificates",
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" => ["dropwizard", "ssl", "jersey"],
21
+ "tags" => ["cat", "lipsum", "meow"],
23
22
  "author" => "yunspace"}
24
23
  metadata = Harp2Hugo::MetaData.new(json_data)
25
24
 
@@ -1,28 +1,16 @@
1
1
  ---
2
- title: Dropwizard HTTPS JerseyClient with runtime JSSE CA Certificates
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
- - dropwizard
6
- - ssl
7
- - jersey
8
- author: yunspace
9
- linktitle: Dropwizard HTTPS JerseyClient with runtime JSSE CA Certificates
5
+ - cat
6
+ - lipsum
7
+ - meow
8
+ author: catlipsum
10
9
  ---
11
10
 
12
- For Jersey Client (or any Java web client for that matter) to connect to a SSL endpoint, the target server certificate must be
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
- 1. Extract server certificate in JSSE format - Mkyong has a very good tutorial on [extracting server certificate into jssecacerts][mkyong] using [InstallCert][InstallCert].
19
- 2. Once you have the `jssecacerts` file, put it inside your application's `src/main/resources` folder.
20
- 3. For a vanillar Jersey Client, you can enable HTTPS following this [answer][answer] and referenced links.
21
- 4. Dropwizard JerseyClient is built using its own `JerseyClientBuilder`, which you need to confirm to. The answer can be found [JerseyClientBuilderTest][test].
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.3
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-08-26 00:00:00.000000000 Z
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