Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update granite #2

Merged
merged 1 commit into from
Oct 27, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions db/seeds.cr
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
require "granite"
require "../spec/granite/config"
require "../spec/models/*"
require "../spec/support/*"

unless Test.first
10.times do |num|
Expand Down
2 changes: 1 addition & 1 deletion shard.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ targets:
development_dependencies:
granite:
github: amberframework/granite
version: ~> 0.14.0
branch: master

pg:
github: will/crystal-pg
Expand Down
17 changes: 0 additions & 17 deletions spec/granite/granite_spec.cr

This file was deleted.

1 change: 0 additions & 1 deletion spec/granite/spec_helper.cr

This file was deleted.

4 changes: 1 addition & 3 deletions spec/spec_helper.cr
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
require "spec"
require "granite"
require "./granite/config"
require "../src/granite"
require "./models/*"
require "../src/shale"
require "./support/*"
File renamed without changes.
File renamed without changes.
6 changes: 0 additions & 6 deletions src/granite.cr
Original file line number Diff line number Diff line change
@@ -1,9 +1,3 @@
require "granite"
require "./shale"
require "./granite/**"

class Granite::Base
macro inherited
extend Shale::Granite::Query::BuilderMethods
end
end
6 changes: 3 additions & 3 deletions src/granite/adapter.cr
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
class Shale::Granite::Adapter < Shale::BaseAdapter
def count(model)
model.count.run
model.count.to_i
end

def select(model)
model
.page(page)
.per(per)
.offset((page - 1) * per)
.limit(per)
.order({order => direction})
.select
end
Expand Down
42 changes: 0 additions & 42 deletions src/granite/query/builder.cr

This file was deleted.

9 changes: 0 additions & 9 deletions src/granite/query/builder_methods.cr

This file was deleted.

40 changes: 0 additions & 40 deletions src/granite/query/pg_assembler.cr

This file was deleted.