socialcast 0.3.3 → 0.3.4

Sign up to get free protection for your applications and to get access to all the features.
data/Rakefile CHANGED
@@ -14,9 +14,10 @@ begin
14
14
  gem.add_runtime_dependency 'commander', '>= 4.0'
15
15
  gem.add_runtime_dependency 'rest-client', '>= 1.4.0'
16
16
  gem.add_runtime_dependency 'json', '>= 1.4.6'
17
+ gem.add_runtime_dependency 'activeresource', '>= 2.3.5'
17
18
  # gem is a Gem::Specification... see http://www.rubygems.org/read/chapter/20 for additional settings
18
19
  end
19
- Jeweler::GemcutterTasks.new
20
+ Jeweler::RubygemsDotOrgTasks.new
20
21
  rescue LoadError
21
22
  puts "Jeweler (or a dependency) not available. Install it with: gem install jeweler"
22
23
  end
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.3.3
1
+ 0.3.4
data/bin/socialcast CHANGED
@@ -1,11 +1,8 @@
1
1
  #!/usr/bin/env ruby
2
2
 
3
- require 'rubygems'
4
3
  require 'commander/import'
5
4
  require 'rest_client'
6
- require 'fileutils'
7
5
  require 'json'
8
- require 'yaml'
9
6
  require File.join(File.dirname(__FILE__), '..', 'lib', 'socialcast')
10
7
  include Socialcast
11
8
 
@@ -49,12 +46,11 @@ command :share do |c|
49
46
  c.action do |args, options|
50
47
  message = args.first
51
48
 
52
- url = ['https://', credentials[:domain], '/api/messages.json'].join
53
- say "Posting message from #{credentials[:user]} to: #{url}"
54
- resource = RestClient::Resource.new url, :user => credentials[:user], :password => credentials[:password]
55
- params = {:message => {:body => message, :url => options.url}}
56
- response = resource.post params
57
- puts "API response: #{response.body.to_s}" if options.trace
49
+ Socialcast::Message.site = ['https://', credentials[:domain], '/api'].join
50
+ Socialcast::Message.user = credentials[:user]
51
+ Socialcast::Message.password = credentials[:password]
52
+
53
+ Socialcast::Message.create :body => message, :url => options.url
58
54
 
59
55
  say "Message has been shared"
60
56
  end
data/lib/socialcast.rb CHANGED
@@ -1,3 +1,7 @@
1
+ require 'yaml'
2
+ require 'fileutils'
3
+ require File.join(File.dirname(__FILE__), 'socialcast', 'message')
4
+
1
5
  module Socialcast
2
6
  def config_dir
3
7
  config_dir = File.expand_path '~/.socialcast'
@@ -0,0 +1,7 @@
1
+ require 'active_resource'
2
+
3
+ module Socialcast
4
+ class Message < ActiveResource::Base
5
+ end
6
+ end
7
+
data/socialcast.gemspec CHANGED
@@ -1,50 +1,48 @@
1
1
  # Generated by jeweler
2
2
  # DO NOT EDIT THIS FILE DIRECTLY
3
- # Instead, edit Jeweler::Tasks in Rakefile, and run the gemspec command
3
+ # Instead, edit Jeweler::Tasks in Rakefile, and run 'rake gemspec'
4
4
  # -*- encoding: utf-8 -*-
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = %q{socialcast}
8
- s.version = "0.3.3"
8
+ s.version = "0.3.4"
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-12-03}
12
+ s.date = %q{2011-02-23}
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}
16
16
  s.executables = ["socialcast"]
17
17
  s.extra_rdoc_files = [
18
18
  "LICENSE",
19
- "README.rdoc"
19
+ "README.rdoc"
20
20
  ]
21
21
  s.files = [
22
22
  ".document",
23
- ".gitignore",
24
- "LICENSE",
25
- "README.rdoc",
26
- "Rakefile",
27
- "VERSION",
28
- "bin/socialcast",
29
- "lib/socialcast.rb",
30
- "socialcast.gemspec",
31
- "test/commander_helper.rb",
32
- "test/helper.rb",
33
- "test/test_socialcast.rb"
23
+ "LICENSE",
24
+ "README.rdoc",
25
+ "Rakefile",
26
+ "VERSION",
27
+ "bin/socialcast",
28
+ "lib/socialcast.rb",
29
+ "lib/socialcast/message.rb",
30
+ "socialcast.gemspec",
31
+ "test/commander_helper.rb",
32
+ "test/helper.rb",
33
+ "test/test_socialcast.rb"
34
34
  ]
35
35
  s.homepage = %q{http://github.com/wireframe/socialcast-command-line}
36
- s.rdoc_options = ["--charset=UTF-8"]
37
36
  s.require_paths = ["lib"]
38
- s.rubygems_version = %q{1.3.7}
37
+ s.rubygems_version = %q{1.5.2}
39
38
  s.summary = %q{command line interface to socialcast api}
40
39
  s.test_files = [
41
40
  "test/commander_helper.rb",
42
- "test/helper.rb",
43
- "test/test_socialcast.rb"
41
+ "test/helper.rb",
42
+ "test/test_socialcast.rb"
44
43
  ]
45
44
 
46
45
  if s.respond_to? :specification_version then
47
- current_version = Gem::Specification::CURRENT_SPECIFICATION_VERSION
48
46
  s.specification_version = 3
49
47
 
50
48
  if Gem::Version.new(Gem::VERSION) >= Gem::Version.new('1.2.0') then
@@ -52,17 +50,20 @@ Gem::Specification.new do |s|
52
50
  s.add_runtime_dependency(%q<commander>, [">= 4.0"])
53
51
  s.add_runtime_dependency(%q<rest-client>, [">= 1.4.0"])
54
52
  s.add_runtime_dependency(%q<json>, [">= 1.4.6"])
53
+ s.add_runtime_dependency(%q<activeresource>, [">= 2.3.5"])
55
54
  else
56
55
  s.add_dependency(%q<shoulda>, [">= 0"])
57
56
  s.add_dependency(%q<commander>, [">= 4.0"])
58
57
  s.add_dependency(%q<rest-client>, [">= 1.4.0"])
59
58
  s.add_dependency(%q<json>, [">= 1.4.6"])
59
+ s.add_dependency(%q<activeresource>, [">= 2.3.5"])
60
60
  end
61
61
  else
62
62
  s.add_dependency(%q<shoulda>, [">= 0"])
63
63
  s.add_dependency(%q<commander>, [">= 4.0"])
64
64
  s.add_dependency(%q<rest-client>, [">= 1.4.0"])
65
65
  s.add_dependency(%q<json>, [">= 1.4.6"])
66
+ s.add_dependency(%q<activeresource>, [">= 2.3.5"])
66
67
  end
67
68
  end
68
69
 
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: 21
5
- prerelease: false
4
+ hash: 27
5
+ prerelease:
6
6
  segments:
7
7
  - 0
8
8
  - 3
9
- - 3
10
- version: 0.3.3
9
+ - 4
10
+ version: 0.3.4
11
11
  platform: ruby
12
12
  authors:
13
13
  - Ryan Sonnek
@@ -15,7 +15,7 @@ autorequire:
15
15
  bindir: bin
16
16
  cert_chain: []
17
17
 
18
- date: 2010-12-03 00:00:00 -08:00
18
+ date: 2011-02-23 00:00:00 -06:00
19
19
  default_executable: socialcast
20
20
  dependencies:
21
21
  - !ruby/object:Gem::Dependency
@@ -79,6 +79,22 @@ dependencies:
79
79
  version: 1.4.6
80
80
  type: :runtime
81
81
  version_requirements: *id004
82
+ - !ruby/object:Gem::Dependency
83
+ name: activeresource
84
+ prerelease: false
85
+ requirement: &id005 !ruby/object:Gem::Requirement
86
+ none: false
87
+ requirements:
88
+ - - ">="
89
+ - !ruby/object:Gem::Version
90
+ hash: 9
91
+ segments:
92
+ - 2
93
+ - 3
94
+ - 5
95
+ version: 2.3.5
96
+ type: :runtime
97
+ version_requirements: *id005
82
98
  description: publish messages to your stream from a command line interface
83
99
  email: ryan@socialcast.com
84
100
  executables:
@@ -90,13 +106,13 @@ extra_rdoc_files:
90
106
  - README.rdoc
91
107
  files:
92
108
  - .document
93
- - .gitignore
94
109
  - LICENSE
95
110
  - README.rdoc
96
111
  - Rakefile
97
112
  - VERSION
98
113
  - bin/socialcast
99
114
  - lib/socialcast.rb
115
+ - lib/socialcast/message.rb
100
116
  - socialcast.gemspec
101
117
  - test/commander_helper.rb
102
118
  - test/helper.rb
@@ -106,8 +122,8 @@ homepage: http://github.com/wireframe/socialcast-command-line
106
122
  licenses: []
107
123
 
108
124
  post_install_message:
109
- rdoc_options:
110
- - --charset=UTF-8
125
+ rdoc_options: []
126
+
111
127
  require_paths:
112
128
  - lib
113
129
  required_ruby_version: !ruby/object:Gem::Requirement
@@ -131,7 +147,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
131
147
  requirements: []
132
148
 
133
149
  rubyforge_project:
134
- rubygems_version: 1.3.7
150
+ rubygems_version: 1.5.2
135
151
  signing_key:
136
152
  specification_version: 3
137
153
  summary: command line interface to socialcast api
data/.gitignore DELETED
@@ -1,21 +0,0 @@
1
- ## MAC OS
2
- .DS_Store
3
-
4
- ## TEXTMATE
5
- *.tmproj
6
- tmtags
7
-
8
- ## EMACS
9
- *~
10
- \#*
11
- .\#*
12
-
13
- ## VIM
14
- *.swp
15
-
16
- ## PROJECT::GENERAL
17
- coverage
18
- rdoc
19
- pkg
20
-
21
- ## PROJECT::SPECIFIC