enju_inventory 0.0.8 → 0.0.9

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,4 +1,4 @@
1
- Copyright 2011 YOURNAME
1
+ Copyright 2012 Kosuke Tanabe
2
2
 
3
3
  Permission is hereby granted, free of charge, to any person obtaining
4
4
  a copy of this software and associated documentation files (the
@@ -1,4 +1,5 @@
1
1
  class Inventory < ActiveRecord::Base
2
+ attr_accessible :item_id, :inventory_id, :note
2
3
  belongs_to :item
3
4
  belongs_to :inventory_file
4
5
 
@@ -1,4 +1,5 @@
1
1
  class InventoryFile < ActiveRecord::Base
2
+ attr_accessible :inventory, :note
2
3
  has_many :inventories, :dependent => :destroy
3
4
  has_many :items, :through => :inventories
4
5
  belongs_to :user
@@ -6,6 +6,6 @@ require 'will_paginate'
6
6
  require 'sunspot_rails'
7
7
 
8
8
  module EnjuInventory
9
- class Engine < Rails::Engine
9
+ class Engine < ::Rails::Engine
10
10
  end
11
11
  end
@@ -1,3 +1,3 @@
1
1
  module EnjuInventory
2
- VERSION = "0.0.8"
2
+ VERSION = "0.0.9"
3
3
  end
@@ -92,10 +92,6 @@ Devise.setup do |config|
92
92
  # If true, extends the user's remember period when remembered via cookie.
93
93
  # config.extend_remember_period = false
94
94
 
95
- # If true, uses the password salt as remember token. This should be turned
96
- # to false if you are not using database authenticatable.
97
- config.use_salt_as_remember_token = true
98
-
99
95
  # Options to be passed to the created cookie. For instance, you can set
100
96
  # :secure => true in order to force SSL only cookies.
101
97
  # config.cookie_options = {}
Binary file
@@ -2,8 +2,12 @@
2
2
  require 'spec_helper'
3
3
 
4
4
  describe InventoryFile do
5
+ fixtures :users
6
+
5
7
  before(:each) do
6
- @file = InventoryFile.create :inventory => File.new("#{Rails.root.to_s}/../../examples/inventory_file_sample.tsv"), :user => FactoryGirl.create(:user)
8
+ @file = InventoryFile.new :inventory => File.new("#{Rails.root.to_s}/../../examples/inventory_file_sample.tsv")
9
+ @file.user = users(:admin)
10
+ @file.save
7
11
  end
8
12
 
9
13
  it "should be imported" do
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.8
4
+ version: 0.0.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-05-14 00:00:00.000000000 Z
12
+ date: 2012-05-27 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: rails