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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 9a671665314caccaed7053ef5d64985ef78e1e71
4
- data.tar.gz: 9eb0fb78e1644b1ff4b19df565898300df2e9772
3
+ metadata.gz: 09dcd9139ed33e8ce745e7c95c605b6e53108bba
4
+ data.tar.gz: e39340a89d4827fe3913f4e559f91efd535b6a89
5
5
  SHA512:
6
- metadata.gz: 9e230119799f7fdf68d0b57d5a626e8338179b2140d62d83c89e744f3613ac41b3152a4135dd2a6aad50bd68855823592b46f8b69849c8ee5782a2129747c5cc
7
- data.tar.gz: 6613e4a97ba5f87a9c55171842eb13503db28f658076b3ef8bcff63b68c686cb7fce866d74f3806dbaffbc43c29341febb41ee233f6d271495b612b4e46e8fb4
6
+ metadata.gz: 586e55c49ade9d40a182810000853b22946701621ff11275af618ebadada3295c06e5519e52aa28aa98831f6b41196a80237bc2349adf57b26bfa784ff9183d1
7
+ data.tar.gz: 3e93773fd1d0590125e5e43811b52966a9f0930be22ecc0ad9138e9ff5c688772b32deddc06a113782a3e13bd7fd0ce106c134a49cc8466d4cba6aa35df07d1c
data/Gemfile CHANGED
@@ -1,4 +1,4 @@
1
1
  source 'https://rubygems.org'
2
2
 
3
3
  # Specify your gem's dependencies in gemput.gemspec
4
- gemspec
4
+ gemspec
@@ -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
- f.sub(/\s+\Z/, "")
30
- f.puts "\ngem '#{gem_info['name']}', '~> #{gem_info['version']}'"
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 ''
@@ -1,3 +1,3 @@
1
1
  module Gemput
2
- VERSION = "0.1.3"
2
+ VERSION = "0.1.3.1"
3
3
  end
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-27 00:00:00.000000000 Z
12
+ date: 2015-05-04 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: bundler