tpdata 0.9.1 → 1.0.0

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/Gemfile CHANGED
@@ -5,8 +5,5 @@ gem 'httparty'
5
5
  # Testing
6
6
  group :test do
7
7
  gem 'rspec'
8
- gem 'ZenTest'
9
- gem 'autotest-growl'
10
- gem 'autotest-fsevent'
11
- gem 'spork', '0.8.4'
8
+ gem 'rake'
12
9
  end
data/Manifest.txt CHANGED
@@ -1,12 +1,15 @@
1
+ Gemfile
1
2
  Manifest.txt
2
- README.markdown
3
+ README.md
3
4
  Rakefile
4
- bin/tpdata
5
+ examples/data_example.rb
5
6
  lib/theplatform.rb
6
7
  lib/theplatform/configuration.rb
7
8
  lib/theplatform/data.rb
8
9
  lib/theplatform/identity.rb
9
10
  lib/theplatform/services.rb
10
- spec/identity_spec.rb
11
+ spec/lib/configuration_spec.rb
12
+ spec/lib/data_spec.rb
13
+ spec/lib/identity_spec.rb
11
14
  spec/spec_helper.rb
12
-
15
+ theplatform.gemspec
data/README.md CHANGED
@@ -1,5 +1,8 @@
1
1
  # tpdata
2
2
 
3
+ [![Build Status](https://travis-ci.org/benwoody/tpdata.png)](https://travis-ci.org/benwoody/tpdata)
4
+
5
+
3
6
  ## DESCRIPTION:
4
7
 
5
8
  Tpdata gem is a wrapper for the RESTful interface for thePlatform for Media's Data Services.
@@ -7,12 +10,16 @@ Tpdata gem is a wrapper for the RESTful interface for thePlatform for Media's Da
7
10
 
8
11
  ## REQUIREMENTS:
9
12
 
10
- The only Gem requirement is HTTParty
13
+ HTTParty ~> 0.9.0
11
14
 
12
15
  ## INSTALL:
13
16
 
14
17
  gem install tpdata
15
18
 
19
+ or
20
+
21
+ gem build theplatform.gemspec
22
+
16
23
  ## USAGE:
17
24
 
18
25
  To add Tpdata gem:
@@ -29,10 +36,12 @@ Both endpoints (::Data and ::Identity) support the #configure methods to build i
29
36
  end
30
37
  => {:schema=>"1.4.0", :form=>"cjson", :token=>"rDGZTYyxjGqjfEXNsphawfAqIdfdDDff"}
31
38
 
39
+ If the #configurate method is used, it does not have to be added in the request.
40
+
32
41
  To list the available params to configure:
33
42
 
34
43
  ThePlatform::Identity.parameters
35
- => {:schema=>"1.4.0", :form=>"cjson", :token=>"rDGZTYyxjGqjfEXNsphawfAqIdfdDDff"}
44
+ => {:schema=>nil, :form=>nil, :username=>nil, :password=>nil, :_duration=>nil, :_idleTimeout=>nil}
36
45
 
37
46
  The boolean methods #parameters? is also available to query if all params are set:
38
47
 
@@ -54,7 +63,7 @@ To request a token:
54
63
  Note that you can also set _duration and _idleTimeout as well. Visit http://help.theplatform.com for more information.
55
64
 
56
65
  ### Data Services
57
- A list of endpoints and valid objects are available at http://help.theplatform.com. Internally, they are listed in the services.rb file.
66
+ A list of endpoints and valid objects are available at http://help.theplatform.com. Internally, they are listed in the lib/theplatform/services.rb file.
58
67
 
59
68
  In this example, we're going to build a query for the Media Data Service (MDS):
60
69
 
@@ -94,13 +103,15 @@ A DELETE:
94
103
 
95
104
  Needed params here are the Object, Object ID(s), schema, form, token, and account.
96
105
 
97
- ## ToDo:
98
- * Add SELF to the Identity endpoints
99
- * Unit::Tests and Specs for all. Use mocks instead of live data!
106
+ Notify:
107
+
108
+ The Notify endpoint is supported as well.
109
+
110
+ media.notify(token:'Nez8Y9ScVDxPxLDmUsg_ESCDYJCJwPBk', size:'10', since:'11111111')
111
+
100
112
 
101
113
  ## LICENSE:
102
114
 
103
- Copyright (c) 2012 Ben Woodall
115
+ MIT License (c) 2012 Ben Woodall
104
116
 
105
- Code hosted at git://ln.benwoodall.com/tpdata.git as ReadOnly.
106
- For Write access or send-email diffs: mail@benwoodall.com
117
+ Fork it. Fix it. Push it. Pull it.
@@ -4,6 +4,7 @@ module ThePlatform
4
4
  # ThePlatform::Data#
5
5
  class Data
6
6
  include HTTParty
7
+ ssl_version :SSLv3
7
8
  extend ThePlatform::Configuration
8
9
 
9
10
  def initialize(params={})
@@ -4,6 +4,7 @@ module ThePlatform
4
4
  # ThePlatform::Identity#
5
5
  class Identity
6
6
  include HTTParty
7
+ ssl_version :SSLv3
7
8
  extend ThePlatform::Configuration
8
9
 
9
10
  class << self
data/lib/theplatform.rb CHANGED
@@ -6,7 +6,7 @@ require 'httparty'
6
6
  module ThePlatform
7
7
 
8
8
  # Set gem version
9
- VERSION = '0.9.1'
9
+ VERSION = '1.0.0'
10
10
 
11
11
  require 'theplatform/configuration'
12
12
  require 'theplatform/services'
data/theplatform.gemspec CHANGED
@@ -4,9 +4,9 @@ require './lib/theplatform.rb'
4
4
  Gem::Specification.new do |s|
5
5
  s.name = 'tpdata'
6
6
  s.version = ThePlatform::VERSION
7
- s.date = '2012-09-28'
7
+ s.date = '2012-10-03'
8
8
  s.authors = ['Ben Woodall']
9
- s.email = 'ben.woodall@theplatform.com'
9
+ s.email = 'mail@benwoodall.com'
10
10
  s.homepage = 'http://github.com/benwoody/tpdata'
11
11
 
12
12
  s.summary = %q{RESTful wrapper for thePlatform}
@@ -18,7 +18,7 @@ Gem::Specification.new do |s|
18
18
 
19
19
  s.extra_rdoc_files = ["README.md"]
20
20
 
21
- s.add_runtime_dependency 'httparty', "~> 0.8.3"
21
+ s.add_runtime_dependency 'httparty', "~> 0.9.0"
22
22
  s.add_development_dependency 'rake'
23
23
  s.add_development_dependency 'rspec'
24
24
  s.add_development_dependency 'yard'
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: tpdata
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.9.1
4
+ version: 1.0.0
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,27 +9,22 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2012-09-28 00:00:00.000000000 Z
12
+ date: 2012-10-03 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: httparty
16
- requirement: !ruby/object:Gem::Requirement
16
+ requirement: &76646140 !ruby/object:Gem::Requirement
17
17
  none: false
18
18
  requirements:
19
19
  - - ~>
20
20
  - !ruby/object:Gem::Version
21
- version: 0.8.3
21
+ version: 0.9.0
22
22
  type: :runtime
23
23
  prerelease: false
24
- version_requirements: !ruby/object:Gem::Requirement
25
- none: false
26
- requirements:
27
- - - ~>
28
- - !ruby/object:Gem::Version
29
- version: 0.8.3
24
+ version_requirements: *76646140
30
25
  - !ruby/object:Gem::Dependency
31
26
  name: rake
32
- requirement: !ruby/object:Gem::Requirement
27
+ requirement: &76645170 !ruby/object:Gem::Requirement
33
28
  none: false
34
29
  requirements:
35
30
  - - ! '>='
@@ -37,15 +32,10 @@ dependencies:
37
32
  version: '0'
38
33
  type: :development
39
34
  prerelease: false
40
- version_requirements: !ruby/object:Gem::Requirement
41
- none: false
42
- requirements:
43
- - - ! '>='
44
- - !ruby/object:Gem::Version
45
- version: '0'
35
+ version_requirements: *76645170
46
36
  - !ruby/object:Gem::Dependency
47
37
  name: rspec
48
- requirement: !ruby/object:Gem::Requirement
38
+ requirement: &76644380 !ruby/object:Gem::Requirement
49
39
  none: false
50
40
  requirements:
51
41
  - - ! '>='
@@ -53,15 +43,10 @@ dependencies:
53
43
  version: '0'
54
44
  type: :development
55
45
  prerelease: false
56
- version_requirements: !ruby/object:Gem::Requirement
57
- none: false
58
- requirements:
59
- - - ! '>='
60
- - !ruby/object:Gem::Version
61
- version: '0'
46
+ version_requirements: *76644380
62
47
  - !ruby/object:Gem::Dependency
63
48
  name: yard
64
- requirement: !ruby/object:Gem::Requirement
49
+ requirement: &76643190 !ruby/object:Gem::Requirement
65
50
  none: false
66
51
  requirements:
67
52
  - - ! '>='
@@ -69,26 +54,19 @@ dependencies:
69
54
  version: '0'
70
55
  type: :development
71
56
  prerelease: false
72
- version_requirements: !ruby/object:Gem::Requirement
73
- none: false
74
- requirements:
75
- - - ! '>='
76
- - !ruby/object:Gem::Version
77
- version: '0'
57
+ version_requirements: *76643190
78
58
  description: Tpdata gem is a wrapper for the RESTful interface for thePlatform for
79
59
  Media's Data Services.
80
- email: ben.woodall@theplatform.com
60
+ email: mail@benwoodall.com
81
61
  executables: []
82
62
  extensions: []
83
63
  extra_rdoc_files:
84
64
  - README.md
85
65
  files:
86
66
  - Gemfile
87
- - Gemfile.lock
88
67
  - Manifest.txt
89
68
  - README.md
90
69
  - Rakefile
91
- - bin/tpdata
92
70
  - examples/data_example.rb
93
71
  - lib/theplatform.rb
94
72
  - lib/theplatform/configuration.rb
@@ -120,13 +98,9 @@ required_rubygems_version: !ruby/object:Gem::Requirement
120
98
  version: '0'
121
99
  requirements: []
122
100
  rubyforge_project:
123
- rubygems_version: 1.8.21
101
+ rubygems_version: 1.8.11
124
102
  signing_key:
125
103
  specification_version: 3
126
104
  summary: RESTful wrapper for thePlatform
127
- test_files:
128
- - spec/lib/configuration_spec.rb
129
- - spec/lib/data_spec.rb
130
- - spec/lib/identity_spec.rb
131
- - spec/spec_helper.rb
105
+ test_files: []
132
106
  has_rdoc:
data/Gemfile.lock DELETED
@@ -1,36 +0,0 @@
1
- GEM
2
- remote: http://rubygems.org/
3
- specs:
4
- ZenTest (4.8.1)
5
- autotest-fsevent (0.2.8)
6
- sys-uname
7
- autotest-growl (0.2.16)
8
- diff-lcs (1.1.3)
9
- ffi (1.0.11)
10
- httparty (0.8.3)
11
- multi_json (~> 1.0)
12
- multi_xml
13
- multi_json (1.0.4)
14
- multi_xml (0.5.1)
15
- rspec (2.10.0)
16
- rspec-core (~> 2.10.0)
17
- rspec-expectations (~> 2.10.0)
18
- rspec-mocks (~> 2.10.0)
19
- rspec-core (2.10.1)
20
- rspec-expectations (2.10.0)
21
- diff-lcs (~> 1.1.3)
22
- rspec-mocks (2.10.1)
23
- spork (0.8.4)
24
- sys-uname (0.9.0)
25
- ffi (>= 1.0.0)
26
-
27
- PLATFORMS
28
- ruby
29
-
30
- DEPENDENCIES
31
- ZenTest
32
- autotest-fsevent
33
- autotest-growl
34
- httparty
35
- rspec
36
- spork (= 0.8.4)
data/bin/tpdata DELETED
@@ -1,3 +0,0 @@
1
- #!/usr/bin/env ruby
2
-
3
- abort "you need to write me"