etom 0.0.10 → 0.0.11
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.
- data/lib/etom/reference.rb +4 -3
- data/lib/etom/version.rb +1 -1
- data/spec/data/com.google.collect.source_1.0.0.v201105210816.jar +0 -0
- data/spec/data/com.google.collect_1.0.0.v201105210816.jar +0 -0
- data/spec/etom_spec.rb +2 -6
- data/spec/hasher_spec.rb +3 -3
- data/spec/property_reader_spec.rb +1 -0
- metadata +7 -7
data/lib/etom/reference.rb
CHANGED
@@ -1,4 +1,6 @@
|
|
1
1
|
require "zip/zip"
|
2
|
+
require "fileutils"
|
3
|
+
|
2
4
|
require "etom/property_reader"
|
3
5
|
|
4
6
|
module Etom
|
@@ -97,7 +99,6 @@ eos
|
|
97
99
|
end
|
98
100
|
|
99
101
|
def to_artifact(local_repo, short = false)
|
100
|
-
require "ftools"
|
101
102
|
|
102
103
|
# select version
|
103
104
|
selected_version = version
|
@@ -107,7 +108,7 @@ eos
|
|
107
108
|
|
108
109
|
# create path
|
109
110
|
maven_path = File.join("#{local_repo}",group_id.split("."),artifact_id,selected_version)
|
110
|
-
|
111
|
+
FileUtils.makedirs(maven_path)
|
111
112
|
|
112
113
|
# copy jar
|
113
114
|
if(source?)
|
@@ -115,7 +116,7 @@ eos
|
|
115
116
|
else
|
116
117
|
maven_artifact_path = "#{maven_path}/#{artifact_id}-#{selected_version}.jar"
|
117
118
|
end
|
118
|
-
|
119
|
+
FileUtils.cp(file,maven_artifact_path)
|
119
120
|
|
120
121
|
# create pom
|
121
122
|
if(binary?)
|
data/lib/etom/version.rb
CHANGED
Binary file
|
Binary file
|
data/spec/etom_spec.rb
CHANGED
@@ -1,5 +1,7 @@
|
|
1
1
|
require "etom/reference"
|
2
2
|
|
3
|
+
require "tmpdir"
|
4
|
+
|
3
5
|
describe Etom::Reference do
|
4
6
|
|
5
7
|
FILE_REF = "#{File.dirname(__FILE__)}/data/com.google.collect_1.0.0.v201105210816.jar"
|
@@ -44,8 +46,6 @@ describe Etom::Reference do
|
|
44
46
|
it "should create maven artifact with full version" do
|
45
47
|
ref = Etom::Reference.new(FILE_REF)
|
46
48
|
|
47
|
-
require "tmpdir"
|
48
|
-
|
49
49
|
Dir.mktmpdir("repo") do |repo|
|
50
50
|
ref.to_artifact(repo)
|
51
51
|
|
@@ -59,8 +59,6 @@ describe Etom::Reference do
|
|
59
59
|
it "should create maven artifact with short version" do
|
60
60
|
ref = Etom::Reference.new(FILE_REF)
|
61
61
|
|
62
|
-
require "tmpdir"
|
63
|
-
|
64
62
|
Dir.mktmpdir("repo") do |repo|
|
65
63
|
ref.to_artifact(repo, true)
|
66
64
|
|
@@ -74,8 +72,6 @@ describe Etom::Reference do
|
|
74
72
|
it "should create maven artifact for source without pom file with short version" do
|
75
73
|
ref = Etom::Reference.new(SOURCE_FILE_REF)
|
76
74
|
|
77
|
-
require "tmpdir"
|
78
|
-
|
79
75
|
Dir.mktmpdir("repo") do |repo|
|
80
76
|
ref.to_artifact(repo, true)
|
81
77
|
|
data/spec/hasher_spec.rb
CHANGED
@@ -1,5 +1,7 @@
|
|
1
1
|
require "rspec"
|
2
|
-
|
2
|
+
|
3
|
+
require "fileutils"
|
4
|
+
require "tmpdir"
|
3
5
|
|
4
6
|
require "etom/hasher"
|
5
7
|
|
@@ -7,8 +9,6 @@ describe "Etom::Hash" do
|
|
7
9
|
|
8
10
|
it "should create hashes for a file" do
|
9
11
|
|
10
|
-
require "tmpdir"
|
11
|
-
|
12
12
|
Dir.mktmpdir("test") do |dir|
|
13
13
|
#file = "#{dir}/com.google.collect_1.0.0.v201105210816.jar"
|
14
14
|
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: etom
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.11
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -13,7 +13,7 @@ date: 2011-09-09 00:00:00.000000000Z
|
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: thor
|
16
|
-
requirement: &
|
16
|
+
requirement: &25447128 !ruby/object:Gem::Requirement
|
17
17
|
none: false
|
18
18
|
requirements:
|
19
19
|
- - ! '>='
|
@@ -21,10 +21,10 @@ dependencies:
|
|
21
21
|
version: '0'
|
22
22
|
type: :runtime
|
23
23
|
prerelease: false
|
24
|
-
version_requirements: *
|
24
|
+
version_requirements: *25447128
|
25
25
|
- !ruby/object:Gem::Dependency
|
26
26
|
name: rubyzip
|
27
|
-
requirement: &
|
27
|
+
requirement: &25446576 !ruby/object:Gem::Requirement
|
28
28
|
none: false
|
29
29
|
requirements:
|
30
30
|
- - ! '>='
|
@@ -32,10 +32,10 @@ dependencies:
|
|
32
32
|
version: '0'
|
33
33
|
type: :runtime
|
34
34
|
prerelease: false
|
35
|
-
version_requirements: *
|
35
|
+
version_requirements: *25446576
|
36
36
|
- !ruby/object:Gem::Dependency
|
37
37
|
name: rspec
|
38
|
-
requirement: &
|
38
|
+
requirement: &25446072 !ruby/object:Gem::Requirement
|
39
39
|
none: false
|
40
40
|
requirements:
|
41
41
|
- - ! '>='
|
@@ -43,7 +43,7 @@ dependencies:
|
|
43
43
|
version: '0'
|
44
44
|
type: :development
|
45
45
|
prerelease: false
|
46
|
-
version_requirements: *
|
46
|
+
version_requirements: *25446072
|
47
47
|
description: ! 'Uses fast operations without relying onto maven to convert eclipse
|
48
48
|
plugins to maven artifacts witin a local maven repository. '
|
49
49
|
email:
|