mix-rails 0.15.0 → 0.16.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (107) hide show
  1. data/Gemfile +1 -4
  2. data/MIX_RAILS_VERSION +1 -1
  3. data/README.md +15 -8
  4. data/admix/app/assets/javascripts/admix/application.js.coffee +13 -4
  5. data/admix/app/assets/javascripts/admix/tipsy_init.js.coffee +3 -0
  6. data/admix/app/assets/stylesheets/admix/admix_bootstrap.scss +1 -0
  7. data/admix/app/assets/stylesheets/admix/application.css +3 -1
  8. data/admix/lib/admix/version.rb +1 -1
  9. data/mix-rails-albums/app/assets/javascripts/backbone/models/photo.js.coffee +33 -1
  10. data/mix-rails-albums/app/assets/javascripts/backbone/routers/photos_router.js.coffee +3 -3
  11. data/mix-rails-albums/app/assets/javascripts/backbone/templates/photos/thumbnail.hamlc.erb +5 -3
  12. data/mix-rails-albums/app/assets/javascripts/backbone/views/photos/thumbnail_view.js.coffee +18 -10
  13. data/mix-rails-albums/app/assets/javascripts/backbone/views/photos/upload_index_view.js.coffee +1 -0
  14. data/mix-rails-albums/app/assets/javascripts/photos/upload.js.coffee.erb +19 -16
  15. data/mix-rails-albums/app/assets/javascripts/views/fileview.js +0 -1
  16. data/mix-rails-albums/app/controllers/admix/photos_controller.rb +6 -3
  17. data/mix-rails-albums/app/models/album.rb +1 -3
  18. data/mix-rails-albums/app/uploaders/albums/image_uploader.rb +1 -1
  19. data/mix-rails-albums/lib/mix-rails-albums/version.rb +1 -1
  20. data/mix-rails-auth/lib/mix-rails-auth/version.rb +1 -1
  21. data/mix-rails-core/app/controllers/mix_controller.rb +2 -0
  22. data/mix-rails-core/app/views/{application → mix}/_title.html.haml +0 -0
  23. data/mix-rails-core/lib/mix-rails-core/version.rb +1 -1
  24. data/mix-rails-core/lib/mix-rails-core.rb +3 -0
  25. data/mix-rails-core/mix-rails-core.gemspec +43 -41
  26. data/mix-rails-message-board/lib/mix-rails-message-board/version.rb +1 -1
  27. data/mix-rails-settings/lib/mix-rails-settings/version.rb +1 -1
  28. data/mix-rails-songs/app/controllers/songs_controller.rb +14 -1
  29. data/mix-rails-songs/app/views/songs/player.haml +1 -1
  30. data/mix-rails-songs/config/routes.rb +2 -1
  31. data/mix-rails-songs/lib/mix-rails-songs/version.rb +1 -1
  32. data/mix-rails-videos/lib/mix-rails-videos/version.rb +1 -1
  33. data/mix-rails-vouchers/lib/mix-rails-vouchers/version.rb +1 -1
  34. data/mix-rails-wireframe/.gitignore +7 -0
  35. data/mix-rails-wireframe/Gemfile +17 -0
  36. data/mix-rails-wireframe/MIT-LICENSE +20 -0
  37. data/mix-rails-wireframe/README.rdoc +3 -0
  38. data/mix-rails-wireframe/Rakefile +27 -0
  39. data/mix-rails-wireframe/app/assets/images/mix-rails-wireframe/.gitkeep +0 -0
  40. data/mix-rails-wireframe/app/assets/javascripts/mix-rails-wireframe/.gitkeep +0 -0
  41. data/mix-rails-wireframe/app/assets/javascripts/mix-rails-wireframe.js.coffee +0 -0
  42. data/mix-rails-wireframe/app/assets/stylesheets/mix-rails-wireframe/.gitkeep +0 -0
  43. data/mix-rails-wireframe/app/assets/stylesheets/mix-rails-wireframe.sass +1 -0
  44. data/mix-rails-wireframe/app/controllers/.gitkeep +0 -0
  45. data/mix-rails-wireframe/app/controllers/wireframe_controller.rb +11 -0
  46. data/mix-rails-wireframe/app/helpers/.gitkeep +0 -0
  47. data/mix-rails-wireframe/app/helpers/wireframe_helper.rb +12 -0
  48. data/mix-rails-wireframe/app/mailers/.gitkeep +0 -0
  49. data/mix-rails-wireframe/app/models/.gitkeep +0 -0
  50. data/mix-rails-wireframe/app/views/.gitkeep +0 -0
  51. data/mix-rails-wireframe/app/views/layouts/wireframe.haml +14 -0
  52. data/mix-rails-wireframe/app/views/wireframe/home.haml +2 -0
  53. data/mix-rails-wireframe/config/routes.rb +7 -0
  54. data/mix-rails-wireframe/lib/mix-rails-wireframe/engine.rb +4 -0
  55. data/mix-rails-wireframe/lib/mix-rails-wireframe/version.rb +10 -0
  56. data/mix-rails-wireframe/lib/mix-rails-wireframe.rb +4 -0
  57. data/mix-rails-wireframe/lib/tasks/mix-rails-wireframe_tasks.rake +4 -0
  58. data/mix-rails-wireframe/mix-rails-wireframe.gemspec +19 -0
  59. data/mix-rails-wireframe/script/rails +8 -0
  60. data/mix-rails-wireframe/spec/dummy/README.rdoc +261 -0
  61. data/mix-rails-wireframe/spec/dummy/Rakefile +7 -0
  62. data/mix-rails-wireframe/spec/dummy/app/assets/javascripts/application.js +15 -0
  63. data/mix-rails-wireframe/spec/dummy/app/assets/stylesheets/application.css +13 -0
  64. data/mix-rails-wireframe/spec/dummy/app/controllers/application_controller.rb +3 -0
  65. data/mix-rails-wireframe/spec/dummy/app/helpers/application_helper.rb +2 -0
  66. data/mix-rails-wireframe/spec/dummy/app/mailers/.gitkeep +0 -0
  67. data/mix-rails-wireframe/spec/dummy/app/models/.gitkeep +0 -0
  68. data/mix-rails-wireframe/spec/dummy/app/views/layouts/application.html.erb +14 -0
  69. data/mix-rails-wireframe/spec/dummy/config/application.rb +65 -0
  70. data/mix-rails-wireframe/spec/dummy/config/boot.rb +10 -0
  71. data/mix-rails-wireframe/spec/dummy/config/environment.rb +5 -0
  72. data/mix-rails-wireframe/spec/dummy/config/environments/development.rb +31 -0
  73. data/mix-rails-wireframe/spec/dummy/config/environments/production.rb +64 -0
  74. data/mix-rails-wireframe/spec/dummy/config/environments/test.rb +35 -0
  75. data/mix-rails-wireframe/spec/dummy/config/initializers/backtrace_silencers.rb +7 -0
  76. data/mix-rails-wireframe/spec/dummy/config/initializers/inflections.rb +15 -0
  77. data/mix-rails-wireframe/spec/dummy/config/initializers/mime_types.rb +5 -0
  78. data/mix-rails-wireframe/spec/dummy/config/initializers/secret_token.rb +7 -0
  79. data/mix-rails-wireframe/spec/dummy/config/initializers/session_store.rb +8 -0
  80. data/mix-rails-wireframe/spec/dummy/config/initializers/wrap_parameters.rb +10 -0
  81. data/mix-rails-wireframe/spec/dummy/config/locales/en.yml +5 -0
  82. data/mix-rails-wireframe/spec/dummy/config/routes.rb +58 -0
  83. data/mix-rails-wireframe/spec/dummy/config.ru +4 -0
  84. data/mix-rails-wireframe/spec/dummy/lib/assets/.gitkeep +0 -0
  85. data/mix-rails-wireframe/spec/dummy/log/.gitkeep +0 -0
  86. data/mix-rails-wireframe/spec/dummy/public/404.html +26 -0
  87. data/mix-rails-wireframe/spec/dummy/public/422.html +26 -0
  88. data/mix-rails-wireframe/spec/dummy/public/500.html +25 -0
  89. data/mix-rails-wireframe/spec/dummy/public/favicon.ico +0 -0
  90. data/mix-rails-wireframe/spec/dummy/script/rails +6 -0
  91. data/mix-rails-writer/lib/mix-rails-writer/version.rb +1 -1
  92. data/mix-rails.gemspec +19 -14
  93. data/version.rb +1 -1
  94. metadata +132 -38
  95. data/admix/app/assets/javascripts/admix/tipsy_init.js +0 -5
  96. data/admix/app/assets/stylesheets/admix/bootstrap.min.css +0 -868
  97. data/mix-rails-albums/app/assets/javascripts/backbone/templates/photos/edit.jst.ejs +0 -20
  98. data/mix-rails-albums/app/assets/javascripts/backbone/templates/photos/index.jst.ejs +0 -15
  99. data/mix-rails-albums/app/assets/javascripts/backbone/templates/photos/modal.hamlc.erb +0 -14
  100. data/mix-rails-albums/app/assets/javascripts/backbone/templates/photos/new.jst.ejs +0 -20
  101. data/mix-rails-albums/app/assets/javascripts/backbone/templates/photos/photo.jst.ejs +0 -6
  102. data/mix-rails-albums/app/assets/javascripts/backbone/templates/photos/show.jst.ejs +0 -12
  103. data/mix-rails-albums/app/assets/javascripts/backbone/views/photos/edit_view.js.coffee +0 -24
  104. data/mix-rails-albums/app/assets/javascripts/backbone/views/photos/index_view.js.coffee +0 -20
  105. data/mix-rails-albums/app/assets/javascripts/backbone/views/photos/new_view.js.coffee +0 -37
  106. data/mix-rails-albums/app/assets/javascripts/backbone/views/photos/photo_view.js.coffee +0 -19
  107. data/mix-rails-albums/app/assets/javascripts/backbone/views/photos/show_view.js.coffee +0 -8
@@ -1,20 +0,0 @@
1
- <h1>Edit photo</h1>
2
-
3
- <form id="edit-photo" name="photo">
4
- <div class="field">
5
- <label for="image"> image:</label>
6
- <input type="text" name="image" id="image" value="<%= image %>" >
7
- </div>
8
-
9
- <div class="field">
10
- <label for="description"> description:</label>
11
- <input type="text" name="description" id="description" value="<%= description %>" >
12
- </div>
13
-
14
- <div class="actions">
15
- <input type="submit" value="Update Photo" />
16
- </div>
17
-
18
- </form>
19
-
20
- <a href="#/index">Back</a>
@@ -1,15 +0,0 @@
1
- <h1>Listing photos</h1>
2
-
3
- <table id="photos-table">
4
- <tr>
5
- <th>Image</th>
6
- <th>Description</th>
7
- <th></th>
8
- <th></th>
9
- <th></th>
10
- </tr>
11
- </table>
12
-
13
- <br/>
14
-
15
- <a href="#/new">New Photo</a>
@@ -1,14 +0,0 @@
1
- .modal.hide.fade.admix-photo-modal{id: "photo-modal-#{@id}"}
2
- .modal-header
3
- %button.close{"aria-hidden" => "true", "data-dismiss" => "modal", :type => "button"} ×
4
- %h3 Detalhes da foto
5
- .modal-body
6
- .edit-area.pull-right
7
- %textarea.span5{id: "input_photo_description_#{@id}",placeholder: 'Adicione uma descrição para esta foto.'}
8
- #{@description}
9
- .photo
10
- %img{src: @image.medium.url}
11
- %p One fine body…
12
- .modal-footer
13
- %a.btn{href:"#", "data-dismiss": "modal"} Cancelar
14
- %a.btn.btn-primary.save{:href => "#"} Salvar mudanças
@@ -1,20 +0,0 @@
1
- <h1>New photo</h1>
2
-
3
- <form id="new-photo" name="photo">
4
- <div class="field">
5
- <label for="image"> image:</label>
6
- <input type="text" name="image" id="image" value="<%= image %>" >
7
- </div>
8
-
9
- <div class="field">
10
- <label for="description"> description:</label>
11
- <input type="text" name="description" id="description" value="<%= description %>" >
12
- </div>
13
-
14
- <div class="actions">
15
- <input type="submit" value="Create Photo" />
16
- </div>
17
-
18
- </form>
19
-
20
- <a href="#/index">Back</a>
@@ -1,6 +0,0 @@
1
- <td><%= image %></td>
2
- <td><%= description %></td>
3
-
4
- <td><a href="#/<%= id %>">Show</td>
5
- <td><a href="#/<%= id %>/edit">Edit</td>
6
- <td><a href="#/<%= id %>/destroy" class="destroy">Destroy</a></td>
@@ -1,12 +0,0 @@
1
- <p>
2
- <b>Image:</b>
3
- <%= image %>
4
- </p>
5
-
6
- <p>
7
- <b>Description:</b>
8
- <%= description %>
9
- </p>
10
-
11
-
12
- <a href="#/index">Back</a>
@@ -1,24 +0,0 @@
1
- Application.Views.Photos ||= {}
2
-
3
- class Application.Views.Photos.EditView extends Backbone.View
4
- template: JST["backbone/templates/photos/edit"]
5
-
6
- events:
7
- "submit #edit-photo": "update"
8
-
9
- update: (e) ->
10
- e.preventDefault()
11
- e.stopPropagation()
12
-
13
- @model.save(null,
14
- success: (photo) =>
15
- @model = photo
16
- window.location.hash = "/#{@model.id}"
17
- )
18
-
19
- render: ->
20
- @$el.html(@template(@model.toJSON() ))
21
-
22
- this.$("form").backboneLink(@model)
23
-
24
- return this
@@ -1,20 +0,0 @@
1
- Application.Views.Photos ||= {}
2
-
3
- class Application.Views.Photos.IndexView extends Backbone.View
4
- template: JST["backbone/templates/photos/index"]
5
-
6
- initialize: () ->
7
- @options.photos.bind('reset', @addAll)
8
-
9
- addAll: () =>
10
- @options.photos.each(@addOne)
11
-
12
- addOne: (photo) =>
13
- view = new Application.Views.Photos.PhotoView({model : photo})
14
- @$("tbody").append(view.render().el)
15
-
16
- render: =>
17
- @$el.html(@template(photos: @options.photos.toJSON() ))
18
- @addAll()
19
-
20
- return this
@@ -1,37 +0,0 @@
1
- Application.Views.Photos ||= {}
2
-
3
- class Application.Views.Photos.NewView extends Backbone.View
4
- template: JST["backbone/templates/photos/new"]
5
-
6
- events:
7
- "submit #new-photo": "save"
8
-
9
- constructor: (options) ->
10
- super(options)
11
- @model = new @collection.model()
12
-
13
- @model.bind("change:errors", () =>
14
- this.render()
15
- )
16
-
17
- save: (e) ->
18
- e.preventDefault()
19
- e.stopPropagation()
20
-
21
- @model.unset("errors")
22
-
23
- @collection.create(@model.toJSON(),
24
- success: (photo) =>
25
- @model = photo
26
- window.location.hash = "/#{@model.id}"
27
-
28
- error: (photo, jqXHR) =>
29
- @model.set({errors: $.parseJSON(jqXHR.responseText)})
30
- )
31
-
32
- render: ->
33
- @$el.html(@template(@model.toJSON() ))
34
-
35
- this.$("form").backboneLink(@model)
36
-
37
- return this
@@ -1,19 +0,0 @@
1
- Application.Views.Photos ||= {}
2
-
3
- class Application.Views.Photos.PhotoView extends Backbone.View
4
- template: JST["backbone/templates/photos/photo"]
5
-
6
- events:
7
- "click .destroy" : "destroy"
8
-
9
- tagName: "tr"
10
-
11
- destroy: () ->
12
- @model.destroy()
13
- this.remove()
14
-
15
- return false
16
-
17
- render: ->
18
- @$el.html(@template(@model.toJSON() ))
19
- return this
@@ -1,8 +0,0 @@
1
- Application.Views.Photos ||= {}
2
-
3
- class Application.Views.Photos.ShowView extends Backbone.View
4
- template: JST["backbone/templates/photos/show"]
5
-
6
- render: ->
7
- @$el.html(@template(@model.toJSON() ))
8
- return this