gemfile_entry 0.0.0 → 0.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/README.md +1 -0
- data/gemfile_entry.gemspec +1 -0
- data/lib/gemfile_entry.rb +4 -4
- data/lib/gemfile_entry/version.rb +1 -1
- metadata +16 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 4251cc4e11981178677c371034c8623e6a45db8d
|
4
|
+
data.tar.gz: 16641b3c3efcda77331572fce8705a86fe2bda41
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 2ffdc3fc255ca66a618a2d1f8a8fef7922bd90fc06e63f736300af2db640b57c2f11561f1b66adf009b886fbc65669915b6db0f7d08ce58712b574d4c954f06a
|
7
|
+
data.tar.gz: bb852fb878b0e6cd988063a2b9b3e4aaa1466473c29ac5aa89b896528cffbe40a401b88cf999b204ba7bb7969549f05ccbeba38de7478099dcac37c23ed2c5db
|
data/README.md
CHANGED
@@ -1,5 +1,6 @@
|
|
1
1
|
# GemfileEntry
|
2
2
|
|
3
|
+
[](https://badge.fury.io/rb/gemfile_entry)
|
3
4
|
[](https://circleci.com/gh/jhsu802701/gemfile_entry)
|
4
5
|
[](https://gemnasium.com/github.com/jhsu802701/gemfile_entry)
|
5
6
|
[](https://hakiri.io/github/jhsu802701/gemfile_entry/master)
|
data/gemfile_entry.gemspec
CHANGED
data/lib/gemfile_entry.rb
CHANGED
@@ -14,12 +14,12 @@ module GemfileEntry
|
|
14
14
|
def self.active(gem1)
|
15
15
|
# NOTE: The delete and gsub commands do not work for removing
|
16
16
|
# substrings containing dashes.
|
17
|
-
# As a result, - is converted to
|
17
|
+
# As a result, - is converted to +.
|
18
18
|
path = `bundle show #{gem1}`
|
19
19
|
path_last = path.split('/').last
|
20
|
-
path_last_u = path_last.tr('-', '
|
21
|
-
gem1_u = gem1.tr('-', '
|
22
|
-
version = path_last_u.
|
20
|
+
path_last_u = path_last.tr('-', '+')
|
21
|
+
gem1_u = gem1.tr('-', '+')
|
22
|
+
version = path_last_u.gsub(gem1_u, '').delete('+').delete("\n")
|
23
23
|
gemfile_line = "gem '#{gem1}', '#{version}'"
|
24
24
|
gemfile_line
|
25
25
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: gemfile_entry
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Jason Hsu
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2017-
|
11
|
+
date: 2017-05-01 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -150,6 +150,20 @@ dependencies:
|
|
150
150
|
- - ">="
|
151
151
|
- !ruby/object:Gem::Version
|
152
152
|
version: '0'
|
153
|
+
- !ruby/object:Gem::Dependency
|
154
|
+
name: sqlite3
|
155
|
+
requirement: !ruby/object:Gem::Requirement
|
156
|
+
requirements:
|
157
|
+
- - ">="
|
158
|
+
- !ruby/object:Gem::Version
|
159
|
+
version: '0'
|
160
|
+
type: :development
|
161
|
+
prerelease: false
|
162
|
+
version_requirements: !ruby/object:Gem::Requirement
|
163
|
+
requirements:
|
164
|
+
- - ">="
|
165
|
+
- !ruby/object:Gem::Version
|
166
|
+
version: '0'
|
153
167
|
description: Create a Gemfile line that specifies either the latest version of a gem
|
154
168
|
or the version currently in use.
|
155
169
|
email:
|