socialcast 0.2.0 → 0.2.1

Sign up to get free protection for your applications and to get access to all the features.
data/Rakefile CHANGED
@@ -10,9 +10,10 @@ begin
10
10
  gem.email = "ryan@socialcast.com"
11
11
  gem.homepage = "http://github.com/wireframe/socialcast-command-line"
12
12
  gem.authors = ["Ryan Sonnek"]
13
- gem.add_development_dependency "thoughtbot-shoulda", ">= 0"
13
+ gem.add_development_dependency "shoulda", ">= 0"
14
14
  gem.add_runtime_dependency 'commander', '>= 4.0'
15
15
  gem.add_runtime_dependency 'rest-client', '>= 1.5.0'
16
+ gem.add_runtime_dependency 'json', '>= 0'
16
17
  # gem is a Gem::Specification... see http://www.rubygems.org/read/chapter/20 for additional settings
17
18
  end
18
19
  Jeweler::GemcutterTasks.new
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.2.0
1
+ 0.2.1
data/bin/socialcast CHANGED
@@ -5,11 +5,11 @@ require 'commander/import'
5
5
  require 'rest_client'
6
6
  require 'fileutils'
7
7
  require 'json'
8
- require 'lib/socialcast'
8
+ require File.join(File.dirname(__FILE__), '..', 'lib', 'socialcast')
9
9
  include Socialcast
10
10
 
11
11
  program :version, File.read(File.join(File.dirname(__FILE__), '..', 'VERSION')).strip
12
- program :description, 'command line interface to the socialcast api'
12
+ program :description, 'Socialcast API command line interface'
13
13
 
14
14
  command :authenticate do |c|
15
15
  c.syntax = 'socialcast authenticate [options]'
@@ -57,7 +57,7 @@ command :share do |c|
57
57
  say "API response:" if options.trace
58
58
  say response.body.to_s if options.trace
59
59
  end
60
- say "Message has been shared" #FIXME: use notify_ok to show growl
60
+ say "Message has been shared"
61
61
  end
62
62
  end
63
63
 
data/socialcast.gemspec CHANGED
@@ -5,11 +5,11 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = %q{socialcast}
8
- s.version = "0.2.0"
8
+ s.version = "0.2.1"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["Ryan Sonnek"]
12
- s.date = %q{2010-11-14}
12
+ s.date = %q{2010-11-22}
13
13
  s.default_executable = %q{socialcast}
14
14
  s.description = %q{publish messages to your stream from a command line interface}
15
15
  s.email = %q{ryan@socialcast.com}
@@ -28,8 +28,9 @@ Gem::Specification.new do |s|
28
28
  "bin/socialcast",
29
29
  "lib/socialcast.rb",
30
30
  "socialcast.gemspec",
31
+ "test/commander_helper.rb",
31
32
  "test/helper.rb",
32
- "test/test_socialcast_cli.rb"
33
+ "test/test_socialcast.rb"
33
34
  ]
34
35
  s.homepage = %q{http://github.com/wireframe/socialcast-command-line}
35
36
  s.rdoc_options = ["--charset=UTF-8"]
@@ -37,8 +38,9 @@ Gem::Specification.new do |s|
37
38
  s.rubygems_version = %q{1.3.7}
38
39
  s.summary = %q{command line interface to socialcast api}
39
40
  s.test_files = [
40
- "test/helper.rb",
41
- "test/test_socialcast_cli.rb"
41
+ "test/commander_helper.rb",
42
+ "test/helper.rb",
43
+ "test/test_socialcast.rb"
42
44
  ]
43
45
 
44
46
  if s.respond_to? :specification_version then
@@ -46,18 +48,21 @@ Gem::Specification.new do |s|
46
48
  s.specification_version = 3
47
49
 
48
50
  if Gem::Version.new(Gem::VERSION) >= Gem::Version.new('1.2.0') then
49
- s.add_development_dependency(%q<thoughtbot-shoulda>, [">= 0"])
51
+ s.add_development_dependency(%q<shoulda>, [">= 0"])
50
52
  s.add_runtime_dependency(%q<commander>, [">= 4.0"])
51
53
  s.add_runtime_dependency(%q<rest-client>, [">= 1.5.0"])
54
+ s.add_runtime_dependency(%q<json>, [">= 0"])
52
55
  else
53
- s.add_dependency(%q<thoughtbot-shoulda>, [">= 0"])
56
+ s.add_dependency(%q<shoulda>, [">= 0"])
54
57
  s.add_dependency(%q<commander>, [">= 4.0"])
55
58
  s.add_dependency(%q<rest-client>, [">= 1.5.0"])
59
+ s.add_dependency(%q<json>, [">= 0"])
56
60
  end
57
61
  else
58
- s.add_dependency(%q<thoughtbot-shoulda>, [">= 0"])
62
+ s.add_dependency(%q<shoulda>, [">= 0"])
59
63
  s.add_dependency(%q<commander>, [">= 4.0"])
60
64
  s.add_dependency(%q<rest-client>, [">= 1.5.0"])
65
+ s.add_dependency(%q<json>, [">= 0"])
61
66
  end
62
67
  end
63
68
 
@@ -0,0 +1,54 @@
1
+ require 'commander/import'
2
+
3
+ # require 'rubygems'
4
+ # require 'commander/import'
5
+ # require 'stringio'
6
+ #
7
+ # # Mock terminal IO streams so we can spec against them
8
+ #
9
+ # def mock_terminal
10
+ # @input = StringIO.new
11
+ # @output = StringIO.new
12
+ # $terminal = HighLine.new @input, @output
13
+ # end
14
+ #
15
+ # # Create test command for usage within several specs
16
+ #
17
+ # def create_test_command
18
+ # command :test do |c|
19
+ # c.syntax = "test [options] <file>"
20
+ # c.description = "test description"
21
+ # c.example "description", "command"
22
+ # c.example "description 2", "command 2"
23
+ # c.option '-v', "--verbose", "verbose description"
24
+ # c.when_called do |args, options|
25
+ # "test %s" % args.join
26
+ # end
27
+ # end
28
+ # @command = command :test
29
+ # end
30
+ #
31
+ # # Create a new command runner
32
+ #
33
+ # def new_command_runner *args, &block
34
+ # Commander::Runner.instance_variable_set :"@singleton", Commander::Runner.new(args)
35
+ # program :name, 'test'
36
+ # program :version, '1.2.3'
37
+ # program :description, 'something'
38
+ # create_test_command
39
+ # yield if block
40
+ # Commander::Runner.instance
41
+ # end
42
+ #
43
+ # # Comply with how specs were previously written
44
+ #
45
+ # def command_runner
46
+ # Commander::Runner.instance
47
+ # end
48
+ #
49
+ # def run *args
50
+ # new_command_runner *args do
51
+ # program :formatter, Commander::HelpFormatter::Base
52
+ # end.run!
53
+ # @output.string
54
+ # end
data/test/helper.rb CHANGED
@@ -1,10 +1,11 @@
1
1
  require 'rubygems'
2
2
  require 'test/unit'
3
3
  require 'shoulda'
4
+ require File.join(File.dirname(__FILE__), 'commander_helper')
4
5
 
5
6
  $LOAD_PATH.unshift(File.join(File.dirname(__FILE__), '..', 'lib'))
6
7
  $LOAD_PATH.unshift(File.dirname(__FILE__))
7
- require 'socialcast_cli'
8
+ require 'socialcast'
8
9
 
9
10
  class Test::Unit::TestCase
10
11
  end
@@ -0,0 +1,12 @@
1
+ require File.join(File.dirname(__FILE__), 'helper')
2
+ load File.join(File.dirname(__FILE__), '..', 'bin', 'socialcast')
3
+
4
+ class TestSocialcast < Test::Unit::TestCase
5
+ context 'socialcast command' do
6
+ setup do
7
+ command(:share).run
8
+ end
9
+ should 'run' do
10
+ end
11
+ end
12
+ end
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: socialcast
3
3
  version: !ruby/object:Gem::Version
4
- hash: 23
4
+ hash: 21
5
5
  prerelease: false
6
6
  segments:
7
7
  - 0
8
8
  - 2
9
- - 0
10
- version: 0.2.0
9
+ - 1
10
+ version: 0.2.1
11
11
  platform: ruby
12
12
  authors:
13
13
  - Ryan Sonnek
@@ -15,11 +15,11 @@ autorequire:
15
15
  bindir: bin
16
16
  cert_chain: []
17
17
 
18
- date: 2010-11-14 00:00:00 -06:00
18
+ date: 2010-11-22 00:00:00 -06:00
19
19
  default_executable: socialcast
20
20
  dependencies:
21
21
  - !ruby/object:Gem::Dependency
22
- name: thoughtbot-shoulda
22
+ name: shoulda
23
23
  prerelease: false
24
24
  requirement: &id001 !ruby/object:Gem::Requirement
25
25
  none: false
@@ -63,6 +63,20 @@ dependencies:
63
63
  version: 1.5.0
64
64
  type: :runtime
65
65
  version_requirements: *id003
66
+ - !ruby/object:Gem::Dependency
67
+ name: json
68
+ prerelease: false
69
+ requirement: &id004 !ruby/object:Gem::Requirement
70
+ none: false
71
+ requirements:
72
+ - - ">="
73
+ - !ruby/object:Gem::Version
74
+ hash: 3
75
+ segments:
76
+ - 0
77
+ version: "0"
78
+ type: :runtime
79
+ version_requirements: *id004
66
80
  description: publish messages to your stream from a command line interface
67
81
  email: ryan@socialcast.com
68
82
  executables:
@@ -82,8 +96,9 @@ files:
82
96
  - bin/socialcast
83
97
  - lib/socialcast.rb
84
98
  - socialcast.gemspec
99
+ - test/commander_helper.rb
85
100
  - test/helper.rb
86
- - test/test_socialcast_cli.rb
101
+ - test/test_socialcast.rb
87
102
  has_rdoc: true
88
103
  homepage: http://github.com/wireframe/socialcast-command-line
89
104
  licenses: []
@@ -119,5 +134,6 @@ signing_key:
119
134
  specification_version: 3
120
135
  summary: command line interface to socialcast api
121
136
  test_files:
137
+ - test/commander_helper.rb
122
138
  - test/helper.rb
123
- - test/test_socialcast_cli.rb
139
+ - test/test_socialcast.rb
@@ -1,7 +0,0 @@
1
- require 'helper'
2
-
3
- class TestSocialcastCli < Test::Unit::TestCase
4
- should "probably rename this file and start testing for real" do
5
- flunk "hey buddy, you should probably rename this file and start testing for real"
6
- end
7
- end