speculation 0.1.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (50) hide show
  1. checksums.yaml +7 -0
  2. data/.gitignore +9 -0
  3. data/.rubocop.yml +87 -0
  4. data/.travis.yml +16 -0
  5. data/.yardopts +3 -0
  6. data/Gemfile +7 -0
  7. data/LICENSE.txt +21 -0
  8. data/README.md +116 -0
  9. data/Rakefile +29 -0
  10. data/bin/bundler +17 -0
  11. data/bin/byebug +17 -0
  12. data/bin/coderay +17 -0
  13. data/bin/console +70 -0
  14. data/bin/cucumber-queue +17 -0
  15. data/bin/minitest-queue +17 -0
  16. data/bin/pry +17 -0
  17. data/bin/rake +17 -0
  18. data/bin/rspec-queue +17 -0
  19. data/bin/rubocop +17 -0
  20. data/bin/ruby-parse +17 -0
  21. data/bin/ruby-rewrite +17 -0
  22. data/bin/setup +8 -0
  23. data/bin/testunit-queue +17 -0
  24. data/bin/yard +17 -0
  25. data/bin/yardoc +17 -0
  26. data/bin/yri +17 -0
  27. data/lib/speculation/conj.rb +32 -0
  28. data/lib/speculation/error.rb +17 -0
  29. data/lib/speculation/gen.rb +106 -0
  30. data/lib/speculation/identifier.rb +47 -0
  31. data/lib/speculation/namespaced_symbols.rb +28 -0
  32. data/lib/speculation/pmap.rb +30 -0
  33. data/lib/speculation/spec_impl/and_spec.rb +39 -0
  34. data/lib/speculation/spec_impl/every_spec.rb +176 -0
  35. data/lib/speculation/spec_impl/f_spec.rb +121 -0
  36. data/lib/speculation/spec_impl/hash_spec.rb +215 -0
  37. data/lib/speculation/spec_impl/merge_spec.rb +40 -0
  38. data/lib/speculation/spec_impl/nilable_spec.rb +36 -0
  39. data/lib/speculation/spec_impl/or_spec.rb +62 -0
  40. data/lib/speculation/spec_impl/regex_spec.rb +35 -0
  41. data/lib/speculation/spec_impl/spec.rb +47 -0
  42. data/lib/speculation/spec_impl/tuple_spec.rb +67 -0
  43. data/lib/speculation/spec_impl.rb +36 -0
  44. data/lib/speculation/test.rb +553 -0
  45. data/lib/speculation/utils.rb +64 -0
  46. data/lib/speculation/utils_specs.rb +57 -0
  47. data/lib/speculation/version.rb +4 -0
  48. data/lib/speculation.rb +1308 -0
  49. data/speculation.gemspec +43 -0
  50. metadata +246 -0
checksums.yaml ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA1:
3
+ metadata.gz: b293a72669d39d6366f5c1f42a3112fdfa03e6c5
4
+ data.tar.gz: a90bc4265285e116cb93978928546a0f9f18256e
5
+ SHA512:
6
+ metadata.gz: 7c0f3352a89d81340eaf8ddd583b8d5f2dcaeb68a1da4d025f4af680a0edc5aba522cfeb997152484753ee072217efd3bb64877e297937e03af16852779f751e
7
+ data.tar.gz: d4a90effba95011da873b7aa3c03d496a59379dd7d890c0aaf5e3101a0ec2a1e8ef9840710c13e257f10ecbef7144457679b47e7a14acafd8bb92a8835f6e572
data/.gitignore ADDED
@@ -0,0 +1,9 @@
1
+ /.bundle/
2
+ /.yardoc
3
+ /Gemfile.lock
4
+ /_yardoc/
5
+ /coverage/
6
+ /doc/
7
+ /pkg/
8
+ /spec/reports/
9
+ /tmp/
data/.rubocop.yml ADDED
@@ -0,0 +1,87 @@
1
+ AllCops:
2
+ Exclude:
3
+ - 'bin/*'
4
+ - '*.*'
5
+ - 'vendor/**/*'
6
+ TargetRubyVersion: 2.4
7
+
8
+ Metrics/ClassLength:
9
+ Enabled: false
10
+
11
+ Metrics/BlockLength:
12
+ Enabled: false
13
+
14
+ Metrics/ParameterLists:
15
+ Enabled: false
16
+
17
+ Metrics/ModuleLength:
18
+ Enabled: false
19
+
20
+ Metrics/LineLength:
21
+ Enabled: false
22
+
23
+ Metrics/MethodLength:
24
+ Enabled: false
25
+
26
+ Metrics/AbcSize:
27
+ Enabled: false
28
+
29
+ Metrics/PerceivedComplexity:
30
+ Enabled: false
31
+
32
+ Metrics/CyclomaticComplexity:
33
+ Enabled: false
34
+
35
+ Metrics/BlockNesting:
36
+ Enabled: false
37
+
38
+ Style/AlignHash:
39
+ EnforcedHashRocketStyle: table
40
+
41
+ Style/HashSyntax:
42
+ EnforcedStyle: hash_rockets
43
+
44
+ Style/StringLiterals:
45
+ EnforcedStyle: double_quotes
46
+
47
+ Style/BlockDelimiters:
48
+ EnforcedStyle: semantic
49
+
50
+ Style/DotPosition:
51
+ EnforcedStyle: trailing
52
+
53
+ Style/IfUnlessModifier:
54
+ Enabled: false
55
+
56
+ Style/GuardClause:
57
+ Enabled: false
58
+
59
+ Style/MultilineMethodCallIndentation:
60
+ EnforcedStyle: indented
61
+
62
+ Style/Lambda:
63
+ EnforcedStyle: literal
64
+
65
+ Style/WordArray:
66
+ EnforcedStyle: brackets
67
+
68
+ Style/Documentation:
69
+ Enabled: false
70
+
71
+ Style/CaseEquality:
72
+ Enabled: false
73
+
74
+ Style/MultilineOperationIndentation:
75
+ EnforcedStyle: indented
76
+
77
+ Style/MultilineIfModifier:
78
+ Enabled: false
79
+
80
+ Style/AccessorMethodName:
81
+ Enabled: false
82
+
83
+ Style/NumericLiterals:
84
+ Enabled: false
85
+
86
+ Style/NumericPredicate:
87
+ Enabled: false
data/.travis.yml ADDED
@@ -0,0 +1,16 @@
1
+ sudo: false
2
+ language: ruby
3
+ cache: bundler
4
+ rvm:
5
+ - 2.2.6
6
+ - 2.3.3
7
+ - 2.4.0
8
+ - jruby-9.0.5.0
9
+ - jruby-9.1.5.0
10
+ before_install:
11
+ - gem update --system
12
+ - gem install bundler
13
+ matrix:
14
+ allow_failures:
15
+ - rvm: 2.2.6
16
+ - rvm: jruby-9.0.5.0
data/.yardopts ADDED
@@ -0,0 +1,3 @@
1
+ --no-private
2
+ lib/**/*.rb -
3
+ README.md LICENSE.txt
data/Gemfile ADDED
@@ -0,0 +1,7 @@
1
+ # frozen_string_literal: true
2
+ source "https://rubygems.org"
3
+
4
+ gem "test-queue", :github => "bboe/test-queue", :ref => "578e1ebe47b171b9d488c61ba112742e32ee0cfc"
5
+
6
+ # Specify your gem's dependencies in speculation.gemspec
7
+ gemspec
data/LICENSE.txt ADDED
@@ -0,0 +1,21 @@
1
+ The MIT License (MIT)
2
+
3
+ Copyright (c) 2016 Jamie English
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in
13
+ all copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
21
+ THE SOFTWARE.
data/README.md ADDED
@@ -0,0 +1,116 @@
1
+ # Speculation
2
+
3
+ A Ruby port of Clojure's `clojure.spec`. See [clojure.spec - Rationale and Overview](https://clojure.org/about/spec). The `Speculation` library is largely a copy-and-paste from `clojure.spec`. All credit goes to the clojure.spec authors.
4
+
5
+ ## Installation
6
+
7
+ Add this line to your application's Gemfile:
8
+
9
+ ```ruby
10
+ gem 'speculation'
11
+ ```
12
+
13
+ And then execute:
14
+
15
+ $ bundle
16
+
17
+ Or install it yourself as:
18
+
19
+ $ gem install speculation
20
+
21
+ ## Usage
22
+
23
+ The API is more-or-less the same as `clojure.spec`. If you're already familiar with `clojure.spec` then you should be write at home with `Speculation`. Clojure and Ruby and quite different languages, so naturally there are some differences:
24
+
25
+ ### Built in predicates
26
+
27
+ clojure.spec leans on its macro system and rich standard library of predicate functions when writing specs. Ruby has neither of those, so we must be creative with what we define as a 'predicate' in Speculation. Each of the following are valid Speculation predicates:
28
+
29
+ ```rb
30
+ S.valid?(->(x) { x > 0 }, 2)
31
+ S.valid?(:even?.to_proc, 2)
32
+ S.valid?(String, "foo")
33
+ S.valid?(Enumerable, [1, 2, 3])
34
+ S.valid?(/^\d+$/, "123")
35
+ S.valid?(Set[:foo, :bar, :baz], :foo)
36
+ ```
37
+
38
+ ### Namespaced keywords
39
+
40
+ Namespaced keywords are at the core of `clojure.spec`. Since spec utilises a global spec registry, namespaced keywords allow libraries to register specs with the same names but under different namespaces, thus removing accidental collisions. Ruby's equivalent to Clojure's keywords are Symbols. Ruby Symbol's don't have namespaces.
41
+
42
+ In order keep the global spec registry architecture in Speculation, we utilise refinements achieve similar behaviour:
43
+
44
+ ```rb
45
+ using Speculation::NamespacedSymbols.refine(MyModule)
46
+
47
+ p :foo.ns
48
+ # => :"MyModule/foo"
49
+
50
+ p :foo.ns(AnotherModule)
51
+ # => :"AnotherModule/foo"
52
+ ```
53
+
54
+ ### FSpecs
55
+
56
+ #### Symbols
57
+
58
+ Clojure uses Symbols to refer to functions. To refer to a method in Ruby, we must use the `method` method.
59
+
60
+ ```rb
61
+ def self.hello(name)
62
+ "Hello #{name}"
63
+ end
64
+
65
+ S.fdef(method(:hello), :args => S.cat(:name => String), :ret => String)
66
+ ```
67
+
68
+ #### Block args
69
+
70
+ In addition to regular arguments which can easily be described as a list, Ruby methods can take blocks. In Speculation, we spec a method's block separately to its args:
71
+
72
+ ```rb
73
+ def self.hello(name, &block)
74
+ "Hello #{block.call(name)}"
75
+ end
76
+
77
+ S.fdef(method(:hello), :args => S.cat(:name => String),
78
+ :block => S.fspec(:args => S.cat(:s => String), :ret => String),
79
+ :ret => String)
80
+ ```
81
+
82
+ #### Generators and quick check
83
+
84
+ Speculation uses [`Rantly`](https://github.com/abargnesi/rantly) for random data generation. Generator functions in Speculation are Procs that take one argument (Rantly instance) and return random value. While clojure's test.check generators generate values that start small and continue to grow and get more complex as a property holds true, Rantly always generates random values.
85
+
86
+ Rantly gives Speculation the ability to shrink a failing test case down to a its smallest failing case, however in Speculation we limit this to Integers and Strings. This is an area where Speculation may currently be significantly weaker than clojure.spec.
87
+
88
+ ## Development
89
+
90
+ After checking out the repo, run `bin/setup` to install dependencies. Then, run `rake` to run rubocop and the tests. You can also run `bin/console` for an interactive prompt that will allow you to experiment.
91
+
92
+ ## Contributing
93
+
94
+ Bug reports and pull requests are welcome on GitHub at https://github.com/english/speculation.
95
+
96
+ ## TODO
97
+
98
+ - tidy up tests
99
+ - write up comparison with clojure.spec
100
+ - write guide
101
+
102
+ ### clojure.spec features
103
+
104
+ - [`unform`](https://clojuredocs.org/clojure.spec/unform)
105
+ - [`form`](https://clojuredocs.org/clojure.spec/form)
106
+ - [`abbrev`](https://clojuredocs.org/clojure.spec/abbrev)
107
+ - [`describe`](https://clojuredocs.org/clojure.spec/describe)
108
+
109
+ ### Improvements
110
+
111
+ - Find/build an alternative to Rantly
112
+ - Profile and optimise
113
+
114
+ ## License
115
+
116
+ The gem is available as open source under the terms of the [MIT License](http://opensource.org/licenses/MIT).
data/Rakefile ADDED
@@ -0,0 +1,29 @@
1
+ # frozen_string_literal: true
2
+ require "bundler/gem_tasks"
3
+ require "rubocop"
4
+ require "yard"
5
+
6
+ task :rubocop do
7
+ status = RuboCop::CLI.new.run([])
8
+ raise "failed with status #{status}" unless status.zero?
9
+ end
10
+
11
+ task :test do
12
+ if RUBY_PLATFORM == "java"
13
+ $LOAD_PATH.unshift(File.expand_path("../test", __FILE__))
14
+
15
+ FileList["test/**/*.rb"].each do |test_file|
16
+ require "./#{test_file}"
17
+ end
18
+
19
+ raise unless Minitest.run
20
+ else
21
+ sh "TEST_QUEUE_SPLIT_GROUPS=1 bundle exec ruby -r minitest/autorun -I test -S minitest-queue $(find test -name *_test.rb)"
22
+ end
23
+ end
24
+
25
+ task :doc do
26
+ YARD::CLI::Yardoc.run("--no-private", "lib/**/*.rb", "-", "README.md", "LICENSE.txt")
27
+ end
28
+
29
+ task :default => [:rubocop, :test]
data/bin/bundler ADDED
@@ -0,0 +1,17 @@
1
+ #!/usr/bin/env ruby
2
+ # frozen_string_literal: true
3
+ #
4
+ # This file was generated by Bundler.
5
+ #
6
+ # The application 'bundler' is installed as part of a gem, and
7
+ # this file is here to facilitate running it.
8
+ #
9
+
10
+ require "pathname"
11
+ ENV["BUNDLE_GEMFILE"] ||= File.expand_path("../../Gemfile",
12
+ Pathname.new(__FILE__).realpath)
13
+
14
+ require "rubygems"
15
+ require "bundler/setup"
16
+
17
+ load Gem.bin_path("bundler", "bundler")
data/bin/byebug ADDED
@@ -0,0 +1,17 @@
1
+ #!/usr/bin/env ruby
2
+ # frozen_string_literal: true
3
+ #
4
+ # This file was generated by Bundler.
5
+ #
6
+ # The application 'byebug' is installed as part of a gem, and
7
+ # this file is here to facilitate running it.
8
+ #
9
+
10
+ require "pathname"
11
+ ENV["BUNDLE_GEMFILE"] ||= File.expand_path("../../Gemfile",
12
+ Pathname.new(__FILE__).realpath)
13
+
14
+ require "rubygems"
15
+ require "bundler/setup"
16
+
17
+ load Gem.bin_path("byebug", "byebug")
data/bin/coderay ADDED
@@ -0,0 +1,17 @@
1
+ #!/usr/bin/env ruby
2
+ # frozen_string_literal: true
3
+ #
4
+ # This file was generated by Bundler.
5
+ #
6
+ # The application 'coderay' is installed as part of a gem, and
7
+ # this file is here to facilitate running it.
8
+ #
9
+
10
+ require "pathname"
11
+ ENV["BUNDLE_GEMFILE"] ||= File.expand_path("../../Gemfile",
12
+ Pathname.new(__FILE__).realpath)
13
+
14
+ require "rubygems"
15
+ require "bundler/setup"
16
+
17
+ load Gem.bin_path("coderay", "coderay")
data/bin/console ADDED
@@ -0,0 +1,70 @@
1
+ #!/usr/bin/env ruby
2
+ # frozen_string_literal: true
3
+ $LOAD_PATH.unshift File.expand_path("../../test", __FILE__)
4
+
5
+ require "bundler/setup"
6
+ require 'rubocop'
7
+ require "speculation"
8
+ require "speculation/test"
9
+ require "speculation/gen"
10
+ require "speculation/utils_specs"
11
+
12
+ def reload!
13
+ Minitest::Test.reset
14
+ STest.unstrument if Object.const_defined?(:STest)
15
+
16
+ [:Speculation, :S, :STest, :Gen, :U, :H, :V].each do |const|
17
+ Object.send :remove_const, const if Object.const_defined?(const)
18
+ end
19
+
20
+ load "./lib/speculation/namespaced_symbols.rb"
21
+ load "./lib/speculation/conj.rb"
22
+ load "./lib/speculation/pmap.rb"
23
+ load "./lib/speculation/identifier.rb"
24
+ load "./lib/speculation/utils.rb"
25
+ load "./lib/speculation/error.rb"
26
+
27
+ load "./lib/speculation/spec_impl.rb"
28
+
29
+ Dir["lib/speculation/spec_impl/*.rb"].each do |f|
30
+ load f
31
+ end
32
+
33
+ load "./lib/speculation.rb"
34
+ load "./lib/speculation/gen.rb"
35
+ load "./lib/speculation/test.rb"
36
+ load "./lib/speculation/utils_specs.rb"
37
+
38
+ Dir["test/**/*.rb"].each do |f|
39
+ load f
40
+ end
41
+
42
+ Object.const_set(:S, Speculation)
43
+ Object.const_set(:STest, Speculation::Test)
44
+ Object.const_set(:Gen, Speculation::Gen)
45
+ Object.const_set(:U, Speculation::Utils)
46
+
47
+ # STest.instrument
48
+ end
49
+
50
+ def t
51
+ reload!
52
+ Minitest.run
53
+ end
54
+
55
+ def r
56
+ RuboCop::CLI.new.run(['--display-cop-names'])
57
+ end
58
+
59
+ # allow running minitest assertions
60
+ require "minitest"
61
+ include Minitest::Assertions
62
+ def self.assertions; 1; end
63
+ def self.assertions=(_x); end
64
+ using Speculation::NamespacedSymbols.refine(self)
65
+
66
+ reload!
67
+
68
+ # (If you use this, don't forget to add pry to your Gemfile!)
69
+ require "pry"
70
+ Pry.start
@@ -0,0 +1,17 @@
1
+ #!/usr/bin/env ruby
2
+ # frozen_string_literal: true
3
+ #
4
+ # This file was generated by Bundler.
5
+ #
6
+ # The application 'cucumber-queue' is installed as part of a gem, and
7
+ # this file is here to facilitate running it.
8
+ #
9
+
10
+ require "pathname"
11
+ ENV["BUNDLE_GEMFILE"] ||= File.expand_path("../../Gemfile",
12
+ Pathname.new(__FILE__).realpath)
13
+
14
+ require "rubygems"
15
+ require "bundler/setup"
16
+
17
+ load Gem.bin_path("test-queue", "cucumber-queue")
@@ -0,0 +1,17 @@
1
+ #!/usr/bin/env ruby
2
+ # frozen_string_literal: true
3
+ #
4
+ # This file was generated by Bundler.
5
+ #
6
+ # The application 'minitest-queue' is installed as part of a gem, and
7
+ # this file is here to facilitate running it.
8
+ #
9
+
10
+ require "pathname"
11
+ ENV["BUNDLE_GEMFILE"] ||= File.expand_path("../../Gemfile",
12
+ Pathname.new(__FILE__).realpath)
13
+
14
+ require "rubygems"
15
+ require "bundler/setup"
16
+
17
+ load Gem.bin_path("test-queue", "minitest-queue")
data/bin/pry ADDED
@@ -0,0 +1,17 @@
1
+ #!/usr/bin/env ruby
2
+ # frozen_string_literal: true
3
+ #
4
+ # This file was generated by Bundler.
5
+ #
6
+ # The application 'pry' is installed as part of a gem, and
7
+ # this file is here to facilitate running it.
8
+ #
9
+
10
+ require "pathname"
11
+ ENV["BUNDLE_GEMFILE"] ||= File.expand_path("../../Gemfile",
12
+ Pathname.new(__FILE__).realpath)
13
+
14
+ require "rubygems"
15
+ require "bundler/setup"
16
+
17
+ load Gem.bin_path("pry", "pry")
data/bin/rake ADDED
@@ -0,0 +1,17 @@
1
+ #!/usr/bin/env ruby
2
+ # frozen_string_literal: true
3
+ #
4
+ # This file was generated by Bundler.
5
+ #
6
+ # The application 'rake' is installed as part of a gem, and
7
+ # this file is here to facilitate running it.
8
+ #
9
+
10
+ require "pathname"
11
+ ENV["BUNDLE_GEMFILE"] ||= File.expand_path("../../Gemfile",
12
+ Pathname.new(__FILE__).realpath)
13
+
14
+ require "rubygems"
15
+ require "bundler/setup"
16
+
17
+ load Gem.bin_path("rake", "rake")
data/bin/rspec-queue ADDED
@@ -0,0 +1,17 @@
1
+ #!/usr/bin/env ruby
2
+ # frozen_string_literal: true
3
+ #
4
+ # This file was generated by Bundler.
5
+ #
6
+ # The application 'rspec-queue' is installed as part of a gem, and
7
+ # this file is here to facilitate running it.
8
+ #
9
+
10
+ require "pathname"
11
+ ENV["BUNDLE_GEMFILE"] ||= File.expand_path("../../Gemfile",
12
+ Pathname.new(__FILE__).realpath)
13
+
14
+ require "rubygems"
15
+ require "bundler/setup"
16
+
17
+ load Gem.bin_path("test-queue", "rspec-queue")
data/bin/rubocop ADDED
@@ -0,0 +1,17 @@
1
+ #!/usr/bin/env ruby
2
+ # frozen_string_literal: true
3
+ #
4
+ # This file was generated by Bundler.
5
+ #
6
+ # The application 'rubocop' is installed as part of a gem, and
7
+ # this file is here to facilitate running it.
8
+ #
9
+
10
+ require "pathname"
11
+ ENV["BUNDLE_GEMFILE"] ||= File.expand_path("../../Gemfile",
12
+ Pathname.new(__FILE__).realpath)
13
+
14
+ require "rubygems"
15
+ require "bundler/setup"
16
+
17
+ load Gem.bin_path("rubocop", "rubocop")
data/bin/ruby-parse ADDED
@@ -0,0 +1,17 @@
1
+ #!/usr/bin/env ruby
2
+ # frozen_string_literal: true
3
+ #
4
+ # This file was generated by Bundler.
5
+ #
6
+ # The application 'ruby-parse' is installed as part of a gem, and
7
+ # this file is here to facilitate running it.
8
+ #
9
+
10
+ require "pathname"
11
+ ENV["BUNDLE_GEMFILE"] ||= File.expand_path("../../Gemfile",
12
+ Pathname.new(__FILE__).realpath)
13
+
14
+ require "rubygems"
15
+ require "bundler/setup"
16
+
17
+ load Gem.bin_path("parser", "ruby-parse")
data/bin/ruby-rewrite ADDED
@@ -0,0 +1,17 @@
1
+ #!/usr/bin/env ruby
2
+ # frozen_string_literal: true
3
+ #
4
+ # This file was generated by Bundler.
5
+ #
6
+ # The application 'ruby-rewrite' is installed as part of a gem, and
7
+ # this file is here to facilitate running it.
8
+ #
9
+
10
+ require "pathname"
11
+ ENV["BUNDLE_GEMFILE"] ||= File.expand_path("../../Gemfile",
12
+ Pathname.new(__FILE__).realpath)
13
+
14
+ require "rubygems"
15
+ require "bundler/setup"
16
+
17
+ load Gem.bin_path("parser", "ruby-rewrite")
data/bin/setup ADDED
@@ -0,0 +1,8 @@
1
+ #!/usr/bin/env bash
2
+ set -euo pipefail
3
+ IFS=$'\n\t'
4
+ set -vx
5
+
6
+ bundle install
7
+
8
+ # Do any other automated setup that you need to do here
@@ -0,0 +1,17 @@
1
+ #!/usr/bin/env ruby
2
+ # frozen_string_literal: true
3
+ #
4
+ # This file was generated by Bundler.
5
+ #
6
+ # The application 'testunit-queue' is installed as part of a gem, and
7
+ # this file is here to facilitate running it.
8
+ #
9
+
10
+ require "pathname"
11
+ ENV["BUNDLE_GEMFILE"] ||= File.expand_path("../../Gemfile",
12
+ Pathname.new(__FILE__).realpath)
13
+
14
+ require "rubygems"
15
+ require "bundler/setup"
16
+
17
+ load Gem.bin_path("test-queue", "testunit-queue")
data/bin/yard ADDED
@@ -0,0 +1,17 @@
1
+ #!/usr/bin/env ruby
2
+ # frozen_string_literal: true
3
+ #
4
+ # This file was generated by Bundler.
5
+ #
6
+ # The application 'yard' is installed as part of a gem, and
7
+ # this file is here to facilitate running it.
8
+ #
9
+
10
+ require "pathname"
11
+ ENV["BUNDLE_GEMFILE"] ||= File.expand_path("../../Gemfile",
12
+ Pathname.new(__FILE__).realpath)
13
+
14
+ require "rubygems"
15
+ require "bundler/setup"
16
+
17
+ load Gem.bin_path("yard", "yard")
data/bin/yardoc ADDED
@@ -0,0 +1,17 @@
1
+ #!/usr/bin/env ruby
2
+ # frozen_string_literal: true
3
+ #
4
+ # This file was generated by Bundler.
5
+ #
6
+ # The application 'yardoc' is installed as part of a gem, and
7
+ # this file is here to facilitate running it.
8
+ #
9
+
10
+ require "pathname"
11
+ ENV["BUNDLE_GEMFILE"] ||= File.expand_path("../../Gemfile",
12
+ Pathname.new(__FILE__).realpath)
13
+
14
+ require "rubygems"
15
+ require "bundler/setup"
16
+
17
+ load Gem.bin_path("yard", "yardoc")
data/bin/yri ADDED
@@ -0,0 +1,17 @@
1
+ #!/usr/bin/env ruby
2
+ # frozen_string_literal: true
3
+ #
4
+ # This file was generated by Bundler.
5
+ #
6
+ # The application 'yri' is installed as part of a gem, and
7
+ # this file is here to facilitate running it.
8
+ #
9
+
10
+ require "pathname"
11
+ ENV["BUNDLE_GEMFILE"] ||= File.expand_path("../../Gemfile",
12
+ Pathname.new(__FILE__).realpath)
13
+
14
+ require "rubygems"
15
+ require "bundler/setup"
16
+
17
+ load Gem.bin_path("yard", "yri")