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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: b69f8cb2b4af4431f058fb7262631af4485a40050f65c14930cff6abc305e7b4
4
- data.tar.gz: 31265f6a2d8fa7336f4e897af748799c786eaca0accbd525e22f2b98c9ad00e3
3
+ metadata.gz: 86e5ba9e0c0d1d9357eeb5bf130d13e18b0cd318a6ffa670c4d12343256f257e
4
+ data.tar.gz: 35a9c5894759828337c25e544d5781917333b5e85d9248ee0c61b7b2bd4ea833
5
5
  SHA512:
6
- metadata.gz: 52fb734c188a22d415b2c6e5bea0a3959229e24d9ecbd4c29eea7186a9a9412a974a0d7afeb34eabb71b2402760e4727587ffc3192a6c6554c4768fa70130f53
7
- data.tar.gz: 7783da40a8f0665a1ac571059924f7ca55d79d2013b9f8705c4d15e23b4146538f3c079fc3a54f51939e45a486650a3114dce5b1255f0de31c223f58a5e681e3
6
+ metadata.gz: dbbc4a8b64e51460b869b5cf03509da891ed7ecc3e5616903ff6e71aae7e0fee588fa3f209b02c1500cd9a5b1c008a1f39cf2bdbfcd21a988746bec08363cc43
7
+ data.tar.gz: 24960dfde5b11591438806e4057f0fea7d2e6be7fb2950f1d8eb590f498acf7bb88f6eac48a1db51e3f5eb91ad2955b5cc0d47fcf580bedeb4aa516cc100cd29
data/Gemfile CHANGED
@@ -1,5 +1,7 @@
1
1
  source 'http://rubygems.org'
2
2
 
3
+ ruby ">= 2.3.0"
4
+
3
5
  gem 'httparty', '~> 0.16.2'
4
6
  gem 'nokogiri', '~> 1.8.2'
5
7
 
@@ -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)
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.3)
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.1)
17
+ cucumber (3.1.2)
18
18
  builder (>= 2.1.2)
19
- cucumber-core (~> 3.1.0)
20
- cucumber-expressions (~> 6.0.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.0)
26
+ cucumber-core (3.2.1)
27
27
  backports (>= 3.8.0)
28
28
  cucumber-tag_expressions (~> 1.1.0)
29
- gherkin (>= 5.0.0)
30
- cucumber-expressions (6.0.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.2)
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.4.0)
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.5.7)
51
- highline (1.7.10)
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.3.12)
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.5.6)
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.2)
73
+ nokogiri (1.8.5)
74
74
  mini_portile2 (~> 2.3.0)
75
- nokogiri (1.8.2-java)
76
- oauth2 (1.4.0)
77
- faraday (>= 0.8, < 0.13)
78
- jwt (~> 1.0)
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.5)
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.2
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][[[https://travis-ci.org/tychobrailleur/mvnizer.svg?branch=master]]]]
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,2015,2018 -- Sébastien Le Callonnec
96
+ © Copyright 2012–2019 -- Sébastien Le Callonnec
@@ -2,3 +2,4 @@ group_id: com.example
2
2
  version: 0.0.1-SNAPSHOT
3
3
  type: jar
4
4
  dependencies: [ "junit:junit:4.12:jar:test" ]
5
+ plugins: [ ":maven-compiler-plugin:3.8.0" ]
@@ -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
-
@@ -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
@@ -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
- # Check whether the project coordinates of this project
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 \
@@ -0,0 +1,6 @@
1
+ <plugin>
2
+ <groupId><%= group_id %></groupId>
3
+ <artifactId><%= artifact_id %></artifactId>
4
+ <version><%= version %></version>
5
+ <% if configuration %> <configuration><%= configuration %></configuration><% end %>
6
+ </plugin>
@@ -26,7 +26,7 @@
26
26
  <source>1.8</source>
27
27
  <target>1.8</target>
28
28
  </configuration>
29
- </plugin>
30
- </plugins>
29
+ </plugin><% plugins.each do |p| if p %><%= render('_plugin.xml.erb', p) %><% end;
30
+ end %> </plugins>
31
31
  </build>
32
32
  </project>
@@ -1,5 +1,5 @@
1
1
  module Mvnizer
2
2
  module Version
3
- STRING = '0.5.0'
3
+ STRING = '0.6.0'
4
4
  end
5
5
  end
@@ -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.0 ruby lib
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.5.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\u{e9}bastien Le Callonnec".freeze]
14
- s.date = "2018-10-14"
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 = "2.7.7".freeze
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
@@ -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.5.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: 2018-10-14 00:00:00.000000000 Z
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
- rubyforge_project:
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.