qb 0.3.6 → 0.3.7
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/qb/package/version.rb +6 -2
- data/lib/qb/path.rb +88 -0
- data/lib/qb/version.rb +1 -1
- data/qb.gemspec +1 -1
- metadata +5 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: a666712edbad3cabb581a2f91202b3d25448d9df
|
4
|
+
data.tar.gz: 0f396ef64b4ec6986705ba766ec8274e8c73c43f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: cd24c18f6efb9a5725062494fc7d50336380a6bd9f17808db5dfe12c8b2d9ac1dfb03e9ba1a114509a3c3f6846d8549129a1d8b7bb54dc14981ab31bc5d59b0d
|
7
|
+
data.tar.gz: 0d1b2fd63fa86988cb3aff0deed0103a18b328f1f39c4906775b98443d1e9adb0028c8586c052cab90a4b168fd0ecced313cbc822e7955f0f7a1812fae8c6572
|
data/lib/qb/package/version.rb
CHANGED
@@ -152,7 +152,7 @@ module QB
|
|
152
152
|
def self.from_string string
|
153
153
|
if string.include? '_'
|
154
154
|
self.from_docker_tag string
|
155
|
-
elsif string.include? '-'
|
155
|
+
elsif string.include?( '-' ) || string.include?( '+' )
|
156
156
|
self.from_npm_version string
|
157
157
|
else
|
158
158
|
self.from_gem_version Gem::Version.new(string)
|
@@ -170,7 +170,11 @@ module QB
|
|
170
170
|
@release = [major, minor, patch].join '.'
|
171
171
|
|
172
172
|
@level = t.match prerelease[0], {
|
173
|
-
t.is(nil) => ->(_) {
|
173
|
+
t.is(nil) => ->(_) {
|
174
|
+
if build.empty?
|
175
|
+
'release'
|
176
|
+
end
|
177
|
+
},
|
174
178
|
|
175
179
|
NAME_SEGMENT => ->(str) { str },
|
176
180
|
|
data/lib/qb/path.rb
ADDED
@@ -0,0 +1,88 @@
|
|
1
|
+
# Requirements
|
2
|
+
# =======================================================================
|
3
|
+
|
4
|
+
# Stdlib
|
5
|
+
# -----------------------------------------------------------------------
|
6
|
+
|
7
|
+
require 'pathname'
|
8
|
+
|
9
|
+
|
10
|
+
# Deps
|
11
|
+
# -----------------------------------------------------------------------
|
12
|
+
|
13
|
+
require 'nrser'
|
14
|
+
|
15
|
+
|
16
|
+
# Package
|
17
|
+
# -----------------------------------------------------------------------
|
18
|
+
|
19
|
+
|
20
|
+
# Refinements
|
21
|
+
# =======================================================================
|
22
|
+
|
23
|
+
require 'nrser/refinements'
|
24
|
+
using NRSER
|
25
|
+
|
26
|
+
require 'nrser/refinements/types'
|
27
|
+
using NRSER::Types
|
28
|
+
|
29
|
+
|
30
|
+
# Declarations
|
31
|
+
# =======================================================================
|
32
|
+
|
33
|
+
module QB; end
|
34
|
+
|
35
|
+
|
36
|
+
# Definitions
|
37
|
+
# =======================================================================
|
38
|
+
|
39
|
+
|
40
|
+
# @todo document QB::Path class.
|
41
|
+
class QB::Path < Pathname
|
42
|
+
|
43
|
+
# Mixins
|
44
|
+
# =====================================================================
|
45
|
+
|
46
|
+
include NRSER::Meta::Props
|
47
|
+
|
48
|
+
|
49
|
+
# Constants
|
50
|
+
# ======================================================================
|
51
|
+
|
52
|
+
|
53
|
+
# Class Methods
|
54
|
+
# ======================================================================
|
55
|
+
|
56
|
+
|
57
|
+
# Props
|
58
|
+
# ======================================================================
|
59
|
+
|
60
|
+
prop :raw, type: t.
|
61
|
+
prop :expanded, type: t.pathname, source: :expand_path
|
62
|
+
prop :exists, type: t.bool, source: :exists?
|
63
|
+
prop :is_expanded, type: t.bool, source: :expanded?
|
64
|
+
|
65
|
+
# Constructor
|
66
|
+
# ======================================================================
|
67
|
+
|
68
|
+
# Instantiate a new `QB::Path`.
|
69
|
+
def initialize raw:, cwd: Pathname.getwd
|
70
|
+
@raw = raw
|
71
|
+
super @raw
|
72
|
+
end # #initialize
|
73
|
+
|
74
|
+
|
75
|
+
# Instance Methods
|
76
|
+
# ======================================================================
|
77
|
+
|
78
|
+
# @return [Boolean]
|
79
|
+
# `true` if
|
80
|
+
def expanded?
|
81
|
+
|
82
|
+
end
|
83
|
+
|
84
|
+
end # class QB::Path
|
85
|
+
|
86
|
+
|
87
|
+
# Post-Processing
|
88
|
+
# =======================================================================
|
data/lib/qb/version.rb
CHANGED
data/qb.gemspec
CHANGED
@@ -95,7 +95,7 @@ Gem::Specification.new do |spec|
|
|
95
95
|
spec.add_development_dependency "pry"
|
96
96
|
|
97
97
|
spec.add_dependency "cmds",'~> 0.0', ">= 0.2.2"
|
98
|
-
spec.add_dependency "nrser",'~> 0.0', ">= 0.0.
|
98
|
+
spec.add_dependency "nrser",'~> 0.0', ">= 0.0.24"
|
99
99
|
spec.add_dependency "nrser-extras", '~> 0.0', ">= 0.0.3"
|
100
100
|
spec.add_dependency "state_mate", '~> 0.0', ">= 0.0.9"
|
101
101
|
spec.add_dependency 'parseconfig', '~> 1.0', '>= 1.0.8'
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: qb
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.3.
|
4
|
+
version: 0.3.7
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- nrser
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2017-09-
|
11
|
+
date: 2017-09-24 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -109,7 +109,7 @@ dependencies:
|
|
109
109
|
version: '0.0'
|
110
110
|
- - ">="
|
111
111
|
- !ruby/object:Gem::Version
|
112
|
-
version: 0.0.
|
112
|
+
version: 0.0.24
|
113
113
|
type: :runtime
|
114
114
|
prerelease: false
|
115
115
|
version_requirements: !ruby/object:Gem::Requirement
|
@@ -119,7 +119,7 @@ dependencies:
|
|
119
119
|
version: '0.0'
|
120
120
|
- - ">="
|
121
121
|
- !ruby/object:Gem::Version
|
122
|
-
version: 0.0.
|
122
|
+
version: 0.0.24
|
123
123
|
- !ruby/object:Gem::Dependency
|
124
124
|
name: nrser-extras
|
125
125
|
requirement: !ruby/object:Gem::Requirement
|
@@ -209,6 +209,7 @@ files:
|
|
209
209
|
- lib/qb/options.rb
|
210
210
|
- lib/qb/options/option.rb
|
211
211
|
- lib/qb/package/version.rb
|
212
|
+
- lib/qb/path.rb
|
212
213
|
- lib/qb/repo.rb
|
213
214
|
- lib/qb/repo/git.rb
|
214
215
|
- lib/qb/role.rb
|