buff-ruby_engine 0.1.0 → 1.0.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/.travis.yml +12 -6
- data/CONTRIBUTING.md +13 -5
- data/LICENSE +1 -1
- data/README.md +29 -19
- data/Thorfile +3 -3
- data/buff-ruby_engine.gemspec +4 -4
- data/lib/buff/ruby_engine/version.rb +1 -1
- data/spec/buff/ruby_engine_spec.rb +6 -6
- data/spec/spec_helper.rb +0 -1
- metadata +33 -57
- data/.ruby-version +0 -1
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA1:
|
3
|
+
metadata.gz: 0396297f42c63e02dd94f22b19178ddef0497616
|
4
|
+
data.tar.gz: 504daee14d96b72000c4906d99789f1485654e11
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: b1f0e51db0cb582e9766a1777a02499233593751373003d4aca4cbad021ca571bb2e4dc184ae5c857c454bc3c731901ad7af3552b32177d51a4da1e78019b15e
|
7
|
+
data.tar.gz: 59097d9a9d5473ef87cb32127c150809e8a45176a8679b8d8ae806fff942cda92e597e1f89229d16c214fcbefef767935abd5df7149854ddc61c8628469e2a28
|
data/.travis.yml
CHANGED
@@ -1,7 +1,13 @@
|
|
1
|
-
|
1
|
+
sudo: false
|
2
2
|
language: ruby
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
3
|
+
cache: bundler
|
4
|
+
|
5
|
+
matrix:
|
6
|
+
include:
|
7
|
+
- rvm: 2.2.5
|
8
|
+
- rvm: 2.3.1
|
9
|
+
- rvm: ruby-head
|
10
|
+
allow_failures:
|
11
|
+
- rvm: ruby-head
|
12
|
+
|
13
|
+
script: bundle exec thor spec
|
data/CONTRIBUTING.md
CHANGED
@@ -6,19 +6,27 @@
|
|
6
6
|
|
7
7
|
Install the latest version of [Bundler](http://gembundler.com)
|
8
8
|
|
9
|
-
|
9
|
+
```
|
10
|
+
$ gem install bundler
|
11
|
+
```
|
10
12
|
|
11
13
|
Clone the project
|
12
14
|
|
13
|
-
|
15
|
+
```
|
16
|
+
$ git clone git://github.com/berkshelf/buff-ruby_engine.git
|
17
|
+
```
|
14
18
|
|
15
19
|
and run:
|
16
20
|
|
17
|
-
|
18
|
-
|
21
|
+
```
|
22
|
+
$ cd buff-ruby_engine
|
23
|
+
$ bundle install
|
24
|
+
```
|
19
25
|
|
20
26
|
Bundler will install all gems and their dependencies required for testing and developing.
|
21
27
|
|
22
28
|
### Running unit (RSpec) tests
|
23
29
|
|
24
|
-
|
30
|
+
```
|
31
|
+
$ bundle exec guard start
|
32
|
+
```
|
data/LICENSE
CHANGED
data/README.md
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
# Buff::RubyEngine
|
2
|
-
|
3
|
-
[![Build Status](https://travis-ci.org/
|
2
|
+
|
3
|
+
[![Gem Version](https://badge.fury.io/rb/buff-ruby_engine.svg)](http://badge.fury.io/rb/buff-ruby_engine) [![Build Status](https://travis-ci.org/berkshelf/buff-ruby_engine.svg?branch=master)](https://travis-ci.org/berkshelf/buff-ruby_engine)
|
4
4
|
|
5
5
|
A mixin for querying the platform running Ruby
|
6
6
|
|
@@ -8,41 +8,51 @@ A mixin for querying the platform running Ruby
|
|
8
8
|
|
9
9
|
Add this line to your application's Gemfile:
|
10
10
|
|
11
|
-
|
11
|
+
```ruby
|
12
|
+
gem 'buff-ruby_engine'
|
13
|
+
```
|
12
14
|
|
13
15
|
And then execute:
|
14
16
|
|
15
|
-
|
17
|
+
```
|
18
|
+
$ bundle
|
19
|
+
```
|
16
20
|
|
17
21
|
Or install it yourself as:
|
18
22
|
|
19
|
-
|
23
|
+
```
|
24
|
+
$ gem install buff-ruby_engine
|
25
|
+
```
|
20
26
|
|
21
27
|
## Usage
|
22
28
|
|
23
29
|
Using it as a mixin
|
24
30
|
|
25
|
-
|
31
|
+
```ruby
|
32
|
+
require 'buff/ruby_engine'
|
26
33
|
|
27
|
-
|
28
|
-
|
29
|
-
|
34
|
+
class PowerUp
|
35
|
+
include Buff::RubyEngine
|
36
|
+
end
|
30
37
|
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
38
|
+
power_up = PowerUp.new
|
39
|
+
power_up.mri? #=> true
|
40
|
+
power_up.jruby? #=> false
|
41
|
+
power_up.rubinius? #=> false
|
42
|
+
```
|
35
43
|
|
36
44
|
Using it as a module
|
37
45
|
|
38
|
-
|
46
|
+
```ruby
|
47
|
+
require 'buff/ruby_engine'
|
39
48
|
|
40
|
-
|
41
|
-
|
42
|
-
|
49
|
+
Buff::RubyEngine.mri? #=> true
|
50
|
+
Buff::RubyEngine.jruby? #=> false
|
51
|
+
Buff::RubyEngine.rubinius? #=> false
|
52
|
+
```
|
43
53
|
|
44
54
|
# Authors and Contributors
|
45
55
|
|
46
|
-
|
56
|
+
- Jamie Winsor ([jamie@vialstudios.com](mailto:jamie@vialstudios.com))
|
47
57
|
|
48
|
-
Thank you to all of our [Contributors](https://github.com/
|
58
|
+
Thank you to all of our [Contributors](https://github.com/berkshelf/buff-ruby_engine/graphs/contributors), testers, and users.
|
data/Thorfile
CHANGED
@@ -16,17 +16,17 @@ class Default < Thor
|
|
16
16
|
|
17
17
|
desc "build", "Build buff-ruby_engine-#{Buff::RubyEngine::VERSION}.gem into the pkg directory"
|
18
18
|
def build
|
19
|
-
Rake::Task["build"].
|
19
|
+
Rake::Task["build"].invoke
|
20
20
|
end
|
21
21
|
|
22
22
|
desc "install", "Build and install buff-ruby_engine-#{Buff::RubyEngine::VERSION}.gem into system gems"
|
23
23
|
def install
|
24
|
-
Rake::Task["install"].
|
24
|
+
Rake::Task["install"].invoke
|
25
25
|
end
|
26
26
|
|
27
27
|
desc "release", "Create tag v#{Buff::RubyEngine::VERSION} and build and push buff-ruby_engine-#{Buff::RubyEngine::VERSION}.gem to Rubygems"
|
28
28
|
def release
|
29
|
-
Rake::Task["release"].
|
29
|
+
Rake::Task["release"].invoke
|
30
30
|
end
|
31
31
|
end
|
32
32
|
|
data/buff-ruby_engine.gemspec
CHANGED
@@ -7,7 +7,7 @@ Gem::Specification.new do |spec|
|
|
7
7
|
spec.name = "buff-ruby_engine"
|
8
8
|
spec.version = Buff::RubyEngine::VERSION
|
9
9
|
spec.authors = ["Jamie Winsor"]
|
10
|
-
spec.email = ["
|
10
|
+
spec.email = ["jamie@vialstudios.com"]
|
11
11
|
spec.description = %q{A mixin for querying the platform running Ruby}
|
12
12
|
spec.summary = %q{Buff up your code with a mixin for querying the platform running Ruby}
|
13
13
|
spec.homepage = "https://github.com/RiotGames/buff-ruby_engine"
|
@@ -17,12 +17,12 @@ Gem::Specification.new do |spec|
|
|
17
17
|
spec.executables = spec.files.grep(%r{^bin/}) { |f| File.basename(f) }
|
18
18
|
spec.test_files = spec.files.grep(%r{^spec/})
|
19
19
|
spec.require_paths = ["lib"]
|
20
|
-
spec.required_ruby_version = ">=
|
20
|
+
spec.required_ruby_version = ">= 2.2.0"
|
21
21
|
|
22
|
-
spec.add_development_dependency "thor", "~> 0.
|
22
|
+
spec.add_development_dependency "thor", "~> 0.19.0"
|
23
23
|
spec.add_development_dependency "bundler", "~> 1.3"
|
24
24
|
spec.add_development_dependency "rake"
|
25
|
-
spec.add_development_dependency "rspec"
|
25
|
+
spec.add_development_dependency "rspec", "~> 3.0"
|
26
26
|
spec.add_development_dependency "fuubar"
|
27
27
|
spec.add_development_dependency "guard"
|
28
28
|
spec.add_development_dependency "guard-rspec"
|
@@ -7,13 +7,13 @@ describe Buff::RubyEngine do
|
|
7
7
|
context "when the ruby engine is jruby" do
|
8
8
|
before { stub_const("RUBY_ENGINE", "jruby") }
|
9
9
|
|
10
|
-
it { expect(subject).to
|
10
|
+
it { expect(subject).to be true }
|
11
11
|
end
|
12
12
|
|
13
13
|
context "when the ruby engine is not jruby" do
|
14
14
|
before { stub_const("RUBY_ENGINE", "ruby") }
|
15
15
|
|
16
|
-
it { expect(subject).to
|
16
|
+
it { expect(subject).to be false }
|
17
17
|
end
|
18
18
|
end
|
19
19
|
|
@@ -23,13 +23,13 @@ describe Buff::RubyEngine do
|
|
23
23
|
context "when the ruby engine is mri" do
|
24
24
|
before { stub_const("RUBY_ENGINE", "ruby") }
|
25
25
|
|
26
|
-
it { expect(subject).to
|
26
|
+
it { expect(subject).to be true }
|
27
27
|
end
|
28
28
|
|
29
29
|
context "when the ruby engine is not mri" do
|
30
30
|
before { stub_const("RUBY_ENGINE", "jruby") }
|
31
31
|
|
32
|
-
it { expect(subject).to
|
32
|
+
it { expect(subject).to be false }
|
33
33
|
end
|
34
34
|
end
|
35
35
|
|
@@ -39,13 +39,13 @@ describe Buff::RubyEngine do
|
|
39
39
|
context "when the ruby engine is rubinius" do
|
40
40
|
before { stub_const("RUBY_ENGINE", "rbx") }
|
41
41
|
|
42
|
-
it { expect(subject).to
|
42
|
+
it { expect(subject).to be true }
|
43
43
|
end
|
44
44
|
|
45
45
|
context "when the ruby engine is not rubinius" do
|
46
46
|
before { stub_const("RUBY_ENGINE", "mri") }
|
47
47
|
|
48
|
-
it { expect(subject).to
|
48
|
+
it { expect(subject).to be false }
|
49
49
|
end
|
50
50
|
end
|
51
51
|
end
|
data/spec/spec_helper.rb
CHANGED
metadata
CHANGED
@@ -1,170 +1,150 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: buff-ruby_engine
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version:
|
5
|
-
prerelease:
|
4
|
+
version: 1.0.0
|
6
5
|
platform: ruby
|
7
6
|
authors:
|
8
7
|
- Jamie Winsor
|
9
8
|
autorequire:
|
10
9
|
bindir: bin
|
11
10
|
cert_chain: []
|
12
|
-
date:
|
11
|
+
date: 2016-08-05 00:00:00.000000000 Z
|
13
12
|
dependencies:
|
14
13
|
- !ruby/object:Gem::Dependency
|
15
14
|
name: thor
|
16
15
|
requirement: !ruby/object:Gem::Requirement
|
17
|
-
none: false
|
18
16
|
requirements:
|
19
|
-
- - ~>
|
17
|
+
- - "~>"
|
20
18
|
- !ruby/object:Gem::Version
|
21
|
-
version: 0.
|
19
|
+
version: 0.19.0
|
22
20
|
type: :development
|
23
21
|
prerelease: false
|
24
22
|
version_requirements: !ruby/object:Gem::Requirement
|
25
|
-
none: false
|
26
23
|
requirements:
|
27
|
-
- - ~>
|
24
|
+
- - "~>"
|
28
25
|
- !ruby/object:Gem::Version
|
29
|
-
version: 0.
|
26
|
+
version: 0.19.0
|
30
27
|
- !ruby/object:Gem::Dependency
|
31
28
|
name: bundler
|
32
29
|
requirement: !ruby/object:Gem::Requirement
|
33
|
-
none: false
|
34
30
|
requirements:
|
35
|
-
- - ~>
|
31
|
+
- - "~>"
|
36
32
|
- !ruby/object:Gem::Version
|
37
33
|
version: '1.3'
|
38
34
|
type: :development
|
39
35
|
prerelease: false
|
40
36
|
version_requirements: !ruby/object:Gem::Requirement
|
41
|
-
none: false
|
42
37
|
requirements:
|
43
|
-
- - ~>
|
38
|
+
- - "~>"
|
44
39
|
- !ruby/object:Gem::Version
|
45
40
|
version: '1.3'
|
46
41
|
- !ruby/object:Gem::Dependency
|
47
42
|
name: rake
|
48
43
|
requirement: !ruby/object:Gem::Requirement
|
49
|
-
none: false
|
50
44
|
requirements:
|
51
|
-
- -
|
45
|
+
- - ">="
|
52
46
|
- !ruby/object:Gem::Version
|
53
47
|
version: '0'
|
54
48
|
type: :development
|
55
49
|
prerelease: false
|
56
50
|
version_requirements: !ruby/object:Gem::Requirement
|
57
|
-
none: false
|
58
51
|
requirements:
|
59
|
-
- -
|
52
|
+
- - ">="
|
60
53
|
- !ruby/object:Gem::Version
|
61
54
|
version: '0'
|
62
55
|
- !ruby/object:Gem::Dependency
|
63
56
|
name: rspec
|
64
57
|
requirement: !ruby/object:Gem::Requirement
|
65
|
-
none: false
|
66
58
|
requirements:
|
67
|
-
- -
|
59
|
+
- - "~>"
|
68
60
|
- !ruby/object:Gem::Version
|
69
|
-
version: '0'
|
61
|
+
version: '3.0'
|
70
62
|
type: :development
|
71
63
|
prerelease: false
|
72
64
|
version_requirements: !ruby/object:Gem::Requirement
|
73
|
-
none: false
|
74
65
|
requirements:
|
75
|
-
- -
|
66
|
+
- - "~>"
|
76
67
|
- !ruby/object:Gem::Version
|
77
|
-
version: '0'
|
68
|
+
version: '3.0'
|
78
69
|
- !ruby/object:Gem::Dependency
|
79
70
|
name: fuubar
|
80
71
|
requirement: !ruby/object:Gem::Requirement
|
81
|
-
none: false
|
82
72
|
requirements:
|
83
|
-
- -
|
73
|
+
- - ">="
|
84
74
|
- !ruby/object:Gem::Version
|
85
75
|
version: '0'
|
86
76
|
type: :development
|
87
77
|
prerelease: false
|
88
78
|
version_requirements: !ruby/object:Gem::Requirement
|
89
|
-
none: false
|
90
79
|
requirements:
|
91
|
-
- -
|
80
|
+
- - ">="
|
92
81
|
- !ruby/object:Gem::Version
|
93
82
|
version: '0'
|
94
83
|
- !ruby/object:Gem::Dependency
|
95
84
|
name: guard
|
96
85
|
requirement: !ruby/object:Gem::Requirement
|
97
|
-
none: false
|
98
86
|
requirements:
|
99
|
-
- -
|
87
|
+
- - ">="
|
100
88
|
- !ruby/object:Gem::Version
|
101
89
|
version: '0'
|
102
90
|
type: :development
|
103
91
|
prerelease: false
|
104
92
|
version_requirements: !ruby/object:Gem::Requirement
|
105
|
-
none: false
|
106
93
|
requirements:
|
107
|
-
- -
|
94
|
+
- - ">="
|
108
95
|
- !ruby/object:Gem::Version
|
109
96
|
version: '0'
|
110
97
|
- !ruby/object:Gem::Dependency
|
111
98
|
name: guard-rspec
|
112
99
|
requirement: !ruby/object:Gem::Requirement
|
113
|
-
none: false
|
114
100
|
requirements:
|
115
|
-
- -
|
101
|
+
- - ">="
|
116
102
|
- !ruby/object:Gem::Version
|
117
103
|
version: '0'
|
118
104
|
type: :development
|
119
105
|
prerelease: false
|
120
106
|
version_requirements: !ruby/object:Gem::Requirement
|
121
|
-
none: false
|
122
107
|
requirements:
|
123
|
-
- -
|
108
|
+
- - ">="
|
124
109
|
- !ruby/object:Gem::Version
|
125
110
|
version: '0'
|
126
111
|
- !ruby/object:Gem::Dependency
|
127
112
|
name: guard-spork
|
128
113
|
requirement: !ruby/object:Gem::Requirement
|
129
|
-
none: false
|
130
114
|
requirements:
|
131
|
-
- -
|
115
|
+
- - ">="
|
132
116
|
- !ruby/object:Gem::Version
|
133
117
|
version: '0'
|
134
118
|
type: :development
|
135
119
|
prerelease: false
|
136
120
|
version_requirements: !ruby/object:Gem::Requirement
|
137
|
-
none: false
|
138
121
|
requirements:
|
139
|
-
- -
|
122
|
+
- - ">="
|
140
123
|
- !ruby/object:Gem::Version
|
141
124
|
version: '0'
|
142
125
|
- !ruby/object:Gem::Dependency
|
143
126
|
name: spork
|
144
127
|
requirement: !ruby/object:Gem::Requirement
|
145
|
-
none: false
|
146
128
|
requirements:
|
147
|
-
- -
|
129
|
+
- - ">="
|
148
130
|
- !ruby/object:Gem::Version
|
149
131
|
version: '0'
|
150
132
|
type: :development
|
151
133
|
prerelease: false
|
152
134
|
version_requirements: !ruby/object:Gem::Requirement
|
153
|
-
none: false
|
154
135
|
requirements:
|
155
|
-
- -
|
136
|
+
- - ">="
|
156
137
|
- !ruby/object:Gem::Version
|
157
138
|
version: '0'
|
158
139
|
description: A mixin for querying the platform running Ruby
|
159
140
|
email:
|
160
|
-
-
|
141
|
+
- jamie@vialstudios.com
|
161
142
|
executables: []
|
162
143
|
extensions: []
|
163
144
|
extra_rdoc_files: []
|
164
145
|
files:
|
165
|
-
- .gitignore
|
166
|
-
- .
|
167
|
-
- .travis.yml
|
146
|
+
- ".gitignore"
|
147
|
+
- ".travis.yml"
|
168
148
|
- CONTRIBUTING.md
|
169
149
|
- Gemfile
|
170
150
|
- Guardfile
|
@@ -181,30 +161,26 @@ files:
|
|
181
161
|
homepage: https://github.com/RiotGames/buff-ruby_engine
|
182
162
|
licenses:
|
183
163
|
- Apache 2.0
|
164
|
+
metadata: {}
|
184
165
|
post_install_message:
|
185
166
|
rdoc_options: []
|
186
167
|
require_paths:
|
187
168
|
- lib
|
188
169
|
required_ruby_version: !ruby/object:Gem::Requirement
|
189
|
-
none: false
|
190
170
|
requirements:
|
191
|
-
- -
|
171
|
+
- - ">="
|
192
172
|
- !ruby/object:Gem::Version
|
193
|
-
version:
|
173
|
+
version: 2.2.0
|
194
174
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
195
|
-
none: false
|
196
175
|
requirements:
|
197
|
-
- -
|
176
|
+
- - ">="
|
198
177
|
- !ruby/object:Gem::Version
|
199
178
|
version: '0'
|
200
|
-
segments:
|
201
|
-
- 0
|
202
|
-
hash: -352670113274747996
|
203
179
|
requirements: []
|
204
180
|
rubyforge_project:
|
205
|
-
rubygems_version:
|
181
|
+
rubygems_version: 2.4.8
|
206
182
|
signing_key:
|
207
|
-
specification_version:
|
183
|
+
specification_version: 4
|
208
184
|
summary: Buff up your code with a mixin for querying the platform running Ruby
|
209
185
|
test_files:
|
210
186
|
- spec/buff/ruby_engine_spec.rb
|
data/.ruby-version
DELETED
@@ -1 +0,0 @@
|
|
1
|
-
1.9.3-p429
|