maven-helper-script 0.2.0 → 0.2.1

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: a26b6db1b94b9a474bf0c60744d35c471c6fde2b
4
- data.tar.gz: 6c67546a38c714d6d0a92a41681f876a19f93762
3
+ metadata.gz: 32e0eb8d94acdfc491bfe72d993c7728347808f7
4
+ data.tar.gz: b21c4d26dc61246561aff83e26dbc5358418243a
5
5
  SHA512:
6
- metadata.gz: f16fba758a26bd495536564c8355d234a928f74cca4806931b4c8e842663f42e8112aa835ac43ee049ed2ad79cd27f0aae2d1199a05e9b2e91e9cc97267e3c0f
7
- data.tar.gz: 4bf3f5780a2b6c94d51e1142d15ae4da23a0173faea759c3b85a9e58691c45ef25f076c021fad87553c9dbf7cc5f4af7a83118939b4c003c49109ea42897b130
6
+ metadata.gz: 1089ce43818f07268b4699ac4c5ef674262ff5c61a94abc88bc9c22cbc99f6522edcf87bfceb91c7418d4d0768982125e4c0b378de14f844ef9003f84f850c3f
7
+ data.tar.gz: cb17b31d1f076d310cd20fbb82693023d3e9121d00e1ab00da65e238a5e9e6462cca48e0a78d6ef522da4c62886f2e96306be2b527740cdde12042583414745f
data/Rakefile CHANGED
@@ -21,6 +21,11 @@ Jeweler::Tasks.new do |gem|
21
21
  gem.description = %Q{Execute your complex maven commands faster with the shortened helper syntax. See the rdoc for more details and examples.}
22
22
  gem.email = "ben.a.kiefer@gmail.com"
23
23
  gem.authors = ["benkiefer"]
24
+ gem.required_ruby_version = '~> 2.2'
25
+ gem.files.exclude 'test/**'
26
+ gem.files.exclude 'sample-mvn-project/**/**'
27
+ gem.files.exclude 'travis.yml'
28
+ gem.files.exclude '.document'
24
29
  end
25
30
 
26
31
  Jeweler::RubygemsDotOrgTasks.new
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.2.0
1
+ 0.2.1
@@ -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: maven-helper-script 0.2.0 ruby lib
5
+ # stub: maven-helper-script 0.2.1 ruby lib
6
6
 
7
7
  Gem::Specification.new do |s|
8
8
  s.name = "maven-helper-script"
9
- s.version = "0.2.0"
9
+ s.version = "0.2.1"
10
10
 
11
11
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
12
12
  s.require_paths = ["lib"]
13
13
  s.authors = ["benkiefer"]
14
- s.date = "2015-04-29"
14
+ s.date = "2015-04-30"
15
15
  s.description = "Execute your complex maven commands faster with the shortened helper syntax. See the rdoc for more details and examples."
16
16
  s.email = "ben.a.kiefer@gmail.com"
17
17
  s.executables = ["m"]
@@ -20,7 +20,6 @@ Gem::Specification.new do |s|
20
20
  "README.rdoc"
21
21
  ]
22
22
  s.files = [
23
- ".document",
24
23
  "Gemfile",
25
24
  "Gemfile.lock",
26
25
  "LICENSE.txt",
@@ -33,21 +32,10 @@ Gem::Specification.new do |s|
33
32
  "lib/invalid_command_exception.rb",
34
33
  "lib/project_home_finder.rb",
35
34
  "lib/script_runner.rb",
36
- "maven-helper-script.gemspec",
37
- "sample-mvn-project/m.yml",
38
- "sample-mvn-project/other/pom.xml",
39
- "sample-mvn-project/parent/pom.xml",
40
- "sample-mvn-project/pom.xml",
41
- "test/argument_parser_spec.rb",
42
- "test/configuration_checker_map_spec.rb",
43
- "test/configuration_checker_spec.rb",
44
- "test/invalid_command_exception_spec.rb",
45
- "test/m.yml",
46
- "test/map.yml",
47
- "test/project_home_finder_spec.rb",
48
- "travis.yml"
35
+ "maven-helper-script.gemspec"
49
36
  ]
50
37
  s.homepage = "http://benkiefer.github.io/maven-helper-script"
38
+ s.required_ruby_version = Gem::Requirement.new("~> 2.2")
51
39
  s.rubygems_version = "2.4.6"
52
40
  s.summary = "Ruby gem to simplify maven command execution"
53
41
 
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: maven-helper-script
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.0
4
+ version: 0.2.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - benkiefer
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-04-29 00:00:00.000000000 Z
11
+ date: 2015-04-30 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rdoc
@@ -62,7 +62,6 @@ extra_rdoc_files:
62
62
  - LICENSE.txt
63
63
  - README.rdoc
64
64
  files:
65
- - ".document"
66
65
  - Gemfile
67
66
  - Gemfile.lock
68
67
  - LICENSE.txt
@@ -76,18 +75,6 @@ files:
76
75
  - lib/project_home_finder.rb
77
76
  - lib/script_runner.rb
78
77
  - maven-helper-script.gemspec
79
- - sample-mvn-project/m.yml
80
- - sample-mvn-project/other/pom.xml
81
- - sample-mvn-project/parent/pom.xml
82
- - sample-mvn-project/pom.xml
83
- - test/argument_parser_spec.rb
84
- - test/configuration_checker_map_spec.rb
85
- - test/configuration_checker_spec.rb
86
- - test/invalid_command_exception_spec.rb
87
- - test/m.yml
88
- - test/map.yml
89
- - test/project_home_finder_spec.rb
90
- - travis.yml
91
78
  homepage: http://benkiefer.github.io/maven-helper-script
92
79
  licenses: []
93
80
  metadata: {}
@@ -97,9 +84,9 @@ require_paths:
97
84
  - lib
98
85
  required_ruby_version: !ruby/object:Gem::Requirement
99
86
  requirements:
100
- - - ">="
87
+ - - "~>"
101
88
  - !ruby/object:Gem::Version
102
- version: '0'
89
+ version: '2.2'
103
90
  required_rubygems_version: !ruby/object:Gem::Requirement
104
91
  requirements:
105
92
  - - ">="
data/.document DELETED
@@ -1,4 +0,0 @@
1
- lib/**/*.rb
2
- bin/*
3
- LICENSE.txt
4
- README.rdoc
@@ -1,17 +0,0 @@
1
- modules:
2
- p: parent
3
- par: parent
4
- o: other
5
-
6
- commands:
7
- - clean
8
- - package
9
- - test-compile
10
- - jetty:run
11
- - install
12
- - deploy
13
-
14
- arguments:
15
- - -ff
16
- - -DskipTests
17
-
@@ -1,17 +0,0 @@
1
- <?xml version="1.0" encoding="UTF-8"?>
2
- <project xmlns="http://maven.apache.org/POM/4.0.0"
3
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
4
- xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
5
-
6
- <parent>
7
- <artifactId>sample-maven-project-parent</artifactId>
8
- <groupId>org.burgers</groupId>
9
- <version>1.0-SNAPSHOT</version>
10
- <relativePath>../parent/pom.xml</relativePath>
11
- </parent>
12
- <modelVersion>4.0.0</modelVersion>
13
-
14
- <artifactId>sample-maven-project-other</artifactId>
15
- <packaging>pom</packaging>
16
-
17
- </project>
@@ -1,12 +0,0 @@
1
- <?xml version="1.0" encoding="UTF-8"?>
2
- <project xmlns="http://maven.apache.org/POM/4.0.0"
3
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
4
- xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
5
- <modelVersion>4.0.0</modelVersion>
6
-
7
- <groupId>org.burgers</groupId>
8
- <artifactId>sample-maven-project-parent</artifactId>
9
- <packaging>pom</packaging>
10
- <version>1.0-SNAPSHOT</version>
11
-
12
- </project>
@@ -1,17 +0,0 @@
1
- <?xml version="1.0" encoding="UTF-8"?>
2
- <project xmlns="http://maven.apache.org/POM/4.0.0"
3
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
4
- xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
5
- <modelVersion>4.0.0</modelVersion>
6
-
7
- <groupId>org.burgers</groupId>
8
- <artifactId>sample-maven-project</artifactId>
9
- <packaging>pom</packaging>
10
- <version>1.0-SNAPSHOT</version>
11
-
12
- <modules>
13
- <module>parent</module>
14
- <module>other </module>
15
- </modules>
16
-
17
- </project>
@@ -1,52 +0,0 @@
1
- $:.unshift File.join(File.dirname(__FILE__), '..', 'lib')
2
- require "argument_parser"
3
-
4
- describe MavenHelperScript::ArgumentParser do
5
- before(:each) do
6
- file = File.join(File.dirname(__FILE__))
7
- @expectedPom = File.join(file, "pom.xml")
8
- @parser = MavenHelperScript::ArgumentParser.new(file)
9
- @expectedArgs = ' -ff -DskipTests'
10
- end
11
-
12
- it "should convert command and module then append parent pom" do
13
- args = Array['ci', 'p']
14
- result = @parser.parse(args)
15
- expect(result.length).to eq 1
16
- expect(result[0]).to eq 'mvn clean install -pl parent -f ' << @expectedPom << @expectedArgs
17
- end
18
-
19
-
20
- it "should convert command, use given module, then append parent pom" do
21
- args = Array['ci', 'parent']
22
- result = @parser.parse(args)
23
- expect(result.length).to eq 1
24
- expect(result[0]).to eq 'mvn clean install -pl parent -f ' << @expectedPom << @expectedArgs
25
- end
26
-
27
- it "should convert command, module, append parent pom, and apply specialty arguments" do
28
- args = Array['ci', 'p', '-o']
29
- result = @parser.parse(args)
30
- expect(result.length).to eq 1
31
- expect(result[0]).to eq 'mvn clean install -pl parent -f ' << @expectedPom << @expectedArgs << " -o"
32
- end
33
-
34
- it "should convert multiple arguments" do
35
- args = Array['ci', 'p', 'ci', 'p']
36
- result = @parser.parse(args)
37
- expect(result.length).to eq 2
38
- expect(result[0]).to eq 'mvn clean install -pl parent -f ' << @expectedPom << @expectedArgs
39
- expect(result[1]).to eq 'mvn clean install -pl parent -f ' << @expectedPom << @expectedArgs
40
- end
41
-
42
- it "should convert multiple arguments and append special commands" do
43
- args = Array['ci', 'p', 'ci', 'p', '-o', '-blah']
44
- result = @parser.parse(args)
45
- expect(result.length).to eq 2
46
- expected = 'mvn clean install -pl parent -f ' << @expectedPom << @expectedArgs << " -o" << " -blah"
47
- expect(result[0]).to eq expected
48
- expect(result[1]).to eq expected
49
- end
50
-
51
-
52
- end
@@ -1,39 +0,0 @@
1
- $:.unshift File.join(File.dirname(__FILE__), '..', 'lib')
2
- require "configuration_checker"
3
- require "invalid_command_exception"
4
-
5
- describe MavenHelperScript::ConfigurationChecker do
6
- before(:each) do
7
- @checker = MavenHelperScript::ConfigurationChecker.new(File.join(File.dirname(__FILE__)), 'map.yml')
8
- end
9
-
10
- it "should find module by mapping" do
11
- expect(@checker.checkForModule("p")).to eq "parent"
12
- end
13
-
14
- it "should send back mapping name when no module found, assume that is the correct module name" do
15
- expect(@checker.checkForModule("boo")).to eq "boo"
16
- end
17
-
18
- it "should find command using first characters when not a plugin execution" do
19
- expect(@checker.checkForCommand("ci")).to eq "clean install"
20
- end
21
-
22
- it "should blow up if you can't find the other part of a command" do
23
- expect {@checker.checkForCommand("cj") }.to raise_error(MavenHelperScript::InvalidCommandException)
24
- end
25
-
26
- it "should find plugin execution" do
27
- expect(@checker.checkForCommand("jr")).to eq "jetty:run"
28
- end
29
-
30
- it "should blow up when can't find command" do
31
- expect {@checker.checkForCommand("j") }.to raise_error(MavenHelperScript::InvalidCommandException)
32
- end
33
-
34
- it "should return all command arguments" do
35
- args = Array['-ff', '-DskipTests']
36
- expect(@checker.checkForArguments()).to eq args
37
- end
38
-
39
- end
@@ -1,35 +0,0 @@
1
- $:.unshift File.join(File.dirname(__FILE__), '..', 'lib')
2
- require "configuration_checker"
3
- require "invalid_command_exception"
4
-
5
- describe MavenHelperScript::ConfigurationChecker do
6
- before(:each) do
7
- @checker = MavenHelperScript::ConfigurationChecker.new(File.join(File.dirname(__FILE__)), 'm.yml')
8
- end
9
-
10
- it "should find module by mapping" do
11
- expect(@checker.checkForModule("p")).to eq "parent"
12
- end
13
-
14
- it "should send back mapping name when no module found, assume that is the correct module name" do
15
- expect(@checker.checkForModule("boo")).to eq "boo"
16
- end
17
-
18
- it "should find command using first characters when not a plugin execution" do
19
- expect(@checker.checkForCommand("ci")).to eq "clean install"
20
- end
21
-
22
- it "should find plugin execution" do
23
- expect(@checker.checkForCommand("jr")).to eq "jetty:run"
24
- end
25
-
26
- it "should blow up when can't find command" do
27
- expect {@checker.checkForCommand("j") }.to raise_error(MavenHelperScript::InvalidCommandException)
28
- end
29
-
30
- it "should return all command arguments" do
31
- args = Array['-ff', '-DskipTests']
32
- expect(@checker.checkForArguments()).to eq args
33
- end
34
-
35
- end
@@ -1,16 +0,0 @@
1
- $:.unshift File.join(File.dirname(__FILE__), '..', 'lib')
2
- require "invalid_command_exception"
3
-
4
- describe MavenHelperScript::InvalidCommandException do
5
- before (:each) do
6
- @commands = Hash.new()
7
- @commands["m"] = "make"
8
- @error = MavenHelperScript::InvalidCommandException.new(@commands, "boom")
9
- end
10
-
11
- it "should print command mapping" do
12
- expect(@error.commands).to eq @commands
13
- expect(@error.failedCommand).to eq "boom"
14
- end
15
-
16
- end
data/test/m.yml DELETED
@@ -1,16 +0,0 @@
1
- modules:
2
- p: parent
3
- par: parent
4
-
5
- commands:
6
- - clean
7
- - package
8
- - test-compile
9
- - jetty:run
10
- - install
11
- - deploy
12
-
13
- arguments:
14
- - -ff
15
- - -DskipTests
16
-
data/test/map.yml DELETED
@@ -1,17 +0,0 @@
1
- modules:
2
- p: parent
3
- par: parent
4
-
5
- commands:
6
- c: clean
7
- p: package
8
- tc: test-compile
9
- jr: jetty:run
10
- i: install
11
- d: deploy
12
- ci: clean install
13
-
14
- arguments:
15
- - -ff
16
- - -DskipTests
17
-
@@ -1,23 +0,0 @@
1
- $:.unshift File.join(File.dirname(__FILE__), '..', 'lib')
2
- require "project_home_finder"
3
-
4
- describe MavenHelperScript::ProjectHomeFinder do
5
- before(:each) do
6
- @mvnProjectFolder = File.expand_path(File.join(File.dirname(__FILE__), "..", "sample-mvn-project"))
7
- @finder = MavenHelperScript::ProjectHomeFinder.new()
8
- end
9
-
10
- it "should find project folder from sub folder" do
11
- expect(@finder.findProjectDirectory(File.join(@mvnProjectFolder, "other"))).to eq @mvnProjectFolder
12
- expect(@finder.findProjectDirectory(File.join(@mvnProjectFolder, "parent"))).to eq @mvnProjectFolder
13
- end
14
-
15
- it "should find project folder from project folder" do
16
- expect(@finder.findProjectDirectory(File.join(@mvnProjectFolder))).to eq @mvnProjectFolder
17
- end
18
-
19
- it "should blow up when can't find project folder" do
20
- expect { @finder.findProjectDirectory(File.join(@mvnProjectFolder, "..")) }.to raise_error(MavenHelperScript::MissingProjectFolderException)
21
- end
22
-
23
- end
data/travis.yml DELETED
@@ -1,4 +0,0 @@
1
- language: ruby
2
-
3
- rvm:
4
- - 1.9.3