fluent-plugin-sforce 0.0.1 → 0.0.2
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/.gitignore +2 -1
- data/.travis.yml +5 -0
- data/Rakefile +9 -0
- data/VERSION +1 -1
- data/lib/fluent/plugin/in_sforce.rb +1 -1
- data/test/helper.rb +28 -0
- data/test/plugin/test_in_sforce.rb +34 -0
- metadata +8 -3
data/.gitignore
CHANGED
data/.travis.yml
ADDED
data/Rakefile
CHANGED
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.0.
|
1
|
+
0.0.2
|
data/test/helper.rb
ADDED
@@ -0,0 +1,28 @@
|
|
1
|
+
require 'rubygems'
|
2
|
+
require 'bundler'
|
3
|
+
begin
|
4
|
+
Bundler.setup(:default, :development)
|
5
|
+
rescue Bundler::BundlerError => e
|
6
|
+
$stderr.puts e.message
|
7
|
+
$stderr.puts "Run `bundle install` to install missing gems"
|
8
|
+
exit e.status_code
|
9
|
+
end
|
10
|
+
require 'test/unit'
|
11
|
+
|
12
|
+
$LOAD_PATH.unshift(File.join(File.dirname(__FILE__), '..', 'lib'))
|
13
|
+
$LOAD_PATH.unshift(File.dirname(__FILE__))
|
14
|
+
require 'fluent/test'
|
15
|
+
unless ENV.has_key?('VERBOSE')
|
16
|
+
nulllogger = Object.new
|
17
|
+
nulllogger.instance_eval {|obj|
|
18
|
+
def method_missing(method, *args)
|
19
|
+
# pass
|
20
|
+
end
|
21
|
+
}
|
22
|
+
$log = nulllogger
|
23
|
+
end
|
24
|
+
|
25
|
+
require 'fluent/plugin/in_sforce'
|
26
|
+
|
27
|
+
class Test::Unit::TestCase
|
28
|
+
end
|
@@ -0,0 +1,34 @@
|
|
1
|
+
require 'helper'
|
2
|
+
|
3
|
+
class SforceInputTest < Test::Unit::TestCase
|
4
|
+
def setup
|
5
|
+
Fluent::Test.setup
|
6
|
+
end
|
7
|
+
|
8
|
+
CONFIG = %[
|
9
|
+
type sforce
|
10
|
+
username test@example.com
|
11
|
+
password hogefuga
|
12
|
+
tag test.access
|
13
|
+
query SELECT id, Name FROM Account
|
14
|
+
polling_interval 60
|
15
|
+
]
|
16
|
+
|
17
|
+
def create_driver(conf = CONFIG)
|
18
|
+
Fluent::Test::InputTestDriver.new(Fluent::SforceInput).configure(conf)
|
19
|
+
end
|
20
|
+
|
21
|
+
def test_configure
|
22
|
+
d = create_driver
|
23
|
+
|
24
|
+
assert_equal "test@example.com", d.instance.username
|
25
|
+
assert_equal "hogefuga", d.instance.password
|
26
|
+
assert_equal "test.access", d.instance.tag
|
27
|
+
assert_equal "SELECT id, Name FROM Account", d.instance.query
|
28
|
+
assert_equal 60, d.instance.polling_interval
|
29
|
+
end
|
30
|
+
|
31
|
+
#def test_emit
|
32
|
+
#TODO
|
33
|
+
#end
|
34
|
+
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: fluent-plugin-sforce
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.2
|
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: 2014-11-
|
12
|
+
date: 2014-11-08 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: fluentd
|
@@ -99,6 +99,7 @@ extensions: []
|
|
99
99
|
extra_rdoc_files: []
|
100
100
|
files:
|
101
101
|
- .gitignore
|
102
|
+
- .travis.yml
|
102
103
|
- Gemfile
|
103
104
|
- LICENSE.txt
|
104
105
|
- README.md
|
@@ -106,6 +107,8 @@ files:
|
|
106
107
|
- VERSION
|
107
108
|
- fluent-plugin-sforce.gemspec
|
108
109
|
- lib/fluent/plugin/in_sforce.rb
|
110
|
+
- test/helper.rb
|
111
|
+
- test/plugin/test_in_sforce.rb
|
109
112
|
homepage: https://github.com/tzmfreedom/fluent-plugin-sforce
|
110
113
|
licenses: []
|
111
114
|
post_install_message:
|
@@ -130,4 +133,6 @@ rubygems_version: 1.8.23.2
|
|
130
133
|
signing_key:
|
131
134
|
specification_version: 3
|
132
135
|
summary: Fluent Plugin to export data from Salesforce.com.
|
133
|
-
test_files:
|
136
|
+
test_files:
|
137
|
+
- test/helper.rb
|
138
|
+
- test/plugin/test_in_sforce.rb
|