superstore 1.1.4 → 1.2.0

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: e7890297946bbb7455906b799256f2693c16e36d
4
- data.tar.gz: 0c93ae922bf85404b277073e654a4cc5b6e1dc99
3
+ metadata.gz: ed0f1d714b1ce3f33ed3fd382d6460dfb4e09024
4
+ data.tar.gz: 643444b1b23de94b5f3e1ec08b787c40fcee253a
5
5
  SHA512:
6
- metadata.gz: 25e0235eea40f69582d18836e89a71d3eea9094c976837148582e828d787b99be6286c91c0a83f94cc8c461f899a1721569a73215a0a5e237875c76dbf7df856
7
- data.tar.gz: a86e16dd548140efe2fc3403e51d7e8351dafa0188978e238d289c1c628cdc9a014fe4786ce8dafd6e4684a7c196650bd98748ea7c8acceff0d7d6ca0f1583a2
6
+ metadata.gz: 59e383fdb469396d92e243b51b0247ac8ff6184c373ce92a62ee0d32776c8d9ba77a23db139ac5b80988b4919ad5efd3fd38c5e351e6c44a4b48291bc394fff1
7
+ data.tar.gz: 34effeb3db2d42fa94c2d4bece8b4bb5982f70251b8c7d1f0409ab7e86ae043e2ad6bf6d031a35edf06398012dae1bb944ef7ef72e185adce7d399fcdd92e465
data/.travis.yml CHANGED
@@ -1,11 +1,16 @@
1
1
  language: ruby
2
2
  rvm:
3
- - 1.9.3
4
- - 2.0.0
5
- - 2.1.0
6
- env: CQLSH=/usr/local/cassandra/bin/cqlsh
3
+ - 1.9.3
4
+ - 2.0.0
5
+ - 2.1.0
6
+ - 2.2.0
7
+ sudo: false
8
+ env:
9
+ global:
10
+ - CQLSH=/usr/local/cassandra/bin/cqlsh
11
+ - KS_VERSION=1.2.19
12
+ - KS_NAME=apache-cassandra-$KS_VERSION
7
13
  before_install:
8
- - wget http://archive.apache.org/dist/cassandra/1.2.9/apache-cassandra-1.2.9-bin.tar.gz
9
- - tar xfz apache-cassandra-1.2.9-bin.tar.gz
10
- - sh -c "echo 'JVM_OPTS=\"\${JVM_OPTS} -Xss256k -Djava.net.preferIPv4Stack=false\"' >> apache-cassandra-1.2.9/conf/cassandra-env.sh"
11
- - cd apache-cassandra-1.2.9 && sudo ./bin/cassandra 2>&1 >> cassandra.log &
14
+ - if [[ ! -f $KS_NAME/conf/cassandra.yaml ]]; then wget http://archive.apache.org/dist/cassandra/$KS_VERSION/$KS_NAME-bin.tar.gz; tar xf $KS_NAME-bin.tar.gz; sh -c "echo 'JVM_OPTS=\"\${JVM_OPTS} -Xss256k -Djava.net.preferIPv4Stack=false\"' >> $KS_NAME/conf/cassandra-env.sh"; fi
15
+ - sed -i -e 's:/var/.*\?/cassandra:/tmp/cassandra-store:g' $KS_NAME/conf/{cassandra.yaml,log4j-server.properties}
16
+ - (cd $KS_NAME && ./bin/cassandra 2>&1 >> cassandra.log)
data/Gemfile CHANGED
@@ -7,7 +7,7 @@ gem 'thin'
7
7
  group :test do
8
8
  gem 'rails'
9
9
  gem 'pg'
10
- gem 'activerecord'
10
+ gem 'activerecord', '~> 4.2.0'
11
11
  gem 'mocha', require: false
12
12
  end
13
13
 
@@ -154,12 +154,16 @@ module Superstore
154
154
 
155
155
  private
156
156
 
157
+ def hstore_type
158
+ @hstore_type ||= ActiveRecord::ConnectionAdapters::PostgreSQL::OID::Hstore.new
159
+ end
160
+
157
161
  def attributes_to_hstore(attributes)
158
- quote ActiveRecord::ConnectionAdapters::PostgreSQLColumn.hstore_to_string(attributes)
162
+ quote hstore_type.type_cast_for_database(attributes)
159
163
  end
160
164
 
161
165
  def hstore_to_attributes(string)
162
- ActiveRecord::ConnectionAdapters::PostgreSQLColumn.string_to_hstore(string)
166
+ hstore_type.type_cast_from_database(string)
163
167
  end
164
168
  end
165
169
  end
@@ -10,6 +10,7 @@ module Superstore
10
10
  include ActiveModel::Conversion
11
11
  extend ActiveSupport::DescendantsTracker
12
12
  include ActiveModel::Serializers::JSON
13
+ include GlobalID::Identification
13
14
 
14
15
  include Connection
15
16
  include Identity
data/lib/superstore.rb CHANGED
@@ -1,5 +1,6 @@
1
1
  require 'active_support/all'
2
2
  require 'active_model'
3
+ require 'global_id/identification'
3
4
  require 'superstore/errors'
4
5
 
5
6
  module Superstore
data/superstore.gemspec CHANGED
@@ -2,7 +2,7 @@
2
2
 
3
3
  Gem::Specification.new do |s|
4
4
  s.name = 'superstore'
5
- s.version = '1.1.4'
5
+ s.version = '1.2.0'
6
6
  s.description = 'ActiveModel for many attributes'
7
7
  s.summary = 'Cassandra ActiveModel'
8
8
  s.authors = ["Michael Koziarski", "gotime"]
@@ -18,6 +18,7 @@ Gem::Specification.new do |s|
18
18
  s.require_paths = ['lib']
19
19
 
20
20
  s.add_runtime_dependency('activemodel', '>= 3.0')
21
+ s.add_runtime_dependency('globalid')
21
22
 
22
23
  s.add_development_dependency('bundler')
23
24
  end
@@ -1,7 +1,7 @@
1
1
  require 'test_helper'
2
2
  require "superstore/railties/controller_runtime"
3
3
 
4
- class Superstore::Railties::ControllerRuntimeTest < MiniTest::Unit::TestCase
4
+ class Superstore::Railties::ControllerRuntimeTest < MiniTest::Test
5
5
  class TestRuntime
6
6
  def self.log_process_action(payload)
7
7
  ['sweet']
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: superstore
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.1.4
4
+ version: 1.2.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Michael Koziarski
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2014-10-23 00:00:00.000000000 Z
12
+ date: 2015-03-13 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: activemodel
@@ -25,6 +25,20 @@ dependencies:
25
25
  - - ">="
26
26
  - !ruby/object:Gem::Version
27
27
  version: '3.0'
28
+ - !ruby/object:Gem::Dependency
29
+ name: globalid
30
+ requirement: !ruby/object:Gem::Requirement
31
+ requirements:
32
+ - - ">="
33
+ - !ruby/object:Gem::Version
34
+ version: '0'
35
+ type: :runtime
36
+ prerelease: false
37
+ version_requirements: !ruby/object:Gem::Requirement
38
+ requirements:
39
+ - - ">="
40
+ - !ruby/object:Gem::Version
41
+ version: '0'
28
42
  - !ruby/object:Gem::Dependency
29
43
  name: bundler
30
44
  requirement: !ruby/object:Gem::Requirement
@@ -167,7 +181,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
167
181
  version: 1.3.5
168
182
  requirements: []
169
183
  rubyforge_project:
170
- rubygems_version: 2.2.2
184
+ rubygems_version: 2.4.5
171
185
  signing_key:
172
186
  specification_version: 4
173
187
  summary: Cassandra ActiveModel