Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 13 additions & 0 deletions .env.example
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# Vistar Media API Credentials

# Staging Environment
VISTAR_STAGING_NETWORK_ID=your_staging_network_id
VISTAR_STAGING_API_KEY=your_staging_api_key

# Production Environment (use with caution)
# VISTAR_PRODUCTION_NETWORK_ID=your_production_network_id
# VISTAR_PRODUCTION_API_KEY=your_production_api_key

# Optional: API Base URLs (defaults provided)
# VISTAR_STAGING_API_URL=https://sandbox-api.vistarmedia.com
# VISTAR_PRODUCTION_API_URL=https://api.vistarmedia.com
70 changes: 70 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@
name: CI

on:
push:
branches: [ main ]
pull_request:
branches: [ main ]

jobs:
test:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
ruby: ['3.0', '3.1', '3.2', '3.3']

steps:
- uses: actions/checkout@v4

- name: Set up Ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: ${{ matrix.ruby }}
bundler-cache: true
bundler: '2.5.22'

- name: Run tests
run: bundle exec rspec

- name: Upload coverage to Codecov
if: matrix.ruby == '3.3'
uses: codecov/codecov-action@v3
with:
files: ./coverage/.resultset.json
fail_ci_if_error: false

rubocop:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4

- name: Set up Ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: '3.3'
bundler-cache: true
bundler: '2.5.22'

- name: Run RuboCop
run: bundle exec rubocop

build:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4

- name: Set up Ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: '3.3'
bundler-cache: true
bundler: '2.5.22'

- name: Build gem
run: bundle exec rake build

- name: List contents
run: ls -la pkg/
38 changes: 38 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
name: Release

on:
push:
tags:
- 'v*'

permissions:
contents: write

jobs:
release:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4

- name: Set up Ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: '3.3'
bundler-cache: true

- name: Build gem
run: bundle exec rake build

- name: Publish to RubyGems
env:
GEM_HOST_API_KEY: ${{ secrets.RUBYGEMS_API_KEY }}
run: |
mkdir -p ~/.gem
gem push pkg/*.gem

- name: Create GitHub Release
uses: softprops/action-gh-release@v1
with:
files: pkg/*.gem
generate_release_notes: true
8 changes: 7 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,10 @@

# rspec failure tracking
.rspec_status
/docs/internal/*

# Environment variables
.env

# Internal documentation and instructions
/docs/internal/*
.github/copilot-instructions.md
5 changes: 3 additions & 2 deletions .rspec
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
--format documentation
--color
--require spec_helper
--color
--format documentation
--order random
48 changes: 45 additions & 3 deletions .rubocop.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,50 @@
AllCops:
TargetRubyVersion: 3.2
NewCops: enable
TargetRubyVersion: 3.0
SuggestExtensions: false
Exclude:
- 'bin/*'
- 'vendor/**/*'
- 'node_modules/**/*'

require:
- rubocop-performance
- rubocop-rspec

# Disable buggy Capybara cop
Capybara/RSpec/PredicateMatcher:
Enabled: false

# Gem-specific customizations
Style/Documentation:
Enabled: false

Style/StringLiterals:
EnforcedStyle: double_quotes
EnforcedStyle: single_quotes

Style/StringLiteralsInInterpolation:
EnforcedStyle: double_quotes
EnforcedStyle: single_quotes

Metrics/BlockLength:
Exclude:
- 'spec/**/*.rb'
- '*.gemspec'

Metrics/MethodLength:
Max: 15
Exclude:
- 'spec/**/*.rb'

Layout/LineLength:
Max: 120
Exclude:
- 'spec/**/*.rb'

RSpec/MultipleExpectations:
Max: 5

RSpec/NestedGroups:
Max: 4

RSpec/ExampleLength:
Max: 15
32 changes: 31 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,35 @@
# Changelog

All notable changes to this project will be documented in this file.

The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [Unreleased]

### Added
- Nothing yet

### Changed
- Nothing yet

### Fixed
- Nothing yet

## [0.1.0] - 2025-10-31

- Initial release
### Added
- Initial project scaffolding
- Basic gem structure with Bundler
- MIT License
- Documentation structure
- Sprint 0: Production infrastructure setup
- Production-grade RuboCop configuration
- RSpec with SimpleCov integration (95% coverage target)
- GitHub Actions CI/CD pipeline
- Complete gemspec with all dependencies
- Development environment setup (.env, bin/setup, bin/console)
- Release and contribution documentation

[Unreleased]: https://github.com/Sentia/vistar_client/compare/v0.1.0...HEAD
[0.1.0]: https://github.com/Sentia/vistar_client/releases/tag/v0.1.0
20 changes: 15 additions & 5 deletions Gemfile
Original file line number Diff line number Diff line change
@@ -1,13 +1,23 @@
# frozen_string_literal: true

source "https://rubygems.org"
source 'https://rubygems.org'

# Specify your gem's dependencies in vistar_client.gemspec
gemspec

gem "irb"
gem "rake", "~> 13.0"
gem 'irb'

gem "rspec", "~> 3.0"
# Constrain erb for Ruby 3.1 compatibility
gem 'erb', '< 5.0' # erb 5.0+ requires Ruby >= 3.2

gem "rubocop", "~> 1.21"
# Development dependencies
gem 'pry', '~> 0.14'
# NOTE: pry-byebug requires Ruby >= 3.1 (via byebug). Install manually if needed:
# gem install pry-byebug # on Ruby >= 3.1
gem 'rake', '~> 13.0'
gem 'rspec', '~> 3.12'
gem 'rubocop', '~> 1.50'
gem 'rubocop-performance', '~> 1.19'
gem 'rubocop-rspec', '~> 2.22'
gem 'simplecov', '~> 0.22'
gem 'yard', '~> 0.9'
Loading