app_rail-airtable 0.4.0 → 0.4.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 5154709a34596c961227e058380aa927b7643df717e67289a6158b43f65b2213
4
- data.tar.gz: 39b53b565d80d517aedc654f04b21f7d64189c4b0b62bd30ec1ea53252e9c1bb
3
+ metadata.gz: 635c1b4e200ee31f032f974ca3da84df53b766825c10ac3d4c867ac5b1533c2b
4
+ data.tar.gz: 5949f7165d856d5bfab33fb42cf157b859346651c5b927aa548b098841a5f5a5
5
5
  SHA512:
6
- metadata.gz: 68bfcd69273296c2eca597bf4bceb3bfefdd41f153d94a020f96e2604e8dcf7426359ea74e4ddcab6197a7ecf3f319dbefe204af1f9471b31cd83d921afaa87c
7
- data.tar.gz: 23ce7443a261f2eb431c42f2904d1b7d31a98c843adb3e601c6d2cc6610a02d15597e4b65bef49dffb4d599df17a07b97bb0550d66b5f4eb122c66141b94a6ab
6
+ metadata.gz: 352a2c5566fa8b24966d8ce524a6d9b8fc0ebc91b3559b79d0bff16fd9c5436a9bbe6a0893084f15c4fbdd071382da25b455e7b915a271a5a45fcf8c11f9f5c6
7
+ data.tar.gz: 2febff28b74cf2b538b6d8767fc308946d48f7e75bff35991d8e30e4ac29a6794e21d75d37e213ef51a3d9dcf791a078c4890ec62fd931904d7199f74fd54d69
data/Gemfile CHANGED
@@ -1,9 +1,11 @@
1
- source "https://rubygems.org"
1
+ # frozen_string_literal: true
2
+
3
+ source 'https://rubygems.org'
2
4
 
3
5
  # Specify your gem's dependencies in app_rail-airtable.gemspec
4
6
  gemspec
5
7
 
6
- gem "rake", "~> 12.0"
7
- gem "rspec", "~> 3.0"
8
- gem "thor"
9
- gem "byebug"
8
+ gem 'byebug'
9
+ gem 'rake', '~> 12.0'
10
+ gem 'rspec', '~> 3.0'
11
+ gem 'thor'
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- app_rail-airtable (0.4.0)
4
+ app_rail-airtable (0.4.1)
5
5
  activesupport
6
6
  airrecord
7
7
  bcrypt
@@ -13,23 +13,24 @@ PATH
13
13
  GEM
14
14
  remote: https://rubygems.org/
15
15
  specs:
16
- activesupport (7.0.2.2)
16
+ activesupport (7.0.2.3)
17
17
  concurrent-ruby (~> 1.0, >= 1.0.2)
18
18
  i18n (>= 1.6, < 2)
19
19
  minitest (>= 5.1)
20
20
  tzinfo (~> 2.0)
21
- airrecord (1.0.8)
21
+ airrecord (1.0.9)
22
22
  faraday (>= 0.10, < 3.0)
23
+ faraday-net_http_persistent
23
24
  net-http-persistent
24
- bcrypt (3.1.16)
25
+ bcrypt (3.1.17)
25
26
  byebug (11.1.3)
26
- concurrent-ruby (1.1.9)
27
+ concurrent-ruby (1.1.10)
27
28
  connection_pool (2.2.5)
28
29
  diff-lcs (1.4.4)
29
30
  faraday (2.2.0)
30
31
  faraday-net_http (~> 2.0)
31
32
  ruby2_keywords (>= 0.0.4)
32
- faraday-net_http (2.0.1)
33
+ faraday-net_http (2.0.2)
33
34
  faraday-net_http_persistent (2.0.1)
34
35
  faraday-net_http
35
36
  net-http-persistent (~> 4.0)
data/Rakefile CHANGED
@@ -1,6 +1,8 @@
1
- require "bundler/gem_tasks"
2
- require "rspec/core/rake_task"
1
+ # frozen_string_literal: true
2
+
3
+ require 'bundler/gem_tasks'
4
+ require 'rspec/core/rake_task'
3
5
 
4
6
  RSpec::Core::RakeTask.new(:spec)
5
7
 
6
- task :default => :spec
8
+ task default: :spec
@@ -1,37 +1,39 @@
1
+ # frozen_string_literal: true
2
+
1
3
  require_relative 'lib/app_rail/airtable/version'
2
4
 
3
5
  Gem::Specification.new do |spec|
4
- spec.name = "app_rail-airtable"
6
+ spec.name = 'app_rail-airtable'
5
7
  spec.version = AppRail::Airtable::VERSION
6
- spec.authors = ["Matt Brooke-Smith"]
7
- spec.email = ["matt@futureworkshops.com"]
8
+ spec.authors = ['Matt Brooke-Smith']
9
+ spec.email = ['matt@futureworkshops.com']
8
10
 
9
- spec.summary = %q{Gem to help building App Rail servers using Airtable as a backend}
10
- spec.homepage = "https://github.com/FutureWorkshops/app_rail-airtable"
11
- spec.license = "MIT"
12
- spec.required_ruby_version = Gem::Requirement.new(">= 2.3.0")
11
+ spec.summary = 'Gem to help building App Rail servers using Airtable as a backend'
12
+ spec.homepage = 'https://github.com/FutureWorkshops/app_rail-airtable'
13
+ spec.license = 'MIT'
14
+ spec.required_ruby_version = Gem::Requirement.new('>= 2.3.0')
13
15
 
14
- spec.metadata["homepage_uri"] = spec.homepage
15
- spec.metadata["source_code_uri"] = "https://github.com/FutureWorkshops/app_rail-airtable"
16
+ spec.metadata['homepage_uri'] = spec.homepage
17
+ spec.metadata['source_code_uri'] = 'https://github.com/FutureWorkshops/app_rail-airtable'
16
18
 
17
19
  # Specify which files should be added to the gem when it is released.
18
20
  # The `git ls-files -z` loads the files in the RubyGem that have been added into git.
19
- spec.files = Dir.chdir(File.expand_path('..', __FILE__)) do
21
+ spec.files = Dir.chdir(File.expand_path(__dir__)) do
20
22
  `git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(test|spec|features)/}) }
21
23
  end
22
-
24
+
23
25
  spec.bindir = 'bin'
24
26
  spec.executables << 'ara_generator'
25
-
26
- spec.require_paths = ["lib"]
27
+
28
+ spec.require_paths = ['lib']
27
29
  spec.add_dependency 'activesupport'
28
- spec.add_dependency 'sinatra'
29
30
  spec.add_dependency 'airrecord'
31
+ spec.add_dependency 'bcrypt'
30
32
  spec.add_dependency 'faraday', '~> 2.2'
31
33
  spec.add_dependency 'faraday-net_http_persistent', '~> 2.0' # workaround to make Faraday work after upgrading to 2.2.0
34
+ spec.add_dependency 'sinatra'
32
35
  spec.add_dependency 'thor'
33
- spec.add_dependency 'bcrypt'
34
-
35
- spec.add_development_dependency 'rspec'
36
+
36
37
  spec.add_development_dependency 'rack-test'
37
- end
38
+ spec.add_development_dependency 'rspec'
39
+ end
data/bin/ara_generator CHANGED
@@ -1,6 +1,8 @@
1
1
  #!/usr/bin/env ruby
2
- require "bundler/setup"
2
+ # frozen_string_literal: true
3
+
4
+ require 'bundler/setup'
3
5
  require 'app_rail/airtable/generator'
4
6
  require 'byebug'
5
7
 
6
- AppRail::Airtable::Generator.start(ARGV)
8
+ AppRail::Airtable::Generator.start(ARGV)
data/bin/console CHANGED
@@ -1,7 +1,8 @@
1
1
  #!/usr/bin/env ruby
2
+ # frozen_string_literal: true
2
3
 
3
- require "bundler/setup"
4
- require "app_rail/airtable"
4
+ require 'bundler/setup'
5
+ require 'app_rail/airtable'
5
6
 
6
7
  # You can add fixtures and/or initialization code here to make experimenting
7
8
  # with your gem easier. You can also use a different console, if you like.
@@ -10,5 +11,5 @@ require "app_rail/airtable"
10
11
  # require "pry"
11
12
  # Pry.start
12
13
 
13
- require "irb"
14
+ require 'irb'
14
15
  IRB.start(__FILE__)
@@ -1,64 +1,67 @@
1
+ # frozen_string_literal: true
2
+
1
3
  require 'airrecord'
4
+ require 'app_rail-steps'
2
5
  require 'active_support/core_ext/string/inflections'
3
6
 
4
7
  module AppRail
5
8
  module Airtable
6
9
  class ApplicationRecord < Airrecord::Table
7
10
  include ActiveSupport::Inflector
8
-
11
+ include AppRail::Steps::Displayable
12
+
9
13
  def self.base_key
10
- ENV.fetch("AIRTABLE_BASE_ID")
14
+ ENV.fetch('AIRTABLE_BASE_ID')
11
15
  end
12
-
16
+
13
17
  def self.table_name
14
- self.name.pluralize
18
+ name.pluralize
15
19
  end
16
-
20
+
17
21
  def self.airtable_attr(*attributes)
18
22
  attributes.each do |attribute|
19
23
  define_method(attribute.to_s.snake_case) { self[attribute] }
20
24
  define_method("#{attribute.to_s.snake_case}=") { |value| self[attribute] = value }
21
25
  end
22
26
  end
23
-
27
+
24
28
  # Step utilities
25
29
  def self.ar_list_item(text:, detail_text: nil, image: nil, sf_symbol: nil, material_icon: nil)
26
30
  define_method(:ar_list_item_as_json) do
27
31
  {
28
- id: self.id,
29
- text: method_value(text).to_s,
30
- detailText: method_value(detail_text).to_s,
31
- imageURL: method_value(image),
32
- sfSymbolName: method_value(sf_symbol),
32
+ id: id,
33
+ text: method_value(text).to_s,
34
+ detailText: method_value(detail_text).to_s,
35
+ imageURL: method_value(image),
36
+ sfSymbolName: method_value(sf_symbol),
33
37
  materialIconName: method_value(material_icon)
34
38
  }.compact
35
39
  end
36
40
  end
37
-
41
+
38
42
  def self.ar_stack(text_items:)
39
43
  define_method(:ar_stack_as_json) do
40
- text_items.map{|ti| {type: :text, label: ti, text: self[ti].to_s} }
44
+ text_items.map { |ti| { type: :text, label: ti, text: self[ti].to_s } }
41
45
  end
42
46
  end
43
-
47
+
44
48
  # Customisable behaviour
45
-
49
+
46
50
  # Override to provide custom sorting or filtering for index
47
51
  def self.index(user:)
48
52
  all
49
53
  end
50
-
54
+
51
55
  private
52
-
56
+
53
57
  def method_value(name)
54
58
  send(name) if name.present?
55
59
  end
56
-
60
+
57
61
  # size is either :small, :large or :full
58
62
  def image(name, index: 0, size: :full)
59
- self[name][index]["thumbnails"][size.to_s]["url"] if self[name] && self[name].length > index
63
+ self[name][index]['thumbnails'][size.to_s]['url'] if self[name] && self[name].length > index
60
64
  end
61
-
62
65
  end
63
66
  end
64
- end
67
+ end
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  require 'bcrypt'
2
4
  require 'securerandom'
3
5
 
@@ -5,50 +7,50 @@ module AppRail
5
7
  module Airtable
6
8
  module Authenticatable
7
9
  include BCrypt
8
-
10
+
9
11
  def self.included(klass)
10
12
  klass.extend(ClassMethods)
11
13
  klass.prepend(InstanceMethods) # prepends `initialize` instance method in order to take precedence over Airrecord::Table#initialize
12
14
  end
13
-
15
+
14
16
  module ClassMethods
15
17
  def create(email:, password:)
16
- user = new("Email" => email, "Password Hash" => password_hash(password), "Access Token" => next_access_token)
18
+ user = new('Email' => email, 'Password Hash' => password_hash(password), 'Access Token' => next_access_token)
17
19
  user.create
18
20
  user
19
21
  end
20
-
22
+
21
23
  def create_session_as_json(email:, password:)
22
24
  user = find_by_email_and_password(email, password)
23
25
  return nil unless user
24
-
25
- user["Access Token"] = next_access_token
26
+
27
+ user['Access Token'] = next_access_token
26
28
  user.save
27
29
  user&.oauth_session
28
30
  end
29
-
31
+
30
32
  def find_by_email_and_password(email, password)
31
33
  user = all(filter: "{Email} = \"#{email}\"").first
32
34
  user&.valid_password?(password) ? user : nil
33
35
  end
34
36
 
35
37
  def find_by_access_token(access_token)
36
- all(filter: "{Access Token} = \"#{access_token}\"").first
38
+ all(filter: "{Access Token} = \"#{access_token}\"").first
37
39
  end
38
-
40
+
39
41
  def password_hash(password)
40
42
  BCrypt::Password.create(password)
41
- end
42
-
43
+ end
44
+
43
45
  def next_access_token
44
46
  SecureRandom.hex
45
- end
47
+ end
46
48
  end
47
49
 
48
50
  module InstanceMethods
49
51
  def initialize(*args)
50
52
  if (kwargs = args.first) && kwargs.is_a?(Hash) && kwargs.size == 2 && kwargs.key?(:email) && kwargs.key?(:password)
51
- super("Email" => kwargs[:email], "Password Hash" => self.class.password_hash(kwargs[:password]), "Access Token" => self.class.next_access_token)
53
+ super('Email' => kwargs[:email], 'Password Hash' => self.class.password_hash(kwargs[:password]), 'Access Token' => self.class.next_access_token)
52
54
  else
53
55
  super
54
56
  end
@@ -58,14 +60,14 @@ module AppRail
58
60
  def valid_password?(password)
59
61
  BCrypt::Password.new(password_hash) == password
60
62
  end
61
-
63
+
62
64
  def password_hash
63
- self["Password Hash"]
65
+ self['Password Hash']
64
66
  end
65
-
67
+
66
68
  def oauth_session
67
- { access_token: self["Access Token"], scope: :user, refresh_token: "", token_type: :bearer, expires_in: 60000 }
69
+ { access_token: self['Access Token'], scope: :user, refresh_token: '', token_type: :bearer, expires_in: 60_000 }
68
70
  end
69
71
  end
70
72
  end
71
- end
73
+ end
@@ -1,27 +1,30 @@
1
+ # frozen_string_literal: true
2
+
1
3
  module AppRail
2
4
  module Airtable
3
5
  module AuthenticationHelpers
4
6
  def current_user
5
7
  @current_user ||= find_current_user
6
8
  end
7
-
9
+
8
10
  def find_current_user
9
11
  authorization_header && bearer_token ? find_authenticatable_resource(access_token: bearer_token) : nil
10
12
  end
11
-
13
+
12
14
  def bearer_token
13
- authorization_values = authorization_header.split(" ")
15
+ authorization_values = authorization_header.split(' ')
14
16
  return nil unless authorization_values.count > 1
17
+
15
18
  authorization_values[1]
16
19
  end
17
-
20
+
18
21
  def authorization_header
19
- request.env["HTTP_AUTHORIZATION"]
22
+ request.env['HTTP_AUTHORIZATION']
20
23
  end
21
-
24
+
22
25
  def authenticate!
23
26
  halt 401 unless current_user
24
27
  end
25
28
  end
26
29
  end
27
- end
30
+ end
@@ -1,57 +1,57 @@
1
+ # frozen_string_literal: true
2
+
1
3
  require 'sinatra'
2
4
  require 'json'
3
5
  require 'active_support'
4
6
 
5
7
  # TODO: MBS - move to configure block or other
6
- Airrecord.api_key = ENV.fetch("AIRTABLE_API_KEY")
8
+ Airrecord.api_key = ENV.fetch('AIRTABLE_API_KEY')
7
9
 
8
10
  class Symbol
9
-
10
11
  def pluralize
11
12
  ActiveSupport::Inflector.pluralize(self)
12
13
  end
13
-
14
+
14
15
  def classify
15
- ActiveSupport::Inflector.classify(self)
16
+ ActiveSupport::Inflector.classify(self)
16
17
  end
17
-
18
+
18
19
  def classify_constantize
19
20
  ActiveSupport::Inflector.constantize(classify)
20
21
  end
21
-
22
22
  end
23
23
 
24
24
  module AppRail
25
25
  module Airtable
26
26
  class Sinatra < Sinatra::Base
27
27
  @@authenticated_route = false
28
-
28
+
29
29
  helpers do
30
30
  def request_body_as_json
31
31
  request.body.rewind
32
32
  JSON.parse(request.body.read)
33
33
  end
34
-
34
+
35
35
  def params_and_body_as_json
36
36
  request_body_as_json.merge(params)
37
37
  end
38
38
  end
39
-
40
- def self.authenticatable_resources(name, only: [:index, :show, :create, :update])
41
-
39
+
40
+ def self.authenticatable_resources(name, only: %i[index show create update])
42
41
  # If authentication is used then include the correct helpers
43
42
  # Allowing the routes to use `authenticate!` and `current_user`
44
43
  helpers AppRail::Airtable::AuthenticationHelpers
45
-
44
+
46
45
  resources(name, only: only)
47
-
46
+
48
47
  return unless block_given?
48
+
49
49
  @@authenticated_route = true
50
50
  yield
51
51
  @@authenticated_route = false
52
52
  end
53
53
 
54
- def self.resources(name, only: [:index, :show, :create, :update])
54
+ def self.resources(name, only: %i[index show create update])
55
55
  only = [only] if only.is_a?(Symbol)
56
56
 
57
57
  index_route(name, authenticated_route?) if only.include?(:index)
@@ -59,34 +59,36 @@ module AppRail
59
59
  create_route(name, authenticated_route?) if only.include?(:create)
60
60
  update_route(name, authenticated_route?) if only.include?(:update)
61
61
  end
62
-
62
+
63
63
  def self.index_route(name, authenticated_route)
64
- get "/#{name.to_s}" do
64
+ get "/#{name}" do
65
65
  authenticate! if authenticated_route
66
66
  name.classify_constantize.index(user: authenticated_route ? current_user : nil).map(&:ar_list_item_as_json).to_json
67
67
  end
68
68
  end
69
-
69
+
70
70
  def self.show_route(name, authenticated_route)
71
- get "/#{name.to_s}/:id" do
71
+ get "/#{name}/:id" do
72
72
  authenticate! if authenticated_route
73
73
  name.classify_constantize.find(params['id']).ar_stack_as_json.to_json
74
74
  end
75
75
  end
76
-
76
+
77
77
  def self.create_route(name, authenticated_route)
78
- post "/#{name.to_s}" do
78
+ post "/#{name}" do
79
79
  authenticate! if authenticated_route
80
- as_json = name.classify_constantize.create_as_json(current_user: authenticated_route ? current_user : nil, params: params_and_body_as_json)
81
- [201, as_json.to_json]
80
+ as_json = name.classify_constantize.create_as_json(current_user: authenticated_route ? current_user : nil,
81
+ params: params_and_body_as_json)
82
+ [201, as_json.to_json]
82
83
  end
83
84
  end
84
85
 
85
86
  def self.update_route(name, authenticated_route)
86
- put "/#{name.to_s}/:id" do
87
+ put "/#{name}/:id" do
87
88
  authenticate! if authenticated_route
88
89
  record = name.classify_constantize.find(params['id'])
89
- as_json = record.update_as_json(current_user: authenticated_route ? current_user : nil, params: params_and_body_as_json)
90
+ as_json = record.update_as_json(current_user: authenticated_route ? current_user : nil,
91
+ params: params_and_body_as_json)
90
92
  [200, as_json.to_json]
91
93
  end
92
94
  end
@@ -96,4 +98,4 @@ module AppRail
96
98
  end
97
99
  end
98
100
  end
99
- end
101
+ end
@@ -1,5 +1,7 @@
1
+ # frozen_string_literal: true
2
+
1
3
  class String
2
4
  def snake_case
3
- gsub(" ", "_").underscore
5
+ gsub(' ', '_').underscore
4
6
  end
5
- end
7
+ end
@@ -2,6 +2,6 @@
2
2
 
3
3
  module AppRail
4
4
  module Airtable
5
- VERSION = '0.4.0'
5
+ VERSION = '0.4.1'
6
6
  end
7
7
  end
@@ -1,10 +1,12 @@
1
- require "app_rail/airtable/version"
2
- require "app_rail/airtable/string_ext"
3
- require "app_rail/airtable/application_record"
4
- require "app_rail/airtable/authenticatable"
5
- require "app_rail/airtable/authentication_helpers"
6
- require "app_rail/airtable/sinatra"
7
- require "app_rail/airtable/generator"
1
+ # frozen_string_literal: true
2
+
3
+ require 'app_rail/airtable/version'
4
+ require 'app_rail/airtable/string_ext'
5
+ require 'app_rail/airtable/application_record'
6
+ require 'app_rail/airtable/authenticatable'
7
+ require 'app_rail/airtable/authentication_helpers'
8
+ require 'app_rail/airtable/sinatra'
9
+ require 'app_rail/airtable/generator'
8
10
 
9
11
  module AppRail
10
12
  module Airtable
@@ -6,6 +6,7 @@ git_source(:github) { |repo| "https://github.com/#{repo}.git" }
6
6
  ruby '2.7.4'
7
7
 
8
8
  gem 'app_rail-airtable', '~> 0.4.0'
9
+ gem 'app_rail-steps'
9
10
 
10
11
  group :development do
11
12
  gem 'dotenv'
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  $stdout.sync = true
2
4
 
3
5
  ENV['RACK_ENV'] ||= 'development'
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  # This file was generated by the `rspec --init` command. Conventionally, all
2
4
  # specs live under a `spec` directory, which RSpec adds to the `$LOAD_PATH`.
3
5
  # The generated `.rspec` file contains `--require spec_helper` which will cause
@@ -19,9 +21,9 @@ ENV['AIRTABLE_API_KEY'] = 'keyABC123'
19
21
  ENV['AIRTABLE_BASE_ID'] = 'appABC123'
20
22
  ENV['RACK_ENV'] = 'test'
21
23
 
22
- require "rack/test"
23
- require "app_rail/airtable"
24
- require "byebug"
24
+ require 'rack/test'
25
+ require 'app_rail/airtable'
26
+ require 'byebug'
25
27
 
26
28
  require './lib/server'
27
29
 
@@ -56,60 +58,57 @@ RSpec.configure do |config|
56
58
  # triggering implicit auto-inclusion in groups with matching metadata.
57
59
  config.shared_context_metadata_behavior = :apply_to_host_groups
58
60
 
59
- # The settings below are suggested to provide a good initial experience
60
- # with RSpec, but feel free to customize to your heart's content.
61
- =begin
62
- # This allows you to limit a spec run to individual examples or groups
63
- # you care about by tagging them with `:focus` metadata. When nothing
64
- # is tagged with `:focus`, all examples get run. RSpec also provides
65
- # aliases for `it`, `describe`, and `context` that include `:focus`
66
- # metadata: `fit`, `fdescribe` and `fcontext`, respectively.
67
- config.filter_run_when_matching :focus
68
-
69
- # Allows RSpec to persist some state between runs in order to support
70
- # the `--only-failures` and `--next-failure` CLI options. We recommend
71
- # you configure your source control system to ignore this file.
72
- config.example_status_persistence_file_path = "spec/examples.txt"
73
-
74
- # Limits the available syntax to the non-monkey patched syntax that is
75
- # recommended. For more details, see:
76
- # - http://rspec.info/blog/2012/06/rspecs-new-expectation-syntax/
77
- # - http://www.teaisaweso.me/blog/2013/05/27/rspecs-new-message-expectation-syntax/
78
- # - http://rspec.info/blog/2014/05/notable-changes-in-rspec-3/#zero-monkey-patching-mode
79
- config.disable_monkey_patching!
80
-
81
- # This setting enables warnings. It's recommended, but in some cases may
82
- # be too noisy due to issues in dependencies.
83
- config.warnings = true
84
-
85
- # Many RSpec users commonly either run the entire suite or an individual
86
- # file, and it's useful to allow more verbose output when running an
87
- # individual spec file.
88
- if config.files_to_run.one?
89
- # Use the documentation formatter for detailed output,
90
- # unless a formatter has already been configured
91
- # (e.g. via a command-line flag).
92
- config.default_formatter = "doc"
93
- end
94
-
95
- # Print the 10 slowest examples and example groups at the
96
- # end of the spec run, to help surface which specs are running
97
- # particularly slow.
98
- config.profile_examples = 10
99
-
100
- # Run specs in random order to surface order dependencies. If you find an
101
- # order dependency and want to debug it, you can fix the order by providing
102
- # the seed, which is printed after each run.
103
- # --seed 1234
104
- config.order = :random
105
-
106
- # Seed global randomization in this process using the `--seed` CLI option.
107
- # Setting this allows you to use `--seed` to deterministically reproduce
108
- # test failures related to randomization by passing the same `--seed` value
109
- # as the one that triggered the failure.
110
- Kernel.srand config.seed
111
- =end
61
+ # The settings below are suggested to provide a good initial experience
62
+ # with RSpec, but feel free to customize to your heart's content.
63
+ # # This allows you to limit a spec run to individual examples or groups
64
+ # # you care about by tagging them with `:focus` metadata. When nothing
65
+ # # is tagged with `:focus`, all examples get run. RSpec also provides
66
+ # # aliases for `it`, `describe`, and `context` that include `:focus`
67
+ # # metadata: `fit`, `fdescribe` and `fcontext`, respectively.
68
+ # config.filter_run_when_matching :focus
69
+ #
70
+ # # Allows RSpec to persist some state between runs in order to support
71
+ # # the `--only-failures` and `--next-failure` CLI options. We recommend
72
+ # # you configure your source control system to ignore this file.
73
+ # config.example_status_persistence_file_path = "spec/examples.txt"
74
+ #
75
+ # # Limits the available syntax to the non-monkey patched syntax that is
76
+ # # recommended. For more details, see:
77
+ # # - http://rspec.info/blog/2012/06/rspecs-new-expectation-syntax/
78
+ # # - http://www.teaisaweso.me/blog/2013/05/27/rspecs-new-message-expectation-syntax/
79
+ # # - http://rspec.info/blog/2014/05/notable-changes-in-rspec-3/#zero-monkey-patching-mode
80
+ # config.disable_monkey_patching!
81
+ #
82
+ # # This setting enables warnings. It's recommended, but in some cases may
83
+ # # be too noisy due to issues in dependencies.
84
+ # config.warnings = true
85
+ #
86
+ # # Many RSpec users commonly either run the entire suite or an individual
87
+ # # file, and it's useful to allow more verbose output when running an
88
+ # # individual spec file.
89
+ # if config.files_to_run.one?
90
+ # # Use the documentation formatter for detailed output,
91
+ # # unless a formatter has already been configured
92
+ # # (e.g. via a command-line flag).
93
+ # config.default_formatter = "doc"
94
+ # end
95
+ #
96
+ # # Print the 10 slowest examples and example groups at the
97
+ # # end of the spec run, to help surface which specs are running
98
+ # # particularly slow.
99
+ # config.profile_examples = 10
100
+ #
101
+ # # Run specs in random order to surface order dependencies. If you find an
102
+ # # order dependency and want to debug it, you can fix the order by providing
103
+ # # the seed, which is printed after each run.
104
+ # # --seed 1234
105
+ # config.order = :random
106
+ #
107
+ # # Seed global randomization in this process using the `--seed` CLI option.
108
+ # # Setting this allows you to use `--seed` to deterministically reproduce
109
+ # # test failures related to randomization by passing the same `--seed` value
110
+ # # as the one that triggered the failure.
111
+ # Kernel.srand config.seed
112
112
 
113
113
  config.include Rack::Test::Methods
114
-
115
114
  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.4.0
4
+ version: 0.4.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Matt Brooke-Smith
8
- autorequire:
8
+ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2022-02-26 00:00:00.000000000 Z
11
+ date: 2022-04-18 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activesupport
@@ -25,7 +25,7 @@ dependencies:
25
25
  - !ruby/object:Gem::Version
26
26
  version: '0'
27
27
  - !ruby/object:Gem::Dependency
28
- name: sinatra
28
+ name: airrecord
29
29
  requirement: !ruby/object:Gem::Requirement
30
30
  requirements:
31
31
  - - ">="
@@ -39,7 +39,7 @@ dependencies:
39
39
  - !ruby/object:Gem::Version
40
40
  version: '0'
41
41
  - !ruby/object:Gem::Dependency
42
- name: airrecord
42
+ name: bcrypt
43
43
  requirement: !ruby/object:Gem::Requirement
44
44
  requirements:
45
45
  - - ">="
@@ -81,7 +81,7 @@ dependencies:
81
81
  - !ruby/object:Gem::Version
82
82
  version: '2.0'
83
83
  - !ruby/object:Gem::Dependency
84
- name: thor
84
+ name: sinatra
85
85
  requirement: !ruby/object:Gem::Requirement
86
86
  requirements:
87
87
  - - ">="
@@ -95,7 +95,7 @@ dependencies:
95
95
  - !ruby/object:Gem::Version
96
96
  version: '0'
97
97
  - !ruby/object:Gem::Dependency
98
- name: bcrypt
98
+ name: thor
99
99
  requirement: !ruby/object:Gem::Requirement
100
100
  requirements:
101
101
  - - ">="
@@ -109,7 +109,7 @@ dependencies:
109
109
  - !ruby/object:Gem::Version
110
110
  version: '0'
111
111
  - !ruby/object:Gem::Dependency
112
- name: rspec
112
+ name: rack-test
113
113
  requirement: !ruby/object:Gem::Requirement
114
114
  requirements:
115
115
  - - ">="
@@ -123,7 +123,7 @@ dependencies:
123
123
  - !ruby/object:Gem::Version
124
124
  version: '0'
125
125
  - !ruby/object:Gem::Dependency
126
- name: rack-test
126
+ name: rspec
127
127
  requirement: !ruby/object:Gem::Requirement
128
128
  requirements:
129
129
  - - ">="
@@ -136,7 +136,7 @@ dependencies:
136
136
  - - ">="
137
137
  - !ruby/object:Gem::Version
138
138
  version: '0'
139
- description:
139
+ description:
140
140
  email:
141
141
  - matt@futureworkshops.com
142
142
  executables:
@@ -172,7 +172,6 @@ files:
172
172
  - templates/project/.env.tt
173
173
  - templates/project/.gitignore
174
174
  - templates/project/Gemfile
175
- - templates/project/Gemfile.lock
176
175
  - templates/project/app.json
177
176
  - templates/project/config.ru
178
177
  - templates/project/lib/server.rb.tt
@@ -184,7 +183,7 @@ licenses:
184
183
  metadata:
185
184
  homepage_uri: https://github.com/FutureWorkshops/app_rail-airtable
186
185
  source_code_uri: https://github.com/FutureWorkshops/app_rail-airtable
187
- post_install_message:
186
+ post_install_message:
188
187
  rdoc_options: []
189
188
  require_paths:
190
189
  - lib
@@ -199,8 +198,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
199
198
  - !ruby/object:Gem::Version
200
199
  version: '0'
201
200
  requirements: []
202
- rubygems_version: 3.3.6
203
- signing_key:
201
+ rubygems_version: 3.1.6
202
+ signing_key:
204
203
  specification_version: 4
205
204
  summary: Gem to help building App Rail servers using Airtable as a backend
206
205
  test_files: []
@@ -1,96 +0,0 @@
1
- GEM
2
- remote: https://rubygems.org/
3
- specs:
4
- activesupport (6.1.4.1)
5
- concurrent-ruby (~> 1.0, >= 1.0.2)
6
- i18n (>= 1.6, < 2)
7
- minitest (>= 5.1)
8
- tzinfo (~> 2.0)
9
- zeitwerk (~> 2.3)
10
- airrecord (1.0.7)
11
- faraday (>= 0.10, < 2.0)
12
- net-http-persistent
13
- app_rail-airtable (0.4.0)
14
- activesupport
15
- airrecord
16
- bcrypt
17
- sinatra
18
- thor
19
- bcrypt (3.1.16)
20
- byebug (11.1.3)
21
- concurrent-ruby (1.1.9)
22
- connection_pool (2.2.5)
23
- diff-lcs (1.4.4)
24
- dotenv (2.7.6)
25
- faraday (1.8.0)
26
- faraday-em_http (~> 1.0)
27
- faraday-em_synchrony (~> 1.0)
28
- faraday-excon (~> 1.1)
29
- faraday-httpclient (~> 1.0.1)
30
- faraday-net_http (~> 1.0)
31
- faraday-net_http_persistent (~> 1.1)
32
- faraday-patron (~> 1.0)
33
- faraday-rack (~> 1.0)
34
- multipart-post (>= 1.2, < 3)
35
- ruby2_keywords (>= 0.0.4)
36
- faraday-em_http (1.0.0)
37
- faraday-em_synchrony (1.0.0)
38
- faraday-excon (1.1.0)
39
- faraday-httpclient (1.0.1)
40
- faraday-net_http (1.0.1)
41
- faraday-net_http_persistent (1.2.0)
42
- faraday-patron (1.0.0)
43
- faraday-rack (1.0.0)
44
- i18n (1.8.11)
45
- concurrent-ruby (~> 1.0)
46
- minitest (5.14.4)
47
- multipart-post (2.1.1)
48
- mustermann (1.1.1)
49
- ruby2_keywords (~> 0.0.1)
50
- net-http-persistent (4.0.1)
51
- connection_pool (~> 2.2)
52
- rack (2.2.3)
53
- rack-protection (2.1.0)
54
- rack
55
- rack-test (1.1.0)
56
- rack (>= 1.0, < 3)
57
- rspec (3.10.0)
58
- rspec-core (~> 3.10.0)
59
- rspec-expectations (~> 3.10.0)
60
- rspec-mocks (~> 3.10.0)
61
- rspec-core (3.10.1)
62
- rspec-support (~> 3.10.0)
63
- rspec-expectations (3.10.1)
64
- diff-lcs (>= 1.2.0, < 2.0)
65
- rspec-support (~> 3.10.0)
66
- rspec-mocks (3.10.2)
67
- diff-lcs (>= 1.2.0, < 2.0)
68
- rspec-support (~> 3.10.0)
69
- rspec-support (3.10.3)
70
- ruby2_keywords (0.0.5)
71
- sinatra (2.1.0)
72
- mustermann (~> 1.0)
73
- rack (~> 2.2)
74
- rack-protection (= 2.1.0)
75
- tilt (~> 2.0)
76
- thor (1.1.0)
77
- tilt (2.0.10)
78
- tzinfo (2.0.4)
79
- concurrent-ruby (~> 1.0)
80
- zeitwerk (2.5.1)
81
-
82
- PLATFORMS
83
- ruby
84
-
85
- DEPENDENCIES
86
- app_rail-airtable (~> 0.4.0)
87
- byebug
88
- dotenv
89
- rack-test
90
- rspec
91
-
92
- RUBY VERSION
93
- ruby 2.7.4p191
94
-
95
- BUNDLED WITH
96
- 2.1.4