assaydepot 0.0.3 → 0.0.4

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 5565b98889ea2e4abfde64c7a86b9f10bb7007d9
4
- data.tar.gz: 3637b96d37f982f765c312d15cd1b98cbf2ad728
3
+ metadata.gz: 39ad77b2ffb93d4a0eff9df69ac02e59cffa5eb9
4
+ data.tar.gz: 91ab5909a3fca9c366142566ea39415b99321019
5
5
  SHA512:
6
- metadata.gz: d465642914b663fec3017aa5c50e32a7b9a83eee1220a27a199f9f718ad5599fbfc8b4ede16c8596a5fe388d9900d9291e6e6bc7338e244f68dc9a0962f45a63
7
- data.tar.gz: b9793e07b1c15fc4d53ac949c21b534a27bfcbf4c5f532baec682af4281c3b4a414b1df4727aedb0e1de555436335450205922d2d9d57c3b2dbbd3149a6e3d06
6
+ metadata.gz: 8912c78dba929eec5d318e39d0537393624ed81dbe90a18aff1f6fabd9de95cd8fa9c75492b611af0f0d688b5e7cc52cf17dd56c473810fe5a1a56051c602c3d
7
+ data.tar.gz: 7dd49cf9fbae07e6eef7e1be8696c30a60b6edfb5266bd7b8cb98f458af78084085607e99d04ff0ebc805bc7c6d23e439c4c3b1435677c453aee2b1188f73afd
@@ -1,3 +1,4 @@
1
+ require 'forwardable'
1
2
  module AssayDepot
2
3
  module Model
3
4
  module ClassMethods
@@ -15,24 +16,24 @@ module AssayDepot
15
16
  def self.included(base)
16
17
  base.extend ClassMethods
17
18
  base.extend Forwardable
18
- base.def_delegators :private_results,
19
- :each,
20
- :[],
21
- :count,
22
- :collect,
19
+ base.def_delegators :private_results,
20
+ :each,
21
+ :[],
22
+ :count,
23
+ :collect,
23
24
  :map,
24
- :tap,
25
- :<=>,
26
- :compact,
27
- :each_index,
28
- :each_with_index,
29
- :empty?,
30
- :flatten,
31
- :include?,
32
- :index,
33
- :length,
34
- :first,
35
- :last,
25
+ :tap,
26
+ :<=>,
27
+ :compact,
28
+ :each_index,
29
+ :each_with_index,
30
+ :empty?,
31
+ :flatten,
32
+ :include?,
33
+ :index,
34
+ :length,
35
+ :first,
36
+ :last,
36
37
  :keep_if,
37
38
  :reject,
38
39
  :reverse
@@ -47,7 +48,7 @@ module AssayDepot
47
48
  @search_options = options[:search_options] || {:page => 1}
48
49
  end
49
50
 
50
- def initialize_copy(source)
51
+ def initialize_copy(source)
51
52
  super
52
53
  @search_query = @search_query.dup
53
54
  @search_facets = @search_facets.dup
@@ -106,4 +107,4 @@ module AssayDepot
106
107
  end
107
108
  end
108
109
  end
109
- end
110
+ end
@@ -1,3 +1,3 @@
1
1
  module AssayDepot
2
- VERSION = "0.0.3"
2
+ VERSION = "0.0.4"
3
3
  end
@@ -2,16 +2,13 @@ require 'oauth2'
2
2
  require 'assaydepot'
3
3
 
4
4
  describe AssayDepot do
5
- let(:site) { "https://staging.assaydepot.com" }
6
-
7
5
  context "when accessing the api via oauth2 client credentials" do
8
- let(:client) {
9
- OAuth2::Client.new( ENV["ASSAYDEPOT_APP_ID"],
10
- ENV["ASSAYDEPOT_APP_SECRET"],
11
- :site => site)
12
- }
13
- let(:access_token) { client.client_credentials.get_token(:redirect_uri => 'http://localhost:4567/oauth2/callback') }
14
6
  before(:all) do
7
+ site = "https://staging.assaydepot.com"
8
+ client = OAuth2::Client.new( ENV["ASSAYDEPOT_APP_ID"],
9
+ ENV["ASSAYDEPOT_APP_SECRET"],
10
+ site: site)
11
+ access_token = client.client_credentials.get_token(:redirect_uri => 'http://localhost:4567/oauth2/callback')
15
12
  AssayDepot.configure do |config|
16
13
  config.access_token = access_token.token
17
14
  config.url = "#{site}/api"
@@ -90,10 +87,10 @@ describe AssayDepot do
90
87
  end
91
88
 
92
89
  context "when searching for wares using a chained query" do
93
- let(:wares) { AssayDepot::Ware.where(:ware_type => "CustomService").where(:available_provider_names => "Assay Depot").page(2) }
90
+ let(:wares) { AssayDepot::Ware.where(:ware_type => "CustomService").where(:available_provider_names => "Blue Sky Biotech") }
94
91
 
95
92
  it "should return wares" do
96
- wares.total.should > 1
93
+ wares.total.should > 0
97
94
  end
98
95
 
99
96
  it "the ware's name should be available" do
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: assaydepot
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.3
4
+ version: 0.0.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Christopher Petersen
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-08-14 00:00:00.000000000 Z
11
+ date: 2016-03-30 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: json
@@ -109,7 +109,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
109
109
  version: '0'
110
110
  requirements: []
111
111
  rubyforge_project:
112
- rubygems_version: 2.4.2
112
+ rubygems_version: 2.0.14.1
113
113
  signing_key:
114
114
  specification_version: 4
115
115
  summary: Provides read access to Assay Depot's Services and Vendors.