powncer 0.1.1 → 0.1.2

Sign up to get free protection for your applications and to get access to all the features.
data/Rakefile CHANGED
@@ -17,6 +17,19 @@ Rake::TestTask.new('test') do |t|
17
17
  t.pattern = 'test/*/*_test.rb'
18
18
  end
19
19
 
20
+ Rake::RDocTask.new do |rdoc|
21
+ rdoc.rdoc_dir = 'doc'
22
+ rdoc.title = "Powncer -- A Ruby library to the Pownce REST API"
23
+ rdoc.options << '--line-numbers' << '--inline-source'
24
+ rdoc.rdoc_files.include('lib/**/*.rb')
25
+ end
26
+
27
+ namespace :rdoc do
28
+ task :deploy => :rerdoc do
29
+ sh %(scp -r doc jaehess@rubyforge.org:/var/www/gforge-projects/powncer/)
30
+ end
31
+ end
32
+
20
33
  desc 'Check code to test ratio'
21
34
  task :stats do
22
35
  library_files = FileList["#{library_root}/lib/**/*.rb"]
@@ -99,3 +112,13 @@ namespace :dist do
99
112
  end
100
113
 
101
114
  end
115
+
116
+ desc 'Upload website files to rubyforge'
117
+ task :website do
118
+ host = "jaehess@rubyforge.org"
119
+ remote_dir = "/var/www/gforge-projects/powncer/"
120
+ local_dir = '~/Sites/powncer/site'
121
+ sh %{rsync -av #{local_dir}/ #{host}:#{remote_dir}}
122
+ end
123
+
124
+ task :cleanup => ['dist:clobber_package', 'clobber_rdoc']
@@ -34,7 +34,7 @@ module Powncer
34
34
  form_params.merge!({'event_location' => params[:location]}) if params[:location]
35
35
  form_params.merge!({'event_date' => params[:date]}) if params[:date]
36
36
  form_params.merge!({'media_file' => params[:data]}) if params[:data]
37
- req.set_content_type('multipart/form-data')
37
+ #req.set_content_type('multipart/form-data')
38
38
  req.set_form_data({'app_key' => options[:application_key], 'note_to' => "#{params[:to]}"}.merge(form_params))
39
39
  response = Net::HTTP.new(url.host, url.port).start { |http| http.request(req) }
40
40
  response.body
@@ -4,7 +4,7 @@ module Powncer # :stopdoc:
4
4
 
5
5
  MAJOR = '0'
6
6
  MINOR = '1'
7
- TINY = '1'
7
+ TINY = '2'
8
8
 
9
9
  API_URL = "http://api.pownce.com"
10
10
  API_VERSION = "2.0"
@@ -11,7 +11,7 @@ class AuthenticationTest < Test::Unit::TestCase
11
11
  connection = Authentication::Basic.connect!
12
12
  assert_equal 1, Powncer.connections.length
13
13
  "/users/jaehess.json".mock_auth_connection(example_profile_for)
14
- "/note_lists/jaehess.json?filter=public".mock_auth_connection(auth_example_notes_for)
14
+ "/note_lists/jaehess.json?filter=notes".mock_auth_connection(auth_example_notes_for)
15
15
  j = User.find('jaehess')
16
16
  assert_equal 20, j.notes.length
17
17
  end
@@ -88,7 +88,7 @@ class NoteTest < Test::Unit::TestCase
88
88
 
89
89
  def test_public_note_link_is_not_hash
90
90
  "/users/jaehess.json".mock_connection(example_profile_for)
91
- '/note_lists/jaehess.json?filter=public'.mock_connection(example_public_links_for)
91
+ '/note_lists/jaehess.json?filter=notes'.mock_connection(example_public_links_for)
92
92
  user = User.find('jaehess')
93
93
  assert_not_nil user
94
94
  assert_not_nil user.notes
@@ -97,7 +97,7 @@ class NoteTest < Test::Unit::TestCase
97
97
 
98
98
  def test_chaining_notes_on_user_profile_find
99
99
  "/users/jaehess.json".mock_connection(example_profile_for)
100
- "/note_lists/jaehess.json?filter=public".mock_connection(example_public_notes_for)
100
+ "/note_lists/jaehess.json?filter=notes".mock_connection(example_public_notes_for)
101
101
  @notes = User.find('jaehess').notes
102
102
  assert_not_nil @notes
103
103
  assert_kind_of Array, @notes
@@ -0,0 +1,9 @@
1
+ require File.dirname(__FILE__) + '/../test_helper'
2
+ class ScratchTest < Test::Unit::TestCase
3
+
4
+ def test_holder
5
+ Powncer::Authentication::Basic.connect!
6
+ link = Powncer::Link.new({:body => "", :to => :public, :url =>"http://google.com"})
7
+ assert link.save
8
+ end
9
+ end
@@ -35,7 +35,7 @@ class UserTest < Test::Unit::TestCase
35
35
  end
36
36
 
37
37
  def test_user_should_have_notes
38
- '/note_lists/jaehess.json?filter=public'.mock_connection(example_public_notes_for)
38
+ '/note_lists/jaehess.json?filter=notes'.mock_connection(example_public_notes_for)
39
39
  assert_kind_of Array, @user.notes
40
40
  assert_kind_of Powncer::Note, @user.notes.first
41
41
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: powncer
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.1
4
+ version: 0.1.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jae Hess
@@ -9,7 +9,7 @@ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
11
 
12
- date: 2008-03-21 00:00:00 -04:00
12
+ date: 2008-03-24 00:00:00 -04:00
13
13
  default_executable:
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
@@ -82,4 +82,5 @@ test_files:
82
82
  - test/unit/link_test.rb
83
83
  - test/unit/media_test.rb
84
84
  - test/unit/note_test.rb
85
+ - test/unit/scratch_test.rb
85
86
  - test/unit/user_test.rb