gemline 0.2.0 → 0.3.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA1:
3
+ metadata.gz: b477530ba54e0d01ef9b6d1d8b14558ca31df61b
4
+ data.tar.gz: 937b5147e4a61aa1cc5c9f6a1997efab713d0b20
5
+ SHA512:
6
+ metadata.gz: 746440bfce43215d36762ac2611037df79d44f83138bb392f46afad30c8cbe689e8e072c46f65379e2cb1ef16b376bdc09a373383b44335f31e093e6c8157add
7
+ data.tar.gz: 5006c40353f20ee36c8613feac34a06dfddb52a38560f7a648befda01987df8a40b2124b3c6ea9157afc06861daac71949f80c1962ca1e632073f598436c9f0b
@@ -1,6 +1,6 @@
1
- rvm:
1
+ rvm:
2
2
  - 1.8.7
3
3
  - 1.9.2
4
4
  - 1.9.3
5
+ - 2.0.0
5
6
  - jruby
6
-
@@ -13,9 +13,11 @@ Gem::Specification.new do |gem|
13
13
  gem.name = "gemline"
14
14
  gem.require_paths = ["lib"]
15
15
 
16
- gem.version = '0.2.0'
16
+ gem.version = '0.3.0'
17
17
 
18
- gem.add_dependency('json_pure', ["~> 1.7.6"])
19
- gem.add_development_dependency('rake') # For Travis CI
20
- gem.add_development_dependency(%q<rspec>, [">= 2.11.0"])
18
+ gem.add_dependency "json_pure", ">= 1.7.6"
19
+ gem.add_dependency "clipboard", ">= 1.0.1"
20
+
21
+ gem.add_development_dependency "rake" # For Travis CI
22
+ gem.add_development_dependency "rspec", ">= 2.11.0"
21
23
  end
@@ -1,6 +1,6 @@
1
1
  require 'json/pure'
2
2
  require 'net/https'
3
-
3
+ require 'clipboard'
4
4
 
5
5
  class Gemline
6
6
  attr_accessor :gem, :gemline, :json, :response
@@ -64,7 +64,7 @@ class Gemline
64
64
  end
65
65
 
66
66
  def self.gemspec_gemline(gem_name, version)
67
- %Q{gem.add_dependency(%q<#{gem_name}>, ["~> #{version}"])}
67
+ %Q{gem.add_dependency "#{gem_name}", ">= #{version}"}
68
68
  end
69
69
 
70
70
 
@@ -83,13 +83,10 @@ class Gemline
83
83
 
84
84
  def self.copy_to_clipboard(gemline)
85
85
  begin
86
- if clipboard = IO.popen('pbcopy', 'r+')
87
- clipboard.puts gemline
88
- $stderr.puts " Gem line copied to your clipboard. Ready to paste into your Gemfile"
89
- end
86
+ Clipboard.copy gemline
87
+ $stderr.puts " Gem line copied to your clipboard. Ready to paste into your Gemfile"
90
88
  rescue
91
- ## Yeah, I hate this too. But it does what I want -- silently fail if pbcopy isn't available.
92
- ## TODO: Use something more reliable and cross-platform.
89
+ ## Yeah, I hate this too. But it does what I want -- silently fail if Clipboard fails.
93
90
  end
94
91
  end
95
92
 
@@ -32,7 +32,7 @@ describe Gemline do
32
32
 
33
33
  it "should be able to generate a gemspec-style gemline" do
34
34
  g = Gemline.new('rails', :gemspec => true)
35
- expect(g.gemline).to eq(%Q!gem.add_dependency(%q<rails>, ["~> 3.1.1"])!)
35
+ expect(g.gemline).to eq(%Q!gem.add_dependency "rails", ">= 3.1.1"!)
36
36
  end
37
37
 
38
38
  end
metadata CHANGED
@@ -1,62 +1,69 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: gemline
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.0
5
- prerelease:
4
+ version: 0.3.0
6
5
  platform: ruby
7
6
  authors:
8
7
  - Joseph Alba
9
8
  autorequire:
10
9
  bindir: bin
11
10
  cert_chain: []
12
- date: 2013-02-04 00:00:00.000000000 Z
11
+ date: 2013-03-27 00:00:00.000000000 Z
13
12
  dependencies:
14
13
  - !ruby/object:Gem::Dependency
15
14
  name: json_pure
16
15
  requirement: !ruby/object:Gem::Requirement
17
- none: false
18
16
  requirements:
19
- - - ~>
17
+ - - '>='
20
18
  - !ruby/object:Gem::Version
21
19
  version: 1.7.6
22
20
  type: :runtime
23
21
  prerelease: false
24
22
  version_requirements: !ruby/object:Gem::Requirement
25
- none: false
26
23
  requirements:
27
- - - ~>
24
+ - - '>='
28
25
  - !ruby/object:Gem::Version
29
26
  version: 1.7.6
27
+ - !ruby/object:Gem::Dependency
28
+ name: clipboard
29
+ requirement: !ruby/object:Gem::Requirement
30
+ requirements:
31
+ - - '>='
32
+ - !ruby/object:Gem::Version
33
+ version: 1.0.1
34
+ type: :runtime
35
+ prerelease: false
36
+ version_requirements: !ruby/object:Gem::Requirement
37
+ requirements:
38
+ - - '>='
39
+ - !ruby/object:Gem::Version
40
+ version: 1.0.1
30
41
  - !ruby/object:Gem::Dependency
31
42
  name: rake
32
43
  requirement: !ruby/object:Gem::Requirement
33
- none: false
34
44
  requirements:
35
- - - ! '>='
45
+ - - '>='
36
46
  - !ruby/object:Gem::Version
37
47
  version: '0'
38
48
  type: :development
39
49
  prerelease: false
40
50
  version_requirements: !ruby/object:Gem::Requirement
41
- none: false
42
51
  requirements:
43
- - - ! '>='
52
+ - - '>='
44
53
  - !ruby/object:Gem::Version
45
54
  version: '0'
46
55
  - !ruby/object:Gem::Dependency
47
56
  name: rspec
48
57
  requirement: !ruby/object:Gem::Requirement
49
- none: false
50
58
  requirements:
51
- - - ! '>='
59
+ - - '>='
52
60
  - !ruby/object:Gem::Version
53
61
  version: 2.11.0
54
62
  type: :development
55
63
  prerelease: false
56
64
  version_requirements: !ruby/object:Gem::Requirement
57
- none: false
58
65
  requirements:
59
- - - ! '>='
66
+ - - '>='
60
67
  - !ruby/object:Gem::Version
61
68
  version: 2.11.0
62
69
  description: Grab the latest Gemfile 'gem' line for a specific Ruby gem
@@ -84,33 +91,26 @@ files:
84
91
  - spec/spec_helper.rb
85
92
  homepage: http://github.com/joealba/gemline
86
93
  licenses: []
94
+ metadata: {}
87
95
  post_install_message:
88
96
  rdoc_options: []
89
97
  require_paths:
90
98
  - lib
91
99
  required_ruby_version: !ruby/object:Gem::Requirement
92
- none: false
93
100
  requirements:
94
- - - ! '>='
101
+ - - '>='
95
102
  - !ruby/object:Gem::Version
96
103
  version: '0'
97
- segments:
98
- - 0
99
- hash: -1367495166113172796
100
104
  required_rubygems_version: !ruby/object:Gem::Requirement
101
- none: false
102
105
  requirements:
103
- - - ! '>='
106
+ - - '>='
104
107
  - !ruby/object:Gem::Version
105
108
  version: '0'
106
- segments:
107
- - 0
108
- hash: -1367495166113172796
109
109
  requirements: []
110
110
  rubyforge_project:
111
- rubygems_version: 1.8.24
111
+ rubygems_version: 2.0.3
112
112
  signing_key:
113
- specification_version: 3
113
+ specification_version: 4
114
114
  summary: ''
115
115
  test_files:
116
116
  - spec/acceptance_spec.rb