hydrogen 0.0.1.pre.alpha.1
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 +7 -0
- data/.gitignore +34 -0
- data/.travis.yml +14 -0
- data/CONTRIBUTING.md +33 -0
- data/Gemfile +5 -0
- data/LICENSE +22 -0
- data/README.md +36 -0
- data/Rakefile +32 -0
- data/hydrogen.gemspec +26 -0
- data/lib/hydrogen.rb +10 -0
- data/lib/hydrogen/aws/table_object.rb +18 -0
- data/lib/hydrogen/model.rb +20 -0
- data/lib/hydrogen/table_object.rb +11 -0
- data/lib/hydrogen/table_object/base.rb +24 -0
- data/lib/hydrogen/table_object/collection.rb +40 -0
- data/lib/hydrogen/table_object/part.rb +19 -0
- data/lib/hydrogen/table_object/part/sequence.rb +46 -0
- data/lib/hydrogen/version.rb +3 -0
- data/test/integration/hydrogen_test.rb +30 -0
- data/test/integration/test_helper.rb +14 -0
- data/test/unit/hydrogen/table_object/base_test.rb +32 -0
- data/test/unit/hydrogen/table_object/part/sequence_test.rb +22 -0
- data/test/unit/hydrogen/table_object/part_test.rb +31 -0
- data/test/unit/hydrogen/table_object_test.rb +15 -0
- data/test/unit/test_helper.rb +17 -0
- metadata +145 -0
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA1:
|
3
|
+
metadata.gz: e83ee62c3466aeb5e29e83d7b94ccb2ff22a433c
|
4
|
+
data.tar.gz: a7f8bd4b6f0a1b81bb051f0906cac0e7df959434
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: 3b3c2665434e1a82fa4875057c5262d8a171a1248b14130ebee3881e27e26a81163e3cb83fdb392b3789692691540887fc5b8d88dde105a7f5da67df2d6951e0
|
7
|
+
data.tar.gz: edc468f7b263b766fce594625b4649e86723ec197e5be8575224c84e495eed79c009a5d50cd4a277faf22d92c7fb8728671ed20248ea469f7f3a133dde677553
|
data/.gitignore
ADDED
@@ -0,0 +1,34 @@
|
|
1
|
+
*.gem
|
2
|
+
*.rbc
|
3
|
+
/.config
|
4
|
+
/coverage/
|
5
|
+
/InstalledFiles
|
6
|
+
/pkg/
|
7
|
+
/spec/reports/
|
8
|
+
/test/tmp/
|
9
|
+
/test/version_tmp/
|
10
|
+
/tmp/
|
11
|
+
|
12
|
+
## Specific to RubyMotion:
|
13
|
+
.dat*
|
14
|
+
.repl_history
|
15
|
+
build/
|
16
|
+
|
17
|
+
## Documentation cache and generated files:
|
18
|
+
/.yardoc/
|
19
|
+
/_yardoc/
|
20
|
+
/doc/
|
21
|
+
/rdoc/
|
22
|
+
|
23
|
+
## Environment normalisation:
|
24
|
+
/.bundle/
|
25
|
+
/lib/bundler/man/
|
26
|
+
|
27
|
+
# for a library or gem, you might want to ignore these files since the code is
|
28
|
+
# intended to run in multiple environments; otherwise, check them in:
|
29
|
+
Gemfile.lock
|
30
|
+
.ruby-version
|
31
|
+
.ruby-gemset
|
32
|
+
|
33
|
+
# unless supporting rvm < 1.11.0 or doing something fancy, ignore this:
|
34
|
+
.rvmrc
|
data/.travis.yml
ADDED
data/CONTRIBUTING.md
ADDED
@@ -0,0 +1,33 @@
|
|
1
|
+
Contributing to Hydrogen
|
2
|
+
========================
|
3
|
+
|
4
|
+
First of all, thanks for your interest in contributing to Hydrogen!
|
5
|
+
|
6
|
+
Below are a list of guidelines to help keep this project sane in the face of open source entropy.
|
7
|
+
|
8
|
+
How To Submit A Patch
|
9
|
+
---------------------
|
10
|
+
|
11
|
+
Any patch you feel would make this a better project is welcome, including but not limited to: bug fixes, new features, refactoring, and better documentation.
|
12
|
+
|
13
|
+
Make a fork of this project, and hack to your heart's content. Once you have something you think would be great to include into master, feel free to open a pull request. Please keep in mind the following guidelines, which will make it more likely for your pull request to be accepted:
|
14
|
+
|
15
|
+
1. Please have test cases, both in the unit suite and the integration suite, that fail when your code is not present.
|
16
|
+
1. Please open a topic branch in your fork, and create your pull request against that.
|
17
|
+
* Use a separate topic for each feature and/or bug fix you want to submit.
|
18
|
+
1. Be logically consistent in your commits. Make them as small as possible, so they can tell a story the maintainer can understand.
|
19
|
+
1. Keeping a consistent style in the codebase is important for maintainability. When possible, please stick to the guidelines within [this guide](https://github.com/bbatsov/ruby-style-guide).
|
20
|
+
1. Pay attention to things like code climate and test coverage. A drop in these metrics will not necessarily preclude a patch from being accepted, but we'd much prefer to keep these numbers high.
|
21
|
+
|
22
|
+
Please keep in mind your contributions will be licensed the same as the rest of Hydrogen, under the MIT license.
|
23
|
+
|
24
|
+
It may take the developer a day or two to get to your pull request. If your request has not been responded to in a few days, though, feel free to ping the developer team, preferably through a comment on the pull.
|
25
|
+
|
26
|
+
How To Report An Issue
|
27
|
+
----------------------
|
28
|
+
|
29
|
+
Issue reports are welcome, even if not accompanied by a pull request. Keep in mind that submitting a pull request will mean your issue likely gets resolved sooner, because less work will be left to do.
|
30
|
+
|
31
|
+
The most important thing an issue can do is get a developer as close as possible to seeing what you are seeing, in the case of a bug report. In the case of a feature request, you want to get them to the point where they don't see what you want to see, so they can make a decision about whether and how to include the proposed feature.
|
32
|
+
|
33
|
+
More about good bug reports [here](http://www.chiark.greenend.org.uk/~sgtatham/bugs.html).
|
data/Gemfile
ADDED
data/LICENSE
ADDED
@@ -0,0 +1,22 @@
|
|
1
|
+
Copyright (c) 2014 Ed Carrel
|
2
|
+
|
3
|
+
MIT License
|
4
|
+
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining
|
6
|
+
a copy of this software and associated documentation files (the
|
7
|
+
"Software"), to deal in the Software without restriction, including
|
8
|
+
without limitation the rights to use, copy, modify, merge, publish,
|
9
|
+
distribute, sublicense, and/or sell copies of the Software, and to
|
10
|
+
permit persons to whom the Software is furnished to do so, subject to
|
11
|
+
the following conditions:
|
12
|
+
|
13
|
+
The above copyright notice and this permission notice shall be
|
14
|
+
included in all copies or substantial portions of the Software.
|
15
|
+
|
16
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
17
|
+
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
18
|
+
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
19
|
+
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
20
|
+
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
21
|
+
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
22
|
+
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
data/README.md
ADDED
@@ -0,0 +1,36 @@
|
|
1
|
+
# Hydrogen
|
2
|
+
|
3
|
+
|
4
|
+
|
5
|
+
## Installation
|
6
|
+
|
7
|
+
Add this line to your application's Gemfile:
|
8
|
+
|
9
|
+
```ruby
|
10
|
+
gem 'hydrogen'
|
11
|
+
```
|
12
|
+
|
13
|
+
And then execute:
|
14
|
+
|
15
|
+
$ bundle
|
16
|
+
|
17
|
+
Or install it yourself as:
|
18
|
+
|
19
|
+
$ gem install hydrogen
|
20
|
+
|
21
|
+
API Documentation
|
22
|
+
-------------
|
23
|
+
|
24
|
+
See [RubyDoc](http://rubydoc.info/github/azanar/hydrogen/index)
|
25
|
+
|
26
|
+
Contributors
|
27
|
+
------------
|
28
|
+
|
29
|
+
See [Contributing](CONTRIBUTING.md) for details.
|
30
|
+
|
31
|
+
License
|
32
|
+
-------
|
33
|
+
|
34
|
+
©2014 Ed Carrel. Released under the MIT License.
|
35
|
+
|
36
|
+
See [License](LICENSE) for details.
|
data/Rakefile
ADDED
@@ -0,0 +1,32 @@
|
|
1
|
+
require "bundler/gem_tasks"
|
2
|
+
|
3
|
+
require 'coveralls/rake/task'
|
4
|
+
|
5
|
+
require 'rake/testtask'
|
6
|
+
|
7
|
+
task :test do
|
8
|
+
Rake::Task['test:unit'].invoke
|
9
|
+
Rake::Task['test:integration'].invoke
|
10
|
+
end
|
11
|
+
|
12
|
+
namespace :test do
|
13
|
+
Rake::TestTask.new("integration") do |t|
|
14
|
+
t.libs << "test"
|
15
|
+
t.libs << "config"
|
16
|
+
t.test_files = FileList['test/integration/**/*_test.rb']
|
17
|
+
t.verbose = true
|
18
|
+
end
|
19
|
+
|
20
|
+
Rake::TestTask.new("unit") do |t|
|
21
|
+
t.libs << "test"
|
22
|
+
t.libs << "config"
|
23
|
+
t.test_files = FileList['test/unit/**/*_test.rb']
|
24
|
+
t.verbose = true
|
25
|
+
end
|
26
|
+
end
|
27
|
+
|
28
|
+
Coveralls::RakeTask.new
|
29
|
+
|
30
|
+
task :test_with_coveralls => ['test:unit', 'test:integration', 'coveralls:push']
|
31
|
+
|
32
|
+
task :default => :test_with_coveralls
|
data/hydrogen.gemspec
ADDED
@@ -0,0 +1,26 @@
|
|
1
|
+
# coding: utf-8
|
2
|
+
lib = File.expand_path('../lib', __FILE__)
|
3
|
+
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
4
|
+
require 'hydrogen/version'
|
5
|
+
|
6
|
+
Gem::Specification.new do |spec|
|
7
|
+
spec.name = "hydrogen"
|
8
|
+
spec.version = Hydrogen::VERSION
|
9
|
+
spec.authors = ["Ed Carrel"]
|
10
|
+
spec.email = ["edward@carrel.org"]
|
11
|
+
spec.summary = %q{Common elements to the Quasar toolchain of gems}
|
12
|
+
spec.description = %q{}
|
13
|
+
spec.homepage = "https://github.com/azanar/hydrogen"
|
14
|
+
spec.license = "MIT"
|
15
|
+
|
16
|
+
spec.files = `git ls-files -z`.split("\x0")
|
17
|
+
spec.executables = spec.files.grep(%r{^bin/}) { |f| File.basename(f) }
|
18
|
+
spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
|
19
|
+
spec.require_paths = ["lib"]
|
20
|
+
|
21
|
+
spec.add_development_dependency 'test-unit', "~> 3"
|
22
|
+
spec.add_development_dependency 'mocha', "~> 1"
|
23
|
+
spec.add_development_dependency 'simplecov', "~> 0"
|
24
|
+
spec.add_development_dependency "bundler", "~> 1.7"
|
25
|
+
spec.add_development_dependency "rake", "~> 10.0"
|
26
|
+
end
|
data/lib/hydrogen.rb
ADDED
@@ -0,0 +1,10 @@
|
|
1
|
+
require "hydrogen/model"
|
2
|
+
require "hydrogen/table_object"
|
3
|
+
require "hydrogen/table_object/part"
|
4
|
+
require "hydrogen/table_object/part/sequence"
|
5
|
+
require "hydrogen/aws/table_object"
|
6
|
+
require "hydrogen/version"
|
7
|
+
|
8
|
+
module Hydrogen
|
9
|
+
# Your code goes here...
|
10
|
+
end
|
@@ -0,0 +1,20 @@
|
|
1
|
+
module Hydrogen
|
2
|
+
class Model
|
3
|
+
def initialize(config)
|
4
|
+
@table_name = config[:table_name]
|
5
|
+
@columns = config[:columns]
|
6
|
+
@partition = config[:partition] || false
|
7
|
+
end
|
8
|
+
|
9
|
+
attr_reader :table_name, :columns
|
10
|
+
|
11
|
+
def name
|
12
|
+
@table_name
|
13
|
+
end
|
14
|
+
|
15
|
+
def partition?
|
16
|
+
!!@partition
|
17
|
+
end
|
18
|
+
end
|
19
|
+
end
|
20
|
+
|
@@ -0,0 +1,24 @@
|
|
1
|
+
module Hydrogen
|
2
|
+
class TableObject
|
3
|
+
module Base
|
4
|
+
def initialize(model)
|
5
|
+
if model.kind_of?(Hydrogen::TableObject::Base)
|
6
|
+
raise
|
7
|
+
end
|
8
|
+
@model = model
|
9
|
+
end
|
10
|
+
|
11
|
+
def columns
|
12
|
+
@model.columns
|
13
|
+
end
|
14
|
+
|
15
|
+
def name
|
16
|
+
@model.name
|
17
|
+
end
|
18
|
+
|
19
|
+
def path
|
20
|
+
@path ||= "#{@model.name}/#{name}.psv.gz"
|
21
|
+
end
|
22
|
+
end
|
23
|
+
end
|
24
|
+
end
|
@@ -0,0 +1,40 @@
|
|
1
|
+
module Hydrogen
|
2
|
+
class TableObject
|
3
|
+
module Collection
|
4
|
+
def initialize(model, parts)
|
5
|
+
@model = model
|
6
|
+
@parts = parts
|
7
|
+
end
|
8
|
+
|
9
|
+
attr_reader :parts
|
10
|
+
|
11
|
+
def path
|
12
|
+
"#{@model.name}/#{@model.name}"
|
13
|
+
end
|
14
|
+
|
15
|
+
def url
|
16
|
+
raise NotImplementedError
|
17
|
+
end
|
18
|
+
|
19
|
+
class Builder
|
20
|
+
def initialize(model, sequencer)
|
21
|
+
@model = model
|
22
|
+
@sequencer = sequencer
|
23
|
+
end
|
24
|
+
|
25
|
+
def write(data)
|
26
|
+
@sequencer.write(data)
|
27
|
+
end
|
28
|
+
|
29
|
+
def finalize
|
30
|
+
@sequencer.finalize
|
31
|
+
klass = @sequencer.collection
|
32
|
+
|
33
|
+
puts klass
|
34
|
+
|
35
|
+
klass.new(@model, @sequencer.parts)
|
36
|
+
end
|
37
|
+
end
|
38
|
+
end
|
39
|
+
end
|
40
|
+
end
|
@@ -0,0 +1,19 @@
|
|
1
|
+
require 'hydrogen/table_object/base'
|
2
|
+
|
3
|
+
module Hydrogen
|
4
|
+
class TableObject
|
5
|
+
# A TableObject::Part behaves like a TableObject, but represent a part
|
6
|
+
# of a sequence of TableObjects
|
7
|
+
class Part
|
8
|
+
include Hydrogen::TableObject::Base
|
9
|
+
def initialize(chunk, model)
|
10
|
+
@chunk = chunk
|
11
|
+
super(model)
|
12
|
+
end
|
13
|
+
|
14
|
+
def name
|
15
|
+
"#{super}.#{@chunk}"
|
16
|
+
end
|
17
|
+
end
|
18
|
+
end
|
19
|
+
end
|
@@ -0,0 +1,46 @@
|
|
1
|
+
require 'hydrogen/table_object/part'
|
2
|
+
|
3
|
+
module Hydrogen
|
4
|
+
class TableObject
|
5
|
+
class Part
|
6
|
+
class Sequence
|
7
|
+
include Enumerable
|
8
|
+
def initialize(model, parts, opts = {})
|
9
|
+
unless model.kind_of?(Hydrogen::Model)
|
10
|
+
raise
|
11
|
+
end
|
12
|
+
@model = model
|
13
|
+
@parts = parts
|
14
|
+
end
|
15
|
+
|
16
|
+
def parts
|
17
|
+
@parts
|
18
|
+
end
|
19
|
+
|
20
|
+
def num_parts
|
21
|
+
@parts.length
|
22
|
+
end
|
23
|
+
|
24
|
+
def each
|
25
|
+
@parts.each {|p| yield p}
|
26
|
+
end
|
27
|
+
|
28
|
+
def name
|
29
|
+
@model.name
|
30
|
+
end
|
31
|
+
|
32
|
+
def columns
|
33
|
+
@model.columns
|
34
|
+
end
|
35
|
+
|
36
|
+
def partition?
|
37
|
+
@model.partition?
|
38
|
+
end
|
39
|
+
|
40
|
+
def path
|
41
|
+
"#{name}/#{name}"
|
42
|
+
end
|
43
|
+
end
|
44
|
+
end
|
45
|
+
end
|
46
|
+
end
|
@@ -0,0 +1,30 @@
|
|
1
|
+
require File.expand_path('../test_helper', __FILE__)
|
2
|
+
|
3
|
+
require 'hydrogen'
|
4
|
+
|
5
|
+
class Hydrogen::IntegrationTest < Test::Unit::TestCase
|
6
|
+
setup do
|
7
|
+
config = {
|
8
|
+
:table_name => 'foo',
|
9
|
+
:source => {:file => 'data.csv'},
|
10
|
+
:columns => %w{foo bar baz}
|
11
|
+
}
|
12
|
+
@model = Hydrogen::Model.new(config)
|
13
|
+
|
14
|
+
end
|
15
|
+
test "singular" do
|
16
|
+
to = Hydrogen::TableObject.new(@model)
|
17
|
+
|
18
|
+
assert_equal to.path, "foo/foo.psv.gz"
|
19
|
+
end
|
20
|
+
|
21
|
+
test "parts" do
|
22
|
+
parts = 5.times.map do |x|
|
23
|
+
Hydrogen::TableObject::Part.new(x, @model)
|
24
|
+
end
|
25
|
+
|
26
|
+
sequence = Hydrogen::TableObject::Part::Sequence.new(@model, parts)
|
27
|
+
|
28
|
+
assert_equal sequence.path, "foo/foo"
|
29
|
+
end
|
30
|
+
end
|
@@ -0,0 +1,14 @@
|
|
1
|
+
if ENV["ENABLE_SIMPLE_COV"]
|
2
|
+
require 'simplecov'
|
3
|
+
require File.expand_path('../../simplecov_helper', __FILE__)
|
4
|
+
SimpleCov.start 'hydrogen'
|
5
|
+
end
|
6
|
+
|
7
|
+
require 'test/unit'
|
8
|
+
|
9
|
+
ENV["QUASAR_ENV"] = "test"
|
10
|
+
|
11
|
+
require 'mocha/setup'
|
12
|
+
|
13
|
+
module TestHelper
|
14
|
+
end
|
@@ -0,0 +1,32 @@
|
|
1
|
+
require File.expand_path('../../../test_helper', __FILE__)
|
2
|
+
|
3
|
+
require 'hydrogen/table_object/base'
|
4
|
+
|
5
|
+
class Hydrogen::TableObject::Base::Test < Test::Unit::TestCase
|
6
|
+
include TestHelper
|
7
|
+
setup do
|
8
|
+
@mock_table_object = mock
|
9
|
+
@mock_table_object_name = "mock_table_name"
|
10
|
+
|
11
|
+
mock_table_object_klass = Class.new do
|
12
|
+
include Hydrogen::TableObject::Base
|
13
|
+
end
|
14
|
+
|
15
|
+
@table_object = mock_table_object_klass.new(@mock_table_object)
|
16
|
+
end
|
17
|
+
|
18
|
+
test "#path" do
|
19
|
+
@mock_table_object.expects(:name).twice.returns(@mock_table_object_name)
|
20
|
+
@table_object.path
|
21
|
+
end
|
22
|
+
|
23
|
+
test "#path should cache" do
|
24
|
+
@mock_table_object.expects(:name).twice.returns(@mock_table_object_name)
|
25
|
+
anterior = @table_object.path
|
26
|
+
|
27
|
+
posterior = @table_object.path
|
28
|
+
|
29
|
+
assert_equal anterior, posterior
|
30
|
+
end
|
31
|
+
end
|
32
|
+
|
@@ -0,0 +1,22 @@
|
|
1
|
+
require File.expand_path('../../../../test_helper', __FILE__)
|
2
|
+
|
3
|
+
require 'hydrogen/table_object/part/sequence'
|
4
|
+
|
5
|
+
class Hydrogen::TableObject::Part::Sequence::Test < Test::Unit::TestCase
|
6
|
+
include TestHelper
|
7
|
+
setup do
|
8
|
+
@mock_table_object = mock
|
9
|
+
@mock_table_object_name = "mock_table_name"
|
10
|
+
|
11
|
+
@mock_parts = 5.times.map { mock }
|
12
|
+
|
13
|
+
@sequence = Hydrogen::TableObject::Part::Sequence.new(@mock_table_object, @mock_parts)
|
14
|
+
end
|
15
|
+
|
16
|
+
test "#parts" do
|
17
|
+
#@mock_table_object.expects(:name).twice.returns(@mock_table_object_name)
|
18
|
+
|
19
|
+
assert_equal @sequence.parts, @mock_parts
|
20
|
+
end
|
21
|
+
end
|
22
|
+
|
@@ -0,0 +1,31 @@
|
|
1
|
+
require File.expand_path('../../../test_helper', __FILE__)
|
2
|
+
|
3
|
+
require 'hydrogen/table_object/part'
|
4
|
+
|
5
|
+
class Hydrogen::TableObject::Part::Test < Test::Unit::TestCase
|
6
|
+
include TestHelper
|
7
|
+
setup do
|
8
|
+
@mock_table_object = mock
|
9
|
+
@mock_table_object_name = "mock_table_name"
|
10
|
+
|
11
|
+
@table_object = Hydrogen::TableObject::Part.new(1, @mock_table_object)
|
12
|
+
end
|
13
|
+
|
14
|
+
test "#path" do
|
15
|
+
@mock_table_object.expects(:name).twice.returns(@mock_table_object_name)
|
16
|
+
res = @table_object.path
|
17
|
+
|
18
|
+
assert_equal res, 'mock_table_name/mock_table_name.1.psv.gz'
|
19
|
+
end
|
20
|
+
|
21
|
+
test "#path should cache" do
|
22
|
+
@mock_table_object.expects(:name).twice.returns(@mock_table_object_name)
|
23
|
+
anterior = @table_object.path
|
24
|
+
|
25
|
+
posterior = @table_object.path
|
26
|
+
|
27
|
+
assert_equal anterior, posterior
|
28
|
+
end
|
29
|
+
end
|
30
|
+
|
31
|
+
|
@@ -0,0 +1,15 @@
|
|
1
|
+
require File.expand_path('../../test_helper', __FILE__)
|
2
|
+
|
3
|
+
require 'hydrogen/table_object'
|
4
|
+
|
5
|
+
class Hydrogen::TableObjectTest < Test::Unit::TestCase
|
6
|
+
include TestHelper
|
7
|
+
setup do
|
8
|
+
@mock_table_object = mock
|
9
|
+
@mock_table_object_name = "mock_table_name"
|
10
|
+
|
11
|
+
@mock_table_object.expects(:name).returns(@mock_table_object_name)
|
12
|
+
|
13
|
+
@table_object = Hydrogen::TableObject.new(@mock_table_object)
|
14
|
+
end
|
15
|
+
end
|
@@ -0,0 +1,17 @@
|
|
1
|
+
require 'coveralls'
|
2
|
+
Coveralls.wear!
|
3
|
+
|
4
|
+
if ENV["ENABLE_SIMPLE_COV"]
|
5
|
+
require 'simplecov'
|
6
|
+
require File.expand_path('../../simplecov_helper', __FILE__)
|
7
|
+
SimpleCov.start 'hydrogen'
|
8
|
+
end
|
9
|
+
|
10
|
+
require 'test/unit'
|
11
|
+
|
12
|
+
ENV["QUASAR_ENV"] = "test"
|
13
|
+
|
14
|
+
require 'mocha/setup'
|
15
|
+
|
16
|
+
module TestHelper
|
17
|
+
end
|
metadata
ADDED
@@ -0,0 +1,145 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: hydrogen
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.0.1.pre.alpha.1
|
5
|
+
platform: ruby
|
6
|
+
authors:
|
7
|
+
- Ed Carrel
|
8
|
+
autorequire:
|
9
|
+
bindir: bin
|
10
|
+
cert_chain: []
|
11
|
+
date: 2014-09-18 00:00:00.000000000 Z
|
12
|
+
dependencies:
|
13
|
+
- !ruby/object:Gem::Dependency
|
14
|
+
name: test-unit
|
15
|
+
requirement: !ruby/object:Gem::Requirement
|
16
|
+
requirements:
|
17
|
+
- - "~>"
|
18
|
+
- !ruby/object:Gem::Version
|
19
|
+
version: '3'
|
20
|
+
type: :development
|
21
|
+
prerelease: false
|
22
|
+
version_requirements: !ruby/object:Gem::Requirement
|
23
|
+
requirements:
|
24
|
+
- - "~>"
|
25
|
+
- !ruby/object:Gem::Version
|
26
|
+
version: '3'
|
27
|
+
- !ruby/object:Gem::Dependency
|
28
|
+
name: mocha
|
29
|
+
requirement: !ruby/object:Gem::Requirement
|
30
|
+
requirements:
|
31
|
+
- - "~>"
|
32
|
+
- !ruby/object:Gem::Version
|
33
|
+
version: '1'
|
34
|
+
type: :development
|
35
|
+
prerelease: false
|
36
|
+
version_requirements: !ruby/object:Gem::Requirement
|
37
|
+
requirements:
|
38
|
+
- - "~>"
|
39
|
+
- !ruby/object:Gem::Version
|
40
|
+
version: '1'
|
41
|
+
- !ruby/object:Gem::Dependency
|
42
|
+
name: simplecov
|
43
|
+
requirement: !ruby/object:Gem::Requirement
|
44
|
+
requirements:
|
45
|
+
- - "~>"
|
46
|
+
- !ruby/object:Gem::Version
|
47
|
+
version: '0'
|
48
|
+
type: :development
|
49
|
+
prerelease: false
|
50
|
+
version_requirements: !ruby/object:Gem::Requirement
|
51
|
+
requirements:
|
52
|
+
- - "~>"
|
53
|
+
- !ruby/object:Gem::Version
|
54
|
+
version: '0'
|
55
|
+
- !ruby/object:Gem::Dependency
|
56
|
+
name: bundler
|
57
|
+
requirement: !ruby/object:Gem::Requirement
|
58
|
+
requirements:
|
59
|
+
- - "~>"
|
60
|
+
- !ruby/object:Gem::Version
|
61
|
+
version: '1.7'
|
62
|
+
type: :development
|
63
|
+
prerelease: false
|
64
|
+
version_requirements: !ruby/object:Gem::Requirement
|
65
|
+
requirements:
|
66
|
+
- - "~>"
|
67
|
+
- !ruby/object:Gem::Version
|
68
|
+
version: '1.7'
|
69
|
+
- !ruby/object:Gem::Dependency
|
70
|
+
name: rake
|
71
|
+
requirement: !ruby/object:Gem::Requirement
|
72
|
+
requirements:
|
73
|
+
- - "~>"
|
74
|
+
- !ruby/object:Gem::Version
|
75
|
+
version: '10.0'
|
76
|
+
type: :development
|
77
|
+
prerelease: false
|
78
|
+
version_requirements: !ruby/object:Gem::Requirement
|
79
|
+
requirements:
|
80
|
+
- - "~>"
|
81
|
+
- !ruby/object:Gem::Version
|
82
|
+
version: '10.0'
|
83
|
+
description: ''
|
84
|
+
email:
|
85
|
+
- edward@carrel.org
|
86
|
+
executables: []
|
87
|
+
extensions: []
|
88
|
+
extra_rdoc_files: []
|
89
|
+
files:
|
90
|
+
- ".gitignore"
|
91
|
+
- ".travis.yml"
|
92
|
+
- CONTRIBUTING.md
|
93
|
+
- Gemfile
|
94
|
+
- LICENSE
|
95
|
+
- README.md
|
96
|
+
- Rakefile
|
97
|
+
- hydrogen.gemspec
|
98
|
+
- lib/hydrogen.rb
|
99
|
+
- lib/hydrogen/aws/table_object.rb
|
100
|
+
- lib/hydrogen/model.rb
|
101
|
+
- lib/hydrogen/table_object.rb
|
102
|
+
- lib/hydrogen/table_object/base.rb
|
103
|
+
- lib/hydrogen/table_object/collection.rb
|
104
|
+
- lib/hydrogen/table_object/part.rb
|
105
|
+
- lib/hydrogen/table_object/part/sequence.rb
|
106
|
+
- lib/hydrogen/version.rb
|
107
|
+
- test/integration/hydrogen_test.rb
|
108
|
+
- test/integration/test_helper.rb
|
109
|
+
- test/unit/hydrogen/table_object/base_test.rb
|
110
|
+
- test/unit/hydrogen/table_object/part/sequence_test.rb
|
111
|
+
- test/unit/hydrogen/table_object/part_test.rb
|
112
|
+
- test/unit/hydrogen/table_object_test.rb
|
113
|
+
- test/unit/test_helper.rb
|
114
|
+
homepage: https://github.com/azanar/hydrogen
|
115
|
+
licenses:
|
116
|
+
- MIT
|
117
|
+
metadata: {}
|
118
|
+
post_install_message:
|
119
|
+
rdoc_options: []
|
120
|
+
require_paths:
|
121
|
+
- lib
|
122
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
123
|
+
requirements:
|
124
|
+
- - ">="
|
125
|
+
- !ruby/object:Gem::Version
|
126
|
+
version: '0'
|
127
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
128
|
+
requirements:
|
129
|
+
- - ">"
|
130
|
+
- !ruby/object:Gem::Version
|
131
|
+
version: 1.3.1
|
132
|
+
requirements: []
|
133
|
+
rubyforge_project:
|
134
|
+
rubygems_version: 2.2.2
|
135
|
+
signing_key:
|
136
|
+
specification_version: 4
|
137
|
+
summary: Common elements to the Quasar toolchain of gems
|
138
|
+
test_files:
|
139
|
+
- test/integration/hydrogen_test.rb
|
140
|
+
- test/integration/test_helper.rb
|
141
|
+
- test/unit/hydrogen/table_object/base_test.rb
|
142
|
+
- test/unit/hydrogen/table_object/part/sequence_test.rb
|
143
|
+
- test/unit/hydrogen/table_object/part_test.rb
|
144
|
+
- test/unit/hydrogen/table_object_test.rb
|
145
|
+
- test/unit/test_helper.rb
|