Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

YNGJ-1058: Create Aether Observatory #297

Open
wants to merge 14 commits into
base: main
Choose a base branch
from
Open
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
14 changes: 14 additions & 0 deletions .github/workflows/aether_observatory.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
name: aether_observatory

on:
push:

jobs:
ruby:
uses: powerhome/github-actions-workflows/.github/workflows/ruby-gem.yml@main
with:
package: ${{ github.workflow }}
workdir: "packages/${{ github.workflow }}"
gemfiles: "['gemfiles/rails_6_0.gemfile','gemfiles/rails_6_1.gemfile','gemfiles/rails_7_0.gemfile','gemfiles/rails_7_1.gemfile']"
ruby: '["3.0","3.3"]'
secrets: inherit
9 changes: 9 additions & 0 deletions packages/aether_observatory/.rubocop.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
require:
- rubocop-powerhome

AllCops:
TargetRubyVersion: 3.0

Metrics/MethodLength:
Exclude:
- spec/**/*_spec.rb
17 changes: 17 additions & 0 deletions packages/aether_observatory/Appraisals
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
# frozen_string_literal: true

appraise "rails-6-0" do
gem "rails", "~> 6.0.6"
end

appraise "rails-6-1" do
gem "rails", "~> 6.1.7"
end

appraise "rails-7-0" do
gem "rails", "~> 7.0.8"
end

appraise "rails-7-1" do
gem "rails", "~> 7.1.3"
end
7 changes: 7 additions & 0 deletions packages/aether_observatory/Gemfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# frozen_string_literal: true

source "https://rubygems.org"

gemspec

gem "rubocop-powerhome", path: "../rubocop-powerhome"
26 changes: 26 additions & 0 deletions packages/aether_observatory/Rakefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
#!/usr/bin/env rake

# frozen_string_literal: true

begin
require "bundler/setup"
rescue LoadError
puts "You must `gem install bundler` and `bundle install` to run rake tasks"
end
Bundler::GemHelper.install_tasks

require "rspec/core/rake_task"
RSpec::Core::RakeTask.new(:spec)

require "rubocop/rake_task"
RuboCop::RakeTask.new(:rubocop)

require "yard"
YARD::Rake::YardocTask.new do |t|
t.files = ["lib/**/*.rb"]
t.options = [
"--no-private",
]
end

task default: %i[rubocop spec]
44 changes: 44 additions & 0 deletions packages/aether_observatory/aether_observatory.gemspec
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
# frozen_string_literal: true

require_relative "lib/aether_observatory/version"

Gem::Specification.new do |spec|
spec.name = "aether_observatory"
spec.version = AetherObservatory::VERSION
spec.authors = ["Terry Finn", "Justin Stanczak"]
spec.email = ["[email protected]", "[email protected]"]

spec.summary = "Aether Observatory"
spec.description = "Aether Observatory provides an event broadcast system."
spec.homepage = "https://github.com/powerhome/power-tools"
spec.license = "MIT"
spec.required_ruby_version = ">= 3.0"

spec.metadata["rubygems_mfa_required"] = "true"
spec.metadata["homepage_uri"] = spec.homepage
spec.metadata["source_code_uri"] = spec.homepage
spec.metadata["changelog_uri"] = "#{spec.homepage}/blob/main/packages/aether_observatory/docs/CHANGELOG.md"

# Specify which files should be added to the gem when it is released.
# The `git ls-files -z` loads the files in the RubyGem that have been added into git.
spec.files = Dir.chdir(__dir__) do
`git ls-files -z`.split("\x0").reject do |f|
(f == __FILE__) || f.match(%r{\A(?:(?:bin|test|spec|features)/|\.(?:git|travis|circleci)|appveyor)})
end
end
spec.require_paths = ["lib"]

spec.add_dependency "activemodel", ">= 6.0.6.1"
spec.add_dependency "activesupport", ">= 6.0.6.1"
spec.add_development_dependency "appraisal", "~> 2.5.0"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

so I see appraisal here....we use it to help manage our rails updates and manage the dependencies different versions of rails. If properly installed, there should be an Appraisals file that declares versions (example here].

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also, please add the appropriate gemfiles to the test matrix in your workflow. This library is highly dependent on the rails behavior, so I recommend you add the target rails versions to CI. As per our current usage of rails, I recommend you add rails 6.1, 7.0, 7.1 and 7.2

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks y'all. I meant to circle back to this, but forgot.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

activemodel and activesupport are a part of rails core -- so appraising rails at a different version than the ones declared here is declaring two different versions of the same package. Since you don't directly rely on all of rails, just these two modules, you can update appraisal so it's just declaring these modules instead. We can find time tomorrow to work with you on it if needed.

We can also work with you on how we release this. We don't normally take the time to send our pre-releases to rubygems, since we can just point to the github version.


spec.add_development_dependency "bundler", "~> 2.1"
spec.add_development_dependency "license_finder", "~> 7.0"
spec.add_development_dependency "pry", ">= 0.14"
spec.add_development_dependency "pry-byebug", "3.10.1"
spec.add_development_dependency "rake", "~> 13.0"
spec.add_development_dependency "rspec", "~> 3.0"
spec.add_development_dependency "simplecov", "0.15.1"
spec.add_development_dependency "yard", "0.9.21"
spec.metadata["rubygems_mfa_required"] = "true"
end
3 changes: 3 additions & 0 deletions packages/aether_observatory/doc/dependency_decisions.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
---
- - :inherit_from
- https://raw.githubusercontent.com/powerhome/oss-guide/master/license_rules.yml
3 changes: 3 additions & 0 deletions packages/aether_observatory/docs/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
## [0.0.1] - 2024-12-06

- Extracts AetherObservatory from Talkbox engine.
Loading
Loading