pullentity-client 0.1.3 → 0.3.0

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.
Files changed (92) hide show
  1. checksums.yaml +8 -8
  2. data/CHANGELOG.md +2 -0
  3. data/README.md +1 -1
  4. data/lib/pullentity-client/cli.rb +1 -1
  5. data/lib/pullentity-client/generate/auth.rb +32 -18
  6. data/lib/pullentity-client/generate/exporter.rb +14 -2
  7. data/lib/pullentity-client/generate/theme.rb +3 -3
  8. data/lib/pullentity-client/templates/app/assets/javascripts/application.js.erb +2 -1
  9. data/lib/pullentity-client/templates/app/assets/javascripts/config.js.erb +6 -0
  10. data/lib/pullentity-client/templates/app/assets/stylesheets/customtheme.css.scss +14 -8
  11. data/lib/pullentity-client/templates/app/index.html.haml +5 -3
  12. data/lib/pullentity-client/templates/app/views/list.haml +6 -6
  13. data/lib/pullentity-client/templates/app/views/shared/body.haml +5 -5
  14. data/lib/pullentity-client/templates/app/views/shared/head.haml +1 -9
  15. data/lib/pullentity-client/templates/app/views/shared/js.haml +0 -3
  16. data/lib/pullentity-client/templates/app/views/themes/home.haml +0 -1
  17. data/lib/pullentity-client/templates/app/views/themes/list-2.haml +13 -0
  18. data/lib/pullentity-client/templates/app/views/themes/theme1.haml +7 -8
  19. data/lib/pullentity-client/version.rb +1 -1
  20. data/spec/pullentity-client/generate/exporter_spec.rb +3 -3
  21. data/vendor/.DS_Store +0 -0
  22. data/vendor/assets/javascripts/{pullentity → backbone}/.DS_Store +0 -0
  23. data/vendor/assets/javascripts/backbone/backbone.js +1571 -0
  24. data/vendor/assets/javascripts/backbone/underscore.js +1227 -0
  25. data/vendor/assets/javascripts/bootstrap.js +1964 -0
  26. data/vendor/assets/javascripts/bootstrap.min.js +6 -0
  27. data/vendor/assets/javascripts/galleria/LICENSE +21 -0
  28. data/vendor/assets/javascripts/galleria/galleria-1.2.9.js +6121 -0
  29. data/vendor/assets/javascripts/galleria/galleria-1.2.9.min.js +9 -0
  30. data/vendor/assets/javascripts/galleria/plugins/flickr/flickr-demo.html +62 -0
  31. data/vendor/assets/javascripts/galleria/plugins/flickr/flickr-loader.gif +0 -0
  32. data/vendor/assets/javascripts/galleria/plugins/flickr/galleria.flickr.js +383 -0
  33. data/vendor/assets/javascripts/galleria/plugins/flickr/galleria.flickr.min.js +8 -0
  34. data/vendor/assets/javascripts/galleria/plugins/flickr/loader.gif +0 -0
  35. data/vendor/assets/javascripts/galleria/plugins/history/galleria.history.js +146 -0
  36. data/vendor/assets/javascripts/galleria/plugins/history/galleria.history.min.js +8 -0
  37. data/vendor/assets/javascripts/galleria/plugins/history/history-demo.html +100 -0
  38. data/vendor/assets/javascripts/galleria/plugins/picasa/galleria.picasa.js +320 -0
  39. data/vendor/assets/javascripts/galleria/plugins/picasa/galleria.picasa.min.js +8 -0
  40. data/vendor/assets/javascripts/galleria/plugins/picasa/loader.gif +0 -0
  41. data/vendor/assets/javascripts/galleria/plugins/picasa/picasa-demo.html +55 -0
  42. data/vendor/assets/javascripts/galleria/themes/classic/classic-demo.html +124 -0
  43. data/vendor/assets/javascripts/galleria/themes/classic/classic-loader.gif +0 -0
  44. data/vendor/assets/javascripts/galleria/themes/classic/classic-map.png +0 -0
  45. data/vendor/assets/javascripts/galleria/themes/classic/galleria.classic.css +220 -0
  46. data/vendor/assets/javascripts/galleria/themes/classic/galleria.classic.js +95 -0
  47. data/vendor/assets/javascripts/galleria/themes/classic/galleria.classic.min.js +8 -0
  48. data/vendor/assets/javascripts/handlebars.js +2278 -0
  49. data/vendor/assets/javascripts/jquery.infinite-scroll.min.js +1 -0
  50. data/vendor/assets/javascripts/jquery.isotope.min.js +11 -0
  51. data/vendor/assets/javascripts/jquery.loadimage.js +3 -0
  52. data/vendor/assets/javascripts/jquery.masonry.min.js +10 -0
  53. data/vendor/assets/javascripts/jquery.waitforimages.js +4 -0
  54. data/vendor/assets/javascripts/pullentity-backbone/.DS_Store +0 -0
  55. data/vendor/assets/javascripts/pullentity-backbone/app/helpers/app_helper.js.coffee +12 -0
  56. data/vendor/assets/javascripts/pullentity-backbone/app/models/project.js.coffee +11 -0
  57. data/vendor/assets/javascripts/pullentity-backbone/app/models/section.js.coffee +13 -0
  58. data/vendor/assets/javascripts/pullentity-backbone/app/models/site.js.coffee +7 -0
  59. data/vendor/assets/javascripts/pullentity-backbone/app/routers/router.coffee +7 -0
  60. data/vendor/assets/javascripts/pullentity-backbone/app/site.js.coffee +33 -0
  61. data/vendor/assets/javascripts/pullentity-backbone/app/views/main.js.coffee +123 -0
  62. data/vendor/assets/javascripts/pullentity-backbone/application.js.coffee +8 -0
  63. data/vendor/assets/javascripts/pullentity.js +3 -0
  64. data/vendor/assets/stylesheets/bootstrap.css +4677 -0
  65. data/vendor/assets/stylesheets/bootstrap.min.css +9 -0
  66. data/vendor/assets/stylesheets/galleria/LICENSE +21 -0
  67. data/vendor/assets/stylesheets/galleria/galleria-1.2.9.js +6121 -0
  68. data/vendor/assets/stylesheets/galleria/galleria-1.2.9.min.js +9 -0
  69. data/vendor/assets/stylesheets/galleria/plugins/flickr/flickr-demo.html +62 -0
  70. data/vendor/assets/stylesheets/galleria/plugins/flickr/flickr-loader.gif +0 -0
  71. data/vendor/assets/stylesheets/galleria/plugins/flickr/galleria.flickr.js +383 -0
  72. data/vendor/assets/stylesheets/galleria/plugins/flickr/galleria.flickr.min.js +8 -0
  73. data/vendor/assets/stylesheets/galleria/plugins/flickr/loader.gif +0 -0
  74. data/vendor/assets/stylesheets/galleria/plugins/history/galleria.history.js +146 -0
  75. data/vendor/assets/stylesheets/galleria/plugins/history/galleria.history.min.js +8 -0
  76. data/vendor/assets/stylesheets/galleria/plugins/history/history-demo.html +100 -0
  77. data/vendor/assets/stylesheets/galleria/plugins/picasa/galleria.picasa.js +320 -0
  78. data/vendor/assets/stylesheets/galleria/plugins/picasa/galleria.picasa.min.js +8 -0
  79. data/vendor/assets/stylesheets/galleria/plugins/picasa/loader.gif +0 -0
  80. data/vendor/assets/stylesheets/galleria/plugins/picasa/picasa-demo.html +55 -0
  81. data/vendor/assets/stylesheets/galleria/themes/classic/classic-demo.html +124 -0
  82. data/vendor/assets/stylesheets/galleria/themes/classic/classic-loader.gif +0 -0
  83. data/vendor/assets/stylesheets/galleria/themes/classic/classic-map-original.png +0 -0
  84. data/vendor/assets/stylesheets/galleria/themes/classic/galleria.classic.css +217 -0
  85. data/vendor/assets/stylesheets/galleria/themes/classic/galleria.classic.js +95 -0
  86. data/vendor/assets/stylesheets/galleria/themes/classic/galleria.classic.min.js +8 -0
  87. metadata +70 -8
  88. data/lib/pullentity-client/templates/defaults/test-data.js.erb +0 -193
  89. data/vendor/assets/javascripts/mustache.js +0 -535
  90. data/vendor/assets/javascripts/pullentity/development.js.coffee +0 -222
  91. data/vendor/assets/javascripts/pullentity.js.erb +0 -3
  92. data/vendor/assets/javascripts/underscore-min.js +0 -1
@@ -1,193 +0,0 @@
1
- # Don't edit this file unless you know you are doing
2
- # this file is for local testing only and will not be uploaded within theme to pullentity.com
3
- #= require "underscore-min"
4
- #= require "mustache"
5
-
6
- $(document).ready ->
7
- template = undefined
8
- html = undefined
9
- window.base_image_path = "http://pullentity.s3.amazonaws.com"
10
- window.theme = ""
11
- window.list_theme = ""
12
- window.mustache_themes = ""
13
- window.data = {}
14
- window.data =
15
- site_link: "/"
16
- public_url: "http://pullentity.com"
17
- project: {}
18
- photos: []
19
- url: ->
20
- (text, render) ->
21
- text = render(text)
22
- url = text.trim().toLowerCase().split("tuts+")[0] + ".tutsplus.com"
23
- "<a href=\"" + url + "\">" + text + "</a>"
24
-
25
- $.getJSON( "/assets/javascripts/pullentity_data.json", (json_data) ->
26
- ).success((json_data)->
27
- items = []
28
- #debugger
29
- window.data["site"] =
30
- name: json_data.name
31
- subdomain: json_data.subdomain
32
-
33
- window.data["sections"] = []
34
-
35
- $.each json_data.sections, (key, val) ->
36
- window.data["sections"].push val
37
-
38
- window.data["projects"] = []
39
- $.each json_data.projects, (key, val) ->
40
- window.data["projects"].push val
41
-
42
- window.init_themes()
43
- )
44
- .error(->
45
- html = "<div style='margin:20px'><h1>data file not found<h1>"
46
- html += "<pre>please run 'pullentity setup' in console to setup autentication and import data</pre>"
47
- html += "<pre>or 'pullentity theme import_data' in console, if you already have authenticated your theme</pre></div>"
48
- $("body").html(html)
49
- )
50
-
51
- # layout initialization
52
- window.init_themes = ()->
53
-
54
- window.theme = ""
55
-
56
- window.data["project"] = {}
57
-
58
- template = $("#layout").html()
59
-
60
- window.mustache_themes = $(".pullentity-themes")
61
-
62
- window.list_theme = $(".pullentity-themes#list")
63
-
64
- layout = Mustache.to_html(template, data)
65
-
66
- $("body").html layout
67
-
68
- simple_router(window.location.hash)
69
-
70
- $(window).on "hashchange", (e) ->
71
- simple_router(window.location.hash)
72
-
73
- window.simple_router = (url)->
74
- # find section by window.location, then find project and theme
75
- url = window.location.hash
76
- #console.log "changed to #{url}"
77
- m = switch
78
- when url == "" then render_home_project()
79
- when /(\w)\/\d/.test(url) then find_project_by_id()
80
- when /(\w)/.test(url) then find_in_section()
81
- else
82
- console.warn("not matching url")
83
-
84
- window.render_theme = (theme_html, data_hsh = window.data)->
85
- if theme_html?
86
- view = Mustache.to_html(theme_html, data_hsh)
87
- $("#content").html view
88
- else
89
- html = "<div style='margin:20px'><h1>Theme \"#{window.data.project.theme_template.name}\" not found!<h1>"
90
- html += "<pre>Please create it in /source/views/themes/#{window.data.project.theme_template.name}.haml</pre></div>"
91
- $("body").html(html)
92
-
93
-
94
- # get home project and render it
95
- window.render_home_project = ()->
96
-
97
- window.data["project"] = _.find(window.data.projects, (p) ->
98
- p.home
99
- )
100
-
101
- fill_projects(window.data["project"].photos)
102
-
103
- find_theme_for_project()
104
-
105
- render_theme($(window.theme[0]).html())
106
-
107
- # points path for remote image resources
108
- window.remote_path = (path)->
109
- "#{path}"
110
-
111
-
112
- # builds the project photos hsh
113
- window.fill_projects = (collection)->
114
- window.data["photos"] = []
115
- $.each collection, (key, val) ->
116
- window.data["photos"].push
117
- img_medium: remote_path( val.image.image.medium.url)
118
- img_large: remote_path(val.image.image.xlarge.url)
119
- img_thumb: remote_path(val.image.image.thumb.url)
120
- title: val.title
121
- caption: val.caption
122
-
123
-
124
- # display project or list
125
- window.display_project_or_list = (_tis)->
126
-
127
- if _tis.list_or_project == "project"
128
-
129
- #console.log("trying theme #{window.data["project"].theme_template.name}")
130
-
131
- find_theme_for_project()
132
-
133
- fill_projects(window.data["project"].photos)
134
-
135
- render_theme($(window.theme[0]).html())
136
-
137
- else
138
- #console.log "should be list!!"
139
- data_projects = data_projects_for_list()
140
- render_theme($(window.list_theme).html(), data_projects)
141
-
142
- false
143
-
144
-
145
- # finds the theme for project
146
- window.find_theme_for_project = ()->
147
- window.theme = $($(_.find($(window.mustache_themes), (num) ->
148
- $(num).attr("id") == window.data["project"].theme_template.name
149
- )).html())
150
-
151
- # find data for project list
152
- window.data_projects_for_list = ()->
153
- section = _.find( window.data["sections"] , (num) ->
154
- num.public_url == window.location.hash
155
- )
156
-
157
- a = _.filter(window.data["projects"], (num) ->
158
- true if num.section.public_url is section.public_url
159
- )
160
-
161
- project_collection = _.map a, (p)->
162
- p["project_photo"] = remote_path(p.photos[0].image.image.medium.url) unless p.photos.length == 0
163
- p
164
-
165
- {section: section, projects: project_collection }
166
-
167
- # maps project for section
168
- window.find_in_section = ()->
169
-
170
- $.each window.data.sections, ()->
171
-
172
- if this.public_url == window.location.hash
173
- _tis = this
174
- _tis.finds = false
175
-
176
- window.data["project"] = _.find( window.data.projects , (p)->
177
- p.section.public_url == _tis.public_url
178
- )
179
-
180
- if window.data["project"]?
181
- display_project_or_list(_tis)
182
- else
183
- $("#content").html("<pre>Couldn´t find projects in #{_tis.public_url} yet</pre>")
184
- console.warn "Couldn´t find projects in #{_tis.public_url} yet"
185
-
186
- # find by id
187
- window.find_project_by_id = ()->
188
-
189
- window.data["project"] = _.where(window.data.projects, { project_path: window.location.hash })[0]
190
-
191
- find_theme_for_project()
192
- fill_projects(window.data["project"].photos)
193
- render_theme($(window.theme[0]).html())