app_rail-airtable 0.3.3 → 0.3.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
  SHA256:
3
- metadata.gz: 6a8973236f81565186f4a9cf047fbe516cd7f3f452b551ab0e02c9406fce1c88
4
- data.tar.gz: 313a3e40f5eb79bd17c6561e2f65f4946ae4df80afdf16d901cf2bad21c23ad0
3
+ metadata.gz: 8efd41eb515627b2880f01a8c995cf40e32ce614a4c7f0ae89305c824f25419e
4
+ data.tar.gz: e1636ef443d7071ffd9132d0af76c4eeddff51bd3c6e2554a631e17ebaa8429d
5
5
  SHA512:
6
- metadata.gz: dc54fefbcb0f1ef89868e249b2c9b456322a3f78a39fe550e45c20716d1b723f989556281b91d5f437fdf21de0de1a1fbbe6bbd65dff14982d7aa93f570e2b26
7
- data.tar.gz: b11d2a98504953e57c171b38f13f3e618bdcf8bb42b014e62c883c4deeb3d92dbf1bb20e70a30b70394ed5e83f9c330e25ce6da5627f46509d23f4da81ddc1d7
6
+ metadata.gz: 70f1a2b229234f404c9ead70cb0af42726d79c0e68d283e8a2b817f9f3921f9bde747de9afcc4b5bf2c13916e95ce18e7029e94fc6d306e1fc3b57805c5cd9f5
7
+ data.tar.gz: 25eb20b69b8942ca1f14f6341b7dbc0356f3c9e2a5856a4f09aa9487efb6dcb1881f55e6612c7e13dc7bb1dad47aef07989802b8bbdcb62331238f9be7475cc3
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- app_rail-airtable (0.3.3)
4
+ app_rail-airtable (0.3.7)
5
5
  activesupport
6
6
  airrecord
7
7
  bcrypt
@@ -11,12 +11,11 @@ PATH
11
11
  GEM
12
12
  remote: https://rubygems.org/
13
13
  specs:
14
- activesupport (6.1.4.1)
14
+ activesupport (7.0.2.2)
15
15
  concurrent-ruby (~> 1.0, >= 1.0.2)
16
16
  i18n (>= 1.6, < 2)
17
17
  minitest (>= 5.1)
18
18
  tzinfo (~> 2.0)
19
- zeitwerk (~> 2.3)
20
19
  airrecord (1.0.7)
21
20
  faraday (>= 0.10, < 2.0)
22
21
  net-http-persistent
@@ -25,28 +24,32 @@ GEM
25
24
  concurrent-ruby (1.1.9)
26
25
  connection_pool (2.2.5)
27
26
  diff-lcs (1.4.4)
28
- faraday (1.8.0)
27
+ faraday (1.9.3)
29
28
  faraday-em_http (~> 1.0)
30
29
  faraday-em_synchrony (~> 1.0)
31
30
  faraday-excon (~> 1.1)
32
- faraday-httpclient (~> 1.0.1)
31
+ faraday-httpclient (~> 1.0)
32
+ faraday-multipart (~> 1.0)
33
33
  faraday-net_http (~> 1.0)
34
- faraday-net_http_persistent (~> 1.1)
34
+ faraday-net_http_persistent (~> 1.0)
35
35
  faraday-patron (~> 1.0)
36
36
  faraday-rack (~> 1.0)
37
- multipart-post (>= 1.2, < 3)
37
+ faraday-retry (~> 1.0)
38
38
  ruby2_keywords (>= 0.0.4)
39
39
  faraday-em_http (1.0.0)
40
40
  faraday-em_synchrony (1.0.0)
41
41
  faraday-excon (1.1.0)
42
42
  faraday-httpclient (1.0.1)
43
+ faraday-multipart (1.0.3)
44
+ multipart-post (>= 1.2, < 3)
43
45
  faraday-net_http (1.0.1)
44
46
  faraday-net_http_persistent (1.2.0)
45
47
  faraday-patron (1.0.0)
46
48
  faraday-rack (1.0.0)
47
- i18n (1.8.11)
49
+ faraday-retry (1.0.3)
50
+ i18n (1.9.1)
48
51
  concurrent-ruby (~> 1.0)
49
- minitest (5.14.4)
52
+ minitest (5.15.0)
50
53
  multipart-post (2.1.1)
51
54
  mustermann (1.1.1)
52
55
  ruby2_keywords (~> 0.0.1)
@@ -81,7 +84,6 @@ GEM
81
84
  tilt (2.0.10)
82
85
  tzinfo (2.0.4)
83
86
  concurrent-ruby (~> 1.0)
84
- zeitwerk (2.5.1)
85
87
 
86
88
  PLATFORMS
87
89
  ruby
@@ -19,6 +19,10 @@ Gem::Specification.new do |spec|
19
19
  spec.files = Dir.chdir(File.expand_path('..', __FILE__)) do
20
20
  `git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(test|spec|features)/}) }
21
21
  end
22
+
23
+ spec.bindir = 'bin'
24
+ spec.executables << 'ara_generator'
25
+
22
26
  spec.require_paths = ["lib"]
23
27
  spec.add_dependency 'activesupport'
24
28
  spec.add_dependency 'sinatra'
@@ -19,6 +19,8 @@ module AppRail
19
19
 
20
20
  def create_session_as_json(email:, password:)
21
21
  user = find_by_email_and_password(email, password)
22
+ return nil unless user
23
+
22
24
  user["Access Token"] = next_access_token
23
25
  user.save
24
26
  user&.oauth_session
@@ -26,7 +28,7 @@ module AppRail
26
28
 
27
29
  def find_by_email_and_password(email, password)
28
30
  user = all(filter: "{Email} = \"#{email}\"").first
29
- user.valid_password?(password) ? user : nil
31
+ user&.valid_password?(password) ? user : nil
30
32
  end
31
33
 
32
34
  def find_by_access_token(access_token)
@@ -13,7 +13,7 @@ module AppRail
13
13
  argument :output_directory
14
14
  argument :api_key
15
15
  argument :base_id
16
- argument :schema
16
+ argument :schema, required: false
17
17
 
18
18
  def self.source_root
19
19
  File.join(File.dirname(__FILE__), '..', '..', '..')
@@ -41,7 +41,7 @@ module AppRail
41
41
  end
42
42
 
43
43
  def tables
44
- @tables ||= JSON.parse(schema)['tables']
44
+ @tables ||= schema ? JSON.parse(schema)['tables'] : []
45
45
  end
46
46
 
47
47
  def find_table(table_name)
@@ -1,5 +1,5 @@
1
1
  module AppRail
2
2
  module Airtable
3
- VERSION = "0.3.3"
3
+ VERSION = "0.3.7"
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: app_rail-airtable
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.3
4
+ version: 0.3.7
5
5
  platform: ruby
6
6
  authors:
7
7
  - Matt Brooke-Smith
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2021-11-24 00:00:00.000000000 Z
11
+ date: 2022-02-14 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activesupport
@@ -111,7 +111,8 @@ dependencies:
111
111
  description:
112
112
  email:
113
113
  - matt@futureworkshops.com
114
- executables: []
114
+ executables:
115
+ - ara_generator
115
116
  extensions: []
116
117
  extra_rdoc_files: []
117
118
  files: