enju_inventory 0.0.5 → 0.0.6
Sign up to get free protection for your applications and to get access to all the features.
- data/app/models/inventory_file.rb +3 -3
- data/app/views/inventory_files/edit.html.erb +2 -2
- data/app/views/inventory_files/index.html.erb +2 -2
- data/app/views/inventory_files/show.html.erb +2 -2
- data/config/locales/translation_en.yml +1 -1
- data/config/locales/translation_ja.yml +1 -1
- data/db/migrate/20081117143156_create_inventory_files.rb +0 -2
- data/db/migrate/20120413100431_add_fingerprint_to_inventory_file.rb +1 -1
- data/lib/enju_inventory/version.rb +1 -1
- data/spec/dummy/db/development.sqlite3 +0 -0
- data/spec/dummy/db/migrate/20111201155513_add_devise_to_users.rb +31 -10
- data/spec/dummy/db/schema.rb +15 -8
- data/spec/dummy/db/test.sqlite3 +0 -0
- data/spec/fixtures/inventory_files.yml +3 -6
- data/spec/models/inventory_file_spec.rb +3 -3
- metadata +24 -24
@@ -36,14 +36,14 @@ end
|
|
36
36
|
# filename :string(255)
|
37
37
|
# content_type :string(255)
|
38
38
|
# size :integer
|
39
|
-
# file_hash :string(255)
|
40
39
|
# user_id :integer
|
41
40
|
# note :text
|
42
|
-
# created_at :datetime
|
43
|
-
# updated_at :datetime
|
41
|
+
# created_at :datetime not null
|
42
|
+
# updated_at :datetime not null
|
44
43
|
# inventory_file_name :string(255)
|
45
44
|
# inventory_content_type :string(255)
|
46
45
|
# inventory_file_size :integer
|
47
46
|
# inventory_updated_at :datetime
|
47
|
+
# inventory_fingerprint :string(255)
|
48
48
|
#
|
49
49
|
|
@@ -18,8 +18,8 @@
|
|
18
18
|
<%= f.text_field :inventory_file_size -%>
|
19
19
|
</div>
|
20
20
|
<div class="field">
|
21
|
-
<%= f.label :
|
22
|
-
<%= f.text_field :
|
21
|
+
<%= f.label :inventory_fingerprint -%> <br />
|
22
|
+
<%= f.text_field :inventory_fingerprint -%>
|
23
23
|
</div>
|
24
24
|
<div class="field">
|
25
25
|
<%= f.label :user_id -%> <br />
|
@@ -7,7 +7,7 @@
|
|
7
7
|
<th><%= t('activerecord.attributes.inventory_file.inventory_file_name') -%> </th>
|
8
8
|
<th><%= t('activerecord.attributes.inventory_file.inventory_content_type') -%> </th>
|
9
9
|
<th><%= t('activerecord.attributes.inventory_file.inventory_file_size') -%> </th>
|
10
|
-
<th><%= t('activerecord.attributes.inventory_file.
|
10
|
+
<th><%= t('activerecord.attributes.inventory_file.inventory_fingerprint') -%> </th>
|
11
11
|
<th><%= t('activerecord.models.user') -%> </th>
|
12
12
|
<th><%= t('activerecord.attributes.inventory_file.note') -%> </th>
|
13
13
|
</tr>
|
@@ -17,7 +17,7 @@
|
|
17
17
|
<td><%= inventory_file.inventory_file_name -%> </td>
|
18
18
|
<td><%= inventory_file.inventory_content_type -%> </td>
|
19
19
|
<td><%= inventory_file.inventory_file_size -%> </td>
|
20
|
-
<td><%= inventory_file.
|
20
|
+
<td><%= inventory_file.inventory_fingerprint -%> </td>
|
21
21
|
<td><%= link_to inventory_file.user.username, inventory_file.user -%> </td>
|
22
22
|
<td><%= inventory_file.note -%> </td>
|
23
23
|
<td><%= link_to t('page.show'), inventory_file -%> </td>
|
@@ -19,8 +19,8 @@
|
|
19
19
|
</p>
|
20
20
|
|
21
21
|
<p>
|
22
|
-
<strong><%= t('activerecord.attributes.inventory_file.
|
23
|
-
<%= @inventory_file.
|
22
|
+
<strong><%= t('activerecord.attributes.inventory_file.inventory_fingerprint') -%> :</strong>
|
23
|
+
<%= @inventory_file.inventory_fingerprint -%>
|
24
24
|
</p>
|
25
25
|
|
26
26
|
<p>
|
@@ -4,14 +4,12 @@ class CreateInventoryFiles < ActiveRecord::Migration
|
|
4
4
|
t.string :filename
|
5
5
|
t.string :content_type
|
6
6
|
t.integer :size
|
7
|
-
t.string :file_hash
|
8
7
|
t.integer :user_id
|
9
8
|
t.text :note
|
10
9
|
|
11
10
|
t.timestamps
|
12
11
|
end
|
13
12
|
add_index :inventory_files, :user_id
|
14
|
-
add_index :inventory_files, :file_hash
|
15
13
|
end
|
16
14
|
|
17
15
|
def self.down
|
Binary file
|
@@ -1,19 +1,40 @@
|
|
1
1
|
class AddDeviseToUsers < ActiveRecord::Migration
|
2
2
|
def self.up
|
3
3
|
change_table(:users) do |t|
|
4
|
-
|
5
|
-
t.
|
6
|
-
t.
|
7
|
-
t.trackable
|
4
|
+
## Database authenticatable
|
5
|
+
t.string :email, :null => false, :default => ""
|
6
|
+
t.string :encrypted_password, :null => false, :default => ""
|
8
7
|
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
# t.token_authenticatable
|
8
|
+
## Recoverable
|
9
|
+
t.string :reset_password_token
|
10
|
+
t.datetime :reset_password_sent_at
|
13
11
|
|
12
|
+
## Rememberable
|
13
|
+
t.datetime :remember_created_at
|
14
14
|
|
15
|
-
|
16
|
-
|
15
|
+
## Trackable
|
16
|
+
t.integer :sign_in_count, :default => 0
|
17
|
+
t.datetime :current_sign_in_at
|
18
|
+
t.datetime :last_sign_in_at
|
19
|
+
t.string :current_sign_in_ip
|
20
|
+
t.string :last_sign_in_ip
|
21
|
+
|
22
|
+
## Encryptable
|
23
|
+
t.string :password_salt
|
24
|
+
|
25
|
+
## Confirmable
|
26
|
+
t.string :confirmation_token
|
27
|
+
t.datetime :confirmed_at
|
28
|
+
t.datetime :confirmation_sent_at
|
29
|
+
t.string :unconfirmed_email # Only if using reconfirmable
|
30
|
+
|
31
|
+
## Lockable
|
32
|
+
t.integer :failed_attempts, :default => 0 # Only if lock strategy is :failed_attempts
|
33
|
+
t.string :unlock_token # Only if unlock strategy is :email or :both
|
34
|
+
t.datetime :locked_at
|
35
|
+
|
36
|
+
# Token authenticatable
|
37
|
+
t.string :authentication_token
|
17
38
|
end
|
18
39
|
|
19
40
|
add_index :users, :email #, :unique => true
|
data/spec/dummy/db/schema.rb
CHANGED
@@ -28,7 +28,6 @@ ActiveRecord::Schema.define(:version => 20120413100431) do
|
|
28
28
|
t.string "filename"
|
29
29
|
t.string "content_type"
|
30
30
|
t.integer "size"
|
31
|
-
t.string "file_hash"
|
32
31
|
t.integer "user_id"
|
33
32
|
t.text "note"
|
34
33
|
t.datetime "created_at", :null => false
|
@@ -37,10 +36,9 @@ ActiveRecord::Schema.define(:version => 20120413100431) do
|
|
37
36
|
t.string "inventory_content_type"
|
38
37
|
t.integer "inventory_file_size"
|
39
38
|
t.datetime "inventory_updated_at"
|
40
|
-
t.string "
|
39
|
+
t.string "inventory_fingerprint"
|
41
40
|
end
|
42
41
|
|
43
|
-
add_index "inventory_files", ["file_hash"], :name => "index_inventory_files_on_file_hash"
|
44
42
|
add_index "inventory_files", ["user_id"], :name => "index_inventory_files_on_user_id"
|
45
43
|
|
46
44
|
create_table "items", :force => true do |t|
|
@@ -94,18 +92,27 @@ ActiveRecord::Schema.define(:version => 20120413100431) do
|
|
94
92
|
t.string "username"
|
95
93
|
t.text "note"
|
96
94
|
t.string "locale"
|
97
|
-
t.datetime "created_at",
|
98
|
-
t.datetime "updated_at",
|
99
|
-
t.string "email",
|
100
|
-
t.string "encrypted_password", :
|
95
|
+
t.datetime "created_at", :null => false
|
96
|
+
t.datetime "updated_at", :null => false
|
97
|
+
t.string "email", :default => "", :null => false
|
98
|
+
t.string "encrypted_password", :default => "", :null => false
|
101
99
|
t.string "reset_password_token"
|
102
100
|
t.datetime "reset_password_sent_at"
|
103
101
|
t.datetime "remember_created_at"
|
104
|
-
t.integer "sign_in_count",
|
102
|
+
t.integer "sign_in_count", :default => 0
|
105
103
|
t.datetime "current_sign_in_at"
|
106
104
|
t.datetime "last_sign_in_at"
|
107
105
|
t.string "current_sign_in_ip"
|
108
106
|
t.string "last_sign_in_ip"
|
107
|
+
t.string "password_salt"
|
108
|
+
t.string "confirmation_token"
|
109
|
+
t.datetime "confirmed_at"
|
110
|
+
t.datetime "confirmation_sent_at"
|
111
|
+
t.string "unconfirmed_email"
|
112
|
+
t.integer "failed_attempts", :default => 0
|
113
|
+
t.string "unlock_token"
|
114
|
+
t.datetime "locked_at"
|
115
|
+
t.string "authentication_token"
|
109
116
|
end
|
110
117
|
|
111
118
|
add_index "users", ["email"], :name => "index_users_on_email"
|
data/spec/dummy/db/test.sqlite3
CHANGED
Binary file
|
@@ -4,21 +4,18 @@ inventory_file_00001:
|
|
4
4
|
id: 1
|
5
5
|
inventory_file_name: MyString
|
6
6
|
inventory_file_size: 1
|
7
|
-
file_hash: MyString
|
8
7
|
user_id: 1
|
9
8
|
inventory_content_type: text/csv
|
10
9
|
inventory_file_00002:
|
11
10
|
id: 2
|
12
11
|
inventory_file_name: MyString
|
13
12
|
inventory_file_size: 1
|
14
|
-
file_hash: MyString
|
15
13
|
user_id: 1
|
16
14
|
inventory_content_type: text/csv
|
17
15
|
inventory_file_00003:
|
18
16
|
id: 3
|
19
17
|
inventory_file_name: MyString
|
20
18
|
inventory_file_size: 1
|
21
|
-
file_hash: MyString
|
22
19
|
user_id: 1
|
23
20
|
inventory_content_type: text/csv
|
24
21
|
|
@@ -30,14 +27,14 @@ inventory_file_00003:
|
|
30
27
|
# filename :string(255)
|
31
28
|
# content_type :string(255)
|
32
29
|
# size :integer
|
33
|
-
# file_hash :string(255)
|
34
30
|
# user_id :integer
|
35
31
|
# note :text
|
36
|
-
# created_at :datetime
|
37
|
-
# updated_at :datetime
|
32
|
+
# created_at :datetime not null
|
33
|
+
# updated_at :datetime not null
|
38
34
|
# inventory_file_name :string(255)
|
39
35
|
# inventory_content_type :string(255)
|
40
36
|
# inventory_file_size :integer
|
41
37
|
# inventory_updated_at :datetime
|
38
|
+
# inventory_fingerprint :string(255)
|
42
39
|
#
|
43
40
|
|
@@ -19,14 +19,14 @@ end
|
|
19
19
|
# filename :string(255)
|
20
20
|
# content_type :string(255)
|
21
21
|
# size :integer
|
22
|
-
# file_hash :string(255)
|
23
22
|
# user_id :integer
|
24
23
|
# note :text
|
25
|
-
# created_at :datetime
|
26
|
-
# updated_at :datetime
|
24
|
+
# created_at :datetime not null
|
25
|
+
# updated_at :datetime not null
|
27
26
|
# inventory_file_name :string(255)
|
28
27
|
# inventory_content_type :string(255)
|
29
28
|
# inventory_file_size :integer
|
30
29
|
# inventory_updated_at :datetime
|
30
|
+
# inventory_fingerprint :string(255)
|
31
31
|
#
|
32
32
|
|
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.
|
4
|
+
version: 0.0.6
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,11 +9,11 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2012-04-
|
12
|
+
date: 2012-04-15 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: rails
|
16
|
-
requirement: &
|
16
|
+
requirement: &70268267512280 !ruby/object:Gem::Requirement
|
17
17
|
none: false
|
18
18
|
requirements:
|
19
19
|
- - ~>
|
@@ -21,10 +21,10 @@ dependencies:
|
|
21
21
|
version: '3.2'
|
22
22
|
type: :runtime
|
23
23
|
prerelease: false
|
24
|
-
version_requirements: *
|
24
|
+
version_requirements: *70268267512280
|
25
25
|
- !ruby/object:Gem::Dependency
|
26
26
|
name: devise
|
27
|
-
requirement: &
|
27
|
+
requirement: &70268267511860 !ruby/object:Gem::Requirement
|
28
28
|
none: false
|
29
29
|
requirements:
|
30
30
|
- - ! '>='
|
@@ -32,10 +32,10 @@ dependencies:
|
|
32
32
|
version: '0'
|
33
33
|
type: :runtime
|
34
34
|
prerelease: false
|
35
|
-
version_requirements: *
|
35
|
+
version_requirements: *70268267511860
|
36
36
|
- !ruby/object:Gem::Dependency
|
37
37
|
name: cancan
|
38
|
-
requirement: &
|
38
|
+
requirement: &70268267527740 !ruby/object:Gem::Requirement
|
39
39
|
none: false
|
40
40
|
requirements:
|
41
41
|
- - ! '>='
|
@@ -43,10 +43,10 @@ dependencies:
|
|
43
43
|
version: '0'
|
44
44
|
type: :runtime
|
45
45
|
prerelease: false
|
46
|
-
version_requirements: *
|
46
|
+
version_requirements: *70268267527740
|
47
47
|
- !ruby/object:Gem::Dependency
|
48
48
|
name: paperclip
|
49
|
-
requirement: &
|
49
|
+
requirement: &70268267527240 !ruby/object:Gem::Requirement
|
50
50
|
none: false
|
51
51
|
requirements:
|
52
52
|
- - ~>
|
@@ -54,10 +54,10 @@ dependencies:
|
|
54
54
|
version: '2.7'
|
55
55
|
type: :runtime
|
56
56
|
prerelease: false
|
57
|
-
version_requirements: *
|
57
|
+
version_requirements: *70268267527240
|
58
58
|
- !ruby/object:Gem::Dependency
|
59
59
|
name: inherited_resources
|
60
|
-
requirement: &
|
60
|
+
requirement: &70268267526820 !ruby/object:Gem::Requirement
|
61
61
|
none: false
|
62
62
|
requirements:
|
63
63
|
- - ! '>='
|
@@ -65,10 +65,10 @@ dependencies:
|
|
65
65
|
version: '0'
|
66
66
|
type: :runtime
|
67
67
|
prerelease: false
|
68
|
-
version_requirements: *
|
68
|
+
version_requirements: *70268267526820
|
69
69
|
- !ruby/object:Gem::Dependency
|
70
70
|
name: will_paginate
|
71
|
-
requirement: &
|
71
|
+
requirement: &70268267526360 !ruby/object:Gem::Requirement
|
72
72
|
none: false
|
73
73
|
requirements:
|
74
74
|
- - ! '>='
|
@@ -76,10 +76,10 @@ dependencies:
|
|
76
76
|
version: '0'
|
77
77
|
type: :runtime
|
78
78
|
prerelease: false
|
79
|
-
version_requirements: *
|
79
|
+
version_requirements: *70268267526360
|
80
80
|
- !ruby/object:Gem::Dependency
|
81
81
|
name: sunspot_rails
|
82
|
-
requirement: &
|
82
|
+
requirement: &70268267525940 !ruby/object:Gem::Requirement
|
83
83
|
none: false
|
84
84
|
requirements:
|
85
85
|
- - ! '>='
|
@@ -87,10 +87,10 @@ dependencies:
|
|
87
87
|
version: '0'
|
88
88
|
type: :runtime
|
89
89
|
prerelease: false
|
90
|
-
version_requirements: *
|
90
|
+
version_requirements: *70268267525940
|
91
91
|
- !ruby/object:Gem::Dependency
|
92
92
|
name: sunspot_solr
|
93
|
-
requirement: &
|
93
|
+
requirement: &70268267525520 !ruby/object:Gem::Requirement
|
94
94
|
none: false
|
95
95
|
requirements:
|
96
96
|
- - ! '>='
|
@@ -98,10 +98,10 @@ dependencies:
|
|
98
98
|
version: '0'
|
99
99
|
type: :runtime
|
100
100
|
prerelease: false
|
101
|
-
version_requirements: *
|
101
|
+
version_requirements: *70268267525520
|
102
102
|
- !ruby/object:Gem::Dependency
|
103
103
|
name: sqlite3
|
104
|
-
requirement: &
|
104
|
+
requirement: &70268267525100 !ruby/object:Gem::Requirement
|
105
105
|
none: false
|
106
106
|
requirements:
|
107
107
|
- - ! '>='
|
@@ -109,10 +109,10 @@ dependencies:
|
|
109
109
|
version: '0'
|
110
110
|
type: :development
|
111
111
|
prerelease: false
|
112
|
-
version_requirements: *
|
112
|
+
version_requirements: *70268267525100
|
113
113
|
- !ruby/object:Gem::Dependency
|
114
114
|
name: rspec-rails
|
115
|
-
requirement: &
|
115
|
+
requirement: &70268267524680 !ruby/object:Gem::Requirement
|
116
116
|
none: false
|
117
117
|
requirements:
|
118
118
|
- - ! '>='
|
@@ -120,10 +120,10 @@ dependencies:
|
|
120
120
|
version: '0'
|
121
121
|
type: :development
|
122
122
|
prerelease: false
|
123
|
-
version_requirements: *
|
123
|
+
version_requirements: *70268267524680
|
124
124
|
- !ruby/object:Gem::Dependency
|
125
125
|
name: factory_girl_rails
|
126
|
-
requirement: &
|
126
|
+
requirement: &70268267524180 !ruby/object:Gem::Requirement
|
127
127
|
none: false
|
128
128
|
requirements:
|
129
129
|
- - ~>
|
@@ -131,7 +131,7 @@ dependencies:
|
|
131
131
|
version: '3.0'
|
132
132
|
type: :development
|
133
133
|
prerelease: false
|
134
|
-
version_requirements: *
|
134
|
+
version_requirements: *70268267524180
|
135
135
|
description: Inventory management for Next-L Enju
|
136
136
|
email:
|
137
137
|
- tanabe@mwr.mediacom.keio.ac.jp
|