OSDN Git Service

speech and balloon template deleted
authoryasushiito <yasushiito@git.sourceforge.jp>
Sat, 2 Jun 2012 01:20:23 +0000 (10:20 +0900)
committeryasushiito <yasushiito@git.sourceforge.jp>
Sat, 2 Jun 2012 01:20:23 +0000 (10:20 +0900)
24 files changed:
app/controllers/balloon_templates_controller.rb [deleted file]
app/controllers/speech_templates_controller.rb [deleted file]
app/helpers/balloon_templates_helper.rb [deleted file]
app/helpers/balloon_types_helper.rb [deleted file]
app/helpers/speech_templates_helper.rb [deleted file]
app/models/balloon_template.rb [deleted file]
app/models/speech_template.rb [deleted file]
app/views/balloon_templates/index.html.erb [deleted file]
app/views/balloon_templates/list.html.erb [deleted file]
app/views/layouts/test.html.erb
app/views/speech_templates/index.html.erb [deleted file]
app/views/speech_templates/list.html.erb [deleted file]
config/routes.rb
db/migrate/20111206115439_create_balloon_templates.rb [deleted file]
db/migrate/20111206120252_create_speech_templates.rb [deleted file]
db/schema.rb
spec/controllers/balloon_templates_controller_spec.rb [deleted file]
spec/controllers/speech_templates_controller_spec.rb [deleted file]
spec/helpers/balloon_templates_helper_spec.rb [deleted file]
spec/helpers/speech_templates_helper_spec.rb [deleted file]
spec/json/invalid_speech_balloon_templates.json
spec/json/speech_balloon_templates.json
spec/models/balloon_template_spec.rb [deleted file]
spec/models/speech_template_spec.rb [deleted file]

diff --git a/app/controllers/balloon_templates_controller.rb b/app/controllers/balloon_templates_controller.rb
deleted file mode 100644 (file)
index e224e2f..0000000
+++ /dev/null
@@ -1,24 +0,0 @@
-class BalloonTemplatesController < ApplicationController
-  before_filter :authenticate_user!, :only => [:index, :show]
-  before_filter :authenticate_admin!, :only => [:list, :browse]
-  
-  # GET /balloon_templates
-  # GET /balloon_templates.json
-  def index
-    @balloon_templates = BalloonTemplate.all
-
-    respond_to do |format|
-      format.html # index.html.erb
-      format.json { render json: @balloon_templates }
-    end
-  end
-
-  def list
-    @balloon_templates = BalloonTemplate.all
-
-    respond_to do |format|
-      format.html { render layout: 'system' }
-      format.json { render json: @balloon_templates }
-    end
-  end
-end
diff --git a/app/controllers/speech_templates_controller.rb b/app/controllers/speech_templates_controller.rb
deleted file mode 100644 (file)
index 60ac6c4..0000000
+++ /dev/null
@@ -1,25 +0,0 @@
-class SpeechTemplatesController < ApplicationController
-  before_filter :authenticate_user!, :only => [:index, :show]
-  before_filter :authenticate_admin!, :only => [:list, :browse]
-
-  # GET /speech_templates
-  # GET /speech_templates.json
-  def index
-    @speech_templates = SpeechTemplate.all
-
-    respond_to do |format|
-      format.html # index.html.erb
-      format.json { render json: @speech_templates }
-    end
-  end
-
-  def list
-    @speech_templates = SpeechTemplate.all
-
-    respond_to do |format|
-      format.html { render layout: 'system' }
-      format.json { render json: @speech_templates }
-    end
-  end
-
-end
diff --git a/app/helpers/balloon_templates_helper.rb b/app/helpers/balloon_templates_helper.rb
deleted file mode 100644 (file)
index afab2a2..0000000
+++ /dev/null
@@ -1,2 +0,0 @@
-module BalloonTemplatesHelper
-end
diff --git a/app/helpers/balloon_types_helper.rb b/app/helpers/balloon_types_helper.rb
deleted file mode 100644 (file)
index abc0847..0000000
+++ /dev/null
@@ -1,2 +0,0 @@
-module BalloonTypesHelper
-end
diff --git a/app/helpers/speech_templates_helper.rb b/app/helpers/speech_templates_helper.rb
deleted file mode 100644 (file)
index 3091a5d..0000000
+++ /dev/null
@@ -1,2 +0,0 @@
-module SpeechTemplatesHelper
-end
diff --git a/app/models/balloon_template.rb b/app/models/balloon_template.rb
deleted file mode 100644 (file)
index c050ed9..0000000
+++ /dev/null
@@ -1,6 +0,0 @@
-class BalloonTemplate < ActiveRecord::Base
-  belongs_to :speech_balloon
-  has_many :speech_templates, :dependent => :destroy
-  belongs_to :system_picture
-  accepts_nested_attributes_for :speech_templates
-end
diff --git a/app/models/speech_template.rb b/app/models/speech_template.rb
deleted file mode 100644 (file)
index d0871b3..0000000
+++ /dev/null
@@ -1,3 +0,0 @@
-class SpeechTemplate < ActiveRecord::Base
-  belongs_to :balloon_template
-end
diff --git a/app/views/balloon_templates/index.html.erb b/app/views/balloon_templates/index.html.erb
deleted file mode 100644 (file)
index 93b1b81..0000000
+++ /dev/null
@@ -1,27 +0,0 @@
-<h1>Listing balloon_templates</h1>
-
-<table>
-  <tr>
-    <th>speech balloon</th>
-    <th>system_picture</th>
-    <th>Tail</th>
-    <th>size</th>
-    <th>MinWidth</th>
-    <th>MinHeight</th>
-    <th>MaxWidth</th>
-    <th>MaxHeight</th>
-  </tr>
-
-<% @balloon_templates.each do |balloon_template| %>
-  <tr>
-    <td><%= balloon_template.speech_balloon_id %></td>
-    <td><%= balloon_template.system_picture_id %></td>
-    <td><%= balloon_template.tail %></td>
-    <td><%= balloon_template.size %></td>
-    <td><%= balloon_template.min_width %></td>
-    <td><%= balloon_template.min_height %></td>
-    <td><%= balloon_template.max_width %></td>
-    <td><%= balloon_template.max_height %></td>
-  </tr>
-<% end %>
-</table>
diff --git a/app/views/balloon_templates/list.html.erb b/app/views/balloon_templates/list.html.erb
deleted file mode 100644 (file)
index 7a83614..0000000
+++ /dev/null
@@ -1,33 +0,0 @@
-<h1>Listing balloon_templates</h1>
-
-<table>
-  <tr>
-    <th>id</th>
-    <th>speech balloon</th>
-    <th>system_picture</th>
-    <th>Tail</th>
-    <th>size</th>
-    <th>MinWidth</th>
-    <th>MinHeight</th>
-    <th>MaxWidth</th>
-    <th>MaxHeight</th>
-    <th>created_at</th>
-    <th>updated_at</th>
-  </tr>
-
-<% @balloon_templates.each do |balloon_template| %>
-  <tr>
-    <td><%= link_to balloon_template.id, :action => :browse, :id => balloon_template.id %></td>
-    <td><%= link_to balloon_template.speech_balloon_id, :controller => 'speech_balloons', :action => :browse, :id => balloon_template.speech_balloon_id %></td>
-    <td><%= link_to balloon_template.system_picture_id, :controller => 'system_pictures', :action => :browse, :id => balloon_template.system_picture_id %></td>
-    <td><%= balloon_template.tail %></td>
-    <td><%= balloon_template.size %></td>
-    <td><%= balloon_template.min_width %></td>
-    <td><%= balloon_template.min_height %></td>
-    <td><%= balloon_template.max_width %></td>
-    <td><%= balloon_template.max_height %></td>
-    <td><%= balloon_template.created_at %></td>
-    <td><%= balloon_template.updated_at %></td>
-  </tr>
-<% end %>
-</table>
index 905f1f1..9bb1395 100644 (file)
 <%= link_to 'original_pictures', original_pictures_path %>\r
 <%= link_to 'resource_pictures', resource_pictures_path %>\r
 <%= link_to 'panel_pictures', panel_pictures_path %>\r
+<%= link_to 'speech_balloons', speech_balloons_path %>\r
 <%= link_to 'balloons', balloons_path %>\r
 <%= link_to 'speeches', speeches_path %>\r
  : \r
-<%= link_to 'speech_balloons', speech_balloons_path %>\r
-<%= link_to 'balloon_templates', balloon_templates_path %>\r
-<%= link_to 'speech_templates', speech_templates_path %>\r
+<%= link_to 'speech_balloon_templates', speech_balloon_templates_path %>\r
  : \r
 <%= link_to 'artists', artists_path %>\r
 <%= link_to 'system_pictures', system_pictures_path %>\r
diff --git a/app/views/speech_templates/index.html.erb b/app/views/speech_templates/index.html.erb
deleted file mode 100644 (file)
index 470ad0f..0000000
+++ /dev/null
@@ -1,21 +0,0 @@
-<h1>Listing speech_templates</h1>
-
-<table>
-  <tr>
-    <th>balloon template</th>
-    <th>x</th>
-    <th>y</th>
-    <th>Width</th>
-    <th>Height</th>
-  </tr>
-
-<% @speech_templates.each do |speech_template| %>
-  <tr>
-    <td><%= speech_template.balloon_template_id %></td>
-    <td><%= speech_template.x %></td>
-    <td><%= speech_template.y %></td>
-    <td><%= speech_template.width %></td>
-    <td><%= speech_template.height %></td>
-  </tr>
-<% end %>
-</table>
diff --git a/app/views/speech_templates/list.html.erb b/app/views/speech_templates/list.html.erb
deleted file mode 100644 (file)
index 8a7718d..0000000
+++ /dev/null
@@ -1,27 +0,0 @@
-<h1>Listing speech_templates</h1>
-
-<table>
-  <tr>
-    <th>id</th>
-    <th>balloon template</th>
-    <th>x</th>
-    <th>y</th>
-    <th>Width</th>
-    <th>Height</th>
-    <th>created_at</th>
-    <th>updated_at</th>
-  </tr>
-
-<% @speech_templates.each do |speech_template| %>
-  <tr>
-    <td><%= link_to speech_template.id, :action => :browse, :id => speech_template.id %></td>
-    <td><%= link_to speech_template.balloon_template_id, :controller => 'balloon_templates', :action => :browse, :id => speech_template.balloon_template_id %></td>
-    <td><%= speech_template.x %></td>
-    <td><%= speech_template.y %></td>
-    <td><%= speech_template.width %></td>
-    <td><%= speech_template.height %></td>
-    <td><%= speech_template.created_at %></td>
-    <td><%= speech_template.updated_at %></td>
-  </tr>
-<% end %>
-</table>
index 0bb58ae..0eb6117 100644 (file)
@@ -44,26 +44,6 @@ Pettanr::Application.routes.draw do
       delete :destroy
     end
   end
-  resources :speech_templates do
-    collection do
-      get :index
-      get :show
-      get :list
-      get :browse
-    end
-    member do
-    end
-  end
-  resources :balloon_templates do
-    collection do
-      get :index
-      get :show
-      get :list
-      get :browse
-    end
-    member do
-    end
-  end
   resources :speeches do
     collection do
       get :list
diff --git a/db/migrate/20111206115439_create_balloon_templates.rb b/db/migrate/20111206115439_create_balloon_templates.rb
deleted file mode 100644 (file)
index f5a1e93..0000000
+++ /dev/null
@@ -1,18 +0,0 @@
-class CreateBalloonTemplates < ActiveRecord::Migration
-  def change
-    create_table :balloon_templates do |t|
-      t.integer :speech_balloon_id, :null => false
-      t.integer :system_picture_id, :null => false
-      t.integer :tail, :null => false, :default => 1
-      t.integer :size, :null => false, :default => 1
-      t.integer :min_width, :null => false, :default => 0
-      t.integer :max_width, :null => false, :default => 0
-      t.integer :min_height, :null => false, :default => 0
-      t.integer :max_height, :null => false, :default => 0
-
-      t.timestamps
-    end
-    add_index :balloon_templates, [:speech_balloon_id]
-    add_index :balloon_templates, [:speech_balloon_id, :tail, :size], :unique => true, :name => 'balloon_templates_idts'
-  end
-end
diff --git a/db/migrate/20111206120252_create_speech_templates.rb b/db/migrate/20111206120252_create_speech_templates.rb
deleted file mode 100644 (file)
index 81120fa..0000000
+++ /dev/null
@@ -1,15 +0,0 @@
-class CreateSpeechTemplates < ActiveRecord::Migration
-  def change
-    create_table :speech_templates do |t|
-      t.integer :balloon_template_id, :null => false
-      t.integer :x, :null => false
-      t.integer :y, :null => false
-      t.integer :t, :null => false, :default => 1
-      t.integer :width, :null => false
-      t.integer :height, :null => false
-
-      t.timestamps
-    end
-    add_index :speech_templates, [:balloon_template_id, :t], :unique => true, :name => 'speech_templates_idt'
-  end
-end
index a1cc209..5e69dc6 100644 (file)
@@ -59,22 +59,6 @@ ActiveRecord::Schema.define(:version => 20120424100555) do
 \r
   add_index "authors", ["user_id"], :name => "index_authors_on_user_id", :unique => true\r
 \r
-  create_table "balloon_templates", :force => true do |t|\r
-    t.integer  "speach_balloon_id",                :null => false\r
-    t.integer  "system_picture_id",                :null => false\r
-    t.integer  "tail",              :default => 1, :null => false\r
-    t.integer  "size",              :default => 1, :null => false\r
-    t.integer  "min_width",         :default => 0, :null => false\r
-    t.integer  "max_width",         :default => 0, :null => false\r
-    t.integer  "min_height",        :default => 0, :null => false\r
-    t.integer  "max_height",        :default => 0, :null => false\r
-    t.datetime "created_at"\r
-    t.datetime "updated_at"\r
-  end\r
-\r
-  add_index "balloon_templates", ["speach_balloon_id", "tail", "size"], :name => "balloon_templates_idts", :unique => true\r
-  add_index "balloon_templates", ["speach_balloon_id"], :name => "index_balloon_templates_on_speach_balloon_id"\r
-\r
   create_table "balloons", :force => true do |t|\r
     t.integer  "panel_id",                           :null => false\r
     t.integer  "balloon_template_id",                :null => false\r
@@ -141,7 +125,6 @@ ActiveRecord::Schema.define(:version => 20120424100555) do
   add_index "licenses", ["url"], :name => "index_licenses_on_url", :unique => true\r
 \r
   create_table "original_licenses", :force => true do |t|\r
-    t.integer  "artist_id",                        :null => false\r
     t.integer  "license_id",                       :null => false\r
     t.string   "name",                             :null => false\r
     t.string   "url",                              :null => false\r
@@ -192,11 +175,11 @@ ActiveRecord::Schema.define(:version => 20120424100555) do
     t.integer  "width",               :default => 200, :null => false\r
     t.integer  "height",              :default => 80,  :null => false\r
     t.integer  "border",              :default => 1,   :null => false\r
-    t.integer  "x",                                    :null => false\r
-    t.integer  "y",                                    :null => false\r
-    t.integer  "z",                                    :null => false\r
-    t.integer  "t",                   :default => 1,   :null => false\r
-    t.integer  "author_id"\r
+    t.integer  "x"\r
+    t.integer  "y"\r
+    t.integer  "z"\r
+    t.integer  "t",                                    :null => false\r
+    t.integer  "author_id",                            :null => false\r
     t.datetime "created_at"\r
     t.datetime "updated_at"\r
   end\r
@@ -238,24 +221,11 @@ ActiveRecord::Schema.define(:version => 20120424100555) do
     t.datetime "updated_at"\r
   end\r
 \r
-  add_index "speach_balloons", ["t"], :name => "speach_balloons_t", :unique => true\r
-\r
-  create_table "speach_templates", :force => true do |t|\r
-    t.integer  "balloon_template_id",                :null => false\r
-    t.integer  "x",                                  :null => false\r
-    t.integer  "y",                                  :null => false\r
-    t.integer  "t",                   :default => 1, :null => false\r
-    t.integer  "width",                              :null => false\r
-    t.integer  "height",                             :null => false\r
-    t.datetime "created_at"\r
-    t.datetime "updated_at"\r
-  end\r
-\r
-  add_index "speach_templates", ["balloon_template_id", "t"], :name => "speach_templates_idt", :unique => true\r
+  add_index "speech_balloons", ["t"], :name => "speech_balloons_t", :unique => true\r
 \r
-  create_table "speaches", :force => true do |t|\r
+  create_table "speeches", :force => true do |t|\r
     t.integer  "balloon_id",                        :null => false\r
-    t.integer  "speach_template_id",                :null => false\r
+    t.integer  "speech_template_id",                :null => false\r
     t.string   "content"\r
     t.integer  "x",                                 :null => false\r
     t.integer  "y",                                 :null => false\r
@@ -266,8 +236,8 @@ ActiveRecord::Schema.define(:version => 20120424100555) do
     t.datetime "updated_at"\r
   end\r
 \r
-  add_index "speaches", ["balloon_id", "t"], :name => "speaches_bt", :unique => true\r
-  add_index "speaches", ["balloon_id"], :name => "index_speaches_on_balloon_id"\r
+  add_index "speeches", ["balloon_id", "t"], :name => "speeches_bt", :unique => true\r
+  add_index "speeches", ["balloon_id"], :name => "index_speeches_on_balloon_id"\r
 \r
   create_table "system_pictures", :force => true do |t|\r
     t.string   "ext",                      :null => false\r
diff --git a/spec/controllers/balloon_templates_controller_spec.rb b/spec/controllers/balloon_templates_controller_spec.rb
deleted file mode 100644 (file)
index 87fb414..0000000
+++ /dev/null
@@ -1,7 +0,0 @@
-# -*- encoding: utf-8 -*-
-#フキダシ枠テンプレート
-require 'spec_helper'
-
-describe BalloonTemplatesController do
-  #データはすべてSpeechBalloonsControllerから管理するので、ここから何かを要求することはない。 
-end
diff --git a/spec/controllers/speech_templates_controller_spec.rb b/spec/controllers/speech_templates_controller_spec.rb
deleted file mode 100644 (file)
index a3d1f70..0000000
+++ /dev/null
@@ -1,7 +0,0 @@
-# -*- encoding: utf-8 -*-
-#セリフテンプレート
-require 'spec_helper'
-
-describe SpeechTemplatesController do
-  #データはすべてSpeechBalloonsControllerから管理するので、ここから何かを要求することはない。 
-end
diff --git a/spec/helpers/balloon_templates_helper_spec.rb b/spec/helpers/balloon_templates_helper_spec.rb
deleted file mode 100644 (file)
index 4e6973e..0000000
+++ /dev/null
@@ -1,15 +0,0 @@
-require 'spec_helper'
-
-# Specs in this file have access to a helper object that includes
-# the BaloonTemplatesHelper. For example:
-#
-# describe BaloonTemplatesHelper do
-#   describe "string concat" do
-#     it "concats two strings with spaces" do
-#       helper.concat_strings("this","that").should == "this that"
-#     end
-#   end
-# end
-describe BalloonTemplatesHelper do
-  pending "add some examples to (or delete) #{__FILE__}"
-end
diff --git a/spec/helpers/speech_templates_helper_spec.rb b/spec/helpers/speech_templates_helper_spec.rb
deleted file mode 100644 (file)
index 242f9bd..0000000
+++ /dev/null
@@ -1,15 +0,0 @@
-require 'spec_helper'
-
-# Specs in this file have access to a helper object that includes
-# the SpeechTemplatesHelper. For example:
-#
-# describe SpeechTemplatesHelper do
-#   describe "string concat" do
-#     it "concats two strings with spaces" do
-#       helper.concat_strings("this","that").should == "this that"
-#     end
-#   end
-# end
-describe SpeechTemplatesHelper do
-  pending "add some examples to (or delete) #{__FILE__}"
-end
index 9ec2d2c..10a9b83 100644 (file)
@@ -1,7 +1,7 @@
 {\r
   "square@pettan.com": {\r
     "classname": "Square",\r
-    "caption": "\92·\95û\8c`",\r
+    "caption": "長方形",\r
     "default_width": 150,\r
     "default_height": 150,\r
     "templates": {\r
@@ -20,7 +20,7 @@
   },\r
   "square@pettan.com": {\r
     "classname": "Square",\r
-    "caption": "\92·\95û\8c`",\r
+    "caption": "長方形",\r
     "default_width": 150,\r
     "default_height": 150,\r
     "templates": {\r
@@ -39,7 +39,7 @@
   },\r
   "square@pettan.com": {\r
     "classname": "Square",\r
-    "caption": "\92·\95û\8c`",\r
+    "caption": "長方形",\r
     "default_width": 150,\r
     "default_height": 150,\r
     "templates": {\r
index dadd1e9..2e1ce87 100644 (file)
@@ -1,7 +1,7 @@
 {\r
   "square@pettan.com": {\r
     "classname": "Square",\r
-    "caption": "\92·\95û\8c`",\r
+    "caption": "長方形",\r
     "default_width": 150,\r
     "default_height": 150,\r
     "templates": {\r
@@ -20,7 +20,7 @@
   },\r
   "square with size@pettan.com": {\r
     "classname": "SquareWithSize",\r
-    "caption": "\92·\95û\8c`\89ü",\r
+    "caption": "長方形改",\r
     "default_width": 150,\r
     "default_height": 100,\r
     "size_count": 3,\r
diff --git a/spec/models/balloon_template_spec.rb b/spec/models/balloon_template_spec.rb
deleted file mode 100644 (file)
index 7597de5..0000000
+++ /dev/null
@@ -1,5 +0,0 @@
-require 'spec_helper'
-
-describe BalloonTemplate do
-  pending "add some examples to (or delete) #{__FILE__}"
-end
diff --git a/spec/models/speech_template_spec.rb b/spec/models/speech_template_spec.rb
deleted file mode 100644 (file)
index d447a0f..0000000
+++ /dev/null
@@ -1,5 +0,0 @@
-require 'spec_helper'
-
-describe SpeechTemplate do
-  pending "add some examples to (or delete) #{__FILE__}"
-end