active_rest_client 0.9.65 → 0.9.66

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: 25402e9d8bfc6b6a100bc3879d52ab05bf6b405d
4
- data.tar.gz: 1008478bfd788080beace5892d18ebfce789e0f8
3
+ metadata.gz: ccfdfcc6a1a86c7b5715f7666c383abf9d99481b
4
+ data.tar.gz: 678bcfbdab8714ce08456de2a1d1bd569017eba6
5
5
  SHA512:
6
- metadata.gz: d89b51eef05da436ab06c8e7f26b710ec3ef23f7c98877338b67a91832d73bde76d9b35a1385900155b61c063c5b27166c726b2515f6c66c010e1e0193b18cf3
7
- data.tar.gz: bfd28ddd34cd232649ec40cb7924e72ef30b6981076aed71f1df88d7c1a416fa611147a4a068244b6e31db504917a41821ae1cb7c71b17e7c3c88f127cf18ba0
6
+ metadata.gz: cffb6450b43e6346772df324e73bbdb23b7db4feb47c9b305c55a3db41c9414d04f308438d388e55d33d1d8f273946dd9711a008b671339d1fa58778da930e74
7
+ data.tar.gz: 2140ca597671d258f351bcd040e827629f9ad9a2c3e92c726e75f509d05cdf782ec87f9837349bb3c6897a9ed34478eccda6240823281e51d8e7c01ff6fa8778
data/.travis.yml ADDED
@@ -0,0 +1,5 @@
1
+ language: ruby
2
+ rvm:
3
+ - 2.1.0
4
+ - 2.0.0
5
+ - 1.9.3
data/README.md CHANGED
@@ -1,5 +1,7 @@
1
1
  # ActiveRestClient
2
2
 
3
+ [![Build Status](https://travis-ci.org/whichdigital/active-rest-client.png?branch=master)](https://travis-ci.org/whichdigital/active-rest-client) [![Coverage Status](https://coveralls.io/repos/whichdigital/active-rest-client/badge.png)](https://coveralls.io/r/whichdigital/active-rest-client) [![Code Climate](https://codeclimate.com/github/whichdigital/active-rest-client.png)](https://codeclimate.com/github/whichdigital/active-rest-client) [![Gem Version](https://badge.fury.io/rb/active_rest_client.png)](http://badge.fury.io/rb/active_rest_client)
4
+
3
5
  This gem is for accessing REST services in an ActiveRecord style. ActiveResource already exists for this, but it doesn't work where the resource naming doesn't follow Rails conventions, it doesn't have in-built caching and it's not as flexible in general.
4
6
 
5
7
  ## Installation
data/Rakefile CHANGED
@@ -9,3 +9,5 @@ task :console do
9
9
  ARGV.clear
10
10
  IRB.start
11
11
  end
12
+
13
+ task :default => :spec
@@ -27,6 +27,7 @@ Gem::Specification.new do |spec|
27
27
  spec.add_development_dependency "simplecov-rcov"
28
28
  spec.add_development_dependency "guard-rspec"
29
29
  spec.add_development_dependency 'terminal-notifier-guard'
30
+ spec.add_development_dependency 'coveralls'
30
31
 
31
32
  spec.add_runtime_dependency "oj", "=2.1.4" # 2.1.7 breaks under linux
32
33
  spec.add_runtime_dependency "activesupport"
@@ -10,7 +10,7 @@ module ActiveRestClient
10
10
  attr_accessor :_status
11
11
 
12
12
  instance_methods.each do |m|
13
- next unless %i{display errors presence load require hash untrust trust freeze method enable_warnings with_warnings suppress capture silence quietly debugger breakpoint}.include? m
13
+ next unless %w{display errors presence load require hash untrust trust freeze method enable_warnings with_warnings suppress capture silence quietly debugger breakpoint}.map(&:to_sym).include? m
14
14
  undef_method m
15
15
  end
16
16
 
@@ -80,7 +80,7 @@ module ActiveRestClient
80
80
 
81
81
  def ensure_lazy_loaded
82
82
  if @object.nil?
83
- method=@request.method.dup
83
+ method = Oj.load(Oj.dump(@request.method))
84
84
  method[:method] = :get
85
85
  method[:options][:url] = @url
86
86
  method[:options][:overriden_name] = @options[:overriden_name]
@@ -1,3 +1,3 @@
1
1
  module ActiveRestClient
2
- VERSION = "0.9.65"
2
+ VERSION = "0.9.66"
3
3
  end
@@ -64,7 +64,7 @@ describe ActiveRestClient::Base do
64
64
  client.each do |key, value|
65
65
  keys << key ; values << value
66
66
  end
67
- expect(keys).to eq(%i{name country})
67
+ expect(keys).to eq(%w{name country}.map(&:to_sym))
68
68
  expect(values).to eq(["Billy", "United Kingdom"])
69
69
  end
70
70
 
@@ -27,7 +27,7 @@ describe ActiveRestClient::Request do
27
27
  class LazyLoadedExampleClient < ExampleClient
28
28
  lazy_load!
29
29
  get :fake, "/fake", fake:"{\"result\":true, \"list\":[1,2,3,{\"test\":true}], \"child\":{\"grandchild\":{\"test\":true}}}"
30
- get :lazy_test, "/does-not-matter", fake:"{\"people\":[\"http://www.example.com/some/url\"]}", :lazy => %i{people}
30
+ get :lazy_test, "/does-not-matter", fake:"{\"people\":[\"http://www.example.com/some/url\"]}", :lazy => [:people]
31
31
  end
32
32
 
33
33
  class VerboseExampleClient < ExampleClient
data/spec/spec_helper.rb CHANGED
@@ -8,6 +8,9 @@ if ENV["JENKINS"]
8
8
  SimpleCov.formatter = SimpleCov::Formatter::RcovFormatter
9
9
  end
10
10
 
11
+ require 'coveralls'
12
+ Coveralls.wear!
13
+
11
14
  RSpec.configure do |config|
12
15
  config.color_enabled = true
13
16
  # config.formatter = 'documentation'
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: active_rest_client
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.9.65
4
+ version: 0.9.66
5
5
  platform: ruby
6
6
  authors:
7
7
  - Which Ltd
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2014-02-13 00:00:00.000000000 Z
12
+ date: 2014-02-17 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: bundler
@@ -123,6 +123,20 @@ dependencies:
123
123
  - - ">="
124
124
  - !ruby/object:Gem::Version
125
125
  version: '0'
126
+ - !ruby/object:Gem::Dependency
127
+ name: coveralls
128
+ requirement: !ruby/object:Gem::Requirement
129
+ requirements:
130
+ - - ">="
131
+ - !ruby/object:Gem::Version
132
+ version: '0'
133
+ type: :development
134
+ prerelease: false
135
+ version_requirements: !ruby/object:Gem::Requirement
136
+ requirements:
137
+ - - ">="
138
+ - !ruby/object:Gem::Version
139
+ version: '0'
126
140
  - !ruby/object:Gem::Dependency
127
141
  name: oj
128
142
  requirement: !ruby/object:Gem::Requirement
@@ -176,6 +190,7 @@ files:
176
190
  - ".gitignore"
177
191
  - ".rspec"
178
192
  - ".simplecov"
193
+ - ".travis.yml"
179
194
  - Gemfile
180
195
  - Guardfile
181
196
  - LICENSE.txt