eac_ruby_gems_utils 0.6.0 → 0.6.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: 96ad40e228b3d95ed5f966a19d7449e860e1c6eddf0646492f7fc164bfaaf9b4
4
- data.tar.gz: fa1d30195f503bf880d8dc9bb4f0063a550abd08bdef2d7c54e471c9039c87b2
3
+ metadata.gz: 7f75298747a013afc0a9885aa971bf93245ca3b94b6967b21c80a2644a19ec68
4
+ data.tar.gz: 5b8c611448808035da09b60baf19e97cd1e86f631fb889c18dc53c638a096ce9
5
5
  SHA512:
6
- metadata.gz: 117390a61ccaf50fcc9853a2926726d7196151b56626b3482d595d8278f4e06e4073c47e73733553f5e5acb3ddf169bb9f152715e8c13761ba8e9a0d124176ab
7
- data.tar.gz: b6a2673cd0d582eadf7ca565dbe59b5015ae960a548debf313c80a3522d346b8ff9ad1bcc001e9e74a66e03742ff1abeb1fa6c938f71c8b6951a96ade387ae88
6
+ metadata.gz: c075d0b148870a9981c6457cccdfc3a7a41b8f79b8a9d4fa6aecbf8adb11bc483049d3359d8d034d30225d5a27b5f667a8cc4dbc58b8e91f70c19272149192aa
7
+ data.tar.gz: 50a6af80b9f47c4673669c1c6da5a041700700de23d15ecc05150b608b85d16019f894d437efb2c5b3fafe04519055fcd4229528d89dceff0e863f36b1117ec2
@@ -0,0 +1,3 @@
1
+ /Gemfile.lock
2
+ doc/**/*
3
+ .yardoc/**/*
data/.rspec ADDED
@@ -0,0 +1 @@
1
+ --require spec_helper
@@ -0,0 +1,25 @@
1
+ require:
2
+ - rubocop-rails
3
+ - rubocop-rspec
4
+
5
+ AllCops:
6
+ TargetRubyVersion: 2.4
7
+
8
+ Layout/LineLength:
9
+ Max: 100
10
+
11
+ Rails/RakeEnvironment:
12
+ Exclude:
13
+ - spec/support/mygem/Rakefile
14
+
15
+ Style/Documentation:
16
+ Enabled: false
17
+
18
+ Style/HashEachMethods:
19
+ Enabled: true
20
+
21
+ Style/HashTransformKeys:
22
+ Enabled: true
23
+
24
+ Style/HashTransformValues:
25
+ Enabled: true
data/Gemfile ADDED
@@ -0,0 +1,5 @@
1
+ # frozen_string_literal: true
2
+
3
+ source 'https://rubygems.org'
4
+
5
+ gemspec
data/LICENCE ADDED
@@ -0,0 +1,16 @@
1
+ Copyright (c) 2020 Eduardo Henrique Bogoni
2
+
3
+ Permission is hereby granted, free of charge, to any person obtaining a copy of this software and
4
+ associated documentation files (the "Software"), to deal in the Software without restriction,
5
+ including without limitation the rights to use, copy, modify, merge, publish, distribute,
6
+ sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is
7
+ furnished to do so, subject to the following conditions:
8
+
9
+ The above copyright notice and this permission notice (including the next paragraph) shall be
10
+ included in all copies or substantial portions of the Software.
11
+
12
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT
13
+ NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
14
+ NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
15
+ DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT
16
+ OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
@@ -0,0 +1,29 @@
1
+ # frozen_string_literal: true
2
+
3
+ $LOAD_PATH.push File.expand_path('lib', __dir__)
4
+
5
+ # Maintain your gem's version:
6
+ require 'eac_ruby_gems_utils/version'
7
+
8
+ # Describe your gem and declare its dependencies:
9
+ Gem::Specification.new do |s|
10
+ s.name = 'eac_ruby_gems_utils'
11
+ s.version = ::EacRubyGemsUtils::VERSION
12
+ s.authors = ['Esquilo Azul Company']
13
+ s.summary = 'Utilities for Ruby gems development.'
14
+ s.license = 'MIT'
15
+ s.homepage = 'https://github.com/esquilo-azul/eac_ruby_gems_utils'
16
+ s.metadata = { 'source_code_uri' => s.homepage }
17
+
18
+ s.extra_rdoc_files = ['README.rdoc']
19
+ s.rdoc_options = ['--charset=UTF-8']
20
+
21
+ s.require_paths = ['lib']
22
+ s.files = `git ls-files`.split("\n")
23
+ s.test_files = `git ls-files spec examples`.split("\n")
24
+
25
+ s.add_dependency 'eac_ruby_utils', '~> 0.29'
26
+
27
+ # Tests
28
+ s.add_development_dependency 'eac_ruby_gem_support', '~> 0.1'
29
+ end
@@ -39,7 +39,8 @@ module EacRubyGemsUtils
39
39
  end
40
40
 
41
41
  def name_by_path
42
- root.basename.to_s
42
+ fullname = root.basename.to_s
43
+ /\A(.+)(?:-\d+(?:\.\d+)*)\z/.if_match(fullname, false) { |m| m[1] }.if_present(fullname)
43
44
  end
44
45
 
45
46
  def namespace_parts
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module EacRubyGemsUtils
4
- VERSION = '0.6.0'
4
+ VERSION = '0.6.1'
5
5
  end
@@ -0,0 +1,20 @@
1
+ # frozen_string_literal: true
2
+
3
+ require 'eac_ruby_gems_utils/gem'
4
+
5
+ ::RSpec.describe ::EacRubyGemsUtils::Gem do
6
+ let(:mygem_path) { ::Pathname.new(__dir__).expand_path.parent.parent.join('support', 'mygem') }
7
+ let(:mygem) { described_class.new(mygem_path) }
8
+
9
+ describe '#bundle' do
10
+ specify do
11
+ expect(mygem.bundle('exec', 'myrunner').execute!).to include('My Runner')
12
+ end
13
+ end
14
+
15
+ describe '#rake' do
16
+ specify do
17
+ expect(mygem.rake('mygem:stub').execute!).to include('Stub!')
18
+ end
19
+ end
20
+ end
@@ -0,0 +1,7 @@
1
+ # frozen_string_literal: true
2
+
3
+ require 'eac_ruby_gem_support/spec/examples/rubocop_check'
4
+
5
+ RSpec.describe ::RuboCop do
6
+ include_examples 'rubocop_check', ::File.expand_path('../..', __dir__)
7
+ end
@@ -0,0 +1,100 @@
1
+ # frozen_string_literal: true
2
+
3
+ # This file was generated by the `rspec --init` command. Conventionally, all
4
+ # specs live under a `spec` directory, which RSpec adds to the `$LOAD_PATH`.
5
+ # The generated `.rspec` file contains `--require spec_helper` which will cause
6
+ # this file to always be loaded, without a need to explicitly require it in any
7
+ # files.
8
+ #
9
+ # Given that it is always loaded, you are encouraged to keep this file as
10
+ # light-weight as possible. Requiring heavyweight dependencies from this file
11
+ # will add to the boot time of your test suite on EVERY test run, even for an
12
+ # individual file that may not need all of that loaded. Instead, consider making
13
+ # a separate helper file that requires the additional dependencies and performs
14
+ # the additional setup, and require it from the spec files that actually need
15
+ # it.
16
+ #
17
+ # See http://rubydoc.info/gems/rspec-core/RSpec/Core/Configuration
18
+ RSpec.configure do |config|
19
+ # rspec-expectations config goes here. You can use an alternate
20
+ # assertion/expectation library such as wrong or the stdlib/minitest
21
+ # assertions if you prefer.
22
+ config.expect_with :rspec do |expectations|
23
+ # This option will default to `true` in RSpec 4. It makes the `description`
24
+ # and `failure_message` of custom matchers include text for helper methods
25
+ # defined using `chain`, e.g.:
26
+ # be_bigger_than(2).and_smaller_than(4).description
27
+ # # => "be bigger than 2 and smaller than 4"
28
+ # ...rather than:
29
+ # # => "be bigger than 2"
30
+ expectations.include_chain_clauses_in_custom_matcher_descriptions = true
31
+ end
32
+
33
+ # rspec-mocks config goes here. You can use an alternate test double
34
+ # library (such as bogus or mocha) by changing the `mock_with` option here.
35
+ config.mock_with :rspec do |mocks|
36
+ # Prevents you from mocking or stubbing a method that does not exist on
37
+ # a real object. This is generally recommended, and will default to
38
+ # `true` in RSpec 4.
39
+ mocks.verify_partial_doubles = true
40
+ end
41
+
42
+ # This option will default to `:apply_to_host_groups` in RSpec 4 (and will
43
+ # have no way to turn it off -- the option exists only for backwards
44
+ # compatibility in RSpec 3). It causes shared context metadata to be
45
+ # inherited by the metadata hash of host groups and examples, rather than
46
+ # triggering implicit auto-inclusion in groups with matching metadata.
47
+ config.shared_context_metadata_behavior = :apply_to_host_groups
48
+
49
+ # The settings below are suggested to provide a good initial experience
50
+ # with RSpec, but feel free to customize to your heart's content.
51
+ # # This allows you to limit a spec run to individual examples or groups
52
+ # # you care about by tagging them with `:focus` metadata. When nothing
53
+ # # is tagged with `:focus`, all examples get run. RSpec also provides
54
+ # # aliases for `it`, `describe`, and `context` that include `:focus`
55
+ # # metadata: `fit`, `fdescribe` and `fcontext`, respectively.
56
+ # config.filter_run_when_matching :focus
57
+ #
58
+ # # Allows RSpec to persist some state between runs in order to support
59
+ # # the `--only-failures` and `--next-failure` CLI options. We recommend
60
+ # # you configure your source control system to ignore this file.
61
+ # config.example_status_persistence_file_path = "spec/examples.txt"
62
+ #
63
+ # # Limits the available syntax to the non-monkey patched syntax that is
64
+ # # recommended. For more details, see:
65
+ # # - http://rspec.info/blog/2012/06/rspecs-new-expectation-syntax/
66
+ # # - http://www.teaisaweso.me/blog/2013/05/27/rspecs-new-message-expectation-syntax/
67
+ # # - http://rspec.info/blog/2014/05/notable-changes-in-rspec-3/#zero-monkey-patching-mode
68
+ # config.disable_monkey_patching!
69
+ #
70
+ # # This setting enables warnings. It's recommended, but in some cases may
71
+ # # be too noisy due to issues in dependencies.
72
+ # config.warnings = true
73
+ #
74
+ # # Many RSpec users commonly either run the entire suite or an individual
75
+ # # file, and it's useful to allow more verbose output when running an
76
+ # # individual spec file.
77
+ # if config.files_to_run.one?
78
+ # # Use the documentation formatter for detailed output,
79
+ # # unless a formatter has already been configured
80
+ # # (e.g. via a command-line flag).
81
+ # config.default_formatter = "doc"
82
+ # end
83
+ #
84
+ # # Print the 10 slowest examples and example groups at the
85
+ # # end of the spec run, to help surface which specs are running
86
+ # # particularly slow.
87
+ # config.profile_examples = 10
88
+ #
89
+ # # Run specs in random order to surface order dependencies. If you find an
90
+ # # order dependency and want to debug it, you can fix the order by providing
91
+ # # the seed, which is printed after each run.
92
+ # # --seed 1234
93
+ # config.order = :random
94
+ #
95
+ # # Seed global randomization in this process using the `--seed` CLI option.
96
+ # # Setting this allows you to use `--seed` to deterministically reproduce
97
+ # # test failures related to randomization by passing the same `--seed` value
98
+ # # as the one that triggered the failure.
99
+ # Kernel.srand config.seed
100
+ end
@@ -0,0 +1,5 @@
1
+ # frozen_string_literal: true
2
+
3
+ source 'https://rubygems.org'
4
+
5
+ gemspec
@@ -0,0 +1,19 @@
1
+ PATH
2
+ remote: .
3
+ specs:
4
+ mygem (1.0.0)
5
+ rake
6
+
7
+ GEM
8
+ remote: https://rubygems.org/
9
+ specs:
10
+ rake (13.0.1)
11
+
12
+ PLATFORMS
13
+ ruby
14
+
15
+ DEPENDENCIES
16
+ mygem!
17
+
18
+ BUNDLED WITH
19
+ 1.17.3
@@ -0,0 +1,14 @@
1
+ # frozen_string_literal: true
2
+
3
+ begin
4
+ require 'bundler/setup'
5
+ rescue LoadError
6
+ puts 'You must `gem install bundler` and `bundle install` to run rake tasks'
7
+ end
8
+
9
+ namespace :mygem do
10
+ desc 'A stub task.'
11
+ task :stub do
12
+ puts 'Stub!'
13
+ end
14
+ end
@@ -0,0 +1,5 @@
1
+ #!/usr/bin/env ruby
2
+ # frozen_string_literal: true
3
+
4
+ $LOAD_PATH.unshift("#{__dir__}/../lib")
5
+ puts 'My Runner'
@@ -0,0 +1,5 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Mygem
4
+ require 'mygem/version'
5
+ end
@@ -0,0 +1,5 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Mygem
4
+ VERSION = '1.0.0'
5
+ end
@@ -0,0 +1,16 @@
1
+ # frozen_string_literal: true
2
+
3
+ $LOAD_PATH.push File.expand_path('lib', __dir__)
4
+
5
+ Gem::Specification.new do |s|
6
+ s.name = 'mygem'
7
+ s.version = '1.0.0'
8
+ s.authors = ['Esquilo Azul Company']
9
+ s.summary = 'Stub gem.'
10
+
11
+ s.files = Dir['{exe,lib}/**/*', 'Gemfile', 'Rakefile']
12
+ s.bindir = 'exe'
13
+ s.executables = s.files.grep(%r{^exe/}) { |f| File.basename(f) }
14
+
15
+ s.add_dependency 'rake'
16
+ end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: eac_ruby_gems_utils
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.6.0
4
+ version: 0.6.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Esquilo Azul Company
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2020-07-07 00:00:00.000000000 Z
11
+ date: 2020-07-24 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: eac_ruby_utils
@@ -42,9 +42,16 @@ description:
42
42
  email:
43
43
  executables: []
44
44
  extensions: []
45
- extra_rdoc_files: []
45
+ extra_rdoc_files:
46
+ - README.rdoc
46
47
  files:
48
+ - ".gitignore"
49
+ - ".rspec"
50
+ - ".rubocop.yml"
51
+ - Gemfile
52
+ - LICENCE
47
53
  - README.rdoc
54
+ - eac_ruby_gems_utils.gemspec
48
55
  - lib/eac_ruby_gems_utils.rb
49
56
  - lib/eac_ruby_gems_utils/gem.rb
50
57
  - lib/eac_ruby_gems_utils/gem/command.rb
@@ -54,12 +61,24 @@ files:
54
61
  - lib/eac_ruby_gems_utils/tests/multiple.rb
55
62
  - lib/eac_ruby_gems_utils/tests/rspec.rb
56
63
  - lib/eac_ruby_gems_utils/version.rb
57
- homepage:
64
+ - spec/lib/eac_ruby_gems_utils/gem_spec.rb
65
+ - spec/rubocop_check_spec.rb
66
+ - spec/spec_helper.rb
67
+ - spec/support/mygem/Gemfile
68
+ - spec/support/mygem/Gemfile.lock
69
+ - spec/support/mygem/Rakefile
70
+ - spec/support/mygem/exe/myrunner
71
+ - spec/support/mygem/lib/mygem.rb
72
+ - spec/support/mygem/lib/mygem/version.rb
73
+ - spec/support/mygem/mygem.gemspec
74
+ homepage: https://github.com/esquilo-azul/eac_ruby_gems_utils
58
75
  licenses:
59
- - GPL3
60
- metadata: {}
76
+ - MIT
77
+ metadata:
78
+ source_code_uri: https://github.com/esquilo-azul/eac_ruby_gems_utils
61
79
  post_install_message:
62
- rdoc_options: []
80
+ rdoc_options:
81
+ - "--charset=UTF-8"
63
82
  require_paths:
64
83
  - lib
65
84
  required_ruby_version: !ruby/object:Gem::Requirement
@@ -73,9 +92,18 @@ required_rubygems_version: !ruby/object:Gem::Requirement
73
92
  - !ruby/object:Gem::Version
74
93
  version: '0'
75
94
  requirements: []
76
- rubyforge_project:
77
- rubygems_version: 2.7.7
95
+ rubygems_version: 3.0.6
78
96
  signing_key:
79
97
  specification_version: 4
80
98
  summary: Utilities for Ruby gems development.
81
- test_files: []
99
+ test_files:
100
+ - spec/lib/eac_ruby_gems_utils/gem_spec.rb
101
+ - spec/rubocop_check_spec.rb
102
+ - spec/spec_helper.rb
103
+ - spec/support/mygem/Gemfile
104
+ - spec/support/mygem/Gemfile.lock
105
+ - spec/support/mygem/Rakefile
106
+ - spec/support/mygem/exe/myrunner
107
+ - spec/support/mygem/lib/mygem.rb
108
+ - spec/support/mygem/lib/mygem/version.rb
109
+ - spec/support/mygem/mygem.gemspec