label 0.1.5 → 0.1.6
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/label.rb +4 -2
- data/lib/label/version.rb +1 -1
- data/spec/fixtures/processed_gemfile +6 -1
- data/spec/fixtures/stock_gemfile +5 -1
- data/spec/label_spec.rb +4 -0
- metadata +15 -16
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: c7dea93831bc0aa3c9e53a98ff01ae217134a2b6
|
4
|
+
data.tar.gz: 82c142f19d4ee49c83b1a0128f684a463a02ea6f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: dbf0abed36706032026ac70492566eefddafae32a4a08b9317a242932c109af5def2c61c6e54648f2baa25176baaed7140771cf1605fe015515000a7997a26b8
|
7
|
+
data.tar.gz: 2218bd9f7bb681ee4a887839d7943ab1a9ac30df8cd7c3a79817ea74d0eb64a89009ccdcd7fb4eea75ab66437073d72d3e5aa6f63d97cc6516e82a8a33ca2603
|
data/lib/label.rb
CHANGED
@@ -108,8 +108,10 @@ module Label
|
|
108
108
|
source = {}
|
109
109
|
options = line.split ","
|
110
110
|
options[1, options.length - 1].each do |option|
|
111
|
-
|
112
|
-
|
111
|
+
if option.match(/:/)
|
112
|
+
args = option.split(":").map {|arg| arg.strip.gsub(/('|\")/, '') }
|
113
|
+
source[args.first.to_sym] = args.last
|
114
|
+
end
|
113
115
|
end
|
114
116
|
source[:rubygems] = true if source.empty?
|
115
117
|
source
|
data/lib/label/version.rb
CHANGED
@@ -29,9 +29,14 @@ group :test do
|
|
29
29
|
gem 'guard'
|
30
30
|
end
|
31
31
|
|
32
|
-
group :development
|
32
|
+
group :development do
|
33
33
|
# Label labels the gems in your Gemfile
|
34
34
|
gem 'label', path: './'
|
35
35
|
# An IRB alternative and runtime developer console
|
36
36
|
gem 'pry', github: 'pry/pry', branch: 'development'
|
37
37
|
end
|
38
|
+
|
39
|
+
group :development, :test do
|
40
|
+
# Rspec for Rails
|
41
|
+
gem 'rspec-rails', '~> 3.0.0.beta2'
|
42
|
+
end
|
data/spec/fixtures/stock_gemfile
CHANGED
@@ -21,7 +21,11 @@ group :test do
|
|
21
21
|
gem 'guard'
|
22
22
|
end
|
23
23
|
|
24
|
-
group :development
|
24
|
+
group :development do
|
25
25
|
gem 'label', path: './'
|
26
26
|
gem 'pry', github: 'pry/pry', branch: 'development'
|
27
27
|
end
|
28
|
+
|
29
|
+
group :development, :test do
|
30
|
+
gem 'rspec-rails', '~> 3.0.0.beta2'
|
31
|
+
end
|
data/spec/label_spec.rb
CHANGED
@@ -49,6 +49,10 @@ describe Label do
|
|
49
49
|
allow(subject).to receive(:describe).with("pry", github: "pry/pry", branch: "development")
|
50
50
|
.and_return("An IRB alternative and runtime developer console")
|
51
51
|
|
52
|
+
allow(subject).to receive(:describe).with("rspec-rails", rubygems: true).and_return(
|
53
|
+
"Rspec for Rails"
|
54
|
+
)
|
55
|
+
|
52
56
|
expect(subject.process("Gemfile")).to eq fixture("processed_gemfile")
|
53
57
|
end
|
54
58
|
end
|
metadata
CHANGED
@@ -1,69 +1,69 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: label
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.6
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Johannes Gorset
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-
|
11
|
+
date: 2014-05-08 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: gems
|
15
15
|
requirement: !ruby/object:Gem::Requirement
|
16
16
|
requirements:
|
17
|
-
- - ~>
|
17
|
+
- - "~>"
|
18
18
|
- !ruby/object:Gem::Version
|
19
19
|
version: '0.8'
|
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: '0.8'
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: bundler
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
30
30
|
requirements:
|
31
|
-
- - ~>
|
31
|
+
- - "~>"
|
32
32
|
- !ruby/object:Gem::Version
|
33
33
|
version: '1.3'
|
34
34
|
type: :development
|
35
35
|
prerelease: false
|
36
36
|
version_requirements: !ruby/object:Gem::Requirement
|
37
37
|
requirements:
|
38
|
-
- - ~>
|
38
|
+
- - "~>"
|
39
39
|
- !ruby/object:Gem::Version
|
40
40
|
version: '1.3'
|
41
41
|
- !ruby/object:Gem::Dependency
|
42
42
|
name: rake
|
43
43
|
requirement: !ruby/object:Gem::Requirement
|
44
44
|
requirements:
|
45
|
-
- -
|
45
|
+
- - ">="
|
46
46
|
- !ruby/object:Gem::Version
|
47
47
|
version: '0'
|
48
48
|
type: :development
|
49
49
|
prerelease: false
|
50
50
|
version_requirements: !ruby/object:Gem::Requirement
|
51
51
|
requirements:
|
52
|
-
- -
|
52
|
+
- - ">="
|
53
53
|
- !ruby/object:Gem::Version
|
54
54
|
version: '0'
|
55
55
|
- !ruby/object:Gem::Dependency
|
56
56
|
name: rspec
|
57
57
|
requirement: !ruby/object:Gem::Requirement
|
58
58
|
requirements:
|
59
|
-
- -
|
59
|
+
- - ">="
|
60
60
|
- !ruby/object:Gem::Version
|
61
61
|
version: '0'
|
62
62
|
type: :development
|
63
63
|
prerelease: false
|
64
64
|
version_requirements: !ruby/object:Gem::Requirement
|
65
65
|
requirements:
|
66
|
-
- -
|
66
|
+
- - ">="
|
67
67
|
- !ruby/object:Gem::Version
|
68
68
|
version: '0'
|
69
69
|
description: Labels gems in your Gemfile
|
@@ -74,8 +74,8 @@ executables:
|
|
74
74
|
extensions: []
|
75
75
|
extra_rdoc_files: []
|
76
76
|
files:
|
77
|
-
- .gitignore
|
78
|
-
- .travis.yml
|
77
|
+
- ".gitignore"
|
78
|
+
- ".travis.yml"
|
79
79
|
- AUTHORS.md
|
80
80
|
- Gemfile
|
81
81
|
- LICENSE.txt
|
@@ -105,17 +105,17 @@ require_paths:
|
|
105
105
|
- lib
|
106
106
|
required_ruby_version: !ruby/object:Gem::Requirement
|
107
107
|
requirements:
|
108
|
-
- -
|
108
|
+
- - ">="
|
109
109
|
- !ruby/object:Gem::Version
|
110
110
|
version: '0'
|
111
111
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
112
112
|
requirements:
|
113
|
-
- -
|
113
|
+
- - ">="
|
114
114
|
- !ruby/object:Gem::Version
|
115
115
|
version: '0'
|
116
116
|
requirements: []
|
117
117
|
rubyforge_project:
|
118
|
-
rubygems_version: 2.2.
|
118
|
+
rubygems_version: 2.2.0
|
119
119
|
signing_key:
|
120
120
|
specification_version: 4
|
121
121
|
summary: Label labels the gems in your Gemfile
|
@@ -127,4 +127,3 @@ test_files:
|
|
127
127
|
- spec/label/summary_extractor_spec.rb
|
128
128
|
- spec/label_spec.rb
|
129
129
|
- spec/spec_helper.rb
|
130
|
-
has_rdoc:
|