Skip to content

Feature/query gems 8 #13

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

Draft
wants to merge 19 commits into
base: main
Choose a base branch
from
Draft
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
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -33,3 +33,5 @@

# Ignore master key for decrypting credentials and more.
/config/master.key

*.swp
7 changes: 7 additions & 0 deletions Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,9 @@ gem "bootsnap", require: false
# Use Active Storage variants [https://guides.rubyonrails.org/active_storage_overview.html#transforming-images]
# gem "image_processing", "~> 1.2"

gem "gems"
gem "vcr", "~> 6.2"

group :development, :test do
# See https://guides.rubyonrails.org/debugging_rails_applications.html#debugging-with-the-debug-gem
gem "debug", platforms: %i[ mri windows ]
Expand All @@ -67,4 +70,8 @@ group :test do
# Use system testing [https://guides.rubyonrails.org/testing.html#system-testing]
gem "capybara"
gem "selenium-webdriver"
gem "database_cleaner-active_record"
gem "webmock", "~> 3.23"
end

gem "octokit", "~> 9.1"
34 changes: 34 additions & 0 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -94,15 +94,29 @@ GEM
xpath (~> 3.2)
concurrent-ruby (1.3.3)
connection_pool (2.4.1)
crack (1.0.0)
bigdecimal
rexml
crass (1.0.6)
database_cleaner-active_record (2.1.0)
activerecord (>= 5.a)
database_cleaner-core (~> 2.0.0)
database_cleaner-core (2.0.1)
date (3.3.4)
debug (1.9.2)
irb (~> 1.10)
reline (>= 0.3.8)
drb (2.2.1)
erubi (1.13.0)
faraday (2.10.0)
faraday-net_http (>= 2.0, < 3.2)
logger
faraday-net_http (3.1.0)
net-http
gems (1.2.0)
globalid (1.2.1)
activesupport (>= 6.1)
hashdiff (1.1.0)
i18n (1.14.5)
concurrent-ruby (~> 1.0)
importmap-rails (2.0.1)
Expand All @@ -116,6 +130,7 @@ GEM
jbuilder (2.12.0)
actionview (>= 5.0.0)
activesupport (>= 5.0.0)
logger (1.6.0)
loofah (2.22.0)
crass (~> 1.0.2)
nokogiri (>= 1.12.0)
Expand All @@ -130,6 +145,8 @@ GEM
minitest (5.23.1)
msgpack (1.7.2)
mutex_m (0.2.0)
net-http (0.4.1)
uri
net-imap (0.4.13)
date
net-protocol
Expand All @@ -142,6 +159,9 @@ GEM
nio4r (2.7.3)
nokogiri (1.16.6-x86_64-linux)
racc (~> 1.4)
octokit (9.1.0)
faraday (>= 1, < 3)
sawyer (~> 0.9)
psych (5.1.2)
stringio
public_suffix (5.1.1)
Expand Down Expand Up @@ -194,6 +214,9 @@ GEM
rexml (3.3.0)
strscan
rubyzip (2.3.2)
sawyer (0.9.2)
addressable (>= 2.3.5)
faraday (>= 0.17.3, < 3)
selenium-webdriver (4.21.1)
base64 (~> 0.2)
rexml (~> 3.2, >= 3.2.5)
Expand Down Expand Up @@ -224,11 +247,17 @@ GEM
railties (>= 6.0.0)
tzinfo (2.0.6)
concurrent-ruby (~> 1.0)
uri (0.13.0)
vcr (6.2.0)
web-console (4.2.1)
actionview (>= 6.0.0)
activemodel (>= 6.0.0)
bindex (>= 0.4.0)
railties (>= 6.0.0)
webmock (3.23.1)
addressable (>= 2.8.0)
crack (>= 0.3.2)
hashdiff (>= 0.4.0, < 2.0.0)
webrick (1.8.1)
websocket (1.2.10)
websocket-driver (0.7.6)
Expand All @@ -244,9 +273,12 @@ PLATFORMS
DEPENDENCIES
bootsnap
capybara
database_cleaner-active_record
debug
gems
importmap-rails
jbuilder
octokit (~> 9.1)
puma (>= 5.0)
rails (~> 7.1.3, >= 7.1.3.4)
selenium-webdriver
Expand All @@ -256,7 +288,9 @@ DEPENDENCIES
stimulus-rails
turbo-rails
tzinfo-data
vcr (~> 6.2)
web-console
webmock (~> 3.23)

RUBY VERSION
ruby 3.2.4p170
Expand Down
6 changes: 6 additions & 0 deletions app/models/ruby_gem.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
class RubyGem < ApplicationRecord
def self.fetch_from_ruby_gems_dot_org(gem_name)
gem_info = Gems.info(gem_name).symbolize_keys
create(gem_info)
end
end
1 change: 1 addition & 0 deletions b-coauthor.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Co-authored-by: Benjamin Oakes <[email protected]>
31 changes: 31 additions & 0 deletions db/migrate/20240624204429_create_ruby_gems.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
class CreateRubyGems < ActiveRecord::Migration[7.1]
def change
create_table :ruby_gems do |t|
t.string :name, index: { unique: true }
t.integer :downloads
t.string :version
t.datetime :version_created_at
t.integer :version_downloads
t.string :platform
t.string :authors
t.string :info
t.json :licenses
t.json :metadata
t.string :yanked
t.string :sha
t.string :spec_sha
t.string :project_uri
t.string :gem_uri
t.string :homepage_uri
t.string :wiki_uri
t.string :documentation_uri
t.string :mailing_list_uri
t.string :source_code_uri
t.string :bug_tracker_uri
t.string :changelog_uri
t.string :funding_uri
t.json :dependencies
t.timestamps
end
end
end
44 changes: 44 additions & 0 deletions db/schema.rb

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading