maven-helper-script 0.1.6 → 0.2.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 ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA1:
3
+ metadata.gz: a26b6db1b94b9a474bf0c60744d35c471c6fde2b
4
+ data.tar.gz: 6c67546a38c714d6d0a92a41681f876a19f93762
5
+ SHA512:
6
+ metadata.gz: f16fba758a26bd495536564c8355d234a928f74cca4806931b4c8e842663f42e8112aa835ac43ee049ed2ad79cd27f0aae2d1199a05e9b2e91e9cc97267e3c0f
7
+ data.tar.gz: 4bf3f5780a2b6c94d51e1142d15ae4da23a0173faea759c3b85a9e58691c45ef25f076c021fad87553c9dbf7cc5f4af7a83118939b4c003c49109ea42897b130
data/.document CHANGED
@@ -1,4 +1,4 @@
1
- lib/**/*.rb
2
- bin/*
3
- LICENSE.txt
4
- README.rdoc
1
+ lib/**/*.rb
2
+ bin/*
3
+ LICENSE.txt
4
+ README.rdoc
data/Gemfile CHANGED
@@ -1,7 +1,7 @@
1
- source "http://rubygems.org"
2
-
3
- group :development do
4
- gem "rdoc", "~> 3.12"
5
- gem "jeweler", "~> 1.8.4"
6
- gem "rspec", "~> 2.11.0"
7
- end
1
+ source "http://rubygems.org"
2
+
3
+ group :development do
4
+ gem 'rdoc', '~> 4.2'
5
+ gem 'jeweler', '~> 2.0'
6
+ gem 'rspec', '~> 3.2'
7
+ end
data/Gemfile.lock CHANGED
@@ -1,30 +1,69 @@
1
1
  GEM
2
2
  remote: http://rubygems.org/
3
3
  specs:
4
- diff-lcs (1.1.3)
5
- git (1.2.5)
6
- jeweler (1.8.4)
7
- bundler (~> 1.0)
4
+ addressable (2.3.8)
5
+ builder (3.2.2)
6
+ descendants_tracker (0.0.4)
7
+ thread_safe (~> 0.3, >= 0.3.1)
8
+ diff-lcs (1.2.5)
9
+ faraday (0.9.1)
10
+ multipart-post (>= 1.2, < 3)
11
+ git (1.2.9.1)
12
+ github_api (0.12.3)
13
+ addressable (~> 2.3)
14
+ descendants_tracker (~> 0.0.4)
15
+ faraday (~> 0.8, < 0.10)
16
+ hashie (>= 3.3)
17
+ multi_json (>= 1.7.5, < 2.0)
18
+ nokogiri (~> 1.6.3)
19
+ oauth2
20
+ hashie (3.4.1)
21
+ highline (1.7.2)
22
+ jeweler (2.0.1)
23
+ builder
24
+ bundler (>= 1.0)
8
25
  git (>= 1.2.5)
26
+ github_api
27
+ highline (>= 1.6.15)
28
+ nokogiri (>= 1.5.10)
9
29
  rake
10
30
  rdoc
11
- json (1.7.3)
12
- rake (0.9.2.2)
13
- rdoc (3.12)
14
- json (~> 1.4)
15
- rspec (2.11.0)
16
- rspec-core (~> 2.11.0)
17
- rspec-expectations (~> 2.11.0)
18
- rspec-mocks (~> 2.11.0)
19
- rspec-core (2.11.1)
20
- rspec-expectations (2.11.2)
21
- diff-lcs (~> 1.1.3)
22
- rspec-mocks (2.11.2)
31
+ jwt (1.4.1)
32
+ mini_portile (0.6.2)
33
+ multi_json (1.11.0)
34
+ multi_xml (0.5.5)
35
+ multipart-post (2.0.0)
36
+ nokogiri (1.6.6.2)
37
+ mini_portile (~> 0.6.0)
38
+ oauth2 (1.0.0)
39
+ faraday (>= 0.8, < 0.10)
40
+ jwt (~> 1.0)
41
+ multi_json (~> 1.3)
42
+ multi_xml (~> 0.5)
43
+ rack (~> 1.2)
44
+ rack (1.6.0)
45
+ rake (10.4.2)
46
+ rdoc (4.2.0)
47
+ rspec (3.2.0)
48
+ rspec-core (~> 3.2.0)
49
+ rspec-expectations (~> 3.2.0)
50
+ rspec-mocks (~> 3.2.0)
51
+ rspec-core (3.2.3)
52
+ rspec-support (~> 3.2.0)
53
+ rspec-expectations (3.2.1)
54
+ diff-lcs (>= 1.2.0, < 2.0)
55
+ rspec-support (~> 3.2.0)
56
+ rspec-mocks (3.2.1)
57
+ diff-lcs (>= 1.2.0, < 2.0)
58
+ rspec-support (~> 3.2.0)
59
+ rspec-support (3.2.2)
60
+ thread_safe (0.3.5)
23
61
 
24
62
  PLATFORMS
63
+ ruby
25
64
  x86-mingw32
26
65
 
27
66
  DEPENDENCIES
28
- jeweler (~> 1.8.4)
29
- rdoc (~> 3.12)
30
- rspec (~> 2.11.0)
67
+ jeweler (~> 2.0)
68
+ rdoc (~> 4.2)
69
+ rspec (~> 3.2)
data/LICENSE.txt CHANGED
@@ -1,20 +1,20 @@
1
- Copyright (c) 2012 to the original authors
2
-
3
- Permission is hereby granted, free of charge, to any person obtaining
4
- a copy of this software and associated documentation files (the
5
- "Software"), to deal in the Software without restriction, including
6
- without limitation the rights to use, copy, modify, merge, publish,
7
- distribute, sublicense, and/or sell copies of the Software, and to
8
- permit persons to whom the Software is furnished to do so, subject to
9
- the following conditions:
10
-
11
- The above copyright notice and this permission notice shall be
12
- included in all copies or substantial portions of the Software.
13
-
14
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
15
- EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
16
- MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
17
- NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
18
- LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
19
- OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
20
- WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
1
+ Copyright (c) 2012 to the original authors
2
+
3
+ Permission is hereby granted, free of charge, to any person obtaining
4
+ a copy of this software and associated documentation files (the
5
+ "Software"), to deal in the Software without restriction, including
6
+ without limitation the rights to use, copy, modify, merge, publish,
7
+ distribute, sublicense, and/or sell copies of the Software, and to
8
+ permit persons to whom the Software is furnished to do so, subject to
9
+ the following conditions:
10
+
11
+ The above copyright notice and this permission notice shall be
12
+ included in all copies or substantial portions of the Software.
13
+
14
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
15
+ EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
16
+ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
17
+ NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
18
+ LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
19
+ OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
20
+ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.1.6
1
+ 0.2.0
data/bin/m CHANGED
@@ -1,5 +1,5 @@
1
- #!/usr/bin/env ruby
2
- $:.unshift File.join(File.dirname(__FILE__), '..', 'lib')
3
- require 'script_runner'
4
-
5
- MavenHelperScript::ScriptRunner.new().run(ARGV)
1
+ #!/usr/bin/env ruby
2
+ $:.unshift File.join(File.dirname(__FILE__), '..', 'lib')
3
+ require 'script_runner'
4
+
5
+ MavenHelperScript::ScriptRunner.new().run(ARGV)
@@ -1,41 +1,41 @@
1
- require "pathname"
2
-
3
- module MavenHelperScript
4
-
5
- class ProjectHomeFinder
6
- public
7
- def findProjectDirectory(file)
8
- @originalPath = Pathname.new(File.expand_path(file))
9
- @path = @originalPath
10
- found = false
11
-
12
- while !found
13
- found = foundProjectArtifacts(File.join(@path))
14
- if !found
15
- if !outOfDirectoriesToCheck @path
16
- @path = @path.parent
17
- else
18
- raise MavenHelperScript::MissingProjectFolderException.new
19
- end
20
- end
21
- end
22
-
23
- File.join(@path)
24
- end
25
-
26
- private
27
- def outOfDirectoriesToCheck(currentPath)
28
- currentPath == currentPath.parent
29
- end
30
-
31
- def foundProjectArtifacts(file)
32
- FileTest.exist?(File.join(file, 'm.yml')) && FileTest.exist?(File.join(file, 'pom.xml'))
33
- end
34
-
35
- end
36
-
37
- class MissingProjectFolderException < Exception
38
- end
39
-
40
-
1
+ require "pathname"
2
+
3
+ module MavenHelperScript
4
+
5
+ class ProjectHomeFinder
6
+ public
7
+ def findProjectDirectory(file)
8
+ @originalPath = Pathname.new(File.expand_path(file))
9
+ @path = @originalPath
10
+ found = false
11
+
12
+ while !found
13
+ found = foundProjectArtifacts(File.join(@path))
14
+ if !found
15
+ if !outOfDirectoriesToCheck @path
16
+ @path = @path.parent
17
+ else
18
+ raise MavenHelperScript::MissingProjectFolderException.new
19
+ end
20
+ end
21
+ end
22
+
23
+ File.join(@path)
24
+ end
25
+
26
+ private
27
+ def outOfDirectoriesToCheck(currentPath)
28
+ currentPath == currentPath.parent
29
+ end
30
+
31
+ def foundProjectArtifacts(file)
32
+ FileTest.exist?(File.join(file, 'm.yml')) && FileTest.exist?(File.join(file, 'pom.xml'))
33
+ end
34
+
35
+ end
36
+
37
+ class MissingProjectFolderException < Exception
38
+ end
39
+
40
+
41
41
  end
data/lib/script_runner.rb CHANGED
@@ -1,67 +1,67 @@
1
- require 'argument_parser'
2
- require 'project_home_finder'
3
-
4
- module MavenHelperScript
5
-
6
- class ScriptRunner
7
- LINE = "\n-------------------------------------------------------------------------------\n\n"
8
-
9
- def run(args)
10
- finder = MavenHelperScript::ProjectHomeFinder.new
11
-
12
- file = File.expand_path(".")
13
- projectFolder = finder.findProjectDirectory(file)
14
-
15
- parser = MavenHelperScript::ArgumentParser.new(projectFolder)
16
-
17
- commands = parser.parse(args)
18
-
19
- successful = true
20
- i = 0
21
-
22
- while successful && i < commands.length
23
- command = commands[i]
24
- puts LINE
25
- puts "#{command}"
26
- puts LINE
27
-
28
- successful = system command
29
- i += 1
30
- end
31
-
32
- if successful
33
- puts LINE
34
- puts "Successfully executed the following commands: "
35
- commands.each do |command|
36
- puts " - " << command
37
- end
38
- puts LINE
39
- else
40
- puts LINE
41
- puts "Failed executing command: " << command
42
- puts LINE
43
- end
44
-
45
- rescue MavenHelperScript::InvalidCommandException => e
46
- puts "Unable to process command: " << e.failedCommand
47
- puts "\nFound Commands: "
48
-
49
- e.commands.each do |key, value|
50
- puts "\t" << key << " : " << value
51
- end
52
-
53
- puts "\nUse valid combinations of the commands above."
54
-
55
- rescue MavenHelperScript::MissingProjectFolderException => e
56
- puts "Unable to locate project folder in this directory or any above it."
57
- puts "\nA valid project folder must contain:"
58
- puts "\tAn m.yml file."
59
- puts "\tA pom.xml file.\n"
60
- end
61
-
62
- end
63
-
64
- end
65
-
66
-
67
-
1
+ require 'argument_parser'
2
+ require 'project_home_finder'
3
+
4
+ module MavenHelperScript
5
+
6
+ class ScriptRunner
7
+ LINE = "\n-------------------------------------------------------------------------------\n\n"
8
+
9
+ def run(args)
10
+ finder = MavenHelperScript::ProjectHomeFinder.new
11
+
12
+ file = File.expand_path(".")
13
+ projectFolder = finder.findProjectDirectory(file)
14
+
15
+ parser = MavenHelperScript::ArgumentParser.new(projectFolder)
16
+
17
+ commands = parser.parse(args)
18
+
19
+ successful = true
20
+ i = 0
21
+
22
+ while successful && i < commands.length
23
+ command = commands[i]
24
+ puts LINE
25
+ puts "#{command}"
26
+ puts LINE
27
+
28
+ successful = system command
29
+ i += 1
30
+ end
31
+
32
+ if successful
33
+ puts LINE
34
+ puts "Successfully executed the following commands: "
35
+ commands.each do |command|
36
+ puts " - " << command
37
+ end
38
+ puts LINE
39
+ else
40
+ puts LINE
41
+ puts "Failed executing command: " << command
42
+ puts LINE
43
+ end
44
+
45
+ rescue MavenHelperScript::InvalidCommandException => e
46
+ puts "Unable to process command: " << e.failedCommand
47
+ puts "\nFound Commands: "
48
+
49
+ e.commands.each do |key, value|
50
+ puts "\t" << key << " : " << value
51
+ end
52
+
53
+ puts "\nUse valid combinations of the commands above."
54
+
55
+ rescue MavenHelperScript::MissingProjectFolderException => e
56
+ puts "Unable to locate project folder in this directory or any above it."
57
+ puts "\nA valid project folder must contain:"
58
+ puts "\tAn m.yml file."
59
+ puts "\tA pom.xml file.\n"
60
+ end
61
+
62
+ end
63
+
64
+ end
65
+
66
+
67
+
@@ -1,71 +1,72 @@
1
- # Generated by jeweler
2
- # DO NOT EDIT THIS FILE DIRECTLY
3
- # Instead, edit Jeweler::Tasks in rakefile, and run 'rake gemspec'
4
- # -*- encoding: utf-8 -*-
5
-
6
- Gem::Specification.new do |s|
7
- s.name = "maven-helper-script"
8
- s.version = "0.1.6"
9
-
10
- s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
- s.authors = ["benkiefer"]
12
- s.date = "2013-05-30"
13
- s.description = "Execute your complex maven commands faster with the shortened helper syntax. See the rdoc for more details and examples."
14
- s.email = "ben.a.kiefer@gmail.com"
15
- s.executables = ["m"]
16
- s.extra_rdoc_files = [
17
- "LICENSE.txt",
18
- "README.rdoc"
19
- ]
20
- s.files = [
21
- ".document",
22
- "Gemfile",
23
- "Gemfile.lock",
24
- "LICENSE.txt",
25
- "README.rdoc",
26
- "Rakefile",
27
- "VERSION",
28
- "bin/m",
29
- "lib/argument_parser.rb",
30
- "lib/configuration_checker.rb",
31
- "lib/invalid_command_exception.rb",
32
- "lib/project_home_finder.rb",
33
- "lib/script_runner.rb",
34
- "maven-helper-script.gemspec",
35
- "sample-mvn-project/m.yml",
36
- "sample-mvn-project/other/pom.xml",
37
- "sample-mvn-project/parent/pom.xml",
38
- "sample-mvn-project/pom.xml",
39
- "test/argument_parser_spec.rb",
40
- "test/configuration_checker_map_spec.rb",
41
- "test/configuration_checker_spec.rb",
42
- "test/invalid_command_exception_spec.rb",
43
- "test/m.yml",
44
- "test/map.yml",
45
- "test/project_home_finder_spec.rb",
46
- "travis.yml"
47
- ]
48
- s.homepage = "http://benkiefer.github.io/maven-helper-script"
49
- s.require_paths = ["lib"]
50
- s.rubygems_version = "1.8.24"
51
- s.summary = "Ruby gem to simplify maven command execution"
52
-
53
- if s.respond_to? :specification_version then
54
- s.specification_version = 3
55
-
56
- if Gem::Version.new(Gem::VERSION) >= Gem::Version.new('1.2.0') then
57
- s.add_development_dependency(%q<rdoc>, ["~> 3.12"])
58
- s.add_development_dependency(%q<jeweler>, ["~> 1.8.4"])
59
- s.add_development_dependency(%q<rspec>, ["~> 2.11.0"])
60
- else
61
- s.add_dependency(%q<rdoc>, ["~> 3.12"])
62
- s.add_dependency(%q<jeweler>, ["~> 1.8.4"])
63
- s.add_dependency(%q<rspec>, ["~> 2.11.0"])
64
- end
65
- else
66
- s.add_dependency(%q<rdoc>, ["~> 3.12"])
67
- s.add_dependency(%q<jeweler>, ["~> 1.8.4"])
68
- s.add_dependency(%q<rspec>, ["~> 2.11.0"])
69
- end
70
- end
71
-
1
+ # Generated by jeweler
2
+ # DO NOT EDIT THIS FILE DIRECTLY
3
+ # Instead, edit Jeweler::Tasks in Rakefile, and run 'rake gemspec'
4
+ # -*- encoding: utf-8 -*-
5
+ # stub: maven-helper-script 0.2.0 ruby lib
6
+
7
+ Gem::Specification.new do |s|
8
+ s.name = "maven-helper-script"
9
+ s.version = "0.2.0"
10
+
11
+ s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
12
+ s.require_paths = ["lib"]
13
+ s.authors = ["benkiefer"]
14
+ s.date = "2015-04-29"
15
+ s.description = "Execute your complex maven commands faster with the shortened helper syntax. See the rdoc for more details and examples."
16
+ s.email = "ben.a.kiefer@gmail.com"
17
+ s.executables = ["m"]
18
+ s.extra_rdoc_files = [
19
+ "LICENSE.txt",
20
+ "README.rdoc"
21
+ ]
22
+ s.files = [
23
+ ".document",
24
+ "Gemfile",
25
+ "Gemfile.lock",
26
+ "LICENSE.txt",
27
+ "README.rdoc",
28
+ "Rakefile",
29
+ "VERSION",
30
+ "bin/m",
31
+ "lib/argument_parser.rb",
32
+ "lib/configuration_checker.rb",
33
+ "lib/invalid_command_exception.rb",
34
+ "lib/project_home_finder.rb",
35
+ "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"
49
+ ]
50
+ s.homepage = "http://benkiefer.github.io/maven-helper-script"
51
+ s.rubygems_version = "2.4.6"
52
+ s.summary = "Ruby gem to simplify maven command execution"
53
+
54
+ if s.respond_to? :specification_version then
55
+ s.specification_version = 4
56
+
57
+ if Gem::Version.new(Gem::VERSION) >= Gem::Version.new('1.2.0') then
58
+ s.add_development_dependency(%q<rdoc>, ["~> 4.2"])
59
+ s.add_development_dependency(%q<jeweler>, ["~> 2.0"])
60
+ s.add_development_dependency(%q<rspec>, ["~> 3.2"])
61
+ else
62
+ s.add_dependency(%q<rdoc>, ["~> 4.2"])
63
+ s.add_dependency(%q<jeweler>, ["~> 2.0"])
64
+ s.add_dependency(%q<rspec>, ["~> 3.2"])
65
+ end
66
+ else
67
+ s.add_dependency(%q<rdoc>, ["~> 4.2"])
68
+ s.add_dependency(%q<jeweler>, ["~> 2.0"])
69
+ s.add_dependency(%q<rspec>, ["~> 3.2"])
70
+ end
71
+ end
72
+
@@ -12,40 +12,40 @@ describe MavenHelperScript::ArgumentParser do
12
12
  it "should convert command and module then append parent pom" do
13
13
  args = Array['ci', 'p']
14
14
  result = @parser.parse(args)
15
- result.length.should == 1
16
- result[0].should == 'mvn clean install -pl parent -f ' << @expectedPom << @expectedArgs
15
+ expect(result.length).to eq 1
16
+ expect(result[0]).to eq 'mvn clean install -pl parent -f ' << @expectedPom << @expectedArgs
17
17
  end
18
18
 
19
19
 
20
20
  it "should convert command, use given module, then append parent pom" do
21
21
  args = Array['ci', 'parent']
22
22
  result = @parser.parse(args)
23
- result.length.should == 1
24
- result[0].should == 'mvn clean install -pl parent -f ' << @expectedPom << @expectedArgs
23
+ expect(result.length).to eq 1
24
+ expect(result[0]).to eq 'mvn clean install -pl parent -f ' << @expectedPom << @expectedArgs
25
25
  end
26
26
 
27
27
  it "should convert command, module, append parent pom, and apply specialty arguments" do
28
28
  args = Array['ci', 'p', '-o']
29
29
  result = @parser.parse(args)
30
- result.length.should == 1
31
- result[0].should == 'mvn clean install -pl parent -f ' << @expectedPom << @expectedArgs << " -o"
30
+ expect(result.length).to eq 1
31
+ expect(result[0]).to eq 'mvn clean install -pl parent -f ' << @expectedPom << @expectedArgs << " -o"
32
32
  end
33
33
 
34
34
  it "should convert multiple arguments" do
35
35
  args = Array['ci', 'p', 'ci', 'p']
36
36
  result = @parser.parse(args)
37
- result.length.should == 2
38
- result[0].should == 'mvn clean install -pl parent -f ' << @expectedPom << @expectedArgs
39
- result[1].should == 'mvn clean install -pl parent -f ' << @expectedPom << @expectedArgs
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
40
  end
41
41
 
42
42
  it "should convert multiple arguments and append special commands" do
43
43
  args = Array['ci', 'p', 'ci', 'p', '-o', '-blah']
44
44
  result = @parser.parse(args)
45
- result.length.should == 2
45
+ expect(result.length).to eq 2
46
46
  expected = 'mvn clean install -pl parent -f ' << @expectedPom << @expectedArgs << " -o" << " -blah"
47
- result[0].should == expected
48
- result[1].should == expected
47
+ expect(result[0]).to eq expected
48
+ expect(result[1]).to eq expected
49
49
  end
50
50
 
51
51
 
@@ -8,15 +8,15 @@ describe MavenHelperScript::ConfigurationChecker do
8
8
  end
9
9
 
10
10
  it "should find module by mapping" do
11
- @checker.checkForModule("p").should == "parent"
11
+ expect(@checker.checkForModule("p")).to eq "parent"
12
12
  end
13
13
 
14
14
  it "should send back mapping name when no module found, assume that is the correct module name" do
15
- @checker.checkForModule("boo").should == "boo"
15
+ expect(@checker.checkForModule("boo")).to eq "boo"
16
16
  end
17
17
 
18
18
  it "should find command using first characters when not a plugin execution" do
19
- @checker.checkForCommand("ci").should == "clean install"
19
+ expect(@checker.checkForCommand("ci")).to eq "clean install"
20
20
  end
21
21
 
22
22
  it "should blow up if you can't find the other part of a command" do
@@ -24,7 +24,7 @@ describe MavenHelperScript::ConfigurationChecker do
24
24
  end
25
25
 
26
26
  it "should find plugin execution" do
27
- @checker.checkForCommand("jr").should == "jetty:run"
27
+ expect(@checker.checkForCommand("jr")).to eq "jetty:run"
28
28
  end
29
29
 
30
30
  it "should blow up when can't find command" do
@@ -33,7 +33,7 @@ describe MavenHelperScript::ConfigurationChecker do
33
33
 
34
34
  it "should return all command arguments" do
35
35
  args = Array['-ff', '-DskipTests']
36
- expect @checker.checkForArguments().should == args
36
+ expect(@checker.checkForArguments()).to eq args
37
37
  end
38
38
 
39
39
  end
@@ -8,19 +8,19 @@ describe MavenHelperScript::ConfigurationChecker do
8
8
  end
9
9
 
10
10
  it "should find module by mapping" do
11
- @checker.checkForModule("p").should == "parent"
11
+ expect(@checker.checkForModule("p")).to eq "parent"
12
12
  end
13
13
 
14
14
  it "should send back mapping name when no module found, assume that is the correct module name" do
15
- @checker.checkForModule("boo").should == "boo"
15
+ expect(@checker.checkForModule("boo")).to eq "boo"
16
16
  end
17
17
 
18
18
  it "should find command using first characters when not a plugin execution" do
19
- @checker.checkForCommand("ci").should == "clean install"
19
+ expect(@checker.checkForCommand("ci")).to eq "clean install"
20
20
  end
21
21
 
22
22
  it "should find plugin execution" do
23
- @checker.checkForCommand("jr").should == "jetty:run"
23
+ expect(@checker.checkForCommand("jr")).to eq "jetty:run"
24
24
  end
25
25
 
26
26
  it "should blow up when can't find command" do
@@ -29,7 +29,7 @@ describe MavenHelperScript::ConfigurationChecker do
29
29
 
30
30
  it "should return all command arguments" do
31
31
  args = Array['-ff', '-DskipTests']
32
- expect @checker.checkForArguments().should == args
32
+ expect(@checker.checkForArguments()).to eq args
33
33
  end
34
34
 
35
35
  end
@@ -9,8 +9,8 @@ describe MavenHelperScript::InvalidCommandException do
9
9
  end
10
10
 
11
11
  it "should print command mapping" do
12
- @error.commands.should == @commands
13
- @error.failedCommand.should == "boom"
12
+ expect(@error.commands).to eq @commands
13
+ expect(@error.failedCommand).to eq "boom"
14
14
  end
15
15
 
16
16
  end
@@ -1,23 +1,23 @@
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
- @finder.findProjectDirectory(File.join(@mvnProjectFolder, "other")).should == @mvnProjectFolder
12
- @finder.findProjectDirectory(File.join(@mvnProjectFolder, "parent")).should == @mvnProjectFolder
13
- end
14
-
15
- it "should find project folder from project folder" do
16
- @finder.findProjectDirectory(File.join(@mvnProjectFolder)).should == @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
-
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
23
  end
data/travis.yml CHANGED
@@ -1,4 +1,4 @@
1
- language: ruby
2
-
3
- rvm:
4
- - 1.9.3
1
+ language: ruby
2
+
3
+ rvm:
4
+ - 1.9.3
metadata CHANGED
@@ -1,64 +1,57 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: maven-helper-script
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.6
5
- prerelease:
4
+ version: 0.2.0
6
5
  platform: ruby
7
6
  authors:
8
7
  - benkiefer
9
8
  autorequire:
10
9
  bindir: bin
11
10
  cert_chain: []
12
- date: 2013-05-30 00:00:00.000000000 Z
11
+ date: 2015-04-29 00:00:00.000000000 Z
13
12
  dependencies:
14
13
  - !ruby/object:Gem::Dependency
15
14
  name: rdoc
16
15
  requirement: !ruby/object:Gem::Requirement
17
- none: false
18
16
  requirements:
19
- - - ~>
17
+ - - "~>"
20
18
  - !ruby/object:Gem::Version
21
- version: '3.12'
19
+ version: '4.2'
22
20
  type: :development
23
21
  prerelease: false
24
22
  version_requirements: !ruby/object:Gem::Requirement
25
- none: false
26
23
  requirements:
27
- - - ~>
24
+ - - "~>"
28
25
  - !ruby/object:Gem::Version
29
- version: '3.12'
26
+ version: '4.2'
30
27
  - !ruby/object:Gem::Dependency
31
28
  name: jeweler
32
29
  requirement: !ruby/object:Gem::Requirement
33
- none: false
34
30
  requirements:
35
- - - ~>
31
+ - - "~>"
36
32
  - !ruby/object:Gem::Version
37
- version: 1.8.4
33
+ version: '2.0'
38
34
  type: :development
39
35
  prerelease: false
40
36
  version_requirements: !ruby/object:Gem::Requirement
41
- none: false
42
37
  requirements:
43
- - - ~>
38
+ - - "~>"
44
39
  - !ruby/object:Gem::Version
45
- version: 1.8.4
40
+ version: '2.0'
46
41
  - !ruby/object:Gem::Dependency
47
42
  name: rspec
48
43
  requirement: !ruby/object:Gem::Requirement
49
- none: false
50
44
  requirements:
51
- - - ~>
45
+ - - "~>"
52
46
  - !ruby/object:Gem::Version
53
- version: 2.11.0
47
+ version: '3.2'
54
48
  type: :development
55
49
  prerelease: false
56
50
  version_requirements: !ruby/object:Gem::Requirement
57
- none: false
58
51
  requirements:
59
- - - ~>
52
+ - - "~>"
60
53
  - !ruby/object:Gem::Version
61
- version: 2.11.0
54
+ version: '3.2'
62
55
  description: Execute your complex maven commands faster with the shortened helper
63
56
  syntax. See the rdoc for more details and examples.
64
57
  email: ben.a.kiefer@gmail.com
@@ -69,7 +62,7 @@ extra_rdoc_files:
69
62
  - LICENSE.txt
70
63
  - README.rdoc
71
64
  files:
72
- - .document
65
+ - ".document"
73
66
  - Gemfile
74
67
  - Gemfile.lock
75
68
  - LICENSE.txt
@@ -97,29 +90,25 @@ files:
97
90
  - travis.yml
98
91
  homepage: http://benkiefer.github.io/maven-helper-script
99
92
  licenses: []
93
+ metadata: {}
100
94
  post_install_message:
101
95
  rdoc_options: []
102
96
  require_paths:
103
97
  - lib
104
98
  required_ruby_version: !ruby/object:Gem::Requirement
105
- none: false
106
99
  requirements:
107
- - - ! '>='
100
+ - - ">="
108
101
  - !ruby/object:Gem::Version
109
102
  version: '0'
110
- segments:
111
- - 0
112
- hash: -861051821
113
103
  required_rubygems_version: !ruby/object:Gem::Requirement
114
- none: false
115
104
  requirements:
116
- - - ! '>='
105
+ - - ">="
117
106
  - !ruby/object:Gem::Version
118
107
  version: '0'
119
108
  requirements: []
120
109
  rubyforge_project:
121
- rubygems_version: 1.8.24
110
+ rubygems_version: 2.4.6
122
111
  signing_key:
123
- specification_version: 3
112
+ specification_version: 4
124
113
  summary: Ruby gem to simplify maven command execution
125
114
  test_files: []