rt_sphinx 0.0.3 → 0.0.4

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.
@@ -7,15 +7,15 @@ module RtSphinx
7
7
  @connection = RtSphinx::Connection.instance
8
8
  end
9
9
 
10
- def select(index, clause)
11
- select_sql = "SELECT * FROM #{index} WHERE #{clause}"
10
+ def select(clause)
11
+ select_sql = "SELECT * FROM rt_logs WHERE #{clause}"
12
12
  @connection.execute_sql(select_sql, 'select')
13
13
  end
14
14
 
15
- def insert(index, *values)
15
+ def insert(*values)
16
16
  item_id = rand(10_000)*rand(9_888)
17
17
  values_str = values.map{|v| "'#{v}'"}.join(', ')
18
- insert_sql = "INSERT INTO #{index} (id, timestamp, message, logjson) VALUES (#{item_id}, #{values_str})"
18
+ insert_sql = "INSERT INTO rt_logs (id, timestamp, message, logjson) VALUES (#{item_id}, #{values_str})"
19
19
  @connection.execute_sql(insert_sql, 'insert')
20
20
  end
21
21
  end
data/rt_sphinx.gemspec CHANGED
@@ -3,7 +3,7 @@ $:.push File.expand_path('../lib', __FILE__)
3
3
 
4
4
  Gem::Specification.new do |s|
5
5
  s.name = 'rt_sphinx'
6
- s.version = '0.0.3'
6
+ s.version = '0.0.4'
7
7
  s.platform = Gem::Platform::RUBY
8
8
  s.license = 'MIT'
9
9
  s.authors = ['Dmitry Koprov']
metadata CHANGED
@@ -2,7 +2,7 @@
2
2
  name: rt_sphinx
3
3
  version: !ruby/object:Gem::Version
4
4
  prerelease:
5
- version: 0.0.3
5
+ version: 0.0.4
6
6
  platform: ruby
7
7
  authors:
8
8
  - Dmitry Koprov