metamolecular-chemcaster 0.1.5 → 0.1.6

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.
Files changed (4) hide show
  1. data/README.rdoc +29 -10
  2. data/Rakefile +14 -1
  3. data/lib/chemcaster/media_type.rb +3 -3
  4. metadata +2 -3
data/README.rdoc CHANGED
@@ -5,31 +5,50 @@ API. It consists of basic functionality needed to create
5
5
  applications using chemical structure registration, storage, imaging, and
6
6
  search.
7
7
 
8
+ == Installation
9
+
10
+ Installation through the Ruby Gem hosted on GitHub is recommended:
11
+
12
+ # add GitHub to your local list of gem sources:
13
+ gem sources -a http://gems.github.com/
14
+
15
+ # install the gem:
16
+ gem install metamolecular-chemcaster
17
+
8
18
  == Example Use
9
19
 
10
20
  === Connecting to the Service
11
21
 
12
- require 'lib/chemcaster'
13
- include Chemcaster
22
+ require 'rubygems'
23
+ require 'chemcaster'
14
24
 
15
- service = Service.connect 'username', 'password'
25
+ service = Chemcaster::Service.connect 'username', 'password'
16
26
 
17
27
  === Loading a Registry
18
28
 
19
- require 'lib/chemcaster'
20
- include Chemcaster
29
+ require 'rubygems'
30
+ require 'chemcaster'
21
31
 
22
- service = Service.connect 'username', 'password'
32
+ service = Chemcaster::Service.connect 'username', 'password'
23
33
  registries = service.registries
24
34
  registries.size # => 3
25
35
  registry = registries[0]
26
36
 
27
37
  === Creating a Registry
28
38
 
29
- require 'lib/chemcaster'
30
- include Chemcaster
39
+ require 'rubygems'
40
+ require 'chemcaster'
31
41
 
32
- service = Service.connect 'username', 'password'
42
+ service = Chemcaster::Service.connect 'username', 'password'
33
43
  registries = service.registries
34
44
 
35
- registries.create :name => 'CarboBlocks, Inc.'
45
+ registries.create :name => 'CarboBlocks, Inc.'
46
+
47
+ === Changing a Registry Name
48
+
49
+ require 'rubygems'
50
+ require 'chemcaster'
51
+
52
+ service = Chemcaster::Service.connect 'username', 'password'
53
+ registry = service.registries[0]
54
+ registry.update :name => 'CarboBlocks International, Inc.'
data/Rakefile CHANGED
@@ -1,8 +1,21 @@
1
1
  require 'rubygems'
2
2
  require 'rake'
3
-
4
3
  require 'spec/rake/spectask'
4
+ require 'rake/rdoctask'
5
+
5
6
  Spec::Rake::SpecTask.new(:spec) do |spec|
6
7
  spec.libs << 'lib' << 'spec'
7
8
  spec.spec_files = FileList['spec/**/*_spec.rb']
8
9
  end
10
+
11
+ desc 'Generate RDoc documentation for Chemcaster client.'
12
+ Rake::RDocTask.new(:rdoc) do |rdoc|
13
+ rdoc.rdoc_files.include('README.rdoc', 'LICENSE').include('lib/**/*.rb')
14
+
15
+ rdoc.main = "README.rdoc" # page to start on
16
+ rdoc.title = "Chemcaster Client Documentation"
17
+
18
+ rdoc.rdoc_dir = 'doc' # rdoc output folder
19
+ rdoc.options << '--inline-source' << '--charset=UTF-8'
20
+ rdoc.options << '--webcvs=http://github.com/mislav/will_paginate/tree/master/'
21
+ end
@@ -5,9 +5,9 @@ module Chemcaster
5
5
  raise "No such media type: #{name}" unless klass = $1
6
6
 
7
7
  begin
8
- Object.const_get(klass)
8
+ Chemcaster.const_get("#{klass}")
9
9
  rescue
10
- raise "No such class: #{klass}"
10
+ raise "Unable to create class from media type: #{name}"
11
11
  end
12
12
  end
13
13
 
@@ -16,7 +16,7 @@ module Chemcaster
16
16
  raise "No such media type: #{full_mime_type_name}" unless key = $1
17
17
 
18
18
  begin
19
- Object.const_get(key)
19
+ Chemcaster.const_get(key)
20
20
  rescue
21
21
  raise "No such class: #{key}"
22
22
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: metamolecular-chemcaster
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.5
4
+ version: 0.1.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - Richard Apodaca
@@ -47,7 +47,6 @@ files:
47
47
  - lib/chemcaster/structure.rb
48
48
  has_rdoc: false
49
49
  homepage: http://chemcaster.com
50
- licenses:
51
50
  post_install_message:
52
51
  rdoc_options: []
53
52
 
@@ -68,7 +67,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
68
67
  requirements: []
69
68
 
70
69
  rubyforge_project:
71
- rubygems_version: 1.3.5
70
+ rubygems_version: 1.2.0
72
71
  signing_key:
73
72
  specification_version: 2
74
73
  summary: A hypertext-driven Ruby client for the Chemcaster cheminformatics Web services platform. End.