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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: d16a0ed322b54b45b8e8651f2d3b2f374fe36d2b659f00de534731249ed3596a
4
- data.tar.gz: 176579f8838f7368bc0d1dcc913aefe5d8b391c88299c137e63ca6b0e1be692d
3
+ metadata.gz: 6bc8e8104ce0d509fd592dbcfe3d7203998db7ea38352a40162e6a8e8e92f470
4
+ data.tar.gz: dd0bac00b8534523bf20f82238cd404cdc8f0ca0929b46a62be0137799d7aec2
5
5
  SHA512:
6
- metadata.gz: 3079f7053a1670151a438c1aeeeb69df7d1e4f1e496a15d1d863808d732f11420bbf6acbdf90ac3de37570d01cc4daf3bb25960fdbcb9812d423097d89cd3f8c
7
- data.tar.gz: b70ce155192095a89affe6ccc894cb4d04f3679a3950b8402bafd5d96ff273f43e572ac4b0f589dad256a7ab0c826bc86556c5ab49bdab4b8b35085486721dfd
6
+ metadata.gz: 6413a664b4197e85df9a71caf88bb8f322b17cd330d3c39cbf77666eca06d337f0094781a2207d26fa7e0d2c1cf2eb3178d2a8c2eaf3b4b08708b25ea1f71369
7
+ data.tar.gz: 3f240f41215b4713c01a95c61e5076be16ee9702d9c95c997ef3bf009766acb7e1ccc6a245cb35f161f32cb29afcc26ff726c36970c06e5cedc223445f4e479a
@@ -2,9 +2,9 @@ name: CI
2
2
 
3
3
  on:
4
4
  push:
5
- branches: [ main ]
5
+ branches: [ master ]
6
6
  pull_request:
7
- branches: [ main ]
7
+ branches: [ master ]
8
8
 
9
9
  env:
10
10
  RUBY_PLATFORM: ruby
@@ -15,7 +15,7 @@ jobs:
15
15
  strategy:
16
16
  fail-fast: false
17
17
  matrix:
18
- ruby-version: ['3.0', '3.1', '3.2', '3.3']
18
+ ruby-version: ['3.0', '3.1', '3.2', '3.3', '3.4']
19
19
 
20
20
  steps:
21
21
  - uses: actions/checkout@v4
@@ -24,20 +24,26 @@ jobs:
24
24
  uses: ruby/setup-ruby@v1
25
25
  with:
26
26
  ruby-version: ${{ matrix.ruby-version }}
27
- bundler-cache: true
27
+ bundler-cache: false
28
+
29
+ - name: Install dependencies
30
+ run: |
31
+ gem install bundler -v 2.4.22
32
+ bundle config set --local deployment false
33
+ bundle install
28
34
 
29
35
  - name: Create coverage directory
30
36
  run: mkdir -p coverage
31
37
 
32
- - name: Run tests
38
+ - name: Run RSpec tests
33
39
  run: |
34
- bundle exec rake coverage:report
40
+ bundle exec rspec --format documentation
35
41
  env:
36
42
  COVERAGE: true
37
43
 
38
44
  - name: Upload coverage to Codecov
39
45
  uses: codecov/codecov-action@v4
40
- if: matrix.ruby-version == '3.3'
46
+ if: matrix.ruby-version == '3.4'
41
47
  with:
42
48
  files: ./coverage/coverage.xml,./coverage/.resultset.json
43
49
  flags: unittests
@@ -54,8 +60,14 @@ jobs:
54
60
  - name: Set up Ruby
55
61
  uses: ruby/setup-ruby@v1
56
62
  with:
57
- ruby-version: '3.3'
58
- bundler-cache: true
63
+ ruby-version: '3.4'
64
+ bundler-cache: false
65
+
66
+ - name: Install dependencies
67
+ run: |
68
+ gem install bundler -v 2.4.22
69
+ bundle config set --local deployment false
70
+ bundle install
59
71
 
60
72
  - name: Run RuboCop
61
73
  run: bundle exec rubocop --parallel --format github
@@ -69,13 +81,19 @@ jobs:
69
81
  - name: Set up Ruby
70
82
  uses: ruby/setup-ruby@v1
71
83
  with:
72
- ruby-version: '3.3'
73
- bundler-cache: true
84
+ ruby-version: '3.4'
85
+ bundler-cache: false
86
+
87
+ - name: Install dependencies
88
+ run: |
89
+ gem install bundler -v 2.4.22
90
+ bundle config set --local deployment false
91
+ bundle install
74
92
 
75
93
  - name: Run bundler-audit
76
94
  run: |
77
- bundle exec bundler-audit check --update
78
- bundle exec bundler-audit check --format json --output bundler-audit.json || true
95
+ gem install bundler-audit
96
+ bundle-audit check --update || true
79
97
 
80
98
  - name: Upload security scan results
81
99
  uses: actions/upload-artifact@v4
@@ -93,8 +111,14 @@ jobs:
93
111
  - name: Set up Ruby
94
112
  uses: ruby/setup-ruby@v1
95
113
  with:
96
- ruby-version: '3.3'
97
- bundler-cache: true
114
+ ruby-version: '3.4'
115
+ bundler-cache: false
116
+
117
+ - name: Install dependencies
118
+ run: |
119
+ gem install bundler -v 2.4.22
120
+ bundle config set --local deployment false
121
+ bundle install
98
122
 
99
123
  - name: Build gem
100
124
  run: bundle exec gem build attio.gemspec
@@ -0,0 +1,67 @@
1
+ name: Coverage
2
+
3
+ on:
4
+ push:
5
+ branches: [ master ]
6
+
7
+ jobs:
8
+ coverage:
9
+ runs-on: ubuntu-latest
10
+ permissions:
11
+ contents: write
12
+
13
+ steps:
14
+ - uses: actions/checkout@v4
15
+
16
+ - name: Set up Ruby
17
+ uses: ruby/setup-ruby@v1
18
+ with:
19
+ ruby-version: '3.4'
20
+ bundler-cache: false
21
+
22
+ - name: Install dependencies
23
+ run: |
24
+ gem install bundler -v 2.4.22
25
+ bundle config set --local deployment false
26
+ bundle install
27
+
28
+ - name: Run tests with coverage
29
+ run: |
30
+ bundle exec rspec
31
+ env:
32
+ COVERAGE: true
33
+
34
+ - name: Generate coverage badge
35
+ run: |
36
+ if [ -f coverage/.last_run.json ]; then
37
+ COVERAGE=$(ruby -rjson -e "puts JSON.parse(File.read('coverage/.last_run.json'))['result']['line']")
38
+ echo "Coverage: ${COVERAGE}%"
39
+
40
+ # Determine color based on coverage
41
+ if (( $(echo "$COVERAGE >= 90" | bc -l) )); then
42
+ COLOR="brightgreen"
43
+ elif (( $(echo "$COVERAGE >= 80" | bc -l) )); then
44
+ COLOR="green"
45
+ elif (( $(echo "$COVERAGE >= 70" | bc -l) )); then
46
+ COLOR="yellow"
47
+ elif (( $(echo "$COVERAGE >= 60" | bc -l) )); then
48
+ COLOR="orange"
49
+ else
50
+ COLOR="red"
51
+ fi
52
+
53
+ # Create badge JSON
54
+ echo "{\"schemaVersion\": 1, \"label\": \"coverage\", \"message\": \"${COVERAGE}%\", \"color\": \"${COLOR}\"}" > coverage-badge.json
55
+
56
+ # Also create a simple text file for reference
57
+ echo "${COVERAGE}" > coverage-percentage.txt
58
+ fi
59
+
60
+ - name: Upload coverage artifacts
61
+ uses: actions/upload-artifact@v4
62
+ with:
63
+ name: coverage-report
64
+ path: |
65
+ coverage/
66
+ coverage-badge.json
67
+ coverage-percentage.txt
@@ -54,7 +54,7 @@ jobs:
54
54
  fi
55
55
 
56
56
  # Check if CHANGELOG.md was modified
57
- if git diff --name-only origin/main...HEAD | grep -q "CHANGELOG.md"; then
57
+ if git diff --name-only origin/master...HEAD | grep -q "CHANGELOG.md"; then
58
58
  echo "✅ CHANGELOG.md was updated"
59
59
  else
60
60
  echo "❌ Please update CHANGELOG.md with your changes"
@@ -70,8 +70,14 @@ jobs:
70
70
  - name: Set up Ruby
71
71
  uses: ruby/setup-ruby@v1
72
72
  with:
73
- ruby-version: '3.3'
74
- bundler-cache: true
73
+ ruby-version: '3.4'
74
+ bundler-cache: false
75
+
76
+ - name: Install dependencies
77
+ run: |
78
+ gem install bundler -v 2.4.22
79
+ bundle config set --local deployment false
80
+ bundle install
75
81
 
76
82
  - name: Validate gemspec
77
83
  run: |
@@ -95,8 +101,14 @@ jobs:
95
101
  - name: Set up Ruby
96
102
  uses: ruby/setup-ruby@v1
97
103
  with:
98
- ruby-version: '3.3'
99
- bundler-cache: true
104
+ ruby-version: '3.4'
105
+ bundler-cache: false
106
+
107
+ - name: Install dependencies
108
+ run: |
109
+ gem install bundler -v 2.4.22
110
+ bundle config set --local deployment false
111
+ bundle install
100
112
 
101
113
  - name: Run Danger
102
114
  run: bundle exec danger
@@ -111,8 +123,14 @@ jobs:
111
123
  - name: Set up Ruby
112
124
  uses: ruby/setup-ruby@v1
113
125
  with:
114
- ruby-version: '3.3'
115
- bundler-cache: true
126
+ ruby-version: '3.4'
127
+ bundler-cache: false
128
+
129
+ - name: Install dependencies
130
+ run: |
131
+ gem install bundler -v 2.4.22
132
+ bundle config set --local deployment false
133
+ bundle install
116
134
 
117
135
  - name: Run security checks
118
136
  run: |
@@ -14,7 +14,7 @@ jobs:
14
14
  strategy:
15
15
  fail-fast: false
16
16
  matrix:
17
- ruby-version: ['3.0', '3.1', '3.2', '3.3']
17
+ ruby-version: ['3.0', '3.1', '3.2', '3.3', '3.4']
18
18
 
19
19
  steps:
20
20
  - uses: actions/checkout@v4
@@ -23,13 +23,19 @@ jobs:
23
23
  uses: ruby/setup-ruby@v1
24
24
  with:
25
25
  ruby-version: ${{ matrix.ruby-version }}
26
- bundler-cache: true
26
+ bundler-cache: false
27
+
28
+ - name: Install dependencies
29
+ run: |
30
+ gem install bundler -v 2.4.22
31
+ bundle config set --local deployment false
32
+ bundle install
27
33
 
28
34
  - name: Run tests
29
35
  run: bundle exec rspec
30
36
 
31
37
  - name: Run RuboCop
32
- if: matrix.ruby-version == '3.3'
38
+ if: matrix.ruby-version == '3.4'
33
39
  run: bundle exec rubocop
34
40
 
35
41
  build-and-publish:
@@ -47,8 +53,14 @@ jobs:
47
53
  - name: Set up Ruby
48
54
  uses: ruby/setup-ruby@v1
49
55
  with:
50
- ruby-version: '3.3'
51
- bundler-cache: true
56
+ ruby-version: '3.4'
57
+ bundler-cache: false
58
+
59
+ - name: Install dependencies
60
+ run: |
61
+ gem install bundler -v 2.4.22
62
+ bundle config set --local deployment false
63
+ bundle install
52
64
 
53
65
  - name: Extract version from tag
54
66
  id: version
@@ -123,8 +135,14 @@ jobs:
123
135
  - name: Set up Ruby
124
136
  uses: ruby/setup-ruby@v1
125
137
  with:
126
- ruby-version: '3.3'
127
- bundler-cache: true
138
+ ruby-version: '3.4'
139
+ bundler-cache: false
140
+
141
+ - name: Install dependencies
142
+ run: |
143
+ gem install bundler -v 2.4.22
144
+ bundle config set --local deployment false
145
+ bundle install
128
146
 
129
147
  - name: Extract version from tag
130
148
  id: version
@@ -0,0 +1,67 @@
1
+ name: Tests
2
+
3
+ on:
4
+ push:
5
+ branches: [ master ]
6
+ pull_request:
7
+ branches: [ master ]
8
+
9
+ jobs:
10
+ rspec:
11
+ runs-on: ubuntu-latest
12
+ name: RSpec Tests
13
+
14
+ steps:
15
+ - uses: actions/checkout@v4
16
+
17
+ - name: Set up Ruby
18
+ uses: ruby/setup-ruby@v1
19
+ with:
20
+ ruby-version: '3.4'
21
+ bundler-cache: false
22
+
23
+ - name: Install dependencies
24
+ run: |
25
+ gem install bundler -v 2.4.22
26
+ bundle config set --local deployment false
27
+ bundle install
28
+
29
+ - name: Run RSpec with Coverage
30
+ run: |
31
+ bundle exec rspec --format documentation --format json --out rspec-results.json
32
+ env:
33
+ COVERAGE: true
34
+
35
+ - name: Parse Test Results
36
+ if: always()
37
+ run: |
38
+ if [ -f rspec-results.json ]; then
39
+ echo "## Test Results" >> $GITHUB_STEP_SUMMARY
40
+ echo "" >> $GITHUB_STEP_SUMMARY
41
+ TOTAL=$(jq '.summary.example_count' rspec-results.json)
42
+ PASSED=$(jq '.summary.example_count - .summary.failure_count' rspec-results.json)
43
+ FAILED=$(jq '.summary.failure_count' rspec-results.json)
44
+ DURATION=$(jq '.summary.duration' rspec-results.json)
45
+
46
+ echo "✅ **Passed:** $PASSED/$TOTAL tests" >> $GITHUB_STEP_SUMMARY
47
+ if [ "$FAILED" -gt 0 ]; then
48
+ echo "❌ **Failed:** $FAILED tests" >> $GITHUB_STEP_SUMMARY
49
+ fi
50
+ echo "⏱️ **Duration:** ${DURATION}s" >> $GITHUB_STEP_SUMMARY
51
+
52
+ if [ -f coverage/.last_run.json ]; then
53
+ echo "" >> $GITHUB_STEP_SUMMARY
54
+ echo "## Coverage Report" >> $GITHUB_STEP_SUMMARY
55
+ COVERAGE=$(jq '.result.line' coverage/.last_run.json)
56
+ echo "📊 **Line Coverage:** ${COVERAGE}%" >> $GITHUB_STEP_SUMMARY
57
+ fi
58
+ fi
59
+
60
+ - name: Upload Test Results
61
+ if: always()
62
+ uses: actions/upload-artifact@v4
63
+ with:
64
+ name: rspec-results
65
+ path: |
66
+ rspec-results.json
67
+ coverage/