This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| $ ruby -v | |
| truffleruby 0.30.2, like ruby 2.3.5 <Java HotSpot(TM) 64-Bit Server VM 1.8.0_151-b12 with Graal> [linux-x86_64] | |
| $ time =ruby -e '' | |
| =ruby -e '' 16.52s user 0.37s system 350% cpu 4.821 total | |
| $ time =ruby --native -e '' | |
| =ruby --native -e '' 0.12s user 0.03s system 98% cpu 0.159 total | |
| $ time =ruby 15a.rb |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| $ time ruby --disable-gems -e '' | |
| 0.006 total | |
| $ time ruby -e '' | |
| 0.036 total | |
| $ time ruby --disable-gems --jit -e '' | |
| 0.184 total | |
| $ time =ruby --jit -e '' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| $ ruby -v | |
| ruby 2.6.0dev (2018-02-05 trunk 62211) [x86_64-linux] | |
| $ time =ruby --disable-gems 15b.rb | |
| 313 | |
| =ruby --disable-gems 15b.rb 8.99s user 0.00s system 99% cpu 9.011 total | |
| $ time =ruby --disable-gems --jit 15b.rb | |
| 313 | |
| =ruby --disable-gems --jit 15b.rb 7.37s user 0.04s system 105% cpu 6.991 total |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| class I18nLogger | |
| include I18n::Backend::Base | |
| include I18n::Backend::Flatten | |
| def available_locales | |
| ['en'] | |
| end | |
| def lookup(locale, key, scope = [], options = {}) | |
| p [locale, key, {scope: scope, options: options}] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| require 'date' | |
| data = File.read("CHANGELOG.md") | |
| versions = [] | |
| data.scan(/## Solidus ([0-9\.]+)\.0 \(([0-9]+)-([0-9]+)-([0-9]+)\)/) do | |
| version = $1 | |
| release_date = Date.new($2.to_i, $3.to_i, $4.to_i) | |
| eol = [release_date >> 18, Date.new(2018, 05, 05)].max |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| set -e | |
| git_changed() { | |
| changes=$(git diff) | |
| [ -n "$changes" ] | |
| } | |
| find spec -name '*_spec.rb' | xargs sed -i 's/spree_\(get\|post\|put\|delete\)/\1/g' | |
| if git_changed; then | |
| git commit -am 'Use normal get/post/put/delete test helpers' || true |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| bundle exec rspec $(ag -s binding.pry spec | sed 's/^\([^:]*:[0-9]*\):.*$/\1/g') |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| SELECT DISTINCT "spree_shipping_methods".* | |
| FROM "spree_shipping_methods" | |
| INNER JOIN "spree_shipping_method_categories" | |
| ON "spree_shipping_method_categories"."shipping_method_id" = | |
| "spree_shipping_methods"."id" | |
| INNER JOIN "spree_ship ping_method_zones" | |
| ON "spree_shipping_method_zones"."shipping_method_id" = | |
| "spree_shipping_methods"."id" | |
| INNER JOIN "spree_zones" | |
| ON "spree_zones"."id" = "spree_shipping_method_zones"."zone_id" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // This #include statement was automatically added by the Particle IDE. | |
| #include "Particle-OneWire/Particle-OneWire.h" | |
| // This #include statement was automatically added by the Particle IDE. | |
| #include "particle-dallas-temperature/particle-dallas-temperature.h" | |
| // Init Dallas on pin digital pin 6 | |
| DallasTemperature dallas(new OneWire(D6)); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/usr/bin/env ruby | |
| class Example | |
| attr_reader :spec_name, :status | |
| def initialize(example_id, status, run_time, _) | |
| @example_id = example_id | |
| @status = status | |
| @run_time = run_time | |
| end | |
| end |