yamlrpc 0.1.080706215610 → 0.2.1

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/History.txt ADDED
@@ -0,0 +1,6 @@
1
+
2
+ === 1.0.0 / 2008-06-24
3
+
4
+ * 1 major enhancement
5
+
6
+ * gem is alive!
data/Manifest.txt ADDED
@@ -0,0 +1,13 @@
1
+ History.txt
2
+ Manifest.txt
3
+ README.txt
4
+ Rakefile
5
+ lib/yamlrpc/client.rb
6
+ lib/yamlrpc/helpers.rb
7
+ lib/yamlrpc.rb
8
+ examples/common_root_example.rb
9
+ examples/helper.rb
10
+ examples/image_example.rb
11
+ examples/pdf_example.pdf
12
+ examples/pdf_example.rb
13
+ examples/simple_example.rb
data/Rakefile ADDED
@@ -0,0 +1,23 @@
1
+
2
+ require 'rubygems'
3
+ require 'hoe'
4
+
5
+ $:.unshift(File.dirname(__FILE__) + "/lib")
6
+ require 'yamlrpc'
7
+
8
+ Hoe.new('YamlRpc', YamlRpc::VERSION) do |p|
9
+ p.name = "yamlrpc"
10
+ p.author = "Mirek Rusin"
11
+ p.email = 'ruby@mirekrusin.com'
12
+ p.summary = "YamlRpc is a simple RPC client based on YAML"
13
+ p.description = "YamlRpc is a simple RPC client based on YAML"
14
+ p.url = "http://rubyforge.com/projects/yamlrpc"
15
+ p.clean_globs = ['test/actual'] # Remove this directory on "rake clean"
16
+ p.remote_rdoc_dir = '' # Release to root
17
+ p.changes = p.paragraphs_of('CHANGELOG', 0..1).join("\n\n")
18
+ p.rsync_args << ' --exclude=statsvn/'
19
+ # * extra_deps - An array of rubygem dependencies.
20
+ end
21
+
22
+ desc "Release and publish documentation"
23
+ task :default => [:release, :publish_docs]
@@ -0,0 +1,13 @@
1
+
2
+ require 'helper'
3
+
4
+ client = YamlRpc::Client.new('http://localhost:3000/site/', :form_data_root => :yaml_rpc)
5
+
6
+ pp client.create_online_sales_order( :test => 'My test', :test2 => 'My test2' )[:response]
7
+
8
+ # On the server side, if you're using Ruby on Rails you may want to:
9
+ #
10
+ # def create_online_sales_order
11
+ # rpc_params = YamlRpc.decode(params[:yaml_rpc])
12
+ # render => YAML::dump({ :response => "Got your #{rpc_params.inspect}!" })
13
+ # end
@@ -0,0 +1,3 @@
1
+ $:.unshift '../lib'
2
+ require 'yamlrpc'
3
+ require 'pp'
@@ -0,0 +1,15 @@
1
+
2
+ require 'helper'
3
+ require 'open-uri'
4
+
5
+ client = YamlRpc::Client.new('http://localhost:3000/site/')
6
+
7
+ image = open('http://www.google.co.uk/intl/en_uk/images/logo.gif').read
8
+
9
+ pp client.send_image( :image => image )
10
+
11
+ # On the server side, if you're using Ruby on Rails you may want to:
12
+ #
13
+ # rpc_params = YamlRpc.decode(params, [:image])
14
+ # send_data rpc_params[:image],
15
+ # :content_type => 'image/gif'
Binary file
@@ -0,0 +1,26 @@
1
+
2
+ require 'helper'
3
+ require 'open-uri'
4
+
5
+ client = YamlRpc::Client.new('http://www.pdfonrails.com/api/yaml_rpc/')
6
+
7
+ params = {
8
+ :layout => 'basic',
9
+ :html => <<END
10
+ <h1>Hello world!</h1>
11
+ <p>
12
+ Hello <b>PDF</b> world!
13
+ </p>
14
+ <p>
15
+ <ul>
16
+ <li>Hello
17
+ <li><i>World</i>
18
+ <li>!!!
19
+ </ul>
20
+ </p>
21
+ END
22
+ }
23
+
24
+ pdf = open('pdf_example.pdf', 'wb')
25
+ pdf.write(client.pdf(params)[:pdf])
26
+ pdf.close
@@ -0,0 +1,13 @@
1
+
2
+ require 'helper'
3
+
4
+ client = YamlRpc::Client.new('http://localhost:3000/site/')
5
+
6
+ pp client.create_online_sales_order( :test => 'My test' )[:response]
7
+
8
+ # On the server side, if you're using Ruby on Rails you may want to:
9
+ #
10
+ # def create_online_sales_order
11
+ # rpc_params = YamlRpc.decode(params, [:test])
12
+ # render => YAML::dump({ :response => "Got your #{rpc_params[:test]}!" })
13
+ # end
data/lib/yamlrpc.rb CHANGED
@@ -26,3 +26,7 @@ require 'net/http'
26
26
 
27
27
  require 'yamlrpc/helpers'
28
28
  require 'yamlrpc/client'
29
+
30
+ module YamlRpc
31
+ VERSION = '0.2.1'
32
+ end
metadata CHANGED
@@ -1,37 +1,57 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: yamlrpc
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.080706215610
4
+ version: 0.2.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Mirek Rusin
8
- autorequire: yamlrpc
8
+ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
11
 
12
- date: 2008-07-06 00:00:00 +01:00
12
+ date: 2008-07-07 00:00:00 +01:00
13
13
  default_executable:
14
- dependencies: []
15
-
16
- description:
14
+ dependencies:
15
+ - !ruby/object:Gem::Dependency
16
+ name: hoe
17
+ type: :development
18
+ version_requirement:
19
+ version_requirements: !ruby/object:Gem::Requirement
20
+ requirements:
21
+ - - ">="
22
+ - !ruby/object:Gem::Version
23
+ version: 1.7.0
24
+ version:
25
+ description: YamlRpc is a simple RPC client based on YAML
17
26
  email: ruby@mirekrusin.com
18
27
  executables: []
19
28
 
20
29
  extensions: []
21
30
 
22
31
  extra_rdoc_files:
23
- - README
32
+ - History.txt
33
+ - Manifest.txt
34
+ - README.txt
24
35
  files:
25
- - lib/yamlrpc
36
+ - History.txt
37
+ - Manifest.txt
38
+ - README.txt
39
+ - Rakefile
26
40
  - lib/yamlrpc/client.rb
27
41
  - lib/yamlrpc/helpers.rb
28
42
  - lib/yamlrpc.rb
29
- - README
30
- has_rdoc: false
31
- homepage: http://mirekrusin.com/ruby/yamlrpc
43
+ - examples/common_root_example.rb
44
+ - examples/helper.rb
45
+ - examples/image_example.rb
46
+ - examples/pdf_example.pdf
47
+ - examples/pdf_example.rb
48
+ - examples/simple_example.rb
49
+ has_rdoc: true
50
+ homepage: http://rubyforge.com/projects/yamlrpc
32
51
  post_install_message:
33
- rdoc_options: []
34
-
52
+ rdoc_options:
53
+ - --main
54
+ - README.txt
35
55
  require_paths:
36
56
  - lib
37
57
  required_ruby_version: !ruby/object:Gem::Requirement
@@ -48,8 +68,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
48
68
  version:
49
69
  requirements: []
50
70
 
51
- rubyforge_project:
52
- rubygems_version: 1.0.1
71
+ rubyforge_project: yamlrpc
72
+ rubygems_version: 1.2.0
53
73
  signing_key:
54
74
  specification_version: 2
55
75
  summary: YamlRpc is a simple RPC client based on YAML
File without changes