embark-journey 0.0.16 → 0.0.17

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: c6d78f81a0c332a5d7d5ef72812126b052abd680
4
- data.tar.gz: 8fe48d192b99fed942963598e51fb6b5ab48a287
3
+ metadata.gz: 4686df29e65a3ebc8fac2f42b1323cfa15ec0599
4
+ data.tar.gz: 4328300152c187737623cc8fd2d79bab78647bdb
5
5
  SHA512:
6
- metadata.gz: fa4feb867e1e60e71cfb0348396319fb426ffc1e683aca9c5222a5001f8ed9fb20d3ae1221d29fce7d5aa3c72280f656414f73a325fd1c3eaa337b585deb0347
7
- data.tar.gz: 81f92fdd978b3ea9dd49e79bcc89663742f3786e9e8c8a11d966637a2f587d89e332c84aac4da644fdded18ff3aa9e014682712b8d28847a7101496800c85252
6
+ metadata.gz: 3eb44d831384d966eac83eea6a56bb3ce96bddd37a9aca8c6c91fdfc210eeb27e74aee166b5ddda1755b38609ca04171105677c7688ee44641cca12b3a1e87bf
7
+ data.tar.gz: 6f1d3487bfdbdcd3ed5410a78a280159843a81e09730b69dba21d1c30a7c9d7faf0ad30f3a2fbc34ae98a4bdf19771813fccbec04ca064c5a2fb682b66a7873e
data/CHANGELOG.md CHANGED
@@ -1,3 +1,6 @@
1
+ v0.0.17
2
+ - implements Oplog
3
+
1
4
  v0.0.16
2
5
  - added attachment path helpers
3
6
 
data/lib/journey.rb CHANGED
@@ -4,6 +4,7 @@ require 'journey/version'
4
4
  require 'journey/configuration'
5
5
  require 'journey/configurable'
6
6
  require 'journey/resource'
7
+ require 'journey/oplog'
7
8
 
8
9
  module Journey
9
10
  end
@@ -0,0 +1,4 @@
1
+ class Journey::Oplog < Journey::Resource
2
+ self.element_name = '_oplog'
3
+ self.collection_name = '_oplog'
4
+ end
@@ -4,15 +4,12 @@ module Journey::Resource::AttributeLoading
4
4
  extend ActiveSupport::Concern
5
5
 
6
6
  included do
7
- # uses defined setters in place of attributes[key] where possible,
8
- # for the purpose of enums
9
7
  def load(attributes, remove_root = false, persisted = false)
10
- super(attributes, remove_root, persisted).tap do |x|
11
- # send each ENUM
12
- # self.attributes.each do |key, value|
13
- # send("#{key}=", value) if respond_to?("#{key}=")
14
- # end
15
- end
8
+ # 'data' is a reserved key in ActiveResource,
9
+ # but Journey uses it for the Oplog
10
+
11
+ attributes['content'] = attributes.delete('data')
12
+ super(attributes, remove_root, persisted)
16
13
  end
17
14
  end
18
15
 
@@ -2,7 +2,7 @@ module Journey
2
2
  module VERSION
3
3
  MAJOR = 0
4
4
  MINOR = 0
5
- TINY = 16
5
+ TINY = 17
6
6
  PRE = nil
7
7
  STRING = [MAJOR, MINOR, TINY, PRE].compact.join('.')
8
8
  end
@@ -0,0 +1,11 @@
1
+ require 'spec_helper'
2
+
3
+
4
+ describe Journey::Oplog do
5
+
6
+ it 'compensates for reserved attribute #data' do
7
+ oplog = Journey::Oplog.last
8
+ expect(oplog.content).to_not be_blank
9
+ end
10
+
11
+ end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: embark-journey
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.16
4
+ version: 0.0.17
5
5
  platform: ruby
6
6
  authors:
7
7
  - Dan Davey
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-06-17 00:00:00.000000000 Z
11
+ date: 2014-06-24 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: active_attr
@@ -146,6 +146,7 @@ files:
146
146
  - lib/journey.rb
147
147
  - lib/journey/configurable.rb
148
148
  - lib/journey/configuration.rb
149
+ - lib/journey/oplog.rb
149
150
  - lib/journey/resource.rb
150
151
  - lib/journey/resource/api.rb
151
152
  - lib/journey/resource/attachments.rb
@@ -159,6 +160,7 @@ files:
159
160
  - lib/journey/version.rb
160
161
  - spec/models/journey/configurable_spec.rb
161
162
  - spec/models/journey/configuration_spec.rb
163
+ - spec/models/journey/oplog_spec.rb
162
164
  - spec/models/journey/resource/attachments_spec.rb
163
165
  - spec/models/journey/resource_spec.rb
164
166
  - spec/spec_helper.rb
@@ -191,6 +193,7 @@ summary: Journey API wrapper for Ruby
191
193
  test_files:
192
194
  - spec/models/journey/configurable_spec.rb
193
195
  - spec/models/journey/configuration_spec.rb
196
+ - spec/models/journey/oplog_spec.rb
194
197
  - spec/models/journey/resource/attachments_spec.rb
195
198
  - spec/models/journey/resource_spec.rb
196
199
  - spec/spec_helper.rb