jrmvnrunner 0.1 → 0.1.1

Sign up to get free protection for your applications and to get access to all the features.
data/README.md CHANGED
@@ -1,8 +1,11 @@
1
- # JRMVNRunner
1
+ # JrmvnRunner
2
2
 
3
3
  If you are looking for the easy way to run your JRuby application and to indicate the gem and jar dependencies in a
4
- single place, this library might be one of the acceptable options for you. Please take a look at the analogues first,
5
- like [JBundler](https://github.com/mkristian/jbundler) and [Doubleshot](https://github.com/sam/doubleshot).
4
+ single place, this library might be one of the acceptable options for you. Please take a look at the alternatives
5
+ first, like [JBundler](https://github.com/mkristian/jbundler) and [Doubleshot](https://github.com/sam/doubleshot).
6
+ Jrmvnrunner simply creates the temporary Gemfile and pom.xml for your project according to your setup and then
7
+ invokes bundle install and mvn install accordingly. This is a very simple and transparent approach to collect all the
8
+ required dependencies specified in a single file.
6
9
 
7
10
  ## Why?
8
11
 
@@ -36,10 +39,19 @@ end
36
39
  Then you can execute:
37
40
 
38
41
  ```
39
- jrmvnrun exec rake features
42
+ jrmvnrun exec cucumber
40
43
  ```
41
44
 
42
45
  This will execute a command with the full jar dependencies list in the classpath,
43
46
  so you can use them inside your ruby code.
44
47
 
45
- ## How to install
48
+ ## How to install
49
+
50
+ ```
51
+ jruby -S gem install jrmvnrunner
52
+ ```
53
+
54
+ ## Requirements
55
+
56
+ Jrmvnrunner requires JDK 1.6+, Maven 3+, Jruby 1.7+ installed. It will look at your PATH for mvn, jruby,
57
+ jgem and bundle executables.
@@ -27,7 +27,6 @@ module Jrmvnrunner
27
27
  ensure_bundle!
28
28
  write_pom!
29
29
  maven_build!
30
- remove_gem_and_pom!
31
30
 
32
31
  if @cmd
33
32
  # Generating command and exec...
@@ -38,7 +37,9 @@ module Jrmvnrunner
38
37
  else
39
38
  require 'java'
40
39
  ENV['BUNDLE_GEMFILE'] = gem_file
41
- require 'bundler/setup'
40
+ require 'bundler'
41
+ Bundler.definition.validate_ruby!
42
+ Bundler.load.setup_environment
42
43
  jar_files.each { |jf| require jf }
43
44
  end
44
45
  end
@@ -209,8 +210,9 @@ module Jrmvnrunner
209
210
  <artifactId>#{d[:artifact_id]}</artifactId>
210
211
  <version>#{d[:version]}</version>
211
212
  <type>#{d[:type]}</type>
213
+ #{ (d[:classifier]) ? "<classifier>#{d[:classifier]}</classifier>" : ""}
212
214
  </dependency>
213
- ]
215
+ ]
214
216
  end.join("\n")
215
217
  }
216
218
  </dependencies>
data/lib/jrmvnrunner.rb CHANGED
@@ -1,7 +1,7 @@
1
1
  require 'pathname'
2
2
 
3
3
  module Jrmvnrunner
4
- VERSION=0.1
4
+ VERSION="0.1.1"
5
5
  MYDIR = Pathname.new(File.dirname(File.expand_path(__FILE__)))
6
6
  autoload :Runner, MYDIR.join('jrmvnrunner/runner')
7
7
  autoload :Dsl, MYDIR.join('jrmvnrunner/dsl')
metadata CHANGED
@@ -2,7 +2,7 @@
2
2
  name: jrmvnrunner
3
3
  version: !ruby/object:Gem::Version
4
4
  prerelease:
5
- version: '0.1'
5
+ version: 0.1.1
6
6
  platform: ruby
7
7
  authors:
8
8
  - Ilya Sadykov