enju_inventory 0.1.12 → 0.2.0.beta.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (30) hide show
  1. checksums.yaml +4 -4
  2. data/README.rdoc +3 -3
  3. data/app/controllers/concerns/enju_inventory/controller.rb +9 -0
  4. data/app/controllers/inventories_controller.rb +12 -1
  5. data/app/controllers/inventory_files_controller.rb +11 -1
  6. data/app/models/concerns/enju_inventory/enju_item.rb +26 -0
  7. data/app/policies/inventory_file_policy.rb +21 -0
  8. data/app/policies/inventory_policy.rb +21 -0
  9. data/lib/enju_inventory.rb +0 -19
  10. data/lib/enju_inventory/version.rb +1 -1
  11. data/spec/controllers/inventories_controller_spec.rb +2 -2
  12. data/spec/controllers/inventory_files_controller_spec.rb +4 -4
  13. data/spec/dummy/app/controllers/application_controller.rb +7 -2
  14. data/spec/dummy/app/models/user.rb +1 -2
  15. data/spec/dummy/config/application.rb +5 -24
  16. data/spec/dummy/config/environments/development.rb +25 -14
  17. data/spec/dummy/config/environments/production.rb +50 -31
  18. data/spec/dummy/config/environments/test.rb +23 -18
  19. data/spec/dummy/db/migrate/20140821151023_create_colors.rb +14 -0
  20. data/spec/dummy/db/migrate/20150124152756_add_foreign_key_to_shelves_referencing_libraries.rb +6 -0
  21. data/spec/dummy/db/migrate/20150221063719_add_settings_to_library_group.rb +5 -0
  22. data/spec/dummy/db/migrate/20150924115059_create_withdraws.rb +13 -0
  23. data/spec/dummy/db/migrate/20151213070943_add_translation_table_to_library_group.rb +13 -0
  24. data/spec/dummy/db/migrate/20151213072705_add_footer_banner_to_library_group.rb +9 -0
  25. data/spec/dummy/db/schema.rb +105 -70
  26. data/spec/support/devise.rb +2 -2
  27. metadata +69 -29
  28. data/app/models/enju_inventory/ability.rb +0 -20
  29. data/lib/enju_inventory/item.rb +0 -31
  30. data/spec/dummy/config/application.yml +0 -38
@@ -1,4 +1,4 @@
1
1
  RSpec.configure do |config|
2
- config.include Devise::TestHelpers, :type => :controller
3
- config.include Devise::TestHelpers, :type => :view
2
+ config.include Devise::Test::ControllerHelpers, type: :controller
3
+ config.include Devise::Test::ControllerHelpers, type: :view
4
4
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: enju_inventory
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.12
4
+ version: 0.2.0.beta.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Kosuke Tanabe
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-12-26 00:00:00.000000000 Z
11
+ date: 2016-08-08 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: enju_library
@@ -16,14 +16,14 @@ dependencies:
16
16
  requirements:
17
17
  - - "~>"
18
18
  - !ruby/object:Gem::Version
19
- version: 0.1.1
19
+ version: 0.2.0.beta.1
20
20
  type: :runtime
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
24
  - - "~>"
25
25
  - !ruby/object:Gem::Version
26
- version: 0.1.1
26
+ version: 0.2.0.beta.1
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: paperclip
29
29
  requirement: !ruby/object:Gem::Requirement
@@ -39,35 +39,49 @@ dependencies:
39
39
  - !ruby/object:Gem::Version
40
40
  version: '0'
41
41
  - !ruby/object:Gem::Dependency
42
- name: sqlite3
42
+ name: enju_leaf
43
43
  requirement: !ruby/object:Gem::Requirement
44
44
  requirements:
45
- - - ">="
45
+ - - "~>"
46
46
  - !ruby/object:Gem::Version
47
- version: '0'
47
+ version: 1.2.0.beta.1
48
48
  type: :development
49
49
  prerelease: false
50
50
  version_requirements: !ruby/object:Gem::Requirement
51
51
  requirements:
52
- - - ">="
52
+ - - "~>"
53
53
  - !ruby/object:Gem::Version
54
- version: '0'
54
+ version: 1.2.0.beta.1
55
55
  - !ruby/object:Gem::Dependency
56
- name: mysql2
56
+ name: enju_biblio
57
57
  requirement: !ruby/object:Gem::Requirement
58
58
  requirements:
59
59
  - - "~>"
60
60
  - !ruby/object:Gem::Version
61
- version: 0.3.20
61
+ version: 0.2.0.beta.1
62
62
  type: :development
63
63
  prerelease: false
64
64
  version_requirements: !ruby/object:Gem::Requirement
65
65
  requirements:
66
66
  - - "~>"
67
67
  - !ruby/object:Gem::Version
68
- version: 0.3.20
68
+ version: 0.2.0.beta.1
69
69
  - !ruby/object:Gem::Dependency
70
- name: pg
70
+ name: enju_manifestation_viewer
71
+ requirement: !ruby/object:Gem::Requirement
72
+ requirements:
73
+ - - "~>"
74
+ - !ruby/object:Gem::Version
75
+ version: 0.2.0.beta.1
76
+ type: :development
77
+ prerelease: false
78
+ version_requirements: !ruby/object:Gem::Requirement
79
+ requirements:
80
+ - - "~>"
81
+ - !ruby/object:Gem::Version
82
+ version: 0.2.0.beta.1
83
+ - !ruby/object:Gem::Dependency
84
+ name: sqlite3
71
85
  requirement: !ruby/object:Gem::Requirement
72
86
  requirements:
73
87
  - - ">="
@@ -81,21 +95,21 @@ dependencies:
81
95
  - !ruby/object:Gem::Version
82
96
  version: '0'
83
97
  - !ruby/object:Gem::Dependency
84
- name: rspec-rails
98
+ name: mysql2
85
99
  requirement: !ruby/object:Gem::Requirement
86
100
  requirements:
87
- - - "~>"
101
+ - - ">="
88
102
  - !ruby/object:Gem::Version
89
- version: '3.4'
103
+ version: '0'
90
104
  type: :development
91
105
  prerelease: false
92
106
  version_requirements: !ruby/object:Gem::Requirement
93
107
  requirements:
94
- - - "~>"
108
+ - - ">="
95
109
  - !ruby/object:Gem::Version
96
- version: '3.4'
110
+ version: '0'
97
111
  - !ruby/object:Gem::Dependency
98
- name: factory_girl_rails
112
+ name: pg
99
113
  requirement: !ruby/object:Gem::Requirement
100
114
  requirements:
101
115
  - - ">="
@@ -109,19 +123,33 @@ dependencies:
109
123
  - !ruby/object:Gem::Version
110
124
  version: '0'
111
125
  - !ruby/object:Gem::Dependency
112
- name: enju_leaf
126
+ name: rspec-rails
113
127
  requirement: !ruby/object:Gem::Requirement
114
128
  requirements:
115
129
  - - "~>"
116
130
  - !ruby/object:Gem::Version
117
- version: 1.1.2
131
+ version: '3.4'
118
132
  type: :development
119
133
  prerelease: false
120
134
  version_requirements: !ruby/object:Gem::Requirement
121
135
  requirements:
122
136
  - - "~>"
123
137
  - !ruby/object:Gem::Version
124
- version: 1.1.2
138
+ version: '3.4'
139
+ - !ruby/object:Gem::Dependency
140
+ name: factory_girl_rails
141
+ requirement: !ruby/object:Gem::Requirement
142
+ requirements:
143
+ - - ">="
144
+ - !ruby/object:Gem::Version
145
+ version: '0'
146
+ type: :development
147
+ prerelease: false
148
+ version_requirements: !ruby/object:Gem::Requirement
149
+ requirements:
150
+ - - ">="
151
+ - !ruby/object:Gem::Version
152
+ version: '0'
125
153
  - !ruby/object:Gem::Dependency
126
154
  name: simplecov
127
155
  requirement: !ruby/object:Gem::Requirement
@@ -151,7 +179,7 @@ dependencies:
151
179
  - !ruby/object:Gem::Version
152
180
  version: '0'
153
181
  - !ruby/object:Gem::Dependency
154
- name: appraisal
182
+ name: coveralls
155
183
  requirement: !ruby/object:Gem::Requirement
156
184
  requirements:
157
185
  - - ">="
@@ -174,11 +202,14 @@ files:
174
202
  - MIT-LICENSE
175
203
  - README.rdoc
176
204
  - Rakefile
205
+ - app/controllers/concerns/enju_inventory/controller.rb
177
206
  - app/controllers/inventories_controller.rb
178
207
  - app/controllers/inventory_files_controller.rb
179
- - app/models/enju_inventory/ability.rb
208
+ - app/models/concerns/enju_inventory/enju_item.rb
180
209
  - app/models/inventory.rb
181
210
  - app/models/inventory_file.rb
211
+ - app/policies/inventory_file_policy.rb
212
+ - app/policies/inventory_policy.rb
182
213
  - app/views/inventories/edit.html.erb
183
214
  - app/views/inventories/index.html.erb
184
215
  - app/views/inventories/new.html.erb
@@ -196,7 +227,6 @@ files:
196
227
  - db/migrate/20120413100431_add_fingerprint_to_inventory_file.rb
197
228
  - lib/enju_inventory.rb
198
229
  - lib/enju_inventory/engine.rb
199
- - lib/enju_inventory/item.rb
200
230
  - lib/enju_inventory/version.rb
201
231
  - lib/tasks/enju_inventory_tasks.rake
202
232
  - spec/controllers/inventories_controller_spec.rb
@@ -214,7 +244,6 @@ files:
214
244
  - spec/dummy/bin/setup
215
245
  - spec/dummy/config.ru
216
246
  - spec/dummy/config/application.rb
217
- - spec/dummy/config/application.yml
218
247
  - spec/dummy/config/boot.rb
219
248
  - spec/dummy/config/database.yml
220
249
  - spec/dummy/config/environment.rb
@@ -353,12 +382,18 @@ files:
353
382
  - spec/dummy/db/migrate/20140802082007_add_manifestation_id_to_item.rb
354
383
  - spec/dummy/db/migrate/20140811031145_add_expired_at_to_profile.rb
355
384
  - spec/dummy/db/migrate/20140813182425_add_publication_place_to_manifestation.rb
385
+ - spec/dummy/db/migrate/20140821151023_create_colors.rb
356
386
  - spec/dummy/db/migrate/20140822114527_add_error_message_to_resource_import_result.rb
357
387
  - spec/dummy/db/migrate/20140823083524_add_extent_to_manifestation.rb
358
388
  - spec/dummy/db/migrate/20140823094847_add_dimensions_to_manifestation.rb
359
389
  - spec/dummy/db/migrate/20140823095740_rename_manifestation_periodical_to_serial.rb
360
390
  - spec/dummy/db/migrate/20141003181336_add_full_name_transcription_to_profile.rb
361
391
  - spec/dummy/db/migrate/20141003182825_add_date_of_birth_to_profile.rb
392
+ - spec/dummy/db/migrate/20150124152756_add_foreign_key_to_shelves_referencing_libraries.rb
393
+ - spec/dummy/db/migrate/20150221063719_add_settings_to_library_group.rb
394
+ - spec/dummy/db/migrate/20150924115059_create_withdraws.rb
395
+ - spec/dummy/db/migrate/20151213070943_add_translation_table_to_library_group.rb
396
+ - spec/dummy/db/migrate/20151213072705_add_footer_banner_to_library_group.rb
362
397
  - spec/dummy/db/schema.rb
363
398
  - spec/dummy/private/system/inventories/4/original/inventory_file_sample.tsv
364
399
  - spec/dummy/public/404.html
@@ -393,9 +428,9 @@ required_ruby_version: !ruby/object:Gem::Requirement
393
428
  version: '0'
394
429
  required_rubygems_version: !ruby/object:Gem::Requirement
395
430
  requirements:
396
- - - ">="
431
+ - - ">"
397
432
  - !ruby/object:Gem::Version
398
- version: '0'
433
+ version: 1.3.1
399
434
  requirements: []
400
435
  rubyforge_project:
401
436
  rubygems_version: 2.5.1
@@ -416,7 +451,6 @@ test_files:
416
451
  - spec/dummy/bin/rake
417
452
  - spec/dummy/bin/setup
418
453
  - spec/dummy/config/application.rb
419
- - spec/dummy/config/application.yml
420
454
  - spec/dummy/config/boot.rb
421
455
  - spec/dummy/config/database.yml
422
456
  - spec/dummy/config/environment.rb
@@ -556,12 +590,18 @@ test_files:
556
590
  - spec/dummy/db/migrate/20140802082007_add_manifestation_id_to_item.rb
557
591
  - spec/dummy/db/migrate/20140811031145_add_expired_at_to_profile.rb
558
592
  - spec/dummy/db/migrate/20140813182425_add_publication_place_to_manifestation.rb
593
+ - spec/dummy/db/migrate/20140821151023_create_colors.rb
559
594
  - spec/dummy/db/migrate/20140822114527_add_error_message_to_resource_import_result.rb
560
595
  - spec/dummy/db/migrate/20140823083524_add_extent_to_manifestation.rb
561
596
  - spec/dummy/db/migrate/20140823094847_add_dimensions_to_manifestation.rb
562
597
  - spec/dummy/db/migrate/20140823095740_rename_manifestation_periodical_to_serial.rb
563
598
  - spec/dummy/db/migrate/20141003181336_add_full_name_transcription_to_profile.rb
564
599
  - spec/dummy/db/migrate/20141003182825_add_date_of_birth_to_profile.rb
600
+ - spec/dummy/db/migrate/20150124152756_add_foreign_key_to_shelves_referencing_libraries.rb
601
+ - spec/dummy/db/migrate/20150221063719_add_settings_to_library_group.rb
602
+ - spec/dummy/db/migrate/20150924115059_create_withdraws.rb
603
+ - spec/dummy/db/migrate/20151213070943_add_translation_table_to_library_group.rb
604
+ - spec/dummy/db/migrate/20151213072705_add_footer_banner_to_library_group.rb
565
605
  - spec/dummy/db/schema.rb
566
606
  - spec/dummy/private/system/inventories/4/original/inventory_file_sample.tsv
567
607
  - spec/dummy/public/404.html
@@ -1,20 +0,0 @@
1
- module EnjuInventory
2
- class Ability
3
- include CanCan::Ability
4
-
5
- def initialize(user, ip_address = nil)
6
- case user.try(:role).try(:name)
7
- when 'Administrator'
8
- can :manage, [
9
- Inventory,
10
- InventoryFile
11
- ]
12
- when 'Librarian'
13
- can :manage, [
14
- Inventory,
15
- InventoryFile
16
- ]
17
- end
18
- end
19
- end
20
- end
@@ -1,31 +0,0 @@
1
- module EnjuInventory
2
- module InventoryItem
3
- def self.included(base)
4
- base.extend ClassMethods
5
- end
6
-
7
- module ClassMethods
8
- def enju_inventory_item_model
9
- include InstanceMethods
10
- has_many :inventories, :dependent => :destroy
11
- has_many :inventory_files, :through => :inventories
12
- searchable do
13
- integer :inventory_file_ids, :multiple => true
14
- end
15
-
16
- def inventory_items(inventory_file, mode = 'not_on_shelf')
17
- item_ids = Item.pluck(:id)
18
- inventory_item_ids = inventory_file.items.pluck('items.id')
19
- case mode
20
- when 'not_on_shelf'
21
- Item.where(:id => (item_ids - inventory_item_ids))
22
- when 'not_in_catalog'
23
- Item.where(:id => (inventory_item_ids - item_ids))
24
- end
25
- rescue
26
- nil
27
- end
28
- end
29
- end
30
- end
31
- end
@@ -1,38 +0,0 @@
1
- defaults: &defaults
2
- enju:
3
- web_hostname: localhost
4
- web_port_number: 3000
5
-
6
- family_name_first: true
7
- max_number_of_results: 500
8
- write_search_log_to_file: true
9
- csv_charset_conversion: true
10
-
11
- # Choose a locale from 'ca', 'de', 'fr', 'jp', 'uk', 'us'
12
- #AMAZON_AWS_HOSTNAME = 'ecs.amazonaws.com'
13
- amazon:
14
- aws_hostname: ecs.amazonaws.jp
15
- hostname: www.amazon.co.jp
16
- access_key: REPLACE_WITH_YOUR_AMAZON_ACCESS_KEY
17
- secret_access_key: REPLACE_WITH_YOUR_AMAZON_SECRET_ACCESS_KEY
18
-
19
- # :google, :amazon
20
- book_jacket:
21
- source: :google
22
- unknown_resource:
23
-
24
- # :mozshot, :simpleapi, :heartrails, :thumbalizr
25
- screenshot:
26
- generator: :mozshot
27
-
28
- uploaded_file:
29
- storage: :local
30
-
31
- development:
32
- <<: *defaults
33
-
34
- test:
35
- <<: *defaults
36
-
37
- production:
38
- <<: *defaults