lanes 0.1.8 → 0.1.9
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Rakefile +0 -1
- data/client/lanes/{screens/Instance.coffee → Boot.coffee} +5 -5
- data/client/lanes/Config.coffee +2 -0
- data/client/lanes/components/multi-select/MultiSelect.coffee +20 -6
- data/client/lanes/components/popover/PopOver.coffee +5 -2
- data/client/lanes/components/record-finder/RecordFinder.coffee +12 -7
- data/client/lanes/components/record-finder/config.json +1 -1
- data/client/lanes/components/select-field/SelectField.coffee +8 -8
- data/client/lanes/index.js +1 -0
- data/client/lanes/index.scss.erb +1 -1
- data/client/lanes/lib/MakeBaseClass.coffee +12 -0
- data/client/lanes/lib/loader.coffee +3 -1
- data/client/lanes/lib/namespace.coffee +1 -1
- data/client/lanes/lib/utilFunctions.coffee +13 -1
- data/client/lanes/models/{ModelAssociations.coffee → AssociationMap.coffee} +12 -9
- data/client/lanes/models/Base.coffee +40 -14
- data/client/lanes/models/Collection.coffee +6 -2
- data/client/lanes/models/EnumMap.coffee +25 -0
- data/client/lanes/models/PubSub.coffee +2 -2
- data/client/lanes/models/Query.coffee +1 -1
- data/client/lanes/models/ServerCache.coffee +63 -0
- data/client/lanes/models/Sync.coffee +11 -13
- data/client/lanes/models/index.js +3 -1
- data/client/lanes/screens/Base.coffee +1 -1
- data/client/lanes/screens/Definitions.coffee +1 -1
- data/client/lanes/screens/index.js +1 -1
- data/client/lanes/screens/mixins/Editing.coffee +38 -0
- data/client/lanes/screens/mixins/index.js +1 -0
- data/client/lanes/styles/plugins/overlay.scss +7 -0
- data/client/lanes/testing/BeforeEach.coffee +62 -0
- data/client/lanes/testing/ModelSaver.coffee +5 -6
- data/client/lanes/testing/TestModels.coffee +23 -0
- data/client/lanes/testing/index.js +3 -1
- data/client/lanes/vendor/packaged.js +5860 -26
- data/client/lanes/views/Base.coffee +20 -20
- data/client/lanes/views/FormBindings.coffee +4 -2
- data/client/lanes/views/RenderContext.coffee +2 -2
- data/client/lanes/workspace/Layout.coffee +6 -2
- data/client/lanes/workspace/Navbar.coffee +1 -1
- data/client/lanes/workspace/Pages.coffee +1 -1
- data/client/lanes/workspace/navbar.html +3 -1
- data/client/lanes/workspace/styles/header.scss +3 -1
- data/lib/lanes/access/authentication_provider.rb +2 -2
- data/lib/lanes/access/config/routes.rb +1 -1
- data/lib/lanes/access/extension.rb +1 -4
- data/lib/lanes/access/role.rb +20 -15
- data/lib/lanes/access/test_fixture_extensions.rb +20 -0
- data/lib/lanes/access.rb +3 -3
- data/lib/lanes/api/request_wrapper.rb +3 -2
- data/lib/lanes/api/sprockets_extension.rb +1 -1
- data/lib/lanes/api/test_specs.rb +1 -1
- data/lib/lanes/capistrano.rb +18 -6
- data/lib/lanes/command/app.rb +1 -1
- data/lib/lanes/command/generate_model.rb +6 -0
- data/lib/lanes/command/generate_view.rb +7 -6
- data/lib/lanes/command/named_command.rb +1 -1
- data/lib/lanes/concerns/all.rb +1 -0
- data/lib/lanes/concerns/code_identifier.rb +43 -0
- data/lib/lanes/concerns/set_attribute_data.rb +0 -8
- data/lib/lanes/configuration.rb +1 -1
- data/lib/lanes/db.rb +11 -9
- data/lib/lanes/extension.rb +1 -0
- data/lib/lanes/guard_tasks.rb +1 -1
- data/lib/lanes/model.rb +1 -0
- data/lib/lanes/rake_tasks.rb +0 -2
- data/lib/lanes/screen.rb +1 -4
- data/lib/lanes/spec_helper.rb +5 -2
- data/lib/lanes/version.rb +1 -1
- data/npm-build/package.json +1 -0
- data/npm-build/template.js +1 -0
- data/spec/command-reference-files/initial/Gemfile +4 -1
- data/spec/command-reference-files/initial/client/appy-app/Extension.coffee +11 -1
- data/spec/command-reference-files/initial/config/lanes.rb +4 -1
- data/spec/command-reference-files/initial/lib/appy-app/extension.rb +12 -1
- data/spec/command-reference-files/initial/lib/appy-app.rb +0 -1
- data/spec/command-reference-files/model/lib/appy-app/model.rb +12 -0
- data/spec/command-reference-files/model/lib/appy-app.rb +11 -0
- data/spec/command-reference-files/view/client/appy-app/views/BigView.coffee +1 -0
- data/spec/lanes/helpers/lanes-helpers.coffee +0 -79
- data/spec/lanes/models/{ModelAssociationsSpec.coffee → AssociationMapSpec.coffee} +0 -0
- data/spec/lanes/models/BaseSpec.coffee +25 -12
- data/spec/lanes/models/CollectionSpec.coffee +20 -0
- data/spec/lanes/models/EnumMapSpec.coffee +26 -0
- data/spec/server/command_spec.rb +1 -1
- data/templates/Gemfile +4 -1
- data/templates/client/Extension.coffee +11 -1
- data/templates/client/views/View.coffee +2 -1
- data/templates/config/lanes.rb +4 -1
- data/templates/lib/namespace/extension.rb +12 -1
- data/templates/lib/namespace.rb +0 -1
- data/templates/spec/client/views/ViewSpec.coffee +1 -1
- metadata +16 -6
- data/spec/command-reference-files/initial/lib/appy-app/models/empty.rb +0 -0
data/lib/lanes/extension.rb
CHANGED
@@ -94,6 +94,7 @@ module Lanes
|
|
94
94
|
csrf_token: Rack::Csrf.csrf_token(view.env),
|
95
95
|
controlling_extension: controlling.identifier,
|
96
96
|
root_view: Lanes.config.root_view,
|
97
|
+
assets_path_prefix: Lanes.config.assets_path_prefix,
|
97
98
|
api_path: Lanes.config.mounted_at,
|
98
99
|
environment: Lanes.config.environment,
|
99
100
|
initial_workspace_screen_id: Lanes.config.initial_workspace_screen_id,
|
data/lib/lanes/guard_tasks.rb
CHANGED
@@ -38,7 +38,7 @@ module Lanes
|
|
38
38
|
|
39
39
|
dsl.guard :minitest, minitest_options do
|
40
40
|
dsl.watch(%r{^spec/server/spec_helper\.rb}) { 'test' }
|
41
|
-
dsl.watch(%r{^spec/server
|
41
|
+
dsl.watch(%r{^spec/server/.*_spec\.rb})
|
42
42
|
dsl.watch(%r{^spec/fixtures/#{app_name}/(.+)s\.yml}) { |m| "spec/server/#{m[1]}_spec.rb" }
|
43
43
|
dsl.watch(%r{^lib/#{app_name}/(.+)\.rb}) { |m| "spec/server/#{m[1]}_spec.rb" }
|
44
44
|
matchers.server_matches.call if matchers.server_matches
|
data/lib/lanes/model.rb
CHANGED
data/lib/lanes/rake_tasks.rb
CHANGED
@@ -18,7 +18,6 @@ task :console do
|
|
18
18
|
IRB.start
|
19
19
|
end
|
20
20
|
|
21
|
-
|
22
21
|
# ## quite a bit of this is cribbed from Sinatra ActiveRecord
|
23
22
|
load 'active_record/railties/databases.rake'
|
24
23
|
|
@@ -32,7 +31,6 @@ task :routes do
|
|
32
31
|
end
|
33
32
|
end
|
34
33
|
|
35
|
-
|
36
34
|
namespace :db do
|
37
35
|
task :environment do
|
38
36
|
Lanes::DB.configure_rake_environment
|
data/lib/lanes/screen.rb
CHANGED
@@ -78,10 +78,7 @@ module Lanes
|
|
78
78
|
attr_accessor_with_default :css
|
79
79
|
|
80
80
|
def assets
|
81
|
-
|
82
|
-
paths << "#{Lanes.config.assets_path_prefix}/#{js}" unless js.blank?
|
83
|
-
paths << "#{Lanes.config.assets_path_prefix}/#{css}" unless css.blank?
|
84
|
-
paths
|
81
|
+
[js, css].reject{|asset| asset.blank? }
|
85
82
|
end
|
86
83
|
|
87
84
|
def to_json
|
data/lib/lanes/spec_helper.rb
CHANGED
@@ -11,7 +11,7 @@ require 'minitest/spec'
|
|
11
11
|
require 'minitest/autorun'
|
12
12
|
require 'mocha/mini_test'
|
13
13
|
|
14
|
-
|
14
|
+
LANES_ENV = "test"
|
15
15
|
I18n.enforce_available_locales = true
|
16
16
|
Lanes::DB.establish_connection('test')
|
17
17
|
Lanes.logger=Logger.new( File.open('log/test.log', File::WRONLY | File::APPEND | File::CREAT ))
|
@@ -36,7 +36,7 @@ module Lanes
|
|
36
36
|
include Lanes
|
37
37
|
|
38
38
|
include ActiveRecord::TestFixtures
|
39
|
-
|
39
|
+
self.fixture_path = Lanes::Extensions.controlling.root_path.join('spec','fixtures')
|
40
40
|
|
41
41
|
self.use_transactional_fixtures = true
|
42
42
|
fixtures :all
|
@@ -138,3 +138,6 @@ module MiniTest
|
|
138
138
|
end
|
139
139
|
end
|
140
140
|
end
|
141
|
+
|
142
|
+
|
143
|
+
require_relative 'access/test_fixture_extensions'
|
data/lib/lanes/version.rb
CHANGED
data/npm-build/package.json
CHANGED
data/npm-build/template.js
CHANGED
@@ -16,6 +16,7 @@ Lanes.Vendor.KeyMaster = require("keymaster");
|
|
16
16
|
Lanes.Vendor.Moment = require("moment");
|
17
17
|
Lanes.Vendor.RSVP = require('rsvp');
|
18
18
|
Lanes.Vendor.domify = require('domify');
|
19
|
+
Lanes.Vendor.interact = require('interact.js');
|
19
20
|
Lanes.Vendor.BBEvents = require('backbone-events-standalone');
|
20
21
|
Lanes.dom = require('ampersand-dom');
|
21
22
|
var u = require('underscore');
|
@@ -1,6 +1,16 @@
|
|
1
|
+
# This is the client-side version of AppyApp::Extension
|
1
2
|
class AppyApp.Extension extends Lanes.Extensions.Base
|
2
3
|
|
3
|
-
|
4
|
+
# must match the identier in
|
4
5
|
identifier: "appy-app"
|
5
6
|
|
7
|
+
# This method is called when the extension is registered
|
8
|
+
# Not all of Lanes will be available yet
|
9
|
+
onRegistered: ->
|
10
|
+
|
11
|
+
# Data that is provided by AppyApp::Extension#client_bootstrap_data
|
12
|
+
# in lib/appy-app/extension.rb is passed to this method
|
6
13
|
setBootstrapData: (data)->
|
14
|
+
|
15
|
+
# All of lanes is loaded and it is in the process of booting
|
16
|
+
onAvailable: ->
|
@@ -3,5 +3,8 @@
|
|
3
3
|
#
|
4
4
|
# It will not be evaluated if another extension is loading this one
|
5
5
|
Lanes.configure do | config |
|
6
|
-
|
6
|
+
# You can specify a different initial vew by setting it here
|
7
|
+
# It must be set if the "Workspace" extension is disabled in
|
8
|
+
# lib/appy-app/extension.rb
|
9
|
+
# config.root_view = "AppyApp.Screens.<View Name>"
|
7
10
|
end
|
@@ -1,4 +1,15 @@
|
|
1
|
-
require_relative
|
1
|
+
require_relative "../appy-app"
|
2
|
+
|
3
|
+
# This will load the "Workspace" extension, which provides
|
4
|
+
# a menu and tab based switching between screens.
|
5
|
+
require "lanes/workspace/extension"
|
6
|
+
|
7
|
+
# This will load the "Access" extension, which provides
|
8
|
+
# Role based user access controls. Before enabling it
|
9
|
+
# make sure that you have created some users in db/seed.rb
|
10
|
+
#
|
11
|
+
# require "lanes/workspace/access"
|
12
|
+
|
2
13
|
|
3
14
|
module AppyApp
|
4
15
|
|
@@ -1,84 +1,5 @@
|
|
1
|
-
Lanes.namespace 'Test'
|
2
|
-
|
3
|
-
View = undefined
|
4
|
-
Model = undefined
|
5
|
-
Collection = undefined
|
6
|
-
|
7
|
-
class Lanes.Test.DummyView extends Lanes.Views.Base
|
8
|
-
template: "<p>hi</p"
|
9
|
-
events: { "click #mylink": 'onClick' }
|
10
|
-
onClick: Lanes.emptyFn
|
11
|
-
|
12
|
-
class Lanes.Test.DummyModel extends Lanes.Models.Base
|
13
|
-
api_path: -> "test"
|
14
|
-
props:
|
15
|
-
id: 'number',
|
16
|
-
name: ['string', true],
|
17
|
-
html: 'string',
|
18
|
-
url: 'string',
|
19
|
-
something: 'string',
|
20
|
-
fireDanger: 'string'
|
21
|
-
|
22
|
-
session:
|
23
|
-
active: 'boolean'
|
24
|
-
|
25
|
-
derived:
|
26
|
-
classes:
|
27
|
-
deps: ['something', 'fireDanger', 'active'],
|
28
|
-
fn: -> this.something + this.active;
|
29
|
-
|
30
|
-
Lanes.Test.makeModel = (props={}, args={})->
|
31
|
-
_.extend(Model.prototype, props)
|
32
|
-
Lanes.Models.Base.extend(Model)
|
33
|
-
Collection::model = Model
|
34
|
-
Lanes.Models.Collection.extend(Collection)
|
35
|
-
collection = new Collection
|
36
|
-
return collection.add(new Model(args))
|
37
|
-
|
38
|
-
Lanes.Test.makeView = (props={}, args={})->
|
39
|
-
_.extend(View.prototype, props)
|
40
|
-
Lanes.Views.Base.extend(View)
|
41
|
-
return new View(args)
|
42
|
-
|
43
|
-
syncResponse = (method, model, options)->
|
44
|
-
_.defer ->
|
45
|
-
if options.success && syncReply.success
|
46
|
-
options.success(syncReply, "success", {})
|
47
|
-
if options.failure && !syncReply.success
|
48
|
-
options.failure(syncReply, "failure", {})
|
49
|
-
_.Promise.resolve(model, options)
|
50
|
-
|
51
|
-
syncReply = {}
|
52
|
-
|
53
1
|
Lanes.Vendor.MessageBus = {
|
54
2
|
subscribe: jasmine.createSpy('subscribe')
|
55
3
|
unsubscribe: jasmine.createSpy('unsubscribe')
|
56
4
|
start: Lanes.emptyFn
|
57
5
|
}
|
58
|
-
|
59
|
-
window.syncSucceedWith = (data)->
|
60
|
-
syncReply.success = true
|
61
|
-
syncReply.data = data
|
62
|
-
|
63
|
-
beforeEach ->
|
64
|
-
class TestModel
|
65
|
-
constructor: -> super
|
66
|
-
Model = TestModel
|
67
|
-
class TestCollection
|
68
|
-
constructor: -> super
|
69
|
-
Collection = TestCollection
|
70
|
-
class TestView
|
71
|
-
constructor: -> super
|
72
|
-
View = TestView
|
73
|
-
|
74
|
-
syncReply = {
|
75
|
-
success: true
|
76
|
-
message: ''
|
77
|
-
data: {}
|
78
|
-
}
|
79
|
-
|
80
|
-
Lanes.Test.syncSpy = jasmine.createSpy('sync').and.callFake(syncResponse)
|
81
|
-
Lanes.Test.syncSpy.lastOptions = ->
|
82
|
-
this.calls.mostRecent().args[2]
|
83
|
-
Lanes.Models.Base::sync = Lanes.Test.syncSpy
|
84
|
-
Lanes.Models.Collection::sync = Lanes.Test.syncSpy
|
File without changes
|
@@ -65,15 +65,15 @@ describe "Lanes.Models.Base", ->
|
|
65
65
|
expect(model.isDirty).toBe(true)
|
66
66
|
expect(model.unsavedAttributes()).toEqual( foo: 'one, two, three' )
|
67
67
|
model.save()
|
68
|
-
expect(
|
68
|
+
expect(Lanes.Models.Sync.perform).toHaveBeenCalledWith('create', model, jasmine.any(Object))
|
69
69
|
model.id=11
|
70
70
|
expect(model.isNew()).toBe(false)
|
71
|
-
|
71
|
+
Lanes.Models.Sync.perform.calls.reset()
|
72
72
|
syncSucceedWith({
|
73
73
|
foo: 'a new foo value'
|
74
74
|
})
|
75
75
|
model.save().then ->
|
76
|
-
expect(
|
76
|
+
expect(Lanes.Models.Sync.perform).toHaveBeenCalledWith('patch', model, jasmine.any(Object))
|
77
77
|
expect(model.foo).toEqual('a new foo value')
|
78
78
|
done()
|
79
79
|
|
@@ -86,9 +86,9 @@ describe "Lanes.Models.Base", ->
|
|
86
86
|
foo: 'foo value'
|
87
87
|
})
|
88
88
|
model.fetch().then ->
|
89
|
-
expect(
|
89
|
+
expect(Lanes.Models.Sync.perform).toHaveBeenCalledWith('read', model, jasmine.any(Object))
|
90
90
|
expect(model.foo).toEqual('foo value')
|
91
|
-
options =
|
91
|
+
options = Lanes.Models.Sync.perform.lastOptions()
|
92
92
|
expect(options).toHaveTrue('ignoreUnsaved')
|
93
93
|
expect(options).toHaveNumberWithinRange('limit',1,1)
|
94
94
|
done()
|
@@ -111,7 +111,7 @@ describe "Lanes.Models.Base", ->
|
|
111
111
|
{ id: 2, title: 'second value' }
|
112
112
|
])
|
113
113
|
Model.where(title: 'first value').whenLoaded (collection)->
|
114
|
-
options =
|
114
|
+
options = Lanes.Models.Sync.perform.lastOptions()
|
115
115
|
expect(options.query).toEqual({title:'first value'})
|
116
116
|
expect(collection.length).toEqual(2)
|
117
117
|
done()
|
@@ -120,12 +120,10 @@ describe "Lanes.Models.Base", ->
|
|
120
120
|
model = Lanes.Test.makeModel({
|
121
121
|
props: { id: 'integer' }
|
122
122
|
},{ id: 1 })
|
123
|
-
collection = model.
|
124
|
-
expect(collection.length).toEqual(1)
|
123
|
+
collection = model.constructor.Collection
|
125
124
|
model.destroy().then ->
|
126
|
-
expect(
|
125
|
+
expect(Lanes.Models.Sync.perform)
|
127
126
|
.toHaveBeenCalledWith('delete', model, jasmine.any(Object))
|
128
|
-
expect(collection.length).toEqual(0)
|
129
127
|
done()
|
130
128
|
|
131
129
|
it "sets associations", ->
|
@@ -147,6 +145,21 @@ describe "Lanes.Models.Base", ->
|
|
147
145
|
props: { id: 'integer', foo: 'string' }
|
148
146
|
},{ id: 1 })
|
149
147
|
model.withAssociations('color')
|
150
|
-
expect(
|
151
|
-
options =
|
148
|
+
expect(Lanes.Models.Sync.perform).toHaveBeenCalledWith('read', model, jasmine.any(Object))
|
149
|
+
options = Lanes.Models.Sync.perform.lastOptions()
|
152
150
|
expect(options.include).toEqual(['color'])
|
151
|
+
|
152
|
+
it "reads from caches", (done)->
|
153
|
+
model = Lanes.Test.makeModel({
|
154
|
+
cacheDuration: [1,'day']
|
155
|
+
props: { id: 'integer', title: 'string' }
|
156
|
+
}, {id: 1})
|
157
|
+
syncSucceedWith([
|
158
|
+
{ id: 1, title: 'first value' }
|
159
|
+
{ id: 2, title: 'second value' }
|
160
|
+
])
|
161
|
+
collection = new model.constructor.Collection
|
162
|
+
collection.fetch().then ->
|
163
|
+
model.fetch().then ->
|
164
|
+
expect(model.title).toEqual('first value')
|
165
|
+
done()
|
@@ -25,3 +25,23 @@ describe "Lanes.Models.Collection", ->
|
|
25
25
|
spy.calls.reset()
|
26
26
|
collection.reset([{ id:11, title: 'last'}])
|
27
27
|
expect(spy).toHaveBeenCalled()
|
28
|
+
|
29
|
+
|
30
|
+
it "caches", (done)->
|
31
|
+
model = Lanes.Test.makeModel({
|
32
|
+
cacheDuration: [1,'day']
|
33
|
+
props: { id: 'integer', title: 'string' }
|
34
|
+
})
|
35
|
+
syncSucceedWith([
|
36
|
+
{ id: 1, title: 'first value' }
|
37
|
+
{ id: 2, title: 'second value' }
|
38
|
+
])
|
39
|
+
collection = new model.constructor.Collection
|
40
|
+
collection.fetch().then ->
|
41
|
+
expect(collection.length).toEqual 2
|
42
|
+
expect(Lanes.Models.Sync.perform).toHaveBeenCalled()
|
43
|
+
Lanes.Models.Sync.perform.calls.reset()
|
44
|
+
collection.fetch().then ->
|
45
|
+
expect(Lanes.Models.Sync.perform).not.toHaveBeenCalled()
|
46
|
+
expect(collection.length).toEqual 2
|
47
|
+
done()
|
@@ -0,0 +1,26 @@
|
|
1
|
+
describe "Lanes.Models.EnumMap", ->
|
2
|
+
model = null
|
3
|
+
|
4
|
+
beforeEach ->
|
5
|
+
model = Lanes.Test.makeModel({
|
6
|
+
enums:
|
7
|
+
state:
|
8
|
+
open: 1
|
9
|
+
complete: 5
|
10
|
+
canceled: 9
|
11
|
+
|
12
|
+
props:
|
13
|
+
state: {"type":"integer"}
|
14
|
+
|
15
|
+
},{ id: 123 })
|
16
|
+
|
17
|
+
xit "sets up enums", ->
|
18
|
+
expect(model.is_open).toEqual(false)
|
19
|
+
model.state = 1
|
20
|
+
expect(model.is_open).toEqual(true)
|
21
|
+
model.is_open="some crazy value"
|
22
|
+
expect(model.is_open).toEqual(true)
|
23
|
+
|
24
|
+
it "reads the enum's value from the field", ->
|
25
|
+
model.state = 1
|
26
|
+
expect(model.state_value).toEqual("open")
|
data/spec/server/command_spec.rb
CHANGED
@@ -27,7 +27,7 @@ describe Lanes::Command do
|
|
27
27
|
generated = generated_path.join(relative)
|
28
28
|
assert generated.exist?, "File was not created: #{relative}"
|
29
29
|
next unless path.file?
|
30
|
-
diff = Diffy::Diff.new(
|
30
|
+
diff = Diffy::Diff.new(path.to_s, generated.to_s, source: 'files', context: 1)
|
31
31
|
assert diff.to_s.empty?, "#{relative}\n #{diff}"
|
32
32
|
end
|
33
33
|
end
|
data/templates/Gemfile
CHANGED
@@ -1,6 +1,9 @@
|
|
1
1
|
source 'https://rubygems.org'
|
2
2
|
|
3
|
-
|
3
|
+
# For development while Lanes is evolving track master branch
|
4
|
+
gem "lanes", github: 'argosity/lanes', branch: 'master'
|
5
|
+
|
6
|
+
# gem "lanes", '<%= Lanes::VERSION %>'
|
4
7
|
|
5
8
|
gem "rake"
|
6
9
|
gem 'puma'
|
@@ -1,6 +1,16 @@
|
|
1
|
+
# This is the client-side version of <%= namespace %>::Extension
|
1
2
|
class <%= namespace %>.Extension extends Lanes.Extensions.Base
|
2
3
|
|
3
|
-
|
4
|
+
# must match the identier in
|
4
5
|
identifier: "<%= identifier %>"
|
5
6
|
|
7
|
+
# This method is called when the extension is registered
|
8
|
+
# Not all of Lanes will be available yet
|
9
|
+
onRegistered: ->
|
10
|
+
|
11
|
+
# Data that is provided by <%= namespace %>::Extension#client_bootstrap_data
|
12
|
+
# in lib/<%= identifier %>/extension.rb is passed to this method
|
6
13
|
setBootstrapData: (data)->
|
14
|
+
|
15
|
+
# All of lanes is loaded and it is in the process of booting
|
16
|
+
onAvailable: ->
|
@@ -1,5 +1,6 @@
|
|
1
|
-
class <%=
|
1
|
+
class <%= view_class %> extends <%= namespace %>.Views.Base
|
2
2
|
|
3
|
+
template: '<h3><%= view_class %></h3>'
|
3
4
|
|
4
5
|
## These are listed only as examples.
|
5
6
|
# If unused they can be safely removed.
|
data/templates/config/lanes.rb
CHANGED
@@ -3,5 +3,8 @@
|
|
3
3
|
#
|
4
4
|
# It will not be evaluated if another extension is loading this one
|
5
5
|
Lanes.configure do | config |
|
6
|
-
|
6
|
+
# You can specify a different initial vew by setting it here
|
7
|
+
# It must be set if the "Workspace" extension is disabled in
|
8
|
+
# lib/<%= identifier %>/extension.rb
|
9
|
+
# config.root_view = "<%= class_name %>.Screens.<View Name>"
|
7
10
|
end
|
@@ -1,4 +1,15 @@
|
|
1
|
-
require_relative
|
1
|
+
require_relative "../<%= identifier %>"
|
2
|
+
|
3
|
+
# This will load the "Workspace" extension, which provides
|
4
|
+
# a menu and tab based switching between screens.
|
5
|
+
require "lanes/workspace/extension"
|
6
|
+
|
7
|
+
# This will load the "Access" extension, which provides
|
8
|
+
# Role based user access controls. Before enabling it
|
9
|
+
# make sure that you have created some users in db/seed.rb
|
10
|
+
#
|
11
|
+
# require "lanes/workspace/access"
|
12
|
+
|
2
13
|
|
3
14
|
module <%= namespace %>
|
4
15
|
|
data/templates/lib/namespace.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: lanes
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.9
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Nathan Stitt
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-
|
11
|
+
date: 2015-04-24 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activerecord
|
@@ -470,6 +470,7 @@ files:
|
|
470
470
|
- client/images/lanes/dataTables/sort_desc.png
|
471
471
|
- client/images/lanes/dataTables/sort_desc_disabled.png
|
472
472
|
- client/images/lanes/logo-sm.png
|
473
|
+
- client/lanes/Boot.coffee
|
473
474
|
- client/lanes/Config.coffee
|
474
475
|
- client/lanes/access/Extension.coffee
|
475
476
|
- client/lanes/access/LoginDialog.coffee
|
@@ -551,14 +552,16 @@ files:
|
|
551
552
|
- client/lanes/lib/promise_helpers.coffee
|
552
553
|
- client/lanes/lib/results.coffee
|
553
554
|
- client/lanes/lib/utilFunctions.coffee
|
555
|
+
- client/lanes/models/AssociationMap.coffee
|
554
556
|
- client/lanes/models/Base.coffee
|
555
557
|
- client/lanes/models/Bootstrap.coffee
|
556
558
|
- client/lanes/models/ChangeMonitor.coffee
|
557
559
|
- client/lanes/models/ChangeSet.coffee
|
558
560
|
- client/lanes/models/Collection.coffee
|
559
|
-
- client/lanes/models/
|
561
|
+
- client/lanes/models/EnumMap.coffee
|
560
562
|
- client/lanes/models/PubSub.coffee
|
561
563
|
- client/lanes/models/Query.coffee
|
564
|
+
- client/lanes/models/ServerCache.coffee
|
562
565
|
- client/lanes/models/Sync.coffee
|
563
566
|
- client/lanes/models/User.coffee
|
564
567
|
- client/lanes/models/index.js
|
@@ -569,10 +572,11 @@ files:
|
|
569
572
|
- client/lanes/screens/Base.coffee
|
570
573
|
- client/lanes/screens/ChangeListener.coffee
|
571
574
|
- client/lanes/screens/Definitions.coffee
|
572
|
-
- client/lanes/screens/Instance.coffee
|
573
575
|
- client/lanes/screens/Router.coffee
|
574
576
|
- client/lanes/screens/all.js.erb
|
575
577
|
- client/lanes/screens/index.js
|
578
|
+
- client/lanes/screens/mixins/Editing.coffee
|
579
|
+
- client/lanes/screens/mixins/index.js
|
576
580
|
- client/lanes/screens/register.js.erb
|
577
581
|
- client/lanes/styles/bootstrap-custom-grid.scss
|
578
582
|
- client/lanes/styles/bootstrap-custom-modals.scss
|
@@ -722,7 +726,9 @@ files:
|
|
722
726
|
- client/lanes/styles/plugins/all.scss
|
723
727
|
- client/lanes/styles/plugins/overlay.scss
|
724
728
|
- client/lanes/styles/plugins/resize-sensor.scss
|
729
|
+
- client/lanes/testing/BeforeEach.coffee
|
725
730
|
- client/lanes/testing/ModelSaver.coffee
|
731
|
+
- client/lanes/testing/TestModels.coffee
|
726
732
|
- client/lanes/testing/index.js
|
727
733
|
- client/lanes/vendor/bootstrap/affix.js
|
728
734
|
- client/lanes/vendor/bootstrap/alert.js
|
@@ -808,6 +814,7 @@ files:
|
|
808
814
|
- lib/lanes/access/role_collection.rb
|
809
815
|
- lib/lanes/access/roles/administrator.rb
|
810
816
|
- lib/lanes/access/roles/support.rb
|
817
|
+
- lib/lanes/access/test_fixture_extensions.rb
|
811
818
|
- lib/lanes/access/track_modifications.rb
|
812
819
|
- lib/lanes/access/user.rb
|
813
820
|
- lib/lanes/access/version.rb
|
@@ -854,6 +861,7 @@ files:
|
|
854
861
|
- lib/lanes/concerns/api_path.rb
|
855
862
|
- lib/lanes/concerns/association_extensions.rb
|
856
863
|
- lib/lanes/concerns/attr_accessor_with_default.rb
|
864
|
+
- lib/lanes/concerns/code_identifier.rb
|
857
865
|
- lib/lanes/concerns/export_associations.rb
|
858
866
|
- lib/lanes/concerns/export_join_tables.rb
|
859
867
|
- lib/lanes/concerns/export_methods.rb
|
@@ -914,7 +922,6 @@ files:
|
|
914
922
|
- spec/command-reference-files/initial/lib/appy-app.rb
|
915
923
|
- spec/command-reference-files/initial/lib/appy-app/extension.rb
|
916
924
|
- spec/command-reference-files/initial/lib/appy-app/model.rb
|
917
|
-
- spec/command-reference-files/initial/lib/appy-app/models/empty.rb
|
918
925
|
- spec/command-reference-files/initial/lib/appy-app/version.rb
|
919
926
|
- spec/command-reference-files/initial/spec/appy-app/helpers/AppyAppHelpers.coffee
|
920
927
|
- spec/command-reference-files/initial/spec/appy-app/screens/Base.coffee
|
@@ -922,6 +929,8 @@ files:
|
|
922
929
|
- spec/command-reference-files/model/client/appy-app/models/TestTest.coffee
|
923
930
|
- spec/command-reference-files/model/config/routes.rb
|
924
931
|
- spec/command-reference-files/model/db/migrate/20150218032025_create_test_tests.rb
|
932
|
+
- spec/command-reference-files/model/lib/appy-app.rb
|
933
|
+
- spec/command-reference-files/model/lib/appy-app/model.rb
|
925
934
|
- spec/command-reference-files/model/lib/appy-app/models/test_test.rb
|
926
935
|
- spec/command-reference-files/model/spec/appy-app/models/TestTestSpec.coffee
|
927
936
|
- spec/command-reference-files/model/spec/fixtures/appy-app/test_test.yml
|
@@ -939,9 +948,10 @@ files:
|
|
939
948
|
- spec/lanes/helpers/jasmine-matchers.js
|
940
949
|
- spec/lanes/helpers/lanes-helpers.coffee
|
941
950
|
- spec/lanes/helpers/mock-ajax.js
|
951
|
+
- spec/lanes/models/AssociationMapSpec.coffee
|
942
952
|
- spec/lanes/models/BaseSpec.coffee
|
943
953
|
- spec/lanes/models/CollectionSpec.coffee
|
944
|
-
- spec/lanes/models/
|
954
|
+
- spec/lanes/models/EnumMapSpec.coffee
|
945
955
|
- spec/lanes/models/PubSubSpec.coffee
|
946
956
|
- spec/lanes/views/BaseSpec.coffee
|
947
957
|
- spec/lanes/views/FormBindingsSpec.coffee
|
File without changes
|