bookingsync 0.1.1 → 0.2.0

Sign up to get free protection for your applications and to get access to all the features.
data/README.md CHANGED
@@ -1,63 +1,53 @@
1
- # BookingSync (0.1.1)
1
+ # BookingSync [![Build Status](http://travis-ci.org/BookingSync/bookingsync-ruby.png)](http://travis-ci.org/BookingSync/bookingsync-ruby)
2
+
2
3
 
3
4
  ## What is it?
4
5
 
5
6
  This gem provides a set of classes to access information on [BookingSync][bs] via the published [API][api]:
6
7
 
7
- Booking, Client, Rental.
8
+ `Booking`, `Client`, `Rental` and `Inquiry`.
8
9
 
9
- All these classes are inherited from ActiveResouce::Base. Refer to the [ActiveResouce][ar] documentation for more information.
10
+ All these classes are inherited from ActiveResouce::Base. You can refer to the [ActiveResouce][ar] documentation for more information.
10
11
 
11
12
  ## Installing
12
13
 
13
14
  gem install bookingsync
14
15
 
15
- ### Dependencies (see <code>bookingsync.gemspec</code> or run <code>bundle check</code>)
16
+ or within a Rails 3 application
16
17
 
17
- ### Documentation
18
+ gem "bookingsync"
18
19
 
19
- I'm on [rdoc.info][rdoc]
20
+ ### Dependencies
21
+
22
+ This gem depends on ActiveResource 3.x
20
23
 
21
24
  ### Configure your key
22
-
25
+
23
26
  require 'bookingsync'
24
-
27
+
25
28
  BookingSync::Base.user = 'api-auth-token'
26
29
 
27
- If you are using this in a Rails application, putting this code in a config/initializers/bookingsync.rb
28
- file is recommended. See config_initializers_bookingsync.rb in the examples/ directory.
30
+ If you are using this in a Rails application, putting this code in a `config/initializers/bookingsync.rb`
31
+ file is recommended. See `config_initializers_bookingsync.rb` in the `examples/` directory.
32
+
33
+ ### Documentation
34
+
35
+ Further documentation can be found on [rdoc.info][rdoc].
29
36
 
30
37
  ## Usage
31
38
 
32
39
  @rental = BookingSync::Rental.create(:name => 'Wonderful Rental')
33
-
40
+
34
41
  @rentals = BookingSync::Rental.all
35
-
42
+
36
43
  @bookings = BookingSync::Booking.find_all_across_pages(:params => {:rental_id => 12345})
37
-
44
+
38
45
  @bookings = BookingSync::Rental.find(12345).bookings
39
46
 
40
47
  ## License
41
48
 
42
49
  This code is free to be used under the terms of the [MIT license][mit].
43
50
 
44
- ## Bugs, Issues, Kudos and Catcalls
45
-
46
- Comments are welcome. Send your feedback through the [issue tracker on GitHub][i]
47
-
48
- If you have fixes: Submit via pull requests. Do not include version changes to the
49
- version file.
50
-
51
- ## Contributing to BookingSync
52
-
53
- * Check out the latest master to make sure the feature hasn't been implemented or the bug hasn't been fixed yet
54
- * Check out the issue tracker to make sure someone already hasn't requested it and/or contributed it
55
- * Fork the project
56
- * Start a feature/bugfix branch
57
- * Commit and push until you are happy with your contribution
58
- * Make sure to add tests for it. This is important so I don't break it in a future version unintentionally.
59
- * 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.
60
-
61
51
  ## Authors
62
52
 
63
53
  * [Sébastien Grosjean][zencocoon]
@@ -0,0 +1 @@
1
+ require 'aruba/cucumber'
@@ -1,5 +1,11 @@
1
+ require 'active_resource'
2
+
1
3
  require 'bookingsync/base'
2
4
  require 'bookingsync/pagination'
3
5
  require 'bookingsync/booking'
4
6
  require 'bookingsync/client'
5
- require 'bookingsync/rental'
7
+ require 'bookingsync/rental'
8
+ require 'bookingsync/inquiry'
9
+
10
+ module BookingSync
11
+ end
@@ -1,9 +1,7 @@
1
- require 'active_resource'
2
-
3
1
  module BookingSync
4
2
  class Base < ActiveResource::Base
5
3
  self.site = 'https://www.bookingsync.com'
6
-
4
+
7
5
  protected
8
6
  # Dynamic finder for attributes
9
7
  def self.method_missing(method, *args)
@@ -0,0 +1,5 @@
1
+ module BookingSync
2
+ class Inquiry < Base
3
+ include Pagination
4
+ end
5
+ end
@@ -17,17 +17,18 @@ module BookingSync
17
17
  end
18
18
 
19
19
  private
20
-
20
+
21
21
  def each(options = {})
22
22
  options[:params] ||= {}
23
23
  options[:params][:page] = 1
24
+ options[:params][:per_page] = 500
24
25
 
25
26
  loop do
26
27
  if (records = self.find(:all, options)).try(:any?)
27
28
  records.each { |record| yield record }
28
29
  options[:params][:page] += 1
29
30
  else
30
- break # no booking included on that page, there's no more booking
31
+ break # no record included on that page, there's no more record
31
32
  end
32
33
  end
33
34
  end
@@ -0,0 +1,6 @@
1
+ module BookingSync
2
+ # @private
3
+ module Version
4
+ STRING = '0.2.0'
5
+ end
6
+ end
@@ -1,4 +1,4 @@
1
- require File.expand_path(File.dirname(__FILE__) + '/../spec_helper')
1
+ require 'spec_helper'
2
2
 
3
3
  describe BookingSync::Base do
4
4
  it { subject.should be_a_kind_of ActiveResource::Base }
@@ -1,8 +1,8 @@
1
- require File.expand_path(File.dirname(__FILE__) + '/../spec_helper')
1
+ require 'spec_helper'
2
2
 
3
3
  describe BookingSync::Booking do
4
4
  subject { BookingSync::Booking.new(:id => 1) }
5
-
5
+
6
6
  it { should be_a_kind_of BookingSync::Booking }
7
7
 
8
8
  it_should_behave_like "a paginated class"
@@ -1,8 +1,8 @@
1
- require File.expand_path(File.dirname(__FILE__) + '/../spec_helper')
1
+ require 'spec_helper'
2
2
 
3
3
  describe BookingSync::Client do
4
4
  subject { BookingSync::Client.new(:id => 1) }
5
-
5
+
6
6
  it { should be_a_kind_of BookingSync::Client }
7
7
 
8
8
  it_should_behave_like "a paginated class"
@@ -0,0 +1,9 @@
1
+ require 'spec_helper'
2
+
3
+ describe BookingSync::Inquiry do
4
+ subject { BookingSync::Inquiry.new(:id => 1) }
5
+
6
+ it { should be_a_kind_of BookingSync::Inquiry }
7
+
8
+ it_should_behave_like "a paginated class"
9
+ end
@@ -3,18 +3,18 @@ shared_examples_for "a paginated class" do
3
3
 
4
4
  it ".find_all_across_pages" do
5
5
  subject.class.should_receive(:find).with(:all, {
6
- :params => { :page => 1 }}).and_return(["things"])
6
+ :params => { :page => 1, :per_page => 500 }}).and_return(["things"])
7
7
  subject.class.should_receive(:find).with(:all,{
8
- :params => { :page => 2 }}).and_return([])
8
+ :params => { :page => 2, :per_page => 500 }}).and_return([])
9
9
  subject.class.find_all_across_pages.should == ["things"]
10
10
  end
11
-
11
+
12
12
  it ".find_all_across_pages with zero results" do
13
13
  subject.class.should_receive(:find).with(:all,{
14
- :params => { :page => 1 }}).and_return(nil)
14
+ :params => { :page => 1, :per_page => 500 }}).and_return(nil)
15
15
  subject.class.find_all_across_pages.should == []
16
16
  end
17
-
17
+
18
18
  it ".find_all_across_pages_since" do
19
19
  time = Time.parse("Fri Jan 07 12:34:56 +0200 2011")
20
20
  subject.class.should_receive(:find_all_across_pages).with({
@@ -1,8 +1,8 @@
1
- require File.expand_path(File.dirname(__FILE__) + '/../spec_helper')
1
+ require 'spec_helper'
2
2
 
3
3
  describe BookingSync::Rental do
4
4
  subject { BookingSync::Rental.new(:id => 1) }
5
-
5
+
6
6
  it { should be_a_kind_of BookingSync::Rental }
7
7
 
8
8
  it_should_behave_like "a paginated class"
@@ -1,17 +1,9 @@
1
- $LOAD_PATH.unshift(File.join(File.dirname(__FILE__), '..', 'lib'))
2
- $LOAD_PATH.unshift(File.dirname(__FILE__))
3
- require 'rspec'
4
1
  require 'bookingsync'
5
2
 
6
-
7
3
  BookingSync::Base.user = ENV['BOOKINGSYNC_USER'] || 'x'
8
4
 
9
5
  require 'bookingsync/pagination_behavior'
10
6
 
11
- # Requires supporting files with custom matchers and macros, etc,
12
- # in ./support/ and its subdirectories.
13
- Dir["#{File.dirname(__FILE__)}/support/**/*.rb"].each {|f| require f}
14
-
15
7
  RSpec.configure do |config|
16
-
8
+ config.color_enabled = true
17
9
  end
metadata CHANGED
@@ -1,183 +1,196 @@
1
- --- !ruby/object:Gem::Specification
1
+ --- !ruby/object:Gem::Specification
2
2
  name: bookingsync
3
- version: !ruby/object:Gem::Version
4
- prerelease: false
5
- segments:
6
- - 0
7
- - 1
8
- - 1
9
- version: 0.1.1
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.2.0
5
+ prerelease:
10
6
  platform: ruby
11
- authors:
7
+ authors:
12
8
  - Sebastien Grosjean
13
9
  autorequire:
14
10
  bindir: bin
15
11
  cert_chain: []
16
-
17
- date: 2011-01-07 00:00:00 +02:00
18
- default_executable:
19
- dependencies:
20
- - !ruby/object:Gem::Dependency
12
+ date: 2012-01-30 00:00:00.000000000Z
13
+ dependencies:
14
+ - !ruby/object:Gem::Dependency
21
15
  name: activeresource
22
- requirement: &id001 !ruby/object:Gem::Requirement
16
+ requirement: &70346682614900 !ruby/object:Gem::Requirement
23
17
  none: false
24
- requirements:
25
- - - ">="
26
- - !ruby/object:Gem::Version
27
- segments:
28
- - 3
29
- - 0
30
- - 0
31
- version: 3.0.0
18
+ requirements:
19
+ - - ! '>='
20
+ - !ruby/object:Gem::Version
21
+ version: '3.0'
32
22
  type: :runtime
33
23
  prerelease: false
34
- version_requirements: *id001
35
- - !ruby/object:Gem::Dependency
36
- name: rspec
37
- requirement: &id002 !ruby/object:Gem::Requirement
24
+ version_requirements: *70346682614900
25
+ - !ruby/object:Gem::Dependency
26
+ name: rake
27
+ requirement: &70346682614280 !ruby/object:Gem::Requirement
38
28
  none: false
39
- requirements:
29
+ requirements:
40
30
  - - ~>
41
- - !ruby/object:Gem::Version
42
- segments:
43
- - 2
44
- - 2
45
- - 0
46
- version: 2.2.0
31
+ - !ruby/object:Gem::Version
32
+ version: '0.9'
47
33
  type: :development
48
34
  prerelease: false
49
- version_requirements: *id002
50
- - !ruby/object:Gem::Dependency
51
- name: bundler
52
- requirement: &id003 !ruby/object:Gem::Requirement
35
+ version_requirements: *70346682614280
36
+ - !ruby/object:Gem::Dependency
37
+ name: cucumber
38
+ requirement: &70346682613700 !ruby/object:Gem::Requirement
53
39
  none: false
54
- requirements:
55
- - - ~>
56
- - !ruby/object:Gem::Version
57
- segments:
58
- - 1
59
- - 0
60
- - 0
40
+ requirements:
41
+ - - =
42
+ - !ruby/object:Gem::Version
61
43
  version: 1.0.0
62
44
  type: :development
63
45
  prerelease: false
64
- version_requirements: *id003
65
- - !ruby/object:Gem::Dependency
66
- name: jeweler
67
- requirement: &id004 !ruby/object:Gem::Requirement
46
+ version_requirements: *70346682613700
47
+ - !ruby/object:Gem::Dependency
48
+ name: aruba
49
+ requirement: &70346682613100 !ruby/object:Gem::Requirement
50
+ none: false
51
+ requirements:
52
+ - - =
53
+ - !ruby/object:Gem::Version
54
+ version: 0.4.2
55
+ type: :development
56
+ prerelease: false
57
+ version_requirements: *70346682613100
58
+ - !ruby/object:Gem::Dependency
59
+ name: nokogiri
60
+ requirement: &70346682612520 !ruby/object:Gem::Requirement
61
+ none: false
62
+ requirements:
63
+ - - =
64
+ - !ruby/object:Gem::Version
65
+ version: 1.4.4
66
+ type: :development
67
+ prerelease: false
68
+ version_requirements: *70346682612520
69
+ - !ruby/object:Gem::Dependency
70
+ name: relish
71
+ requirement: &70346682611940 !ruby/object:Gem::Requirement
72
+ none: false
73
+ requirements:
74
+ - - =
75
+ - !ruby/object:Gem::Version
76
+ version: 0.4.0
77
+ type: :development
78
+ prerelease: false
79
+ version_requirements: *70346682611940
80
+ - !ruby/object:Gem::Dependency
81
+ name: yard
82
+ requirement: &70346682611420 !ruby/object:Gem::Requirement
68
83
  none: false
69
- requirements:
84
+ requirements:
70
85
  - - ~>
71
- - !ruby/object:Gem::Version
72
- segments:
73
- - 1
74
- - 5
75
- - 1
76
- version: 1.5.1
86
+ - !ruby/object:Gem::Version
87
+ version: 0.7.2
77
88
  type: :development
78
89
  prerelease: false
79
- version_requirements: *id004
80
- - !ruby/object:Gem::Dependency
81
- name: rcov
82
- requirement: &id005 !ruby/object:Gem::Requirement
90
+ version_requirements: *70346682611420
91
+ - !ruby/object:Gem::Dependency
92
+ name: guard-rspec
93
+ requirement: &70346682610920 !ruby/object:Gem::Requirement
83
94
  none: false
84
- requirements:
85
- - - ">="
86
- - !ruby/object:Gem::Version
87
- segments:
88
- - 0
89
- version: "0"
95
+ requirements:
96
+ - - =
97
+ - !ruby/object:Gem::Version
98
+ version: 0.1.9
90
99
  type: :development
91
100
  prerelease: false
92
- version_requirements: *id005
93
- - !ruby/object:Gem::Dependency
94
- name: ZenTest
95
- requirement: &id006 !ruby/object:Gem::Requirement
101
+ version_requirements: *70346682610920
102
+ - !ruby/object:Gem::Dependency
103
+ name: guard-cucumber
104
+ requirement: &70346682610300 !ruby/object:Gem::Requirement
96
105
  none: false
97
- requirements:
98
- - - ">="
99
- - !ruby/object:Gem::Version
100
- segments:
101
- - 0
102
- version: "0"
106
+ requirements:
107
+ - - ~>
108
+ - !ruby/object:Gem::Version
109
+ version: 0.5.1
110
+ type: :development
111
+ prerelease: false
112
+ version_requirements: *70346682610300
113
+ - !ruby/object:Gem::Dependency
114
+ name: growl
115
+ requirement: &70346682606600 !ruby/object:Gem::Requirement
116
+ none: false
117
+ requirements:
118
+ - - =
119
+ - !ruby/object:Gem::Version
120
+ version: 1.0.3
121
+ type: :development
122
+ prerelease: false
123
+ version_requirements: *70346682606600
124
+ - !ruby/object:Gem::Dependency
125
+ name: appraisal
126
+ requirement: &70346682606020 !ruby/object:Gem::Requirement
127
+ none: false
128
+ requirements:
129
+ - - ~>
130
+ - !ruby/object:Gem::Version
131
+ version: 0.3.8
103
132
  type: :development
104
133
  prerelease: false
105
- version_requirements: *id006
106
- description: " Ruby wrapper around BookingSync API\n \n Configure by adding the following:\n\n require 'bookingsync'\n BookingSync::Base.user = 'your_api_auth_token'\n"
134
+ version_requirements: *70346682606020
135
+ description: ! " Ruby wrapper around BookingSync API\n\n Configure by adding the
136
+ following:\n\n require 'bookingsync'\n BookingSync::Base.user = 'your_api_auth_token'\n"
107
137
  email: public@zencocoon.com
108
138
  executables: []
109
-
110
139
  extensions: []
111
-
112
- extra_rdoc_files:
113
- - LICENSE.txt
140
+ extra_rdoc_files:
114
141
  - README.md
115
- files:
116
- - .document
117
- - .rspec
118
- - Gemfile
119
- - Gemfile.lock
120
- - LICENSE.txt
121
- - README.md
122
- - Rakefile
123
- - VERSION
124
- - autotest/discover.rb
125
- - bookingsync.gemspec
126
- - examples/config_initializers_bookingsync.rb
127
- - examples/sample.rb
142
+ files:
128
143
  - lib/bookingsync.rb
129
144
  - lib/bookingsync/base.rb
130
145
  - lib/bookingsync/booking.rb
131
146
  - lib/bookingsync/client.rb
147
+ - lib/bookingsync/inquiry.rb
132
148
  - lib/bookingsync/pagination.rb
133
149
  - lib/bookingsync/rental.rb
150
+ - lib/bookingsync/version.rb
151
+ - README.md
152
+ - features/support/env.rb
134
153
  - spec/bookingsync/base_spec.rb
135
154
  - spec/bookingsync/booking_spec.rb
136
155
  - spec/bookingsync/client_spec.rb
156
+ - spec/bookingsync/inquiry_spec.rb
137
157
  - spec/bookingsync/pagination_behavior.rb
138
158
  - spec/bookingsync/pagination_spec.rb
139
159
  - spec/bookingsync/rental_spec.rb
140
160
  - spec/spec_helper.rb
141
- has_rdoc: true
142
161
  homepage: http://github.com/BookingSync/bookingsync-ruby
143
- licenses:
144
- - MIT
162
+ licenses: []
145
163
  post_install_message:
146
- rdoc_options: []
147
-
148
- require_paths:
164
+ rdoc_options:
165
+ - --charset=UTF-8
166
+ require_paths:
149
167
  - lib
150
- required_ruby_version: !ruby/object:Gem::Requirement
168
+ required_ruby_version: !ruby/object:Gem::Requirement
151
169
  none: false
152
- requirements:
153
- - - ">="
154
- - !ruby/object:Gem::Version
155
- hash: -1202348415661920971
156
- segments:
157
- - 0
158
- version: "0"
159
- required_rubygems_version: !ruby/object:Gem::Requirement
170
+ requirements:
171
+ - - ! '>='
172
+ - !ruby/object:Gem::Version
173
+ version: '0'
174
+ required_rubygems_version: !ruby/object:Gem::Requirement
160
175
  none: false
161
- requirements:
162
- - - ">="
163
- - !ruby/object:Gem::Version
164
- segments:
165
- - 0
166
- version: "0"
176
+ requirements:
177
+ - - ! '>='
178
+ - !ruby/object:Gem::Version
179
+ version: '0'
167
180
  requirements: []
168
-
169
181
  rubyforge_project:
170
- rubygems_version: 1.3.7
182
+ rubygems_version: 1.8.15
171
183
  signing_key:
172
184
  specification_version: 3
173
- summary: Ruby wrapper around BookingSync API
174
- test_files:
175
- - examples/config_initializers_bookingsync.rb
176
- - examples/sample.rb
185
+ summary: Ruby wrapper around BookingSync API. Version 0.2.0
186
+ test_files:
187
+ - features/support/env.rb
177
188
  - spec/bookingsync/base_spec.rb
178
189
  - spec/bookingsync/booking_spec.rb
179
190
  - spec/bookingsync/client_spec.rb
191
+ - spec/bookingsync/inquiry_spec.rb
180
192
  - spec/bookingsync/pagination_behavior.rb
181
193
  - spec/bookingsync/pagination_spec.rb
182
194
  - spec/bookingsync/rental_spec.rb
183
195
  - spec/spec_helper.rb
196
+ has_rdoc:
data/.document DELETED
@@ -1,5 +0,0 @@
1
- lib/**/*.rb
2
- bin/*
3
- -
4
- features/**/*.feature
5
- LICENSE.txt
data/.rspec DELETED
@@ -1 +0,0 @@
1
- --color
data/Gemfile DELETED
@@ -1,14 +0,0 @@
1
- source "http://rubygems.org"
2
- # Add dependencies required to use your gem here.
3
- # Example:
4
- gem "activeresource", ">= 3.0.0"
5
-
6
- # Add dependencies to develop your gem here.
7
- # Include everything needed to run rake, tests, features, etc.
8
- group :development do
9
- gem "rspec", "~> 2.2.0"
10
- gem "bundler", "~> 1.0.0"
11
- gem "jeweler", "~> 1.5.1"
12
- gem "rcov", ">= 0"
13
- gem "ZenTest", ">= 0"
14
- end
@@ -1,41 +0,0 @@
1
- GEM
2
- remote: http://rubygems.org/
3
- specs:
4
- ZenTest (4.4.2)
5
- activemodel (3.0.3)
6
- activesupport (= 3.0.3)
7
- builder (~> 2.1.2)
8
- i18n (~> 0.4)
9
- activeresource (3.0.3)
10
- activemodel (= 3.0.3)
11
- activesupport (= 3.0.3)
12
- activesupport (3.0.3)
13
- builder (2.1.2)
14
- diff-lcs (1.1.2)
15
- git (1.2.5)
16
- i18n (0.5.0)
17
- jeweler (1.5.2)
18
- bundler (~> 1.0.0)
19
- git (>= 1.2.5)
20
- rake
21
- rake (0.8.7)
22
- rcov (0.9.9)
23
- rspec (2.2.0)
24
- rspec-core (~> 2.2)
25
- rspec-expectations (~> 2.2)
26
- rspec-mocks (~> 2.2)
27
- rspec-core (2.2.1)
28
- rspec-expectations (2.2.0)
29
- diff-lcs (~> 1.1.2)
30
- rspec-mocks (2.2.0)
31
-
32
- PLATFORMS
33
- ruby
34
-
35
- DEPENDENCIES
36
- ZenTest
37
- activeresource (>= 3.0.0)
38
- bundler (~> 1.0.0)
39
- jeweler (~> 1.5.1)
40
- rcov
41
- rspec (~> 2.2.0)
@@ -1,20 +0,0 @@
1
- Copyright (c) 2011 Sebastien Grosjean
2
-
3
- Permission is hereby granted, free of charge, to any person obtaining
4
- a copy of this software and associated documentation files (the
5
- "Software"), to deal in the Software without restriction, including
6
- without limitation the rights to use, copy, modify, merge, publish,
7
- distribute, sublicense, and/or sell copies of the Software, and to
8
- permit persons to whom the Software is furnished to do so, subject to
9
- the following conditions:
10
-
11
- The above copyright notice and this permission notice shall be
12
- included in all copies or substantial portions of the Software.
13
-
14
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
15
- EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
16
- MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
17
- NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
18
- LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
19
- OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
20
- WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
data/Rakefile DELETED
@@ -1,61 +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 'rake'
11
-
12
- require 'jeweler'
13
- Jeweler::Tasks.new do |gem|
14
- # gem is a Gem::Specification... see http://docs.rubygems.org/read/chapter/20 for more options
15
- gem.name = "bookingsync"
16
- gem.homepage = "http://github.com/BookingSync/bookingsync-ruby"
17
- gem.license = "MIT"
18
- gem.summary = %Q{Ruby wrapper around BookingSync API}
19
- gem.description = <<-EOT
20
- Ruby wrapper around BookingSync API
21
-
22
- Configure by adding the following:
23
-
24
- require 'bookingsync'
25
- BookingSync::Base.user = 'your_api_auth_token'
26
- EOT
27
- gem.email = "public@zencocoon.com"
28
- gem.authors = ["Sebastien Grosjean"]
29
- # Include your dependencies below. Runtime dependencies are required when using your gem,
30
- # and development dependencies are only needed for development (ie running rake tasks, tests, etc)
31
- # gem.add_runtime_dependency 'activeresource', '>= 3.0.0'
32
- # gem.add_development_dependency 'rspec', '>= 2.2.0'
33
- # gem.add_development_dependency "bundler", "~> 1.0.0"
34
- # gem.add_development_dependency "jeweler", "~> 1.5.1"
35
- # gem.add_development_dependency "rcov", ">= 0"
36
- # gem.add_development_dependency "ZenTest", ">= 0"
37
- end
38
- Jeweler::RubygemsDotOrgTasks.new
39
-
40
- require 'rspec/core'
41
- require 'rspec/core/rake_task'
42
- RSpec::Core::RakeTask.new(:spec) do |spec|
43
- spec.pattern = FileList['spec/**/*_spec.rb']
44
- end
45
-
46
- RSpec::Core::RakeTask.new(:rcov) do |spec|
47
- spec.pattern = 'spec/**/*_spec.rb'
48
- spec.rcov = true
49
- end
50
-
51
- task :default => :spec
52
-
53
- require 'rake/rdoctask'
54
- Rake::RDocTask.new do |rdoc|
55
- version = File.exist?('VERSION') ? File.read('VERSION') : ""
56
-
57
- rdoc.rdoc_dir = 'rdoc'
58
- rdoc.title = "bookingsync #{version}"
59
- rdoc.rdoc_files.include('README*')
60
- rdoc.rdoc_files.include('lib/**/*.rb')
61
- end
data/VERSION DELETED
@@ -1 +0,0 @@
1
- 0.1.1
@@ -1 +0,0 @@
1
- Autotest.add_discovery { "rspec2" }
@@ -1,97 +0,0 @@
1
- # Generated by jeweler
2
- # DO NOT EDIT THIS FILE DIRECTLY
3
- # Instead, edit Jeweler::Tasks in Rakefile, and run 'rake gemspec'
4
- # -*- encoding: utf-8 -*-
5
-
6
- Gem::Specification.new do |s|
7
- s.name = %q{bookingsync}
8
- s.version = "0.1.1"
9
-
10
- s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
- s.authors = ["Sebastien Grosjean"]
12
- s.date = %q{2011-01-07}
13
- s.description = %q{ Ruby wrapper around BookingSync API
14
-
15
- Configure by adding the following:
16
-
17
- require 'bookingsync'
18
- BookingSync::Base.user = 'your_api_auth_token'
19
- }
20
- s.email = %q{public@zencocoon.com}
21
- s.extra_rdoc_files = [
22
- "LICENSE.txt",
23
- "README.md"
24
- ]
25
- s.files = [
26
- ".document",
27
- ".rspec",
28
- "Gemfile",
29
- "Gemfile.lock",
30
- "LICENSE.txt",
31
- "README.md",
32
- "Rakefile",
33
- "VERSION",
34
- "autotest/discover.rb",
35
- "bookingsync.gemspec",
36
- "examples/config_initializers_bookingsync.rb",
37
- "examples/sample.rb",
38
- "lib/bookingsync.rb",
39
- "lib/bookingsync/base.rb",
40
- "lib/bookingsync/booking.rb",
41
- "lib/bookingsync/client.rb",
42
- "lib/bookingsync/pagination.rb",
43
- "lib/bookingsync/rental.rb",
44
- "spec/bookingsync/base_spec.rb",
45
- "spec/bookingsync/booking_spec.rb",
46
- "spec/bookingsync/client_spec.rb",
47
- "spec/bookingsync/pagination_behavior.rb",
48
- "spec/bookingsync/pagination_spec.rb",
49
- "spec/bookingsync/rental_spec.rb",
50
- "spec/spec_helper.rb"
51
- ]
52
- s.homepage = %q{http://github.com/BookingSync/bookingsync-ruby}
53
- s.licenses = ["MIT"]
54
- s.require_paths = ["lib"]
55
- s.rubygems_version = %q{1.3.7}
56
- s.summary = %q{Ruby wrapper around BookingSync API}
57
- s.test_files = [
58
- "examples/config_initializers_bookingsync.rb",
59
- "examples/sample.rb",
60
- "spec/bookingsync/base_spec.rb",
61
- "spec/bookingsync/booking_spec.rb",
62
- "spec/bookingsync/client_spec.rb",
63
- "spec/bookingsync/pagination_behavior.rb",
64
- "spec/bookingsync/pagination_spec.rb",
65
- "spec/bookingsync/rental_spec.rb",
66
- "spec/spec_helper.rb"
67
- ]
68
-
69
- if s.respond_to? :specification_version then
70
- current_version = Gem::Specification::CURRENT_SPECIFICATION_VERSION
71
- s.specification_version = 3
72
-
73
- if Gem::Version.new(Gem::VERSION) >= Gem::Version.new('1.2.0') then
74
- s.add_runtime_dependency(%q<activeresource>, [">= 3.0.0"])
75
- s.add_development_dependency(%q<rspec>, ["~> 2.2.0"])
76
- s.add_development_dependency(%q<bundler>, ["~> 1.0.0"])
77
- s.add_development_dependency(%q<jeweler>, ["~> 1.5.1"])
78
- s.add_development_dependency(%q<rcov>, [">= 0"])
79
- s.add_development_dependency(%q<ZenTest>, [">= 0"])
80
- else
81
- s.add_dependency(%q<activeresource>, [">= 3.0.0"])
82
- s.add_dependency(%q<rspec>, ["~> 2.2.0"])
83
- s.add_dependency(%q<bundler>, ["~> 1.0.0"])
84
- s.add_dependency(%q<jeweler>, ["~> 1.5.1"])
85
- s.add_dependency(%q<rcov>, [">= 0"])
86
- s.add_dependency(%q<ZenTest>, [">= 0"])
87
- end
88
- else
89
- s.add_dependency(%q<activeresource>, [">= 3.0.0"])
90
- s.add_dependency(%q<rspec>, ["~> 2.2.0"])
91
- s.add_dependency(%q<bundler>, ["~> 1.0.0"])
92
- s.add_dependency(%q<jeweler>, ["~> 1.5.1"])
93
- s.add_dependency(%q<rcov>, [">= 0"])
94
- s.add_dependency(%q<ZenTest>, [">= 0"])
95
- end
96
- end
97
-
@@ -1,3 +0,0 @@
1
- if Rails.env != 'test'
2
- BookingSync::Base.user = 'my_fancy_auth_token'
3
- end
@@ -1,8 +0,0 @@
1
- require 'bookingsync'
2
- require 'pp'
3
-
4
- BookingSync::Base.user = 'xxx'
5
-
6
- rentals = BookingSync::Rental.all
7
-
8
- pp rentals