mindbody 0.0.1 → 0.0.2

Sign up to get free protection for your applications and to get access to all the features.
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: mindbody
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.1
4
+ version: 0.0.2
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,12 +9,12 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2011-05-08 00:00:00.000000000 -07:00
12
+ date: 2011-07-15 00:00:00.000000000 -07:00
13
13
  default_executable:
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: savon
17
- requirement: &72063370 !ruby/object:Gem::Requirement
17
+ requirement: &2161048420 !ruby/object:Gem::Requirement
18
18
  none: false
19
19
  requirements:
20
20
  - - ~>
@@ -22,35 +22,32 @@ dependencies:
22
22
  version: 0.9.2
23
23
  type: :runtime
24
24
  prerelease: false
25
- version_requirements: *72063370
25
+ version_requirements: *2161048420
26
26
  description: Ruby's interface to the Mindbody 0.5 API with no bell's and whistles
27
27
  email: tgoffman@gmail.com
28
28
  executables: []
29
29
  extensions: []
30
30
  extra_rdoc_files: []
31
31
  files:
32
- - .document
33
- - .gitignore
34
- - .rvmrc
35
- - Gemfile
36
- - LICENSE.txt
37
- - README.rdoc
38
- - Rakefile
39
- - lib/mindbody.rb
32
+ - lib/blah.rb
40
33
  - lib/mindbody/appointment_service.rb
41
34
  - lib/mindbody/class_service.rb
42
35
  - lib/mindbody/client_service.rb
43
36
  - lib/mindbody/credentials.rb
44
- - lib/mindbody/mb_meta.rb
45
- - lib/mindbody/mb_service.rb
37
+ - lib/mindbody/meta.rb
38
+ - lib/mindbody/options.rb
46
39
  - lib/mindbody/sale_service.rb
40
+ - lib/mindbody/service.rb
47
41
  - lib/mindbody/site_service.rb
48
42
  - lib/mindbody/source_credentials.rb
43
+ - lib/mindbody/staff_options.rb
49
44
  - lib/mindbody/staff_service.rb
50
45
  - lib/mindbody/version.rb
51
- - mindbody.gemspec
52
- - test/helper.rb
53
- - test/test_mindbody.rb
46
+ - lib/mindbody/wsdl/appointment.xml
47
+ - lib/mindbody/wsdl/class.xml
48
+ - lib/mindbody/wsdl/staff.xml
49
+ - lib/mindbody.rb
50
+ - LICENSE.txt
54
51
  has_rdoc: true
55
52
  homepage: http://github.com/trisrael/mindbody
56
53
  licenses: []
data/.document DELETED
@@ -1,5 +0,0 @@
1
- lib/**/*.rb
2
- bin/*
3
- -
4
- features/**/*.feature
5
- LICENSE.txt
data/.gitignore DELETED
@@ -1,48 +0,0 @@
1
- # rcov generated
2
- coverage
3
-
4
- # rdoc generated
5
- rdoc
6
-
7
- # yard generated
8
- doc
9
- .yardoc
10
-
11
- # bundler
12
- .bundle
13
-
14
- # jeweler generated
15
- pkg
16
-
17
- # Have editor/IDE/OS specific files you need to ignore? Consider using a global gitignore:
18
- #
19
- # * Create a file at ~/.gitignore
20
- # * Include files you want ignored
21
- # * Run: git config --global core.excludesfile ~/.gitignore
22
- #
23
- # After doing this, these files will be ignored in all your git projects,
24
- # saving you from having to 'pollute' every project you touch with them
25
- #
26
- # Not sure what to needs to be ignored for particular editors/OSes? Here's some ideas to get you started. (Remember, remove the leading # of the line)
27
- #
28
- # For MacOS:
29
- #
30
- #.DS_Store
31
-
32
- # For TextMate
33
- #*.tmproj
34
- #tmtags
35
-
36
- # For emacs:
37
- #*~
38
- #\#*
39
- #.\#*
40
-
41
- # For vim:
42
- #*.swp
43
-
44
- # For redcar:
45
- #.redcar
46
-
47
- # For rubinius:
48
- #*.rbc
data/.rvmrc DELETED
@@ -1,2 +0,0 @@
1
- rvm use 1.9.2
2
- rvm gemset use mindbody_gem
data/Gemfile DELETED
@@ -1,15 +0,0 @@
1
- source :rubygems
2
- # Add dependencies required to use your gem here.
3
- # Example:
4
- # gem "activesupport", ">= 2.3.5"
5
-
6
- gem "savon", "~> 0.9.2"
7
-
8
- # Add dependencies to develop your gem here.
9
- # Include everything needed to run rake, tests, features, etc.
10
- group :development do
11
- gem "shoulda", ">= 0"
12
- gem "bundler", "~> 1.0.0"
13
- gem "jeweler", "~> 1.6.0"
14
- gem "rcov", ">= 0"
15
- end
@@ -1,19 +0,0 @@
1
- = mindbody
2
-
3
- Description goes here.
4
-
5
- == Contributing to mindbody
6
-
7
- * Check out the latest master to make sure the feature hasn't been implemented or the bug hasn't been fixed yet
8
- * Check out the issue tracker to make sure someone already hasn't requested it and/or contributed it
9
- * Fork the project
10
- * Start a feature/bugfix branch
11
- * Commit and push until you are happy with your contribution
12
- * Make sure to add tests for it. This is important so I don't break it in a future version unintentionally.
13
- * Please try not to mess with the Rakefile, version, or history. If you want to have your own version, or is otherwise necessary, that is fine, but please isolate to its own commit so I can cherry-pick around it.
14
-
15
- == Copyright
16
-
17
- Copyright (c) 2011 Tristan Goffman. See LICENSE.txt for
18
- further details.
19
-
data/Rakefile DELETED
@@ -1,53 +0,0 @@
1
- # encoding: utf-8
2
-
3
- require 'rubygems'
4
- require 'bundler'
5
- begin
6
- Bundler.setup(:default, :development)
7
- rescue Bundler::BundlerError => e
8
- $stderr.puts e.message
9
- $stderr.puts "Run `bundle install` to install missing gems"
10
- exit e.status_code
11
- end
12
- require 'rake'
13
-
14
- require 'jeweler'
15
- Jeweler::Tasks.new do |gem|
16
- # gem is a Gem::Specification... see http://docs.rubygems.org/read/chapter/20 for more options
17
- gem.name = "mindbody"
18
- gem.homepage = "http://github.com/trisrael/mindbody"
19
- gem.license = "MIT"
20
- gem.summary = %Q{TODO: one-line summary of your gem}
21
- gem.description = %Q{TODO: longer description of your gem}
22
- gem.email = "tgoffman@gmail.com"
23
- gem.authors = ["Tristan Goffman"]
24
- # dependencies defined in Gemfile
25
- end
26
- Jeweler::RubygemsDotOrgTasks.new
27
-
28
- require 'rake/testtask'
29
- Rake::TestTask.new(:test) do |test|
30
- test.libs << 'lib' << 'test'
31
- test.pattern = 'test/**/test_*.rb'
32
- test.verbose = true
33
- end
34
-
35
- require 'rcov/rcovtask'
36
- Rcov::RcovTask.new do |test|
37
- test.libs << 'test'
38
- test.pattern = 'test/**/test_*.rb'
39
- test.verbose = true
40
- test.rcov_opts << '--exclude "gems/*"'
41
- end
42
-
43
- task :default => :test
44
-
45
- require 'rake/rdoctask'
46
- Rake::RDocTask.new do |rdoc|
47
- version = File.exist?('VERSION') ? File.read('VERSION') : ""
48
-
49
- rdoc.rdoc_dir = 'rdoc'
50
- rdoc.title = "mindbody #{version}"
51
- rdoc.rdoc_files.include('README*')
52
- rdoc.rdoc_files.include('lib/**/*.rb')
53
- end
@@ -1,56 +0,0 @@
1
- require 'savon'
2
- class MBService
3
- extend MBMeta
4
- #Sets up the service WSDL endpoint given a Mindbody service name
5
- def self.service(service_name)
6
- @@endpoint = self.wsdl_url(service_name)
7
- end
8
-
9
- attr_accessor :client, :src_creds, :usr_creds
10
-
11
- def initialize(options = {})
12
- @client = nil
13
- @src_creds = options[:source_credentials]
14
- @usr_creds = options[:user_credentials]
15
-
16
- @client = Savon::Client.new @@endpoint if @@endpoint
17
- end
18
-
19
- #Builds the inner XML of the Mindbody SOAP call
20
- def build_request(options = {})
21
-
22
- request_body =
23
- {
24
- "PageSize" => 10,
25
- "XMLDetail" => "Bare",
26
- "CurrentPageIndex" => 0
27
- }
28
-
29
- request_body["SourceCredentials"] = @src_creds.to_hash if @src_creds
30
- request_body["UserCredentials"] = @usr_creds.to_hash if @usr_creds
31
-
32
- return request_body.deep_merge!(options)
33
- end
34
-
35
- #Build a Mindbody SOAP request for the given service
36
- def get_service(service_symbol, options)
37
- raise "No SOAP client instantiated" unless @client
38
-
39
- raise "No SourceCredentials supplied" if !@src_creds && !options[:source_credentials]
40
-
41
- response = @client.request MBMeta::NS, service_symbol do
42
- soap.body =
43
- {
44
- "Request" => build_request(options)
45
- }
46
- end
47
- end
48
-
49
- #Allows services to be called directly on the service and rerouted to
50
- #the client
51
- def method_missing(m_name, *args, &block)
52
- options = args[0]
53
- get_service m_name.to_sym, options.is_a?(Hash) ? options : {}
54
-
55
- end
56
- end
@@ -1,22 +0,0 @@
1
- lib = File.expand_path("../lib", __FILE__)
2
- $:.unshift lib unless $:.include? lib
3
-
4
- require "mindbody/version"
5
-
6
- Gem::Specification.new do |s|
7
- s.name = "mindbody"
8
- s.version = Mindbody::Version
9
- s.authors = "Tristan Goffman"
10
- s.email = "tgoffman@gmail.com"
11
- s.homepage = "http://github.com/trisrael/mindbody"
12
- s.summary = "Ruby interface to Mindbody 0.5 API"
13
- s.description = "Ruby's interface to the Mindbody 0.5 API with no bell's and whistles"
14
-
15
- s.rubyforge_project = s.name
16
-
17
- s.add_dependency "savon", "~> 0.9.2"
18
- s.files = `git ls-files`.split("\n")
19
- s.require_path = "lib"
20
- end
21
-
22
-
@@ -1,18 +0,0 @@
1
- require 'rubygems'
2
- require 'bundler'
3
- begin
4
- Bundler.setup(:default, :development)
5
- rescue Bundler::BundlerError => e
6
- $stderr.puts e.message
7
- $stderr.puts "Run `bundle install` to install missing gems"
8
- exit e.status_code
9
- end
10
- require 'test/unit'
11
- require 'shoulda'
12
-
13
- $LOAD_PATH.unshift(File.join(File.dirname(__FILE__), '..', 'lib'))
14
- $LOAD_PATH.unshift(File.dirname(__FILE__))
15
- require 'mindbody'
16
-
17
- class Test::Unit::TestCase
18
- end
@@ -1,7 +0,0 @@
1
- require 'helper'
2
-
3
- class TestMindbody < Test::Unit::TestCase
4
- should "probably rename this file and start testing for real" do
5
- flunk "hey buddy, you should probably rename this file and start testing for real"
6
- end
7
- end