airtable 0.0.6 → 0.0.7

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: c30642b3fa8febcd66284a8e5e9ae2ba31d2fd80
4
- data.tar.gz: 091e5f21dab3280c075de8b20d119394a2166f6b
3
+ metadata.gz: c8a2a7a0ac87ba99080162db5a0d7277808a1563
4
+ data.tar.gz: 71b5a5eff0eb915b79456d23071cb00392065fe7
5
5
  SHA512:
6
- metadata.gz: 036e9dd3fa705cf45786b84f35c8da9c62ab10b011ecb473d54e14482ecc74e7e55cd2e65514c3ea9fbc18018782f7495ab0ad4ffcd8ba265b061eb86a650975
7
- data.tar.gz: e307936150a2b994022df2da96a20d69e4f50434bd2902c972de41e903e68945771d5a5ae97ba5625448eb99fc0f5e2683dbf901e55a707447b90f0f21055336
6
+ metadata.gz: b192651a4b507ce4dde50ddbc1461235b848d175296a4984fc58cd9f7ec5b2043da463bb7fc3b81e7b3c1a8cf4bc6d3e8dfd16906875c6cf90203857f776448f
7
+ data.tar.gz: eabe8ed8aa29f022953c7c164faad7ff9e1b81b75b40c661c77470e4c67930ca6a615befc26a611daeeb060759e01267f175d1c0aedc4094cce54e61dde8b8f2
@@ -28,13 +28,14 @@ module Airtable
28
28
 
29
29
  # Removes old and add new attributes for the record
30
30
  def override_attributes!(attrs={})
31
- @columns_map = attrs.keys
32
31
  @attrs = HashWithIndifferentAccess.new(Hash[attrs.map { |k, v| [ to_key(k), v ] }])
33
32
  @attrs.map { |k, v| define_accessor(k) }
34
33
  end
35
34
 
36
35
  # Hash with keys based on airtable original column names
37
- def fields; HashWithIndifferentAccess.new(Hash[@columns_map.map { |k| [ k, @attrs[to_key(k)] ] }]); end
36
+ def fields
37
+ HashWithIndifferentAccess.new(Hash[@attrs.keys.map { |k| [ k, @attrs[to_key(k)] ] }])
38
+ end
38
39
 
39
40
  # Airtable will complain if we pass an 'id' as part of the request body.
40
41
  def fields_for_update; fields.except(:id); end
@@ -70,5 +71,4 @@ module Airtable
70
71
  end
71
72
 
72
73
  end # Record
73
-
74
- end # Airtable
74
+ end # Airtable
@@ -1,3 +1,3 @@
1
1
  module Airtable
2
- VERSION = "0.0.6"
2
+ VERSION = "0.0.7"
3
3
  end
@@ -6,5 +6,11 @@ describe Airtable do
6
6
  record = Airtable::Record.new(:name => "Sarah Jaine", :email => "sarah@jaine.com", :id => 12345)
7
7
  record.fields_for_update.wont_include(:id)
8
8
  end
9
+
10
+ it "returns new columns in fields_for_update" do
11
+ record = Airtable::Record.new(:name => "Sarah Jaine", :email => "sarah@jaine.com", :id => 12345)
12
+ record[:website] = "http://sarahjaine.com"
13
+ record.fields_for_update.must_include(:website)
14
+ end
9
15
  end # describe Record
10
- end # Airtable
16
+ end # Airtable
metadata CHANGED
@@ -1,97 +1,97 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: airtable
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.6
4
+ version: 0.0.7
5
5
  platform: ruby
6
6
  authors:
7
7
  - Nathan Esquenazi
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-12-02 00:00:00.000000000 Z
11
+ date: 2016-01-19 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: httparty
15
15
  requirement: !ruby/object:Gem::Requirement
16
16
  requirements:
17
- - - '>='
17
+ - - ">="
18
18
  - !ruby/object:Gem::Version
19
19
  version: '0'
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
26
  version: '0'
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: bundler
29
29
  requirement: !ruby/object:Gem::Requirement
30
30
  requirements:
31
- - - ~>
31
+ - - "~>"
32
32
  - !ruby/object:Gem::Version
33
33
  version: '1.6'
34
34
  type: :development
35
35
  prerelease: false
36
36
  version_requirements: !ruby/object:Gem::Requirement
37
37
  requirements:
38
- - - ~>
38
+ - - "~>"
39
39
  - !ruby/object:Gem::Version
40
40
  version: '1.6'
41
41
  - !ruby/object:Gem::Dependency
42
42
  name: rake
43
43
  requirement: !ruby/object:Gem::Requirement
44
44
  requirements:
45
- - - '>='
45
+ - - ">="
46
46
  - !ruby/object:Gem::Version
47
47
  version: '0'
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
54
  version: '0'
55
55
  - !ruby/object:Gem::Dependency
56
56
  name: minitest
57
57
  requirement: !ruby/object:Gem::Requirement
58
58
  requirements:
59
- - - ~>
59
+ - - "~>"
60
60
  - !ruby/object:Gem::Version
61
61
  version: 5.6.0
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
68
  version: 5.6.0
69
69
  - !ruby/object:Gem::Dependency
70
70
  name: fakeweb
71
71
  requirement: !ruby/object:Gem::Requirement
72
72
  requirements:
73
- - - ~>
73
+ - - "~>"
74
74
  - !ruby/object:Gem::Version
75
75
  version: '1.3'
76
76
  type: :development
77
77
  prerelease: false
78
78
  version_requirements: !ruby/object:Gem::Requirement
79
79
  requirements:
80
- - - ~>
80
+ - - "~>"
81
81
  - !ruby/object:Gem::Version
82
82
  version: '1.3'
83
83
  - !ruby/object:Gem::Dependency
84
84
  name: activesupport
85
85
  requirement: !ruby/object:Gem::Requirement
86
86
  requirements:
87
- - - '>='
87
+ - - ">="
88
88
  - !ruby/object:Gem::Version
89
89
  version: '3.0'
90
90
  type: :development
91
91
  prerelease: false
92
92
  version_requirements: !ruby/object:Gem::Requirement
93
93
  requirements:
94
- - - '>='
94
+ - - ">="
95
95
  - !ruby/object:Gem::Version
96
96
  version: '3.0'
97
97
  description: Easily connect to airtable data using ruby with access to all of the
@@ -102,7 +102,7 @@ executables: []
102
102
  extensions: []
103
103
  extra_rdoc_files: []
104
104
  files:
105
- - .gitignore
105
+ - ".gitignore"
106
106
  - Gemfile
107
107
  - LICENSE.txt
108
108
  - README.md
@@ -128,12 +128,12 @@ require_paths:
128
128
  - lib
129
129
  required_ruby_version: !ruby/object:Gem::Requirement
130
130
  requirements:
131
- - - '>='
131
+ - - ">="
132
132
  - !ruby/object:Gem::Version
133
133
  version: '0'
134
134
  required_rubygems_version: !ruby/object:Gem::Requirement
135
135
  requirements:
136
- - - '>='
136
+ - - ">="
137
137
  - !ruby/object:Gem::Version
138
138
  version: '0'
139
139
  requirements: []