mvnizer 1.2.0 → 2.0.0

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
  SHA256:
3
- metadata.gz: 6bf5efb3ab3b0675e036cb927b33c0fedc65b525784b59c4d35aec74bb5f0b27
4
- data.tar.gz: 0e35fceb9db2f91e1f8cf051653e98f24d6c5449dc2eb839098a63b24f2053b0
3
+ metadata.gz: d0bde11b643ef753081667d9675b6b58fa311199f1107133ec90712429d91fad
4
+ data.tar.gz: c91148ead4a452bd7912f1703d6d86887fb03640977d58e3292cfbf067631342
5
5
  SHA512:
6
- metadata.gz: 22b459abf1bf9abe8d76a21837da8d7a8c87a93d0bf95aea63277289f82f82d57e5c369d7df1d2f5f9655244e5bd9914ecf66b9f8a54bd29de5a92a58e85faee
7
- data.tar.gz: 0b6ad9ed09c7d90c8447a8608f56a5dadf24d9909377eb5da8347ef4bee4ec81256b38f4fa96e18a934745d52d359c2a33222899d0b1f5de020c3267cd9d1a9d
6
+ metadata.gz: e7e160e28c365dd89dc32059f5fe47bf30320e711c9e7c17a18064f8d7c24e3bd2676924a5ecda911fb095e7d774b1298e58c000421805574fb9891e1659b550
7
+ data.tar.gz: f96956821881b48249db44f796ee6652bfd47d1d8ed3f8e1caeb178f3422b69ed63e9395230b1467a486b034d7c9cc83b2f9f43ab4b5aac92f10139239c19ccf
data/CHANGELOG.org CHANGED
@@ -1,3 +1,10 @@
1
+ * Mvnizer 1.3.0
2
+
3
+ - Update default junit version to 5.8.2
4
+ - Update SLF4J version to 1.7.36
5
+ - Update logback-core to 1.2.11
6
+ - Update nokogiri dependency to 1.13
7
+
1
8
  * Mvnizer 1.2.0
2
9
 
3
10
  - Add =--docker= option to generate =Dockerfile=
data/Dockerfile CHANGED
@@ -1,17 +1,50 @@
1
- # Dockerfile to compile and release gem.
2
-
3
- FROM ubuntu:18.04
1
+ FROM ubuntu:24.04 # LTS
4
2
 
5
3
  ARG DEBIAN_FRONTEND=noninteractive
6
- RUN apt-get update -q && \
7
- apt-get install -qy gpg gnupg-agent software-properties-common openssh-client && \
8
- apt-add-repository -y ppa:rael-gc/rvm && \
9
- apt-get update -q && \
10
- apt-get install -qy git vim rvm --no-install-recommends && \
11
- apt-get clean
12
-
13
- RUN /bin/bash -l -c "rvm autolibs packages && rvm install 2.7.0 && rvm use 2.7.0"
14
- RUN /bin/bash -l -c "gem update -f --no-document --system && gem install bundler"
4
+ ARG TZ=Etc/UTC
5
+
6
+ RUN apt-get update -q && apt-get upgrade -y && \
7
+ apt-get install -qy --no-install-recommends \
8
+ build-essential \
9
+ tzdata \
10
+ gnupg2 \
11
+ curl \
12
+ ca-certificates \
13
+ procps \
14
+ libssl-dev \
15
+ libreadline-dev \
16
+ zlib1g-dev \
17
+ libyaml-dev \
18
+ pkg-config \
19
+ libffi-dev \
20
+ libgmp-dev \
21
+ perl \
22
+ git \
23
+ && rm -rf /var/lib/apt/lists/*
24
+
25
+ WORKDIR /usr/local/src
26
+ RUN curl --proto '=https' --tlsv1.2 -sSfL https://www.openssl.org/source/old/1.1.1/openssl-1.1.1w.tar.gz -o openssl-1.1.1w.tar.gz && \
27
+ tar -zxf openssl-1.1.1w.tar.gz && \
28
+ cd openssl-1.1.1w && \
29
+ ./config --prefix=/opt/openssl-1.1.1w --openssldir=/opt/openssl-1.1.1w shared zlib-dynamic && \
30
+ make -j$(nproc) && \
31
+ make install && \
32
+ rm -rf /usr/local/src/openssl*
33
+
34
+ RUN curl -sSL https://rvm.io/mpapis.asc | gpg --import - && \
35
+ curl -sSL https://rvm.io/pkuczynski.asc | gpg --import -
36
+
37
+ RUN curl -sSL https://get.rvm.io | bash -s stable
38
+
39
+ SHELL ["/bin/bash", "-l", "-c"]
40
+
41
+ RUN echo 'source /etc/profile.d/rvm.sh' >> ~/.bashrc && \
42
+ source /etc/profile.d/rvm.sh && \
43
+ rvm autolibs disable && \
44
+ rvm requirements && \
45
+ rvm install 3.0.7 --with-openssl-dir=/opt/openssl-1.1.1w && \
46
+ rvm use 3.0.7 --default && \
47
+ gem install bundler
15
48
 
16
49
  WORKDIR /mvnizer
17
50
 
data/Gemfile CHANGED
@@ -1,10 +1,10 @@
1
1
  source 'https://rubygems.org'
2
2
 
3
- ruby ">= 2.7.0"
3
+ ruby ">= 3.2.0"
4
4
 
5
- gem 'httparty', '~> 0.17'
6
- gem 'nokogiri', '~> 1.12'
7
- gem 'rake', '~> 13.0'
5
+ gem 'httparty', '~> 0.24'
6
+ gem 'nokogiri', '~> 1.15'
7
+ gem 'rake', '~> 13.3'
8
8
  gem 'rake-release'
9
9
 
10
10
  group :development do
data/Gemfile.lock CHANGED
@@ -1,55 +1,64 @@
1
1
  GEM
2
2
  remote: https://rubygems.org/
3
3
  specs:
4
- diff-lcs (1.4.4)
4
+ csv (3.3.5)
5
+ diff-lcs (1.6.2)
5
6
  fakefs (0.20.1)
6
- httparty (0.18.1)
7
- mime-types (~> 3.0)
7
+ httparty (0.24.2)
8
+ csv
9
+ mini_mime (>= 1.0.0)
8
10
  multi_xml (>= 0.5.2)
9
- mime-types (3.3.1)
10
- mime-types-data (~> 3.2015)
11
- mime-types-data (3.2021.0225)
12
- mini_portile2 (2.6.1)
11
+ mini_mime (1.1.5)
13
12
  multi_xml (0.6.0)
14
- nokogiri (1.12.5)
15
- mini_portile2 (~> 2.6.1)
13
+ nokogiri (1.17.2-aarch64-linux)
16
14
  racc (~> 1.4)
17
- nokogiri (1.12.5-java)
15
+ nokogiri (1.17.2-arm-linux)
18
16
  racc (~> 1.4)
19
- racc (1.5.2)
20
- racc (1.5.2-java)
21
- rake (13.0.3)
22
- rake-release (1.3.0)
23
- bundler (>= 1.11, < 3)
17
+ nokogiri (1.17.2-arm64-darwin)
18
+ racc (~> 1.4)
19
+ nokogiri (1.17.2-x86-linux)
20
+ racc (~> 1.4)
21
+ nokogiri (1.17.2-x86_64-darwin)
22
+ racc (~> 1.4)
23
+ nokogiri (1.17.2-x86_64-linux)
24
+ racc (~> 1.4)
25
+ racc (1.8.1)
26
+ rake (13.3.1)
27
+ rake-release (1.4.0)
28
+ bundler (>= 1.11, < 5)
24
29
  rspec (3.10.0)
25
30
  rspec-core (~> 3.10.0)
26
31
  rspec-expectations (~> 3.10.0)
27
32
  rspec-mocks (~> 3.10.0)
28
- rspec-core (3.10.1)
33
+ rspec-core (3.10.2)
29
34
  rspec-support (~> 3.10.0)
30
- rspec-expectations (3.10.1)
35
+ rspec-expectations (3.10.2)
31
36
  diff-lcs (>= 1.2.0, < 2.0)
32
37
  rspec-support (~> 3.10.0)
33
- rspec-mocks (3.10.2)
38
+ rspec-mocks (3.10.3)
34
39
  diff-lcs (>= 1.2.0, < 2.0)
35
40
  rspec-support (~> 3.10.0)
36
- rspec-support (3.10.2)
41
+ rspec-support (3.10.3)
37
42
 
38
43
  PLATFORMS
39
- java
40
- ruby
44
+ aarch64-linux
45
+ arm-linux
46
+ arm64-darwin
47
+ x86-linux
48
+ x86_64-darwin
49
+ x86_64-linux
41
50
 
42
51
  DEPENDENCIES
43
52
  fakefs (~> 0.14)
44
- httparty (~> 0.17)
45
- nokogiri (~> 1.12)
46
- rake (~> 13.0)
53
+ httparty (~> 0.24)
54
+ nokogiri (~> 1.15)
55
+ rake (~> 13.3)
47
56
  rake-release
48
57
  rspec (~> 3.10.0)
49
58
  rspec-mocks (~> 3.10.0)
50
59
 
51
60
  RUBY VERSION
52
- ruby 2.7.0p0
61
+ ruby 3.2.10p266
53
62
 
54
63
  BUNDLED WITH
55
- 2.1.4
64
+ 2.5.23
data/README.org CHANGED
@@ -52,13 +52,13 @@ The version *must* be of the form =major.minor.patch-classifier=.
52
52
  The following options can be used to add specific files to the project:
53
53
 
54
54
  - =--docker= :: this creates a =Dockerfile= based on the Java 11 distroless base image. It assumes that the jar generated by the build can be executed using the =java -jar= command;
55
- - =--main=[Main class name] :: this creates a class with a =main= method that can be executed using the =java -jar= command. It also adds the =maven-shade-plugin= to the pom, with this class as the main class.
55
+ - =--main=[Main class name]= :: this creates a class with a =main= method that can be executed using the =java -jar= command. It also adds the =maven-shade-plugin= to the pom, with this class as the main class.
56
56
  - =--logger= :: this adds logging dependencies to the project. The jar added are defined as the =logging_deps= of the configuration file. The default are:
57
57
 
58
58
  #+begin_src
59
- logging_deps: [ "org.slf4j:slf4j-api:1.7.32:jar",
60
- "org.slf4j:slf4j-simple:1.7.32:jar",
61
- "ch.qos.logback:logback-core:1.2.6:jar" ]
59
+ logging_deps: [ "org.slf4j:slf4j-api:1.7.36:jar",
60
+ "org.slf4j:slf4j-simple:1.7.36:jar",
61
+ "ch.qos.logback:logback-core:1.2.11:jar" ]
62
62
  #+end_src
63
63
 
64
64
  *** WAR Project
@@ -98,4 +98,4 @@ You can search for dependencies in the Maven central repository with the command
98
98
 
99
99
  MIT License.
100
100
 
101
- © Copyright 2012–2021 — Sébastien Le Callonnec
101
+ © Copyright 2012–2026 — Sébastien Le Callonnec
data/conf/default.yml CHANGED
@@ -1,8 +1,8 @@
1
1
  group_id: com.example
2
2
  version: 0.0.1-SNAPSHOT
3
3
  type: jar
4
- dependencies: [ "org.junit.jupiter:junit-jupiter-engine:5.7.0:jar:test" ]
5
- plugins: [ ":maven-compiler-plugin:3.8.1" ]
6
- logging_deps: [ "org.slf4j:slf4j-api:1.7.32:jar",
7
- "org.slf4j:slf4j-simple:1.7.32:jar",
8
- "ch.qos.logback:logback-core:1.2.6:jar" ]
4
+ dependencies: [ "org.junit.jupiter:junit-jupiter-engine:5.8.2:jar:test" ]
5
+ plugins: [ ":maven-compiler-plugin:3.10.0" ]
6
+ logging_deps: [ "org.slf4j:slf4j-api:1.7.36:jar",
7
+ "org.slf4j:slf4j-simple:1.7.36:jar",
8
+ "ch.qos.logback:logback-core:1.2.11:jar" ]
@@ -5,7 +5,7 @@ module Mvnizer
5
5
 
6
6
  def run(options)
7
7
  raise Mvnizer::FileNotFoundError, "The pom.xml file cannot be found." unless pom_present?
8
-
8
+
9
9
  dependency = options[:name]
10
10
  content = add_dependency([dependency])
11
11
  File.open("pom.xml", "w") do |f|
@@ -15,7 +15,7 @@ module Mvnizer
15
15
 
16
16
  private
17
17
  def pom_present?
18
- File.exists?(File.join(Dir.pwd, "pom.xml"))
18
+ File.exist?(File.join(Dir.pwd, "pom.xml"))
19
19
  end
20
20
  end
21
21
  end
@@ -14,14 +14,14 @@ module Mvnizer
14
14
  end
15
15
 
16
16
  # generates the file +destination_file+ from template +template+
17
- # and object +binding+. +binding+ must be an ERB binding.
17
+ # and object +binding+. +binding+ must be an ERB binding.
18
18
  # +destination_file+ must be the aboslute location to the generated
19
19
  # file.
20
20
  # If the output folder in which the file gets generated does not exist,
21
21
  # it automatically gets created.
22
22
  def generate_file(template, destination_file, binding)
23
23
  dir = File.dirname(destination_file)
24
- create_dir(dir) unless File.exists?(dir)
24
+ create_dir(dir) unless File.exist?(dir)
25
25
 
26
26
  template = File.open(template, 'r').read
27
27
 
@@ -31,7 +31,7 @@ module Mvnizer
31
31
  end
32
32
 
33
33
  # adds a list of dependencies to the pom file whose location
34
- # can be given as +pom_location+. By default, this function
34
+ # can be given as +pom_location+. By default, this function
35
35
  # looks up the pom in the current directory.
36
36
  def add_dependency(dependency, pom_location = File.join(Dir.pwd, "pom.xml"))
37
37
  raise FileNotFoundError, "The pom.xml file cannot be found." unless File.exists?(pom_location)
@@ -58,7 +58,7 @@ module Mvnizer
58
58
  end
59
59
  end
60
60
 
61
- # Requires sparklemotion/nokogiri#772 to produce
61
+ # Requires sparklemotion/nokogiri#772 to produce
62
62
  # identical pom files in both MRI and JRuby.
63
63
  pom.to_xml(indent: 2)
64
64
  end
@@ -21,7 +21,7 @@
21
21
  <plugins>
22
22
  <plugin>
23
23
  <artifactId>maven-compiler-plugin</artifactId>
24
- <version>3.8.1</version>
24
+ <version>3.14.1</version>
25
25
  <configuration>
26
26
  <source>11</source>
27
27
  <target>11</target>
@@ -29,7 +29,7 @@
29
29
  </plugin><% if main %>
30
30
  <plugin>
31
31
  <artifactId>maven-shade-plugin</artifactId>
32
- <version>3.2.4</version>
32
+ <version>3.6.1</version>
33
33
  <executions>
34
34
  <execution>
35
35
  <phase>package</phase>
@@ -1,5 +1,5 @@
1
1
  module Mvnizer
2
2
  module Version
3
- STRING = '1.2.0'
3
+ STRING = '2.0.0'
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: mvnizer
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.2.0
4
+ version: 2.0.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Sébastien Le Callonnec
@@ -82,7 +82,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
82
82
  - !ruby/object:Gem::Version
83
83
  version: '0'
84
84
  requirements: []
85
- rubygems_version: 3.2.17
85
+ rubygems_version: 3.4.19
86
86
  signing_key:
87
87
  specification_version: 4
88
88
  summary: Bootstrap a Maven project without the pain of archetypes.