mvnizer 0.5.0 → 0.6.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile +2 -0
- data/Gemfile.lock +21 -21
- data/README.org +4 -2
- data/conf/default.yml +1 -0
- data/lib/mvnizer.rb +1 -1
- data/lib/mvnizer/mvnize.rb +10 -3
- data/lib/mvnizer/plugin.rb +13 -0
- data/lib/mvnizer/project.rb +8 -3
- data/lib/mvnizer/templates/_plugin.xml.erb +6 -0
- data/lib/mvnizer/templates/pom.xml.erb +2 -2
- data/lib/mvnizer/version.rb +1 -1
- data/mvnizer.gemspec +7 -5
- data/spec/project_spec.rb +6 -0
- metadata +5 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 86e5ba9e0c0d1d9357eeb5bf130d13e18b0cd318a6ffa670c4d12343256f257e
|
4
|
+
data.tar.gz: 35a9c5894759828337c25e544d5781917333b5e85d9248ee0c61b7b2bd4ea833
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: dbbc4a8b64e51460b869b5cf03509da891ed7ecc3e5616903ff6e71aae7e0fee588fa3f209b02c1500cd9a5b1c008a1f39cf2bdbfcd21a988746bec08363cc43
|
7
|
+
data.tar.gz: 24960dfde5b11591438806e4057f0fea7d2e6be7fb2950f1d8eb590f498acf7bb88f6eac48a1db51e3f5eb91ad2955b5cc0d47fcf580bedeb4aa516cc100cd29
|
data/Gemfile
CHANGED
data/Gemfile.lock
CHANGED
@@ -2,44 +2,44 @@ GEM
|
|
2
2
|
remote: http://rubygems.org/
|
3
3
|
specs:
|
4
4
|
addressable (2.4.0)
|
5
|
-
aruba (0.14.
|
5
|
+
aruba (0.14.6)
|
6
6
|
childprocess (>= 0.6.3, < 0.10.0)
|
7
7
|
contracts (~> 0.9)
|
8
8
|
cucumber (>= 1.3.19)
|
9
9
|
ffi (~> 1.9.10)
|
10
10
|
rspec-expectations (>= 2.99)
|
11
11
|
thor (~> 0.19)
|
12
|
-
backports (3.11.
|
12
|
+
backports (3.11.4)
|
13
13
|
builder (3.2.3)
|
14
14
|
childprocess (0.9.0)
|
15
15
|
ffi (~> 1.0, >= 1.0.11)
|
16
16
|
contracts (0.16.0)
|
17
|
-
cucumber (3.1.
|
17
|
+
cucumber (3.1.2)
|
18
18
|
builder (>= 2.1.2)
|
19
|
-
cucumber-core (~> 3.
|
20
|
-
cucumber-expressions (~> 6.0.
|
19
|
+
cucumber-core (~> 3.2.0)
|
20
|
+
cucumber-expressions (~> 6.0.1)
|
21
21
|
cucumber-wire (~> 0.0.1)
|
22
22
|
diff-lcs (~> 1.3)
|
23
23
|
gherkin (~> 5.1.0)
|
24
24
|
multi_json (>= 1.7.5, < 2.0)
|
25
25
|
multi_test (>= 0.1.2)
|
26
|
-
cucumber-core (3.1
|
26
|
+
cucumber-core (3.2.1)
|
27
27
|
backports (>= 3.8.0)
|
28
28
|
cucumber-tag_expressions (~> 1.1.0)
|
29
|
-
gherkin (
|
30
|
-
cucumber-expressions (6.0.
|
29
|
+
gherkin (~> 5.0)
|
30
|
+
cucumber-expressions (6.0.1)
|
31
31
|
cucumber-tag_expressions (1.1.1)
|
32
32
|
cucumber-wire (0.0.1)
|
33
33
|
descendants_tracker (0.0.4)
|
34
34
|
thread_safe (~> 0.3, >= 0.3.1)
|
35
35
|
diff-lcs (1.3)
|
36
|
-
fakefs (0.14.
|
36
|
+
fakefs (0.14.3)
|
37
37
|
faraday (0.9.2)
|
38
38
|
multipart-post (>= 1.2, < 3)
|
39
39
|
ffi (1.9.25)
|
40
40
|
ffi (1.9.25-java)
|
41
41
|
gherkin (5.1.0)
|
42
|
-
git (1.
|
42
|
+
git (1.5.0)
|
43
43
|
github_api (0.16.0)
|
44
44
|
addressable (~> 2.4.0)
|
45
45
|
descendants_tracker (~> 0.0.4)
|
@@ -47,11 +47,11 @@ GEM
|
|
47
47
|
hashie (>= 3.4)
|
48
48
|
mime-types (>= 1.16, < 3.0)
|
49
49
|
oauth2 (~> 1.0)
|
50
|
-
hashie (3.
|
51
|
-
highline (
|
50
|
+
hashie (3.6.0)
|
51
|
+
highline (2.0.0)
|
52
52
|
httparty (0.16.2)
|
53
53
|
multi_xml (>= 0.5.2)
|
54
|
-
jar-dependencies (0.
|
54
|
+
jar-dependencies (0.4.0)
|
55
55
|
jeweler (2.3.9)
|
56
56
|
builder
|
57
57
|
bundler
|
@@ -63,26 +63,26 @@ GEM
|
|
63
63
|
rake
|
64
64
|
rdoc
|
65
65
|
semver2
|
66
|
-
jwt (1.
|
66
|
+
jwt (2.1.0)
|
67
67
|
mime-types (2.99.3)
|
68
68
|
mini_portile2 (2.3.0)
|
69
69
|
multi_json (1.13.1)
|
70
70
|
multi_test (0.1.2)
|
71
71
|
multi_xml (0.6.0)
|
72
72
|
multipart-post (2.0.0)
|
73
|
-
nokogiri (1.8.
|
73
|
+
nokogiri (1.8.5)
|
74
74
|
mini_portile2 (~> 2.3.0)
|
75
|
-
nokogiri (1.8.
|
76
|
-
oauth2 (1.4.
|
77
|
-
faraday (>= 0.8, < 0.
|
78
|
-
jwt (
|
75
|
+
nokogiri (1.8.5-java)
|
76
|
+
oauth2 (1.4.1)
|
77
|
+
faraday (>= 0.8, < 0.16.0)
|
78
|
+
jwt (>= 1.0, < 3.0)
|
79
79
|
multi_json (~> 1.3)
|
80
80
|
multi_xml (~> 0.5)
|
81
81
|
rack (>= 1.2, < 3)
|
82
82
|
psych (3.0.2)
|
83
83
|
psych (3.0.2-java)
|
84
84
|
jar-dependencies (>= 0.1.7)
|
85
|
-
rack (2.0.
|
85
|
+
rack (2.0.7)
|
86
86
|
rake (10.5.0)
|
87
87
|
rdoc (6.0.4)
|
88
88
|
rspec (2.99.0)
|
@@ -113,4 +113,4 @@ DEPENDENCIES
|
|
113
113
|
rspec-mocks (~> 2.99.4)
|
114
114
|
|
115
115
|
BUNDLED WITH
|
116
|
-
1.16.
|
116
|
+
1.16.3
|
data/README.org
CHANGED
@@ -1,7 +1,9 @@
|
|
1
1
|
Bootstraps a Maven project. Because archetypes shouldn't be so
|
2
2
|
complicated.
|
3
3
|
|
4
|
-
[[https://travis-ci.org/tychobrailleur/mvnizer][
|
4
|
+
[[https://travis-ci.org/tychobrailleur/mvnizer][https://travis-ci.org/tychobrailleur/mvnizer.svg?branch=master]]
|
5
|
+
[[https://badge.fury.io/rb/mvnizer][https://badge.fury.io/rb/mvnizer.svg]]
|
6
|
+
|
5
7
|
|
6
8
|
* Introduction
|
7
9
|
|
@@ -91,4 +93,4 @@ command:
|
|
91
93
|
|
92
94
|
MIT License.
|
93
95
|
|
94
|
-
© Copyright 2012
|
96
|
+
© Copyright 2012–2019 -- Sébastien Le Callonnec
|
data/conf/default.yml
CHANGED
data/lib/mvnizer.rb
CHANGED
@@ -7,8 +7,8 @@ require 'mvnizer/exceptions'
|
|
7
7
|
require 'mvnizer/erb_helper'
|
8
8
|
require 'mvnizer/task_helper'
|
9
9
|
require 'mvnizer/project'
|
10
|
+
require 'mvnizer/plugin'
|
10
11
|
require 'mvnizer/configuration'
|
11
12
|
require 'mvnizer/commands'
|
12
13
|
require 'mvnizer/coordinate_parser'
|
13
14
|
require 'mvnizer/mvnize'
|
14
|
-
|
data/lib/mvnizer/mvnize.rb
CHANGED
@@ -1,3 +1,4 @@
|
|
1
|
+
# coding: utf-8
|
1
2
|
module Mvnizer
|
2
3
|
# Mvnize is the main entry point into Mvnizer.
|
3
4
|
class Mvnize
|
@@ -44,21 +45,27 @@ module Mvnizer
|
|
44
45
|
coordinates = options[:name]
|
45
46
|
# Retrieve default options
|
46
47
|
options = conf(options)
|
47
|
-
|
48
|
+
|
48
49
|
# Parse user coordinates, and found values override options
|
49
50
|
project = @coordinate_parser.parse(coordinates)
|
50
51
|
return_project = Project.new(project.group_id || options[:group_id],
|
51
52
|
project.artifact_id,
|
52
53
|
project.version || options[:version],
|
53
54
|
project.type || options[:type])
|
54
|
-
|
55
|
+
|
55
56
|
|
56
57
|
# Get default dependencies, and add them after having parsed their coords.
|
57
58
|
dependencies = options[:dependencies]
|
58
59
|
dependencies.each do |d|
|
59
60
|
return_project.add_dependency(@coordinate_parser.parse_scoped_coordinates(d))
|
60
61
|
end if dependencies
|
61
|
-
|
62
|
+
|
63
|
+
|
64
|
+
plugins = options[:plugins]
|
65
|
+
plugins.each do |p|
|
66
|
+
return_project.add_plugin(@coordinate_parser.parse_scoped_coordinates(p))
|
67
|
+
end if plugins
|
68
|
+
|
62
69
|
return_project
|
63
70
|
end
|
64
71
|
end
|
@@ -0,0 +1,13 @@
|
|
1
|
+
module Mvnizer
|
2
|
+
class Plugin
|
3
|
+
attr_reader :group_id, :artifact_id, :version, :configuration, :executions
|
4
|
+
|
5
|
+
def initialize(group_id, artifact_id, version, configuration, executions = [])
|
6
|
+
@group_id = group_id
|
7
|
+
@artifact_id = artifact_id
|
8
|
+
@version = version
|
9
|
+
@configuration = configuration
|
10
|
+
@executions = executions
|
11
|
+
end
|
12
|
+
end
|
13
|
+
end
|
data/lib/mvnizer/project.rb
CHANGED
@@ -3,22 +3,27 @@ module Mvnizer
|
|
3
3
|
# The elements of the coordinates are read-only.
|
4
4
|
class Project
|
5
5
|
include Erbicole
|
6
|
-
attr_reader :group_id, :artifact_id, :version, :type, :dependencies, :scope
|
6
|
+
attr_reader :group_id, :artifact_id, :version, :type, :dependencies, :scope, :plugins
|
7
7
|
|
8
|
-
def initialize(group_id, artifact_id, version, type, dependencies = [], scope = nil)
|
8
|
+
def initialize(group_id, artifact_id, version, type, dependencies = [], scope = nil, plugins = [])
|
9
9
|
@group_id = group_id
|
10
10
|
@artifact_id = artifact_id
|
11
11
|
@version = version
|
12
12
|
@type = type
|
13
13
|
@dependencies = dependencies
|
14
14
|
@scope = scope
|
15
|
+
@plugins = plugins
|
15
16
|
end
|
16
17
|
|
17
18
|
def add_dependency(dependency)
|
18
19
|
@dependencies << dependency
|
19
20
|
end
|
20
21
|
|
21
|
-
|
22
|
+
def add_plugin(plugin)
|
23
|
+
@plugins << plugin
|
24
|
+
end
|
25
|
+
|
26
|
+
# Check whether the project coordinates of this project
|
22
27
|
# match the ones of the other project.
|
23
28
|
def ==(project)
|
24
29
|
(group_id == project.group_id \
|
data/lib/mvnizer/version.rb
CHANGED
data/mvnizer.gemspec
CHANGED
@@ -2,16 +2,16 @@
|
|
2
2
|
# DO NOT EDIT THIS FILE DIRECTLY
|
3
3
|
# Instead, edit Jeweler::Tasks in Rakefile, and run 'rake gemspec'
|
4
4
|
# -*- encoding: utf-8 -*-
|
5
|
-
# stub: mvnizer 0.
|
5
|
+
# stub: mvnizer 0.6.0 ruby lib
|
6
6
|
|
7
7
|
Gem::Specification.new do |s|
|
8
8
|
s.name = "mvnizer".freeze
|
9
|
-
s.version = "0.
|
9
|
+
s.version = "0.6.0"
|
10
10
|
|
11
11
|
s.required_rubygems_version = Gem::Requirement.new(">= 0".freeze) if s.respond_to? :required_rubygems_version=
|
12
12
|
s.require_paths = ["lib".freeze]
|
13
|
-
s.authors = ["S\
|
14
|
-
s.date = "
|
13
|
+
s.authors = ["S\u00E9bastien Le Callonnec".freeze]
|
14
|
+
s.date = "2019-07-10"
|
15
15
|
s.description = "Bootstrap a Maven project without the pain of archetypes.".freeze
|
16
16
|
s.email = "sebastien@weblogism.com".freeze
|
17
17
|
s.executables = ["mvnizer".freeze]
|
@@ -47,9 +47,11 @@ Gem::Specification.new do |s|
|
|
47
47
|
"lib/mvnizer/erb_helper.rb",
|
48
48
|
"lib/mvnizer/exceptions.rb",
|
49
49
|
"lib/mvnizer/mvnize.rb",
|
50
|
+
"lib/mvnizer/plugin.rb",
|
50
51
|
"lib/mvnizer/project.rb",
|
51
52
|
"lib/mvnizer/task_helper.rb",
|
52
53
|
"lib/mvnizer/templates/_dependency.xml.erb",
|
54
|
+
"lib/mvnizer/templates/_plugin.xml.erb",
|
53
55
|
"lib/mvnizer/templates/editorconfig.erb",
|
54
56
|
"lib/mvnizer/templates/gitignore.erb",
|
55
57
|
"lib/mvnizer/templates/pom.xml.erb",
|
@@ -77,7 +79,7 @@ Gem::Specification.new do |s|
|
|
77
79
|
]
|
78
80
|
s.homepage = "http://github.com/tychobrailleur/mvnizer".freeze
|
79
81
|
s.licenses = ["MIT".freeze]
|
80
|
-
s.rubygems_version = "
|
82
|
+
s.rubygems_version = "3.0.3".freeze
|
81
83
|
s.summary = "Bootstrap a Maven project without the pain of archetypes.".freeze
|
82
84
|
|
83
85
|
if s.respond_to? :specification_version then
|
data/spec/project_spec.rb
CHANGED
@@ -18,6 +18,12 @@ module Mvnizer
|
|
18
18
|
project = Project.new("f-oo", "b-ar", nil, nil)
|
19
19
|
project.package_name.should == "foo.bar"
|
20
20
|
end
|
21
|
+
|
22
|
+
it "can have plugins" do
|
23
|
+
project = Project.new("foo", "bar", nil, nil)
|
24
|
+
project.add_plugin(Plugin.new("qux", "baz", nil, nil))
|
25
|
+
project.plugins.size.should == 1
|
26
|
+
end
|
21
27
|
end
|
22
28
|
end
|
23
29
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: mvnizer
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.6.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Sébastien Le Callonnec
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2019-07-10 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: httparty
|
@@ -158,9 +158,11 @@ files:
|
|
158
158
|
- lib/mvnizer/erb_helper.rb
|
159
159
|
- lib/mvnizer/exceptions.rb
|
160
160
|
- lib/mvnizer/mvnize.rb
|
161
|
+
- lib/mvnizer/plugin.rb
|
161
162
|
- lib/mvnizer/project.rb
|
162
163
|
- lib/mvnizer/task_helper.rb
|
163
164
|
- lib/mvnizer/templates/_dependency.xml.erb
|
165
|
+
- lib/mvnizer/templates/_plugin.xml.erb
|
164
166
|
- lib/mvnizer/templates/editorconfig.erb
|
165
167
|
- lib/mvnizer/templates/gitignore.erb
|
166
168
|
- lib/mvnizer/templates/pom.xml.erb
|
@@ -204,8 +206,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
204
206
|
- !ruby/object:Gem::Version
|
205
207
|
version: '0'
|
206
208
|
requirements: []
|
207
|
-
|
208
|
-
rubygems_version: 2.7.7
|
209
|
+
rubygems_version: 3.0.3
|
209
210
|
signing_key:
|
210
211
|
specification_version: 4
|
211
212
|
summary: Bootstrap a Maven project without the pain of archetypes.
|