gotime-cassandra_object 4.8.1 → 4.9.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: 73a7bc097397acf47da59d5155684b477fc110ca
4
- data.tar.gz: 5bcdfd86ce19b9b7505b0c0a218bd4e85eee0fd8
3
+ metadata.gz: c1735f198e749b3b29e8c217be4a63c78ca3a323
4
+ data.tar.gz: 5fbbcb9595e502e33fa6d199f3f1c4923e623ce5
5
5
  SHA512:
6
- metadata.gz: 7c9c1866ae256eef8b34f383e406f954a8fad21c112cacafbbf47caaf5a2dfdc3219cb91bde2600bb1a9b6cf2b16a58a000393ff06588bf138c2947ca65dc1b0
7
- data.tar.gz: e2cc196b1636fda11f5dba440cad9d96a07c1a5b8d2ea57a3be92c6cb4f868c1262a294743bc10f4ca599295281dc46d51ac4068cd4ab64987cd292531263923
6
+ metadata.gz: c04341a811c218700478e21abedf2a5951b76c6e2454c98eb604392f8e3f1a192a5a3f1dfd0192b7bd17463b65398a1659973f88ee9337a34ace968107752952
7
+ data.tar.gz: bfae3c74d93111de2c61f3cb1980a78d82a7f2662b8e474d29a41671284dd8e420baae3071dc66569ee3e4d24e79fdb3736b26966de7f80916bd71c07226762d
data/circle.yml ADDED
@@ -0,0 +1,7 @@
1
+ machine:
2
+ ruby:
3
+ version: 1.9.3-p392
4
+ services:
5
+ - cassandra
6
+ environment:
7
+ CQLSH: /usr/local/cassandra/bin/cqlsh
@@ -2,7 +2,7 @@
2
2
 
3
3
  Gem::Specification.new do |s|
4
4
  s.name = 'gotime-cassandra_object'
5
- s.version = '4.8.1'
5
+ s.version = '4.9.0'
6
6
  s.description = 'Cassandra ActiveModel'
7
7
  s.summary = 'Cassandra ActiveModel'
8
8
  s.authors = ["Michael Koziarski", "gotime"]
@@ -56,7 +56,7 @@ module CassandraObject
56
56
  include AttributeMethods::PrimaryKey
57
57
  include AttributeMethods::Typecasting
58
58
  include BelongsTo
59
- include Callbacks, ActiveModel::Observing
59
+ include Callbacks
60
60
  include Timestamps
61
61
  include Savepoints
62
62
  include Scoping
@@ -10,20 +10,20 @@ module CassandraObject
10
10
  end
11
11
 
12
12
  def destroy #:nodoc:
13
- _run_destroy_callbacks { super }
13
+ run_callbacks(:destroy) { super }
14
14
  end
15
15
 
16
16
  private
17
17
  def write #:nodoc:
18
- _run_save_callbacks { super }
18
+ run_callbacks(:save) { super }
19
19
  end
20
20
 
21
21
  def create #:nodoc:
22
- _run_create_callbacks { super }
22
+ run_callbacks(:create) { super }
23
23
  end
24
24
 
25
25
  def update(*) #:nodoc:
26
- _run_update_callbacks { super }
26
+ run_callbacks(:update) { super }
27
27
  end
28
28
  end
29
29
  end
@@ -25,8 +25,8 @@ module CassandraObject
25
25
  end
26
26
 
27
27
  def execute_cql(cql_string, *bind_vars)
28
- raw_statement = CassandraCQL::Statement.sanitize(cql_string, bind_vars)
29
- statement = raw_statement.force_encoding(Encoding::UTF_8)
28
+ statement = CassandraCQL::Statement.sanitize(cql_string, bind_vars).force_encoding(Encoding::UTF_8)
29
+
30
30
  ActiveSupport::Notifications.instrument("cql.cassandra_object", cql: statement) do
31
31
  cql.execute statement
32
32
  end
@@ -119,7 +119,6 @@ module CassandraObject
119
119
  def destroy
120
120
  self.class.remove(id)
121
121
  @destroyed = true
122
- freeze
123
122
  end
124
123
 
125
124
  def update_attribute(name, value)
@@ -13,7 +13,6 @@ module CassandraObject
13
13
  end
14
14
 
15
15
  def decode(str)
16
- raise ArgumentError.new("Cannot convert #{str} into a boolean") unless VALID_VALS.include?(str)
17
16
  TRUE_VALS.include?(str)
18
17
  end
19
18
  end
@@ -8,6 +8,10 @@ class ActiveModelTest < CassandraObject::TestCase
8
8
  def test_to_param
9
9
  end
10
10
 
11
+ # overrides ActiveModel::Lint::Tests#test_to_key
12
+ def test_to_key
13
+ end
14
+
11
15
  def setup
12
16
  @model = Issue.new
13
17
  end
@@ -19,5 +19,6 @@ class CassandraObject::Types::BooleanTypeTest < CassandraObject::Types::TestCase
19
19
  test 'decode' do
20
20
  assert_equal true, coder.decode('1')
21
21
  assert_equal false, coder.decode('0')
22
+ # assert_nil coder.decode(nil)
22
23
  end
23
24
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: gotime-cassandra_object
3
3
  version: !ruby/object:Gem::Version
4
- version: 4.8.1
4
+ version: 4.9.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: 2013-04-01 00:00:00.000000000 Z
12
+ date: 2013-04-12 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: activemodel
@@ -82,6 +82,7 @@ files:
82
82
  - MIT-LICENSE
83
83
  - README.rdoc
84
84
  - Rakefile
85
+ - circle.yml
85
86
  - gotime-cassandra_object.gemspec
86
87
  - lib/cassandra_object/attribute_methods.rb
87
88
  - lib/cassandra_object/attribute_methods/definition.rb
@@ -187,7 +188,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
187
188
  version: 1.3.5
188
189
  requirements: []
189
190
  rubyforge_project:
190
- rubygems_version: 2.0.3
191
+ rubygems_version: 2.0.0
191
192
  signing_key:
192
193
  specification_version: 4
193
194
  summary: Cassandra ActiveModel