jekyll-plantuml-url 0.1.0 → 0.1.2
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/.gitlab-ci.yml +32 -3
- data/LICENSE.txt +1 -1
- data/README.md +4 -4
- data/Rakefile +2 -2
- data/lib/jekyll-plantuml-url.rb +6 -5
- data/lib/version.rb +1 -1
- metadata +12 -13
- data/.pdd +0 -7
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: dba99b23503c7b97e8147a16df0a96193a6496d7
|
4
|
+
data.tar.gz: b78dd323c57449f7fced5bc444c02153f8aad612
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 2179d2a8b1f663c3e93677544c8a8728987e2f3aaba399b5cac5316ec65c858b61758d14708326f8c2be216393bce1c8d65223c9ec6002b5abd943306c309dce
|
7
|
+
data.tar.gz: fc018e75077cab378f432e7afaafcb453d0acfd506701b5237fb7384ef3e9e65511242f9570e9d0b8cca33864e2149fcc1e3a50a3a8db9aa8366dd784e5e7b8d
|
data/.gitlab-ci.yml
CHANGED
@@ -2,6 +2,7 @@ image: "ruby:2.3"
|
|
2
2
|
|
3
3
|
stages:
|
4
4
|
- build
|
5
|
+
- test
|
5
6
|
- staging
|
6
7
|
- production
|
7
8
|
|
@@ -19,6 +20,29 @@ Buid:
|
|
19
20
|
tags:
|
20
21
|
- docker
|
21
22
|
|
23
|
+
test:
|
24
|
+
stage: test
|
25
|
+
script:
|
26
|
+
- gem install jekyll bundler rake
|
27
|
+
- export myGem=`ls *.gem`
|
28
|
+
- export git_version=`git describe --tags --always`
|
29
|
+
- export gem_version="$(sed s/-/\./g <<<$git_version)"
|
30
|
+
- gem install "./$myGem"
|
31
|
+
- mkdir test; cd test
|
32
|
+
- jekyll new test_plantuml
|
33
|
+
- cd test_plantuml
|
34
|
+
- 'echo "gem \"jekyll-plantuml-url\", \"$gem_version\"" >> Gemfile'
|
35
|
+
- 'echo -e "gems:\n - jekyll-plantuml-url\n" >> _config.yml'
|
36
|
+
- 'echo "{% plantuml %}\n[First] - [Second]\n{% endplantuml %}\n" >> index.md'
|
37
|
+
- bundle install
|
38
|
+
- bundle exec jekyll build
|
39
|
+
artifacts:
|
40
|
+
paths:
|
41
|
+
- ./*.gem
|
42
|
+
expire_in: 1 week
|
43
|
+
tags:
|
44
|
+
- docker
|
45
|
+
|
22
46
|
Release_Staging:
|
23
47
|
stage: staging
|
24
48
|
script:
|
@@ -39,7 +63,14 @@ Release_Production:
|
|
39
63
|
environment: production
|
40
64
|
script:
|
41
65
|
- ls -la
|
42
|
-
-
|
66
|
+
- mkdir -pv ~/.gem
|
67
|
+
- export Fail=0
|
68
|
+
- touch ~/.gem/credentials
|
69
|
+
- chmod 0600 ~/.gem/credentials
|
70
|
+
- 'echo -e "---\n:rubygems_api_key: $GEM_API_PUSH\n" >> ~/.gem/credentials'
|
71
|
+
- 'gem push *.gem && echo Success || export Fail=1'
|
72
|
+
- rm -f ~/.gem/credentials
|
73
|
+
- '[ "$Fail" -eq 0 ]'
|
43
74
|
only:
|
44
75
|
- tags
|
45
76
|
except:
|
@@ -47,5 +78,3 @@ Release_Production:
|
|
47
78
|
tags:
|
48
79
|
- docker
|
49
80
|
when: manual
|
50
|
-
|
51
|
-
|
data/LICENSE.txt
CHANGED
data/README.md
CHANGED
@@ -1,11 +1,11 @@
|
|
1
1
|
[](http://badge.fury.io/rb/jekyll-plantuml-url)
|
2
2
|
|
3
|
+
|
3
4
|
A plugin for jekyll to use plantuml diagram inside your Jekyll for you website.
|
4
5
|
|
5
6
|
This will use external resource to build plantuml diagram.
|
6
7
|
|
7
|
-
Once created, the diagram is
|
8
|
-
|
8
|
+
Once created, the diagram is stored at `uml/` directory. So, by using this plugin there is a simple way to integrate plantuml diagramm without the Graphiz libraries, Java and plantuml jar file.
|
9
9
|
## Install Jekyll plugin
|
10
10
|
|
11
11
|
Install it first:
|
@@ -45,8 +45,8 @@ Checkout [PlantUML-Server](https://github.com/plantuml/plantuml-server) to insta
|
|
45
45
|
and setup the `_config.yml`
|
46
46
|
|
47
47
|
```yaml
|
48
|
-
|
49
|
-
url: 'http://www.plantuml.com/plantuml
|
48
|
+
plantuml:
|
49
|
+
url: 'http://www.plantuml.com/plantuml'
|
50
50
|
type: 'svg'
|
51
51
|
ssl_noverify: '0'
|
52
52
|
http_debug: '0'
|
data/Rakefile
CHANGED
@@ -52,11 +52,11 @@ task :tagit do
|
|
52
52
|
git_version = f.read()
|
53
53
|
git_version = git_version.chomp
|
54
54
|
git_version = git_version.gsub('-', '.')
|
55
|
-
|
55
|
+
|
56
56
|
puts " Version: #{git_version}"
|
57
57
|
version_file=Dir['lib/version.rb'].first
|
58
58
|
puts version_file
|
59
59
|
fh = File.open(version_file, 'w')
|
60
60
|
fh.puts "module PlantUML\nVERSION = \'#{git_version}\'\nend\n"
|
61
61
|
fh.close
|
62
|
-
end
|
62
|
+
end
|
data/lib/jekyll-plantuml-url.rb
CHANGED
@@ -40,7 +40,8 @@ module Jekyll
|
|
40
40
|
if site.config['plantuml']
|
41
41
|
uml_config=site.config['plantuml']
|
42
42
|
else
|
43
|
-
puts "** No configuration for plantuml in present in _config.yml, using default"
|
43
|
+
puts "** No configuration for plantuml in present in _config.yml, using default"
|
44
|
+
#Jekyll.logger.debug "No configuration for plantuml in present in _config.yml, using default";
|
44
45
|
uml_config={
|
45
46
|
'type' => 'svg',
|
46
47
|
'url' => 'http://www.plantuml.com/plantuml',
|
@@ -52,7 +53,7 @@ module Jekyll
|
|
52
53
|
uml_type="svg"
|
53
54
|
else
|
54
55
|
uml_type=uml_config['type']
|
55
|
-
end
|
56
|
+
end
|
56
57
|
if !File.exists?(File.join(site.dest, "uml/#{name}.#{uml_type}"))
|
57
58
|
uml_out_file = File.join(site.source, "uml/#{name}.#{uml_type}")
|
58
59
|
if File.exists?(uml_out_file)
|
@@ -77,12 +78,12 @@ module Jekyll
|
|
77
78
|
puts "*** http debug on ***"
|
78
79
|
http.set_debug_output $stderr
|
79
80
|
end
|
80
|
-
|
81
|
+
|
81
82
|
request = Net::HTTP::Post.new("#{uri.path}/form")
|
82
83
|
request.add_field('Content-Type', 'application/x-www-form-urlencoded')
|
83
84
|
request.body = "text=" + URI::encode("@startuml\n"+super+"\n@enduml\n".force_encoding('ASCII-8BIT'))
|
84
85
|
response = http.request(request)
|
85
|
-
|
86
|
+
|
86
87
|
if response.code == "302" or response.code == "301"
|
87
88
|
# expected redirect of 302 with a new url with code-hash
|
88
89
|
newlocation=response["Location"]
|
@@ -101,7 +102,7 @@ module Jekyll
|
|
101
102
|
puts "*** http debug on ***"
|
102
103
|
http.set_debug_output $stderr
|
103
104
|
end
|
104
|
-
end
|
105
|
+
end
|
105
106
|
request_img = Net::HTTP::Get.new(newuri.path)
|
106
107
|
response_img = http.request(request_img)
|
107
108
|
if response_img.code == "200"
|
data/lib/version.rb
CHANGED
metadata
CHANGED
@@ -1,41 +1,41 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: jekyll-plantuml-url
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- dgoo2308
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2017-02-
|
11
|
+
date: 2017-02-27 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: jekyll
|
15
15
|
requirement: !ruby/object:Gem::Requirement
|
16
16
|
requirements:
|
17
|
-
- -
|
17
|
+
- - ">"
|
18
18
|
- !ruby/object:Gem::Version
|
19
19
|
version: '2.0'
|
20
20
|
type: :runtime
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
|
-
- -
|
24
|
+
- - ">"
|
25
25
|
- !ruby/object:Gem::Version
|
26
26
|
version: '2.0'
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: rake
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
30
30
|
requirements:
|
31
|
-
- - ~>
|
31
|
+
- - "~>"
|
32
32
|
- !ruby/object:Gem::Version
|
33
33
|
version: '0'
|
34
34
|
type: :development
|
35
35
|
prerelease: false
|
36
36
|
version_requirements: !ruby/object:Gem::Requirement
|
37
37
|
requirements:
|
38
|
-
- - ~>
|
38
|
+
- - "~>"
|
39
39
|
- !ruby/object:Gem::Version
|
40
40
|
version: '0'
|
41
41
|
description: PlantUML diagrams in Jekyll pages from plantUML-url
|
@@ -46,9 +46,8 @@ extra_rdoc_files:
|
|
46
46
|
- README.md
|
47
47
|
- LICENSE.txt
|
48
48
|
files:
|
49
|
-
- .gitignore
|
50
|
-
- .gitlab-ci.yml
|
51
|
-
- .pdd
|
49
|
+
- ".gitignore"
|
50
|
+
- ".gitlab-ci.yml"
|
52
51
|
- Gemfile
|
53
52
|
- LICENSE.txt
|
54
53
|
- README.md
|
@@ -62,22 +61,22 @@ licenses:
|
|
62
61
|
metadata: {}
|
63
62
|
post_install_message:
|
64
63
|
rdoc_options:
|
65
|
-
- --charset=UTF-8
|
64
|
+
- "--charset=UTF-8"
|
66
65
|
require_paths:
|
67
66
|
- lib
|
68
67
|
required_ruby_version: !ruby/object:Gem::Requirement
|
69
68
|
requirements:
|
70
|
-
- -
|
69
|
+
- - ">="
|
71
70
|
- !ruby/object:Gem::Version
|
72
71
|
version: 1.9.3
|
73
72
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
74
73
|
requirements:
|
75
|
-
- -
|
74
|
+
- - ">="
|
76
75
|
- !ruby/object:Gem::Version
|
77
76
|
version: '0'
|
78
77
|
requirements: []
|
79
78
|
rubyforge_project:
|
80
|
-
rubygems_version: 2.
|
79
|
+
rubygems_version: 2.6.10
|
81
80
|
signing_key:
|
82
81
|
specification_version: 2
|
83
82
|
summary: Jekyll PlantUML url Automation
|