kapost-bootstrapper 1.0.1 → 1.0.2

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
  SHA1:
3
- metadata.gz: d25f46f41f2dd17b6f48f21f597b85d9ba45f785
4
- data.tar.gz: 40a5ce4bd94fba186f4a2099ade71660784f3ae9
3
+ metadata.gz: 86997383d8e676367b5ac03ea1f8716a5a459f22
4
+ data.tar.gz: 6c62f4ebab42988018d46aef5a58d5a561e665f1
5
5
  SHA512:
6
- metadata.gz: b573289f974731954c7c07df510ce08691643066edf30240801afb0d94a4d1b9b2e9c8b9847c76210e375b08b7d27e3cf90e27c7cdbaa02cf515a5c8a67356d1
7
- data.tar.gz: 62364c031cb0ccfc63399f56a4ce9833a6a0902c54b024dc8ebe028d5a318bd6a8dfacad0bfa6ac9481a636707293cecddf549e91c4dd666b0668ccfd0498df7
6
+ metadata.gz: f3507ecce183b114aed5c4aa08989653763b8aa0ebdd0ced1d8733a43c0997393f79a41ef42582ac6168eed129cf20d91bc6c821e451542be3d952b677950bf8
7
+ data.tar.gz: 1aadb4eb4a5746aba5cbb98c4152f4790d553cd2184ab2e54f48bb4f73ed893df3dfca5757a1050001d27b5c5e2527c94f99dd0086e8ae436d6f178cdde6305c
data/Gemfile CHANGED
@@ -8,4 +8,5 @@ group :development, :test do
8
8
  gem "guard-rspec"
9
9
 
10
10
  gem "codeclimate-test-reporter", require: nil
11
+ gem "semantic"
11
12
  end
@@ -91,9 +91,18 @@ module Kapost
91
91
 
92
92
  def right_version?(command, expected_version)
93
93
  version, status = cli.capture2e "#{command} --version"
94
- status.success? && version.include?(expected_version) && version
94
+ if expected_version[0] == '^'
95
+ next_major = (expected_version[1].to_i + 1).to_s
96
+ Gem::Version.new(version) >= Gem::Version.new(expected_version[1..-1]) && Gem::Version.new(version) < Gem::Version.new(next_major)
97
+ elsif expected_version[0] == "="
98
+ Gem::Version.new(version) == Gem::Version.new(expected_version[1..-1])
99
+ else
100
+ local_version = Semantic::Version.new(version)
101
+ local_version.satisfies?(expected_version)
102
+ end
95
103
  end
96
104
 
105
+
97
106
  def say(message)
98
107
  if block_given?
99
108
  # If we're given a block print a label with a success indicator
@@ -1,5 +1,5 @@
1
1
  module Kapost
2
2
  class Bootstrapper
3
- VERSION = "1.0.1"
3
+ VERSION = "1.0.2"
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: kapost-bootstrapper
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.1
4
+ version: 1.0.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Paul Sadauskas
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2017-01-17 00:00:00.000000000 Z
11
+ date: 2017-11-13 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -94,7 +94,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
94
94
  version: '0'
95
95
  requirements: []
96
96
  rubyforge_project:
97
- rubygems_version: 2.5.1
97
+ rubygems_version: 2.6.12
98
98
  signing_key:
99
99
  specification_version: 4
100
100
  summary: A small helper utility for your app to declare and setup its system dependencies