pigspec 0.0.2 → 0.0.3
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 +4 -4
- data/README.md +1 -1
- data/lib/pigspec/javabridge.rb +3 -1
- data/lib/pigspec/version.rb +1 -1
- data/lib/pigspec.rb +3 -2
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 9126e0915fc32cf772628e8dc83f21885a5a3bb6
|
4
|
+
data.tar.gz: 46aa89aa241e39078f2fa815489dd9c9ecd65b2e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e892a0f60982cfe14f3035bec20d1443fcde361961d711f6ab804e9ee84a4222bf80d31d0f3a29cd8e7589c1626bad4446b5d32509536c36c9707029e5a5e29c
|
7
|
+
data.tar.gz: be84544a92c2a194bd237b174df4d03223f22bd41ce1d526db7cd3c52188aea564330a0a0494f852bfeea18c2a507ee648a3895f398cc170abf73c83675822a7
|
data/README.md
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
# PigSpec
|
2
2
|
|
3
|
-
PigSpec is
|
3
|
+
PigSpec is an extention for rspec testing framework for Apache Pig.
|
4
4
|
This extention can execute pig script with customize input relation data, and can get output relation data in ruby easily.
|
5
5
|
|
6
6
|
|
data/lib/pigspec/javabridge.rb
CHANGED
@@ -61,7 +61,9 @@ module PigSpec
|
|
61
61
|
raw_schema = server.dumpSchema(alias_name)
|
62
62
|
builder = @string_builder_class.new
|
63
63
|
@schema_class.stringifySchema(builder, raw_schema, @data_type_enum.TUPLE)
|
64
|
-
builder.toString
|
64
|
+
str_schema = builder.toString
|
65
|
+
return nil if str_schema.split("\n").join('') == '()'
|
66
|
+
str_schema
|
65
67
|
end
|
66
68
|
|
67
69
|
def stringify(alias_values)
|
data/lib/pigspec/version.rb
CHANGED
data/lib/pigspec.rb
CHANGED
@@ -78,8 +78,9 @@ module PigSpec
|
|
78
78
|
Test.bridge.upload_text item[:value], temp
|
79
79
|
|
80
80
|
schema = Test.bridge.schema item[:name]
|
81
|
-
|
82
|
-
query
|
81
|
+
query = "#{item[:name]} = LOAD '#{temp}' USING PigStorage('\\t')"
|
82
|
+
query += " AS #{schema}" unless schema.nil?
|
83
|
+
query += ';'
|
83
84
|
test.override item[:name], query
|
84
85
|
end
|
85
86
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: pigspec
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- shiracha
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2015-07-02 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rjb
|
@@ -140,7 +140,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
140
140
|
version: '0'
|
141
141
|
requirements: []
|
142
142
|
rubyforge_project:
|
143
|
-
rubygems_version: 2.
|
143
|
+
rubygems_version: 2.4.6
|
144
144
|
signing_key:
|
145
145
|
specification_version: 4
|
146
146
|
summary: A Testing Framework extension for Apache Pig.
|