lanes 0.3.0 → 0.4.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.gitignore +2 -0
- data/client/lanes/Config.coffee +1 -1
- data/client/lanes/access/LoginDialog.cjsx +1 -1
- data/client/lanes/access/Roles.coffee +1 -1
- data/client/lanes/access/User.coffee +2 -2
- data/client/lanes/access/screens/user-management/UserManagement.cjsx +1 -1
- data/client/lanes/components/calendar/styles.scss +1 -1
- data/client/lanes/components/grid/Body.cjsx +5 -2
- data/client/lanes/components/grid/EditingMixin.cjsx +3 -0
- data/client/lanes/components/grid/Editor.cjsx +3 -11
- data/client/lanes/components/grid/Grid.cjsx +22 -12
- data/client/lanes/components/grid/Selections.cjsx +4 -1
- data/client/lanes/components/grid/Toolbar.cjsx +1 -1
- data/client/lanes/components/record-finder/RecordFinder.cjsx +2 -2
- data/client/lanes/components/select-field/SelectField.cjsx +19 -16
- data/client/lanes/components/select-field/styles.scss +1 -1
- data/client/lanes/components/shared/FieldMixin.cjsx +2 -2
- data/client/lanes/components/shared/Input.cjsx +2 -13
- data/client/lanes/components/shared/InputFieldMixin.cjsx +15 -8
- data/client/lanes/components/shared/NetworkActivityOverlay.cjsx +1 -1
- data/client/lanes/components/shared/NumberInput.cjsx +4 -12
- data/client/lanes/components/shared/ToggleField.cjsx +0 -2
- data/client/lanes/components/shared/fields.scss +9 -0
- data/client/lanes/components/shared/styles.scss +2 -1
- data/client/lanes/components/toolbar/Toolbar.cjsx +1 -1
- data/client/lanes/lib/HotReload.coffee +2 -2
- data/client/lanes/lib/development.coffee +1 -1
- data/client/lanes/lib/loader.coffee +3 -3
- data/client/lanes/models/AssociationMap.coffee +1 -1
- data/client/lanes/models/AssociationProxy.coffee +1 -0
- data/client/lanes/models/Base.coffee +7 -10
- data/client/lanes/models/Collection.coffee +3 -6
- data/client/lanes/models/JobStatus.coffee +1 -1
- data/client/lanes/models/PubSub.coffee +51 -33
- data/client/lanes/models/Query.coffee +1 -1
- data/client/lanes/models/Sync.coffee +1 -1
- data/client/lanes/models/User.coffee +3 -3
- data/client/lanes/models/mixins/FileSupport.coffee +3 -3
- data/client/lanes/models/query/ArrayResult.coffee +3 -6
- data/client/lanes/models/query/CollectionResult.coffee +5 -3
- data/client/lanes/react/Component.coffee +2 -2
- data/client/lanes/react/DefaultComponentNotFound.cjsx +2 -2
- data/client/lanes/react/Screen.coffee +1 -1
- data/client/lanes/react/Viewport.coffee +1 -1
- data/client/lanes/react/mixins/Access.coffee +1 -1
- data/client/lanes/react/mixins/Data.coffee +9 -5
- data/client/lanes/screens/Commands.coffee +1 -1
- data/client/lanes/screens/UserPreferences.cjsx +1 -1
- data/client/lanes/testing/BeforeEach.coffee +7 -0
- data/client/lanes/vendor/base.js.erb +5 -0
- data/client/lanes/vendor/calendar.js.erb +5 -0
- data/client/lanes/vendor/commons.js.erb +5 -0
- data/client/lanes/vendor/{base.js → development/base.js} +37776 -40850
- data/client/lanes/vendor/development/calendar.js +1667 -0
- data/client/lanes/vendor/development/commons.js +39085 -0
- data/client/lanes/vendor/development/helpers.js +578 -0
- data/client/lanes/vendor/{toggle.js → development/toggle.js} +22 -82
- data/client/lanes/vendor/development/widgets.js +8975 -0
- data/client/lanes/vendor/production/base.js +63239 -0
- data/client/lanes/vendor/production/calendar.js +1667 -0
- data/client/lanes/vendor/production/commons.js +38505 -0
- data/client/lanes/vendor/production/toggle.js +285 -0
- data/client/lanes/vendor/production/widgets.js +8975 -0
- data/client/lanes/vendor/{calendar.scss → styles/calendar.scss} +6 -0
- data/client/lanes/vendor/{toggle.scss → styles/toggle.scss} +0 -0
- data/client/lanes/vendor/{widgets.scss → styles/widgets.scss} +2 -2
- data/client/lanes/vendor/toggle.js.erb +5 -0
- data/client/lanes/vendor/widgets.js.erb +5 -0
- data/lib/lanes/api/default_routes.rb +3 -3
- data/lib/lanes/api/routing.rb +1 -1
- data/lib/lanes/configuration.rb +8 -14
- data/lib/lanes/environment.rb +3 -0
- data/lib/lanes/extension/definition.rb +4 -0
- data/lib/lanes/system_settings.rb +21 -6
- data/lib/lanes/version.rb +1 -1
- data/npm-build/base.js +9 -4
- data/npm-build/build +9 -0
- data/npm-build/development.js +3 -1
- data/npm-build/package.json +34 -34
- data/npm-build/update-dayz +1 -1
- data/npm-build/webpack.config.js +36 -20
- data/spec/command-reference-files/initial/Gemfile +1 -1
- data/spec/command-reference-files/screen/config/screens.rb +1 -1
- data/spec/lanes/components/grid/RowEditorSpec.coffee +3 -1
- data/spec/lanes/components/select-field/SelectFieldSpec.coffee +33 -28
- data/spec/lanes/models/AssociationProxySpec.coffee +36 -37
- data/spec/lanes/models/BaseSpec.coffee +0 -32
- data/spec/lanes/models/CollectionSpec.coffee +0 -10
- data/spec/lanes/models/PubSubSpec.coffee +63 -13
- data/spec/lanes/screens/DefinitionsSpec.coffee +2 -2
- metadata +23 -20
- data/client/lanes/vendor/calendar.js +0 -17301
- data/client/lanes/vendor/commons.js +0 -19722
- data/client/lanes/vendor/development.js +0 -5471
- data/client/lanes/vendor/grid.js +0 -15384
- data/client/lanes/vendor/grid.scss +0 -928
- data/client/lanes/vendor/rw-widgets.eot +0 -0
- data/client/lanes/vendor/rw-widgets.svg +0 -18
- data/client/lanes/vendor/rw-widgets.ttf +0 -0
- data/client/lanes/vendor/rw-widgets.woff +0 -0
- data/client/lanes/vendor/widgets.js +0 -23204
- data/npm-build/compile.coffee +0 -19
- data/spec/lanes/models/ServerCacheSpec.coffee +0 -65
data/npm-build/compile.coffee
DELETED
@@ -1,19 +0,0 @@
|
|
1
|
-
#!/usr/bin/env coffee
|
2
|
-
|
3
|
-
browserify = require 'browserify'
|
4
|
-
fs = require 'fs'
|
5
|
-
path = require 'path'
|
6
|
-
|
7
|
-
compile = (name) ->
|
8
|
-
console.log "compiling #{name}"
|
9
|
-
ignore = if name = 'base' then '' else 'react'
|
10
|
-
dest = path.join(__dirname, "../client/lanes/vendor/#{name}.js")
|
11
|
-
browserify({ debug: false })
|
12
|
-
.exclude(ignore)
|
13
|
-
.require(require.resolve("./#{name}"), { entry: true })
|
14
|
-
.bundle()
|
15
|
-
.pipe(fs.createWriteStream(dest, 'utf8'))
|
16
|
-
|
17
|
-
|
18
|
-
for name in ['base', 'react-datagrid']
|
19
|
-
compile(name)
|
@@ -1,65 +0,0 @@
|
|
1
|
-
describe "Lanes.Models.ServerCache", ->
|
2
|
-
|
3
|
-
it "caches models", (done) ->
|
4
|
-
record = LT.makeModel({
|
5
|
-
cacheDuration: [5, 'seconds']
|
6
|
-
props: { id: 'integer', name: 'string' }
|
7
|
-
}, { id: 123 })
|
8
|
-
|
9
|
-
LT.syncSucceedWith(name: 'bob')
|
10
|
-
|
11
|
-
Lanes.Models.ServerCache.fetchRecord(record).then ->
|
12
|
-
expect(Lanes.Models.Sync.perform).toHaveBeenCalledWith('read', jasmine.any(Object))
|
13
|
-
expect(record.name).toEqual('bob')
|
14
|
-
|
15
|
-
Lanes.Models.Sync.perform.calls.reset()
|
16
|
-
record.clear()
|
17
|
-
record.id = 123
|
18
|
-
expect(record.name).toBeUndefined()
|
19
|
-
Lanes.Models.ServerCache.fetchRecord(record).then ->
|
20
|
-
expect(Lanes.Models.Sync.perform).not.toHaveBeenCalled()
|
21
|
-
expect(record.name).toEqual('bob')
|
22
|
-
done()
|
23
|
-
|
24
|
-
|
25
|
-
it "caches collections", (done) ->
|
26
|
-
record = LT.makeModel({
|
27
|
-
cacheDuration: [5, 'seconds']
|
28
|
-
props: { id: 'integer', name: 'string' }
|
29
|
-
}, { id: 123 })
|
30
|
-
|
31
|
-
collection = Lanes.Test.makeCollection
|
32
|
-
cacheDuration: [5, 'milliseconds']
|
33
|
-
model: LT.defineModel
|
34
|
-
props: { id: 'integer', name: 'string' }
|
35
|
-
|
36
|
-
LT.syncSucceedWith([{id:1, name: 'bob'}, {id:2, name: 'joe'}])
|
37
|
-
|
38
|
-
Lanes.Models.ServerCache.fetchCollection(collection).then ->
|
39
|
-
expect(Lanes.Models.Sync.perform).toHaveBeenCalledWith('read', jasmine.any(Object))
|
40
|
-
expect(collection.length).toEqual(3)
|
41
|
-
Lanes.Models.Sync.perform.calls.reset()
|
42
|
-
Lanes.Models.ServerCache.fetchCollection(collection).then ->
|
43
|
-
expect(Lanes.Models.Sync.perform).not.toHaveBeenCalled()
|
44
|
-
done()
|
45
|
-
|
46
|
-
it "expires the cache", (done) ->
|
47
|
-
record = LT.makeModel({
|
48
|
-
cacheDuration: [5, 'milliseconds']
|
49
|
-
props: { id: 'integer', name: 'string' }
|
50
|
-
}, { id: 123 })
|
51
|
-
|
52
|
-
LT.syncSucceedWith(name: 'bob')
|
53
|
-
|
54
|
-
Lanes.Models.ServerCache.fetchRecord(record).then ->
|
55
|
-
expect(Lanes.Models.Sync.perform).toHaveBeenCalled()
|
56
|
-
Lanes.Models.Sync.perform.calls.reset()
|
57
|
-
|
58
|
-
Lanes.Models.ServerCache.fetchRecord(record).then ->
|
59
|
-
expect(Lanes.Models.Sync.perform).not.toHaveBeenCalled()
|
60
|
-
|
61
|
-
_.delay( ->
|
62
|
-
Lanes.Models.ServerCache.fetchRecord(record).then ->
|
63
|
-
expect(Lanes.Models.Sync.perform).toHaveBeenCalled()
|
64
|
-
done()
|
65
|
-
, 10)
|