mvnizer 0.1.0 → 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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 04f1c873ac77ec591291d9e30075306e4ee90f91
4
- data.tar.gz: bdd0ea0e3c7aed7746be0ef861fa32e86151a88f
3
+ metadata.gz: 89d9f13ef2f7c26306f6dfa424c93f092351e141
4
+ data.tar.gz: 54b97237508d0ec3e2602073e2096deff844ff92
5
5
  SHA512:
6
- metadata.gz: 66bad6d055bfa3debfaa7efc9a63f137df9f21c71a1424445689ae747fdbe41f7da5596b7db1b15a044a879c21def21900323f292c73381f4a798b0f0e4ce51f
7
- data.tar.gz: 9da20ddce6e57db044a6cc9d678d7f3f0ed5e0cd67634b3d159bc627265af7ca922f4bdf0273a64ff71d861503bc0415629b21888954044f8247938d647f1383
6
+ metadata.gz: 62ab361d02b94f5486bb25e056b07b6805bac195801b802526a5b61e3bac87dc543cf8fb2431886ced003cfbd176c40aac65ed38dce0fb4df7da122d5a14fb17
7
+ data.tar.gz: 6aaa4f49692085f0e4b94887c7cbc9237d841d1f75fd165bda5e7f2c1d31127b43efc0650bad4c1423f001c31c29afb5a20fd8626404d9086de47ca410a716b2
data/Gemfile CHANGED
@@ -1,7 +1,7 @@
1
1
  source 'http://rubygems.org'
2
2
 
3
- gem 'httparty', '~> 0.9.0'
4
- gem 'nokogiri', '~> 1.6.6'
3
+ gem 'httparty', '>= 0.13.5'
4
+ gem 'nokogiri', '>= 1.6.6'
5
5
 
6
6
 
7
7
  group :development do
data/Gemfile.lock CHANGED
@@ -10,14 +10,14 @@ GEM
10
10
  builder (3.2.2)
11
11
  childprocess (0.5.6)
12
12
  ffi (~> 1.0, >= 1.0.11)
13
- cucumber (2.0.0)
13
+ cucumber (2.0.2)
14
14
  builder (>= 2.1.2)
15
- cucumber-core (~> 1.1.3)
15
+ cucumber-core (~> 1.2.0)
16
16
  diff-lcs (>= 1.1.3)
17
17
  gherkin (~> 2.12)
18
18
  multi_json (>= 1.7.5, < 2.0)
19
19
  multi_test (>= 0.1.2)
20
- cucumber-core (1.1.3)
20
+ cucumber-core (1.2.0)
21
21
  gherkin (~> 2.12.0)
22
22
  descendants_tracker (0.0.4)
23
23
  thread_safe (~> 0.3, >= 0.3.1)
@@ -41,10 +41,10 @@ GEM
41
41
  nokogiri (~> 1.6.3)
42
42
  oauth2
43
43
  hashie (3.4.2)
44
- highline (1.7.2)
45
- httparty (0.9.0)
46
- multi_json (~> 1.0)
47
- multi_xml
44
+ highline (1.7.3)
45
+ httparty (0.13.5)
46
+ json (~> 1.8)
47
+ multi_xml (>= 0.5.2)
48
48
  jeweler (2.0.1)
49
49
  builder
50
50
  bundler (>= 1.0)
@@ -54,6 +54,8 @@ GEM
54
54
  nokogiri (>= 1.5.10)
55
55
  rake
56
56
  rdoc
57
+ json (1.8.3)
58
+ json (1.8.3-java)
57
59
  jwt (1.5.1)
58
60
  mini_portile (0.6.2)
59
61
  multi_json (1.11.2)
@@ -90,11 +92,11 @@ PLATFORMS
90
92
  DEPENDENCIES
91
93
  aruba (~> 0.4.11)
92
94
  fakefs (~> 0.4.0)
93
- httparty (~> 0.9.0)
95
+ httparty (>= 0.13.5)
94
96
  jeweler (~> 2.0.1)
95
- nokogiri (~> 1.6.6)
97
+ nokogiri (>= 1.6.6)
96
98
  rspec (~> 2.11.0)
97
99
  rspec-mocks (~> 2.11.2)
98
100
 
99
101
  BUNDLED WITH
100
- 1.10.5
102
+ 1.10.6
@@ -8,6 +8,7 @@ Feature: Create a new Maven project
8
8
  Given a directory named "foo"
9
9
  When I run `mvnizer new com.weblogism:foonbar`
10
10
  Then the output should contain "success"
11
+ And a file named "foonbar/.gitignore" should exist
11
12
  And a file named "foonbar/pom.xml" should exist
12
13
  And "/project/groupId" in the xml file "foonbar/pom.xml" should be "com.weblogism"
13
14
  And "/project/artifactId" in the xml file "foonbar/pom.xml" should be "foonbar"
@@ -20,6 +21,7 @@ Feature: Create a new Maven project
20
21
  Given a directory named "foo"
21
22
  When I run `mvnizer new com.weblogism:foonbar:war`
22
23
  Then the output should contain "success"
24
+ And a file named "foonbar/.gitignore" should exist
23
25
  And a file named "foonbar/pom.xml" should exist
24
26
  And "/project/groupId" in the xml file "foonbar/pom.xml" should be "com.weblogism"
25
27
  And "/project/artifactId" in the xml file "foonbar/pom.xml" should be "foonbar"
@@ -27,11 +29,11 @@ Feature: Create a new Maven project
27
29
  And "/project/version" in the xml file "foonbar/pom.xml" should be "0.0.1-SNAPSHOT"
28
30
  And "/project/packaging" in the xml file "foonbar/pom.xml" should be "war"
29
31
  And a file named "foonbar/src/main/webapp/WEB-INF/web.xml" should exist
30
-
32
+
31
33
  Scenario: add the dependencies
32
34
  Given a directory named "foo"
33
35
  When I run `mvnizer new com.weblogism:foonbar`
34
36
  Then "/project/dependencies/dependency/groupId" in the xml file "foonbar/pom.xml" should be "junit"
35
37
  And "/project/dependencies/dependency/artifactId" in the xml file "foonbar/pom.xml" should be "junit"
36
- And "/project/dependencies/dependency/version" in the xml file "foonbar/pom.xml" should be "4.10"
38
+ And "/project/dependencies/dependency/version" in the xml file "foonbar/pom.xml" should be "4.12"
37
39
  And "/project/dependencies/dependency/scope" in the xml file "foonbar/pom.xml" should be "test"
@@ -7,8 +7,8 @@ Feature: Search for a Maven artefact
7
7
  Scenario: search for log4j
8
8
  When I run `mvnizer search log4j`
9
9
  Then the output should contain "log4j:log4j:"
10
- And the output should contain "ant:ant-apache-log4j"
10
+ And the output should contain "org.apache.logging.log4j:log4j"
11
11
 
12
12
  Scenario: message when no result
13
13
  When I run `mvnizer search ffffl`
14
- Then the output should contain "No result found"
14
+ Then the output should contain "No result found"
@@ -14,9 +14,14 @@ module Mvnizer
14
14
  coordinate_parser = CoordinateParser.new
15
15
  get_dependencies.each { |d| project.add_dependency(coordinate_parser.parse_scoped_coordinates(d)) }
16
16
 
17
- generate_file(File.join(TEMPLATE_DIR, 'pom.xml.erb'),
17
+ generate_file(File.join(TEMPLATE_DIR, "pom.xml.erb"),
18
18
  "#{project.artifact_id}/pom.xml",
19
19
  project)
20
+ generate_file(File.join(TEMPLATE_DIR, "gitignore.erb"),
21
+ "#{project.artifact_id}/.gitignore",
22
+ project)
23
+
24
+
20
25
  end
21
26
 
22
27
  # Returns the list of dependencies to be added for this type of project.
@@ -0,0 +1,18 @@
1
+ *.iws
2
+ *.ipr
3
+ *.iml
4
+ *~
5
+ .idea/
6
+ .settings
7
+ .project
8
+ .classpath
9
+
10
+ target/
11
+ tmp/
12
+
13
+ pom.xml.releaseBackup
14
+ release.properties
15
+ dependency-reduced-pom.xml
16
+
17
+ .DS_Store*
18
+ Thumbs.db
@@ -1,5 +1,5 @@
1
1
  module Mvnizer
2
2
  module Version
3
- STRING = '0.1.0'
3
+ STRING = '0.2.0'
4
4
  end
5
5
  end
data/mvnizer.gemspec CHANGED
@@ -2,20 +2,21 @@
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.1.0 ruby lib
5
+ # stub: mvnizer 0.2.0 ruby lib
6
6
 
7
7
  Gem::Specification.new do |s|
8
8
  s.name = "mvnizer"
9
- s.version = "0.1.0"
9
+ s.version = "0.2.0"
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 = ["S\u{e9}bastien Le Callonnec"]
14
- s.date = "2015-07-04"
14
+ s.date = "2015-08-02"
15
15
  s.description = "Bootstrap a Maven project without the pain of archetypes."
16
16
  s.email = "sebastien@weblogism.com"
17
17
  s.executables = ["mvnizer"]
18
18
  s.extra_rdoc_files = [
19
+ "CHANGELOG.md",
19
20
  "LICENSE.txt",
20
21
  "README.md"
21
22
  ]
@@ -49,6 +50,7 @@ Gem::Specification.new do |s|
49
50
  "lib/mvnizer/project.rb",
50
51
  "lib/mvnizer/task_helper.rb",
51
52
  "lib/mvnizer/templates/_dependency.xml.erb",
53
+ "lib/mvnizer/templates/gitignore.erb",
52
54
  "lib/mvnizer/templates/pom.xml.erb",
53
55
  "lib/mvnizer/templates/war/ExampleServlet.java.erb",
54
56
  "lib/mvnizer/templates/war/index.jsp.erb",
@@ -74,23 +76,23 @@ Gem::Specification.new do |s|
74
76
  ]
75
77
  s.homepage = "http://github.com/tychobrailleur/mvnizer"
76
78
  s.licenses = ["MIT"]
77
- s.rubygems_version = "2.4.6"
79
+ s.rubygems_version = "2.4.8"
78
80
  s.summary = "Bootstrap a Maven project without the pain of archetypes."
79
81
 
80
82
  if s.respond_to? :specification_version then
81
83
  s.specification_version = 4
82
84
 
83
85
  if Gem::Version.new(Gem::VERSION) >= Gem::Version.new('1.2.0') then
84
- s.add_runtime_dependency(%q<httparty>, ["~> 0.9.0"])
85
- s.add_runtime_dependency(%q<nokogiri>, ["~> 1.6.6"])
86
+ s.add_runtime_dependency(%q<httparty>, [">= 0.13.5"])
87
+ s.add_runtime_dependency(%q<nokogiri>, [">= 1.6.6"])
86
88
  s.add_development_dependency(%q<rspec>, ["~> 2.11.0"])
87
89
  s.add_development_dependency(%q<rspec-mocks>, ["~> 2.11.2"])
88
90
  s.add_development_dependency(%q<fakefs>, ["~> 0.4.0"])
89
91
  s.add_development_dependency(%q<jeweler>, ["~> 2.0.1"])
90
92
  s.add_development_dependency(%q<aruba>, ["~> 0.4.11"])
91
93
  else
92
- s.add_dependency(%q<httparty>, ["~> 0.9.0"])
93
- s.add_dependency(%q<nokogiri>, ["~> 1.6.6"])
94
+ s.add_dependency(%q<httparty>, [">= 0.13.5"])
95
+ s.add_dependency(%q<nokogiri>, [">= 1.6.6"])
94
96
  s.add_dependency(%q<rspec>, ["~> 2.11.0"])
95
97
  s.add_dependency(%q<rspec-mocks>, ["~> 2.11.2"])
96
98
  s.add_dependency(%q<fakefs>, ["~> 0.4.0"])
@@ -98,8 +100,8 @@ Gem::Specification.new do |s|
98
100
  s.add_dependency(%q<aruba>, ["~> 0.4.11"])
99
101
  end
100
102
  else
101
- s.add_dependency(%q<httparty>, ["~> 0.9.0"])
102
- s.add_dependency(%q<nokogiri>, ["~> 1.6.6"])
103
+ s.add_dependency(%q<httparty>, [">= 0.13.5"])
104
+ s.add_dependency(%q<nokogiri>, [">= 1.6.6"])
103
105
  s.add_dependency(%q<rspec>, ["~> 2.11.0"])
104
106
  s.add_dependency(%q<rspec-mocks>, ["~> 2.11.2"])
105
107
  s.add_dependency(%q<fakefs>, ["~> 0.4.0"])
@@ -9,7 +9,7 @@ module Mvnizer
9
9
  subject { Mvnizer::Command::NewProject.new }
10
10
 
11
11
  it "creates the project directory" do
12
- subject.should_receive(:generate_file)
12
+ subject.should_receive(:generate_file).twice
13
13
  subject.should_receive(:create_dir).with("foobar/src/main/java", "foobar/src/test/java")
14
14
 
15
15
  subject.run(project)
@@ -19,7 +19,7 @@ module Mvnizer
19
19
  subject.should_receive(:get_dependencies).and_return(["foo:bar:1.0:jar:test"])
20
20
  CoordinateParser.should_receive(:new).and_return(coordinate_parser)
21
21
  coordinate_parser.should_receive(:parse_scoped_coordinates).with("foo:bar:1.0:jar:test").and_return("Blah")
22
- subject.should_receive(:generate_file)
22
+ subject.should_receive(:generate_file).twice
23
23
  subject.should_receive(:create_dir)
24
24
 
25
25
  subject.run(project)
@@ -29,6 +29,7 @@ module Mvnizer
29
29
 
30
30
  it "generates the pom file" do
31
31
  subject.should_receive(:generate_file).with(File.join(TaskHelper::TEMPLATE_DIR, "pom.xml.erb"), "foobar/pom.xml", project)
32
+ subject.should_receive(:generate_file).with(File.join(TaskHelper::TEMPLATE_DIR, "gitignore.erb"), "foobar/.gitignore", project)
32
33
  subject.run(project)
33
34
  end
34
35
  end
metadata CHANGED
@@ -1,41 +1,41 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: mvnizer
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.2.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: 2015-07-04 00:00:00.000000000 Z
11
+ date: 2015-08-02 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: httparty
15
15
  requirement: !ruby/object:Gem::Requirement
16
16
  requirements:
17
- - - "~>"
17
+ - - ">="
18
18
  - !ruby/object:Gem::Version
19
- version: 0.9.0
19
+ version: 0.13.5
20
20
  type: :runtime
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
- - - "~>"
24
+ - - ">="
25
25
  - !ruby/object:Gem::Version
26
- version: 0.9.0
26
+ version: 0.13.5
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: nokogiri
29
29
  requirement: !ruby/object:Gem::Requirement
30
30
  requirements:
31
- - - "~>"
31
+ - - ">="
32
32
  - !ruby/object:Gem::Version
33
33
  version: 1.6.6
34
34
  type: :runtime
35
35
  prerelease: false
36
36
  version_requirements: !ruby/object:Gem::Requirement
37
37
  requirements:
38
- - - "~>"
38
+ - - ">="
39
39
  - !ruby/object:Gem::Version
40
40
  version: 1.6.6
41
41
  - !ruby/object:Gem::Dependency
@@ -114,6 +114,7 @@ executables:
114
114
  - mvnizer
115
115
  extensions: []
116
116
  extra_rdoc_files:
117
+ - CHANGELOG.md
117
118
  - LICENSE.txt
118
119
  - README.md
119
120
  files:
@@ -146,6 +147,7 @@ files:
146
147
  - lib/mvnizer/project.rb
147
148
  - lib/mvnizer/task_helper.rb
148
149
  - lib/mvnizer/templates/_dependency.xml.erb
150
+ - lib/mvnizer/templates/gitignore.erb
149
151
  - lib/mvnizer/templates/pom.xml.erb
150
152
  - lib/mvnizer/templates/war/ExampleServlet.java.erb
151
153
  - lib/mvnizer/templates/war/index.jsp.erb
@@ -188,7 +190,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
188
190
  version: '0'
189
191
  requirements: []
190
192
  rubyforge_project:
191
- rubygems_version: 2.4.6
193
+ rubygems_version: 2.4.8
192
194
  signing_key:
193
195
  specification_version: 4
194
196
  summary: Bootstrap a Maven project without the pain of archetypes.