trump 0.1 → 0.2.0
Sign up to get free protection for your applications and to get access to all the features.
- data/README.md +5 -7
- data/bin/trump +1 -5
- data/lib/trump/base.rb +10 -12
- data/lib/trump/version.rb +1 -1
- data/trump.gemspec +1 -0
- metadata +18 -2
data/README.md
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
# Trump
|
2
2
|
|
3
|
-
Add a gem to the Gemfile with more info in comments.
|
3
|
+
Add a gem to the Gemfile with more info in comments. This will not add it directly met add it to your clipboard, so you can easily past it where you want inside your Gemfile.
|
4
4
|
|
5
5
|
Below is an example of the output in the Gemfile:
|
6
6
|
|
@@ -8,6 +8,8 @@ Below is an example of the output in the Gemfile:
|
|
8
8
|
# [gemname](http://gemurl.com)
|
9
9
|
gem "gemname", "0.0.1"
|
10
10
|
|
11
|
+
Credits for this gem go to [@junkiesxl](http://twitter.com/junkiesxl), he created an emacs function to do this. But I use Vim so... I created a gem for it!
|
12
|
+
|
11
13
|
## Installation
|
12
14
|
|
13
15
|
Install the gem:
|
@@ -23,18 +25,14 @@ There is only one command and this is explained below.
|
|
23
25
|
Run the following command followed by the name of the gem.
|
24
26
|
|
25
27
|
trump gemname
|
26
|
-
trump add gemname
|
27
28
|
|
28
29
|
Both commands are the same.
|
29
30
|
|
30
|
-
Now
|
31
|
+
Now open your Gemfile and paste the content of you clipboard. It's that simple!
|
31
32
|
|
32
33
|
## TODO
|
33
34
|
|
34
|
-
-
|
35
|
-
- Choose the version number
|
36
|
-
- Remove a gem
|
37
|
-
- Add a gem in the development group
|
35
|
+
- Choose the git version
|
38
36
|
|
39
37
|
## Contributing
|
40
38
|
|
data/bin/trump
CHANGED
data/lib/trump/base.rb
CHANGED
@@ -1,4 +1,5 @@
|
|
1
1
|
require "curl_wrapper"
|
2
|
+
require "clipboard"
|
2
3
|
require "json/pure"
|
3
4
|
|
4
5
|
module Trump
|
@@ -26,18 +27,15 @@ module Trump
|
|
26
27
|
your_gem = JSON.parse(content)
|
27
28
|
url = your_gem["homepage_uri"] || your_gem["documentation_uri"]
|
28
29
|
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
else
|
39
|
-
puts_text("There is no Gemfile available in this directory.")
|
40
|
-
end
|
30
|
+
|
31
|
+
text = "# #{your_gem["info"][0..75]}\n"
|
32
|
+
text += "# [#{name}](#{url})\n"
|
33
|
+
text += "gem \"#{name}\", \"~> #{your_gem["version"]}\""
|
34
|
+
Clipboard.copy text
|
35
|
+
|
36
|
+
puts_text("Copied gem '#{name}' data to your clipboard.")
|
37
|
+
puts_text("")
|
38
|
+
puts_text("Now open the Gemfile and paste along!")
|
41
39
|
puts_text("")
|
42
40
|
puts end_text
|
43
41
|
end
|
data/lib/trump/version.rb
CHANGED
data/trump.gemspec
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: trump
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version:
|
4
|
+
version: 0.2.0
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2013-
|
12
|
+
date: 2013-06-19 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: bundler
|
@@ -91,6 +91,22 @@ dependencies:
|
|
91
91
|
- - ~>
|
92
92
|
- !ruby/object:Gem::Version
|
93
93
|
version: 0.0.3
|
94
|
+
- !ruby/object:Gem::Dependency
|
95
|
+
name: clipboard
|
96
|
+
requirement: !ruby/object:Gem::Requirement
|
97
|
+
none: false
|
98
|
+
requirements:
|
99
|
+
- - ~>
|
100
|
+
- !ruby/object:Gem::Version
|
101
|
+
version: 1.0.5
|
102
|
+
type: :runtime
|
103
|
+
prerelease: false
|
104
|
+
version_requirements: !ruby/object:Gem::Requirement
|
105
|
+
none: false
|
106
|
+
requirements:
|
107
|
+
- - ~>
|
108
|
+
- !ruby/object:Gem::Version
|
109
|
+
version: 1.0.5
|
94
110
|
description: Add a gem to the Gemfile with more info in comments.
|
95
111
|
email:
|
96
112
|
- jelle@fousa.be
|