fetcher-mongoid-models 0.0.1 → 0.0.2

Sign up to get free protection for your applications and to get access to all the features.
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- fetcher-mongoid-models (0.0.0)
4
+ fetcher-mongoid-models (0.0.1)
5
5
  mongoid
6
6
 
7
7
  GEM
data/README.rest CHANGED
@@ -1,33 +1,4 @@
1
- Usage examples
2
1
 
3
- In folder config is a examples of a configuration file, for more information go to
4
-
5
- http://mongoid.org/en/mongoid/docs/installation.html
6
-
7
- Example 1:
8
-
9
- Fetcher::Mongoid::Models::DB.new path_to_config_file
10
-
11
- u = User.new
12
- u.login = "hola soy tomy"
13
- u.save
14
-
15
- User.find(u._id)
16
-
17
- Example 2:
18
-
19
- I have a Valid Column and a Filter
20
- The filter is valid only if it references a valid column, to make this you need to make:
21
-
22
- Fetcher::Mongoid::Models::DB.new path_to_config_file
23
-
24
- column = Column.new
25
- column.save
26
- f = Filter.new :Column => column
27
- Filter::Column_id = column._id
28
- f.save #<- this will return true
29
-
30
- We need to set the Filter::Column_id to let the Filters know to wich column it will belongs_to
31
2
 
32
3
 
33
4
 
data/app/models/column.rb CHANGED
@@ -3,7 +3,7 @@ require "mongoid"
3
3
  class Column
4
4
  include Mongoid::Document
5
5
  store_in collection: "Column"
6
- field :Filter, type: Array
7
- field :Source, type: Array
6
+ field :Filter, type: Array, default: []
7
+ field :Source, type: Array, default: []
8
8
 
9
9
  end
@@ -1,7 +1,7 @@
1
1
  module Fetcher
2
2
  module Mongoid
3
3
  module Models
4
- VERSION = '0.0.1'
4
+ VERSION = '0.0.2'
5
5
  end
6
6
  end
7
7
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: fetcher-mongoid-models
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.1
4
+ version: 0.0.2
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -84,6 +84,7 @@ files:
84
84
  - lib/fetcher/mongoid/models/version.rb
85
85
  - lib/models.rb
86
86
  - pkg/fetcher-mongoid-models-0.0.0.gem
87
+ - pkg/fetcher-mongoid-models-0.0.1.gem
87
88
  - spec/fetcher/mongoid/models/db_spec.rb
88
89
  - spec/models/column_spec.rb
89
90
  - spec/models/filter_spec.rb