pullentity-client 0.3.0 → 0.3.1

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,5 +1,5 @@
1
1
  module Pullentity
2
2
  module Client
3
- VERSION = "0.3.0"
3
+ VERSION = "0.3.1"
4
4
  end
5
5
  end
@@ -6,7 +6,8 @@ Handlebars.registerHelper 'ProjectUrl', (project)->
6
6
 
7
7
  Handlebars.registerHelper 'ProjectImg', (version)->
8
8
  v = version ? version : "url"
9
- @photos[0].image.image[v]
9
+ return if _.isEmpty(@photos[0])
10
+ @photos[0].image.image[v].url
10
11
 
11
12
  Handlebars.registerHelper 'PhotoImg', (version)->
12
13
  @image.image[version].url
@@ -1,6 +1,6 @@
1
1
  #= require_self
2
2
  #= require_tree ./helpers
3
- #= require_tree ../templates
3
+ # require_tree ../templates
4
4
  #= require_tree ./models
5
5
  #= require_tree ./views
6
6
  #= require_tree ./routers
@@ -6,7 +6,7 @@ class Pullentity.Views.Commons.Main extends Backbone.View
6
6
 
7
7
  initialize: ->
8
8
 
9
- console.log "COMMONS DASHBOARD LOADED!!!"
9
+ console.info "pullentity LOADED!!!"
10
10
  @site = new Pullentity.Models.Site(id: "michelsongs")
11
11
  @site.on("change", @initModels )
12
12
  @site.fetch()
@@ -57,7 +57,7 @@ class Pullentity.Views.Commons.Main extends Backbone.View
57
57
  @initRouter()
58
58
 
59
59
  render_home_project: ()=>
60
- @current_project = @projects.findWhere({home: true})
60
+ @current_project = @projects.findWhere({home: true })
61
61
  @find_theme_for_project()
62
62
  @render_project()
63
63
 
@@ -91,17 +91,18 @@ class Pullentity.Views.Commons.Main extends Backbone.View
91
91
  num
92
92
 
93
93
  @find_projects_for_list(@current_section)
94
- @current_template = Handlebars.compile($(@current_theme_obj).html())
94
+ @render_handlebars()
95
95
  $("#content").html(@current_template({section: @current_section.attributes, projects: @list_projects }))
96
96
 
97
97
  render_project: ()=>
98
- @current_template = Handlebars.compile($(@current_theme_obj).html())
98
+ @render_handlebars()
99
99
  $("#content").html(@current_template(@current_project.attributes))
100
100
 
101
101
  find_theme_for_project: ()=>
102
102
  @current_theme_obj = _.find @theme_templates, (num)=>
103
103
  if $(num).attr("id") == @current_project.get("theme_template").name
104
104
  num
105
+ console.error "theme \"#{@current_project.get("theme_template").name}\" does not exist" unless @current_theme_obj
105
106
 
106
107
  find_theme_for_list: ()=>
107
108
  #console.log("list with theme!")
@@ -120,4 +121,11 @@ class Pullentity.Views.Commons.Main extends Backbone.View
120
121
  $("#content").html("<pre>Couldn´t find template #{name} in /source/views/themes</pre>")
121
122
  console.warn "Couldn´t find projects in #{name} yet"
122
123
 
124
+ render_handlebars: ()=>
125
+ try
126
+ @current_template = Handlebars.compile($(@current_theme_obj).html())
127
+ catch e
128
+ #console.error "error while creating Handlebars script out of template for [", $(@current_theme_obj), e
129
+ throw e
130
+
123
131
  layout = new Pullentity.Views.Commons.Main
metadata CHANGED
@@ -1,18 +1,20 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: pullentity-client
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.0
4
+ version: 0.3.1
5
+ prerelease:
5
6
  platform: ruby
6
7
  authors:
7
8
  - miguel michelson
8
9
  autorequire:
9
10
  bindir: bin
10
11
  cert_chain: []
11
- date: 2013-07-31 00:00:00.000000000 Z
12
+ date: 2013-08-01 00:00:00.000000000 Z
12
13
  dependencies:
13
14
  - !ruby/object:Gem::Dependency
14
15
  name: coffee-script
15
16
  requirement: !ruby/object:Gem::Requirement
17
+ none: false
16
18
  requirements:
17
19
  - - ~>
18
20
  - !ruby/object:Gem::Version
@@ -20,6 +22,7 @@ dependencies:
20
22
  type: :runtime
21
23
  prerelease: false
22
24
  version_requirements: !ruby/object:Gem::Requirement
25
+ none: false
23
26
  requirements:
24
27
  - - ~>
25
28
  - !ruby/object:Gem::Version
@@ -27,6 +30,7 @@ dependencies:
27
30
  - !ruby/object:Gem::Dependency
28
31
  name: colored
29
32
  requirement: !ruby/object:Gem::Requirement
33
+ none: false
30
34
  requirements:
31
35
  - - ~>
32
36
  - !ruby/object:Gem::Version
@@ -34,6 +38,7 @@ dependencies:
34
38
  type: :runtime
35
39
  prerelease: false
36
40
  version_requirements: !ruby/object:Gem::Requirement
41
+ none: false
37
42
  requirements:
38
43
  - - ~>
39
44
  - !ruby/object:Gem::Version
@@ -41,6 +46,7 @@ dependencies:
41
46
  - !ruby/object:Gem::Dependency
42
47
  name: rake
43
48
  requirement: !ruby/object:Gem::Requirement
49
+ none: false
44
50
  requirements:
45
51
  - - ~>
46
52
  - !ruby/object:Gem::Version
@@ -48,6 +54,7 @@ dependencies:
48
54
  type: :runtime
49
55
  prerelease: false
50
56
  version_requirements: !ruby/object:Gem::Requirement
57
+ none: false
51
58
  requirements:
52
59
  - - ~>
53
60
  - !ruby/object:Gem::Version
@@ -55,6 +62,7 @@ dependencies:
55
62
  - !ruby/object:Gem::Dependency
56
63
  name: nokogiri
57
64
  requirement: !ruby/object:Gem::Requirement
65
+ none: false
58
66
  requirements:
59
67
  - - ~>
60
68
  - !ruby/object:Gem::Version
@@ -62,6 +70,7 @@ dependencies:
62
70
  type: :runtime
63
71
  prerelease: false
64
72
  version_requirements: !ruby/object:Gem::Requirement
73
+ none: false
65
74
  requirements:
66
75
  - - ~>
67
76
  - !ruby/object:Gem::Version
@@ -69,6 +78,7 @@ dependencies:
69
78
  - !ruby/object:Gem::Dependency
70
79
  name: erubis
71
80
  requirement: !ruby/object:Gem::Requirement
81
+ none: false
72
82
  requirements:
73
83
  - - ~>
74
84
  - !ruby/object:Gem::Version
@@ -76,6 +86,7 @@ dependencies:
76
86
  type: :runtime
77
87
  prerelease: false
78
88
  version_requirements: !ruby/object:Gem::Requirement
89
+ none: false
79
90
  requirements:
80
91
  - - ~>
81
92
  - !ruby/object:Gem::Version
@@ -83,6 +94,7 @@ dependencies:
83
94
  - !ruby/object:Gem::Dependency
84
95
  name: rocco
85
96
  requirement: !ruby/object:Gem::Requirement
97
+ none: false
86
98
  requirements:
87
99
  - - ~>
88
100
  - !ruby/object:Gem::Version
@@ -90,6 +102,7 @@ dependencies:
90
102
  type: :runtime
91
103
  prerelease: false
92
104
  version_requirements: !ruby/object:Gem::Requirement
105
+ none: false
93
106
  requirements:
94
107
  - - ~>
95
108
  - !ruby/object:Gem::Version
@@ -97,6 +110,7 @@ dependencies:
97
110
  - !ruby/object:Gem::Dependency
98
111
  name: thor
99
112
  requirement: !ruby/object:Gem::Requirement
113
+ none: false
100
114
  requirements:
101
115
  - - ~>
102
116
  - !ruby/object:Gem::Version
@@ -104,6 +118,7 @@ dependencies:
104
118
  type: :runtime
105
119
  prerelease: false
106
120
  version_requirements: !ruby/object:Gem::Requirement
121
+ none: false
107
122
  requirements:
108
123
  - - ~>
109
124
  - !ruby/object:Gem::Version
@@ -111,6 +126,7 @@ dependencies:
111
126
  - !ruby/object:Gem::Dependency
112
127
  name: compass
113
128
  requirement: !ruby/object:Gem::Requirement
129
+ none: false
114
130
  requirements:
115
131
  - - ~>
116
132
  - !ruby/object:Gem::Version
@@ -118,6 +134,7 @@ dependencies:
118
134
  type: :runtime
119
135
  prerelease: false
120
136
  version_requirements: !ruby/object:Gem::Requirement
137
+ none: false
121
138
  requirements:
122
139
  - - ~>
123
140
  - !ruby/object:Gem::Version
@@ -125,6 +142,7 @@ dependencies:
125
142
  - !ruby/object:Gem::Dependency
126
143
  name: session
127
144
  requirement: !ruby/object:Gem::Requirement
145
+ none: false
128
146
  requirements:
129
147
  - - ~>
130
148
  - !ruby/object:Gem::Version
@@ -132,6 +150,7 @@ dependencies:
132
150
  type: :runtime
133
151
  prerelease: false
134
152
  version_requirements: !ruby/object:Gem::Requirement
153
+ none: false
135
154
  requirements:
136
155
  - - ~>
137
156
  - !ruby/object:Gem::Version
@@ -139,6 +158,7 @@ dependencies:
139
158
  - !ruby/object:Gem::Dependency
140
159
  name: middleman
141
160
  requirement: !ruby/object:Gem::Requirement
161
+ none: false
142
162
  requirements:
143
163
  - - '='
144
164
  - !ruby/object:Gem::Version
@@ -146,6 +166,7 @@ dependencies:
146
166
  type: :runtime
147
167
  prerelease: false
148
168
  version_requirements: !ruby/object:Gem::Requirement
169
+ none: false
149
170
  requirements:
150
171
  - - '='
151
172
  - !ruby/object:Gem::Version
@@ -153,6 +174,7 @@ dependencies:
153
174
  - !ruby/object:Gem::Dependency
154
175
  name: middleman-target
155
176
  requirement: !ruby/object:Gem::Requirement
177
+ none: false
156
178
  requirements:
157
179
  - - ! '>='
158
180
  - !ruby/object:Gem::Version
@@ -160,6 +182,7 @@ dependencies:
160
182
  type: :runtime
161
183
  prerelease: false
162
184
  version_requirements: !ruby/object:Gem::Requirement
185
+ none: false
163
186
  requirements:
164
187
  - - ! '>='
165
188
  - !ruby/object:Gem::Version
@@ -167,6 +190,7 @@ dependencies:
167
190
  - !ruby/object:Gem::Dependency
168
191
  name: faraday
169
192
  requirement: !ruby/object:Gem::Requirement
193
+ none: false
170
194
  requirements:
171
195
  - - ! '>='
172
196
  - !ruby/object:Gem::Version
@@ -174,6 +198,7 @@ dependencies:
174
198
  type: :runtime
175
199
  prerelease: false
176
200
  version_requirements: !ruby/object:Gem::Requirement
201
+ none: false
177
202
  requirements:
178
203
  - - ! '>='
179
204
  - !ruby/object:Gem::Version
@@ -181,6 +206,7 @@ dependencies:
181
206
  - !ruby/object:Gem::Dependency
182
207
  name: json
183
208
  requirement: !ruby/object:Gem::Requirement
209
+ none: false
184
210
  requirements:
185
211
  - - ! '>='
186
212
  - !ruby/object:Gem::Version
@@ -188,6 +214,7 @@ dependencies:
188
214
  type: :runtime
189
215
  prerelease: false
190
216
  version_requirements: !ruby/object:Gem::Requirement
217
+ none: false
191
218
  requirements:
192
219
  - - ! '>='
193
220
  - !ruby/object:Gem::Version
@@ -195,6 +222,7 @@ dependencies:
195
222
  - !ruby/object:Gem::Dependency
196
223
  name: bundler
197
224
  requirement: !ruby/object:Gem::Requirement
225
+ none: false
198
226
  requirements:
199
227
  - - ~>
200
228
  - !ruby/object:Gem::Version
@@ -202,6 +230,7 @@ dependencies:
202
230
  type: :development
203
231
  prerelease: false
204
232
  version_requirements: !ruby/object:Gem::Requirement
233
+ none: false
205
234
  requirements:
206
235
  - - ~>
207
236
  - !ruby/object:Gem::Version
@@ -209,6 +238,7 @@ dependencies:
209
238
  - !ruby/object:Gem::Dependency
210
239
  name: rspec
211
240
  requirement: !ruby/object:Gem::Requirement
241
+ none: false
212
242
  requirements:
213
243
  - - ~>
214
244
  - !ruby/object:Gem::Version
@@ -216,6 +246,7 @@ dependencies:
216
246
  type: :development
217
247
  prerelease: false
218
248
  version_requirements: !ruby/object:Gem::Requirement
249
+ none: false
219
250
  requirements:
220
251
  - - ~>
221
252
  - !ruby/object:Gem::Version
@@ -223,6 +254,7 @@ dependencies:
223
254
  - !ruby/object:Gem::Dependency
224
255
  name: debugger
225
256
  requirement: !ruby/object:Gem::Requirement
257
+ none: false
226
258
  requirements:
227
259
  - - ! '>='
228
260
  - !ruby/object:Gem::Version
@@ -230,6 +262,7 @@ dependencies:
230
262
  type: :development
231
263
  prerelease: false
232
264
  version_requirements: !ruby/object:Gem::Requirement
265
+ none: false
233
266
  requirements:
234
267
  - - ! '>='
235
268
  - !ruby/object:Gem::Version
@@ -387,26 +420,27 @@ files:
387
420
  - vendor/assets/stylesheets/pullentity/themes/default.css.scss
388
421
  homepage: ''
389
422
  licenses: []
390
- metadata: {}
391
423
  post_install_message:
392
424
  rdoc_options: []
393
425
  require_paths:
394
426
  - lib
395
427
  required_ruby_version: !ruby/object:Gem::Requirement
428
+ none: false
396
429
  requirements:
397
430
  - - ! '>='
398
431
  - !ruby/object:Gem::Version
399
432
  version: '0'
400
433
  required_rubygems_version: !ruby/object:Gem::Requirement
434
+ none: false
401
435
  requirements:
402
436
  - - ! '>='
403
437
  - !ruby/object:Gem::Version
404
438
  version: '0'
405
439
  requirements: []
406
440
  rubyforge_project:
407
- rubygems_version: 2.0.3
441
+ rubygems_version: 1.8.25
408
442
  signing_key:
409
- specification_version: 4
443
+ specification_version: 3
410
444
  summary: This gem provides a simple builder workspace for make pullentity sites with
411
445
  haml and sass
412
446
  test_files:
checksums.yaml DELETED
@@ -1,15 +0,0 @@
1
- ---
2
- !binary "U0hBMQ==":
3
- metadata.gz: !binary |-
4
- YzNhYzdmMTNkZTRhMjQzN2U5YzNhNTk2Mjk4MTQ5OWQyYTQ5MGRiZA==
5
- data.tar.gz: !binary |-
6
- MWNiMTFiZDlkNGYwYjgzZjVmNjU4ZGFmMWUzNDE2NzdiYTVhNDkzOA==
7
- !binary "U0hBNTEy":
8
- metadata.gz: !binary |-
9
- MWExM2Y2YTRlMmI1MDU0OTM1NmJhOGQxMDYwMWEyOTczZTVhYTM4ZGQ4OGFh
10
- NmNjZDMzZTNjM2I3MjRmYWYyM2NiZDBiNzQxOGQzMjgxYjNjOWFiOGE4NTdk
11
- NjE2MWM2NzViYTg4M2I2NWQwM2ZjODNiYmUwODA1ZWJlY2NlNDk=
12
- data.tar.gz: !binary |-
13
- NjkzMGJkODcxZGI3NDU0OTNjNThlOWU3MWY1ZDQ5OGNkZWVkYTc4YTY5Njk0
14
- NjMyNDhmOTE1YjQ1MDQwNzgxMjVmNjQyN2NlYjczMDMyZDg1MGZiZGQwYjUx
15
- Zjk0NDk0ZDZhYjZiNjk1OTJjYzAxZTZlOTBiYzNmZjEyODdmMWY=