Skip to content

Commit baed54b

Browse files
author
Arjan van der Gaag
committed
initial commit
0 parents  commit baed54b

26 files changed

+335
-0
lines changed

.gitignore

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
*.gem
2+
.bundle
3+
Gemfile.lock
4+
pkg/*

CHANGELOG.md

Whitespace-only changes.

Gemfile

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
source "http://rubygems.org"
2+
gemspec

Guardfile

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
guard 'minitest' do
2+
watch(%r|^spec/(.*)_spec\.rb|)
3+
watch(%r|^lib/(.*)\.rb|) { |m| "spec/#{m[1]}_spec.rb" }
4+
watch(%r|^spec/spec_helper\.rb|) { "spec" }
5+
end

LICENSE.md

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
Copyright (C) 2011 by Arjan van der Gaag
2+
3+
Permission is hereby granted, free of charge, to any person obtaining a copy
4+
of this software and associated documentation files (the "Software"), to deal
5+
in the Software without restriction, including without limitation the rights
6+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
7+
copies of the Software, and to permit persons to whom the Software is
8+
furnished to do so, subject to the following conditions:
9+
10+
The above copyright notice and this permission notice shall be included in
11+
all copies or substantial portions of the Software.
12+
13+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
14+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
15+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
16+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
17+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
18+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
19+
THE SOFTWARE.

README.md

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
```ruby
2+
Bol::Category.find(params[:id]).products
3+
Bol::Category.find(params[:id]).subcategories
4+
Bol::Category.find(params[:id]).top_products
5+
Bol::Category.find(params[:id]).search()
6+
Bol::Product.find(params[:id])
7+
Bol::Product.search(params[:query]).limit(10).offset(10).order('sales_ranking ASC')
8+
Bol::Product.search(params[:query]).page(params[:page])
9+
```
10+
11+
```ruby
12+
Bol.configure do |c|
13+
c.key = '...'
14+
c.secret = ''
15+
c.per_page = 10
16+
c.default_order = 'sales_ranking'
17+
end
18+
```

Rakefile

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
require 'bundler/gem_tasks'
2+
3+
require 'rake/testtask'
4+
Rake::TestTask.new do |t|
5+
t.libs << 'test'
6+
t.test_files = FileList['test/test_*.rb']
7+
t.verbose = true
8+
end
9+
10+
task default: :test

bol.gemspec

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
# -*- encoding: utf-8 -*-
2+
$:.push File.expand_path('../lib', __FILE__)
3+
require 'bol/version'
4+
5+
Gem::Specification.new do |s|
6+
s.name = 'bol'
7+
s.version = Bol::VERSION
8+
s.authors = ['Arjan van der Gaag']
9+
s.email = ['[email protected]']
10+
s.homepage = ""
11+
s.summary = %q{Simple Ruby wrapper around the bol.com developer API}
12+
s.description = %q{Access the bol.com product catalog from a Ruby project.}
13+
14+
s.files = `git ls-files`.split("\n")
15+
s.test_files = `git ls-files -- {test,spec,features}/*`.split("\n")
16+
s.executables = `git ls-files -- bin/*`.split("\n").map{ |f| File.basename(f) }
17+
s.require_paths = ['lib']
18+
19+
s.add_development_dependency 'rake'
20+
s.add_development_dependency 'turn'
21+
s.add_development_dependency 'guard'
22+
s.add_development_dependency 'guard-minitest'
23+
s.add_development_dependency 'vcr'
24+
s.add_development_dependency 'fakeweb'
25+
s.add_development_dependency 'rb-fsevent'
26+
s.add_development_dependency 'growl'
27+
end

lib/bol.rb

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
require 'bol/version'
2+
3+
module Bol
4+
autoload :Category, 'bol/category'
5+
autoload :Configuration, 'bol/configuration'
6+
autoload :Product, 'bol/product'
7+
autoload :Query, 'bol/query'
8+
autoload :Request, 'bol/request'
9+
autoload :Requests, 'bol/requests'
10+
end

lib/bol/category.rb

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
module Bol
2+
class Category
3+
end
4+
end

0 commit comments

Comments
 (0)