samidare 0.0.10 → 0.0.11

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: a515fd2312967aab172fba7b511223f40bc85f93
4
- data.tar.gz: 344ef5f724464bb45cd6a858e99958978d615922
3
+ metadata.gz: eaced8c4bed3cea616f56ffe1bd1bf72776f103c
4
+ data.tar.gz: d3ef165a96055bc1dd51fbafef03268a76550ba1
5
5
  SHA512:
6
- metadata.gz: b90e3598957f6d64a1a8e24ff3bc8a207267dd116a062c0d84b6b555934b7ca77357d4854c6fe40abb6a2ce60405aef2e34db482bc2a007d8585047994db29ed
7
- data.tar.gz: 29aba7ab5b5c45d81807e6fc1d56f0ee69bb7a394684162bbc846d84d9970a5448a1cd19698eb2d1fffa9c4efe712e13271c89c30943562c70022db3b0bac600
6
+ metadata.gz: bb7a324305a0c9221fbcc505e91ff12f7171a9584d549502b9c1a55c755cb92a6fce0da381e11b044c35c24c29bd1a9ae97466a2caadb81e61261916e4f873de
7
+ data.tar.gz: 2db8446c60c1be68741871681c686c5a4fb3e08a9c087fa3f96ca9cdce8d1527e5abacd2d052c3b31e784ecee45c250d98b6c70f2baf4389367735f07115dae3
@@ -47,8 +47,9 @@ module Samidare
47
47
  def self.generate_sql(table_info, column_infos)
48
48
  columns = column_infos.map { |column_info| column_info.converted_value }
49
49
  sql = "SELECT " + columns.join(",")
50
- sql << " FROM #{table_info.name}\n"
51
- sql << "WHERE #{table_info.condition}\n" if table_info.condition
50
+ sql << " FROM #{table_info.name}"
51
+ sql << " WHERE #{table_info.condition}" if table_info.condition
52
+ sql << "\n"
52
53
  sql
53
54
  end
54
55
 
@@ -1,3 +1,3 @@
1
1
  module Samidare
2
- VERSION = "0.0.10"
2
+ VERSION = "0.0.11"
3
3
  end
@@ -40,7 +40,7 @@ describe Samidare::BigQueryUtility do
40
40
 
41
41
  context 'has condition' do
42
42
  let(:table_info) { Samidare::EmbulkUtility::TableInfo.new({ 'name' => 'simple', 'condition' => 'created_at >= CURRENT_DATE() - INTERVAL 3 MONTH' }) }
43
- let(:sql) { "SELECT `id`,`name`,UNIX_TIMESTAMP(`created_at`) AS `created_at` FROM simple\nWHERE created_at >= CURRENT_DATE() - INTERVAL 3 MONTH\n" }
43
+ let(:sql) { "SELECT `id`,`name`,UNIX_TIMESTAMP(`created_at`) AS `created_at` FROM simple WHERE created_at >= CURRENT_DATE() - INTERVAL 3 MONTH\n" }
44
44
  it { expect(subject).to eq sql }
45
45
  end
46
46
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: samidare
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.10
4
+ version: 0.0.11
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ryoji Kobori
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-11-10 00:00:00.000000000 Z
11
+ date: 2015-11-16 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler