attio 0.1.1 → 0.1.3

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.
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: attio
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.1
4
+ version: 0.1.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ernest Sim
@@ -23,20 +23,6 @@ dependencies:
23
23
  - - "~>"
24
24
  - !ruby/object:Gem::Version
25
25
  version: '1.4'
26
- - !ruby/object:Gem::Dependency
27
- name: yard
28
- requirement: !ruby/object:Gem::Requirement
29
- requirements:
30
- - - "~>"
31
- - !ruby/object:Gem::Version
32
- version: '0.9'
33
- type: :development
34
- prerelease: false
35
- version_requirements: !ruby/object:Gem::Requirement
36
- requirements:
37
- - - "~>"
38
- - !ruby/object:Gem::Version
39
- version: '0.9'
40
26
  description: A Ruby library for interacting with the Attio API, providing easy access
41
27
  to CRM functionality
42
28
  email:
@@ -52,9 +38,11 @@ files:
52
38
  - ".github/dependabot.yml"
53
39
  - ".github/pull_request_template.md"
54
40
  - ".github/workflows/ci.yml"
41
+ - ".github/workflows/coverage.yml"
55
42
  - ".github/workflows/dependabot-auto-merge.yml"
56
43
  - ".github/workflows/pr_checks.yml"
57
44
  - ".github/workflows/release.yml"
45
+ - ".github/workflows/tests.yml"
58
46
  - ".gitignore"
59
47
  - ".rspec"
60
48
  - ".rubocop.yml"
@@ -129,9 +117,6 @@ files:
129
117
  - lib/attio/resources/workspaces.rb
130
118
  - lib/attio/retry_handler.rb
131
119
  - lib/attio/version.rb
132
- - run_tests.rb
133
- - test_basic.rb
134
- - test_typhoeus.rb
135
120
  homepage: https://github.com/idl3/attio
136
121
  licenses:
137
122
  - MIT
data/run_tests.rb DELETED
@@ -1,52 +0,0 @@
1
- #!/usr/bin/env ruby
2
-
3
- # Add lib to load path
4
- $LOAD_PATH.unshift(File.expand_path('../lib', __FILE__))
5
-
6
- # Load the gem
7
- require 'attio'
8
-
9
- # Basic smoke test
10
- begin
11
- puts "Testing Attio gem..."
12
- puts "Version: #{Attio::VERSION}"
13
-
14
- # Test client initialization
15
- begin
16
- Attio::Client.new(api_key: nil)
17
- puts "ERROR: Should have raised error for nil API key"
18
- rescue ArgumentError => e
19
- puts "✓ Client validation works: #{e.message}"
20
- end
21
-
22
- # Test client creation
23
- client = Attio::Client.new(api_key: "test_key")
24
- puts "✓ Client created successfully"
25
-
26
- # Test resource access
27
- puts "✓ Records resource available: #{client.records.class}"
28
- puts "✓ Objects resource available: #{client.objects.class}"
29
- puts "✓ Lists resource available: #{client.lists.class}"
30
- puts "✓ Workspaces resource available: #{client.workspaces.class}"
31
- puts "✓ Attributes resource available: #{client.attributes.class}"
32
- puts "✓ Users resource available: #{client.users.class}"
33
-
34
- # Test error classes
35
- [
36
- Attio::Error,
37
- Attio::AuthenticationError,
38
- Attio::NotFoundError,
39
- Attio::ValidationError,
40
- Attio::RateLimitError,
41
- Attio::ServerError
42
- ].each do |error_class|
43
- puts "✓ #{error_class} is defined"
44
- end
45
-
46
- puts "\nAll basic tests passed!"
47
-
48
- rescue StandardError => e
49
- puts "ERROR: #{e.message}"
50
- puts e.backtrace
51
- exit 1
52
- end
data/test_basic.rb DELETED
@@ -1,51 +0,0 @@
1
- #!/usr/bin/env ruby
2
-
3
- # Test without loading external dependencies
4
- $LOAD_PATH.unshift(File.expand_path('../lib', __FILE__))
5
-
6
- puts "Testing Attio gem structure..."
7
-
8
- # Test version file
9
- require 'attio/version'
10
- puts "✓ Version loaded: #{Attio::VERSION}"
11
-
12
- # Test error definitions
13
- require 'attio/errors'
14
- [
15
- Attio::Error,
16
- Attio::AuthenticationError,
17
- Attio::NotFoundError,
18
- Attio::ValidationError,
19
- Attio::RateLimitError,
20
- Attio::ServerError
21
- ].each do |error_class|
22
- puts "✓ #{error_class} is defined"
23
- end
24
-
25
- # Test that all files exist
26
- files_to_check = [
27
- 'lib/attio.rb',
28
- 'lib/attio/client.rb',
29
- 'lib/attio/resources/base.rb',
30
- 'lib/attio/resources/records.rb',
31
- 'lib/attio/resources/objects.rb',
32
- 'lib/attio/resources/lists.rb',
33
- 'lib/attio/resources/workspaces.rb',
34
- 'lib/attio/resources/attributes.rb',
35
- 'lib/attio/resources/users.rb'
36
- ]
37
-
38
- files_to_check.each do |file|
39
- if File.exist?(file)
40
- puts "✓ #{file} exists"
41
- else
42
- puts "✗ #{file} is missing!"
43
- end
44
- end
45
-
46
- # Test spec files exist
47
- spec_files = Dir.glob('spec/**/*_spec.rb')
48
- puts "\nFound #{spec_files.length} spec files:"
49
- spec_files.each { |f| puts " - #{f}" }
50
-
51
- puts "\nBasic structure test completed!"
data/test_typhoeus.rb DELETED
@@ -1,31 +0,0 @@
1
- #!/usr/bin/env ruby
2
-
3
- require_relative 'lib/attio'
4
-
5
- # Test the gem with Typhoeus
6
- puts "=== Testing Attio Ruby Gem with Typhoeus ==="
7
- puts "Version: #{Attio::VERSION}"
8
-
9
- # Initialize client
10
- API_KEY = '5472096a0d3ad936523a7a9101807bb3155616a3e04a7649ad41cd5a0261dddd'
11
- client = Attio.client(api_key: API_KEY)
12
- puts "✓ Client initialized"
13
-
14
- # Test listing people
15
- puts "\nListing people..."
16
- begin
17
- result = client.records.list(object: "people", sorts: [], limit: 5)
18
- records = result["data"]
19
- puts "✓ Found #{records.length} records"
20
-
21
- records.each do |record|
22
- name = record["values"]["name"][0]["full_name"] rescue "Unknown"
23
- email = record["values"]["email_addresses"][0]["email_address"] rescue "No email"
24
- puts " - #{name} (#{email})"
25
- end
26
- rescue => e
27
- puts "✗ Failed to list records: #{e.message}"
28
- puts e.backtrace
29
- end
30
-
31
- puts "\n✨ Test complete!"