pupper 0.1.1 → 0.1.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/lib/pupper/api_associations.rb +1 -1
- data/lib/pupper/backend.rb +5 -0
- data/lib/pupper/version.rb +1 -1
- data/lib/pupper.rb +5 -0
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: aebb1b8842f964b26b8c35fb5e88c1eb3f42d4a7
|
4
|
+
data.tar.gz: 1dc7554803c0940c124ad85f8b55cc2e75c09306
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a21b1d8c39a4fc0baa59b0c775a456723e65fe50c359c7375f4a7446d7ac5e5faa5ab2a85b7d47b8bf8d287bfb4c5f6deea3be14536c5ac0b2aa65c95228f6a1
|
7
|
+
data.tar.gz: b67a21a46ed2161238ece45a74208fa7e72e4236b7660d00f24c2a573a439df847dbbd913444c80392f21390900abd3a8f7d1bb430bc1f5b79a3c6c0604801a0
|
data/lib/pupper/backend.rb
CHANGED
@@ -1,6 +1,7 @@
|
|
1
1
|
require 'pupper/parse_json'
|
2
2
|
|
3
3
|
module Pupper
|
4
|
+
# Provides an interface to build an API Client, that can be used by [Model]
|
4
5
|
class Backend
|
5
6
|
class BaseUrlNotDefined < StandardError; end
|
6
7
|
|
@@ -9,8 +10,12 @@ module Pupper
|
|
9
10
|
delegate :base_url, to: :class
|
10
11
|
|
11
12
|
class << self
|
13
|
+
# Sets the base URL the API client will call
|
14
|
+
# @return [String] the URL (plus - optionally - a path)
|
12
15
|
attr_writer :base_url
|
13
16
|
|
17
|
+
protected
|
18
|
+
|
14
19
|
def base_url
|
15
20
|
if @base_url.nil?
|
16
21
|
raise BaseUrlNotDefined, <<-ERR
|
data/lib/pupper/version.rb
CHANGED
data/lib/pupper.rb
CHANGED
@@ -13,6 +13,11 @@ module Pupper
|
|
13
13
|
|
14
14
|
mattr_accessor :config
|
15
15
|
|
16
|
+
# Changes some of Pupper's underlying assumptions
|
17
|
+
# such as the name of the ActiveRecord model used for auditing
|
18
|
+
# and the user agent passed into Faraday/Typhoeus
|
19
|
+
#
|
20
|
+
# @yield [self.config] The Pupper::Config instance
|
16
21
|
def self.configure
|
17
22
|
self.config ||= Config.new
|
18
23
|
yield self.config
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: pupper
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Lee Machin
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2017-02-
|
11
|
+
date: 2017-02-20 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|