field_mapper 0.3.9 → 0.3.10

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: e26316a48a53fe5421bd2ad22923416227cfeb87
4
- data.tar.gz: fe26147ff399980606f49984aaf481ced3538a9b
3
+ metadata.gz: 73a3b9030b81d91ba6892c32aa09ae5349cc840c
4
+ data.tar.gz: ac3cffd1c268087695783c11aa5e01ed19a1e155
5
5
  SHA512:
6
- metadata.gz: d5b33c3a1434cce1a9a0117e3057ac1b84dd766d0e149bae28016d97087641f96073c6d40f061c3b772cb48c4f277e0555215728d2c676aaa5039cb004ea762a
7
- data.tar.gz: 5fa271119d511d9e36f0c6ab14291cf37367e1bcac7b9989e7522fb4c4e8b2b7769d792a5be910d72793bb194d0f68456b53414b2d200dc6a28cf2aee4706b74
6
+ metadata.gz: fa8c586e3c5896c067100985b325ebd8ce29d2f710c6d53e109b70b804f165b3a2181df7081274b36dd86b33802f98508f534e4653ff159b7a99688a77a38e11
7
+ data.tar.gz: 6e259cf21a400af2a0370d4e8721ebc21b38b38b837df27e944c693c4ceaab9768812edf4bc13d77a474df07e415febeb3b0724cff7e7452818399d9579f0b1b
@@ -50,6 +50,14 @@ module FieldMapper
50
50
  end
51
51
  end
52
52
 
53
+ def basic_mapped_fields(*names)
54
+ names.each { |name| basic_mapped_field(name) }
55
+ end
56
+
57
+ def basic_mapped_field(name)
58
+ field name, standard: name
59
+ end
60
+
53
61
  def find_mapped_fields(standard_field)
54
62
  fields.values.select { |field| field.standard_field == standard_field }
55
63
  end
@@ -1,3 +1,3 @@
1
1
  module FieldMapper
2
- VERSION = "0.3.9"
2
+ VERSION = "0.3.10"
3
3
  end
@@ -59,5 +59,6 @@ module Custom
59
59
  value.strftime("%Y-%m-%m") unless value.nil?
60
60
  }
61
61
 
62
+ #basic_mapped_fields(:basic1, :basic2, :basic3)
62
63
  end
63
64
  end
@@ -145,5 +145,9 @@ module Custom
145
145
  assert @instance.class.fields[:name].placeholder == "TYPE YOUR NAME"
146
146
  end
147
147
 
148
+ #test "basic mapped fields" do
149
+ # assert false
150
+ #end
151
+
148
152
  end
149
153
  end
@@ -46,5 +46,9 @@ module Standard
46
46
 
47
47
  field :timestamp, type: Time
48
48
 
49
+ #field :basic1, type: String
50
+ #field :basic2, type: String
51
+ #field :basic3, type: String
52
+
49
53
  end
50
54
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: field_mapper
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.9
4
+ version: 0.3.10
5
5
  platform: ruby
6
6
  authors:
7
7
  - Nathan Hopkins
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-06-16 00:00:00.000000000 Z
11
+ date: 2014-09-15 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activesupport