import-io 0.0.2 → 0.0.3
Sign up to get free protection for your applications and to get access to all the features.
- data/import-io.gemspec +2 -2
- data/lib/import_io.rb +11 -0
- data/lib/import_io/connector.rb +11 -0
- data/lib/import_io/rb_config.rb +13 -0
- data/lib/import_io/version.rb +3 -0
- data/spec/import_io/connector_spec.rb +5 -0
- data/spec/{import/io → import_io}/rb_config_spec.rb +3 -3
- data/spec/spec_helper.rb +1 -1
- metadata +16 -10
- data/lib/import/io.rb +0 -9
- data/lib/import/io/connector.rb +0 -18
- data/lib/import/io/rb_config.rb +0 -16
- data/lib/import/io/version.rb +0 -5
- data/spec/import/io/connector_spec.rb +0 -5
data/import-io.gemspec
CHANGED
@@ -1,11 +1,11 @@
|
|
1
1
|
# coding: utf-8
|
2
2
|
lib = File.expand_path('../lib', __FILE__)
|
3
3
|
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
4
|
-
require '
|
4
|
+
require 'import_io/version'
|
5
5
|
|
6
6
|
Gem::Specification.new do |spec|
|
7
7
|
spec.name = "import-io"
|
8
|
-
spec.version =
|
8
|
+
spec.version = ImportIo::VERSION
|
9
9
|
spec.authors = ["Robert White"]
|
10
10
|
spec.email = ["robert@terracoding.com"]
|
11
11
|
spec.description = %q{ImportIO Query Connector}
|
data/lib/import_io.rb
ADDED
@@ -1,16 +1,16 @@
|
|
1
1
|
require 'spec_helper'
|
2
2
|
|
3
|
-
describe
|
3
|
+
describe ImportIo do
|
4
4
|
|
5
5
|
before :each do
|
6
|
-
|
6
|
+
ImportIo.configure do |config|
|
7
7
|
config.login = IoDetails["LOGIN"]
|
8
8
|
config.api_key = IoDetails["API_KEY"]
|
9
9
|
end
|
10
10
|
end
|
11
11
|
|
12
12
|
it "persists the login to new connector instances" do
|
13
|
-
client =
|
13
|
+
client = ImportIo.connector
|
14
14
|
client.login.should == IoDetails["LOGIN"]
|
15
15
|
client.api_key.should == IoDetails["API_KEY"]
|
16
16
|
end
|
data/spec/spec_helper.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: import-io
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.3
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2013-
|
12
|
+
date: 2013-05-18 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: rspec
|
@@ -88,12 +88,12 @@ files:
|
|
88
88
|
- README.md
|
89
89
|
- Rakefile
|
90
90
|
- import-io.gemspec
|
91
|
-
- lib/
|
92
|
-
- lib/
|
93
|
-
- lib/
|
94
|
-
- lib/
|
95
|
-
- spec/
|
96
|
-
- spec/
|
91
|
+
- lib/import_io.rb
|
92
|
+
- lib/import_io/connector.rb
|
93
|
+
- lib/import_io/rb_config.rb
|
94
|
+
- lib/import_io/version.rb
|
95
|
+
- spec/import_io/connector_spec.rb
|
96
|
+
- spec/import_io/rb_config_spec.rb
|
97
97
|
- spec/io_details.yml.sample
|
98
98
|
- spec/spec_helper.rb
|
99
99
|
homepage: ''
|
@@ -109,12 +109,18 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
109
109
|
- - ! '>='
|
110
110
|
- !ruby/object:Gem::Version
|
111
111
|
version: '0'
|
112
|
+
segments:
|
113
|
+
- 0
|
114
|
+
hash: 4274832137057448105
|
112
115
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
113
116
|
none: false
|
114
117
|
requirements:
|
115
118
|
- - ! '>='
|
116
119
|
- !ruby/object:Gem::Version
|
117
120
|
version: '0'
|
121
|
+
segments:
|
122
|
+
- 0
|
123
|
+
hash: 4274832137057448105
|
118
124
|
requirements: []
|
119
125
|
rubyforge_project:
|
120
126
|
rubygems_version: 1.8.25
|
@@ -122,7 +128,7 @@ signing_key:
|
|
122
128
|
specification_version: 3
|
123
129
|
summary: Basic Ruby wrapper for the import-io queries connector.
|
124
130
|
test_files:
|
125
|
-
- spec/
|
126
|
-
- spec/
|
131
|
+
- spec/import_io/connector_spec.rb
|
132
|
+
- spec/import_io/rb_config_spec.rb
|
127
133
|
- spec/io_details.yml.sample
|
128
134
|
- spec/spec_helper.rb
|
data/lib/import/io.rb
DELETED
data/lib/import/io/connector.rb
DELETED
@@ -1,18 +0,0 @@
|
|
1
|
-
module Import::Io
|
2
|
-
extend RbConfig
|
3
|
-
|
4
|
-
def self.connector
|
5
|
-
Import::Io::Connector.new(login, api_key)
|
6
|
-
end
|
7
|
-
|
8
|
-
class Connector
|
9
|
-
|
10
|
-
attr_accessor *RbConfig::OPTION_KEYS
|
11
|
-
|
12
|
-
def initialize(login, api_key)
|
13
|
-
@login = login
|
14
|
-
@api_key = api_key
|
15
|
-
end
|
16
|
-
end
|
17
|
-
|
18
|
-
end
|
data/lib/import/io/rb_config.rb
DELETED
@@ -1,16 +0,0 @@
|
|
1
|
-
module Import::Io::RbConfig
|
2
|
-
OPTION_KEYS = [:login, :api_key]
|
3
|
-
|
4
|
-
attr_accessor *OPTION_KEYS
|
5
|
-
|
6
|
-
def configure
|
7
|
-
yield self
|
8
|
-
self
|
9
|
-
end
|
10
|
-
|
11
|
-
def options
|
12
|
-
options = {}
|
13
|
-
OPTION_KEYS.each { |key| options[key] = send(key) }
|
14
|
-
options
|
15
|
-
end
|
16
|
-
end
|
data/lib/import/io/version.rb
DELETED