jbundler 0.0.1 → 0.2.0
Sign up to get free protection for your applications and to get access to all the features.
- data/Build.md +32 -0
- data/Gemfile +10 -0
- data/Gemfile.lock +35 -0
- data/Gemfile.lock- +33 -0
- data/Readme.md +88 -0
- data/lib/jbundler.jar +0 -0
- data/lib/jbundler.rb +25 -20
- data/lib/jbundler.rb~ +2 -0
- data/lib/jbundler/aether.rb +44 -15
- data/lib/jbundler/aether.rb~ +68 -0
- data/lib/jbundler/classpath_file.rb +2 -4
- data/lib/jbundler/classpath_file.rb~ +207 -0
- data/lib/jbundler/gemfile_lock.rb +4 -4
- data/lib/jbundler/gemfile_lock.rb~ +17 -0
- data/lib/jbundler/maven.rb~ +252 -0
- data/lib/jbundler/maven_gemify3.rb~ +337 -0
- data/lib/jbundler/{maven_util.rb → maven_util.rb~} +4 -14
- data/lib/jbundler/maven_version.rb~ +4 -0
- data/lib/jbundler/mavenfile.rb~ +9 -0
- data/lib/jbundler/pom.rb +2 -2
- data/lib/jbundler/pom.rb~ +251 -0
- data/spec/aether_spec.rb +78 -0
- data/spec/{mavenfile_spec.rb → aether_spec.rb~} +12 -14
- data/spec/classpath_file_spec.rb +26 -24
- data/spec/classpath_file_spec.rb~ +81 -0
- data/spec/{maven_util_spec.rb → maven_util_spec.rb~} +1 -12
- data/spec/mavenfile_spec.rb~ +40 -0
- data/spec/pom_spec.rb +2 -0
- data/spec/pom_spec.rb~ +40 -0
- data/spec/setup.rb +3 -0
- data/spec/setup.rb~ +3 -0
- metadata +82 -54
- data/lib/jbundler/mavenfile.rb +0 -77
data/spec/setup.rb
ADDED
data/spec/setup.rb~
ADDED
metadata
CHANGED
@@ -1,42 +1,46 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: jbundler
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
+
hash: 23
|
4
5
|
prerelease:
|
5
|
-
|
6
|
+
segments:
|
7
|
+
- 0
|
8
|
+
- 2
|
9
|
+
- 0
|
10
|
+
version: 0.2.0
|
6
11
|
platform: ruby
|
7
12
|
authors:
|
8
|
-
|
13
|
+
- Kristian Meier
|
9
14
|
autorequire:
|
10
15
|
bindir: bin
|
11
16
|
cert_chain: []
|
12
17
|
|
13
|
-
date: 2012-
|
18
|
+
date: 2012-06-14 00:00:00 Z
|
14
19
|
dependencies:
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
description: using embedded maven to add jar support to bundler and add bundler like handling of version ranges to maven
|
20
|
+
- !ruby/object:Gem::Dependency
|
21
|
+
name: ruby-maven
|
22
|
+
prerelease: false
|
23
|
+
requirement: &id001 !ruby/object:Gem::Requirement
|
24
|
+
none: false
|
25
|
+
requirements:
|
26
|
+
- - "="
|
27
|
+
- !ruby/object:Gem::Version
|
28
|
+
hash: 331
|
29
|
+
segments:
|
30
|
+
- 3
|
31
|
+
- 0
|
32
|
+
- 4
|
33
|
+
- 0
|
34
|
+
- 29
|
35
|
+
- 0
|
36
|
+
version: 3.0.4.0.29.0
|
37
|
+
type: :runtime
|
38
|
+
version_requirements: *id001
|
39
|
+
description: |
|
40
|
+
using embedded maven to add jar support to bundler and add bundler like handling of version ranges to maven
|
41
|
+
|
38
42
|
email:
|
39
|
-
|
43
|
+
- m.kristian@web.de
|
40
44
|
executables: []
|
41
45
|
|
42
46
|
extensions: []
|
@@ -44,48 +48,72 @@ extensions: []
|
|
44
48
|
extra_rdoc_files: []
|
45
49
|
|
46
50
|
files:
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
|
51
|
+
- lib/jbundler.rb
|
52
|
+
- lib/jbundler.rb~
|
53
|
+
- lib/jbundler/maven_gemify3.rb~
|
54
|
+
- lib/jbundler/pom.rb
|
55
|
+
- lib/jbundler/pom.rb~
|
56
|
+
- lib/jbundler/mavenfile.rb~
|
57
|
+
- lib/jbundler/maven_version.rb~
|
58
|
+
- lib/jbundler/classpath_file.rb
|
59
|
+
- lib/jbundler/aether.rb
|
60
|
+
- lib/jbundler/gemfile_lock.rb~
|
61
|
+
- lib/jbundler/gemfile_lock.rb
|
62
|
+
- lib/jbundler/classpath_file.rb~
|
63
|
+
- lib/jbundler/aether.rb~
|
64
|
+
- lib/jbundler/maven_util.rb~
|
65
|
+
- lib/jbundler/maven.rb~
|
66
|
+
- lib/jbundler.jar
|
67
|
+
- spec/maven_util_spec.rb~
|
68
|
+
- spec/mavenfile_spec.rb~
|
69
|
+
- spec/pom_spec.rb~
|
70
|
+
- spec/classpath_file_spec.rb~
|
71
|
+
- spec/aether_spec.rb~
|
72
|
+
- spec/classpath_file_spec.rb
|
73
|
+
- spec/setup.rb
|
74
|
+
- spec/pom_spec.rb
|
75
|
+
- spec/aether_spec.rb
|
76
|
+
- spec/setup.rb~
|
77
|
+
- MIT-LICENSE
|
78
|
+
- Build.md
|
79
|
+
- Readme.md
|
80
|
+
- Gemfile
|
81
|
+
- Gemfile.lock
|
82
|
+
- Gemfile.lock-
|
60
83
|
homepage:
|
61
|
-
licenses:
|
62
|
-
|
84
|
+
licenses: []
|
85
|
+
|
63
86
|
post_install_message:
|
64
87
|
rdoc_options: []
|
65
88
|
|
66
89
|
require_paths:
|
67
|
-
|
90
|
+
- lib
|
68
91
|
required_ruby_version: !ruby/object:Gem::Requirement
|
69
92
|
none: false
|
70
93
|
requirements:
|
71
|
-
|
72
|
-
|
73
|
-
|
94
|
+
- - ">="
|
95
|
+
- !ruby/object:Gem::Version
|
96
|
+
hash: 3
|
97
|
+
segments:
|
98
|
+
- 0
|
99
|
+
version: "0"
|
74
100
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
75
101
|
none: false
|
76
102
|
requirements:
|
77
|
-
|
78
|
-
|
79
|
-
|
103
|
+
- - ">="
|
104
|
+
- !ruby/object:Gem::Version
|
105
|
+
hash: 3
|
106
|
+
segments:
|
107
|
+
- 0
|
108
|
+
version: "0"
|
80
109
|
requirements: []
|
81
110
|
|
82
111
|
rubyforge_project:
|
83
|
-
rubygems_version: 1.8.
|
112
|
+
rubygems_version: 1.8.21
|
84
113
|
signing_key:
|
85
114
|
specification_version: 3
|
86
115
|
summary: bundler support for maven or/and maven support for bundler
|
87
116
|
test_files:
|
88
|
-
|
89
|
-
|
90
|
-
|
91
|
-
- spec/maven_util_spec.rb
|
117
|
+
- spec/classpath_file_spec.rb
|
118
|
+
- spec/pom_spec.rb
|
119
|
+
- spec/aether_spec.rb
|
data/lib/jbundler/mavenfile.rb
DELETED
@@ -1,77 +0,0 @@
|
|
1
|
-
require 'jbundler/maven_util'
|
2
|
-
module JBundler
|
3
|
-
|
4
|
-
class Mavenfile
|
5
|
-
include MavenUtil
|
6
|
-
|
7
|
-
def initialize(file = 'Mvnfile')
|
8
|
-
@file = file
|
9
|
-
@lockfile = file + ".lock"
|
10
|
-
end
|
11
|
-
|
12
|
-
def mtime
|
13
|
-
File.mtime(@file)
|
14
|
-
end
|
15
|
-
|
16
|
-
def exists?
|
17
|
-
File.exists?(@file)
|
18
|
-
end
|
19
|
-
|
20
|
-
def mtime_lock
|
21
|
-
File.mtime(@lockfile)
|
22
|
-
end
|
23
|
-
|
24
|
-
def exists_lock?
|
25
|
-
File.exists?(@lockfile)
|
26
|
-
end
|
27
|
-
|
28
|
-
def load_lockfile
|
29
|
-
_locked = []
|
30
|
-
if exists_lock?
|
31
|
-
File.read(@lockfile).each_line do |line|
|
32
|
-
line.strip!
|
33
|
-
if line.size > 0 && !(line =~ /^\s*#/)
|
34
|
-
_locked << line
|
35
|
-
end
|
36
|
-
end
|
37
|
-
end
|
38
|
-
_locked
|
39
|
-
end
|
40
|
-
|
41
|
-
def locked
|
42
|
-
@locked ||= load_lockfile
|
43
|
-
end
|
44
|
-
|
45
|
-
def locked?(coordinate)
|
46
|
-
coord = coordinate.sub(/^([^:]+:[^:]+):.+/) { $1 }
|
47
|
-
locked.detect { |l| l.sub(/^([^:]+:[^:]+):.+/) { $1 } == coord } != nil
|
48
|
-
end
|
49
|
-
|
50
|
-
def populate_unlocked(aether)
|
51
|
-
File.read(@file).each_line do |line|
|
52
|
-
if coord = to_coordinate(line)
|
53
|
-
unless locked?(coord)
|
54
|
-
aether.add_artifact(coord)
|
55
|
-
end
|
56
|
-
elsif line =~ /^\s*(repository|source)\s/
|
57
|
-
name, url = line.sub(/.*(repository|source)\s+/, '').gsub(/['":]/,'').split(/,/)
|
58
|
-
url = name unless url
|
59
|
-
aether.add_repository(name, url)
|
60
|
-
end
|
61
|
-
end
|
62
|
-
end
|
63
|
-
|
64
|
-
def populate_locked(aether)
|
65
|
-
locked.each { |l| aether.add_artifact(l) }
|
66
|
-
end
|
67
|
-
|
68
|
-
def generate_lockfile(dependency_coordinates)
|
69
|
-
File.open(@lockfile, 'w') do |f|
|
70
|
-
dependency_coordinates.each do |d|
|
71
|
-
f.puts d.to_s
|
72
|
-
end
|
73
|
-
end
|
74
|
-
end
|
75
|
-
end
|
76
|
-
|
77
|
-
end
|