my_gems 0.2.0 → 0.2.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile +4 -3
- data/Gemfile.lock +1 -18
- data/Guardfile +6 -4
- data/README.md +13 -6
- data/Rakefile +5 -3
- data/bin/console +4 -3
- data/lib/my_gems/version.rb +3 -1
- data/lib/my_gems.rb +7 -4
- data/my_gems.gemspec +16 -15
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 7165275ef768b485a890022d9ee082cf30ed2d56b4e1cb2ac8a9d233602c83fc
|
4
|
+
data.tar.gz: 1e754e2e3eef371edb98501edf9776549153c5aefd3c1ed0a2442746f563572d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d17599e2d241ec69475825440fddcf8cc9a3e7f4274ae2627bd4175ccc4d8b159808f6ba3e1a9406025a27f7412da73d72f73d57adf1ff0f9c2bb7a08a6867a2
|
7
|
+
data.tar.gz: 2035e7ba0b4332041eff8472f137cee57c11cedd1c04f45551113cdfc65e0a2c9be3fa072de9698df14908bac2f13fe0989feef68527874cb32a630f28db3936
|
data/Gemfile
CHANGED
@@ -1,9 +1,10 @@
|
|
1
|
-
|
1
|
+
# frozen_string_literal: true
|
2
2
|
|
3
|
-
|
3
|
+
source 'https://rubygems.org'
|
4
|
+
|
5
|
+
git_source(:github) { |repo_name| "https://github.com/#{repo_name}" }
|
4
6
|
|
5
7
|
# Specify your gem's dependencies in my_gems.gemspec
|
6
8
|
gemspec
|
7
9
|
|
8
10
|
gem 'guard-rspec', require: false, group: %i[development test]
|
9
|
-
gem 'rubocop', require: false, group: %i[development test]
|
data/Gemfile.lock
CHANGED
@@ -1,12 +1,11 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
my_gems (0.
|
4
|
+
my_gems (0.2.0)
|
5
5
|
|
6
6
|
GEM
|
7
7
|
remote: https://rubygems.org/
|
8
8
|
specs:
|
9
|
-
ast (2.3.0)
|
10
9
|
coderay (1.1.2)
|
11
10
|
diff-lcs (1.3)
|
12
11
|
ffi (1.9.25)
|
@@ -35,15 +34,9 @@ GEM
|
|
35
34
|
notiffany (0.1.1)
|
36
35
|
nenv (~> 0.1)
|
37
36
|
shellany (~> 0.0)
|
38
|
-
parallel (1.12.0)
|
39
|
-
parser (2.4.0.0)
|
40
|
-
ast (~> 2.2)
|
41
|
-
powerpack (0.1.1)
|
42
37
|
pry (0.11.3)
|
43
38
|
coderay (~> 1.1.0)
|
44
39
|
method_source (~> 0.9.0)
|
45
|
-
rainbow (2.2.2)
|
46
|
-
rake
|
47
40
|
rake (10.5.0)
|
48
41
|
rb-fsevent (0.10.3)
|
49
42
|
rb-inotify (0.9.10)
|
@@ -61,18 +54,9 @@ GEM
|
|
61
54
|
diff-lcs (>= 1.2.0, < 2.0)
|
62
55
|
rspec-support (~> 3.8.0)
|
63
56
|
rspec-support (3.8.0)
|
64
|
-
rubocop (0.51.0)
|
65
|
-
parallel (~> 1.10)
|
66
|
-
parser (>= 2.3.3.1, < 3.0)
|
67
|
-
powerpack (~> 0.1)
|
68
|
-
rainbow (>= 2.2.2, < 3.0)
|
69
|
-
ruby-progressbar (~> 1.7)
|
70
|
-
unicode-display_width (~> 1.0, >= 1.0.1)
|
71
|
-
ruby-progressbar (1.9.0)
|
72
57
|
ruby_dep (1.5.0)
|
73
58
|
shellany (0.0.1)
|
74
59
|
thor (0.20.0)
|
75
|
-
unicode-display_width (1.3.0)
|
76
60
|
|
77
61
|
PLATFORMS
|
78
62
|
ruby
|
@@ -83,7 +67,6 @@ DEPENDENCIES
|
|
83
67
|
my_gems!
|
84
68
|
rake (~> 10.0)
|
85
69
|
rspec (~> 3.0)
|
86
|
-
rubocop
|
87
70
|
|
88
71
|
BUNDLED WITH
|
89
72
|
1.16.4
|
data/Guardfile
CHANGED
@@ -1,3 +1,5 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
1
3
|
# A sample Guardfile
|
2
4
|
# More info at https://github.com/guard/guard#readme
|
3
5
|
|
@@ -24,8 +26,8 @@
|
|
24
26
|
# * zeus: 'zeus rspec' (requires the server to be started separately)
|
25
27
|
# * 'just' rspec: 'rspec'
|
26
28
|
|
27
|
-
guard :rspec, cmd:
|
28
|
-
require
|
29
|
+
guard :rspec, cmd: 'bundle exec rspec' do
|
30
|
+
require 'guard/rspec/dsl'
|
29
31
|
dsl = Guard::RSpec::Dsl.new(self)
|
30
32
|
|
31
33
|
# Feel free to open issues for suggestions and improvements
|
@@ -41,7 +43,7 @@ guard :rspec, cmd: "bundle exec rspec" do
|
|
41
43
|
dsl.watch_spec_files_for(ruby.lib_files)
|
42
44
|
|
43
45
|
# Rails files
|
44
|
-
rails = dsl.rails(view_extensions: %w
|
46
|
+
rails = dsl.rails(view_extensions: %w[erb haml slim])
|
45
47
|
dsl.watch_spec_files_for(rails.app_files)
|
46
48
|
dsl.watch_spec_files_for(rails.views)
|
47
49
|
|
@@ -65,6 +67,6 @@ guard :rspec, cmd: "bundle exec rspec" do
|
|
65
67
|
# Turnip features and steps
|
66
68
|
watch(%r{^spec/acceptance/(.+)\.feature$})
|
67
69
|
watch(%r{^spec/acceptance/steps/(.+)_steps\.rb$}) do |m|
|
68
|
-
Dir[File.join("**/#{m[1]}.feature")][0] ||
|
70
|
+
Dir[File.join("**/#{m[1]}.feature")][0] || 'spec/acceptance'
|
69
71
|
end
|
70
72
|
end
|
data/README.md
CHANGED
@@ -1,8 +1,8 @@
|
|
1
1
|
# MyGems
|
2
2
|
|
3
|
-
|
3
|
+
[![Build Status](https://travis-ci.org/ogom/my_gems.svg?branch=master)](https://travis-ci.org/ogom/my_gems)
|
4
4
|
|
5
|
-
|
5
|
+
An example of Fizz Buzz.
|
6
6
|
|
7
7
|
## Installation
|
8
8
|
|
@@ -14,15 +14,22 @@ gem 'my_gems'
|
|
14
14
|
|
15
15
|
And then execute:
|
16
16
|
|
17
|
-
|
17
|
+
```
|
18
|
+
$ bundle
|
19
|
+
```
|
18
20
|
|
19
21
|
Or install it yourself as:
|
20
22
|
|
21
|
-
|
23
|
+
```
|
24
|
+
$ gem install my_gems
|
25
|
+
```
|
22
26
|
|
23
27
|
## Usage
|
24
28
|
|
25
|
-
|
29
|
+
```ruby
|
30
|
+
fizz_buzz = MyGems::FizzBuzz.new(3)
|
31
|
+
fizz_buzz.say # "Fizz"
|
32
|
+
```
|
26
33
|
|
27
34
|
## Development
|
28
35
|
|
@@ -32,7 +39,7 @@ To install this gem onto your local machine, run `bundle exec rake install`. To
|
|
32
39
|
|
33
40
|
## Contributing
|
34
41
|
|
35
|
-
Bug reports and pull requests are welcome on GitHub at https://github.com/
|
42
|
+
Bug reports and pull requests are welcome on GitHub at https://github.com/ogom/my_gems.
|
36
43
|
|
37
44
|
## License
|
38
45
|
|
data/Rakefile
CHANGED
data/bin/console
CHANGED
@@ -1,7 +1,8 @@
|
|
1
1
|
#!/usr/bin/env ruby
|
2
|
+
# frozen_string_literal: true
|
2
3
|
|
3
|
-
require
|
4
|
-
require
|
4
|
+
require 'bundler/setup'
|
5
|
+
require 'my_gems'
|
5
6
|
|
6
7
|
# You can add fixtures and/or initialization code here to make experimenting
|
7
8
|
# with your gem easier. You can also use a different console, if you like.
|
@@ -10,5 +11,5 @@ require "my_gems"
|
|
10
11
|
# require "pry"
|
11
12
|
# Pry.start
|
12
13
|
|
13
|
-
require
|
14
|
+
require 'irb'
|
14
15
|
IRB.start(__FILE__)
|
data/lib/my_gems/version.rb
CHANGED
data/lib/my_gems.rb
CHANGED
@@ -1,4 +1,6 @@
|
|
1
|
-
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require 'my_gems/version'
|
2
4
|
|
3
5
|
module MyGems
|
4
6
|
class FizzBuzz
|
@@ -7,9 +9,10 @@ module MyGems
|
|
7
9
|
end
|
8
10
|
|
9
11
|
def say
|
10
|
-
return 'FizzBuzz' if @number % 15
|
11
|
-
return 'Buzz' if @number % 5
|
12
|
-
return 'Fizz' if @number % 3
|
12
|
+
return 'FizzBuzz' if (@number % 15).zero?
|
13
|
+
return 'Buzz' if (@number % 5).zero?
|
14
|
+
return 'Fizz' if (@number % 3).zero?
|
15
|
+
|
13
16
|
@number.to_s
|
14
17
|
end
|
15
18
|
end
|
data/my_gems.gemspec
CHANGED
@@ -1,18 +1,19 @@
|
|
1
|
+
# frozen_string_literal: true
|
1
2
|
|
2
|
-
lib = File.expand_path(
|
3
|
+
lib = File.expand_path('lib', __dir__)
|
3
4
|
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
4
|
-
require
|
5
|
+
require 'my_gems/version'
|
5
6
|
|
6
7
|
Gem::Specification.new do |spec|
|
7
|
-
spec.name =
|
8
|
+
spec.name = 'my_gems'
|
8
9
|
spec.version = MyGems::VERSION
|
9
|
-
spec.authors = [
|
10
|
-
spec.email = [
|
10
|
+
spec.authors = ['ogom']
|
11
|
+
spec.email = ['ogom@outlook.com']
|
11
12
|
|
12
|
-
spec.summary =
|
13
|
-
spec.description =
|
14
|
-
spec.homepage =
|
15
|
-
spec.license =
|
13
|
+
spec.summary = 'my gems of short summary.'
|
14
|
+
spec.description = 'my gems of longer description.'
|
15
|
+
spec.homepage = 'https://github.com/ogom/my_gems.git'
|
16
|
+
spec.license = 'MIT'
|
16
17
|
|
17
18
|
# Prevent pushing this gem to RubyGems.org. To allow pushes either set the 'allowed_push_host'
|
18
19
|
# to allow pushing to a single host or delete this section to allow pushing to any host.
|
@@ -25,14 +26,14 @@ Gem::Specification.new do |spec|
|
|
25
26
|
|
26
27
|
# Specify which files should be added to the gem when it is released.
|
27
28
|
# The `git ls-files -z` loads the files in the RubyGem that have been added into git.
|
28
|
-
spec.files = Dir.chdir(File.expand_path(
|
29
|
+
spec.files = Dir.chdir(File.expand_path(__dir__)) do
|
29
30
|
`git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(test|spec|features)/}) }
|
30
31
|
end
|
31
|
-
spec.bindir =
|
32
|
+
spec.bindir = 'exe'
|
32
33
|
spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
|
33
|
-
spec.require_paths = [
|
34
|
+
spec.require_paths = ['lib']
|
34
35
|
|
35
|
-
spec.add_development_dependency
|
36
|
-
spec.add_development_dependency
|
37
|
-
spec.add_development_dependency
|
36
|
+
spec.add_development_dependency 'bundler', '~> 1.16'
|
37
|
+
spec.add_development_dependency 'rake', '~> 10.0'
|
38
|
+
spec.add_development_dependency 'rspec', '~> 3.0'
|
38
39
|
end
|