quandl_cassandra 1.2.1 → 1.2.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Guardfile +8 -0
- data/UPGRADE.md +6 -0
- data/examples/connect.rb +17 -0
- data/lib/quandl/cassandra/base/logging.rb +11 -3
- data/lib/quandl/cassandra/batch/logging.rb +2 -2
- data/lib/quandl/cassandra/logger.rb +14 -0
- data/lib/quandl/cassandra/version.rb +1 -1
- data/lib/quandl/cassandra.rb +1 -0
- data/quandl_cassandra.gemspec +3 -1
- metadata +47 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: d4744fb9893f0e36cee159fd74aa56cbec516f02
|
4
|
+
data.tar.gz: d4b1418f776e9b7d204565b0f69e131512ddce1e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 16fcd2b40109453cc2c6fa80060935fee5a34416cfae174ed6af74ec668e9c74f8e4ee602bee3cc93bec6a8b4b01d1284dcc29949a32d295365dd785028e1f1c
|
7
|
+
data.tar.gz: 1ef7657f417a9bad67fc4cf29a551ac2ddac319fbf9ba728fe755629793c671ab82e7ba758113256787dce4484e37bb152d40556b3e59d48883b368dcf0d2fbd
|
data/Guardfile
ADDED
data/UPGRADE.md
CHANGED
data/examples/connect.rb
ADDED
@@ -0,0 +1,17 @@
|
|
1
|
+
$:.unshift File.join(File.dirname(__FILE__), *%w[.. lib])
|
2
|
+
|
3
|
+
QUANDL_LOGGER = true
|
4
|
+
|
5
|
+
require 'pry'
|
6
|
+
require "quandl/cassandra"
|
7
|
+
require "quandl/fabricate"
|
8
|
+
|
9
|
+
Quandl::Logger.use Quandl::Logger::Outputs
|
10
|
+
|
11
|
+
Quandl::Cassandra.configure do |c|
|
12
|
+
c.hosts = ['localhost','192.168.33.10']
|
13
|
+
c.consistency = :one
|
14
|
+
c.keyspace = 'wikiposit'
|
15
|
+
end
|
16
|
+
|
17
|
+
binding.pry
|
@@ -1,4 +1,9 @@
|
|
1
|
-
|
1
|
+
require 'colorize'
|
2
|
+
|
3
|
+
module Quandl
|
4
|
+
module Cassandra
|
5
|
+
class Base
|
6
|
+
module Logging
|
2
7
|
|
3
8
|
extend ActiveSupport::Concern
|
4
9
|
|
@@ -7,7 +12,7 @@ module Quandl::Cassandra::Base::Logging
|
|
7
12
|
def prepare(*args, &block)
|
8
13
|
statement = args.first.to_s
|
9
14
|
statement = "#{statement[0..200]} ... #{statement.length} chars" if statement.length > 200
|
10
|
-
|
15
|
+
Logger.debug(statement)
|
11
16
|
super if defined?(super)
|
12
17
|
end
|
13
18
|
|
@@ -18,7 +23,7 @@ module Quandl::Cassandra::Base::Logging
|
|
18
23
|
begin
|
19
24
|
r = super if defined?(super)
|
20
25
|
ensure
|
21
|
-
|
26
|
+
Logger.debug("(#{t1.elapsed_ms}) ".blue + " #{statement}")
|
22
27
|
end
|
23
28
|
r
|
24
29
|
end
|
@@ -26,3 +31,6 @@ module Quandl::Cassandra::Base::Logging
|
|
26
31
|
end
|
27
32
|
|
28
33
|
end
|
34
|
+
end
|
35
|
+
end
|
36
|
+
end
|
@@ -12,11 +12,11 @@ module Logging
|
|
12
12
|
# call method
|
13
13
|
r = super if defined?(super)
|
14
14
|
# log write
|
15
|
-
Quandl::Logger.debug("(#{t1.elapsed_ms}) [#{rows.count} rows] BATCH #{statement}")
|
15
|
+
Quandl::Logger.debug("(#{t1.elapsed_ms}) ".blue + " [#{rows.count} rows] BATCH #{statement}")
|
16
16
|
r
|
17
17
|
end
|
18
18
|
|
19
|
-
end
|
19
|
+
end
|
20
20
|
|
21
21
|
end
|
22
22
|
end
|
data/lib/quandl/cassandra.rb
CHANGED
data/quandl_cassandra.gemspec
CHANGED
@@ -22,13 +22,15 @@ Gem::Specification.new do |s|
|
|
22
22
|
s.add_development_dependency "factory_girl_rails"
|
23
23
|
s.add_development_dependency "fivemat", "~> 1.2"
|
24
24
|
s.add_development_dependency "pry"
|
25
|
+
s.add_development_dependency "guard"
|
26
|
+
s.add_development_dependency "guard-rspec"
|
25
27
|
|
26
28
|
s.add_runtime_dependency "activesupport", ">= 3.0.0"
|
27
29
|
s.add_runtime_dependency "activemodel", ">= 3.0.0"
|
28
30
|
|
31
|
+
s.add_runtime_dependency "colorize", '~> 0.5'
|
29
32
|
s.add_runtime_dependency "facter", "~> 1.7.3"
|
30
33
|
s.add_runtime_dependency "scope_composer", "~> 0.4"
|
31
34
|
s.add_runtime_dependency "quandl_data", "~> 1.2"
|
32
35
|
s.add_runtime_dependency 'cql-rb', '~> 1.1'
|
33
|
-
|
34
36
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: quandl_cassandra
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.2.
|
4
|
+
version: 1.2.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Blake Hilscher
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2013-
|
11
|
+
date: 2013-12-04 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rake
|
@@ -80,6 +80,34 @@ dependencies:
|
|
80
80
|
- - '>='
|
81
81
|
- !ruby/object:Gem::Version
|
82
82
|
version: '0'
|
83
|
+
- !ruby/object:Gem::Dependency
|
84
|
+
name: guard
|
85
|
+
requirement: !ruby/object:Gem::Requirement
|
86
|
+
requirements:
|
87
|
+
- - '>='
|
88
|
+
- !ruby/object:Gem::Version
|
89
|
+
version: '0'
|
90
|
+
type: :development
|
91
|
+
prerelease: false
|
92
|
+
version_requirements: !ruby/object:Gem::Requirement
|
93
|
+
requirements:
|
94
|
+
- - '>='
|
95
|
+
- !ruby/object:Gem::Version
|
96
|
+
version: '0'
|
97
|
+
- !ruby/object:Gem::Dependency
|
98
|
+
name: guard-rspec
|
99
|
+
requirement: !ruby/object:Gem::Requirement
|
100
|
+
requirements:
|
101
|
+
- - '>='
|
102
|
+
- !ruby/object:Gem::Version
|
103
|
+
version: '0'
|
104
|
+
type: :development
|
105
|
+
prerelease: false
|
106
|
+
version_requirements: !ruby/object:Gem::Requirement
|
107
|
+
requirements:
|
108
|
+
- - '>='
|
109
|
+
- !ruby/object:Gem::Version
|
110
|
+
version: '0'
|
83
111
|
- !ruby/object:Gem::Dependency
|
84
112
|
name: activesupport
|
85
113
|
requirement: !ruby/object:Gem::Requirement
|
@@ -108,6 +136,20 @@ dependencies:
|
|
108
136
|
- - '>='
|
109
137
|
- !ruby/object:Gem::Version
|
110
138
|
version: 3.0.0
|
139
|
+
- !ruby/object:Gem::Dependency
|
140
|
+
name: colorize
|
141
|
+
requirement: !ruby/object:Gem::Requirement
|
142
|
+
requirements:
|
143
|
+
- - ~>
|
144
|
+
- !ruby/object:Gem::Version
|
145
|
+
version: '0.5'
|
146
|
+
type: :runtime
|
147
|
+
prerelease: false
|
148
|
+
version_requirements: !ruby/object:Gem::Requirement
|
149
|
+
requirements:
|
150
|
+
- - ~>
|
151
|
+
- !ruby/object:Gem::Version
|
152
|
+
version: '0.5'
|
111
153
|
- !ruby/object:Gem::Dependency
|
112
154
|
name: facter
|
113
155
|
requirement: !ruby/object:Gem::Requirement
|
@@ -173,10 +215,12 @@ extra_rdoc_files: []
|
|
173
215
|
files:
|
174
216
|
- .gitignore
|
175
217
|
- Gemfile
|
218
|
+
- Guardfile
|
176
219
|
- LICENSE
|
177
220
|
- README.md
|
178
221
|
- Rakefile
|
179
222
|
- UPGRADE.md
|
223
|
+
- examples/connect.rb
|
180
224
|
- lib/quandl/cassandra.rb
|
181
225
|
- lib/quandl/cassandra/base.rb
|
182
226
|
- lib/quandl/cassandra/base/attributes.rb
|
@@ -193,6 +237,7 @@ files:
|
|
193
237
|
- lib/quandl/cassandra/batch/logging.rb
|
194
238
|
- lib/quandl/cassandra/configuration.rb
|
195
239
|
- lib/quandl/cassandra/error.rb
|
240
|
+
- lib/quandl/cassandra/logger.rb
|
196
241
|
- lib/quandl/cassandra/types.rb
|
197
242
|
- lib/quandl/cassandra/types/abstract_type.rb
|
198
243
|
- lib/quandl/cassandra/types/boolean_type.rb
|