ende 0.3.0 → 0.3.1

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 428726f81f06f7cf6d296ed436b4ad4c3ea396d3
4
- data.tar.gz: 09dd3babe623240a882f57c0f7c3246c7fc5041a
3
+ metadata.gz: 0969aad723eb6466010bbb9eb7a27eac744e55d9
4
+ data.tar.gz: ac27b1c89fc77ae142fd3b13e1b12aef4ca51bd6
5
5
  SHA512:
6
- metadata.gz: 021df6a443cb387cbfa1610266f7cd8ab6c66bc60f4f629b1b4d234ecc0b1f45505abe97490eadba4a27dae0934a60bde2e8d2529d906fd1df5eb29b5fe47c77
7
- data.tar.gz: 90458b021186087b3e506d092d1c183b543dd1a5a0290338f2ccd4ab21f8688157e3873124a823238458bd9c18aa82bbc6c234dee3ac177f77710117787280ff
6
+ metadata.gz: 89fe2cc7c38f0405f9808f6e9e2ce6ec9192e867ed87cce78c281d78626550e956e46d657d3a6f0e7f4ea496c32335addf616fde99e894ffed1a0ac824c83850
7
+ data.tar.gz: 680535f8a45ac308e2f3a5c8a349c908d16150616f1fde983929a0aaea27ea0e6559e4a546cca22b17098edfe8180fc2c34997da82ce3b55aebc5df5a22259a7
@@ -40,6 +40,9 @@ define 'aura/extensions/models', <%= models_list.to_json %>, (models...) ->
40
40
  require 'indefinido-indemma/lib/record/maid'
41
41
  require 'indefinido-indemma/lib/record/validatable'
42
42
 
43
+ # TODO create an plurazation interface on indemma, or move
44
+ # inflector outside it
45
+ require 'indefinido-indemma/vendor/owl/pluralize'
43
46
 
44
47
  # Extension definition
45
48
  initialize: (application) ->
@@ -49,6 +52,9 @@ define 'aura/extensions/models', <%= models_list.to_json %>, (models...) ->
49
52
  cssify: (sentence) -> sentence.replace /\//, '-'
50
53
  pluralize: indemma.model.pluralize
51
54
  singularize: indemma.model.singularize
55
+ # TODO create an plurazation interface on indemma, or move
56
+ # inflector outside it
57
+ define: owl.pluralize.define
52
58
 
53
59
  # TODO rename core.models and core.domain to core.resources, completely
54
60
  core.resources = core.domain = core.models = sandbox.models = indemma.model
@@ -59,8 +65,13 @@ define 'aura/extensions/models', <%= models_list.to_json %>, (models...) ->
59
65
  throw new Error unless model?
60
66
  model
61
67
 
62
- # TODO rename core.models to core.domain, completely
68
+ # TODO rename core.models and core.domain, to core.resources, completely
69
+ # TODO deprecate record usage
63
70
  core.domain.record = core.models.record = sandbox.models.record = indemma.record
64
71
 
65
- # build all model definitions
72
+ # TODO allow user to create custom definitions before resources
73
+ # (models) get defined
74
+ core.util.inflector.define 'measures', 'measures'
75
+
76
+ # Build all model definitions
66
77
  core.util._.map models, (model) -> indemma.model.call model
@@ -32,7 +32,7 @@ define 'aura/extensions/widget/eventable', ->
32
32
  constructor: (options) ->
33
33
  matches = extractor.exec options._ref
34
34
  @name = matches[1]
35
- @identifier = options.resource ? matches[2]
35
+ @identifier = options.identifier or options.resource or matches[2]
36
36
 
37
37
  eventable.super.constructor.call @, options
38
38
 
@@ -162,8 +162,9 @@ define [
162
162
 
163
163
  repopulate: ->
164
164
  unless @fetching?
165
- @load.stop()
166
- @load = null
165
+ if @load?
166
+ @load.stop()
167
+ @load = null
167
168
  else
168
169
  @fetching?.abort()
169
170
 
@@ -276,12 +277,13 @@ define [
276
277
  @resource = @sandbox.resource options.resource
277
278
  @scope = model = @resource
278
279
  cssify = @sandbox.util.inflector.cssify
280
+
279
281
  @sandbox.on "viewer.#{@identifier}.scope", @scope_to, @
280
282
 
281
283
  # Iniitalize plugins
282
284
  @plugins options
283
285
 
284
- @$el.addClass "viewer widget #{cssify(options.resource)} idle clearfix"
286
+ @$el.addClass "viewer widget #{cssify @identifier} idle clearfix"
285
287
 
286
288
  # Fetch custom templates
287
289
  # TODO better custom templates structure and custom presenter
@@ -307,6 +309,4 @@ define [
307
309
  # Fetch default data
308
310
  @populate handlers
309
311
 
310
- @sandbox.logger.log "initialized!"
311
-
312
312
  true
data/lib/ende/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module Ende
2
- VERSION = "0.3.0"
2
+ VERSION = "0.3.1"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ende
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.0
4
+ version: 0.3.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Heitor Salazar
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-01-17 00:00:00.000000000 Z
11
+ date: 2014-01-22 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler