airrecord 1.0.5 → 1.0.6

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
  SHA256:
3
- metadata.gz: f505deb1512a6d8a7b6bef12c151fdc21f585aa3dadd9796ab9adc208e6b2bc1
4
- data.tar.gz: 7ed5fe47871569c8ad0ca86868d782ca25fb91eae8e3fe1c37ec45a4bdb745c1
3
+ metadata.gz: 53739239320854267f0a3fa6a03b81b5ea733bcca061728f0a0b2337d5d32c8d
4
+ data.tar.gz: 4c7d23923d1fc45ff48c3644f83f42598b77878756ef2f41cabd229fb122e61f
5
5
  SHA512:
6
- metadata.gz: 94d225450a1817041b5fc7c2b684462f1aa79c1c92bd83d16a28822d55fc24d285d19fdf3ff430245454b8f3a26466ec59a291640b41b6fb5af3b491a3341c60
7
- data.tar.gz: a26291a9e45de01d8b042fa9118690a003364b60132044f1616049b2d4a4e4da62802d97c3a219a8d5629db875c168825d6828aa74df9571f13140cbface4c76
6
+ metadata.gz: f474a334e15a3feeedaa18dcbb5ddc9cc8a3b6ad2707377de076dc821ff4453e2400a39750e03b7cfb73a69d20aea5627c4e9c9aa1474e325a5e625bf6941d1b
7
+ data.tar.gz: eb8c7b5d6e66677059ab1fed2d25826280e6f9736d7e775422b8d103ad9dd53982708642782e7cbef3797c58cf95c0cfd712b4f370538b8436e10e1204cc5406
data/.travis.yml CHANGED
@@ -1,4 +1,5 @@
1
1
  sudo: false
2
2
  language: ruby
3
3
  rvm:
4
- - 2.3.3
4
+ - 2.7.2
5
+ - 3.0.0
data/CHANGELOG.md CHANGED
@@ -1,3 +1,7 @@
1
+ # 1.0.6
2
+
3
+ * Ruby 3 compatibility
4
+
1
5
  # 1.0.5
2
6
 
3
7
  * Allow Faraday 1.0 (#70)
data/airrecord.gemspec CHANGED
@@ -23,7 +23,7 @@ Gem::Specification.new do |spec|
23
23
  spec.add_dependency 'faraday', ['>= 0.10', '< 2.0']
24
24
  spec.add_dependency "net-http-persistent", '>= 2.9'
25
25
 
26
- spec.add_development_dependency "bundler", "~> 2.1.2"
26
+ spec.add_development_dependency "bundler", "~> 2"
27
27
  spec.add_development_dependency "rake", "~> 10.0"
28
28
  spec.add_development_dependency "minitest", "~> 5.0"
29
29
  spec.add_development_dependency "byebug"
@@ -0,0 +1,9 @@
1
+ require 'airrecord'
2
+
3
+ Tea = Airrecord.table(
4
+ ENV["AIRTABLE_TOKEN"],
5
+ "appZJC9q8TBYPDF7j",
6
+ "Teas"
7
+ )
8
+
9
+ p Tea.all
@@ -1,3 +1,5 @@
1
+ require 'rubygems' # For Gem::Version
2
+
1
3
  module Airrecord
2
4
  class Table
3
5
  class << self
@@ -107,10 +109,20 @@ module Airrecord
107
109
 
108
110
  attr_reader :fields, :id, :created_at, :updated_keys
109
111
 
110
- def initialize(fields, id: nil, created_at: nil)
111
- @id = id
112
- self.created_at = created_at
113
- self.fields = fields
112
+ # This is an awkward definition for Ruby 3 to remain backwards compatible.
113
+ # It's easier to read by reading the 2.x definition below.
114
+ if Gem::Version.new(RUBY_VERSION) >= Gem::Version.new("3.0.0")
115
+ def initialize(*one, **two)
116
+ @id = one.first && two.delete(:id)
117
+ self.created_at = one.first && two.delete(:created_at)
118
+ self.fields = one.first || two
119
+ end
120
+ else
121
+ def initialize(fields, id: nil, created_at: nil)
122
+ @id = id
123
+ self.created_at = created_at
124
+ self.fields = fields
125
+ end
114
126
  end
115
127
 
116
128
  def new_record?
@@ -1,3 +1,3 @@
1
1
  module Airrecord
2
- VERSION = "1.0.5"
2
+ VERSION = "1.0.6"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: airrecord
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.5
4
+ version: 1.0.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - Simon Eskildsen
8
- autorequire:
8
+ autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2020-02-16 00:00:00.000000000 Z
11
+ date: 2021-04-17 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: faraday
@@ -50,14 +50,14 @@ dependencies:
50
50
  requirements:
51
51
  - - "~>"
52
52
  - !ruby/object:Gem::Version
53
- version: 2.1.2
53
+ version: '2'
54
54
  type: :development
55
55
  prerelease: false
56
56
  version_requirements: !ruby/object:Gem::Requirement
57
57
  requirements:
58
58
  - - "~>"
59
59
  - !ruby/object:Gem::Version
60
- version: 2.1.2
60
+ version: '2'
61
61
  - !ruby/object:Gem::Dependency
62
62
  name: rake
63
63
  requirement: !ruby/object:Gem::Requirement
@@ -116,6 +116,7 @@ files:
116
116
  - Rakefile
117
117
  - airrecord.gemspec
118
118
  - bin/console
119
+ - bin/production-test.rb
119
120
  - bin/setup
120
121
  - lib/airrecord.rb
121
122
  - lib/airrecord/client.rb
@@ -127,7 +128,7 @@ homepage: https://github.com/sirupsen/airrecord
127
128
  licenses:
128
129
  - MIT
129
130
  metadata: {}
130
- post_install_message:
131
+ post_install_message:
131
132
  rdoc_options: []
132
133
  require_paths:
133
134
  - lib
@@ -142,8 +143,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
142
143
  - !ruby/object:Gem::Version
143
144
  version: '0'
144
145
  requirements: []
145
- rubygems_version: 3.0.3
146
- signing_key:
146
+ rubygems_version: 3.1.4
147
+ signing_key:
147
148
  specification_version: 4
148
149
  summary: Airtable client
149
150
  test_files: []