gemput 0.1.3 → 0.1.3.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile +1 -1
- data/lib/gemput.rb +8 -5
- data/lib/gemput/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 09dcd9139ed33e8ce745e7c95c605b6e53108bba
|
4
|
+
data.tar.gz: e39340a89d4827fe3913f4e559f91efd535b6a89
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 586e55c49ade9d40a182810000853b22946701621ff11275af618ebadada3295c06e5519e52aa28aa98831f6b41196a80237bc2349adf57b26bfa784ff9183d1
|
7
|
+
data.tar.gz: 3e93773fd1d0590125e5e43811b52966a9f0930be22ecc0ad9138e9ff5c688772b32deddc06a113782a3e13bd7fd0ce106c134a49cc8466d4cba6aa35df07d1c
|
data/Gemfile
CHANGED
data/lib/gemput.rb
CHANGED
@@ -19,15 +19,18 @@ module Gemput
|
|
19
19
|
puts ' 1-3 gemput -a GEM_NAME'
|
20
20
|
puts ''
|
21
21
|
return
|
22
|
-
end
|
23
|
-
|
24
|
-
lines = File.open(filename).to_a
|
22
|
+
end
|
25
23
|
|
24
|
+
gem_info = Gems.info(gem_name)
|
26
25
|
|
27
26
|
unless gem_info['name'].nil?
|
27
|
+
|
28
|
+
cursor_new_line = !!(/\n$/ =~ File.open('Gemfile').to_a.last)
|
28
29
|
open('Gemfile', 'a') { |f|
|
29
|
-
|
30
|
-
|
30
|
+
unless cursor_new_line
|
31
|
+
f.puts "\n"
|
32
|
+
end
|
33
|
+
f.puts "gem '#{gem_info['name']}', '~> #{gem_info['version']}'"
|
31
34
|
puts ''
|
32
35
|
puts " '#{gem_info['name']}' gem added."
|
33
36
|
puts ''
|
data/lib/gemput/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: gemput
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.3
|
4
|
+
version: 0.1.3.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- stompesi
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2015-04
|
12
|
+
date: 2015-05-04 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: bundler
|