safedep 0.3.2 → 0.4.0

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
- SHA1:
3
- metadata.gz: bb1e6cf2094f7a315a36e9a63f1872212e73f25b
4
- data.tar.gz: 22a79c38eb1ed843d48d947b8d1e2c2a1fcd5cb3
2
+ SHA256:
3
+ metadata.gz: adbefe2e5fbb56a878cb340680ed0c59cc3b2f754ad37b248009bc67676f1c3c
4
+ data.tar.gz: 8731183111822d0696f85e0ab25224aba20c6b40e558e91821dba1a08a9298f4
5
5
  SHA512:
6
- metadata.gz: 95ac2f49c360bf683c230863e3c9a2bf2b0073266866cb526b19288df84a08c4fc74f6e1def74a391f28e22f831e2c505d8a1a395fd994c207c99ac9ae74e727
7
- data.tar.gz: 804be1c06d871e9a2fed3b8e263c673bd4f43dd8174c948b154fc00005c081097c03b6aa41a101877c7d89a6891809b0f565c703d9242bd5d81a93a846a8c62d
6
+ metadata.gz: b24275e230a76bf02e1caa3d5b4435ca49ce6e9bc4d8d1c5cdf3fd3d727b909b006efabdcaa794afa72160d0b34723121404603b2b98622d2140ec4c769f6676
7
+ data.tar.gz: 734a7709efc25467099e55b92101460befec1f7bf5db4c761e4e9e06f4561a137386fd97c6c9e6f04484a71a60501bb6803609fb1db6ff5ac5bd1d2f9975cd0c
@@ -1,4 +1,3 @@
1
-
2
1
  AllCops:
3
2
  Include:
4
3
  - '*.gemspec'
@@ -8,54 +7,39 @@ AllCops:
8
7
  Exclude:
9
8
  - 'vendor/**/*'
10
9
 
11
- LineLength:
10
+ Layout/AlignHash:
11
+ EnforcedHashRocketStyle: table
12
+ EnforcedColonStyle: separator
13
+
14
+ Metrics/AbcSize:
15
+ Max: 20
16
+
17
+ Metrics/BlockLength:
18
+ Exclude:
19
+ - 'spec/**/*'
20
+
21
+ Metrics/LineLength:
12
22
  Max: 100
13
23
 
14
- MethodLength:
24
+ Metrics/MethodLength:
15
25
  Max: 15
16
26
 
17
- AbcSize:
18
- Max: 20
27
+ Naming/HeredocDelimiterNaming:
28
+ Enabled: false
19
29
 
20
- RegexpLiteral:
30
+ Style/RegexpLiteral:
21
31
  Exclude:
22
32
  - '*.gemspec'
23
33
  - 'Guardfile'
24
34
 
25
- EmptyElse:
35
+ Style/Documentation:
26
36
  Enabled: false
27
37
 
28
- AlignHash:
29
- # Alignment of entries using hash rocket as separator. Valid values are:
30
- #
31
- # key - left alignment of keys
32
- # 'a' => 2
33
- # 'bb' => 3
34
- # separator - alignment of hash rockets, keys are right aligned
35
- # 'a' => 2
36
- # 'bb' => 3
37
- # table - left alignment of keys, hash rockets, and values
38
- # 'a' => 2
39
- # 'bb' => 3
40
- EnforcedHashRocketStyle: table
41
- # Alignment of entries using colon as separator. Valid values are:
42
- #
43
- # key - left alignment of keys
44
- # a: 0
45
- # bb: 1
46
- # separator - alignment of colons, keys are right aligned
47
- # a: 0
48
- # bb: 1
49
- # table - left alignment of keys and values
50
- # a: 0
51
- # bb: 1
52
- EnforcedColonStyle: separator
53
-
54
- GuardClause:
38
+ Style/EmptyElse:
55
39
  Enabled: false
56
40
 
57
- Documentation:
41
+ Style/GuardClause:
58
42
  Enabled: false
59
43
 
60
- SingleLineBlockParams:
44
+ Style/SingleLineBlockParams:
61
45
  Enabled: false
@@ -1,11 +1,11 @@
1
1
  language: ruby
2
2
  rvm:
3
- - 1.9.3
4
- - 2.0.0
5
- - 2.1
6
- - 2.2
7
- - ruby-head
8
- - jruby-19mode
9
- script: bundle exec rake ci
3
+ - 2.2.9
4
+ - 2.3.6
5
+ - 2.4.3
6
+ - 2.5.0
7
+ - jruby-9.1.15.0
10
8
  sudo: false
11
9
  cache: bundler
10
+ before_install: gem update --system
11
+ script: bundle exec rake ci
data/Gemfile CHANGED
@@ -3,17 +3,17 @@ source 'https://rubygems.org'
3
3
  gemspec
4
4
 
5
5
  group :development, :test do
6
- gem 'rake', '~> 10.4'
7
- gem 'rspec', '~> 3.1'
8
- gem 'rubocop', '~> 0.28'
9
6
  gem 'powerpack', '~> 0.0'
7
+ gem 'rake', '~> 11.1'
8
+ gem 'rspec', '~> 3.1'
9
+ gem 'rubocop', '~> 0.52'
10
10
  gem 'simplecov', '~> 0.9'
11
11
  end
12
12
 
13
13
  group :development do
14
+ gem 'fuubar', '~> 2.0'
14
15
  gem 'guard-rspec', '~> 4.5'
15
16
  gem 'guard-rubocop', '~> 1.2'
16
- gem 'fuubar', '~> 2.0'
17
17
  gem 'ruby_gntp', '~> 0.3'
18
18
  end
19
19
 
data/README.md CHANGED
@@ -1,8 +1,7 @@
1
- [![Gem Version](http://img.shields.io/gem/v/safedep.svg?style=flat)](http://badge.fury.io/rb/safedep)
2
- [![Dependency Status](http://img.shields.io/gemnasium/yujinakayama/safedep.svg?style=flat)](https://gemnasium.com/yujinakayama/safedep)
1
+ [![Gem Version](https://badge.fury.io/rb/safedep.svg)](http://badge.fury.io/rb/safedep)
3
2
  [![Build Status](https://travis-ci.org/yujinakayama/safedep.svg?branch=master&style=flat)](https://travis-ci.org/yujinakayama/safedep)
4
- [![Coverage Status](http://img.shields.io/coveralls/yujinakayama/safedep/master.svg?style=flat)](https://coveralls.io/r/yujinakayama/safedep)
5
- [![Code Climate](https://img.shields.io/codeclimate/github/yujinakayama/safedep.svg?style=flat)](https://codeclimate.com/github/yujinakayama/safedep)
3
+ [![Coverage Status](https://coveralls.io/repos/yujinakayama/safedep/badge.svg?branch=master&service=github)](https://coveralls.io/github/yujinakayama/safedep?branch=master)
4
+ [![Code Climate](https://codeclimate.com/github/yujinakayama/safedep/badges/gpa.svg)](https://codeclimate.com/github/yujinakayama/safedep)
6
5
 
7
6
  # Safedep
8
7
 
@@ -91,7 +90,7 @@ $ safedep --without development,test
91
90
 
92
91
  ## Compatibility
93
92
 
94
- Tested on MRI 1.9.3, 2.0, 2.1, 2.2 and JRuby in 1.9 mode.
93
+ Tested on MRI 2.2, 2.3, 2.4, 2.5 and JRuby 9000.
95
94
 
96
95
  ## License
97
96
 
data/Rakefile CHANGED
@@ -9,4 +9,4 @@ end
9
9
 
10
10
  RuboCop::RakeTask.new(:style)
11
11
 
12
- task ci: [:spec, :style]
12
+ task ci: %i[spec style]
@@ -32,7 +32,7 @@ module Safedep
32
32
  def decompose_version
33
33
  elements = version.to_s.split('.')
34
34
 
35
- [:major, :minor, :patch].each do |role|
35
+ %i[major minor patch].each do |role|
36
36
  if elements.first && elements.first.match(/^\d+$/)
37
37
  instance_variable_set("@#{role}", elements.shift)
38
38
  else
@@ -24,7 +24,7 @@ module Safedep
24
24
  lockfile_dep = gemfile_lock.find_dependency(dep.name)
25
25
 
26
26
  unless lockfile_dep
27
- fail Error, "#{dep.name.inspect} definition is not found in #{gemfile_lock.path}. " \
27
+ raise Error, "#{dep.name.inspect} definition is not found in #{gemfile_lock.path}. " \
28
28
  'Please run `bundle install`.'
29
29
  end
30
30
 
@@ -72,13 +72,13 @@ module Safedep
72
72
  return if File.exist?(path)
73
73
  message = "#{path} is not found."
74
74
  message << ' ' + additional_message if additional_message
75
- fail Error, message
75
+ raise Error, message
76
76
  end
77
77
 
78
78
  def should_ignore?(dependency)
79
79
  return true unless dependency.version_specifiers.empty?
80
80
  return true unless (dependency.groups & configuration.skipped_groups).empty?
81
- [:git, :github, :path].any? { |key| dependency.options[key] }
81
+ %i[git github path].any? { |key| dependency.options[key] }
82
82
  end
83
83
 
84
84
  def version_specifiers(version)
@@ -2,8 +2,8 @@ module Safedep
2
2
  # http://semver.org/
3
3
  module Version
4
4
  MAJOR = 0
5
- MINOR = 3
6
- PATCH = 2
5
+ MINOR = 4
6
+ PATCH = 0
7
7
 
8
8
  def self.to_s
9
9
  [MAJOR, MINOR, PATCH].join('.')
@@ -1,4 +1,3 @@
1
- # coding: utf-8
2
1
  lib = File.expand_path('../lib', __FILE__)
3
2
  $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
4
3
  require 'safedep/version'
@@ -19,6 +18,6 @@ Gem::Specification.new do |spec|
19
18
  spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
20
19
  spec.require_paths = ['lib']
21
20
 
22
- spec.add_runtime_dependency 'bundler', '~> 1.7'
23
- spec.add_runtime_dependency 'gemologist', '>= 0.2.1', '< 1.0'
21
+ spec.add_runtime_dependency 'bundler', '>= 1.7'
22
+ spec.add_runtime_dependency 'gemologist', '>= 0.3'
24
23
  end
@@ -6,7 +6,7 @@ LineLength:
6
6
  Max: 120
7
7
 
8
8
  # raise_error matcher always requires {} form block.
9
- Blocks:
9
+ BlockDelimiters:
10
10
  Enabled: false
11
11
 
12
12
  # Sometimes block alignment does not suit RSpec syntax.
@@ -16,3 +16,6 @@ BlockAlignment:
16
16
  # Suppress offences for namespace classes only with #describe.
17
17
  ClassLength:
18
18
  Enabled: false
19
+
20
+ ModuleLength:
21
+ Enabled: false
@@ -15,7 +15,7 @@ module FileHelper
15
15
  when Array
16
16
  file.puts content.join("\n")
17
17
  else
18
- fail 'Unsupported type!'
18
+ raise 'Unsupported type!'
19
19
  end
20
20
  end
21
21
  end
metadata CHANGED
@@ -1,27 +1,27 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: safedep
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.2
4
+ version: 0.4.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Yuji Nakayama
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-06-29 00:00:00.000000000 Z
11
+ date: 2019-06-05 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
15
15
  requirement: !ruby/object:Gem::Requirement
16
16
  requirements:
17
- - - "~>"
17
+ - - ">="
18
18
  - !ruby/object:Gem::Version
19
19
  version: '1.7'
20
20
  type: :runtime
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
- - - "~>"
24
+ - - ">="
25
25
  - !ruby/object:Gem::Version
26
26
  version: '1.7'
27
27
  - !ruby/object:Gem::Dependency
@@ -30,20 +30,14 @@ dependencies:
30
30
  requirements:
31
31
  - - ">="
32
32
  - !ruby/object:Gem::Version
33
- version: 0.2.1
34
- - - "<"
35
- - !ruby/object:Gem::Version
36
- version: '1.0'
33
+ version: '0.3'
37
34
  type: :runtime
38
35
  prerelease: false
39
36
  version_requirements: !ruby/object:Gem::Requirement
40
37
  requirements:
41
38
  - - ">="
42
39
  - !ruby/object:Gem::Version
43
- version: 0.2.1
44
- - - "<"
45
- - !ruby/object:Gem::Version
46
- version: '1.0'
40
+ version: '0.3'
47
41
  description: Make your Gemfile safe by adding dependency version specifiers automatically.
48
42
  email:
49
43
  - nkymyj@gmail.com
@@ -98,8 +92,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
98
92
  - !ruby/object:Gem::Version
99
93
  version: '0'
100
94
  requirements: []
101
- rubyforge_project:
102
- rubygems_version: 2.4.8
95
+ rubygems_version: 3.0.3
103
96
  signing_key:
104
97
  specification_version: 4
105
98
  summary: Make your Gemfile safe by adding dependency version specifiers automatically.