synced 0.0.11 → 1.0.0.rc1
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.
- checksums.yaml +4 -4
- data/README.md +227 -44
- data/lib/synced/model.rb +36 -19
- data/lib/synced/synchronizer.rb +7 -3
- data/lib/synced/version.rb +1 -1
- metadata +28 -30
- data/config/routes.rb +0 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: cdb428e328ca8da932f79510c83a0605cc220bcc
|
4
|
+
data.tar.gz: 70b0d79a78f4ed66802c5600dc18d5f5fa49d2d8
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c6e6dfdc5295494cbeca0f90f02dfe17031ccc34c730f863d2c36b1a3fcf2cc27bdec9b39bc000832ad230bf93b50f073fe224a8ad24978e5dd97c5354add5e2
|
7
|
+
data.tar.gz: d4e6b75d4ddcd2580cba514ddfbf83384949868208e3a3414c9ba5f264a86c8989d0fa43b1fecc1c8a005e0b86b8e25503d2264b73a88f8492afaed1c28ffada
|
data/README.md
CHANGED
@@ -6,34 +6,41 @@
|
|
6
6
|
Synced is a Rails Engine that helps you keep local models synchronized with
|
7
7
|
their BookingSync representation.
|
8
8
|
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
9
|
+
It decreases time needed to fetch data from BookingSync API. If given endpoint
|
10
|
+
supports `updated_since` parameter, Synced will first perform a full
|
11
|
+
synchronization and then every next synchronization will only synchronize
|
12
|
+
added/changed/deleted objects since last synchronization.
|
13
13
|
|
14
14
|
## Requirements
|
15
15
|
|
16
16
|
This engine requires Rails `>= 4.0.0` and Ruby `>= 2.0.0`.
|
17
17
|
|
18
|
-
## Documentation
|
19
|
-
|
20
|
-
[API documentation is available at rdoc.info](http://rdoc.info/github/BookingSync/synced/master/frames).
|
21
|
-
|
22
18
|
## Installation
|
23
19
|
|
24
|
-
|
25
|
-
2.0 onwards. To get started, add it to your Gemfile with:
|
20
|
+
To get started, add it to your Gemfile with:
|
26
21
|
|
27
22
|
```ruby
|
28
23
|
gem 'synced'
|
29
24
|
```
|
25
|
+
and run `bundle install`
|
26
|
+
|
27
|
+
## Basic usage
|
28
|
+
|
29
|
+
Assume we want to create an application displaying rentals from multiple
|
30
|
+
BookingSync accounts and we want to synchronize rentals to make it snappy
|
31
|
+
and traffic efficient.
|
32
|
+
|
33
|
+
We will surely have `Rental` and `Account` models. Where `Account` will have
|
34
|
+
`BookingSync::Engine::Account` mixin and thus respond to `api` method.
|
30
35
|
|
31
|
-
|
36
|
+
First generate a migration to add synced fields to the model.
|
37
|
+
These fields will be used for storing data from the API.
|
32
38
|
|
33
39
|
Example:
|
40
|
+
|
34
41
|
```console
|
35
42
|
rails g migration AddSyncedFieldsToRentals synced_id:integer:index \
|
36
|
-
synced_data:text
|
43
|
+
synced_data:text synced_all_at:datetime
|
37
44
|
```
|
38
45
|
|
39
46
|
and migrate:
|
@@ -42,82 +49,155 @@ and migrate:
|
|
42
49
|
rake db:migrate
|
43
50
|
```
|
44
51
|
|
45
|
-
|
46
|
-
|
47
|
-
|
52
|
+
Add `synced` statement to the model you want to keep in sync and add `api`
|
53
|
+
method which return instance of `BookingSync::API::Client` used for fetching
|
54
|
+
data.
|
48
55
|
|
49
56
|
```ruby
|
50
57
|
class Rental < ActiveRecord::Base
|
51
58
|
synced
|
59
|
+
belongs_to :account
|
52
60
|
end
|
53
61
|
```
|
54
62
|
|
55
|
-
Run synchronization with given remote rentals
|
56
|
-
|
57
63
|
Example:
|
58
64
|
|
65
|
+
Synchronize rentals for given account.
|
66
|
+
|
59
67
|
```ruby
|
60
|
-
Rental.synchronize(
|
68
|
+
Rental.synchronize(scope: account)
|
61
69
|
```
|
62
70
|
|
63
|
-
|
64
|
-
|
65
|
-
Example:
|
71
|
+
Now rentals details fetched from the API are accessible through `synced_data`
|
72
|
+
method.
|
66
73
|
|
67
74
|
```ruby
|
68
|
-
|
75
|
+
rental = account.rentals.first
|
76
|
+
rental.synced_data.bedrooms # => 4
|
77
|
+
rental.synced_data.rental_type # => "villa"
|
69
78
|
```
|
70
79
|
|
71
|
-
##
|
72
|
-
|
73
|
-
By default synced stores remote object in the following db columns.
|
80
|
+
## Synced database fields
|
74
81
|
|
75
|
-
|
76
|
-
|
77
|
-
|
78
|
-
|
82
|
+
Option name | Default value | Description | Required |
|
83
|
+
---------------------|------------------|-----------------------------------------|----------|
|
84
|
+
`:id_key` | `:synced_id` | ID of the object fetched from the API | YES |
|
85
|
+
`:data_key` | `:synced_data` | Stores data fetched from the API | NO |
|
86
|
+
`:synced_all_at_key` | `:synced_all_at` | Stores time of the last synchronization | NO |
|
79
87
|
|
80
|
-
|
88
|
+
Custom fields name can be configured in the `synced` statement of your model:
|
81
89
|
|
82
|
-
```
|
90
|
+
```ruby
|
83
91
|
class Rental < ActiveRecord::Base
|
84
|
-
synced id_key: :remote_id, data_key: :remote_data,
|
92
|
+
synced id_key: :remote_id, data_key: :remote_data,
|
93
|
+
synced_all_at_key: :remote_all_synced_at
|
85
94
|
end
|
86
95
|
```
|
87
96
|
|
88
97
|
## Local attributes
|
89
98
|
|
90
|
-
|
99
|
+
Whole remote data is stored in `synced_data` column, however sometimes it's
|
100
|
+
useful (for example for sorting) to have some attributes directly in your model.
|
101
|
+
You can use `local_attributes` to achieve it:
|
91
102
|
|
92
|
-
```
|
103
|
+
```ruby
|
93
104
|
class Rental < ActiveRecord::Base
|
94
105
|
synced local_attributes: [:name, :size]
|
95
106
|
end
|
96
107
|
```
|
97
108
|
|
98
|
-
This assumes that model has
|
109
|
+
This assumes that model has `name` and `size` attributes.
|
110
|
+
On every synchronization these two attributes will be assigned with value of
|
111
|
+
`remote_object.name` and `remote_object.size` appropriately.
|
99
112
|
|
100
|
-
|
113
|
+
### Local attributes with custom names
|
101
114
|
|
102
|
-
|
103
|
-
|
104
|
-
|
105
|
-
This may take additonal space in the database.
|
106
|
-
In order to disable synchronizing these fields, set their names in the `synced` declaration to nil, as in the below example:
|
115
|
+
If you want to store attributes from remote object under different name, you
|
116
|
+
need to pass your own mapping hash to `synced` statement.
|
117
|
+
Keys are local attributes and values are remote ones. See below example:
|
107
118
|
|
119
|
+
```ruby
|
120
|
+
class Rental < ActiveRecord::Base
|
121
|
+
synced local_attributes: { headline: :name, remote_size: :size }
|
122
|
+
end
|
108
123
|
```
|
124
|
+
|
125
|
+
During synchronization to local attribute `headline` will be assigned value of
|
126
|
+
`name` attribute of the remote object and to the local `remote_size` attribute
|
127
|
+
will be assigned value of `size` attribute of the remote object.
|
128
|
+
|
129
|
+
### Local attributes with mapping blocks
|
130
|
+
|
131
|
+
If you want to convert an attributes value during synchronization you can
|
132
|
+
pass a block as value in the mapping hash. Block will receive remote object
|
133
|
+
as the only argument.
|
134
|
+
|
135
|
+
```ruby
|
136
|
+
class Rental < ActiveRecord::Base
|
137
|
+
synced local_attributes: { headline: ->(rental) { rental.headline.downcase } }
|
138
|
+
end
|
139
|
+
```
|
140
|
+
|
141
|
+
### Local attributes with mapping modules
|
142
|
+
|
143
|
+
Converting remote object's values with blocks is really easy, but when you get
|
144
|
+
more attributes and longer code in the blocks they might become quite complex
|
145
|
+
and hard to read. In such cases you can use a mapper module.
|
146
|
+
Remote object will be extended with it.
|
147
|
+
|
148
|
+
```ruby
|
149
|
+
class Rental < ActiveRecord::Base
|
150
|
+
module Mapper
|
151
|
+
def downcased_headline
|
152
|
+
headline.downcase
|
153
|
+
end
|
154
|
+
end
|
155
|
+
synced mapper: Mapper, local_attributes: { headline: :downcased_headline }
|
156
|
+
end
|
157
|
+
```
|
158
|
+
|
159
|
+
If you want to define Mapper module after the synced directive, you need to
|
160
|
+
pass Mapper module inside a block to avoid "uninitialized constant" exception.
|
161
|
+
|
162
|
+
```ruby
|
109
163
|
class Rental < ActiveRecord::Base
|
110
|
-
synced
|
164
|
+
synced mapper: -> { Mapper },
|
165
|
+
local_attributes: { headline: :downcased_headline }
|
166
|
+
module Mapper
|
167
|
+
end
|
111
168
|
end
|
112
169
|
```
|
113
170
|
|
171
|
+
## Partial updates (using updated since parameter)
|
172
|
+
|
173
|
+
Partial updates mean that first synchronization will copy all of the remote
|
174
|
+
objects into local database and next synchronizations will sync only
|
175
|
+
added/changed and removed objects. This significantly improves synchronization
|
176
|
+
time and saves network traffic.
|
177
|
+
|
178
|
+
In order to enable it add timestamp column named `synced_all_at` to your
|
179
|
+
database. Synced will automatically detect it.
|
180
|
+
|
181
|
+
NOTE: In order it to work, given endpoint needs to support updated_since
|
182
|
+
parameter. Check [API documentation](http://docs.api.bookingsync.com/reference/)
|
183
|
+
for given endpoint.
|
184
|
+
|
185
|
+
## Disabling saving whole synced_data
|
186
|
+
|
187
|
+
If you don't need whole remote object to be stored in local object skip
|
188
|
+
creating `synced_data` column in the database or set `synced_data_key: nil`.
|
189
|
+
|
190
|
+
If you don't want to synchronize only added/changed or deleted objects but all
|
191
|
+
objects every time, don't create `synced_all_at` column in the database or set
|
192
|
+
`synced_all_at: false` in the synced statement.
|
193
|
+
|
114
194
|
You cannot disable synchronizing `synced_id` as it's required to match local
|
115
195
|
objects with the remote ones.
|
116
196
|
|
117
197
|
## Associations
|
118
198
|
|
119
|
-
It's possible to synchronize objects together with it's associations.
|
120
|
-
you need to
|
199
|
+
It's possible to synchronize objects together with it's associations. Meaning
|
200
|
+
local associated objects will be created. For that you need to:
|
121
201
|
|
122
202
|
1. Specify associations you want to synchronize within `synced`
|
123
203
|
declaration of the parent model
|
@@ -139,6 +219,109 @@ Then run synchronization of the parent objects. Every of the remote_locations
|
|
139
219
|
objects needs to respond to `remote_location[:photos]` from where data for
|
140
220
|
photos association will be taken.
|
141
221
|
|
222
|
+
```ruby
|
223
|
+
Location.synchronize
|
224
|
+
```
|
225
|
+
|
226
|
+
NOTE: It assumes that local association `photos` exists in `Location` model.
|
227
|
+
|
228
|
+
## Including associations in synced_data
|
229
|
+
|
230
|
+
When you need associated data available in the local object, but you don't
|
231
|
+
need it to be a local association, you can use `include:` option in model or
|
232
|
+
synchronize method.
|
233
|
+
|
234
|
+
```ruby
|
235
|
+
class Location < ActiveRecord::Base
|
236
|
+
synced include: :photos
|
237
|
+
end
|
238
|
+
|
239
|
+
Location.first.synced_data.photos # => [{id: 1}, {id: 2}]
|
240
|
+
```
|
241
|
+
|
242
|
+
You can also specify `include:` option in synchronize method. In this case it
|
243
|
+
will overwrite `include:` from the model.
|
244
|
+
|
245
|
+
```ruby
|
246
|
+
Location.synchronize(include: :addresses)
|
247
|
+
```
|
248
|
+
|
249
|
+
## Synchronization of given remote objects
|
250
|
+
|
251
|
+
By default synced will fetch remote objects using BookingSync::API::Client
|
252
|
+
but in some cases you might want to provide own list of remote objects to
|
253
|
+
synchronize. In order to do that provide them as `remote:` option to synchronize
|
254
|
+
method.
|
255
|
+
|
142
256
|
```ruby
|
143
257
|
Location.synchronize(remote: remote_locations)
|
144
258
|
```
|
259
|
+
|
260
|
+
NOTE: Partial updates are disabled when providing remote objects.
|
261
|
+
|
262
|
+
## Removing local objects
|
263
|
+
|
264
|
+
By default synchronization will not delete any local objects which are removed
|
265
|
+
on the API side. In order to remove local objects removed on the API, specify
|
266
|
+
`remove: true` in the model or as an option to synchronize method.
|
267
|
+
|
268
|
+
```ruby
|
269
|
+
class Photo < ActiveRecord::Base
|
270
|
+
synced remove: true
|
271
|
+
end
|
272
|
+
```
|
273
|
+
|
274
|
+
Option `remove:` passed to `Photo.synchronize` method will overwrite
|
275
|
+
configuration in the model.
|
276
|
+
|
277
|
+
For objects which need to be removed `:destroy_all` is called.
|
278
|
+
If model has `canceled_at` column, local objects will be canceled with
|
279
|
+
`:cancel_all` class method. You can force your own class method to be called on
|
280
|
+
the local objects which should be removed by passing it as an symbol.
|
281
|
+
|
282
|
+
```ruby
|
283
|
+
class Photo < ActiveRecord::Base
|
284
|
+
synced remove: :mark_as_outdated
|
285
|
+
|
286
|
+
def self.mark_as_outdated
|
287
|
+
all.update_attributes(outdated: true)
|
288
|
+
end
|
289
|
+
end
|
290
|
+
```
|
291
|
+
|
292
|
+
## Selecting fields to be synchronized
|
293
|
+
|
294
|
+
Very often you don't need whole object to be fetched and stored in local
|
295
|
+
database but only several fields. You can specify which fields should be fetched
|
296
|
+
and stored with `fields:` option.
|
297
|
+
|
298
|
+
```ruby
|
299
|
+
class Photo < ActiveRecord::Base
|
300
|
+
synced fields: [:name, :url]
|
301
|
+
end
|
302
|
+
```
|
303
|
+
|
304
|
+
This can be overwritten in synchronize method.
|
305
|
+
|
306
|
+
```ruby
|
307
|
+
Photo.synchronize(fields: [:name, :size])
|
308
|
+
```
|
309
|
+
|
310
|
+
## Synced configuration options
|
311
|
+
|
312
|
+
Option name | Default value | Description | synced | synchronize |
|
313
|
+
---------------------|------------------|-----------------------------------------------------------------------------------|--------|-------------|
|
314
|
+
`:id_key` | `:synced_id` | ID of the object fetched from the API | YES | NO |
|
315
|
+
`:data_key` | `:synced_data` | Object fetched from the API | YES | NO |
|
316
|
+
`:synced_all_at_key` | `:synced_all_at` | Time of the last synchronization | YES | NO |
|
317
|
+
`:associations` | `[]` | [Sync remote associations to local ones](#associations) | YES | NO |
|
318
|
+
`:local_attributes` | `[]` | [Sync remote attributes to local ones](#local-attributes) | YES | NO |
|
319
|
+
`:mapper` | `nil` | [Module used for mapping remote objects](#local-attributes-with-mapping-modules) | YES | NO |
|
320
|
+
`:remove` | `false` | [If local objects should be removed when deleted on API](#removing-local-objects) | YES | YES |
|
321
|
+
`:include` | `[]` | [An array of associations to be fetched](#including-associations-in-synced_data) | YES | YES |
|
322
|
+
`:fields` | `[]` | [An array of fields to be fetched](#selecting-fields-to-be-synchronized) | YES | YES |
|
323
|
+
`:remote` | `nil` | [Remote objects to be synchronized with local ones](#synchronization-of-given-remote-objects) | NO | YES |
|
324
|
+
|
325
|
+
## Documentation
|
326
|
+
|
327
|
+
[API documentation is available at rdoc.info](http://rdoc.info/github/BookingSync/synced/master/frames).
|
data/lib/synced/model.rb
CHANGED
@@ -18,10 +18,22 @@ module Synced
|
|
18
18
|
# object's data is stored.
|
19
19
|
# @option options [Array] local_attributes: Array of attributes in the remote
|
20
20
|
# object which will be mapped to local object attributes.
|
21
|
+
# @option options [Boolean|Symbol] remove: If it's true all local objects
|
22
|
+
# within current scope which are not present in the remote array will be
|
23
|
+
# destroyed.
|
24
|
+
# If only_updated is enabled, ids of objects to be deleted will be taken
|
25
|
+
# from the meta part. By default if cancel_at column is present, all
|
26
|
+
# missing local objects will be canceled with cancel_all,
|
27
|
+
# if it's missing, all will be destroyed with destroy_all.
|
28
|
+
# You can also force method to remove local objects by passing it
|
29
|
+
# to remove: :mark_as_missing.
|
21
30
|
def synced(options = {})
|
31
|
+
options.assert_valid_keys(:associations, :data_key, :fields, :id_key,
|
32
|
+
:include, :local_attributes, :mapper, :only_updated, :remove,
|
33
|
+
:synced_all_at_key)
|
22
34
|
class_attribute :synced_id_key, :synced_all_at_key, :synced_data_key,
|
23
35
|
:synced_local_attributes, :synced_associations, :synced_only_updated,
|
24
|
-
:
|
36
|
+
:synced_mapper, :synced_remove, :synced_include, :synced_fields
|
25
37
|
self.synced_id_key = options.fetch(:id_key, :synced_id)
|
26
38
|
self.synced_all_at_key = options.fetch(:synced_all_at_key,
|
27
39
|
synced_column_presence(:synced_all_at))
|
@@ -31,7 +43,10 @@ module Synced
|
|
31
43
|
self.synced_associations = options.fetch(:associations, [])
|
32
44
|
self.synced_only_updated = options.fetch(:only_updated,
|
33
45
|
column_names.include?(synced_all_at_key.to_s))
|
34
|
-
self.
|
46
|
+
self.synced_mapper = options.fetch(:mapper, nil)
|
47
|
+
self.synced_remove = options.fetch(:remove, false)
|
48
|
+
self.synced_include = options.fetch(:include, [])
|
49
|
+
self.synced_fields = options.fetch(:fields, [])
|
35
50
|
include Synced::HasSyncedData
|
36
51
|
end
|
37
52
|
|
@@ -50,7 +65,8 @@ module Synced
|
|
50
65
|
# missing local objects will be canceled with cancel_all,
|
51
66
|
# if it's missing, all will be destroyed with destroy_all.
|
52
67
|
# You can also force method to remove local objects by passing it
|
53
|
-
# to remove: :mark_as_missing.
|
68
|
+
# to remove: :mark_as_missing. This option can be defined in the model
|
69
|
+
# and then overwritten in the synchronize method.
|
54
70
|
# @param api [BookingSync::API::Client] - API client to be used for fetching
|
55
71
|
# remote objects
|
56
72
|
# @example Synchronizing amenities
|
@@ -63,23 +79,24 @@ module Synced
|
|
63
79
|
#
|
64
80
|
# Rental.synchronize(remote: remote_rentals, scope: website)
|
65
81
|
#
|
66
|
-
def synchronize(
|
67
|
-
|
68
|
-
|
69
|
-
|
70
|
-
|
82
|
+
def synchronize(options = {})
|
83
|
+
options.assert_valid_keys(:api, :fields, :include, :remote, :remove,
|
84
|
+
:scope)
|
85
|
+
options.symbolize_keys!
|
86
|
+
options[:remove] = synced_remove unless options.has_key?(:remove)
|
87
|
+
options[:include] = Array(synced_include) unless options.has_key?(:include)
|
88
|
+
options[:fields] = Array(synced_fields) unless options.has_key?(:fields)
|
89
|
+
options.merge!({
|
90
|
+
id_key: synced_id_key,
|
91
|
+
synced_data_key: synced_data_key,
|
71
92
|
synced_all_at_key: synced_all_at_key,
|
72
|
-
data_key:
|
73
|
-
|
74
|
-
|
75
|
-
|
76
|
-
|
77
|
-
|
78
|
-
|
79
|
-
mapper: synced_mapper_module
|
80
|
-
}
|
81
|
-
synchronizer = Synced::Synchronizer.new(remote, model_class, options)
|
82
|
-
synchronizer.perform
|
93
|
+
data_key: synced_data_key,
|
94
|
+
local_attributes: synced_local_attributes,
|
95
|
+
associations: synced_associations,
|
96
|
+
only_updated: synced_only_updated,
|
97
|
+
mapper: synced_mapper
|
98
|
+
})
|
99
|
+
Synced::Synchronizer.new(self, options).perform
|
83
100
|
end
|
84
101
|
|
85
102
|
private
|
data/lib/synced/synchronizer.rb
CHANGED
@@ -37,7 +37,7 @@ module Synced
|
|
37
37
|
# remote objects
|
38
38
|
# @option options [Module] mapper: Module class which will be used for
|
39
39
|
# mapping remote objects attributes into local object attributes
|
40
|
-
def initialize(
|
40
|
+
def initialize(model_class, options = {})
|
41
41
|
@model_class = model_class
|
42
42
|
@scope = options[:scope]
|
43
43
|
@id_key = options[:id_key]
|
@@ -48,9 +48,12 @@ module Synced
|
|
48
48
|
@include = options[:include]
|
49
49
|
@local_attributes = options[:local_attributes]
|
50
50
|
@api = options[:api]
|
51
|
-
@mapper = options[:mapper]
|
51
|
+
@mapper = options[:mapper].respond_to?(:call) ?
|
52
|
+
options[:mapper].call : options[:mapper]
|
53
|
+
@fields = options[:fields]
|
54
|
+
@remove = options[:remove]
|
52
55
|
@associations = Array(options[:associations])
|
53
|
-
@remote_objects = Array(
|
56
|
+
@remote_objects = Array(options[:remote]) if options.has_key?(:remote)
|
54
57
|
@request_performed = false
|
55
58
|
end
|
56
59
|
|
@@ -166,6 +169,7 @@ module Synced
|
|
166
169
|
options[:include] ||= []
|
167
170
|
options[:include] += @include
|
168
171
|
end
|
172
|
+
options[:fields] = @fields if @fields.present?
|
169
173
|
options[:updated_since] = minimum_updated_at if updated_since_enabled?
|
170
174
|
options[:auto_paginate] = true
|
171
175
|
end
|
data/lib/synced/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: synced
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 1.0.0.rc1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Sebastien Grosjean
|
@@ -9,132 +9,132 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2014-08-
|
12
|
+
date: 2014-08-16 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: rails
|
16
16
|
requirement: !ruby/object:Gem::Requirement
|
17
17
|
requirements:
|
18
|
-
- -
|
18
|
+
- - '>='
|
19
19
|
- !ruby/object:Gem::Version
|
20
20
|
version: 4.0.0
|
21
21
|
type: :runtime
|
22
22
|
prerelease: false
|
23
23
|
version_requirements: !ruby/object:Gem::Requirement
|
24
24
|
requirements:
|
25
|
-
- -
|
25
|
+
- - '>='
|
26
26
|
- !ruby/object:Gem::Version
|
27
27
|
version: 4.0.0
|
28
28
|
- !ruby/object:Gem::Dependency
|
29
29
|
name: bookingsync-api
|
30
30
|
requirement: !ruby/object:Gem::Requirement
|
31
31
|
requirements:
|
32
|
-
- -
|
32
|
+
- - '>='
|
33
33
|
- !ruby/object:Gem::Version
|
34
34
|
version: 0.0.20
|
35
35
|
type: :runtime
|
36
36
|
prerelease: false
|
37
37
|
version_requirements: !ruby/object:Gem::Requirement
|
38
38
|
requirements:
|
39
|
-
- -
|
39
|
+
- - '>='
|
40
40
|
- !ruby/object:Gem::Version
|
41
41
|
version: 0.0.20
|
42
42
|
- !ruby/object:Gem::Dependency
|
43
43
|
name: hashie
|
44
44
|
requirement: !ruby/object:Gem::Requirement
|
45
45
|
requirements:
|
46
|
-
- -
|
46
|
+
- - '>='
|
47
47
|
- !ruby/object:Gem::Version
|
48
48
|
version: '0'
|
49
49
|
type: :runtime
|
50
50
|
prerelease: false
|
51
51
|
version_requirements: !ruby/object:Gem::Requirement
|
52
52
|
requirements:
|
53
|
-
- -
|
53
|
+
- - '>='
|
54
54
|
- !ruby/object:Gem::Version
|
55
55
|
version: '0'
|
56
56
|
- !ruby/object:Gem::Dependency
|
57
57
|
name: sqlite3
|
58
58
|
requirement: !ruby/object:Gem::Requirement
|
59
59
|
requirements:
|
60
|
-
- -
|
60
|
+
- - '>='
|
61
61
|
- !ruby/object:Gem::Version
|
62
62
|
version: '0'
|
63
63
|
type: :development
|
64
64
|
prerelease: false
|
65
65
|
version_requirements: !ruby/object:Gem::Requirement
|
66
66
|
requirements:
|
67
|
-
- -
|
67
|
+
- - '>='
|
68
68
|
- !ruby/object:Gem::Version
|
69
69
|
version: '0'
|
70
70
|
- !ruby/object:Gem::Dependency
|
71
71
|
name: rspec-rails
|
72
72
|
requirement: !ruby/object:Gem::Requirement
|
73
73
|
requirements:
|
74
|
-
- -
|
74
|
+
- - '>='
|
75
75
|
- !ruby/object:Gem::Version
|
76
76
|
version: '0'
|
77
77
|
type: :development
|
78
78
|
prerelease: false
|
79
79
|
version_requirements: !ruby/object:Gem::Requirement
|
80
80
|
requirements:
|
81
|
-
- -
|
81
|
+
- - '>='
|
82
82
|
- !ruby/object:Gem::Version
|
83
83
|
version: '0'
|
84
84
|
- !ruby/object:Gem::Dependency
|
85
85
|
name: guard-rspec
|
86
86
|
requirement: !ruby/object:Gem::Requirement
|
87
87
|
requirements:
|
88
|
-
- -
|
88
|
+
- - '>='
|
89
89
|
- !ruby/object:Gem::Version
|
90
90
|
version: '0'
|
91
91
|
type: :development
|
92
92
|
prerelease: false
|
93
93
|
version_requirements: !ruby/object:Gem::Requirement
|
94
94
|
requirements:
|
95
|
-
- -
|
95
|
+
- - '>='
|
96
96
|
- !ruby/object:Gem::Version
|
97
97
|
version: '0'
|
98
98
|
- !ruby/object:Gem::Dependency
|
99
99
|
name: timecop
|
100
100
|
requirement: !ruby/object:Gem::Requirement
|
101
101
|
requirements:
|
102
|
-
- -
|
102
|
+
- - '>='
|
103
103
|
- !ruby/object:Gem::Version
|
104
104
|
version: '0'
|
105
105
|
type: :development
|
106
106
|
prerelease: false
|
107
107
|
version_requirements: !ruby/object:Gem::Requirement
|
108
108
|
requirements:
|
109
|
-
- -
|
109
|
+
- - '>='
|
110
110
|
- !ruby/object:Gem::Version
|
111
111
|
version: '0'
|
112
112
|
- !ruby/object:Gem::Dependency
|
113
113
|
name: vcr
|
114
114
|
requirement: !ruby/object:Gem::Requirement
|
115
115
|
requirements:
|
116
|
-
- -
|
116
|
+
- - '>='
|
117
117
|
- !ruby/object:Gem::Version
|
118
118
|
version: '0'
|
119
119
|
type: :development
|
120
120
|
prerelease: false
|
121
121
|
version_requirements: !ruby/object:Gem::Requirement
|
122
122
|
requirements:
|
123
|
-
- -
|
123
|
+
- - '>='
|
124
124
|
- !ruby/object:Gem::Version
|
125
125
|
version: '0'
|
126
126
|
- !ruby/object:Gem::Dependency
|
127
127
|
name: webmock
|
128
128
|
requirement: !ruby/object:Gem::Requirement
|
129
129
|
requirements:
|
130
|
-
- -
|
130
|
+
- - '>='
|
131
131
|
- !ruby/object:Gem::Version
|
132
132
|
version: '0'
|
133
133
|
type: :development
|
134
134
|
prerelease: false
|
135
135
|
version_requirements: !ruby/object:Gem::Requirement
|
136
136
|
requirements:
|
137
|
-
- -
|
137
|
+
- - '>='
|
138
138
|
- !ruby/object:Gem::Version
|
139
139
|
version: '0'
|
140
140
|
description: Keep your BookingSync Application synced with BookingSync.
|
@@ -144,16 +144,15 @@ executables: []
|
|
144
144
|
extensions: []
|
145
145
|
extra_rdoc_files: []
|
146
146
|
files:
|
147
|
-
- MIT-LICENSE
|
148
|
-
- README.md
|
149
|
-
- Rakefile
|
150
|
-
- config/routes.rb
|
151
|
-
- lib/synced.rb
|
152
147
|
- lib/synced/has_synced_data.rb
|
153
148
|
- lib/synced/model.rb
|
154
149
|
- lib/synced/rails.rb
|
155
150
|
- lib/synced/synchronizer.rb
|
156
151
|
- lib/synced/version.rb
|
152
|
+
- lib/synced.rb
|
153
|
+
- MIT-LICENSE
|
154
|
+
- Rakefile
|
155
|
+
- README.md
|
157
156
|
homepage: https://github.com/BookingSync/synced
|
158
157
|
licenses:
|
159
158
|
- MIT
|
@@ -164,19 +163,18 @@ require_paths:
|
|
164
163
|
- lib
|
165
164
|
required_ruby_version: !ruby/object:Gem::Requirement
|
166
165
|
requirements:
|
167
|
-
- -
|
166
|
+
- - '>='
|
168
167
|
- !ruby/object:Gem::Version
|
169
168
|
version: '0'
|
170
169
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
171
170
|
requirements:
|
172
|
-
- -
|
171
|
+
- - '>'
|
173
172
|
- !ruby/object:Gem::Version
|
174
|
-
version:
|
173
|
+
version: 1.3.1
|
175
174
|
requirements: []
|
176
175
|
rubyforge_project:
|
177
|
-
rubygems_version: 2.
|
176
|
+
rubygems_version: 2.0.14
|
178
177
|
signing_key:
|
179
178
|
specification_version: 4
|
180
179
|
summary: Keep your BookingSync Application synced with BookingSync.
|
181
180
|
test_files: []
|
182
|
-
has_rdoc:
|
data/config/routes.rb
DELETED