fbcli 1.0.0 → 1.1.0

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/Gemfile CHANGED
@@ -11,4 +11,5 @@ group :development do
11
11
  gem "bundler"
12
12
  gem "jeweler", "~> 1.8.4"
13
13
  gem "simplecov"
14
+ gem "wirble"
14
15
  end
@@ -35,6 +35,7 @@ GEM
35
35
  multi_json (~> 1.0)
36
36
  simplecov-html (~> 0.7.1)
37
37
  simplecov-html (0.7.1)
38
+ wirble (0.1.3)
38
39
 
39
40
  PLATFORMS
40
41
  ruby
@@ -48,3 +49,4 @@ DEPENDENCIES
48
49
  rdoc (~> 3.12)
49
50
  rspec (~> 2.8.0)
50
51
  simplecov
52
+ wirble
@@ -20,6 +20,11 @@ Obtain key here: https://developers.facebook.com/tools/explorer
20
20
  fbcli my_friends
21
21
 
22
22
 
23
+ == Available Data
24
+
25
+ fbcli --help
26
+
27
+
23
28
 
24
29
  == Copyright
25
30
 
data/VERSION CHANGED
@@ -1 +1 @@
1
- 1.0.0
1
+ 1.1.0
data/bin/fbcli CHANGED
@@ -1,8 +1,4 @@
1
1
  #!/usr/bin/env ruby
2
2
 
3
- require 'rubygems'
4
- require 'bundler/setup'
5
- require 'commander/import'
6
-
7
3
  require File.expand_path(File.join(File.dirname(__FILE__), '..', 'lib', 'fbcli'))
8
4
 
@@ -5,11 +5,11 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = "fbcli"
8
- s.version = "1.0.0"
8
+ s.version = "1.1.0"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["Ian Morgan"]
12
- s.date = "2012-11-15"
12
+ s.date = "2012-11-29"
13
13
  s.description = "Command line interface to the Facebook graph API"
14
14
  s.email = "ian@ruby-code.com"
15
15
  s.executables = ["fbcli", "fbcli"]
@@ -55,6 +55,7 @@ Gem::Specification.new do |s|
55
55
  s.add_development_dependency(%q<bundler>, [">= 0"])
56
56
  s.add_development_dependency(%q<jeweler>, ["~> 1.8.4"])
57
57
  s.add_development_dependency(%q<simplecov>, [">= 0"])
58
+ s.add_development_dependency(%q<wirble>, [">= 0"])
58
59
  else
59
60
  s.add_dependency(%q<koala>, [">= 0"])
60
61
  s.add_dependency(%q<commander>, [">= 0"])
@@ -64,6 +65,7 @@ Gem::Specification.new do |s|
64
65
  s.add_dependency(%q<bundler>, [">= 0"])
65
66
  s.add_dependency(%q<jeweler>, ["~> 1.8.4"])
66
67
  s.add_dependency(%q<simplecov>, [">= 0"])
68
+ s.add_dependency(%q<wirble>, [">= 0"])
67
69
  end
68
70
  else
69
71
  s.add_dependency(%q<koala>, [">= 0"])
@@ -74,6 +76,7 @@ Gem::Specification.new do |s|
74
76
  s.add_dependency(%q<bundler>, [">= 0"])
75
77
  s.add_dependency(%q<jeweler>, ["~> 1.8.4"])
76
78
  s.add_dependency(%q<simplecov>, [">= 0"])
79
+ s.add_dependency(%q<wirble>, [">= 0"])
77
80
  end
78
81
  end
79
82
 
@@ -1,3 +1,7 @@
1
+ require 'rubygems'
2
+ require 'bundler/setup'
3
+ require 'commander/import'
4
+
1
5
  require_relative 'fbcli/constants.rb'
2
6
  require_relative 'fbcli/actions.rb'
3
7
  require_relative 'fbcli/formatters.rb'
@@ -5,6 +5,15 @@ program :description, 'Facebook CLI Tool. Navigates the Social Graph.'
5
5
  program :help, 'Author', 'Ian Morgan <ian@ruby-code.com>'
6
6
 
7
7
  global_option('--json') { $json = true }
8
+ default_command :welcome
9
+
10
+ command :welcome do |c|
11
+ c.syntax = 'welcome'
12
+ c.description = "Welcomes user to application"
13
+ c.action do |arg|
14
+ puts "Commands to get started: configure, help"
15
+ end
16
+ end
8
17
 
9
18
  command :configure do |c|
10
19
  c.syntax = 'configure'
@@ -1,7 +1,19 @@
1
1
  require File.expand_path(File.dirname(__FILE__) + '/spec_helper')
2
2
 
3
3
  describe "Fbcli" do
4
- it "fails" do
5
- fail "hey buddy, you should probably rename this file and start specing for real"
4
+
5
+ before :each do
6
+ mock_terminal
7
+ @options = Commander::Command::Options.new
6
8
  end
9
+
10
+ it "ensures all commands are available" do
11
+ Commander::Command.commands.keys.count.should be >= 31
12
+ end
13
+
14
+ it "displays help" do
15
+ @command = command :help
16
+ @command.run
17
+ end
18
+
7
19
  end
@@ -2,11 +2,18 @@ $LOAD_PATH.unshift(File.join(File.dirname(__FILE__), '..', 'lib'))
2
2
  $LOAD_PATH.unshift(File.dirname(__FILE__))
3
3
  require 'rspec'
4
4
  require 'fbcli'
5
+ require 'stringio'
6
+
7
+ # Mock terminal IO streams so we can spec against them
5
8
 
6
- # Requires supporting files with custom matchers and macros, etc,
7
- # in ./support/ and its subdirectories.
8
9
  Dir["#{File.dirname(__FILE__)}/support/**/*.rb"].each {|f| require f}
9
10
 
10
11
  RSpec.configure do |config|
11
12
 
12
13
  end
14
+
15
+ def mock_terminal
16
+ @input = StringIO.new
17
+ @output = StringIO.new
18
+ $terminal = HighLine.new @input, @output
19
+ end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: fbcli
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.0
4
+ version: 1.1.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: 2012-11-15 00:00:00.000000000 Z
12
+ date: 2012-11-29 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: koala
@@ -139,6 +139,22 @@ dependencies:
139
139
  - - ! '>='
140
140
  - !ruby/object:Gem::Version
141
141
  version: '0'
142
+ - !ruby/object:Gem::Dependency
143
+ name: wirble
144
+ requirement: !ruby/object:Gem::Requirement
145
+ none: false
146
+ requirements:
147
+ - - ! '>='
148
+ - !ruby/object:Gem::Version
149
+ version: '0'
150
+ type: :development
151
+ prerelease: false
152
+ version_requirements: !ruby/object:Gem::Requirement
153
+ none: false
154
+ requirements:
155
+ - - ! '>='
156
+ - !ruby/object:Gem::Version
157
+ version: '0'
142
158
  description: Command line interface to the Facebook graph API
143
159
  email: ian@ruby-code.com
144
160
  executables:
@@ -181,7 +197,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
181
197
  version: '0'
182
198
  segments:
183
199
  - 0
184
- hash: -4317853381182366111
200
+ hash: -4242555435088434392
185
201
  required_rubygems_version: !ruby/object:Gem::Requirement
186
202
  none: false
187
203
  requirements: