enju_inventory 0.0.7 → 0.0.8

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,15 @@
1
+ // This is a manifest file that'll be compiled into application.js, which will include all the files
2
+ // listed below.
3
+ //
4
+ // Any JavaScript/Coffee file within this directory, lib/assets/javascripts, vendor/assets/javascripts,
5
+ // or vendor/assets/javascripts of plugins, if any, can be referenced here using a relative path.
6
+ //
7
+ // It's not advisable to add code directly here, but if you do, it'll appear at the bottom of the
8
+ // the compiled file.
9
+ //
10
+ // WARNING: THE FIRST BLANK LINE MARKS THE END OF WHAT'S TO BE PROCESSED, ANY BLANK LINE SHOULD
11
+ // GO AFTER THE REQUIRES BELOW.
12
+ //
13
+ //= require jquery
14
+ //= require jquery_ujs
15
+ //= require_tree .
@@ -0,0 +1,13 @@
1
+ /*
2
+ * This is a manifest file that'll be compiled into application.css, which will include all the files
3
+ * listed below.
4
+ *
5
+ * Any CSS and SCSS file within this directory, lib/assets/stylesheets, vendor/assets/stylesheets,
6
+ * or vendor/assets/stylesheets of plugins, if any, can be referenced here using a relative path.
7
+ *
8
+ * You're free to add application-wide styles to this file and they'll appear at the top of the
9
+ * compiled file, but it's generally better to create a new file per style scope.
10
+ *
11
+ *= require_self
12
+ *= require_tree .
13
+ */
@@ -1,5 +1,5 @@
1
1
  class InventoriesController < InheritedResources::Base
2
- respond_to :html, :xml
2
+ respond_to :html, :json
3
3
  load_and_authorize_resource
4
4
 
5
5
  def index
@@ -2,33 +2,33 @@ class InventoryFilesController < ApplicationController
2
2
  load_and_authorize_resource
3
3
 
4
4
  # GET /inventory_files
5
- # GET /inventory_files.xml
5
+ # GET /inventory_files.json
6
6
  def index
7
7
  @inventory_files = InventoryFile.page(params[:page])
8
8
 
9
9
  respond_to do |format|
10
10
  format.html # index.html.erb
11
- format.xml { render :xml => @inventory_files }
11
+ format.json { render :json => @inventory_files }
12
12
  end
13
13
  end
14
14
 
15
15
  # GET /inventory_files/1
16
- # GET /inventory_files/1.xml
16
+ # GET /inventory_files/1.json
17
17
  def show
18
18
  respond_to do |format|
19
19
  format.html # show.html.erb
20
- format.xml { render :xml => @inventory_file }
20
+ format.json { render :json => @inventory_file }
21
21
  end
22
22
  end
23
23
 
24
24
  # GET /inventory_files/new
25
- # GET /inventory_files/new.xml
25
+ # GET /inventory_files/new.json
26
26
  def new
27
27
  @inventory_file = InventoryFile.new
28
28
 
29
29
  respond_to do |format|
30
30
  format.html # new.html.erb
31
- format.xml { render :xml => @inventory_file }
31
+ format.json { render :json => @inventory_file }
32
32
  end
33
33
  end
34
34
 
@@ -37,7 +37,7 @@ class InventoryFilesController < ApplicationController
37
37
  end
38
38
 
39
39
  # POST /inventory_files
40
- # POST /inventory_files.xml
40
+ # POST /inventory_files.json
41
41
  def create
42
42
  @inventory_file = InventoryFile.new(params[:inventory_file])
43
43
  @inventory_file.user = current_user
@@ -47,37 +47,37 @@ class InventoryFilesController < ApplicationController
47
47
  flash[:notice] = t('controller.successfully_created', :model => t('activerecord.models.inventory_file'))
48
48
  @inventory_file.import
49
49
  format.html { redirect_to(@inventory_file) }
50
- format.xml { render :xml => @inventory_file, :status => :created, :location => @inventory_file }
50
+ format.json { render :json => @inventory_file, :status => :created, :location => @inventory_file }
51
51
  else
52
52
  format.html { render :action => "new" }
53
- format.xml { render :xml => @inventory_file.errors, :status => :unprocessable_entity }
53
+ format.json { render :json => @inventory_file.errors, :status => :unprocessable_entity }
54
54
  end
55
55
  end
56
56
  end
57
57
 
58
58
  # PUT /inventory_files/1
59
- # PUT /inventory_files/1.xml
59
+ # PUT /inventory_files/1.json
60
60
  def update
61
61
  respond_to do |format|
62
62
  if @inventory_file.update_attributes(params[:inventory_file])
63
63
  flash[:notice] = t('controller.successfully_updated', :model => t('activerecord.models.inventory_file'))
64
64
  format.html { redirect_to(@inventory_file) }
65
- format.xml { head :ok }
65
+ format.json { head :no_content }
66
66
  else
67
67
  format.html { render :action => "edit" }
68
- format.xml { render :xml => @inventory_file.errors, :status => :unprocessable_entity }
68
+ format.json { render :json => @inventory_file.errors, :status => :unprocessable_entity }
69
69
  end
70
70
  end
71
71
  end
72
72
 
73
73
  # DELETE /inventory_files/1
74
- # DELETE /inventory_files/1.xml
74
+ # DELETE /inventory_files/1.json
75
75
  def destroy
76
76
  @inventory_file.destroy
77
77
 
78
78
  respond_to do |format|
79
- format.html { redirect_to(inventory_files_url) }
80
- format.xml { head :ok }
79
+ format.html { redirect_to inventory_files_url }
80
+ format.json { head :no_content }
81
81
  end
82
82
  end
83
83
  end
@@ -0,0 +1,4 @@
1
+ module EnjuInventory
2
+ module ApplicationHelper
3
+ end
4
+ end
@@ -0,0 +1,14 @@
1
+ <!DOCTYPE html>
2
+ <html>
3
+ <head>
4
+ <title>EnjuInventory</title>
5
+ <%= stylesheet_link_tag "enju_inventory/application", :media => "all" %>
6
+ <%= javascript_include_tag "enju_inventory/application" %>
7
+ <%= csrf_meta_tags %>
8
+ </head>
9
+ <body>
10
+
11
+ <%= yield %>
12
+
13
+ </body>
14
+ </html>
@@ -1,3 +1,3 @@
1
1
  module EnjuInventory
2
- VERSION = "0.0.7"
2
+ VERSION = "0.0.8"
3
3
  end
Binary file
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: enju_inventory
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.7
4
+ version: 0.0.8
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2012-05-12 00:00:00.000000000 Z
12
+ date: 2012-05-14 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: rails
@@ -176,17 +176,17 @@ dependencies:
176
176
  requirement: !ruby/object:Gem::Requirement
177
177
  none: false
178
178
  requirements:
179
- - - ~>
179
+ - - ! '>='
180
180
  - !ruby/object:Gem::Version
181
- version: '3.0'
181
+ version: '0'
182
182
  type: :development
183
183
  prerelease: false
184
184
  version_requirements: !ruby/object:Gem::Requirement
185
185
  none: false
186
186
  requirements:
187
- - - ~>
187
+ - - ! '>='
188
188
  - !ruby/object:Gem::Version
189
- version: '3.0'
189
+ version: '0'
190
190
  description: Inventory management for Next-L Enju
191
191
  email:
192
192
  - tanabe@mwr.mediacom.keio.ac.jp
@@ -194,8 +194,11 @@ executables: []
194
194
  extensions: []
195
195
  extra_rdoc_files: []
196
196
  files:
197
+ - app/assets/javascripts/enju_inventory/application.js
198
+ - app/assets/stylesheets/enju_inventory/application.css
197
199
  - app/controllers/inventories_controller.rb
198
200
  - app/controllers/inventory_files_controller.rb
201
+ - app/helpers/enju_inventory/application_helper.rb
199
202
  - app/models/inventory.rb
200
203
  - app/models/inventory_file.rb
201
204
  - app/views/inventories/edit.html.erb
@@ -206,6 +209,7 @@ files:
206
209
  - app/views/inventory_files/index.html.erb
207
210
  - app/views/inventory_files/new.html.erb
208
211
  - app/views/inventory_files/show.html.erb
212
+ - app/views/layouts/enju_inventory/application.html.erb
209
213
  - config/locales/translation_en.yml
210
214
  - config/locales/translation_ja.yml
211
215
  - config/routes.rb
@@ -263,6 +267,7 @@ files:
263
267
  - spec/dummy/db/schema.rb
264
268
  - spec/dummy/db/test.sqlite3
265
269
  - spec/dummy/private/system/inventories/4/original/inventory_file_sample.tsv
270
+ - spec/dummy/private/system/inventory_files/inventories/000/000/004/original/inventory_file_sample.tsv
266
271
  - spec/dummy/public/404.html
267
272
  - spec/dummy/public/422.html
268
273
  - spec/dummy/public/500.html
@@ -348,6 +353,7 @@ test_files:
348
353
  - spec/dummy/db/schema.rb
349
354
  - spec/dummy/db/test.sqlite3
350
355
  - spec/dummy/private/system/inventories/4/original/inventory_file_sample.tsv
356
+ - spec/dummy/private/system/inventory_files/inventories/000/000/004/original/inventory_file_sample.tsv
351
357
  - spec/dummy/public/404.html
352
358
  - spec/dummy/public/422.html
353
359
  - spec/dummy/public/500.html