sweeper_api 0.0.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/.env.example +2 -0
- data/.gitignore +10 -0
- data/.rspec +4 -0
- data/.rubocop.yml +28 -0
- data/.ruby-version +1 -0
- data/.travis.yml +14 -0
- data/CODE_OF_CONDUCT.md +49 -0
- data/Gemfile +16 -0
- data/Gemfile.lock +90 -0
- data/LICENSE +21 -0
- data/README.md +48 -0
- data/Rakefile +9 -0
- data/bin/console +14 -0
- data/bin/setup +8 -0
- data/lib/sweeper_api.rb +20 -0
- data/lib/sweeper_api/client.rb +26 -0
- data/lib/sweeper_api/client/campaigns.rb +5 -0
- data/lib/sweeper_api/configuration.rb +24 -0
- data/lib/sweeper_api/middleware.rb +4 -0
- data/lib/sweeper_api/middleware/request.rb +24 -0
- data/lib/sweeper_api/middleware/response.rb +6 -0
- data/lib/sweeper_api/resources.rb +4 -0
- data/lib/sweeper_api/resources/base.rb +32 -0
- data/lib/sweeper_api/resources/response.rb +36 -0
- data/lib/sweeper_api/version.rb +3 -0
- data/sweeper_api.gemspec +22 -0
- metadata +84 -0
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA1:
|
3
|
+
metadata.gz: 24a2042efb6750c96eac1fd5851471966703a229
|
4
|
+
data.tar.gz: a896be7229e47ecb33d3247026aa75522cd2bf0e
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: 297c4506af0c943ff8969722c0c82e1b872e0e9c2ea13f22406fec6faa94a8c790f4e6246b8c0b21e953ccd92f3cd0ca1f8e15159cb5e2049109b2c20d37ad26
|
7
|
+
data.tar.gz: 989ae105066c4f07dd66f88ba8b6d79fa5836c69cefe7b2dfea8e2d9ce1082956ec7a89b3c953f18f30f37d941f2dd599c061998558a87e2b950a248b13936d4
|
data/.env.example
ADDED
data/.gitignore
ADDED
data/.rspec
ADDED
data/.rubocop.yml
ADDED
@@ -0,0 +1,28 @@
|
|
1
|
+
---
|
2
|
+
AllCops:
|
3
|
+
TargetRubyVersion: 2.3
|
4
|
+
DisplayCopNames: true
|
5
|
+
Exclude:
|
6
|
+
- "vendor/**/*"
|
7
|
+
|
8
|
+
Style/FrozenStringLiteralComment:
|
9
|
+
Enabled: false
|
10
|
+
|
11
|
+
Style/StringLiterals:
|
12
|
+
EnforcedStyle: double_quotes
|
13
|
+
|
14
|
+
Style/Documentation:
|
15
|
+
Enabled: false
|
16
|
+
|
17
|
+
Style/ClassAndModuleChildren:
|
18
|
+
EnforcedStyle: compact
|
19
|
+
|
20
|
+
Style/SingleLineBlockParams:
|
21
|
+
Enabled: false
|
22
|
+
|
23
|
+
Metrics/LineLength:
|
24
|
+
Max: 120
|
25
|
+
|
26
|
+
Metrics/ClassLength:
|
27
|
+
Exclude:
|
28
|
+
- spec/**/*_spec.rb
|
data/.ruby-version
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
2.3.1
|
data/.travis.yml
ADDED
data/CODE_OF_CONDUCT.md
ADDED
@@ -0,0 +1,49 @@
|
|
1
|
+
# Contributor Code of Conduct
|
2
|
+
|
3
|
+
As contributors and maintainers of this project, and in the interest of
|
4
|
+
fostering an open and welcoming community, we pledge to respect all people who
|
5
|
+
contribute through reporting issues, posting feature requests, updating
|
6
|
+
documentation, submitting pull requests or patches, and other activities.
|
7
|
+
|
8
|
+
We are committed to making participation in this project a harassment-free
|
9
|
+
experience for everyone, regardless of level of experience, gender, gender
|
10
|
+
identity and expression, sexual orientation, disability, personal appearance,
|
11
|
+
body size, race, ethnicity, age, religion, or nationality.
|
12
|
+
|
13
|
+
Examples of unacceptable behavior by participants include:
|
14
|
+
|
15
|
+
* The use of sexualized language or imagery
|
16
|
+
* Personal attacks
|
17
|
+
* Trolling or insulting/derogatory comments
|
18
|
+
* Public or private harassment
|
19
|
+
* Publishing other's private information, such as physical or electronic
|
20
|
+
addresses, without explicit permission
|
21
|
+
* Other unethical or unprofessional conduct
|
22
|
+
|
23
|
+
Project maintainers have the right and responsibility to remove, edit, or
|
24
|
+
reject comments, commits, code, wiki edits, issues, and other contributions
|
25
|
+
that are not aligned to this Code of Conduct, or to ban temporarily or
|
26
|
+
permanently any contributor for other behaviors that they deem inappropriate,
|
27
|
+
threatening, offensive, or harmful.
|
28
|
+
|
29
|
+
By adopting this Code of Conduct, project maintainers commit themselves to
|
30
|
+
fairly and consistently applying these principles to every aspect of managing
|
31
|
+
this project. Project maintainers who do not follow or enforce the Code of
|
32
|
+
Conduct may be permanently removed from the project team.
|
33
|
+
|
34
|
+
This code of conduct applies both within project spaces and in public spaces
|
35
|
+
when an individual is representing the project or its community.
|
36
|
+
|
37
|
+
Instances of abusive, harassing, or otherwise unacceptable behavior may be
|
38
|
+
reported by contacting a project maintainer at david.muto@gmail.com. All
|
39
|
+
complaints will be reviewed and investigated and will result in a response that
|
40
|
+
is deemed necessary and appropriate to the circumstances. Maintainers are
|
41
|
+
obligated to maintain confidentiality with regard to the reporter of an
|
42
|
+
incident.
|
43
|
+
|
44
|
+
This Code of Conduct is adapted from the [Contributor Covenant][homepage],
|
45
|
+
version 1.3.0, available at
|
46
|
+
[http://contributor-covenant.org/version/1/3/0/][version]
|
47
|
+
|
48
|
+
[homepage]: http://contributor-covenant.org
|
49
|
+
[version]: http://contributor-covenant.org/version/1/3/0/
|
data/Gemfile
ADDED
@@ -0,0 +1,16 @@
|
|
1
|
+
source "https://rubygems.org"
|
2
|
+
ruby "2.3.1"
|
3
|
+
|
4
|
+
gemspec
|
5
|
+
|
6
|
+
group :development, :test do
|
7
|
+
gem "bundler", "~> 1.11"
|
8
|
+
gem "dotenv", "~> 2.1"
|
9
|
+
gem "pry-byebug", "~> 3.3"
|
10
|
+
gem "rake", "~> 10.0"
|
11
|
+
gem "rspec", "~> 3.0"
|
12
|
+
gem "rubocop", "~> 0.40"
|
13
|
+
gem "simplecov", "~> 0.11"
|
14
|
+
gem "vcr", "< 3.0.2"
|
15
|
+
gem "webmock", "~> 2.0"
|
16
|
+
end
|
data/Gemfile.lock
ADDED
@@ -0,0 +1,90 @@
|
|
1
|
+
PATH
|
2
|
+
remote: .
|
3
|
+
specs:
|
4
|
+
sweeper_api (0.0.1)
|
5
|
+
faraday (~> 0.9)
|
6
|
+
|
7
|
+
GEM
|
8
|
+
remote: https://rubygems.org/
|
9
|
+
specs:
|
10
|
+
addressable (2.4.0)
|
11
|
+
ast (2.2.0)
|
12
|
+
byebug (9.0.4)
|
13
|
+
coderay (1.1.1)
|
14
|
+
crack (0.4.3)
|
15
|
+
safe_yaml (~> 1.0.0)
|
16
|
+
diff-lcs (1.2.5)
|
17
|
+
docile (1.1.5)
|
18
|
+
dotenv (2.1.1)
|
19
|
+
faraday (0.9.2)
|
20
|
+
multipart-post (>= 1.2, < 3)
|
21
|
+
hashdiff (0.3.0)
|
22
|
+
json (1.8.3)
|
23
|
+
method_source (0.8.2)
|
24
|
+
multipart-post (2.0.0)
|
25
|
+
parser (2.3.1.0)
|
26
|
+
ast (~> 2.2)
|
27
|
+
powerpack (0.1.1)
|
28
|
+
pry (0.10.3)
|
29
|
+
coderay (~> 1.1.0)
|
30
|
+
method_source (~> 0.8.1)
|
31
|
+
slop (~> 3.4)
|
32
|
+
pry-byebug (3.4.0)
|
33
|
+
byebug (~> 9.0)
|
34
|
+
pry (~> 0.10)
|
35
|
+
rainbow (2.1.0)
|
36
|
+
rake (10.5.0)
|
37
|
+
rspec (3.4.0)
|
38
|
+
rspec-core (~> 3.4.0)
|
39
|
+
rspec-expectations (~> 3.4.0)
|
40
|
+
rspec-mocks (~> 3.4.0)
|
41
|
+
rspec-core (3.4.4)
|
42
|
+
rspec-support (~> 3.4.0)
|
43
|
+
rspec-expectations (3.4.0)
|
44
|
+
diff-lcs (>= 1.2.0, < 2.0)
|
45
|
+
rspec-support (~> 3.4.0)
|
46
|
+
rspec-mocks (3.4.1)
|
47
|
+
diff-lcs (>= 1.2.0, < 2.0)
|
48
|
+
rspec-support (~> 3.4.0)
|
49
|
+
rspec-support (3.4.1)
|
50
|
+
rubocop (0.40.0)
|
51
|
+
parser (>= 2.3.1.0, < 3.0)
|
52
|
+
powerpack (~> 0.1)
|
53
|
+
rainbow (>= 1.99.1, < 3.0)
|
54
|
+
ruby-progressbar (~> 1.7)
|
55
|
+
unicode-display_width (~> 1.0, >= 1.0.1)
|
56
|
+
ruby-progressbar (1.8.1)
|
57
|
+
safe_yaml (1.0.4)
|
58
|
+
simplecov (0.11.2)
|
59
|
+
docile (~> 1.1.0)
|
60
|
+
json (~> 1.8)
|
61
|
+
simplecov-html (~> 0.10.0)
|
62
|
+
simplecov-html (0.10.0)
|
63
|
+
slop (3.6.0)
|
64
|
+
unicode-display_width (1.0.5)
|
65
|
+
vcr (3.0.1)
|
66
|
+
webmock (2.0.3)
|
67
|
+
addressable (>= 2.3.6)
|
68
|
+
crack (>= 0.3.2)
|
69
|
+
hashdiff
|
70
|
+
|
71
|
+
PLATFORMS
|
72
|
+
ruby
|
73
|
+
|
74
|
+
DEPENDENCIES
|
75
|
+
bundler (~> 1.11)
|
76
|
+
dotenv (~> 2.1)
|
77
|
+
pry-byebug (~> 3.3)
|
78
|
+
rake (~> 10.0)
|
79
|
+
rspec (~> 3.0)
|
80
|
+
rubocop (~> 0.40)
|
81
|
+
simplecov (~> 0.11)
|
82
|
+
sweeper_api!
|
83
|
+
vcr (< 3.0.2)
|
84
|
+
webmock (~> 2.0)
|
85
|
+
|
86
|
+
RUBY VERSION
|
87
|
+
ruby 2.3.1p112
|
88
|
+
|
89
|
+
BUNDLED WITH
|
90
|
+
1.12.1
|
data/LICENSE
ADDED
@@ -0,0 +1,21 @@
|
|
1
|
+
The MIT License (MIT)
|
2
|
+
|
3
|
+
Copyright (c) 2016 pseudomuto
|
4
|
+
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
7
|
+
in the Software without restriction, including without limitation the rights
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
10
|
+
furnished to do so, subject to the following conditions:
|
11
|
+
|
12
|
+
The above copyright notice and this permission notice shall be included in
|
13
|
+
all copies or substantial portions of the Software.
|
14
|
+
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
21
|
+
THE SOFTWARE.
|
data/README.md
ADDED
@@ -0,0 +1,48 @@
|
|
1
|
+
# SweeperAPI
|
2
|
+
|
3
|
+
[![Build Status](https://travis-ci.org/sweeperio/sweeper_api.svg?branch=master)](https://travis-ci.org/sweeperio/sweeper_api)
|
4
|
+
|
5
|
+
## Installation
|
6
|
+
|
7
|
+
Add this line to your application's Gemfile:
|
8
|
+
|
9
|
+
```ruby
|
10
|
+
gem "sweeper_api"
|
11
|
+
```
|
12
|
+
|
13
|
+
And then execute:
|
14
|
+
|
15
|
+
$ bundle
|
16
|
+
|
17
|
+
Or install it yourself as:
|
18
|
+
|
19
|
+
$ gem install sweeper_api
|
20
|
+
|
21
|
+
## Contributing
|
22
|
+
|
23
|
+
Bug reports and pull requests are welcome on GitHub at https://github.com/sweeperio/sweeper_api. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the [Contributor Covenant](http://contributor-covenant.org) code of conduct.
|
24
|
+
|
25
|
+
|
26
|
+
## License
|
27
|
+
|
28
|
+
The MIT License (MIT)
|
29
|
+
|
30
|
+
Copyright (c) 2016 pseudomuto
|
31
|
+
|
32
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
33
|
+
of this software and associated documentation files (the "Software"), to deal
|
34
|
+
in the Software without restriction, including without limitation the rights
|
35
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
36
|
+
copies of the Software, and to permit persons to whom the Software is
|
37
|
+
furnished to do so, subject to the following conditions:
|
38
|
+
|
39
|
+
The above copyright notice and this permission notice shall be included in
|
40
|
+
all copies or substantial portions of the Software.
|
41
|
+
|
42
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
43
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
44
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
45
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
46
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
47
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
48
|
+
THE SOFTWARE.
|
data/Rakefile
ADDED
data/bin/console
ADDED
@@ -0,0 +1,14 @@
|
|
1
|
+
#!/usr/bin/env ruby
|
2
|
+
|
3
|
+
require "bundler/setup"
|
4
|
+
require "sweeper_api"
|
5
|
+
|
6
|
+
# You can add fixtures and/or initialization code here to make experimenting
|
7
|
+
# with your gem easier. You can also use a different console, if you like.
|
8
|
+
|
9
|
+
# (If you use this, don't forget to add pry to your Gemfile!)
|
10
|
+
# require "pry"
|
11
|
+
# Pry.start
|
12
|
+
|
13
|
+
require "irb"
|
14
|
+
IRB.start
|
data/bin/setup
ADDED
data/lib/sweeper_api.rb
ADDED
@@ -0,0 +1,20 @@
|
|
1
|
+
require "faraday"
|
2
|
+
|
3
|
+
module SweeperAPI
|
4
|
+
autoload :Client, "sweeper_api/client"
|
5
|
+
autoload :Configuration, "sweeper_api/configuration"
|
6
|
+
autoload :Middleware, "sweeper_api/middleware"
|
7
|
+
autoload :Resources, "sweeper_api/resources"
|
8
|
+
autoload :Version, "sweeper_api/version"
|
9
|
+
|
10
|
+
Faraday::Request.register_middleware(sweeper_request: -> { Middleware::Request })
|
11
|
+
Faraday::Response.register_middleware(sweeper_response: -> { Middleware::Response })
|
12
|
+
|
13
|
+
def self.configuration
|
14
|
+
@configuration ||= Configuration.new
|
15
|
+
end
|
16
|
+
|
17
|
+
def self.configure(&block)
|
18
|
+
block.call(configuration)
|
19
|
+
end
|
20
|
+
end
|
@@ -0,0 +1,26 @@
|
|
1
|
+
class SweeperAPI::Client
|
2
|
+
autoload :Campaigns, "sweeper_api/client/campaigns"
|
3
|
+
|
4
|
+
MissingTokenError = Class.new(StandardError)
|
5
|
+
|
6
|
+
include Campaigns
|
7
|
+
|
8
|
+
attr_reader :host, :access_token
|
9
|
+
|
10
|
+
def initialize(host: SweeperAPI.configuration.default_host, access_token:)
|
11
|
+
raise MissingTokenError, "access token cannot be nil" if access_token.nil? || access_token =~ /\A\s*\z/
|
12
|
+
|
13
|
+
@host = host
|
14
|
+
@access_token = access_token
|
15
|
+
end
|
16
|
+
|
17
|
+
private
|
18
|
+
|
19
|
+
def connection
|
20
|
+
@connection ||= Faraday.new(host) do |conn|
|
21
|
+
conn.request(:sweeper_request, access_token)
|
22
|
+
conn.response(:sweeper_response)
|
23
|
+
conn.adapter(Faraday.default_adapter)
|
24
|
+
end
|
25
|
+
end
|
26
|
+
end
|
@@ -0,0 +1,24 @@
|
|
1
|
+
class SweeperAPI::Configuration
|
2
|
+
VALID_SCHEMES = %w(http https).freeze
|
3
|
+
|
4
|
+
InvalidHostError = Class.new(StandardError)
|
5
|
+
|
6
|
+
attr_reader :default_host
|
7
|
+
|
8
|
+
def initialize
|
9
|
+
@default_host = "https://www.sweeper.io"
|
10
|
+
end
|
11
|
+
|
12
|
+
def default_host=(host)
|
13
|
+
uri = URI.parse(host)
|
14
|
+
raise InvalidHostError, "host must use http or https scheme" unless valid_scheme?(uri)
|
15
|
+
|
16
|
+
@default_host = host
|
17
|
+
end
|
18
|
+
|
19
|
+
private
|
20
|
+
|
21
|
+
def valid_scheme?(uri)
|
22
|
+
VALID_SCHEMES.include?(uri.scheme)
|
23
|
+
end
|
24
|
+
end
|
@@ -0,0 +1,24 @@
|
|
1
|
+
class SweeperAPI::Middleware::Request < Faraday::Middleware
|
2
|
+
AUTH_HEADER = "Authorization".freeze
|
3
|
+
ACCEPT_HEADER = "Accept".freeze
|
4
|
+
CONTENT_TYPE_HEADER = "Content-Type".freeze
|
5
|
+
CONTENT_TYPE = "application/json".freeze
|
6
|
+
USER_AGENT_HEADER = "User-Agent".freeze
|
7
|
+
|
8
|
+
attr_reader :token
|
9
|
+
|
10
|
+
def initialize(app, token)
|
11
|
+
super(app)
|
12
|
+
@token = token
|
13
|
+
end
|
14
|
+
|
15
|
+
def call(request)
|
16
|
+
headers = request[:request_headers]
|
17
|
+
headers[ACCEPT_HEADER] = CONTENT_TYPE
|
18
|
+
headers[CONTENT_TYPE_HEADER] = CONTENT_TYPE
|
19
|
+
headers[AUTH_HEADER] = "token #{token}"
|
20
|
+
headers[USER_AGENT_HEADER] = "SweeperAPI/Ruby #{SweeperAPI::VERSION}"
|
21
|
+
|
22
|
+
@app.call(request)
|
23
|
+
end
|
24
|
+
end
|
@@ -0,0 +1,32 @@
|
|
1
|
+
class SweeperAPI::Resources::Base
|
2
|
+
def self.dynamic_accessor(*attrs)
|
3
|
+
attrs.each do |attr|
|
4
|
+
class_eval do
|
5
|
+
define_method(attr) { _attrs[attr] }
|
6
|
+
define_method("#{attr}?") { !!_attrs[attr] } # rubocop:disable Style/DoubleNegation
|
7
|
+
define_method("#{attr}=") { |value| _attrs[attr] = value }
|
8
|
+
end
|
9
|
+
end
|
10
|
+
end
|
11
|
+
|
12
|
+
def initialize(response)
|
13
|
+
response.each { |key, value| _attrs[key] = parse_attribute(value) }
|
14
|
+
|
15
|
+
metaclass = (class << self; self; end)
|
16
|
+
metaclass.send(:dynamic_accessor, *_attrs.keys)
|
17
|
+
end
|
18
|
+
|
19
|
+
private
|
20
|
+
|
21
|
+
def _attrs
|
22
|
+
@_attrs ||= {}
|
23
|
+
end
|
24
|
+
|
25
|
+
def parse_attribute(attr)
|
26
|
+
case attr
|
27
|
+
when Hash then SweeperAPI::Resources::Base.new(attr)
|
28
|
+
when Array then attr.map(&method(:parse_attribute))
|
29
|
+
else attr
|
30
|
+
end
|
31
|
+
end
|
32
|
+
end
|
@@ -0,0 +1,36 @@
|
|
1
|
+
class SweeperAPI::Resources::Response < SweeperAPI::Resources::Base
|
2
|
+
def initialize(response)
|
3
|
+
paginated = response["data"].is_a?(Array)
|
4
|
+
response["links"] = parse_links(response.delete("links"), paginated: paginated)
|
5
|
+
|
6
|
+
super(response)
|
7
|
+
end
|
8
|
+
|
9
|
+
def paged_response?
|
10
|
+
data.is_a?(Array)
|
11
|
+
end
|
12
|
+
|
13
|
+
private
|
14
|
+
|
15
|
+
def method_missing(method, *args)
|
16
|
+
return data.public_send(method, *args) if data_method?(method)
|
17
|
+
super
|
18
|
+
end
|
19
|
+
|
20
|
+
def respond_to_missing?(method, include_private = false)
|
21
|
+
data_method?(method) || super
|
22
|
+
end
|
23
|
+
|
24
|
+
def data_method?(method)
|
25
|
+
_attrs.key?("data") && data.respond_to?(method)
|
26
|
+
end
|
27
|
+
|
28
|
+
def parse_links(link_object, paginated:)
|
29
|
+
link_object ||= {}
|
30
|
+
link_object["current"] = link_object.delete("self")
|
31
|
+
|
32
|
+
defaults = {}
|
33
|
+
defaults = { "first" => nil, "prev" => nil, "next" => nil, "last" => nil } if paginated
|
34
|
+
defaults.merge(link_object)
|
35
|
+
end
|
36
|
+
end
|
data/sweeper_api.gemspec
ADDED
@@ -0,0 +1,22 @@
|
|
1
|
+
# coding: utf-8
|
2
|
+
lib = File.expand_path("../lib", __FILE__)
|
3
|
+
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
4
|
+
require "sweeper_api/version"
|
5
|
+
|
6
|
+
Gem::Specification.new do |spec|
|
7
|
+
spec.name = "sweeper_api"
|
8
|
+
spec.version = SweeperAPI::VERSION
|
9
|
+
spec.authors = ["pseudomuto"]
|
10
|
+
spec.email = ["david.muto@gmail.com"]
|
11
|
+
spec.summary = "Needs to be updated"
|
12
|
+
spec.description = spec.summary
|
13
|
+
spec.homepage = "https://github.com/sweeperio/sweeper_api"
|
14
|
+
spec.license = "MIT"
|
15
|
+
|
16
|
+
spec.files = `git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(test|spec|features)/}) }
|
17
|
+
spec.bindir = "exe"
|
18
|
+
spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
|
19
|
+
spec.require_paths = ["lib"]
|
20
|
+
|
21
|
+
spec.add_runtime_dependency "faraday", "~> 0.9"
|
22
|
+
end
|
metadata
ADDED
@@ -0,0 +1,84 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: sweeper_api
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.0.1
|
5
|
+
platform: ruby
|
6
|
+
authors:
|
7
|
+
- pseudomuto
|
8
|
+
autorequire:
|
9
|
+
bindir: exe
|
10
|
+
cert_chain: []
|
11
|
+
date: 2016-05-21 00:00:00.000000000 Z
|
12
|
+
dependencies:
|
13
|
+
- !ruby/object:Gem::Dependency
|
14
|
+
name: faraday
|
15
|
+
requirement: !ruby/object:Gem::Requirement
|
16
|
+
requirements:
|
17
|
+
- - "~>"
|
18
|
+
- !ruby/object:Gem::Version
|
19
|
+
version: '0.9'
|
20
|
+
type: :runtime
|
21
|
+
prerelease: false
|
22
|
+
version_requirements: !ruby/object:Gem::Requirement
|
23
|
+
requirements:
|
24
|
+
- - "~>"
|
25
|
+
- !ruby/object:Gem::Version
|
26
|
+
version: '0.9'
|
27
|
+
description: Needs to be updated
|
28
|
+
email:
|
29
|
+
- david.muto@gmail.com
|
30
|
+
executables: []
|
31
|
+
extensions: []
|
32
|
+
extra_rdoc_files: []
|
33
|
+
files:
|
34
|
+
- ".env.example"
|
35
|
+
- ".gitignore"
|
36
|
+
- ".rspec"
|
37
|
+
- ".rubocop.yml"
|
38
|
+
- ".ruby-version"
|
39
|
+
- ".travis.yml"
|
40
|
+
- CODE_OF_CONDUCT.md
|
41
|
+
- Gemfile
|
42
|
+
- Gemfile.lock
|
43
|
+
- LICENSE
|
44
|
+
- README.md
|
45
|
+
- Rakefile
|
46
|
+
- bin/console
|
47
|
+
- bin/setup
|
48
|
+
- lib/sweeper_api.rb
|
49
|
+
- lib/sweeper_api/client.rb
|
50
|
+
- lib/sweeper_api/client/campaigns.rb
|
51
|
+
- lib/sweeper_api/configuration.rb
|
52
|
+
- lib/sweeper_api/middleware.rb
|
53
|
+
- lib/sweeper_api/middleware/request.rb
|
54
|
+
- lib/sweeper_api/middleware/response.rb
|
55
|
+
- lib/sweeper_api/resources.rb
|
56
|
+
- lib/sweeper_api/resources/base.rb
|
57
|
+
- lib/sweeper_api/resources/response.rb
|
58
|
+
- lib/sweeper_api/version.rb
|
59
|
+
- sweeper_api.gemspec
|
60
|
+
homepage: https://github.com/sweeperio/sweeper_api
|
61
|
+
licenses:
|
62
|
+
- MIT
|
63
|
+
metadata: {}
|
64
|
+
post_install_message:
|
65
|
+
rdoc_options: []
|
66
|
+
require_paths:
|
67
|
+
- lib
|
68
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
69
|
+
requirements:
|
70
|
+
- - ">="
|
71
|
+
- !ruby/object:Gem::Version
|
72
|
+
version: '0'
|
73
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
74
|
+
requirements:
|
75
|
+
- - ">="
|
76
|
+
- !ruby/object:Gem::Version
|
77
|
+
version: '0'
|
78
|
+
requirements: []
|
79
|
+
rubyforge_project:
|
80
|
+
rubygems_version: 2.6.4
|
81
|
+
signing_key:
|
82
|
+
specification_version: 4
|
83
|
+
summary: Needs to be updated
|
84
|
+
test_files: []
|