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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 9a063369104e6de0486aee936d2d0ae4a9752e71036447b4fb8eef538ae83071
4
- data.tar.gz: 20164765c03901929faec75a3c2eda852f869a750cbb4a4b10a9d403a76a2e1c
3
+ metadata.gz: 7165275ef768b485a890022d9ee082cf30ed2d56b4e1cb2ac8a9d233602c83fc
4
+ data.tar.gz: 1e754e2e3eef371edb98501edf9776549153c5aefd3c1ed0a2442746f563572d
5
5
  SHA512:
6
- metadata.gz: ad53cc08e013e328dd5de16fc0f8b43ec33abe0cacaa9a079f6cbd4956ad02008ad7ac0054cc5a200ad921ace3e64c44f86a64ec0c8103005fe469118ed4487e
7
- data.tar.gz: 77b8d2cd14d05518bc2db4e88150e17bec81db1f4f42da43332c9fc07f55f0ed86dc50cdb9110aec55381e18b6abefa57b5aa307b016489aa83084b08d8d362d
6
+ metadata.gz: d17599e2d241ec69475825440fddcf8cc9a3e7f4274ae2627bd4175ccc4d8b159808f6ba3e1a9406025a27f7412da73d72f73d57adf1ff0f9c2bb7a08a6867a2
7
+ data.tar.gz: 2035e7ba0b4332041eff8472f137cee57c11cedd1c04f45551113cdfc65e0a2c9be3fa072de9698df14908bac2f13fe0989feef68527874cb32a630f28db3936
data/Gemfile CHANGED
@@ -1,9 +1,10 @@
1
- source "https://rubygems.org"
1
+ # frozen_string_literal: true
2
2
 
3
- git_source(:github) {|repo_name| "https://github.com/#{repo_name}" }
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.1.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: "bundle exec rspec" do
28
- require "guard/rspec/dsl"
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(erb haml slim))
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] || "spec/acceptance"
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
- Welcome to your new gem! In this directory, you'll find the files you need to be able to package up your Ruby library into a gem. Put your Ruby code in the file `lib/my_gems`. To experiment with that code, run `bin/console` for an interactive prompt.
3
+ [![Build Status](https://travis-ci.org/ogom/my_gems.svg?branch=master)](https://travis-ci.org/ogom/my_gems)
4
4
 
5
- TODO: Delete this and the text above, and describe your gem
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
- $ bundle
17
+ ```
18
+ $ bundle
19
+ ```
18
20
 
19
21
  Or install it yourself as:
20
22
 
21
- $ gem install my_gems
23
+ ```
24
+ $ gem install my_gems
25
+ ```
22
26
 
23
27
  ## Usage
24
28
 
25
- TODO: Write usage instructions here
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/[USERNAME]/my_gems.
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
@@ -1,6 +1,8 @@
1
- require "bundler/gem_tasks"
2
- require "rspec/core/rake_task"
1
+ # frozen_string_literal: true
2
+
3
+ require 'bundler/gem_tasks'
4
+ require 'rspec/core/rake_task'
3
5
 
4
6
  RSpec::Core::RakeTask.new(:spec)
5
7
 
6
- task :default => :spec
8
+ task default: :spec
data/bin/console CHANGED
@@ -1,7 +1,8 @@
1
1
  #!/usr/bin/env ruby
2
+ # frozen_string_literal: true
2
3
 
3
- require "bundler/setup"
4
- require "my_gems"
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 "irb"
14
+ require 'irb'
14
15
  IRB.start(__FILE__)
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  module MyGems
2
- VERSION = "0.2.0"
4
+ VERSION = '0.2.1'
3
5
  end
data/lib/my_gems.rb CHANGED
@@ -1,4 +1,6 @@
1
- require "my_gems/version"
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 == 0
11
- return 'Buzz' if @number % 5 == 0
12
- return 'Fizz' if @number % 3 == 0
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("../lib", __FILE__)
3
+ lib = File.expand_path('lib', __dir__)
3
4
  $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
4
- require "my_gems/version"
5
+ require 'my_gems/version'
5
6
 
6
7
  Gem::Specification.new do |spec|
7
- spec.name = "my_gems"
8
+ spec.name = 'my_gems'
8
9
  spec.version = MyGems::VERSION
9
- spec.authors = ["ogom"]
10
- spec.email = ["ogom@outlook.com"]
10
+ spec.authors = ['ogom']
11
+ spec.email = ['ogom@outlook.com']
11
12
 
12
- spec.summary = %q{my gems of short summary.}
13
- spec.description = %q{my gems of longer description.}
14
- spec.homepage = "https://github.com/ogom/my_gems.git"
15
- spec.license = "MIT"
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('..', __FILE__)) do
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 = "exe"
32
+ spec.bindir = 'exe'
32
33
  spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
33
- spec.require_paths = ["lib"]
34
+ spec.require_paths = ['lib']
34
35
 
35
- spec.add_development_dependency "bundler", "~> 1.16"
36
- spec.add_development_dependency "rake", "~> 10.0"
37
- spec.add_development_dependency "rspec", "~> 3.0"
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
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: my_gems
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.0
4
+ version: 0.2.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - ogom