luca 0.9.91 → 0.9.899
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.
- data/CHANGELOG +1 -11
- data/Gemfile +0 -3
- data/Gemfile.lock +0 -30
- data/Rakefile +8 -2
- data/app/assets/javascripts/luca/components/collection_view.coffee +3 -7
- data/app/assets/javascripts/luca/components/grid_layout_view.coffee +1 -0
- data/app/assets/javascripts/luca/containers/card_view.coffee +2 -2
- data/app/assets/javascripts/luca/containers/modal_view.coffee +9 -9
- data/app/assets/javascripts/luca/containers/viewport.coffee +5 -2
- data/app/assets/javascripts/luca/core/collection.coffee +4 -18
- data/app/assets/javascripts/luca/core/model.coffee +1 -1
- data/app/assets/javascripts/luca/development/code_sync_manager.coffee +3 -6
- data/app/assets/javascripts/luca/framework.coffee +1 -1
- data/app/assets/stylesheets/luca/components/viewport.scss +4 -0
- data/bin/luca +2 -7
- data/lib/luca.rb +0 -2
- data/lib/luca/cli.rb +0 -3
- data/lib/luca/component_definition.rb +1 -1
- data/lib/luca/luca_application.rb +3 -5
- data/lib/luca/stylesheet.rb +3 -2
- data/lib/luca/version.rb +1 -1
- data/site/Gemfile +3 -1
- data/site/Gemfile.lock +42 -39
- data/site/config.rb +3 -3
- data/site/source/{app/assets/javascripts → javascripts}/dependencies.js.coffee +0 -0
- data/site/source/javascripts/docs/application.coffee +33 -0
- data/site/source/{app/assets/javascripts/docs/collections/luca_documentation.coffee → javascripts/docs/collections/framework_documentation.coffee} +2 -7
- data/site/source/{app/assets/javascripts → javascripts}/docs/collections/index.coffee +0 -0
- data/site/source/javascripts/docs/config.coffee +3 -0
- data/site/source/{app/assets/javascripts → javascripts}/docs/index.coffee +0 -0
- data/site/source/{app/assets/javascripts → javascripts}/docs/lib/router.coffee +0 -0
- data/site/source/{app/assets/javascripts → javascripts}/docs/lib/util.coffee +0 -0
- data/site/source/{app/assets/javascripts → javascripts}/docs/models/component.coffee +0 -0
- data/site/source/{app/assets/javascripts → javascripts}/docs/models/index.coffee +0 -0
- data/site/source/{app/assets/javascripts → javascripts}/docs/templates/component_documentation.jst.ejs +14 -14
- data/site/source/javascripts/docs/templates/home.jst.ejs +1 -0
- data/site/source/{app/assets/javascripts → javascripts}/docs/templates/layouts/main.jst.ejs +0 -0
- data/site/source/{app/assets/javascripts → javascripts}/docs/templates/left_navigation.jst.ejs +0 -0
- data/site/source/{app/assets/javascripts/docs/views/components/code_editor/index.coffee → javascripts/docs/templates/navigation.jst.ejs} +0 -0
- data/site/source/{app/assets/javascripts → javascripts}/docs/templates/pages/getting_started.jst.ejs +0 -0
- data/site/source/javascripts/docs/templates/pages/home.jst.ejs +31 -0
- data/site/source/javascripts/docs/views/components/.gitkeep +0 -0
- data/site/source/javascripts/docs/views/components/gist_editor/index.coffee +7 -0
- data/site/source/{app/assets/javascripts → javascripts}/docs/views/index.coffee +0 -0
- data/site/source/{app/assets/javascripts → javascripts}/docs/views/pages/browse_source.coffee +0 -9
- data/site/source/javascripts/docs/views/pages/browse_source/details.coffee +69 -0
- data/site/source/{app/assets/javascripts → javascripts}/docs/views/pages/browse_source/list.coffee +1 -1
- data/site/source/{app/assets/javascripts → javascripts}/docs/views/pages/home.coffee +0 -0
- data/site/source/{app/assets/javascripts → javascripts}/docs/views/views/top_navigation.coffee +0 -0
- data/site/source/{app/assets/javascripts/luca-framework-documentation.js → javascripts/luca-docs.js} +0 -0
- data/site/source/javascripts/site.js +1 -0
- data/site/source/javascripts/site.js.coffee +1 -0
- data/site/source/{app/assets/javascripts → javascripts}/vendor/codemirror.js +0 -0
- data/site/source/{app/assets/javascripts → javascripts}/vendor/coffeescript.js +0 -0
- data/site/source/{app/assets/javascripts → javascripts}/vendor/css.js +0 -0
- data/site/source/{app/assets/javascripts → javascripts}/vendor/htmlmixed.js +0 -0
- data/site/source/{app/assets/javascripts → javascripts}/vendor/javascript.js +0 -0
- data/site/source/javascripts/vendor/luca-dependencies.min.js +6 -0
- data/site/source/javascripts/vendor/luca.min.js +5 -0
- data/site/source/{app/assets/javascripts → javascripts}/vendor/modernizr-2.6.1.min.js +0 -0
- data/site/source/{app/assets/javascripts → javascripts}/vendor/vim.js +0 -0
- data/site/source/layouts/layout.haml +7 -12
- data/site/source/stylesheets/docs/application.css.scss +16 -0
- data/site/source/{app/assets/stylesheets → stylesheets}/docs/browse-source.css.scss +0 -0
- data/site/source/{app/assets/stylesheets → stylesheets}/site.css.scss +0 -0
- data/site/source/{app/assets/stylesheets → stylesheets}/vendor/codemirror.css +0 -0
- data/site/source/{app/assets/stylesheets → stylesheets}/vendor/twilight.css +0 -0
- data/spec/javascripts/containers/card_view_spec.coffee +5 -58
- data/spec/javascripts/core/collection_spec.coffee +1 -1
- data/vendor/assets/javascripts/luca-development.min.js +1 -1
- data/vendor/assets/javascripts/luca.full.min.js +5 -5
- data/vendor/assets/javascripts/luca.min.js +5 -5
- data/vendor/assets/stylesheets/luca-components.css +2 -0
- metadata +48 -151
- data/lib/luca/cli/server.rb +0 -20
- data/lib/luca/cli/sync.rb +0 -40
- data/lib/luca/cli/watch.rb +0 -16
- data/lib/luca/server.rb +0 -7
- data/lib/luca/watcher.rb +0 -72
- data/site/source/app/assets/javascripts/docs-docs.js +0 -1
- data/site/source/app/assets/javascripts/docs/application.coffee +0 -64
- data/site/source/app/assets/javascripts/docs/collections/docs_documentation.coffee +0 -17
- data/site/source/app/assets/javascripts/docs/collections/github_repositories.coffee +0 -7
- data/site/source/app/assets/javascripts/docs/collections/public_gists.coffee +0 -4
- data/site/source/app/assets/javascripts/docs/config.coffee +0 -5
- data/site/source/app/assets/javascripts/docs/models/github_repository.coffee +0 -3
- data/site/source/app/assets/javascripts/docs/templates/examples_browser/overview.jst.ejs +0 -4
- data/site/source/app/assets/javascripts/docs/templates/examples_browser/selector.jst.ejs +0 -11
- data/site/source/app/assets/javascripts/docs/templates/github_repository.jst.ejs +0 -4
- data/site/source/app/assets/javascripts/docs/templates/pages/home.jst.ejs +0 -57
- data/site/source/app/assets/javascripts/docs/views/components/code_editor.coffee +0 -45
- data/site/source/app/assets/javascripts/docs/views/components/component_documentation.coffee +0 -72
- data/site/source/app/assets/javascripts/docs/views/pages/browse_source/details.coffee +0 -37
- data/site/source/app/assets/javascripts/docs/views/pages/component_editor.coffee +0 -10
- data/site/source/app/assets/javascripts/docs/views/pages/examples_browser.coffee +0 -102
- data/site/source/app/assets/javascripts/docs/views/pages/examples_browser/docs.coffee +0 -12
- data/site/source/app/assets/javascripts/docs/views/pages/examples_browser/source.coffee +0 -13
- data/site/source/app/assets/javascripts/docs/views/views/api_browser/index.coffee +0 -43
- data/site/source/app/assets/javascripts/docs/views/views/collection_view_examples/grid_layout_view_example.coffee +0 -14
- data/site/source/app/assets/javascripts/docs/views/views/collection_view_examples/table_view_example.coffee +0 -39
- data/site/source/app/assets/javascripts/docs/views/views/form_view_examples/basic_example.coffee +0 -38
- data/site/source/app/assets/javascripts/docs/views/views/form_view_examples/complex_layout.coffee +0 -110
- data/site/source/app/assets/javascripts/luca-docs.js +0 -1
- data/site/source/app/assets/javascripts/site.js.coffee +0 -4
- data/site/source/app/assets/javascripts/vendor/js-beautify.js +0 -1353
- data/site/source/app/assets/stylesheets/docs/api-browser.css.scss +0 -5
- data/site/source/app/assets/stylesheets/docs/application.css.scss +0 -35
- data/site/source/app/assets/stylesheets/docs/scrollable-table.css.scss +0 -5
- data/site/source/app/assets/stylesheets/vendor/prettify-tomorrow-night-bright.css +0 -160
data/CHANGELOG
CHANGED
|
@@ -275,15 +275,5 @@
|
|
|
275
275
|
|
|
276
276
|
0.9.88
|
|
277
277
|
- Fixed a bug in StateModel concern
|
|
278
|
-
- Luca.View which define an @
|
|
278
|
+
- Luca.View which define an @_events property on their prototypes will have
|
|
279
279
|
that event configuration persist into @events of views which extend from them
|
|
280
|
-
|
|
281
|
-
0.9.9
|
|
282
|
-
- Added luca executable which includes:
|
|
283
|
-
- documentation generator
|
|
284
|
-
- sync command for running Luca.CodeSyncManager in development
|
|
285
|
-
- Removes some unused components
|
|
286
|
-
- API changes for Luca.components.Controller
|
|
287
|
-
- Removing rails dependencies
|
|
288
|
-
- Middleman site for documentation and examples
|
|
289
|
-
- Improving documentation for core components
|
data/Gemfile
CHANGED
data/Gemfile.lock
CHANGED
|
@@ -4,7 +4,6 @@ GEM
|
|
|
4
4
|
activesupport (3.2.12)
|
|
5
5
|
i18n (~> 0.6)
|
|
6
6
|
multi_json (~> 1.0)
|
|
7
|
-
addressable (2.3.2)
|
|
8
7
|
childprocess (0.3.8)
|
|
9
8
|
ffi (~> 1.0, >= 1.0.11)
|
|
10
9
|
coderay (1.0.9)
|
|
@@ -12,32 +11,12 @@ GEM
|
|
|
12
11
|
coffee-script-source
|
|
13
12
|
execjs
|
|
14
13
|
coffee-script-source (1.4.0)
|
|
15
|
-
cookiejar (0.3.0)
|
|
16
|
-
daemons (1.1.9)
|
|
17
14
|
diff-lcs (1.1.3)
|
|
18
15
|
ejs (1.1.1)
|
|
19
|
-
em-http-request (1.0.3)
|
|
20
|
-
addressable (>= 2.2.3)
|
|
21
|
-
cookiejar
|
|
22
|
-
em-socksify
|
|
23
|
-
eventmachine (>= 1.0.0.beta.4)
|
|
24
|
-
http_parser.rb (>= 0.5.3)
|
|
25
|
-
em-socksify (0.2.1)
|
|
26
|
-
eventmachine (>= 1.0.0.beta.4)
|
|
27
|
-
eventmachine (1.0.0)
|
|
28
16
|
execjs (1.4.0)
|
|
29
17
|
multi_json (~> 1.0)
|
|
30
18
|
faker (1.1.2)
|
|
31
19
|
i18n (~> 0.5)
|
|
32
|
-
faye (0.8.8)
|
|
33
|
-
cookiejar (>= 0.3.0)
|
|
34
|
-
em-http-request (>= 0.3.0)
|
|
35
|
-
eventmachine (>= 0.12.0)
|
|
36
|
-
faye-websocket (>= 0.4.0)
|
|
37
|
-
rack (>= 1.0.0)
|
|
38
|
-
yajl-ruby (>= 1.0.0)
|
|
39
|
-
faye-websocket (0.4.7)
|
|
40
|
-
eventmachine (>= 0.12.0)
|
|
41
20
|
ffi (1.4.0)
|
|
42
21
|
guard (1.6.2)
|
|
43
22
|
listen (>= 0.6.0)
|
|
@@ -63,7 +42,6 @@ GEM
|
|
|
63
42
|
execjs (>= 1.2.9)
|
|
64
43
|
sprockets (>= 2.0.3)
|
|
65
44
|
tilt (>= 1.3.3)
|
|
66
|
-
http_parser.rb (0.5.3)
|
|
67
45
|
i18n (0.6.1)
|
|
68
46
|
jasmine (1.3.1)
|
|
69
47
|
jasmine-core (~> 1.3.1)
|
|
@@ -111,17 +89,12 @@ GEM
|
|
|
111
89
|
rack (~> 1.0)
|
|
112
90
|
tilt (~> 1.1, != 1.3.0)
|
|
113
91
|
terminal-table (1.4.5)
|
|
114
|
-
thin (1.5.0)
|
|
115
|
-
daemons (>= 1.0.9)
|
|
116
|
-
eventmachine (>= 0.12.6)
|
|
117
|
-
rack (>= 1.0.0)
|
|
118
92
|
thor (0.17.0)
|
|
119
93
|
tilt (1.3.3)
|
|
120
94
|
uglifier (1.3.0)
|
|
121
95
|
execjs (>= 0.3.0)
|
|
122
96
|
multi_json (~> 1.0, >= 1.0.2)
|
|
123
97
|
websocket (1.0.7)
|
|
124
|
-
yajl-ruby (1.1.0)
|
|
125
98
|
|
|
126
99
|
PLATFORMS
|
|
127
100
|
ruby
|
|
@@ -131,14 +104,12 @@ DEPENDENCIES
|
|
|
131
104
|
coffee-script (>= 2.2.0)
|
|
132
105
|
ejs
|
|
133
106
|
faker
|
|
134
|
-
faye
|
|
135
107
|
guard-jasmine
|
|
136
108
|
guard-sprockets2
|
|
137
109
|
haml
|
|
138
110
|
haml_assets
|
|
139
111
|
hogan_assets
|
|
140
112
|
jasmine
|
|
141
|
-
listen
|
|
142
113
|
pry
|
|
143
114
|
rake
|
|
144
115
|
rb-fsevent (>= 0.9.1)
|
|
@@ -146,5 +117,4 @@ DEPENDENCIES
|
|
|
146
117
|
sass (>= 3.1.10)
|
|
147
118
|
sinatra
|
|
148
119
|
sprockets (>= 2.4.5)
|
|
149
|
-
thin
|
|
150
120
|
uglifier (>= 1.0.3)
|
data/Rakefile
CHANGED
|
@@ -10,6 +10,12 @@ stylesheets = ["luca-ui-bootstrap.css","luca-ui-development-tools.css","sandbox.
|
|
|
10
10
|
scripts = ["dependencies.js","sandbox.js"]
|
|
11
11
|
|
|
12
12
|
namespace :release do
|
|
13
|
+
desc "Export the project documentation"
|
|
14
|
+
task :docs => :environment do
|
|
15
|
+
app = Luca::LucaApplication.new("Luca",root:Dir.pwd())
|
|
16
|
+
app.export
|
|
17
|
+
end
|
|
18
|
+
|
|
13
19
|
desc "Zip up the assets"
|
|
14
20
|
task :zip => :environment do
|
|
15
21
|
`cp vendor/assets/javascripts/luca.min.js vendor/assets/javascripts/luca-dependencies.min.js vendor/assets/stylesheets/luca-ui.css .`
|
|
@@ -18,7 +24,7 @@ namespace :release do
|
|
|
18
24
|
end
|
|
19
25
|
|
|
20
26
|
desc "Compile and Minify"
|
|
21
|
-
task :all => [:assets,:minify,:zip]
|
|
27
|
+
task :all => [:docs,:assets,:minify,:zip]
|
|
22
28
|
desc "Compile all the assets"
|
|
23
29
|
task :assets => :environment do
|
|
24
30
|
File.open( File.join(App.root,'vendor','assets','stylesheets','luca-development.css'), 'w+' ) do |fh|
|
|
@@ -48,7 +54,7 @@ namespace :release do
|
|
|
48
54
|
end
|
|
49
55
|
|
|
50
56
|
desc "Build the gem"
|
|
51
|
-
task :gem => [:assets,:minify,:zip] do
|
|
57
|
+
task :gem => [:docs,:assets,:minify,:zip] do
|
|
52
58
|
`gem build luca.gemspec`
|
|
53
59
|
end
|
|
54
60
|
|
|
@@ -151,19 +151,15 @@ collectionView.publicMethods
|
|
|
151
151
|
if models.length is 0
|
|
152
152
|
@trigger("empty:results", query, options)
|
|
153
153
|
|
|
154
|
-
|
|
154
|
+
index = 0
|
|
155
|
+
for model in models
|
|
156
|
+
@$append @makeItem(model, index++)
|
|
155
157
|
|
|
156
158
|
@trigger("after:refresh", models, query, options)
|
|
157
159
|
|
|
158
160
|
@
|
|
159
161
|
|
|
160
|
-
|
|
161
162
|
collectionView.privateMethods
|
|
162
|
-
renderModels: (models, query, options)->
|
|
163
|
-
index = 0
|
|
164
|
-
for model in models
|
|
165
|
-
@$append @makeItem(model, index++)
|
|
166
|
-
|
|
167
163
|
# Determines which attributes should be set on the item DOM element.
|
|
168
164
|
attributesForItem: (item, model)->
|
|
169
165
|
_.extend {}, class: @itemClassName, "data-index": item.index, "data-model-id": item.model.get('id')
|
|
@@ -18,7 +18,7 @@
|
|
|
18
18
|
# cardView.activeComponent().name # => "one"
|
|
19
19
|
# cardView.activate('two')
|
|
20
20
|
# cardView.activeComponent().name # => "two"
|
|
21
|
-
component = Luca.
|
|
21
|
+
component = Luca.define "Luca.containers.CardView"
|
|
22
22
|
component.extends "Luca.Container"
|
|
23
23
|
|
|
24
24
|
component.publicConfiguration
|
|
@@ -144,7 +144,7 @@ component.privateMethods
|
|
|
144
144
|
simulateActivationEvent: ()->
|
|
145
145
|
c = @activeComponent()
|
|
146
146
|
|
|
147
|
-
if c? and
|
|
147
|
+
if c? and @$el.is(":visible")
|
|
148
148
|
c?.trigger "activation", @, c, c
|
|
149
149
|
if !c.previously_activated
|
|
150
150
|
c.trigger "first:activation"
|
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
|
|
2
|
-
view.extends "Luca.Container"
|
|
1
|
+
_.def("Luca.ModalView").extends("Luca.Container").with
|
|
3
2
|
|
|
4
|
-
view.publicConfiguration
|
|
5
3
|
closeOnEscape: true
|
|
4
|
+
|
|
6
5
|
showOnInitialize: false
|
|
6
|
+
|
|
7
7
|
backdrop: false
|
|
8
|
-
className: "modal"
|
|
9
8
|
|
|
10
|
-
|
|
9
|
+
className: "luca-ui-container modal"
|
|
10
|
+
|
|
11
11
|
container: ()->
|
|
12
12
|
$('body')
|
|
13
13
|
|
|
@@ -27,10 +27,10 @@ view.publicMethods
|
|
|
27
27
|
$('body').append( @$el )
|
|
28
28
|
|
|
29
29
|
@$el.modal
|
|
30
|
-
backdrop:
|
|
31
|
-
keyboard:
|
|
32
|
-
show:
|
|
30
|
+
backdrop: @backdrop is true
|
|
31
|
+
keyboard: @closeOnEscape is true
|
|
32
|
+
show: @showOnInitialize is true
|
|
33
33
|
|
|
34
34
|
@
|
|
35
35
|
|
|
36
|
-
|
|
36
|
+
_.def("Luca.containers.ModalView").extends("Luca.ModalView").with()
|
|
@@ -39,7 +39,10 @@ viewport.defines
|
|
|
39
39
|
@$el.removeClass('fullscreen-enabled')
|
|
40
40
|
|
|
41
41
|
beforeRender: ()->
|
|
42
|
-
Luca.
|
|
42
|
+
Luca.containers.CardView::beforeRender?.apply(@, arguments)
|
|
43
|
+
|
|
44
|
+
#if Luca.config.enableBoostrap and @topNav and @fullscreen
|
|
45
|
+
# $('body').css('padding','40px')
|
|
43
46
|
|
|
44
47
|
@renderTopNavigation() if @topNav?
|
|
45
48
|
@renderBottomNavigation() if @bottomNav?
|
|
@@ -51,7 +54,7 @@ viewport.defines
|
|
|
51
54
|
@$el.width()
|
|
52
55
|
|
|
53
56
|
afterRender: ()->
|
|
54
|
-
Luca.
|
|
57
|
+
Luca.containers.CardView::after?.apply(@, arguments)
|
|
55
58
|
|
|
56
59
|
if Luca.config.enableBoostrap is true and @containerClassName
|
|
57
60
|
@$el.children().wrap('<div class="#{ containerClassName }" />')
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
collection = Luca.
|
|
1
|
+
collection = Luca.define 'Luca.Collection'
|
|
2
2
|
collection.extends 'Backbone.QueryCollection'
|
|
3
3
|
collection.includes 'Luca.Events'
|
|
4
4
|
|
|
@@ -6,13 +6,13 @@ collection.triggers "after:initialize",
|
|
|
6
6
|
"before:fetch",
|
|
7
7
|
"after:response"
|
|
8
8
|
|
|
9
|
-
collection.
|
|
9
|
+
collection.defines
|
|
10
10
|
model: Luca.Model
|
|
11
11
|
# cachedMethods refers to a list of methods on the collection
|
|
12
12
|
# whose value gets cached once it is ran. the collection then
|
|
13
13
|
# binds to change, add, remove, and reset events and then expires
|
|
14
14
|
# the cached value once these events are fired.
|
|
15
|
-
|
|
15
|
+
|
|
16
16
|
# cachedMethods expects an array of strings representing the method name
|
|
17
17
|
# or objects containing @method and @resetEvents properties. by default
|
|
18
18
|
# @resetEvents are 'add','remove',reset' and 'change'.
|
|
@@ -22,17 +22,6 @@ collection.publicConfiguration
|
|
|
22
22
|
# and return the filtered results that way, then set this to true
|
|
23
23
|
remoteFilter: false
|
|
24
24
|
|
|
25
|
-
# setting a cache key to a string, or to a function which returns
|
|
26
|
-
# a string, will determine where the collections' models are pulled
|
|
27
|
-
# from if they are available on page load. also known as "bootstrapping"
|
|
28
|
-
# your collections with data. The cache key will look in whatever object
|
|
29
|
-
# is set in Luca.config.modelBootstrap for its models.
|
|
30
|
-
cache_key: undefined
|
|
31
|
-
|
|
32
|
-
# Which CollectionManager should we register with? Expects either a string
|
|
33
|
-
# which will get resolved into a global variable, or a
|
|
34
|
-
manager: undefined
|
|
35
|
-
|
|
36
25
|
initialize: (models=[], @options)->
|
|
37
26
|
_.extend @, @options
|
|
38
27
|
@_reset()
|
|
@@ -55,7 +44,7 @@ collection.publicConfiguration
|
|
|
55
44
|
@name ||= @registerAs
|
|
56
45
|
@manager ||= @registerWith
|
|
57
46
|
|
|
58
|
-
@manager =
|
|
47
|
+
@manager = if _.isFunction(@manager) then @manager() else @manager
|
|
59
48
|
|
|
60
49
|
# if they specify a
|
|
61
50
|
if @name and not @manager
|
|
@@ -357,9 +346,6 @@ collection.publicConfiguration
|
|
|
357
346
|
else
|
|
358
347
|
@models
|
|
359
348
|
|
|
360
|
-
collection.register()
|
|
361
|
-
|
|
362
|
-
|
|
363
349
|
# Global Collection Observer
|
|
364
350
|
_.extend Luca.Collection.prototype,
|
|
365
351
|
trigger: ()->
|
|
@@ -46,14 +46,14 @@ codeManager = Luca.register "Luca.CodeSyncManager"
|
|
|
46
46
|
codeManager.extends "Luca.SocketManager"
|
|
47
47
|
|
|
48
48
|
codeManager.publicConfiguration
|
|
49
|
-
host: Luca.config.codeSyncHost || "
|
|
49
|
+
host: Luca.config.codeSyncHost || "http://localhost:9292/faye"
|
|
50
50
|
namespace: "luca"
|
|
51
|
-
channel: Luca.config.codeSyncChannel || "/
|
|
51
|
+
channel: Luca.config.codeSyncChannel || "/changes"
|
|
52
52
|
|
|
53
53
|
codeManager.classMethods
|
|
54
54
|
setup: (options={})->
|
|
55
55
|
@codeSyncManager = new Luca.CodeSyncManager(options)
|
|
56
|
-
@codeSyncManager.trigger
|
|
56
|
+
@codeSyncManager.trigger("ready")
|
|
57
57
|
|
|
58
58
|
codeManager.privateMethods
|
|
59
59
|
initialize: (@attributes={})->
|
|
@@ -63,9 +63,6 @@ codeManager.privateMethods
|
|
|
63
63
|
Luca.SocketManager::initialize.call(@, @attributes)
|
|
64
64
|
@bindToChannel()
|
|
65
65
|
|
|
66
|
-
start: ()->
|
|
67
|
-
@trigger "ready"
|
|
68
|
-
|
|
69
66
|
bindToChannel: ()->
|
|
70
67
|
if @client?
|
|
71
68
|
@client.subscribe @channel, ()=>
|
data/bin/luca
CHANGED
|
@@ -2,13 +2,8 @@
|
|
|
2
2
|
|
|
3
3
|
$:.unshift File.join(File.dirname(__FILE__), '..', 'lib')
|
|
4
4
|
|
|
5
|
-
require '
|
|
6
|
-
require '
|
|
7
|
-
require 'sass'
|
|
8
|
-
require 'coffee-script'
|
|
9
|
-
require 'redcarpet'
|
|
10
|
-
require 'listen'
|
|
11
|
-
require 'luca'
|
|
5
|
+
require 'luca/luca_application'
|
|
6
|
+
require 'luca/component_definition'
|
|
12
7
|
require 'luca/cli'
|
|
13
8
|
|
|
14
9
|
Luca::Cli::Base.start
|
data/lib/luca.rb
CHANGED
|
@@ -17,8 +17,6 @@ require 'luca/compiled_asset'
|
|
|
17
17
|
require 'luca/component_definition'
|
|
18
18
|
require 'luca/luca_application'
|
|
19
19
|
require 'luca/project'
|
|
20
|
-
require 'luca/watcher'
|
|
21
|
-
require 'luca/server'
|
|
22
20
|
require 'luca/project_harness'
|
|
23
21
|
require 'luca/stylesheet'
|
|
24
22
|
require 'luca/template_asset'
|
data/lib/luca/cli.rb
CHANGED
|
@@ -142,10 +142,6 @@ module Luca
|
|
|
142
142
|
end
|
|
143
143
|
end
|
|
144
144
|
|
|
145
|
-
def assets_root
|
|
146
|
-
options[:assets_root] || File.join(project_root,"app","assets")
|
|
147
|
-
end
|
|
148
|
-
|
|
149
145
|
protected
|
|
150
146
|
def template_extensions
|
|
151
147
|
options[:template_extensions] || ['jst.ejs.haml','mustache']
|
|
@@ -248,7 +244,9 @@ module Luca
|
|
|
248
244
|
options[:javascripts_root] || File.join(assets_root,"javascripts")
|
|
249
245
|
end
|
|
250
246
|
|
|
251
|
-
|
|
247
|
+
def assets_root
|
|
248
|
+
options[:assets_root] || File.join(project_root,"app","assets")
|
|
249
|
+
end
|
|
252
250
|
|
|
253
251
|
def project_root
|
|
254
252
|
options[:root] || (::Rails.root rescue Dir.pwd())
|
data/lib/luca/stylesheet.rb
CHANGED
|
@@ -27,8 +27,9 @@ module Luca
|
|
|
27
27
|
compiled: compiled,
|
|
28
28
|
source_file_contents: IO.read(source),
|
|
29
29
|
name: File.basename(source),
|
|
30
|
-
|
|
31
|
-
|
|
30
|
+
# temp
|
|
31
|
+
path: source.gsub(::Rails.root.to_s, '.'),
|
|
32
|
+
id: source.gsub(::Rails.root.to_s, '.').gsub('/','__')
|
|
32
33
|
}
|
|
33
34
|
end
|
|
34
35
|
end
|
data/lib/luca/version.rb
CHANGED