fassets_core 0.3.1 → 0.4.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -53,25 +53,6 @@ $(document).ready(function(){
53
53
  $.fancybox.resize();
54
54
  $.fancybox.hideActivity();
55
55
  });
56
- $("#fancybox-content .asset_create_button").click(function(event){
57
- event.preventDefault();
58
- $.fancybox.showActivity();
59
- var action = $("#add_asset_content form").attr("action");
60
- $.post(action, $("#add_asset_content form").serialize(), function(data){
61
- $("#fancybox-content #add_asset_content").load(data[0].edit_box_url+"?type="+data[0].content_type);
62
- });
63
- reload_tray();
64
- $.fancybox.resize();;
65
- $.fancybox.hideActivity();
66
- });
67
- $("#fancybox-content .asset_submit_button").click(function(event){
68
- event.preventDefault();
69
- $.fancybox.showActivity();
70
- //var token = encodeURIComponent(AUTH_TOKEN)
71
- var asset_type = $(event.target).data("asset-type");
72
- reload_tray();
73
- $.fancybox.hideActivity();
74
- });
75
56
  $("form.edit_classification input[type=submit][value=Save]").hide();
76
57
  };
77
58
 
@@ -80,22 +61,4 @@ $(document).ready(function(){
80
61
  event.preventDefault();
81
62
  show_asset_box();
82
63
  });
83
- var reload_tray = function() {
84
- var user_id = $("#tray").data("user-id");
85
- $("#tray").load("/users/"+user_id+"/tray_positions/", function() {
86
- $('#tray .drop_button').click(function(event){
87
- event.preventDefault();
88
- var user_id = $(event.target).data("user-id");
89
- var tp_id = $(event.target).data("tp-id");
90
- $.ajax({
91
- type: 'DELETE',
92
- cache : false,
93
- url : "/users/"+user_id+"/tray_positions/"+tp_id,
94
- success: function(data) {
95
- $("#tray").load("/users/"+user_id+"/tray_positions/");
96
- }
97
- });
98
- });
99
- });
100
- };
101
64
  });
@@ -24,8 +24,3 @@ $(function(){
24
24
 
25
25
  $('.best_in_place').best_in_place();
26
26
  });
27
-
28
- /*$.ajax({
29
- data:$(this).sortable('serialize') + '&_method=put',
30
- type:'post', url:'/users/1/tray'
31
- })*/
@@ -0,0 +1,26 @@
1
+ $(document).ready(function(){
2
+ $(document).bind('ajax:success', function(evt, xhr, status){
3
+ reload_tray();
4
+ $('form').find('.errors').empty();
5
+ $.fancybox.close();
6
+ $("img[src=\"/assets/fassets_core/collapse.png\"].collapseExpandToggle").click();
7
+ $("#catalogs_list").load("/catalogs");
8
+ });
9
+ $(document).bind('ajax:error', function(evt, xhr, status, error){
10
+ var responseObject = $.parseJSON(xhr.responseText),
11
+ errors = new Object();
12
+
13
+ $('form').find('.errors').empty();
14
+ $.each(responseObject.errors, function(key, val){
15
+ var field = key;
16
+ errors[field] = $('<ul />');
17
+ $.each(val, function(){
18
+ errors[field].append('<li>' + this + '</li>');
19
+ });
20
+ });
21
+
22
+ $.each(errors, function(key, val){
23
+ $('form').find('#'+ key.replace('.','_') +'.errors').html(val);
24
+ });
25
+ });
26
+ });
@@ -13,6 +13,7 @@
13
13
  //= require ./classification
14
14
  //= require ./edit_box
15
15
  //= require ./facets
16
+ //= require ./form
16
17
  //= require ./tray
17
18
 
18
19
  $.ajaxSetup({ 'beforeSend': function(xhr) {
@@ -1,3 +1,22 @@
1
+ function reload_tray() {
2
+ var user_id = $("#tray").data("user-id");
3
+ $("#tray").load("/users/"+user_id+"/tray_positions/", function() {
4
+ $('#tray .drop_button').click(function(event){
5
+ event.preventDefault();
6
+ var user_id = $(event.target).data("user-id");
7
+ var tp_id = $(event.target).data("tp-id");
8
+ $.ajax({
9
+ type: 'DELETE',
10
+ cache : false,
11
+ url : "/users/"+user_id+"/tray_positions/"+tp_id,
12
+ success: function(data) {
13
+ $("#tray").load("/users/"+user_id+"/tray_positions/");
14
+ }
15
+ });
16
+ });
17
+ });
18
+ };
19
+
1
20
  $(document).ready(function(){
2
21
  $('#tray ol').sortable({
3
22
  items: 'li',
@@ -50,28 +50,9 @@
50
50
  top: 5px;
51
51
  width: 20%;
52
52
  }
53
- .wiki_results {
54
- display: inline;
55
- }
56
- .wiki_img {
57
- background: silver;
58
- float: left;
59
- margin: 5px;
60
- }
61
- #file_asset_form{
62
- width: 90%;
63
- height: 50%;
64
- padding-right: 10px;
65
- float: left;
66
- }
67
53
  #edit_asset_content{
68
54
  width: 98%;
69
55
  height: 48%;
70
56
  //float: left;
71
57
  }
72
- .wiki_image{
73
- float:left;
74
- }
75
- .wiki_actions{
76
- padding-left: 5px;
77
- }
58
+
@@ -7,6 +7,19 @@
7
7
  .submit {
8
8
  margin-top: 1em;
9
9
  }
10
+
11
+ span.errors {
12
+ ul {
13
+ display: inline;
14
+
15
+ li {
16
+ display: inline;
17
+ color: red;
18
+ }
19
+ li:after { content: ", "; }
20
+ li:last-child:after { content: ""; }
21
+ }
22
+ }
10
23
  }
11
24
  }
12
25
 
@@ -27,11 +27,11 @@ class AssetsController < FassetsCore::ApplicationController
27
27
  @classification = Classification.new(:catalog_id => params["classification"]["catalog_id"],:asset_id => @content.asset.id)
28
28
  @classification.save
29
29
  flash[:notice] = "Created new asset!"
30
- format.js { render :json => @content.to_jq_upload.merge({:status => :ok}).to_json }
30
+ format.js { render :nothing => true }
31
31
  format.html { redirect_to edit_asset_content_path(@content) }
32
32
  else
33
33
  flash[:error] = "Could not create asset!"
34
- format.js { render :json => {:errors => @content.errors.messages}.to_json }
34
+ format.js { render :json => {:errors => @content.errors.messages}.to_json, :status => :unprocessable_entity }
35
35
  format.html do
36
36
  render :template => 'assets/new'
37
37
  end
@@ -45,18 +45,30 @@ class AssetsController < FassetsCore::ApplicationController
45
45
  render :template => 'assets/edit', :layout => !(params["content_only"])
46
46
  end
47
47
  def update
48
- if @content.update_attributes(content_params) and @content.asset.update_attributes(params["asset"])
48
+ @content.update_attributes(content_params)
49
+ @content.asset.update_attributes(params["asset"])
50
+ if @content.save
49
51
  flash[:notice] = "Succesfully updated asset!"
50
52
  render :nothing => true
51
53
  else
52
- flash[:error] = "Could not update asset!"
53
- render :template => 'assets/edit'
54
+ respond_to do |format|
55
+ format.js { render :json => {:errors => @content.errors.messages}.to_json, :status => :unprocessable_entity }
56
+ format.html do
57
+ flash[:error] = "Could not update asset!"
58
+ render :template => 'assets/edit'
59
+ end
60
+ end
54
61
  end
55
62
  end
56
63
  def destroy
57
- flash[:notice] = "Asset has been deleted!"
58
64
  @content.destroy
59
- redirect_to main_app.root_url
65
+ respond_to do |format|
66
+ format.js { render :nothing => true }
67
+ format.html do
68
+ flash[:notice] = "Asset has been deleted!"
69
+ redirect_to main_app.root_url
70
+ end
71
+ end
60
72
  end
61
73
  def preview
62
74
  render :partial => content_model.to_s.underscore.pluralize + "/" + @content.media_type.to_s.underscore + "_preview"
@@ -18,15 +18,25 @@ class CatalogsController < FassetsCore::ApplicationController
18
18
  @catalog = Catalog.new(params[:catalog])
19
19
  if @catalog.save
20
20
  create_type_facet()
21
- flash[:notice] = "Catalog was successfully created."
22
- redirect_to catalogs_path
21
+ respond_to do |format|
22
+ format.html do
23
+ flash[:notice] = "Catalog was successfully created."
24
+ redirect_to catalogs_path
25
+ end
26
+ format.js { render :nothing => true }
27
+ end
23
28
  else
24
- if params[:catalog][:title].blank?
25
- flash[:error] = "Catalog could not be created! Title cannot be empty!"
26
- else
27
- flash[:error] = "Catalog could not be created!"
29
+ respond_to do |format|
30
+ format.html do
31
+ if params[:catalog][:title].blank?
32
+ flash[:error] = "Catalog could not be created! Title cannot be empty!"
33
+ else
34
+ flash[:error] = "Catalog could not be created!"
35
+ end
36
+ render :template => 'catalogs/index'
37
+ end
38
+ format.js { render :json => {:errors => @catalog.errors.messages}.to_json, :status => :unprocessable_entity }
28
39
  end
29
- render :template => 'catalogs/index'
30
40
  end
31
41
  end
32
42
  def edit
@@ -8,21 +8,22 @@
8
8
  %span.action
9
9
  =button_to "Delete", asset_content_path(@content),
10
10
  :method => :delete,
11
- :onclick => "return confirm('Are you sure?')",
12
- :class => "delete_asset_button"
11
+ :confirm => "Are you sure?",
12
+ :class => "delete_asset_button",
13
+ :remote => true
13
14
  =render :partial => "assets/put_on_tray"
14
15
  =render :partial => "#{@content.class.to_s.underscore.pluralize}/actions" rescue nil
15
16
  #asset_preview
16
- =render content_partial(@content, :preview)
17
+ =render :partial => content_partial(@content, :preview), :locals => {:content => @content}
17
18
 
18
19
  #asset_form
19
- =form_for @content, :url => asset_content_path(@content), :html => {:class => "fassets_core asset_form", :multipart => true} do |f|
20
+ =form_for @content, :url => asset_content_path(@content), :html => {:class => "fassets_core asset_form"}, :remote => true do |f|
20
21
  =render :partial => "shared/error", :locals => {:target => @content}
21
22
  =fields_for "asset", @content.asset do |asset|
22
23
  %p
23
24
  %label{:for => 'name'} Name:
24
25
  =asset.text_field :name
25
- #name_warning
26
+ %span#asset_name.errors
26
27
  =render :partial => "#{@content.class.to_s.underscore.pluralize}/form", :locals => {:new => new}, :object => f
27
28
  =submit_tag @content.new_record? ? "Create" : "Save",
28
29
  :class => "asset_submit_button",
@@ -1,13 +1,3 @@
1
- =content_for :h1 do
2
- #type
3
- =@content.media_type.capitalize
4
- #title
5
- =link_to @content.asset.name, asset_content_path(@content)
6
- #action
7
- %span.action
8
- =button_to "Delete", asset_content_path(@content), :method => :delete, :onclick => "return confirm('Are you sure?')"
9
- =render :partial => "assets/put_on_tray"
10
-
11
1
  #sidebar.fassets_core
12
2
  =render :partial => "assets/classification", :locals => {:asset => @content.asset}
13
3
  =render :partial => "#{@content.class.to_s.underscore.pluralize}/sidebar"
@@ -12,13 +12,12 @@
12
12
  -unless @content.nil?
13
13
  #add_asset_content
14
14
  #main.fassets_core
15
- =form_for @content, :url => asset_content_path(@content),:html => {:multipart => true} do |f|
16
- =render :partial => "shared/error", :locals => {:target => @content}
15
+ =form_for @content, :url => asset_content_path(@content), :remote => true do |f|
17
16
  =fields_for "asset" do |asset|
18
17
  %p
19
18
  %label{:for => 'name'} Name:
20
19
  =asset.text_field :name
21
- #name_warning
20
+ %span#asset_name.errors
22
21
  %p
23
22
  %label{:for => 'catalog_id'} Catalog:
24
23
  =select("classification", "catalog_id", Catalog.all.inject([]){|m,c| m << [c.title, c.id]})
@@ -1,5 +1,5 @@
1
1
  #asset_preview
2
- =render content_partial(@content, :preview)
2
+ =render :partial => content_partial(@content, :preview), :locals{content => @content}
3
3
 
4
4
  =content_for :h1 do
5
5
  #type
@@ -1,6 +1,7 @@
1
1
  %p
2
2
  %label{:for => 'title'} Title:
3
3
  =text_field :catalog, :title
4
+ %span#title.errors
4
5
  %p
5
6
  %label{:for => 'info'} Info:
6
7
  =text_area :catalog, :info, :rows => 4
@@ -1,17 +1,16 @@
1
- =content_for :h1 do
2
- Fassets Development
3
1
  #sidebar.fassets_core
4
2
  -if user_signed_in?
5
3
  .collapsible
6
4
  %h2.title New Catalog
7
- =form_for Catalog.new, :url => catalogs_path do |f|
5
+ =form_for Catalog.new, :url => catalogs_path, :remote => true do |f|
8
6
  =render :partial => "form", :object => f
9
7
  =submit_tag "Create"
10
- %ul.collection
11
- -Catalog.all.each do |catalog|
12
- %li
13
- =link_to(catalog.title, catalog_path(catalog))
14
- .content=catalog.info
8
+ #catalogs_list
9
+ %ul.collection
10
+ -Catalog.all.each do |catalog|
11
+ %li
12
+ =link_to(catalog.title, catalog_path(catalog))
13
+ .content=catalog.info
15
14
 
16
15
  #main
17
16
 
@@ -0,0 +1,5 @@
1
+ %ul.collection
2
+ -Catalog.all.each do |catalog|
3
+ %li
4
+ =link_to(catalog.title, catalog_path(catalog))
5
+ .content=catalog.info
@@ -47,11 +47,23 @@ shared_examples_for "Every AssetsController" do
47
47
  end
48
48
 
49
49
  describe "DELETE asset" do
50
- it "should delete the asset and show a notice" do
51
- delete "destroy", additional_request_params.merge({ :id => asset.id })
52
- assigns(:content).should respond_to(:destroy).with(0).arguments
53
- response.should redirect_to root_path
54
- request.flash[:notice].should =~ /^Asset has been deleted!$/
50
+ context "HTML request" do
51
+ it "should delete the asset and show a notice" do
52
+ delete "destroy", additional_request_params.merge({ :id => asset.id })
53
+ assigns(:content).should respond_to(:destroy).with(0).arguments
54
+ response.should redirect_to root_path
55
+ request.flash[:notice].should =~ /^Asset has been deleted!$/
56
+ end
57
+ end
58
+
59
+ context "JS request" do
60
+ it "should delete the asset" do
61
+ delete "destroy", additional_request_params.merge({ :id => asset.id, :format => :js })
62
+ assigns(:content).should respond_to(:destroy).with(0).arguments
63
+ response.should be_success
64
+ response.body.strip.should be_empty
65
+ request.flash.should be_empty
66
+ end
55
67
  end
56
68
  end
57
69
 
@@ -66,12 +78,29 @@ shared_examples_for "Every AssetsController" do
66
78
  end
67
79
 
68
80
  it "should throw an error when update fails" do
69
- controller.instance_eval { @content.stub!(:update_attributes) { false } }
70
- post 'update', additional_request_params.merge({ :id => asset.id })
81
+ controller.instance_eval { @content.stub!(:save) { false } }
82
+ post 'update', additional_request_params.merge({ :id => asset.id, :asset => { :name => "" } })
71
83
  assigns(:content).should respond_to(:update_attributes).with(1).argument
72
84
  request.flash[:error].should =~ /^Could not update asset!$/
73
85
  response.should render_template 'assets/edit'
74
86
  end
87
+
88
+ context "JS request" do
89
+ it "should fail with empty name for asset" do
90
+ controller.instance_eval do
91
+ @content.stub!(:save) { false }
92
+ @content.stub!(:errors) { Asset.create(:content_type => "Test").errors }
93
+ end
94
+ post 'update', additional_request_params.merge({ :id => asset.id, :format => :js, :asset => { :name => "" } })
95
+ response.status.should == 422
96
+ json = JSON.parse(response.body)
97
+ #HACK: in fact this should be 'asset.name'
98
+ #but errors needed to be stubbed and I’m not sure how exactly I can do this
99
+ json["errors"].should have_key("name")
100
+ json["errors"]["name"].first.should == "can't be blank"
101
+ end
102
+
103
+ end
75
104
  end
76
105
  end
77
106
 
@@ -123,14 +152,15 @@ shared_examples_for "Every AssetsController" do
123
152
  post 'create', additional_request_params.merge(p)
124
153
  content = assigns(:content)
125
154
  content.errors.messages.should == {}
126
- JSON.parse(response.body).class.should == Hash
127
- JSON.parse(response.body)["status"].should == "ok"
155
+ response.should be_success
156
+ response.body.strip.should be_empty
128
157
  end
129
158
 
130
159
  it "should fail when asset cannot be saved" do
131
160
  p = meta_data
132
161
  post 'create', additional_request_params.merge(p).merge({:format => :js})
133
162
  JSON.parse(response.body)["errors"].should_not be_nil
163
+ response.status.should == 422
134
164
  end
135
165
  end
136
166
  end
@@ -142,6 +172,7 @@ module FassetsCore::TestHelpers
142
172
  my_a = asset
143
173
  my_a.stub!(:destroy)
144
174
  my_a.stub!(:update_attributes) { true }
175
+ my_a.stub!(:save) { true }
145
176
  my_a.stub!(:asset) { double(Asset, :update_attributes => true, :name => "Example Asset") }
146
177
  controller.stub!(:find_content) { }
147
178
  controller.instance_eval { @content = my_a }
@@ -1,3 +1,3 @@
1
1
  module FassetsCore
2
- VERSION = "0.3.1"
2
+ VERSION = "0.4.0"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: fassets_core
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.1
4
+ version: 0.4.0
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -10,11 +10,11 @@ authors:
10
10
  autorequire:
11
11
  bindir: bin
12
12
  cert_chain: []
13
- date: 2012-10-18 00:00:00.000000000 Z
13
+ date: 2012-11-10 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: rails
17
- requirement: &70371960 !ruby/object:Gem::Requirement
17
+ requirement: !ruby/object:Gem::Requirement
18
18
  none: false
19
19
  requirements:
20
20
  - - ~>
@@ -22,10 +22,15 @@ dependencies:
22
22
  version: 3.1.1
23
23
  type: :runtime
24
24
  prerelease: false
25
- version_requirements: *70371960
25
+ version_requirements: !ruby/object:Gem::Requirement
26
+ none: false
27
+ requirements:
28
+ - - ~>
29
+ - !ruby/object:Gem::Version
30
+ version: 3.1.1
26
31
  - !ruby/object:Gem::Dependency
27
32
  name: jquery-rails
28
- requirement: &70370570 !ruby/object:Gem::Requirement
33
+ requirement: !ruby/object:Gem::Requirement
29
34
  none: false
30
35
  requirements:
31
36
  - - ! '>='
@@ -33,10 +38,15 @@ dependencies:
33
38
  version: '0'
34
39
  type: :runtime
35
40
  prerelease: false
36
- version_requirements: *70370570
41
+ version_requirements: !ruby/object:Gem::Requirement
42
+ none: false
43
+ requirements:
44
+ - - ! '>='
45
+ - !ruby/object:Gem::Version
46
+ version: '0'
37
47
  - !ruby/object:Gem::Dependency
38
48
  name: haml
39
- requirement: &70368760 !ruby/object:Gem::Requirement
49
+ requirement: !ruby/object:Gem::Requirement
40
50
  none: false
41
51
  requirements:
42
52
  - - ! '>='
@@ -44,10 +54,15 @@ dependencies:
44
54
  version: '0'
45
55
  type: :runtime
46
56
  prerelease: false
47
- version_requirements: *70368760
57
+ version_requirements: !ruby/object:Gem::Requirement
58
+ none: false
59
+ requirements:
60
+ - - ! '>='
61
+ - !ruby/object:Gem::Version
62
+ version: '0'
48
63
  - !ruby/object:Gem::Dependency
49
64
  name: sqlite3
50
- requirement: &70366260 !ruby/object:Gem::Requirement
65
+ requirement: !ruby/object:Gem::Requirement
51
66
  none: false
52
67
  requirements:
53
68
  - - ! '>='
@@ -55,10 +70,15 @@ dependencies:
55
70
  version: '0'
56
71
  type: :runtime
57
72
  prerelease: false
58
- version_requirements: *70366260
73
+ version_requirements: !ruby/object:Gem::Requirement
74
+ none: false
75
+ requirements:
76
+ - - ! '>='
77
+ - !ruby/object:Gem::Version
78
+ version: '0'
59
79
  - !ruby/object:Gem::Dependency
60
80
  name: mime-types
61
- requirement: &70364470 !ruby/object:Gem::Requirement
81
+ requirement: !ruby/object:Gem::Requirement
62
82
  none: false
63
83
  requirements:
64
84
  - - ! '>='
@@ -66,10 +86,15 @@ dependencies:
66
86
  version: '0'
67
87
  type: :runtime
68
88
  prerelease: false
69
- version_requirements: *70364470
89
+ version_requirements: !ruby/object:Gem::Requirement
90
+ none: false
91
+ requirements:
92
+ - - ! '>='
93
+ - !ruby/object:Gem::Version
94
+ version: '0'
70
95
  - !ruby/object:Gem::Dependency
71
96
  name: fancybox-rails
72
- requirement: &70308590 !ruby/object:Gem::Requirement
97
+ requirement: !ruby/object:Gem::Requirement
73
98
  none: false
74
99
  requirements:
75
100
  - - ! '>='
@@ -77,10 +102,15 @@ dependencies:
77
102
  version: '0'
78
103
  type: :runtime
79
104
  prerelease: false
80
- version_requirements: *70308590
105
+ version_requirements: !ruby/object:Gem::Requirement
106
+ none: false
107
+ requirements:
108
+ - - ! '>='
109
+ - !ruby/object:Gem::Version
110
+ version: '0'
81
111
  - !ruby/object:Gem::Dependency
82
112
  name: best_in_place
83
- requirement: &70306510 !ruby/object:Gem::Requirement
113
+ requirement: !ruby/object:Gem::Requirement
84
114
  none: false
85
115
  requirements:
86
116
  - - ! '>='
@@ -88,10 +118,15 @@ dependencies:
88
118
  version: '0'
89
119
  type: :runtime
90
120
  prerelease: false
91
- version_requirements: *70306510
121
+ version_requirements: !ruby/object:Gem::Requirement
122
+ none: false
123
+ requirements:
124
+ - - ! '>='
125
+ - !ruby/object:Gem::Version
126
+ version: '0'
92
127
  - !ruby/object:Gem::Dependency
93
128
  name: devise
94
- requirement: &70305300 !ruby/object:Gem::Requirement
129
+ requirement: !ruby/object:Gem::Requirement
95
130
  none: false
96
131
  requirements:
97
132
  - - ! '>='
@@ -99,10 +134,15 @@ dependencies:
99
134
  version: '0'
100
135
  type: :development
101
136
  prerelease: false
102
- version_requirements: *70305300
137
+ version_requirements: !ruby/object:Gem::Requirement
138
+ none: false
139
+ requirements:
140
+ - - ! '>='
141
+ - !ruby/object:Gem::Version
142
+ version: '0'
103
143
  - !ruby/object:Gem::Dependency
104
144
  name: guard-rspec
105
- requirement: &70304440 !ruby/object:Gem::Requirement
145
+ requirement: !ruby/object:Gem::Requirement
106
146
  none: false
107
147
  requirements:
108
148
  - - ! '>='
@@ -110,10 +150,15 @@ dependencies:
110
150
  version: '0'
111
151
  type: :development
112
152
  prerelease: false
113
- version_requirements: *70304440
153
+ version_requirements: !ruby/object:Gem::Requirement
154
+ none: false
155
+ requirements:
156
+ - - ! '>='
157
+ - !ruby/object:Gem::Version
158
+ version: '0'
114
159
  - !ruby/object:Gem::Dependency
115
160
  name: guard-spork
116
- requirement: &70303720 !ruby/object:Gem::Requirement
161
+ requirement: !ruby/object:Gem::Requirement
117
162
  none: false
118
163
  requirements:
119
164
  - - ! '>='
@@ -121,10 +166,15 @@ dependencies:
121
166
  version: '0'
122
167
  type: :development
123
168
  prerelease: false
124
- version_requirements: *70303720
169
+ version_requirements: !ruby/object:Gem::Requirement
170
+ none: false
171
+ requirements:
172
+ - - ! '>='
173
+ - !ruby/object:Gem::Version
174
+ version: '0'
125
175
  - !ruby/object:Gem::Dependency
126
176
  name: rspec-rails
127
- requirement: &70318590 !ruby/object:Gem::Requirement
177
+ requirement: !ruby/object:Gem::Requirement
128
178
  none: false
129
179
  requirements:
130
180
  - - ! '>='
@@ -132,10 +182,15 @@ dependencies:
132
182
  version: '0'
133
183
  type: :development
134
184
  prerelease: false
135
- version_requirements: *70318590
185
+ version_requirements: !ruby/object:Gem::Requirement
186
+ none: false
187
+ requirements:
188
+ - - ! '>='
189
+ - !ruby/object:Gem::Version
190
+ version: '0'
136
191
  - !ruby/object:Gem::Dependency
137
192
  name: capybara
138
- requirement: &70315710 !ruby/object:Gem::Requirement
193
+ requirement: !ruby/object:Gem::Requirement
139
194
  none: false
140
195
  requirements:
141
196
  - - ! '>='
@@ -143,7 +198,12 @@ dependencies:
143
198
  version: '0'
144
199
  type: :development
145
200
  prerelease: false
146
- version_requirements: *70315710
201
+ version_requirements: !ruby/object:Gem::Requirement
202
+ none: false
203
+ requirements:
204
+ - - ! '>='
205
+ - !ruby/object:Gem::Version
206
+ version: '0'
147
207
  description: A facetted classification framework for digital assets.
148
208
  email:
149
209
  - julian@svg4all.de
@@ -152,178 +212,180 @@ executables: []
152
212
  extensions: []
153
213
  extra_rdoc_files: []
154
214
  files:
215
+ - app/helpers/fassets_core/application_helper.rb
216
+ - app/helpers/catalogs_helper.rb
155
217
  - app/helpers/classifications_helper.rb
156
218
  - app/helpers/tray_positions_helper.rb
157
- - app/helpers/labels_helper.rb
158
- - app/helpers/catalogs_helper.rb
159
219
  - app/helpers/assets_helper.rb
160
- - app/helpers/fassets_core/application_helper.rb
161
- - app/controllers/tray_positions_controller.rb
162
- - app/controllers/labels_controller.rb
163
- - app/controllers/facets_controller.rb
164
- - app/controllers/catalogs_controller.rb
165
- - app/controllers/fassets_core/application_controller.rb
166
- - app/controllers/assets_controller.rb
167
- - app/controllers/classifications_controller.rb
168
- - app/models/asset.rb
169
- - app/models/classification.rb
170
- - app/models/label_filter.rb
171
- - app/models/tray_position.rb
172
- - app/models/facet.rb
173
- - app/models/catalog.rb
174
- - app/models/label.rb
175
- - app/models/labeling.rb
220
+ - app/helpers/labels_helper.rb
221
+ - app/views/labels/_form.haml
222
+ - app/views/labels/destroy.js.erb
223
+ - app/views/labels/_sidebar.html.haml
224
+ - app/views/tray_positions/destroy.js.rjs
225
+ - app/views/tray_positions/create.js.rjs
226
+ - app/views/tray_positions/sort.js.rjs
176
227
  - app/views/layouts/fassets_core/application.html.haml
228
+ - app/views/catalogs/index.js.haml
177
229
  - app/views/catalogs/show.html.haml
178
- - app/views/catalogs/_form.html.haml
179
- - app/views/catalogs/_box_content.html.haml
180
230
  - app/views/catalogs/index.html.haml
181
- - app/views/catalogs/box.html.haml
231
+ - app/views/catalogs/new.html.haml
182
232
  - app/views/catalogs/_facet.html.haml
183
233
  - app/views/catalogs/edit.html.haml
234
+ - app/views/catalogs/_box_content.html.haml
235
+ - app/views/catalogs/_box_catalog_list.html.haml
236
+ - app/views/catalogs/_form.html.haml
237
+ - app/views/catalogs/box.html.haml
184
238
  - app/views/catalogs/_filter_item.html.haml
185
- - app/views/catalogs/new.html.haml
186
239
  - app/views/catalogs/_catalog.html.haml
187
- - app/views/catalogs/_box_catalog_list.html.haml
188
- - app/views/labels/_form.haml
189
- - app/views/labels/_sidebar.html.haml
190
- - app/views/labels/destroy.js.erb
191
240
  - app/views/classifications/update.js.erb
192
- - app/views/shared/_error.html.haml
193
- - app/views/shared/_clipboard.html.haml
194
- - app/views/shared/_asset_form.html.haml
195
- - app/views/shared/_tray.html.haml
196
- - app/views/shared/_classification.html.haml
197
- - app/views/shared/_tray_position.html.haml
198
- - app/views/shared/_asset.html.haml
199
- - app/views/shared/_flash_messages.html.haml
200
- - app/views/facets/_form.html.haml
201
- - app/views/facets/edit.html.haml
202
241
  - app/views/assets/show.html.haml
203
- - app/views/assets/_form.html.haml
204
242
  - app/views/assets/_add_asset_sidebar.html.haml
243
+ - app/views/assets/_classification.html.haml
244
+ - app/views/assets/new.html.haml
205
245
  - app/views/assets/edit.html.haml
246
+ - app/views/assets/_form.html.haml
206
247
  - app/views/assets/_put_on_tray.html.haml
207
- - app/views/assets/new.html.haml
208
- - app/views/assets/_classification.html.haml
209
- - app/views/tray_positions/sort.js.rjs
210
- - app/views/tray_positions/destroy.js.rjs
211
- - app/views/tray_positions/create.js.rjs
212
- - app/assets/javascripts/fassets_core/assets.js
213
- - app/assets/javascripts/fassets_core/classification.js
214
- - app/assets/javascripts/fassets_core/edit_box.js
215
- - app/assets/javascripts/fassets_core/add_asset_box.js
216
- - app/assets/javascripts/fassets_core/facets.js.erb
217
- - app/assets/javascripts/fassets_core/catalogs.js
218
- - app/assets/javascripts/fassets_core/index.js
219
- - app/assets/javascripts/fassets_core/catalog_box.js
220
- - app/assets/javascripts/fassets_core/tray.js
221
- - app/assets/stylesheets/fassets_core/add_asset_box.css.scss
222
- - app/assets/stylesheets/fassets_core/forms.css.scss
223
- - app/assets/stylesheets/fassets_core/index.css
224
- - app/assets/stylesheets/fassets_core/master.css.scss
225
- - app/assets/stylesheets/fassets_core/sidebar.css.scss
226
- - app/assets/stylesheets/fassets_core/assets.css.scss
227
- - app/assets/stylesheets/fassets_core/edit_box.css.scss
228
- - app/assets/stylesheets/fassets_core/tray.css.scss
229
- - app/assets/stylesheets/fassets_core/catalog_box.css.scss
230
- - app/assets/stylesheets/fassets_core/filter.css.scss
231
- - app/assets/stylesheets/fassets_core/labels.css.scss
232
- - app/assets/stylesheets/fassets_core/facet.css.scss
233
- - app/assets/stylesheets/fassets_core/collapsible.css.scss
248
+ - app/views/facets/edit.html.haml
249
+ - app/views/facets/_form.html.haml
250
+ - app/views/shared/_asset_form.html.haml
251
+ - app/views/shared/_flash_messages.html.haml
252
+ - app/views/shared/_clipboard.html.haml
253
+ - app/views/shared/_classification.html.haml
254
+ - app/views/shared/_error.html.haml
255
+ - app/views/shared/_asset.html.haml
256
+ - app/views/shared/_tray_position.html.haml
257
+ - app/views/shared/_tray.html.haml
258
+ - app/controllers/fassets_core/application_controller.rb
259
+ - app/controllers/assets_controller.rb
260
+ - app/controllers/classifications_controller.rb
261
+ - app/controllers/labels_controller.rb
262
+ - app/controllers/tray_positions_controller.rb
263
+ - app/controllers/facets_controller.rb
264
+ - app/controllers/catalogs_controller.rb
234
265
  - app/assets/images/fassets_core/delete.png
266
+ - app/assets/images/fassets_core/markup_preview.png
267
+ - app/assets/images/fassets_core/drag.png
235
268
  - app/assets/images/fassets_core/archive.png
236
269
  - app/assets/images/fassets_core/clipboard.png
237
- - app/assets/images/fassets_core/remove.png
238
- - app/assets/images/fassets_core/collapsed.png
239
270
  - app/assets/images/fassets_core/add.png
240
- - app/assets/images/fassets_core/edit.png
241
- - app/assets/images/fassets_core/collapse.png
242
271
  - app/assets/images/fassets_core/link.png
243
- - app/assets/images/fassets_core/markup_preview.png
272
+ - app/assets/images/fassets_core/sort.png
273
+ - app/assets/images/fassets_core/remove.png
244
274
  - app/assets/images/fassets_core/warning.png
245
- - app/assets/images/fassets_core/drag.png
275
+ - app/assets/images/fassets_core/collapsed.png
276
+ - app/assets/images/fassets_core/collapse.png
277
+ - app/assets/images/fassets_core/edit.png
246
278
  - app/assets/images/fassets_core/classify.png
247
- - app/assets/images/fassets_core/sort.png
248
- - config/initializers/users.rb
279
+ - app/assets/stylesheets/fassets_core/facet.css.scss
280
+ - app/assets/stylesheets/fassets_core/forms.css.scss
281
+ - app/assets/stylesheets/fassets_core/index.css
282
+ - app/assets/stylesheets/fassets_core/add_asset_box.css.scss
283
+ - app/assets/stylesheets/fassets_core/tray.css.scss
284
+ - app/assets/stylesheets/fassets_core/edit_box.css.scss
285
+ - app/assets/stylesheets/fassets_core/assets.css.scss
286
+ - app/assets/stylesheets/fassets_core/collapsible.css.scss
287
+ - app/assets/stylesheets/fassets_core/filter.css.scss
288
+ - app/assets/stylesheets/fassets_core/master.css.scss
289
+ - app/assets/stylesheets/fassets_core/catalog_box.css.scss
290
+ - app/assets/stylesheets/fassets_core/labels.css.scss
291
+ - app/assets/stylesheets/fassets_core/sidebar.css.scss
292
+ - app/assets/javascripts/fassets_core/form.js
293
+ - app/assets/javascripts/fassets_core/assets.js
294
+ - app/assets/javascripts/fassets_core/tray.js
295
+ - app/assets/javascripts/fassets_core/index.js
296
+ - app/assets/javascripts/fassets_core/catalog_box.js
297
+ - app/assets/javascripts/fassets_core/add_asset_box.js
298
+ - app/assets/javascripts/fassets_core/facets.js.erb
299
+ - app/assets/javascripts/fassets_core/classification.js
300
+ - app/assets/javascripts/fassets_core/edit_box.js
301
+ - app/assets/javascripts/fassets_core/catalogs.js
302
+ - app/models/asset.rb
303
+ - app/models/labeling.rb
304
+ - app/models/tray_position.rb
305
+ - app/models/facet.rb
306
+ - app/models/label_filter.rb
307
+ - app/models/catalog.rb
308
+ - app/models/classification.rb
309
+ - app/models/label.rb
310
+ - config/routes.rb
249
311
  - config/initializers/uploader.rb
312
+ - config/initializers/users.rb
250
313
  - config/initializers/mime_types.rb
251
- - config/routes.rb
252
- - db/migrate/007_create_tray_positions.rb
253
- - db/migrate/017_add_clipboard.rb
254
- - db/migrate/001_create_catalogs.rb
255
- - db/migrate/006_create_labelings.rb
256
- - db/migrate/20120803150826_add_position_to_facet.rb
257
- - db/migrate/008_create_assets.rb
258
314
  - db/migrate/002_create_facets.rb
259
- - db/migrate/005_create_classifications.rb
315
+ - db/migrate/006_create_labelings.rb
260
316
  - db/migrate/003_create_labels.rb
317
+ - db/migrate/005_create_classifications.rb
261
318
  - db/migrate/010_add_label_ordering.rb
319
+ - db/migrate/20120803150826_add_position_to_facet.rb
320
+ - db/migrate/007_create_tray_positions.rb
321
+ - db/migrate/008_create_assets.rb
322
+ - db/migrate/001_create_catalogs.rb
323
+ - db/migrate/017_add_clipboard.rb
262
324
  - db/schema.rb
263
325
  - db/seeds.rb
264
326
  - lib/acts_as_asset.rb
265
- - lib/fassets_core.rb
266
- - lib/tasks/cucumber.rake
267
- - lib/tasks/fassets-core_tasks.rake
327
+ - lib/fassets_core/version.rb
328
+ - lib/fassets_core/engine.rb
329
+ - lib/fassets_core/plugins.rb
268
330
  - lib/fassets_core/test_helper/acts_as_asset.rb
269
- - lib/fassets_core/test_helper/every_authenticated_controller.rb
270
331
  - lib/fassets_core/test_helper/every_assets_controller.rb
332
+ - lib/fassets_core/test_helper/every_authenticated_controller.rb
271
333
  - lib/fassets_core/test_helper.rb
272
- - lib/fassets_core/engine.rb
273
- - lib/fassets_core/version.rb
274
- - lib/fassets_core/plugins.rb
334
+ - lib/fassets_core.rb
335
+ - lib/tasks/cucumber.rake
336
+ - lib/tasks/fassets-core_tasks.rake
275
337
  - MIT-LICENSE
276
338
  - Rakefile
277
339
  - README.md
278
- - test/integration/navigation_test.rb
279
340
  - test/fassets-core_test.rb
280
- - test/unit/image_asset_test.rb
281
- - test/unit/tray_position_test.rb
282
- - test/unit/catalog_test.rb
283
- - test/unit/labelling_test.rb
284
- - test/unit/slide_test.rb
285
- - test/unit/asset_content_test.rb
286
- - test/unit/topic_test.rb
287
- - test/unit/user_test.rb
288
- - test/unit/frame_test.rb
289
- - test/unit/asset_test.rb
290
- - test/unit/facet_test.rb
291
- - test/unit/label_test.rb
292
- - test/unit/classification_test.rb
293
- - test/unit/slot_test.rb
294
- - test/unit/presentation_test.rb
295
- - test/test_helper.rb
296
- - test/fixtures/labels.yml
297
- - test/fixtures/catalogs.yml
298
- - test/fixtures/labellings.yml
299
- - test/fixtures/tray_positions.yml
300
- - test/fixtures/slides.yml
301
- - test/fixtures/assets.yml
302
- - test/fixtures/topics.yml
303
- - test/fixtures/frames.yml
304
- - test/fixtures/facets.yml
305
- - test/fixtures/image_assets.yml
306
- - test/fixtures/classifications.yml
307
- - test/fixtures/users.yml
308
- - test/fixtures/slots.yml
309
- - test/fixtures/asset_contents.yml
310
- - test/fixtures/presentations.yml
311
- - test/functional/users_controller_test.rb
312
- - test/functional/tray_positions_controller_test.rb
313
- - test/functional/classifications_controller_test.rb
314
341
  - test/functional/slots_controller_test.rb
315
- - test/functional/labellings_controller_test.rb
316
- - test/functional/catalogs_controller_test.rb
317
342
  - test/functional/files_controller_test.rb
343
+ - test/functional/catalogs_controller_test.rb
344
+ - test/functional/labellings_controller_test.rb
345
+ - test/functional/tray_positions_controller_test.rb
346
+ - test/functional/assets_controller_test.rb
318
347
  - test/functional/presentations_controller_test.rb
348
+ - test/functional/classifications_controller_test.rb
349
+ - test/functional/users_controller_test.rb
319
350
  - test/functional/sessions_controller_test.rb
320
- - test/functional/facets_controller_test.rb
321
- - test/functional/urls_controller_test.rb
322
- - test/functional/assets_controller_test.rb
323
351
  - test/functional/labels_controller_test.rb
324
- - test/functional/slides_controller_test.rb
325
352
  - test/functional/file_assets_controller_test.rb
353
+ - test/functional/urls_controller_test.rb
354
+ - test/functional/facets_controller_test.rb
355
+ - test/functional/slides_controller_test.rb
326
356
  - test/functional/content_controller_test.rb
357
+ - test/fixtures/catalogs.yml
358
+ - test/fixtures/slides.yml
359
+ - test/fixtures/topics.yml
360
+ - test/fixtures/classifications.yml
361
+ - test/fixtures/labellings.yml
362
+ - test/fixtures/presentations.yml
363
+ - test/fixtures/facets.yml
364
+ - test/fixtures/slots.yml
365
+ - test/fixtures/frames.yml
366
+ - test/fixtures/users.yml
367
+ - test/fixtures/asset_contents.yml
368
+ - test/fixtures/labels.yml
369
+ - test/fixtures/assets.yml
370
+ - test/fixtures/image_assets.yml
371
+ - test/fixtures/tray_positions.yml
372
+ - test/test_helper.rb
373
+ - test/unit/tray_position_test.rb
374
+ - test/unit/catalog_test.rb
375
+ - test/unit/frame_test.rb
376
+ - test/unit/asset_test.rb
377
+ - test/unit/presentation_test.rb
378
+ - test/unit/topic_test.rb
379
+ - test/unit/user_test.rb
380
+ - test/unit/labelling_test.rb
381
+ - test/unit/slot_test.rb
382
+ - test/unit/facet_test.rb
383
+ - test/unit/slide_test.rb
384
+ - test/unit/image_asset_test.rb
385
+ - test/unit/classification_test.rb
386
+ - test/unit/label_test.rb
387
+ - test/unit/asset_content_test.rb
388
+ - test/integration/navigation_test.rb
327
389
  - test/performance/browsing_test.rb
328
390
  homepage: https://github.com/fassets/
329
391
  licenses: []
@@ -339,7 +401,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
339
401
  version: '0'
340
402
  segments:
341
403
  - 0
342
- hash: 520050769
404
+ hash: 2183292788371298868
343
405
  required_rubygems_version: !ruby/object:Gem::Requirement
344
406
  none: false
345
407
  requirements:
@@ -348,61 +410,61 @@ required_rubygems_version: !ruby/object:Gem::Requirement
348
410
  version: '0'
349
411
  segments:
350
412
  - 0
351
- hash: 520050769
413
+ hash: 2183292788371298868
352
414
  requirements: []
353
415
  rubyforge_project:
354
- rubygems_version: 1.8.10
416
+ rubygems_version: 1.8.24
355
417
  signing_key:
356
418
  specification_version: 3
357
419
  summary: A facetted classification framework for digital assets.
358
420
  test_files:
359
- - test/integration/navigation_test.rb
360
421
  - test/fassets-core_test.rb
361
- - test/unit/image_asset_test.rb
362
- - test/unit/tray_position_test.rb
363
- - test/unit/catalog_test.rb
364
- - test/unit/labelling_test.rb
365
- - test/unit/slide_test.rb
366
- - test/unit/asset_content_test.rb
367
- - test/unit/topic_test.rb
368
- - test/unit/user_test.rb
369
- - test/unit/frame_test.rb
370
- - test/unit/asset_test.rb
371
- - test/unit/facet_test.rb
372
- - test/unit/label_test.rb
373
- - test/unit/classification_test.rb
374
- - test/unit/slot_test.rb
375
- - test/unit/presentation_test.rb
376
- - test/test_helper.rb
377
- - test/fixtures/labels.yml
378
- - test/fixtures/catalogs.yml
379
- - test/fixtures/labellings.yml
380
- - test/fixtures/tray_positions.yml
381
- - test/fixtures/slides.yml
382
- - test/fixtures/assets.yml
383
- - test/fixtures/topics.yml
384
- - test/fixtures/frames.yml
385
- - test/fixtures/facets.yml
386
- - test/fixtures/image_assets.yml
387
- - test/fixtures/classifications.yml
388
- - test/fixtures/users.yml
389
- - test/fixtures/slots.yml
390
- - test/fixtures/asset_contents.yml
391
- - test/fixtures/presentations.yml
392
- - test/functional/users_controller_test.rb
393
- - test/functional/tray_positions_controller_test.rb
394
- - test/functional/classifications_controller_test.rb
395
422
  - test/functional/slots_controller_test.rb
396
- - test/functional/labellings_controller_test.rb
397
- - test/functional/catalogs_controller_test.rb
398
423
  - test/functional/files_controller_test.rb
424
+ - test/functional/catalogs_controller_test.rb
425
+ - test/functional/labellings_controller_test.rb
426
+ - test/functional/tray_positions_controller_test.rb
427
+ - test/functional/assets_controller_test.rb
399
428
  - test/functional/presentations_controller_test.rb
429
+ - test/functional/classifications_controller_test.rb
430
+ - test/functional/users_controller_test.rb
400
431
  - test/functional/sessions_controller_test.rb
401
- - test/functional/facets_controller_test.rb
402
- - test/functional/urls_controller_test.rb
403
- - test/functional/assets_controller_test.rb
404
432
  - test/functional/labels_controller_test.rb
405
- - test/functional/slides_controller_test.rb
406
433
  - test/functional/file_assets_controller_test.rb
434
+ - test/functional/urls_controller_test.rb
435
+ - test/functional/facets_controller_test.rb
436
+ - test/functional/slides_controller_test.rb
407
437
  - test/functional/content_controller_test.rb
438
+ - test/fixtures/catalogs.yml
439
+ - test/fixtures/slides.yml
440
+ - test/fixtures/topics.yml
441
+ - test/fixtures/classifications.yml
442
+ - test/fixtures/labellings.yml
443
+ - test/fixtures/presentations.yml
444
+ - test/fixtures/facets.yml
445
+ - test/fixtures/slots.yml
446
+ - test/fixtures/frames.yml
447
+ - test/fixtures/users.yml
448
+ - test/fixtures/asset_contents.yml
449
+ - test/fixtures/labels.yml
450
+ - test/fixtures/assets.yml
451
+ - test/fixtures/image_assets.yml
452
+ - test/fixtures/tray_positions.yml
453
+ - test/test_helper.rb
454
+ - test/unit/tray_position_test.rb
455
+ - test/unit/catalog_test.rb
456
+ - test/unit/frame_test.rb
457
+ - test/unit/asset_test.rb
458
+ - test/unit/presentation_test.rb
459
+ - test/unit/topic_test.rb
460
+ - test/unit/user_test.rb
461
+ - test/unit/labelling_test.rb
462
+ - test/unit/slot_test.rb
463
+ - test/unit/facet_test.rb
464
+ - test/unit/slide_test.rb
465
+ - test/unit/image_asset_test.rb
466
+ - test/unit/classification_test.rb
467
+ - test/unit/label_test.rb
468
+ - test/unit/asset_content_test.rb
469
+ - test/integration/navigation_test.rb
408
470
  - test/performance/browsing_test.rb