gemfile_entry 0.0.0 → 0.0.1

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: 6abb49f718daf96931560650639c26fa180b6f47
4
- data.tar.gz: 46c60149c98f10bb86fbbc6021f21e0d86dc5224
3
+ metadata.gz: 4251cc4e11981178677c371034c8623e6a45db8d
4
+ data.tar.gz: 16641b3c3efcda77331572fce8705a86fe2bda41
5
5
  SHA512:
6
- metadata.gz: 8aa534a9fb3b1c8d23274c10d0c64b02dc85954d8b17befbb08dac77cd14c41aaa0823fad2d01e29774f725cf363f870c5e6d01fe51ecc710b5045f6c7a4cd72
7
- data.tar.gz: d5dbff3f69627f1f213681d214aa0e87160d226c7fcc5629619a50ea96a6329aa882fe0cf4b6fefe5ad28ce2dad9c2a365d26f5c1c26be83c36368f4c7166b05
6
+ metadata.gz: 2ffdc3fc255ca66a618a2d1f8a8fef7922bd90fc06e63f736300af2db640b57c2f11561f1b66adf009b886fbc65669915b6db0f7d08ce58712b574d4c954f06a
7
+ data.tar.gz: bb852fb878b0e6cd988063a2b9b3e4aaa1466473c29ac5aa89b896528cffbe40a401b88cf999b204ba7bb7969549f05ccbeba38de7478099dcac37c23ed2c5db
data/README.md CHANGED
@@ -1,5 +1,6 @@
1
1
  # GemfileEntry
2
2
 
3
+ [![Gem Version](https://badge.fury.io/rb/gemfile_entry.svg)](https://badge.fury.io/rb/gemfile_entry)
3
4
  [![CircleCI](https://circleci.com/gh/jhsu802701/gemfile_entry.svg?style=svg)](https://circleci.com/gh/jhsu802701/gemfile_entry)
4
5
  [![Dependency Status](https://gemnasium.com/badges/github.com/jhsu802701/gemfile_entry.svg)](https://gemnasium.com/github.com/jhsu802701/gemfile_entry)
5
6
  [![security](https://hakiri.io/github/jhsu802701/gemfile_entry/master.svg)](https://hakiri.io/github/jhsu802701/gemfile_entry/master)
@@ -32,4 +32,5 @@ Gem::Specification.new do |spec|
32
32
  spec.add_development_dependency 'sandi_meter'
33
33
  spec.add_development_dependency 'rubocop'
34
34
  spec.add_development_dependency 'codeclimate-test-reporter'
35
+ spec.add_development_dependency 'sqlite3'
35
36
  end
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.delete(gem1_u).delete('_').delete("\n")
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
@@ -1,4 +1,4 @@
1
1
  #
2
2
  module GemfileEntry
3
- VERSION = '0.0.0'.freeze
3
+ VERSION = '0.0.1'.freeze
4
4
  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.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-04-28 00:00:00.000000000 Z
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: