railslove-cli 0.0.2 → 0.0.3

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,11 @@
1
+ #!/usr/bin/env ruby
2
+
3
+ begin
4
+ require "railslove-cli"
5
+ rescue LoadError
6
+ railslove_cli_path = File.expand_path('../../lib', __FILE__)
7
+ $:.unshift(railslove_cli_path)
8
+ require "railslove-cli"
9
+ end
10
+
11
+ Railslove::Cli::Tweet.start(ARGV)
@@ -1,6 +1,7 @@
1
1
  require "railslove-cli/version"
2
2
  require "railslove-cli/project"
3
3
  require "railslove-cli/people"
4
+ require "railslove-cli/tweet"
4
5
 
5
6
  module Railslove
6
7
  module Cli
@@ -0,0 +1,22 @@
1
+ require "thor"
2
+ require "httparty"
3
+
4
+ module Railslove
5
+ module Cli
6
+ class Tweet < Thor
7
+
8
+ desc "list [PAGE]", "gives you some tweets, latest first, you can give it a specific page"
9
+ def list(page = 1)
10
+ tweets = HTTParty.get("http://api.railslove.com/tweets.json?page=#{page}")
11
+
12
+ printf(" %-140s %-20s %-15s\n", "text", "published_at", "author_slug")
13
+ puts "-"*180
14
+ tweets["tweets"].each do |tweet|
15
+ printf(" %-140s %-20s %-15s\n", tweet["tweet"]["text"].gsub("\n",""), tweet["tweet"]["published_at"], tweet["tweet"]["author"]["slug"])
16
+ end
17
+ puts "-"*180
18
+ end
19
+
20
+ end
21
+ end
22
+ end
@@ -1,5 +1,5 @@
1
1
  module Railslove
2
2
  module Cli
3
- VERSION = "0.0.2"
3
+ VERSION = "0.0.3"
4
4
  end
5
5
  end
@@ -6,7 +6,7 @@ Gem::Specification.new do |gem|
6
6
  gem.email = ["lars@railslove.com"]
7
7
  gem.description = %q{a nice cli for the railslove public api}
8
8
  gem.summary = %q{want railslove at your fingertips? now you can!}
9
- gem.homepage = "http://railslove.com"
9
+ gem.homepage = "http://github.com/railslove/railslove-cli"
10
10
 
11
11
  gem.files = `git ls-files`.split($\)
12
12
  gem.executables = gem.files.grep(%r{^bin/}).map{ |f| File.basename(f) }
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.2
4
+ version: 0.0.3
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-06-03 00:00:00.000000000 Z
12
+ date: 2013-01-10 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: thor
16
- requirement: &70284699274060 !ruby/object:Gem::Requirement
16
+ requirement: !ruby/object:Gem::Requirement
17
17
  none: false
18
18
  requirements:
19
19
  - - ! '>='
@@ -21,10 +21,15 @@ dependencies:
21
21
  version: '0'
22
22
  type: :runtime
23
23
  prerelease: false
24
- version_requirements: *70284699274060
24
+ version_requirements: !ruby/object:Gem::Requirement
25
+ none: false
26
+ requirements:
27
+ - - ! '>='
28
+ - !ruby/object:Gem::Version
29
+ version: '0'
25
30
  - !ruby/object:Gem::Dependency
26
31
  name: httparty
27
- requirement: &70284699273460 !ruby/object:Gem::Requirement
32
+ requirement: !ruby/object:Gem::Requirement
28
33
  none: false
29
34
  requirements:
30
35
  - - ! '>='
@@ -32,10 +37,15 @@ dependencies:
32
37
  version: '0'
33
38
  type: :runtime
34
39
  prerelease: false
35
- version_requirements: *70284699273460
40
+ version_requirements: !ruby/object:Gem::Requirement
41
+ none: false
42
+ requirements:
43
+ - - ! '>='
44
+ - !ruby/object:Gem::Version
45
+ version: '0'
36
46
  - !ruby/object:Gem::Dependency
37
47
  name: rake
38
- requirement: &70284699272960 !ruby/object:Gem::Requirement
48
+ requirement: !ruby/object:Gem::Requirement
39
49
  none: false
40
50
  requirements:
41
51
  - - ~>
@@ -43,13 +53,19 @@ dependencies:
43
53
  version: 0.8.0
44
54
  type: :development
45
55
  prerelease: false
46
- version_requirements: *70284699272960
56
+ version_requirements: !ruby/object:Gem::Requirement
57
+ none: false
58
+ requirements:
59
+ - - ~>
60
+ - !ruby/object:Gem::Version
61
+ version: 0.8.0
47
62
  description: a nice cli for the railslove public api
48
63
  email:
49
64
  - lars@railslove.com
50
65
  executables:
51
66
  - railslove-people
52
67
  - railslove-projects
68
+ - railslove-tweets
53
69
  extensions: []
54
70
  extra_rdoc_files: []
55
71
  files:
@@ -60,12 +76,14 @@ files:
60
76
  - Rakefile
61
77
  - bin/railslove-people
62
78
  - bin/railslove-projects
79
+ - bin/railslove-tweets
63
80
  - lib/railslove-cli.rb
64
81
  - lib/railslove-cli/people.rb
65
82
  - lib/railslove-cli/project.rb
83
+ - lib/railslove-cli/tweet.rb
66
84
  - lib/railslove-cli/version.rb
67
85
  - railslove-cli.gemspec
68
- homepage: http://railslove.com
86
+ homepage: http://github.com/railslove/railslove-cli
69
87
  licenses: []
70
88
  post_install_message:
71
89
  rdoc_options: []
@@ -79,7 +97,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
79
97
  version: '0'
80
98
  segments:
81
99
  - 0
82
- hash: -1501823932728567781
100
+ hash: 2557584873398468556
83
101
  required_rubygems_version: !ruby/object:Gem::Requirement
84
102
  none: false
85
103
  requirements:
@@ -88,10 +106,10 @@ required_rubygems_version: !ruby/object:Gem::Requirement
88
106
  version: '0'
89
107
  segments:
90
108
  - 0
91
- hash: -1501823932728567781
109
+ hash: 2557584873398468556
92
110
  requirements: []
93
111
  rubyforge_project:
94
- rubygems_version: 1.8.15
112
+ rubygems_version: 1.8.24
95
113
  signing_key:
96
114
  specification_version: 3
97
115
  summary: want railslove at your fingertips? now you can!