enju_inventory 0.1.7 → 0.1.9
Sign up to get free protection for your applications and to get access to all the features.
- data/app/models/inventory.rb +1 -3
- data/app/models/inventory_file.rb +1 -3
- data/app/views/inventories/index.html.erb +1 -1
- data/app/views/inventory_files/index.html.erb +1 -1
- data/lib/enju_inventory/version.rb +1 -1
- data/lib/generators/enju_inventory/views_generator.rb +18 -0
- data/spec/dummy/db/test.sqlite3 +0 -0
- metadata +8 -7
data/app/models/inventory.rb
CHANGED
@@ -15,9 +15,7 @@ class InventoryFile < ActiveRecord::Base
|
|
15
15
|
validates_attachment_content_type :inventory, :content_type => ['text/csv', 'text/plain', 'text/tab-separated-values']
|
16
16
|
validates_attachment_presence :inventory
|
17
17
|
|
18
|
-
|
19
|
-
10
|
20
|
-
end
|
18
|
+
paginates_per 10
|
21
19
|
|
22
20
|
def import
|
23
21
|
self.reload
|
@@ -0,0 +1,18 @@
|
|
1
|
+
module EnjuInventory
|
2
|
+
module Generators
|
3
|
+
class ViewsGenerator < Rails::Generators::Base
|
4
|
+
source_root File.expand_path('../../../../app/views', __FILE__)
|
5
|
+
|
6
|
+
def copy_files
|
7
|
+
directories = %w(
|
8
|
+
inventories
|
9
|
+
inventory_files
|
10
|
+
)
|
11
|
+
|
12
|
+
directories.each do |dir|
|
13
|
+
directory dir, "app/views/#{dir}"
|
14
|
+
end
|
15
|
+
end
|
16
|
+
end
|
17
|
+
end
|
18
|
+
end
|
data/spec/dummy/db/test.sqlite3
CHANGED
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.1.
|
4
|
+
version: 0.1.9
|
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-07-
|
12
|
+
date: 2012-07-28 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: rails
|
@@ -60,21 +60,21 @@ dependencies:
|
|
60
60
|
- !ruby/object:Gem::Version
|
61
61
|
version: '0'
|
62
62
|
- !ruby/object:Gem::Dependency
|
63
|
-
name:
|
63
|
+
name: enju_biblio
|
64
64
|
requirement: !ruby/object:Gem::Requirement
|
65
65
|
none: false
|
66
66
|
requirements:
|
67
|
-
- -
|
67
|
+
- - ~>
|
68
68
|
- !ruby/object:Gem::Version
|
69
|
-
version:
|
69
|
+
version: 0.1.0.pre
|
70
70
|
type: :runtime
|
71
71
|
prerelease: false
|
72
72
|
version_requirements: !ruby/object:Gem::Requirement
|
73
73
|
none: false
|
74
74
|
requirements:
|
75
|
-
- -
|
75
|
+
- - ~>
|
76
76
|
- !ruby/object:Gem::Version
|
77
|
-
version:
|
77
|
+
version: 0.1.0.pre
|
78
78
|
- !ruby/object:Gem::Dependency
|
79
79
|
name: sqlite3
|
80
80
|
requirement: !ruby/object:Gem::Requirement
|
@@ -168,6 +168,7 @@ files:
|
|
168
168
|
- lib/enju_inventory/engine.rb
|
169
169
|
- lib/enju_inventory/version.rb
|
170
170
|
- lib/enju_inventory.rb
|
171
|
+
- lib/generators/enju_inventory/views_generator.rb
|
171
172
|
- lib/tasks/enju_inventory_tasks.rake
|
172
173
|
- MIT-LICENSE
|
173
174
|
- Rakefile
|