spigot 0.2.2 → 0.3.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.gitignore +1 -0
- data/README.md +5 -3
- data/Rakefile +1 -5
- data/examples/active_record.rb +18 -28
- data/examples/model.rb +4 -4
- data/examples/multi_resource.rb +61 -0
- data/lib/spigot.rb +11 -7
- data/lib/spigot/active_record.rb +28 -33
- data/lib/spigot/base.rb +5 -12
- data/lib/spigot/configuration.rb +1 -1
- data/lib/spigot/map/base.rb +4 -5
- data/lib/spigot/map/definition.rb +19 -9
- data/lib/spigot/map/option.rb +1 -13
- data/lib/spigot/map/resource.rb +11 -6
- data/lib/spigot/map/service.rb +5 -5
- data/lib/spigot/patch.rb +5 -5
- data/lib/spigot/proxy.rb +32 -20
- data/lib/spigot/record.rb +40 -13
- data/lib/spigot/translator.rb +27 -43
- data/lib/spigot/version.rb +2 -1
- data/script/active_record.rb +35 -0
- data/script/console.rb +19 -2
- data/spec/fixtures/data/active_user.rb +2 -4
- data/spec/fixtures/data/post.rb +1 -5
- data/spec/fixtures/data/user.rb +5 -5
- data/spec/fixtures/mappings/active_user_map.rb +11 -5
- data/spec/fixtures/mappings/post_map.rb +6 -18
- data/spec/fixtures/mappings/user_map.rb +1 -5
- data/spec/spec_helper.rb +13 -6
- data/spec/spigot/active_record_spec.rb +12 -5
- data/spec/spigot/base_spec.rb +2 -14
- data/spec/spigot/configuration_spec.rb +7 -7
- data/spec/spigot/map/base_spec.rb +12 -6
- data/spec/spigot/map/definition_spec.rb +51 -4
- data/spec/spigot/map/resource_spec.rb +4 -4
- data/spec/spigot/map/service_spec.rb +19 -14
- data/spec/spigot/patch_spec.rb +12 -0
- data/spec/spigot/proxy_spec.rb +17 -17
- data/spec/spigot/record_spec.rb +75 -4
- data/spec/spigot/spigot_spec.rb +9 -4
- data/spec/spigot/translator_spec.rb +86 -87
- data/spigot.gemspec +9 -10
- metadata +33 -47
- data/lib/spigot/config/spigot/github.yml +0 -7
- data/spec/support/active_record.rb +0 -15
@@ -1,15 +0,0 @@
|
|
1
|
-
ActiveRecord::Base.establish_connection({
|
2
|
-
:adapter => "sqlite3",
|
3
|
-
:database => ':memory:'
|
4
|
-
})
|
5
|
-
|
6
|
-
ActiveRecord::Schema.define do
|
7
|
-
self.verbose = false
|
8
|
-
|
9
|
-
create_table :active_users, :force => true do |t|
|
10
|
-
t.string :name
|
11
|
-
t.integer :github_id
|
12
|
-
t.string :username
|
13
|
-
t.string :token
|
14
|
-
end
|
15
|
-
end
|