evedb 0.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/.gitignore +11 -0
- data/.rspec +3 -0
- data/.travis.yml +6 -0
- data/Gemfile +11 -0
- data/Gemfile.lock +50 -0
- data/README.md +36 -0
- data/Rakefile +8 -0
- data/bin/console +14 -0
- data/bin/setup +8 -0
- data/evedb.gemspec +29 -0
- data/lib/evedb.rb +12 -0
- data/lib/evedb/model.rb +21 -0
- data/lib/evedb/models/category.rb +9 -0
- data/lib/evedb/models/group.rb +9 -0
- data/lib/evedb/models/type.rb +9 -0
- data/lib/evedb/version.rb +5 -0
- metadata +76 -0
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: 0b8876b8e673f7fcbf23ca3b5968ada03fb50da33e23eac3818cb9d5cbd9e0e9
|
4
|
+
data.tar.gz: 027fbd8aba5e16f6fa3da287ed07cfb894bb2bc9990a12c52f3d0166274603eb
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: bf19d62e96a9be03088449f661ed7a4dffa371738562c2e641a5ae83ac10b1bccd988bbaaba8dd9c9e3b66d600d25880c1b2757f6fe1a7b3836b2cd7f16db40f
|
7
|
+
data.tar.gz: 0daf8e8f247c7cac251cd1dac4f95f9aad8dd6f8d5d5cf9a84f853ed2202cb96d5cc621d4b0f400c2982a56b1b532734eaa774501cdf9fb3952b1c12bb2214a9
|
data/.gitignore
ADDED
data/.rspec
ADDED
data/.travis.yml
ADDED
data/Gemfile
ADDED
data/Gemfile.lock
ADDED
@@ -0,0 +1,50 @@
|
|
1
|
+
PATH
|
2
|
+
remote: .
|
3
|
+
specs:
|
4
|
+
evedb (0.1.0)
|
5
|
+
ruby-esi (~> 0.3.0)
|
6
|
+
|
7
|
+
GEM
|
8
|
+
remote: https://rubygems.org/
|
9
|
+
specs:
|
10
|
+
coderay (1.1.3)
|
11
|
+
diff-lcs (1.4.4)
|
12
|
+
ethon (0.12.0)
|
13
|
+
ffi (>= 1.3.0)
|
14
|
+
ffi (1.13.1)
|
15
|
+
json (2.3.1)
|
16
|
+
method_source (1.0.0)
|
17
|
+
pry (0.13.1)
|
18
|
+
coderay (~> 1.1)
|
19
|
+
method_source (~> 1.0)
|
20
|
+
rake (12.3.3)
|
21
|
+
rspec (3.9.0)
|
22
|
+
rspec-core (~> 3.9.0)
|
23
|
+
rspec-expectations (~> 3.9.0)
|
24
|
+
rspec-mocks (~> 3.9.0)
|
25
|
+
rspec-core (3.9.2)
|
26
|
+
rspec-support (~> 3.9.3)
|
27
|
+
rspec-expectations (3.9.2)
|
28
|
+
diff-lcs (>= 1.2.0, < 2.0)
|
29
|
+
rspec-support (~> 3.9.0)
|
30
|
+
rspec-mocks (3.9.1)
|
31
|
+
diff-lcs (>= 1.2.0, < 2.0)
|
32
|
+
rspec-support (~> 3.9.0)
|
33
|
+
rspec-support (3.9.3)
|
34
|
+
ruby-esi (0.3.0)
|
35
|
+
json (~> 2.1, >= 2.1.0)
|
36
|
+
typhoeus (~> 1.0, >= 1.0.1)
|
37
|
+
typhoeus (1.4.0)
|
38
|
+
ethon (>= 0.9.0)
|
39
|
+
|
40
|
+
PLATFORMS
|
41
|
+
ruby
|
42
|
+
|
43
|
+
DEPENDENCIES
|
44
|
+
evedb!
|
45
|
+
pry (~> 0.13.1)
|
46
|
+
rake (~> 12.0)
|
47
|
+
rspec (~> 3.0)
|
48
|
+
|
49
|
+
BUNDLED WITH
|
50
|
+
2.1.2
|
data/README.md
ADDED
@@ -0,0 +1,36 @@
|
|
1
|
+
# Evedb
|
2
|
+
|
3
|
+
Welcome to your new gem! In this directory, you'll find the files you need to be able to package up your Ruby library into a gem. Put your Ruby code in the file `lib/evedb`. To experiment with that code, run `bin/console` for an interactive prompt.
|
4
|
+
|
5
|
+
TODO: Delete this and the text above, and describe your gem
|
6
|
+
|
7
|
+
## Installation
|
8
|
+
|
9
|
+
Add this line to your application's Gemfile:
|
10
|
+
|
11
|
+
```ruby
|
12
|
+
gem 'evedb'
|
13
|
+
```
|
14
|
+
|
15
|
+
And then execute:
|
16
|
+
|
17
|
+
$ bundle install
|
18
|
+
|
19
|
+
Or install it yourself as:
|
20
|
+
|
21
|
+
$ gem install evedb
|
22
|
+
|
23
|
+
## Usage
|
24
|
+
|
25
|
+
TODO: Write usage instructions here
|
26
|
+
|
27
|
+
## Development
|
28
|
+
|
29
|
+
After checking out the repo, run `bin/setup` to install dependencies. Then, run `rake spec` to run the tests. You can also run `bin/console` for an interactive prompt that will allow you to experiment.
|
30
|
+
|
31
|
+
To install this gem onto your local machine, run `bundle exec rake install`. To release a new version, update the version number in `version.rb`, and then run `bundle exec rake release`, which will create a git tag for the version, push git commits and tags, and push the `.gem` file to [rubygems.org](https://rubygems.org).
|
32
|
+
|
33
|
+
## Contributing
|
34
|
+
|
35
|
+
Bug reports and pull requests are welcome on GitHub at https://github.com/[USERNAME]/evedb.
|
36
|
+
|
data/Rakefile
ADDED
data/bin/console
ADDED
@@ -0,0 +1,14 @@
|
|
1
|
+
#!/usr/bin/env ruby
|
2
|
+
|
3
|
+
require "bundler/setup"
|
4
|
+
require "evedb"
|
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(__FILE__)
|
data/bin/setup
ADDED
data/evedb.gemspec
ADDED
@@ -0,0 +1,29 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require_relative 'lib/evedb/version'
|
4
|
+
|
5
|
+
Gem::Specification.new do |spec|
|
6
|
+
spec.name = 'evedb'
|
7
|
+
spec.version = Evedb::VERSION
|
8
|
+
spec.authors = ['Adam Ladachowski']
|
9
|
+
spec.email = ['adam@saiden.pl']
|
10
|
+
|
11
|
+
spec.summary = 'Model-like object wrappers for ESI'
|
12
|
+
spec.description = spec.summary
|
13
|
+
spec.homepage = 'https://github.com/aladac/evedb'
|
14
|
+
spec.required_ruby_version = Gem::Requirement.new('>= 2.3.0')
|
15
|
+
|
16
|
+
spec.metadata['homepage_uri'] = spec.homepage
|
17
|
+
spec.metadata['source_code_uri'] = 'https://github.com/aladac/evedb'
|
18
|
+
spec.metadata['changelog_uri'] = 'https://github.com/aladac/evedb'
|
19
|
+
|
20
|
+
# Specify which files should be added to the gem when it is released.
|
21
|
+
# The `git ls-files -z` loads the files in the RubyGem that have been added into git.
|
22
|
+
spec.files = Dir.chdir(File.expand_path(__dir__)) do
|
23
|
+
`git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(test|spec|features)/}) }
|
24
|
+
end
|
25
|
+
spec.bindir = 'exe'
|
26
|
+
spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
|
27
|
+
spec.add_runtime_dependency 'ruby-esi', '~> 0.3.0'
|
28
|
+
spec.require_paths = ['lib']
|
29
|
+
end
|
data/lib/evedb.rb
ADDED
@@ -0,0 +1,12 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require 'ruby-esi'
|
4
|
+
require 'evedb/version'
|
5
|
+
require 'evedb/model'
|
6
|
+
|
7
|
+
Dir.glob(File.dirname(File.absolute_path(__FILE__)) + '/evedb/models/*.rb').sort.each { |f| require f }
|
8
|
+
|
9
|
+
module Evedb
|
10
|
+
class Error < StandardError; end
|
11
|
+
# Your code goes here...
|
12
|
+
end
|
data/lib/evedb/model.rb
ADDED
@@ -0,0 +1,21 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module Evedb
|
4
|
+
class Model
|
5
|
+
def self.find(id)
|
6
|
+
self::API.new.send(self::GET_METHOD, id)
|
7
|
+
rescue ESI::ApiError => e
|
8
|
+
return false if e.message == 'Not Found'
|
9
|
+
end
|
10
|
+
|
11
|
+
def self.list
|
12
|
+
self::API.new.send(self::LIST_METHOD)
|
13
|
+
end
|
14
|
+
|
15
|
+
def self.all
|
16
|
+
list.map do |id|
|
17
|
+
self::API.new.send self::GET_METHOD, id
|
18
|
+
end
|
19
|
+
end
|
20
|
+
end
|
21
|
+
end
|
metadata
ADDED
@@ -0,0 +1,76 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: evedb
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.1.0
|
5
|
+
platform: ruby
|
6
|
+
authors:
|
7
|
+
- Adam Ladachowski
|
8
|
+
autorequire:
|
9
|
+
bindir: exe
|
10
|
+
cert_chain: []
|
11
|
+
date: 2020-07-02 00:00:00.000000000 Z
|
12
|
+
dependencies:
|
13
|
+
- !ruby/object:Gem::Dependency
|
14
|
+
name: ruby-esi
|
15
|
+
requirement: !ruby/object:Gem::Requirement
|
16
|
+
requirements:
|
17
|
+
- - "~>"
|
18
|
+
- !ruby/object:Gem::Version
|
19
|
+
version: 0.3.0
|
20
|
+
type: :runtime
|
21
|
+
prerelease: false
|
22
|
+
version_requirements: !ruby/object:Gem::Requirement
|
23
|
+
requirements:
|
24
|
+
- - "~>"
|
25
|
+
- !ruby/object:Gem::Version
|
26
|
+
version: 0.3.0
|
27
|
+
description: Model-like object wrappers for ESI
|
28
|
+
email:
|
29
|
+
- adam@saiden.pl
|
30
|
+
executables: []
|
31
|
+
extensions: []
|
32
|
+
extra_rdoc_files: []
|
33
|
+
files:
|
34
|
+
- ".gitignore"
|
35
|
+
- ".rspec"
|
36
|
+
- ".travis.yml"
|
37
|
+
- Gemfile
|
38
|
+
- Gemfile.lock
|
39
|
+
- README.md
|
40
|
+
- Rakefile
|
41
|
+
- bin/console
|
42
|
+
- bin/setup
|
43
|
+
- evedb.gemspec
|
44
|
+
- lib/evedb.rb
|
45
|
+
- lib/evedb/model.rb
|
46
|
+
- lib/evedb/models/category.rb
|
47
|
+
- lib/evedb/models/group.rb
|
48
|
+
- lib/evedb/models/type.rb
|
49
|
+
- lib/evedb/version.rb
|
50
|
+
homepage: https://github.com/aladac/evedb
|
51
|
+
licenses: []
|
52
|
+
metadata:
|
53
|
+
homepage_uri: https://github.com/aladac/evedb
|
54
|
+
source_code_uri: https://github.com/aladac/evedb
|
55
|
+
changelog_uri: https://github.com/aladac/evedb
|
56
|
+
post_install_message:
|
57
|
+
rdoc_options: []
|
58
|
+
require_paths:
|
59
|
+
- lib
|
60
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
61
|
+
requirements:
|
62
|
+
- - ">="
|
63
|
+
- !ruby/object:Gem::Version
|
64
|
+
version: 2.3.0
|
65
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
66
|
+
requirements:
|
67
|
+
- - ">="
|
68
|
+
- !ruby/object:Gem::Version
|
69
|
+
version: '0'
|
70
|
+
requirements: []
|
71
|
+
rubyforge_project:
|
72
|
+
rubygems_version: 2.7.6.2
|
73
|
+
signing_key:
|
74
|
+
specification_version: 4
|
75
|
+
summary: Model-like object wrappers for ESI
|
76
|
+
test_files: []
|