lolxin 0.12.1 → 0.13.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 +5 -5
- data/.gitignore +1 -0
- data/LICENSE.txt +1 -1
- data/README.md +34 -3
- data/Rakefile +1 -1
- data/bin/bundle +105 -0
- data/bin/byebug +29 -0
- data/bin/cc-tddium-post-worker +12 -0
- data/bin/codeclimate-test-reporter +12 -0
- data/bin/coderay +12 -0
- data/bin/console +1 -1
- data/bin/dotenv +12 -0
- data/bin/htmldiff +12 -0
- data/bin/ldiff +12 -0
- data/bin/pry +12 -0
- data/bin/rake +12 -0
- data/bin/rspec +12 -0
- data/lib/lolxin.rb +29 -18
- data/lib/lolxin/api/champion.rb +24 -0
- data/lib/lolxin/api/champion_mastery.rb +38 -0
- data/lib/lolxin/api/league.rb +39 -0
- data/lib/lolxin/api/lol_static_data.rb +116 -0
- data/lib/lolxin/api/lol_status.rb +7 -0
- data/lib/lolxin/api/match.rb +41 -0
- data/lib/lolxin/api/spectator.rb +180 -0
- data/lib/lolxin/api/summoner.rb +25 -0
- data/lib/lolxin/api/third_party_code.rb +15 -0
- data/lib/lolxin/client.rb +26 -78
- data/lib/lolxin/dto/champion_dto.rb +29 -0
- data/lib/lolxin/dto/champion_mastery_dto.rb +33 -0
- data/lib/lolxin/dto/dto.rb +10 -0
- data/lib/lolxin/dto/game_info_dto.rb +31 -0
- data/lib/lolxin/dto/league_item_dto.rb +38 -0
- data/lib/lolxin/dto/league_list_dto.rb +27 -0
- data/lib/lolxin/dto/league_position_dto.rb +45 -0
- data/lib/lolxin/dto/mini_series_dto.rb +27 -0
- data/lib/lolxin/helpers/api.rb +20 -0
- data/lib/lolxin/helpers/api_version.rb +15 -0
- data/lib/lolxin/helpers/region.rb +21 -0
- data/lib/lolxin/helpers/version.rb +3 -0
- data/lolxin.gemspec +5 -2
- metadata +72 -22
- data/lib/lolxin/api_version.rb +0 -16
- data/lib/lolxin/champion.rb +0 -25
- data/lib/lolxin/champion_mastery.rb +0 -69
- data/lib/lolxin/current_game.rb +0 -44
- data/lib/lolxin/featured_games.rb +0 -23
- data/lib/lolxin/game.rb +0 -25
- data/lib/lolxin/league.rb +0 -58
- data/lib/lolxin/lol_static_data.rb +0 -41
- data/lib/lolxin/lol_status.rb +0 -21
- data/lib/lolxin/match.rb +0 -25
- data/lib/lolxin/match_list.rb +0 -40
- data/lib/lolxin/region.rb +0 -22
- data/lib/lolxin/stats.rb +0 -30
- data/lib/lolxin/summoner.rb +0 -55
- data/lib/lolxin/version.rb +0 -3
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
|
-
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
2
|
+
SHA256:
|
|
3
|
+
metadata.gz: acb0f973de32a14351952c5120383a3d3f34e85382d8d9060e4995fa73874884
|
|
4
|
+
data.tar.gz: 70f7cbc80e2f0dce05302c71f1e14357d089c1899bb56ee967e29d613655eb6d
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 69d73cdee75655713b85de68eaf471da855de5dbc59183c29c005b80c99f8f01c559d4fee4ee1591f57c228036ff71c04909ae4c9768921c2ef63855d633f24d
|
|
7
|
+
data.tar.gz: a42628ce55221b78a7df87436e0eb2b324566d450036e4ebb26076d953617d021b41b1a8334d313d4d09094e2997b6670a7d0b39a237d716b88544fe1eeb69ad
|
data/.gitignore
CHANGED
data/LICENSE.txt
CHANGED
data/README.md
CHANGED
|
@@ -6,7 +6,23 @@
|
|
|
6
6
|
|
|
7
7
|
# Lolxin
|
|
8
8
|
|
|
9
|
-
The not-so-smooth API wrapper for League of Legends.
|
|
9
|
+
The not-so-smooth API wrapper for League of Legends. Pronounced lo-shin like
|
|
10
|
+
lotion! Too clever I know.
|
|
11
|
+
|
|
12
|
+
## Supported endpoints
|
|
13
|
+
| Endpoint | Version |
|
|
14
|
+
| ----------------- | ------- |
|
|
15
|
+
| CHAMPION-MASTERY | 3 |
|
|
16
|
+
| CHAMPION | 3 |
|
|
17
|
+
| LEAGUE | 3 |
|
|
18
|
+
| LOL-STATIC-DATA | 3 |
|
|
19
|
+
| LOL-STATUS | 3 |
|
|
20
|
+
| MATCH | 3 |
|
|
21
|
+
| SPECTATOR | 3 |
|
|
22
|
+
| SUMMONER | 3 |
|
|
23
|
+
| THIRD-PARTY-CODE | ? |
|
|
24
|
+
| TOURNAMENT-STUB | N/A |
|
|
25
|
+
| TOURNAMENT | N/A |
|
|
10
26
|
|
|
11
27
|
## Installation
|
|
12
28
|
|
|
@@ -26,7 +42,14 @@ Or install it yourself as:
|
|
|
26
42
|
|
|
27
43
|
## Usage
|
|
28
44
|
|
|
29
|
-
|
|
45
|
+
Refer to the source code for methods to hit the RIOT API. For the most part just set up your
|
|
46
|
+
environment variable API_KEY that you get from the RIOT developer [console](https://developer.riotgames.com/)
|
|
47
|
+
|
|
48
|
+
Quick example usage...
|
|
49
|
+
```
|
|
50
|
+
client = Client.new(ENV['API_KEY'], region: :na1)
|
|
51
|
+
client.lol_static_data.champions
|
|
52
|
+
```
|
|
30
53
|
|
|
31
54
|
## Development
|
|
32
55
|
|
|
@@ -48,6 +71,15 @@ run `bundle exec rake release`, which will create a git tag for the version,
|
|
|
48
71
|
push git commits and tags, and push the `.gem` file to
|
|
49
72
|
[rubygems.org](https://rubygems.org).
|
|
50
73
|
|
|
74
|
+
## Testing
|
|
75
|
+
Change up the regions per spec file so that you don't run into rate limiting issues often.
|
|
76
|
+
|
|
77
|
+
## TODO
|
|
78
|
+
- Add the remaining DTOs
|
|
79
|
+
- Parse API responses with DTOs
|
|
80
|
+
- TOURNAMENT/TOURNAMENT-STUB endpoints
|
|
81
|
+
- VCR record http responses?
|
|
82
|
+
|
|
51
83
|
## Contributing
|
|
52
84
|
|
|
53
85
|
Bug reports and pull requests are welcome on GitHub at
|
|
@@ -55,7 +87,6 @@ https://github.com/jonwho/lolxin. This project is intended to be a safe,
|
|
|
55
87
|
welcoming space for collaboration, and contributors are expected to adhere
|
|
56
88
|
to the [Contributor Covenant](contributor-covenant.org) code of conduct.
|
|
57
89
|
|
|
58
|
-
|
|
59
90
|
## License
|
|
60
91
|
|
|
61
92
|
The gem is available as open source under the terms of the
|
data/Rakefile
CHANGED
data/bin/bundle
ADDED
|
@@ -0,0 +1,105 @@
|
|
|
1
|
+
#!/usr/bin/env ruby
|
|
2
|
+
# frozen_string_literal: true
|
|
3
|
+
|
|
4
|
+
#
|
|
5
|
+
# This file was generated by Bundler.
|
|
6
|
+
#
|
|
7
|
+
# The application 'bundle' is installed as part of a gem, and
|
|
8
|
+
# this file is here to facilitate running it.
|
|
9
|
+
#
|
|
10
|
+
|
|
11
|
+
require "rubygems"
|
|
12
|
+
|
|
13
|
+
m = Module.new do
|
|
14
|
+
module_function
|
|
15
|
+
|
|
16
|
+
def invoked_as_script?
|
|
17
|
+
File.expand_path($0) == File.expand_path(__FILE__)
|
|
18
|
+
end
|
|
19
|
+
|
|
20
|
+
def env_var_version
|
|
21
|
+
ENV["BUNDLER_VERSION"]
|
|
22
|
+
end
|
|
23
|
+
|
|
24
|
+
def cli_arg_version
|
|
25
|
+
return unless invoked_as_script? # don't want to hijack other binstubs
|
|
26
|
+
return unless "update".start_with?(ARGV.first || " ") # must be running `bundle update`
|
|
27
|
+
bundler_version = nil
|
|
28
|
+
update_index = nil
|
|
29
|
+
ARGV.each_with_index do |a, i|
|
|
30
|
+
if update_index && update_index.succ == i && a =~ Gem::Version::ANCHORED_VERSION_PATTERN
|
|
31
|
+
bundler_version = a
|
|
32
|
+
end
|
|
33
|
+
next unless a =~ /\A--bundler(?:[= ](#{Gem::Version::VERSION_PATTERN}))?\z/
|
|
34
|
+
bundler_version = $1 || ">= 0.a"
|
|
35
|
+
update_index = i
|
|
36
|
+
end
|
|
37
|
+
bundler_version
|
|
38
|
+
end
|
|
39
|
+
|
|
40
|
+
def gemfile
|
|
41
|
+
gemfile = ENV["BUNDLE_GEMFILE"]
|
|
42
|
+
return gemfile if gemfile && !gemfile.empty?
|
|
43
|
+
|
|
44
|
+
File.expand_path("../../Gemfile", __FILE__)
|
|
45
|
+
end
|
|
46
|
+
|
|
47
|
+
def lockfile
|
|
48
|
+
lockfile =
|
|
49
|
+
case File.basename(gemfile)
|
|
50
|
+
when "gems.rb" then gemfile.sub(/\.rb$/, gemfile)
|
|
51
|
+
else "#{gemfile}.lock"
|
|
52
|
+
end
|
|
53
|
+
File.expand_path(lockfile)
|
|
54
|
+
end
|
|
55
|
+
|
|
56
|
+
def lockfile_version
|
|
57
|
+
return unless File.file?(lockfile)
|
|
58
|
+
lockfile_contents = File.read(lockfile)
|
|
59
|
+
return unless lockfile_contents =~ /\n\nBUNDLED WITH\n\s{2,}(#{Gem::Version::VERSION_PATTERN})\n/
|
|
60
|
+
Regexp.last_match(1)
|
|
61
|
+
end
|
|
62
|
+
|
|
63
|
+
def bundler_version
|
|
64
|
+
@bundler_version ||= begin
|
|
65
|
+
env_var_version || cli_arg_version ||
|
|
66
|
+
lockfile_version || "#{Gem::Requirement.default}.a"
|
|
67
|
+
end
|
|
68
|
+
end
|
|
69
|
+
|
|
70
|
+
def load_bundler!
|
|
71
|
+
ENV["BUNDLE_GEMFILE"] ||= gemfile
|
|
72
|
+
|
|
73
|
+
# must dup string for RG < 1.8 compatibility
|
|
74
|
+
activate_bundler(bundler_version.dup)
|
|
75
|
+
end
|
|
76
|
+
|
|
77
|
+
def activate_bundler(bundler_version)
|
|
78
|
+
if Gem::Version.correct?(bundler_version) && Gem::Version.new(bundler_version).release < Gem::Version.new("2.0")
|
|
79
|
+
bundler_version = "< 2"
|
|
80
|
+
end
|
|
81
|
+
gem_error = activation_error_handling do
|
|
82
|
+
gem "bundler", bundler_version
|
|
83
|
+
end
|
|
84
|
+
return if gem_error.nil?
|
|
85
|
+
require_error = activation_error_handling do
|
|
86
|
+
require "bundler/version"
|
|
87
|
+
end
|
|
88
|
+
return if require_error.nil? && Gem::Requirement.new(bundler_version).satisfied_by?(Gem::Version.new(Bundler::VERSION))
|
|
89
|
+
warn "Activating bundler (#{bundler_version}) failed:\n#{gem_error.message}\n\nTo install the version of bundler this project requires, run `gem install bundler -v '#{bundler_version}'`"
|
|
90
|
+
exit 42
|
|
91
|
+
end
|
|
92
|
+
|
|
93
|
+
def activation_error_handling
|
|
94
|
+
yield
|
|
95
|
+
nil
|
|
96
|
+
rescue StandardError, LoadError => e
|
|
97
|
+
e
|
|
98
|
+
end
|
|
99
|
+
end
|
|
100
|
+
|
|
101
|
+
m.load_bundler!
|
|
102
|
+
|
|
103
|
+
if m.invoked_as_script?
|
|
104
|
+
load Gem.bin_path("bundler", "bundle")
|
|
105
|
+
end
|
data/bin/byebug
ADDED
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
#!/usr/bin/env ruby
|
|
2
|
+
# frozen_string_literal: true
|
|
3
|
+
|
|
4
|
+
#
|
|
5
|
+
# This file was generated by Bundler.
|
|
6
|
+
#
|
|
7
|
+
# The application 'byebug' is installed as part of a gem, and
|
|
8
|
+
# this file is here to facilitate running it.
|
|
9
|
+
#
|
|
10
|
+
|
|
11
|
+
require "pathname"
|
|
12
|
+
ENV["BUNDLE_GEMFILE"] ||= File.expand_path("../../Gemfile",
|
|
13
|
+
Pathname.new(__FILE__).realpath)
|
|
14
|
+
|
|
15
|
+
bundle_binstub = File.expand_path("../bundle", __FILE__)
|
|
16
|
+
|
|
17
|
+
if File.file?(bundle_binstub)
|
|
18
|
+
if File.read(bundle_binstub, 150) =~ /This file was generated by Bundler/
|
|
19
|
+
load(bundle_binstub)
|
|
20
|
+
else
|
|
21
|
+
abort("Your `bin/bundle` was not generated by Bundler, so this binstub cannot run.
|
|
22
|
+
Replace `bin/bundle` by running `bundle binstubs bundler --force`, then run this command again.")
|
|
23
|
+
end
|
|
24
|
+
end
|
|
25
|
+
|
|
26
|
+
require "rubygems"
|
|
27
|
+
require "bundler/setup"
|
|
28
|
+
|
|
29
|
+
load Gem.bin_path("byebug", "byebug")
|
data/bin/cc-tddium-post-worker
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
#!/usr/bin/env ruby
|
|
2
2
|
# frozen_string_literal: true
|
|
3
|
+
|
|
3
4
|
#
|
|
4
5
|
# This file was generated by Bundler.
|
|
5
6
|
#
|
|
@@ -11,6 +12,17 @@ require "pathname"
|
|
|
11
12
|
ENV["BUNDLE_GEMFILE"] ||= File.expand_path("../../Gemfile",
|
|
12
13
|
Pathname.new(__FILE__).realpath)
|
|
13
14
|
|
|
15
|
+
bundle_binstub = File.expand_path("../bundle", __FILE__)
|
|
16
|
+
|
|
17
|
+
if File.file?(bundle_binstub)
|
|
18
|
+
if File.read(bundle_binstub, 150) =~ /This file was generated by Bundler/
|
|
19
|
+
load(bundle_binstub)
|
|
20
|
+
else
|
|
21
|
+
abort("Your `bin/bundle` was not generated by Bundler, so this binstub cannot run.
|
|
22
|
+
Replace `bin/bundle` by running `bundle binstubs bundler --force`, then run this command again.")
|
|
23
|
+
end
|
|
24
|
+
end
|
|
25
|
+
|
|
14
26
|
require "rubygems"
|
|
15
27
|
require "bundler/setup"
|
|
16
28
|
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
#!/usr/bin/env ruby
|
|
2
2
|
# frozen_string_literal: true
|
|
3
|
+
|
|
3
4
|
#
|
|
4
5
|
# This file was generated by Bundler.
|
|
5
6
|
#
|
|
@@ -11,6 +12,17 @@ require "pathname"
|
|
|
11
12
|
ENV["BUNDLE_GEMFILE"] ||= File.expand_path("../../Gemfile",
|
|
12
13
|
Pathname.new(__FILE__).realpath)
|
|
13
14
|
|
|
15
|
+
bundle_binstub = File.expand_path("../bundle", __FILE__)
|
|
16
|
+
|
|
17
|
+
if File.file?(bundle_binstub)
|
|
18
|
+
if File.read(bundle_binstub, 150) =~ /This file was generated by Bundler/
|
|
19
|
+
load(bundle_binstub)
|
|
20
|
+
else
|
|
21
|
+
abort("Your `bin/bundle` was not generated by Bundler, so this binstub cannot run.
|
|
22
|
+
Replace `bin/bundle` by running `bundle binstubs bundler --force`, then run this command again.")
|
|
23
|
+
end
|
|
24
|
+
end
|
|
25
|
+
|
|
14
26
|
require "rubygems"
|
|
15
27
|
require "bundler/setup"
|
|
16
28
|
|
data/bin/coderay
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
#!/usr/bin/env ruby
|
|
2
2
|
# frozen_string_literal: true
|
|
3
|
+
|
|
3
4
|
#
|
|
4
5
|
# This file was generated by Bundler.
|
|
5
6
|
#
|
|
@@ -11,6 +12,17 @@ require "pathname"
|
|
|
11
12
|
ENV["BUNDLE_GEMFILE"] ||= File.expand_path("../../Gemfile",
|
|
12
13
|
Pathname.new(__FILE__).realpath)
|
|
13
14
|
|
|
15
|
+
bundle_binstub = File.expand_path("../bundle", __FILE__)
|
|
16
|
+
|
|
17
|
+
if File.file?(bundle_binstub)
|
|
18
|
+
if File.read(bundle_binstub, 150) =~ /This file was generated by Bundler/
|
|
19
|
+
load(bundle_binstub)
|
|
20
|
+
else
|
|
21
|
+
abort("Your `bin/bundle` was not generated by Bundler, so this binstub cannot run.
|
|
22
|
+
Replace `bin/bundle` by running `bundle binstubs bundler --force`, then run this command again.")
|
|
23
|
+
end
|
|
24
|
+
end
|
|
25
|
+
|
|
14
26
|
require "rubygems"
|
|
15
27
|
require "bundler/setup"
|
|
16
28
|
|
data/bin/console
CHANGED
data/bin/dotenv
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
#!/usr/bin/env ruby
|
|
2
2
|
# frozen_string_literal: true
|
|
3
|
+
|
|
3
4
|
#
|
|
4
5
|
# This file was generated by Bundler.
|
|
5
6
|
#
|
|
@@ -11,6 +12,17 @@ require "pathname"
|
|
|
11
12
|
ENV["BUNDLE_GEMFILE"] ||= File.expand_path("../../Gemfile",
|
|
12
13
|
Pathname.new(__FILE__).realpath)
|
|
13
14
|
|
|
15
|
+
bundle_binstub = File.expand_path("../bundle", __FILE__)
|
|
16
|
+
|
|
17
|
+
if File.file?(bundle_binstub)
|
|
18
|
+
if File.read(bundle_binstub, 150) =~ /This file was generated by Bundler/
|
|
19
|
+
load(bundle_binstub)
|
|
20
|
+
else
|
|
21
|
+
abort("Your `bin/bundle` was not generated by Bundler, so this binstub cannot run.
|
|
22
|
+
Replace `bin/bundle` by running `bundle binstubs bundler --force`, then run this command again.")
|
|
23
|
+
end
|
|
24
|
+
end
|
|
25
|
+
|
|
14
26
|
require "rubygems"
|
|
15
27
|
require "bundler/setup"
|
|
16
28
|
|
data/bin/htmldiff
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
#!/usr/bin/env ruby
|
|
2
2
|
# frozen_string_literal: true
|
|
3
|
+
|
|
3
4
|
#
|
|
4
5
|
# This file was generated by Bundler.
|
|
5
6
|
#
|
|
@@ -11,6 +12,17 @@ require "pathname"
|
|
|
11
12
|
ENV["BUNDLE_GEMFILE"] ||= File.expand_path("../../Gemfile",
|
|
12
13
|
Pathname.new(__FILE__).realpath)
|
|
13
14
|
|
|
15
|
+
bundle_binstub = File.expand_path("../bundle", __FILE__)
|
|
16
|
+
|
|
17
|
+
if File.file?(bundle_binstub)
|
|
18
|
+
if File.read(bundle_binstub, 150) =~ /This file was generated by Bundler/
|
|
19
|
+
load(bundle_binstub)
|
|
20
|
+
else
|
|
21
|
+
abort("Your `bin/bundle` was not generated by Bundler, so this binstub cannot run.
|
|
22
|
+
Replace `bin/bundle` by running `bundle binstubs bundler --force`, then run this command again.")
|
|
23
|
+
end
|
|
24
|
+
end
|
|
25
|
+
|
|
14
26
|
require "rubygems"
|
|
15
27
|
require "bundler/setup"
|
|
16
28
|
|
data/bin/ldiff
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
#!/usr/bin/env ruby
|
|
2
2
|
# frozen_string_literal: true
|
|
3
|
+
|
|
3
4
|
#
|
|
4
5
|
# This file was generated by Bundler.
|
|
5
6
|
#
|
|
@@ -11,6 +12,17 @@ require "pathname"
|
|
|
11
12
|
ENV["BUNDLE_GEMFILE"] ||= File.expand_path("../../Gemfile",
|
|
12
13
|
Pathname.new(__FILE__).realpath)
|
|
13
14
|
|
|
15
|
+
bundle_binstub = File.expand_path("../bundle", __FILE__)
|
|
16
|
+
|
|
17
|
+
if File.file?(bundle_binstub)
|
|
18
|
+
if File.read(bundle_binstub, 150) =~ /This file was generated by Bundler/
|
|
19
|
+
load(bundle_binstub)
|
|
20
|
+
else
|
|
21
|
+
abort("Your `bin/bundle` was not generated by Bundler, so this binstub cannot run.
|
|
22
|
+
Replace `bin/bundle` by running `bundle binstubs bundler --force`, then run this command again.")
|
|
23
|
+
end
|
|
24
|
+
end
|
|
25
|
+
|
|
14
26
|
require "rubygems"
|
|
15
27
|
require "bundler/setup"
|
|
16
28
|
|
data/bin/pry
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
#!/usr/bin/env ruby
|
|
2
2
|
# frozen_string_literal: true
|
|
3
|
+
|
|
3
4
|
#
|
|
4
5
|
# This file was generated by Bundler.
|
|
5
6
|
#
|
|
@@ -11,6 +12,17 @@ require "pathname"
|
|
|
11
12
|
ENV["BUNDLE_GEMFILE"] ||= File.expand_path("../../Gemfile",
|
|
12
13
|
Pathname.new(__FILE__).realpath)
|
|
13
14
|
|
|
15
|
+
bundle_binstub = File.expand_path("../bundle", __FILE__)
|
|
16
|
+
|
|
17
|
+
if File.file?(bundle_binstub)
|
|
18
|
+
if File.read(bundle_binstub, 150) =~ /This file was generated by Bundler/
|
|
19
|
+
load(bundle_binstub)
|
|
20
|
+
else
|
|
21
|
+
abort("Your `bin/bundle` was not generated by Bundler, so this binstub cannot run.
|
|
22
|
+
Replace `bin/bundle` by running `bundle binstubs bundler --force`, then run this command again.")
|
|
23
|
+
end
|
|
24
|
+
end
|
|
25
|
+
|
|
14
26
|
require "rubygems"
|
|
15
27
|
require "bundler/setup"
|
|
16
28
|
|
data/bin/rake
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
#!/usr/bin/env ruby
|
|
2
2
|
# frozen_string_literal: true
|
|
3
|
+
|
|
3
4
|
#
|
|
4
5
|
# This file was generated by Bundler.
|
|
5
6
|
#
|
|
@@ -11,6 +12,17 @@ require "pathname"
|
|
|
11
12
|
ENV["BUNDLE_GEMFILE"] ||= File.expand_path("../../Gemfile",
|
|
12
13
|
Pathname.new(__FILE__).realpath)
|
|
13
14
|
|
|
15
|
+
bundle_binstub = File.expand_path("../bundle", __FILE__)
|
|
16
|
+
|
|
17
|
+
if File.file?(bundle_binstub)
|
|
18
|
+
if File.read(bundle_binstub, 150) =~ /This file was generated by Bundler/
|
|
19
|
+
load(bundle_binstub)
|
|
20
|
+
else
|
|
21
|
+
abort("Your `bin/bundle` was not generated by Bundler, so this binstub cannot run.
|
|
22
|
+
Replace `bin/bundle` by running `bundle binstubs bundler --force`, then run this command again.")
|
|
23
|
+
end
|
|
24
|
+
end
|
|
25
|
+
|
|
14
26
|
require "rubygems"
|
|
15
27
|
require "bundler/setup"
|
|
16
28
|
|
data/bin/rspec
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
#!/usr/bin/env ruby
|
|
2
2
|
# frozen_string_literal: true
|
|
3
|
+
|
|
3
4
|
#
|
|
4
5
|
# This file was generated by Bundler.
|
|
5
6
|
#
|
|
@@ -11,6 +12,17 @@ require "pathname"
|
|
|
11
12
|
ENV["BUNDLE_GEMFILE"] ||= File.expand_path("../../Gemfile",
|
|
12
13
|
Pathname.new(__FILE__).realpath)
|
|
13
14
|
|
|
15
|
+
bundle_binstub = File.expand_path("../bundle", __FILE__)
|
|
16
|
+
|
|
17
|
+
if File.file?(bundle_binstub)
|
|
18
|
+
if File.read(bundle_binstub, 150) =~ /This file was generated by Bundler/
|
|
19
|
+
load(bundle_binstub)
|
|
20
|
+
else
|
|
21
|
+
abort("Your `bin/bundle` was not generated by Bundler, so this binstub cannot run.
|
|
22
|
+
Replace `bin/bundle` by running `bundle binstubs bundler --force`, then run this command again.")
|
|
23
|
+
end
|
|
24
|
+
end
|
|
25
|
+
|
|
14
26
|
require "rubygems"
|
|
15
27
|
require "bundler/setup"
|
|
16
28
|
|