railslove-cli 0.0.1 → 0.0.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/README.md +21 -10
- data/bin/railslove-projects +11 -0
- data/lib/railslove-cli.rb +1 -0
- data/lib/railslove-cli/project.rb +40 -0
- data/lib/railslove-cli/version.rb +1 -1
- metadata +13 -10
data/README.md
CHANGED
@@ -1,24 +1,35 @@
|
|
1
|
-
# Railslove
|
1
|
+
# The Railslove CLI
|
2
2
|
|
3
|
-
|
3
|
+
This is a little CLI wrapper for [api.railslove.com](http://api.railslove.com) that also powers [railslove.com](http://railslove.com). Now you can access (all) the Railslove content directly from your shell prompt.
|
4
4
|
|
5
5
|
## Installation
|
6
6
|
|
7
|
-
|
7
|
+
Install it yourself as:
|
8
8
|
|
9
|
-
gem
|
9
|
+
$ gem install railslove-cli
|
10
10
|
|
11
|
-
|
11
|
+
## Usage
|
12
12
|
|
13
|
-
|
13
|
+
### People
|
14
14
|
|
15
|
-
|
15
|
+
You can get a list of all the folks of the Railslove Family
|
16
16
|
|
17
|
-
$
|
17
|
+
$ railslove-people list
|
18
18
|
|
19
|
-
|
19
|
+
Once you found someone you're more interested in you can obtaim more information with:
|
20
|
+
|
21
|
+
$ railslove-people show <slug>
|
22
|
+
|
23
|
+
### Projects
|
24
|
+
|
25
|
+
You can get a list of all projects where Railslove was somehow involved
|
26
|
+
|
27
|
+
$ railslove-projects list
|
28
|
+
|
29
|
+
Once you found someone you're more interested in you can obtaim more information with:
|
30
|
+
|
31
|
+
$ railslove-projects show <slug>
|
20
32
|
|
21
|
-
TODO: Write usage instructions here
|
22
33
|
|
23
34
|
## Contributing
|
24
35
|
|
data/lib/railslove-cli.rb
CHANGED
@@ -0,0 +1,40 @@
|
|
1
|
+
require "thor"
|
2
|
+
require "httparty"
|
3
|
+
|
4
|
+
module Railslove
|
5
|
+
module Cli
|
6
|
+
class Project < Thor
|
7
|
+
|
8
|
+
desc "list", "gives you all information about the team members"
|
9
|
+
def list
|
10
|
+
projects = HTTParty.get("http://api.railslove.com/projects.json")
|
11
|
+
|
12
|
+
printf(" %-28s %-33s %-15s\n", "slug", "name", "project_type")
|
13
|
+
puts "-"*77
|
14
|
+
projects["projects"].each do |project|
|
15
|
+
printf(" %-28s %-33s %-15s\n", project["project"]["slug"], project["project"]["name"], project["project"]["project_type"])
|
16
|
+
end
|
17
|
+
puts "-"*77
|
18
|
+
end
|
19
|
+
|
20
|
+
desc "show SLUG", "view more details about a single project"
|
21
|
+
def show(slug)
|
22
|
+
project = HTTParty.get("http://api.railslove.com/projects/#{slug}.json")
|
23
|
+
|
24
|
+
people = project["project"].delete("people")
|
25
|
+
images = project["project"].delete("images")
|
26
|
+
links = project["project"].delete("links")
|
27
|
+
description = project["project"].delete("description")
|
28
|
+
|
29
|
+
puts "#{description}\n\n"
|
30
|
+
project["project"].each do |k,v|
|
31
|
+
printf("%14s: %s\n", k, v)
|
32
|
+
end
|
33
|
+
|
34
|
+
end
|
35
|
+
|
36
|
+
end
|
37
|
+
end
|
38
|
+
end
|
39
|
+
|
40
|
+
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: railslove-cli
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.2
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,11 +9,11 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2012-
|
12
|
+
date: 2012-06-03 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: thor
|
16
|
-
requirement: &
|
16
|
+
requirement: &70284699274060 !ruby/object:Gem::Requirement
|
17
17
|
none: false
|
18
18
|
requirements:
|
19
19
|
- - ! '>='
|
@@ -21,10 +21,10 @@ dependencies:
|
|
21
21
|
version: '0'
|
22
22
|
type: :runtime
|
23
23
|
prerelease: false
|
24
|
-
version_requirements: *
|
24
|
+
version_requirements: *70284699274060
|
25
25
|
- !ruby/object:Gem::Dependency
|
26
26
|
name: httparty
|
27
|
-
requirement: &
|
27
|
+
requirement: &70284699273460 !ruby/object:Gem::Requirement
|
28
28
|
none: false
|
29
29
|
requirements:
|
30
30
|
- - ! '>='
|
@@ -32,10 +32,10 @@ dependencies:
|
|
32
32
|
version: '0'
|
33
33
|
type: :runtime
|
34
34
|
prerelease: false
|
35
|
-
version_requirements: *
|
35
|
+
version_requirements: *70284699273460
|
36
36
|
- !ruby/object:Gem::Dependency
|
37
37
|
name: rake
|
38
|
-
requirement: &
|
38
|
+
requirement: &70284699272960 !ruby/object:Gem::Requirement
|
39
39
|
none: false
|
40
40
|
requirements:
|
41
41
|
- - ~>
|
@@ -43,12 +43,13 @@ dependencies:
|
|
43
43
|
version: 0.8.0
|
44
44
|
type: :development
|
45
45
|
prerelease: false
|
46
|
-
version_requirements: *
|
46
|
+
version_requirements: *70284699272960
|
47
47
|
description: a nice cli for the railslove public api
|
48
48
|
email:
|
49
49
|
- lars@railslove.com
|
50
50
|
executables:
|
51
51
|
- railslove-people
|
52
|
+
- railslove-projects
|
52
53
|
extensions: []
|
53
54
|
extra_rdoc_files: []
|
54
55
|
files:
|
@@ -58,8 +59,10 @@ files:
|
|
58
59
|
- README.md
|
59
60
|
- Rakefile
|
60
61
|
- bin/railslove-people
|
62
|
+
- bin/railslove-projects
|
61
63
|
- lib/railslove-cli.rb
|
62
64
|
- lib/railslove-cli/people.rb
|
65
|
+
- lib/railslove-cli/project.rb
|
63
66
|
- lib/railslove-cli/version.rb
|
64
67
|
- railslove-cli.gemspec
|
65
68
|
homepage: http://railslove.com
|
@@ -76,7 +79,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
76
79
|
version: '0'
|
77
80
|
segments:
|
78
81
|
- 0
|
79
|
-
hash: -
|
82
|
+
hash: -1501823932728567781
|
80
83
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
81
84
|
none: false
|
82
85
|
requirements:
|
@@ -85,7 +88,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
85
88
|
version: '0'
|
86
89
|
segments:
|
87
90
|
- 0
|
88
|
-
hash: -
|
91
|
+
hash: -1501823932728567781
|
89
92
|
requirements: []
|
90
93
|
rubyforge_project:
|
91
94
|
rubygems_version: 1.8.15
|