shopify-ruby-definitions 1.0.0 → 1.1.0

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: 0d1ef7b1c4f3633947d50cb80b279c447f1c7609f05b48e8073cb3b3039a4db2
4
- data.tar.gz: 0bdf7b67f1f1b85352d9df51cbeca71cb7637143d176b517b89049e6a35ddb7f
3
+ metadata.gz: c5f6825b0f8833a808ab5d6c2b8df316d9be247985ef0fb1876b9f83a161c065
4
+ data.tar.gz: febe64f1bebdbd659c6f29c25d8439a10718b3db078d2d1f0967851621328cd9
5
5
  SHA512:
6
- metadata.gz: 0042b22cb67ae3d92ecadec063fa968f05463e6555fc80d0d6472a27e01a4b0e516a42bab078cc99d0719b7217070a07b7f3345045dc73442078eeb80521ea7c
7
- data.tar.gz: cec917f18832b11e7417d3c7e0a91b58ff906d2c685ff48ac33e0854d6386424dba448964ea9193ea0614b4104b39400ad276c000c11def47515ac9118b4902f
6
+ metadata.gz: 3fb2548ecd2321482037209b974e9836ba7956d133c795a12186359cf71c432ab1ec7e4bd8d576647e76d3cc080ad78d361fd505a61c96e4f8ac1b020f733456
7
+ data.tar.gz: 8d585b10b92f799af2304d4e08491735177a81a38f3ee33e4b83f733813bae5ac759fd1a699eb25d361c4d1f3b31ab8379ea5c706ca310b5d333934497acbc3f
data/README.md CHANGED
@@ -1,23 +1,46 @@
1
1
  # shopify-ruby-definitions
2
2
 
3
- This repository contains [ruby-build](https://github.com/rbenv/ruby-build/) definitions of Rubies we use at Shopify. These builds are generally API complient with release Rubies, but with additional backports for bugfixes and performance.
3
+ This repository contains [ruby-build](https://github.com/rbenv/ruby-build/) definitions of Rubies we use at Shopify.
4
+ These builds are API complient with release Rubies, but with additional backports for bugfixes and performance.
4
5
 
5
- ## Quick start
6
+ ## rbenv integration
7
+
8
+ If you use `rbenv`, you can add the custom rubies with:
9
+
10
+ ```bash
11
+ $ gem install shopify-ruby-definitions
12
+ $ eval "$(shopify-ruby env)"
13
+ ```
14
+
15
+ ## standalone ruby-build
16
+
17
+ If you are using another ruby version manager or no manager at all:
6
18
 
7
19
  1. Install ruby-build by [following the instructions](https://github.com/rbenv/ruby-build/#installation).
8
- 1. Install the gem:
9
- ```
20
+
21
+ 2. Install the gem:
22
+ ```bash
10
23
  $ gem install shopify-ruby-definitions
11
24
  ```
12
- 1. Acquire the specific Ruby version of the Ruby version you want to install. Ruby 3.2 is used as an example here:
13
- ```
14
- $ export RUBY_VERSION=`ruby -rshopify_ruby_definitions -e 'puts ShopifyRubyDefinitions.resolve_version("3.2")'`
15
- ```
16
- 1. Set the definitions path for ruby-build:
17
- ```
18
- $ export RUBY_BUILD_DEFINITIONS=`ruby -rshopify_ruby_definitions -e 'puts ShopifyRubyDefinitions::RubyVersions::VERSIONS_DIRECTORY'`
19
- ```
20
- 1. Install the Ruby version using ruby-build:
25
+
26
+ 3. List the custom Ruby versions available:
27
+ ```bash
28
+ $ shopify-ruby versions
29
+ 3.0.0-pshopify9
30
+ 3.0.1-pshopify2
31
+ 3.0.2-pshopify3
32
+ 3.1.0-pshopify1
33
+ 3.1.1-pshopify2
34
+ 3.1.2-pshopify2
35
+ 3.1.3-pshopify1
36
+ 3.1.4-pshopify1
37
+ 3.2.0-pshopify2
38
+ 3.2.1-pshopify5
39
+ 3.2.2-pshopify3
40
+ 3.2.2-pshopify4
21
41
  ```
22
- ruby-build $RUBY_VERSION
42
+
43
+ 4. Install the Ruby version you want, [options are the same than regular `ruby-build`](https://github.com/rbenv/ruby-build#advanced-usage):
44
+ ```bash
45
+ $ shopify-ruby build 3.2.2-pshopify4 ~/.rubies/versions/3.2.2
23
46
  ```
data/exe/shopify-ruby ADDED
@@ -0,0 +1,24 @@
1
+ #!/usr/bin/env ruby
2
+ # frozen_string_literal: true
3
+
4
+ require "shopify_ruby_definitions"
5
+
6
+ definitions = [
7
+ ENV["RUBY_BUILD_DEFINITIONS"],
8
+ ShopifyRubyDefinitions::RubyVersions::VERSIONS_DIRECTORY,
9
+ ].compact.join(":")
10
+
11
+ case ARGV.shift
12
+ when "versions"
13
+ puts ShopifyRubyDefinitions::RubyVersions::ALL_VERSIONS
14
+ when "build"
15
+ Process.exec({ "RUBY_BUILD_DEFINITIONS" => definitions }, "ruby-build", *ARGV)
16
+ when "env"
17
+ puts %{export RUBY_BUILD_DEFINITIONS="#{definitions}"}
18
+ else
19
+ $stderr.puts <<~USAGE
20
+ Usage: shopify-ruby list
21
+ shopify-ruby build [-kpv] <definition> <prefix>
22
+ shopify-ruby env
23
+ USAGE
24
+ end
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module ShopifyRubyDefinitions
4
- VERSION = "1.0.0"
4
+ VERSION = "1.1.0"
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: shopify-ruby-definitions
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.0
4
+ version: 1.1.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Peter Zhu
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2023-06-15 00:00:00.000000000 Z
11
+ date: 2023-06-16 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rubocop-minitest
@@ -41,7 +41,8 @@ dependencies:
41
41
  description:
42
42
  email:
43
43
  - peter@peterzhu.ca
44
- executables: []
44
+ executables:
45
+ - shopify-ruby
45
46
  extensions: []
46
47
  extra_rdoc_files: []
47
48
  files:
@@ -50,6 +51,7 @@ files:
50
51
  - LICENSE.txt
51
52
  - README.md
52
53
  - Rakefile
54
+ - exe/shopify-ruby
53
55
  - lib/shopify_ruby_definitions.rb
54
56
  - lib/shopify_ruby_definitions/ruby_versions.rb
55
57
  - lib/shopify_ruby_definitions/version.rb
@@ -65,7 +67,6 @@ files:
65
67
  - rubies/3.2.1-pshopify5
66
68
  - rubies/3.2.2-pshopify3
67
69
  - rubies/3.2.2-pshopify4
68
- - rubies/yjit-3.1.0-dev
69
70
  homepage: https://github.com/Shopify/ruby-definitions
70
71
  licenses:
71
72
  - MIT
@@ -1,2 +0,0 @@
1
- install_package "openssl-1.1.1l" "https://www.openssl.org/source/openssl-1.1.1l.tar.gz#0b7a3e5e59c34827fe0c3a74b7ec8baef302b98fa80088d7f9153aa16fa76bd1" mac_openssl --if has_broken_mac_openssl
2
- install_git "ruby-master" "https://github.com/Shopify/yjit.git" "main" ldflags_dirs autoconf standard_build standard_install_with_bundled_gems verify_openssl