warframe 0.1.2 → 0.3.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +20 -2
- data/lib/warframe/cache.rb +37 -0
- data/lib/warframe/client_wrapper.rb +6 -4
- data/lib/warframe/models/alert.rb +2 -1
- data/lib/warframe/models/attributes/description.rb +9 -2
- data/lib/warframe/models/cambion_drift.rb +26 -0
- data/lib/warframe/models/cetus.rb +40 -0
- data/lib/warframe/models/conclave_challenge.rb +54 -0
- data/lib/warframe/models/global_upgrade.rb +2 -1
- data/lib/warframe/models/invasion.rb +1 -0
- data/lib/warframe/models/news.rb +2 -1
- data/lib/warframe/models/nightwave.rb +2 -1
- data/lib/warframe/models/sortie.rb +36 -0
- data/lib/warframe/models/steel_path.rb +34 -0
- data/lib/warframe/models/syndicate_mission.rb +32 -0
- data/lib/warframe/rest/api/cambion_drift.rb +23 -0
- data/lib/warframe/rest/api/cetus.rb +23 -0
- data/lib/warframe/rest/api/conclave_challenges.rb +23 -0
- data/lib/warframe/rest/api/sortie.rb +23 -0
- data/lib/warframe/rest/api/steel_path.rb +23 -0
- data/lib/warframe/rest/api/syndicate_missions.rb +23 -0
- data/lib/warframe/rest/api.rb +16 -4
- data/lib/warframe/rest/request.rb +7 -1
- data/lib/warframe/rest/utils.rb +5 -1
- data/lib/warframe/version.rb +1 -1
- metadata +30 -32
- data/.rspec +0 -3
- data/.rubocop.yml +0 -5
- data/CODE_OF_CONDUCT.md +0 -84
- data/Gemfile +0 -5
- data/Gemfile.lock +0 -103
- data/Rakefile +0 -12
- data/warframe.gemspec +0 -45
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 7131e27d764e61e4219caef65a2b3485090e6f5c2076ea9bbb15a53e3c9ff0f2
|
4
|
+
data.tar.gz: 9b1627bfa5cefc5665e0a51a0fcc697c3ef57a9a2a4c633554e6f188ca5717cd
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ad1132a20ca44e9991439d279e78582fff13779426be2edac6ef980b5acf5d1dceeede32f3b47122e388e831165a6c50d59473be16adb6ac96f549de694f7647
|
7
|
+
data.tar.gz: 7211fc972c45fdeef66b287a26e6a8ff6bd2eda0e8a0ff2579a8b9476f1e44ad09c573f0dbdb29a758e5414cc4199f5291279bbd50f0626b65da402cb0d92953
|
data/README.md
CHANGED
@@ -55,17 +55,35 @@ After checking out the repo, run `bundle install` to install required dependenci
|
|
55
55
|
### Testing
|
56
56
|
To check if your changes are passing tests, run:
|
57
57
|
|
58
|
-
$
|
58
|
+
$ thor test:rspec
|
59
59
|
|
60
60
|
> Testing framework provided by [RSpec](https://rspec.info/).
|
61
61
|
|
62
62
|
### Linting
|
63
63
|
To auto-correct styling offenses, run:
|
64
64
|
|
65
|
-
$
|
65
|
+
$ thor style:fix
|
66
66
|
|
67
67
|
> All linting is provided by [RuboCop](https://github.com/rubocop/rubocop).
|
68
68
|
|
69
|
+
### Generating New Routes / Models with Thor
|
70
|
+
Using Thor allows us to create new routes and models via the command line, making it very simple to add new elements.
|
71
|
+
|
72
|
+
For example if we wanted to add, [conclaveChallenges](https://docs.warframestat.us/#tag/Worldstate/paths/~1{platform}~1conclaveChallenges/get) we run:
|
73
|
+
|
74
|
+
$ thor generate conclaveChallenges
|
75
|
+
|
76
|
+
> create lib/warframe/models/conclave_challenge.rb
|
77
|
+
> create lib/warframe/rest/api/conclave_challenges.rb
|
78
|
+
> conflict lib/warframe/rest/api.rb
|
79
|
+
> Overwrite C:/Users/ajrom/RubymineProjects/warframe/lib/warframe/rest/api.rb? (enter "h" for help) [Ynaqdh]
|
80
|
+
|
81
|
+
$ Y
|
82
|
+
|
83
|
+
> force lib/warframe/rest/api.rb
|
84
|
+
|
85
|
+
This creates a blank [model](/lib/warframe/models) for the data and a [route](/lib/warframe/rest/api) with a name spaced method for it, and then adds this method to our [REST::API](/lib/warframe/rest/api). Add attributes to the corresponding model and then write associated tests.
|
86
|
+
|
69
87
|
## Contributing
|
70
88
|
|
71
89
|
Bug reports and pull requests are welcome on GitHub at https://github.com/aj-rom/warframe-ruby. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the [code of conduct](https://github.com/aj-rom/warframe-ruby/blob/master/CODE_OF_CONDUCT.md).
|
@@ -0,0 +1,37 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
module Warframe
|
4
|
+
# @private
|
5
|
+
class Cache
|
6
|
+
# Expiration time in seconds
|
7
|
+
EXPIRATION_TIME = 5 * 60
|
8
|
+
attr_accessor :cache
|
9
|
+
|
10
|
+
def initialize
|
11
|
+
@cache = {}
|
12
|
+
end
|
13
|
+
|
14
|
+
def get_from_cache(key)
|
15
|
+
cache[key][:result]
|
16
|
+
end
|
17
|
+
|
18
|
+
def find_in_cache(key)
|
19
|
+
cache[key][:result] if exist?(key) && !expired?(key)
|
20
|
+
end
|
21
|
+
|
22
|
+
def add_to_cache(key, val, time = EXPIRATION_TIME)
|
23
|
+
cache[key] = { time: Time.now.to_i + time, result: val }
|
24
|
+
val
|
25
|
+
end
|
26
|
+
|
27
|
+
private
|
28
|
+
|
29
|
+
def exist?(key)
|
30
|
+
!cache[key].nil?
|
31
|
+
end
|
32
|
+
|
33
|
+
def expired?(key)
|
34
|
+
cache[key][:time] - Time.now.to_i <= 0
|
35
|
+
end
|
36
|
+
end
|
37
|
+
end
|
@@ -1,16 +1,20 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
+
require_relative 'cache'
|
4
|
+
|
3
5
|
module Warframe
|
4
6
|
# @abstract
|
5
7
|
# @private
|
6
8
|
# Wraps the {Warframe::REST::Client REST::Client} with necessary variables and methods.
|
7
9
|
#
|
8
10
|
# This class should < not be used > for interacting with the API.
|
9
|
-
class ClientWrapper
|
11
|
+
class ClientWrapper < Warframe::Cache
|
10
12
|
# The base Warframe Stat API link
|
11
13
|
BASE_URL = 'https://api.warframestat.us/'
|
12
14
|
# Default attributes
|
13
15
|
DEFAULT_OPTIONS = { platform: 'pc', language: 'en' }.freeze
|
16
|
+
|
17
|
+
# The Client Cache
|
14
18
|
attr_accessor :platform, :language
|
15
19
|
|
16
20
|
# Initialize the Wrapper for {Warframe::REST::Client REST::Client}
|
@@ -22,8 +26,8 @@ module Warframe
|
|
22
26
|
# This class is ABSTRACT and should not be instantiated outside of {Warframe::REST::Client REST::Client}.
|
23
27
|
# @return [Warframe::ClientWrapper]
|
24
28
|
def initialize(options = {})
|
29
|
+
super()
|
25
30
|
DEFAULT_OPTIONS.merge(options).each { |k, v| instance_variable_set "@#{k}", v }
|
26
|
-
|
27
31
|
yield self if block_given?
|
28
32
|
end
|
29
33
|
|
@@ -31,7 +35,5 @@ module Warframe
|
|
31
35
|
def base_url
|
32
36
|
BASE_URL + platform
|
33
37
|
end
|
34
|
-
|
35
|
-
# might need to manipulate user_agent
|
36
38
|
end
|
37
39
|
end
|
@@ -9,7 +9,8 @@ require_relative './attributes/start_string'
|
|
9
9
|
|
10
10
|
module Warframe
|
11
11
|
module Models
|
12
|
-
# Model for
|
12
|
+
# Model for Alert data.
|
13
|
+
# {https://api.warframestat.hub/pc/alerts /:platform/alerts}
|
13
14
|
class Alert < Warframe::Models::Base
|
14
15
|
include Warframe::Models::Attributes::Expired
|
15
16
|
include Warframe::Models::Attributes::Active
|
@@ -3,11 +3,18 @@
|
|
3
3
|
module Warframe
|
4
4
|
module Models
|
5
5
|
module Attributes
|
6
|
-
# Includes the desc attribute
|
6
|
+
# Includes the desc attribute
|
7
|
+
module Desc
|
8
|
+
# The description of the data requested
|
9
|
+
# @return [String]
|
10
|
+
attr_reader :desc
|
11
|
+
end
|
12
|
+
|
13
|
+
# Includes the description attribute.
|
7
14
|
module Description
|
8
15
|
# The description of the data requested.
|
9
16
|
# @return [String]
|
10
|
-
attr_reader :
|
17
|
+
attr_reader :description
|
11
18
|
end
|
12
19
|
end
|
13
20
|
end
|
@@ -0,0 +1,26 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require_relative './base'
|
4
|
+
require_relative 'attributes/id'
|
5
|
+
require_relative 'attributes/expiry'
|
6
|
+
require_relative 'attributes/active'
|
7
|
+
|
8
|
+
module Warframe
|
9
|
+
module Models
|
10
|
+
# Cambion Drift data model.
|
11
|
+
# {https://api.warframestat.us/pc/cambionCycle /:platform/cambionCycle}
|
12
|
+
class CambionDrift < Warframe::Models::Base
|
13
|
+
include Warframe::Models::Attributes::ID
|
14
|
+
include Warframe::Models::Attributes::Activation
|
15
|
+
include Warframe::Models::Attributes::Expiry
|
16
|
+
|
17
|
+
# Current active state of the world, either 'vome' or 'fass'.
|
18
|
+
# @return [String]
|
19
|
+
attr_reader :active
|
20
|
+
|
21
|
+
# The time remaining until world state switches.
|
22
|
+
# @return [String]
|
23
|
+
attr_reader :time_left
|
24
|
+
end
|
25
|
+
end
|
26
|
+
end
|
@@ -0,0 +1,40 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require_relative './base'
|
4
|
+
require_relative 'attributes/id'
|
5
|
+
require_relative 'attributes/active'
|
6
|
+
require_relative 'attributes/expiry'
|
7
|
+
|
8
|
+
module Warframe
|
9
|
+
module Models
|
10
|
+
# Cetus data model.
|
11
|
+
# {https://api.warframestat.us/pc/cetusCycle /:platform/cetusCycle}
|
12
|
+
class Cetus < Warframe::Models::Base
|
13
|
+
include Warframe::Models::Attributes::ID
|
14
|
+
include Warframe::Models::Attributes::Activation
|
15
|
+
include Warframe::Models::Attributes::Expiry
|
16
|
+
|
17
|
+
# Whether or not it is currently day.
|
18
|
+
# @return [Boolean]
|
19
|
+
attr_reader :is_day
|
20
|
+
alias day? is_day
|
21
|
+
|
22
|
+
# Current world state of Cetus.
|
23
|
+
# @return [String]
|
24
|
+
attr_reader :state
|
25
|
+
|
26
|
+
# Whether or not this is Cetus.
|
27
|
+
# @return [Boolean]
|
28
|
+
attr_reader :is_cetus
|
29
|
+
alias cetus? is_cetus
|
30
|
+
|
31
|
+
# Time left until state change.
|
32
|
+
# @return [String]
|
33
|
+
attr_reader :time_left
|
34
|
+
|
35
|
+
# A short string of the time left until state change.
|
36
|
+
# @return [String]
|
37
|
+
attr_reader :short_string
|
38
|
+
end
|
39
|
+
end
|
40
|
+
end
|
@@ -0,0 +1,54 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require_relative './base'
|
4
|
+
require_relative 'attributes/expiry'
|
5
|
+
require_relative 'attributes/eta'
|
6
|
+
require_relative 'attributes/description'
|
7
|
+
require_relative 'attributes/id'
|
8
|
+
require_relative 'attributes/active'
|
9
|
+
|
10
|
+
module Warframe
|
11
|
+
module Models
|
12
|
+
# Conclave Challenges data model.
|
13
|
+
# {https://api.warframestat.us/pc/conclaveChallenges /:platform/conclaveChallenges}
|
14
|
+
class ConclaveChallenge < Warframe::Models::Base
|
15
|
+
include Warframe::Models::Attributes::Expiration
|
16
|
+
include Warframe::Models::Attributes::ETA
|
17
|
+
include Warframe::Models::Attributes::Description
|
18
|
+
include Warframe::Models::Attributes::ID
|
19
|
+
include Warframe::Models::Attributes::Activation
|
20
|
+
|
21
|
+
# The mode of the conclave.
|
22
|
+
# @return [String]
|
23
|
+
attr_reader :mode
|
24
|
+
|
25
|
+
# The amount of challenges that must be completed.
|
26
|
+
# @return [Integer]
|
27
|
+
attr_reader :amount
|
28
|
+
|
29
|
+
# The amount of standing you will gain upon completion.
|
30
|
+
# @return [Integer]
|
31
|
+
attr_reader :standing
|
32
|
+
|
33
|
+
# The title of the challenge.
|
34
|
+
# @return [String]
|
35
|
+
attr_reader :title
|
36
|
+
|
37
|
+
# The category of mission, usually 'weekly' / 'daily'.
|
38
|
+
# @return [String]
|
39
|
+
attr_reader :category
|
40
|
+
|
41
|
+
# Whether or not this is a daily mission.
|
42
|
+
# @return [Boolean]
|
43
|
+
attr_reader :daily
|
44
|
+
|
45
|
+
# The challenge information in a one line string.
|
46
|
+
# @return [String]
|
47
|
+
attr_reader :as_string
|
48
|
+
|
49
|
+
# Whether or not this is a root challenge.
|
50
|
+
# @return [Boolean]
|
51
|
+
attr_reader :root_challenge
|
52
|
+
end
|
53
|
+
end
|
54
|
+
end
|
@@ -7,9 +7,10 @@ require_relative './attributes/eta'
|
|
7
7
|
module Warframe
|
8
8
|
module Models
|
9
9
|
# Global Upgrades data model.
|
10
|
+
# {https://api.warframestat.us/pc/globalUpgrades /:platform/globalUpgrades}
|
10
11
|
class GlobalUpgrade < Warframe::Models::Base
|
11
12
|
include Warframe::Models::Attributes::Expired
|
12
|
-
include Warframe::Models::Attributes::
|
13
|
+
include Warframe::Models::Attributes::Desc
|
13
14
|
include Warframe::Models::Attributes::ETA
|
14
15
|
|
15
16
|
# The start of the global upgrade.
|
@@ -12,6 +12,7 @@ require_relative './attributes/start_string'
|
|
12
12
|
module Warframe
|
13
13
|
module Models
|
14
14
|
# Invasion data model.
|
15
|
+
# {https://api.warframestat.us/pc/invasions /:platform/invasions}
|
15
16
|
class Invasion < Warframe::Models::Base
|
16
17
|
include Warframe::Models::Attributes::ID
|
17
18
|
include Warframe::Models::Attributes::Activation
|
data/lib/warframe/models/news.rb
CHANGED
@@ -7,7 +7,8 @@ require_relative './attributes/id'
|
|
7
7
|
|
8
8
|
module Warframe
|
9
9
|
module Models
|
10
|
-
#
|
10
|
+
# News data model.
|
11
|
+
# {https://api.warframestat.us/pc/news /:platform/news}
|
11
12
|
class News < Warframe::Models::Base
|
12
13
|
include Warframe::Models::Attributes::Translations
|
13
14
|
include Warframe::Models::Attributes::ETA
|
@@ -8,7 +8,8 @@ require_relative './attributes/reward_types'
|
|
8
8
|
|
9
9
|
module Warframe
|
10
10
|
module Models
|
11
|
-
#
|
11
|
+
# Nightwave data model.
|
12
|
+
# {https://api.warframestat.us/pc/nightwave /:platform/nightwave}
|
12
13
|
class Nightwave < Warframe::Models::Base
|
13
14
|
include Warframe::Models::Attributes::Activation
|
14
15
|
include Warframe::Models::Attributes::ID
|
@@ -0,0 +1,36 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require_relative './base'
|
4
|
+
require_relative 'attributes/id'
|
5
|
+
require_relative 'attributes/expiry'
|
6
|
+
require_relative 'attributes/active'
|
7
|
+
require_relative 'attributes/eta'
|
8
|
+
|
9
|
+
module Warframe
|
10
|
+
module Models
|
11
|
+
# Sortie data model.
|
12
|
+
# {https://api.warframestat.us/pc/sortie /:platform/sortie}
|
13
|
+
class Sortie < Warframe::Models::Base
|
14
|
+
include Warframe::Models::Attributes::ID
|
15
|
+
include Warframe::Models::Attributes::ActiveBoth
|
16
|
+
include Warframe::Models::Attributes::Expiration
|
17
|
+
include Warframe::Models::Attributes::ETA
|
18
|
+
|
19
|
+
# The boss for this part of the sortie.
|
20
|
+
# @return [String]
|
21
|
+
attr_reader :boss
|
22
|
+
|
23
|
+
# The faction fighting you in this mission.
|
24
|
+
# @return [String]
|
25
|
+
attr_reader :faction
|
26
|
+
|
27
|
+
# Modifiers active for this challenge.
|
28
|
+
# @return [Array<OpenStruct>]
|
29
|
+
attr_reader :variants
|
30
|
+
|
31
|
+
# The reward pool which this is pulling from.
|
32
|
+
# @return [String]
|
33
|
+
attr_reader :reward_pool
|
34
|
+
end
|
35
|
+
end
|
36
|
+
end
|
@@ -0,0 +1,34 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require_relative './base'
|
4
|
+
|
5
|
+
module Warframe
|
6
|
+
module Models
|
7
|
+
# SteelPath data model.
|
8
|
+
# {https://api.warframestat.us/pc/steelPath /:platform/steelPath}
|
9
|
+
class SteelPath < Warframe::Models::Base
|
10
|
+
include Warframe::Models::Attributes::Active
|
11
|
+
include Warframe::Models::Attributes::Expiry
|
12
|
+
|
13
|
+
# The currently available item from Teshin.
|
14
|
+
# @return [OpenStruct]
|
15
|
+
attr_reader :current_reward
|
16
|
+
|
17
|
+
# The time remaining of the current reward.
|
18
|
+
# @return [String]
|
19
|
+
attr_reader :remaining
|
20
|
+
|
21
|
+
# Current rotation of items the Arbiters have to offer.
|
22
|
+
# @return [Array<OpenStruct>]
|
23
|
+
attr_reader :rotation
|
24
|
+
|
25
|
+
# Current rotation of items Teshin has to offer.
|
26
|
+
# @return [Array<OpenStruct>]
|
27
|
+
attr_reader :evergreens
|
28
|
+
|
29
|
+
# Current incursion data
|
30
|
+
# @return [OpenStruct]
|
31
|
+
attr_reader :incursions
|
32
|
+
end
|
33
|
+
end
|
34
|
+
end
|
@@ -0,0 +1,32 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require_relative './base'
|
4
|
+
require_relative 'attributes/eta'
|
5
|
+
require_relative 'attributes/id'
|
6
|
+
require_relative 'attributes/active'
|
7
|
+
require_relative 'attributes/start_string'
|
8
|
+
|
9
|
+
module Warframe
|
10
|
+
module Models
|
11
|
+
# SyndicateMission data model.
|
12
|
+
# {https://api.warframestat.us/pc/syndicateMissions /:platform/syndicateMissions}
|
13
|
+
class SyndicateMission < Warframe::Models::Base
|
14
|
+
include Warframe::Models::Attributes::ETA
|
15
|
+
include Warframe::Models::Attributes::ID
|
16
|
+
include Warframe::Models::Attributes::ActiveBoth
|
17
|
+
include Warframe::Models::Attributes::StartString
|
18
|
+
|
19
|
+
# 'Jobs' or challenges currently available.
|
20
|
+
# @return [Array<OpenStruct>]
|
21
|
+
attr_reader :jobs
|
22
|
+
|
23
|
+
# The syndicate you will be fighting.
|
24
|
+
# @return [String]
|
25
|
+
attr_reader :syndicate
|
26
|
+
|
27
|
+
# The nodes that this mission is available on.
|
28
|
+
# @return [Array]
|
29
|
+
attr_reader :nodes
|
30
|
+
end
|
31
|
+
end
|
32
|
+
end
|
@@ -0,0 +1,23 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require 'warframe/models/cambion_drift'
|
4
|
+
require_relative '../utils'
|
5
|
+
|
6
|
+
module Warframe
|
7
|
+
module REST
|
8
|
+
module API
|
9
|
+
# API endpoint for getting information on current Cambion Drift data.
|
10
|
+
#
|
11
|
+
# {https://api.warframestat.us/pc/cambionDrift Example Response}
|
12
|
+
module CambionDrift
|
13
|
+
include Warframe::REST::Utils
|
14
|
+
|
15
|
+
# Gets the current cambionDrift Data.
|
16
|
+
# @return Warframe::Models::CambionDrift
|
17
|
+
def cambion_drift
|
18
|
+
get('/cambionCycle', Warframe::Models::CambionDrift)
|
19
|
+
end
|
20
|
+
end
|
21
|
+
end
|
22
|
+
end
|
23
|
+
end
|
@@ -0,0 +1,23 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require 'warframe/models/cetus'
|
4
|
+
require_relative '../utils'
|
5
|
+
|
6
|
+
module Warframe
|
7
|
+
module REST
|
8
|
+
module API
|
9
|
+
# API endpoint for getting information on current Cetus data.
|
10
|
+
#
|
11
|
+
# {https://api.warframestat.us/pc/cetusCycle Example Response}
|
12
|
+
module Cetus
|
13
|
+
include Warframe::REST::Utils
|
14
|
+
|
15
|
+
# Gets the current cetusCycle Data.
|
16
|
+
# @return [Warframe::Models::Cetus]
|
17
|
+
def cetus
|
18
|
+
get('/cetusCycle', Warframe::Models::Cetus)
|
19
|
+
end
|
20
|
+
end
|
21
|
+
end
|
22
|
+
end
|
23
|
+
end
|
@@ -0,0 +1,23 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require 'warframe/models/conclave_challenge'
|
4
|
+
require_relative '../utils'
|
5
|
+
|
6
|
+
module Warframe
|
7
|
+
module REST
|
8
|
+
module API
|
9
|
+
# API endpoint for getting information on current Conclave Challenge data.
|
10
|
+
#
|
11
|
+
# {https://api.warframestat.us/pc/conclaveChallenges Example Response}
|
12
|
+
module ConclaveChallenges
|
13
|
+
include Warframe::REST::Utils
|
14
|
+
|
15
|
+
# Gets the current conclave challenges.
|
16
|
+
# @return [Array<Warframe::Models::ConclaveChallenge>]
|
17
|
+
def conclave_challenges
|
18
|
+
get('/conclaveChallenges', Warframe::Models::ConclaveChallenge)
|
19
|
+
end
|
20
|
+
end
|
21
|
+
end
|
22
|
+
end
|
23
|
+
end
|
@@ -0,0 +1,23 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require 'warframe/models/sortie'
|
4
|
+
require_relative '../utils'
|
5
|
+
|
6
|
+
module Warframe
|
7
|
+
module REST
|
8
|
+
module API
|
9
|
+
# API endpoint for getting information on current Sortie data.
|
10
|
+
#
|
11
|
+
# {https://api.warframestat.us/pc/sortie Example Response}
|
12
|
+
module Sortie
|
13
|
+
include Warframe::REST::Utils
|
14
|
+
|
15
|
+
# Gets the current sortie missions.
|
16
|
+
# @return [Array<Warframe::Models::Sortie>]
|
17
|
+
def sortie
|
18
|
+
get('/sortie', Warframe::Models::Sortie)
|
19
|
+
end
|
20
|
+
end
|
21
|
+
end
|
22
|
+
end
|
23
|
+
end
|
@@ -0,0 +1,23 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require 'warframe/models/steel_path'
|
4
|
+
require_relative '../utils'
|
5
|
+
|
6
|
+
module Warframe
|
7
|
+
module REST
|
8
|
+
module API
|
9
|
+
# API endpoint for getting information on current SteelPath data.
|
10
|
+
#
|
11
|
+
# {https://api.warframestat.us/pc/steelPath Example Response}
|
12
|
+
module SteelPath
|
13
|
+
include Warframe::REST::Utils
|
14
|
+
|
15
|
+
# Steel Path data
|
16
|
+
# @return [Warframe::Models::SteelPath]
|
17
|
+
def steel_path
|
18
|
+
get('/steelPath', Warframe::Models::SteelPath)
|
19
|
+
end
|
20
|
+
end
|
21
|
+
end
|
22
|
+
end
|
23
|
+
end
|
@@ -0,0 +1,23 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require 'warframe/models/syndicate_mission'
|
4
|
+
require_relative '../utils'
|
5
|
+
|
6
|
+
module Warframe
|
7
|
+
module REST
|
8
|
+
module API
|
9
|
+
# API endpoint for getting information on current SyndicateMission data.
|
10
|
+
#
|
11
|
+
# {https://api.warframestat.us/pc/syndicateMissions Example Response}
|
12
|
+
module SyndicateMissions
|
13
|
+
include Warframe::REST::Utils
|
14
|
+
|
15
|
+
# Gets the current syndicateMissions Data.
|
16
|
+
# @return [Array<Warframe::Models::SyndicateMission>]
|
17
|
+
def syndicate_missions
|
18
|
+
get('/syndicateMissions', Warframe::Models::SyndicateMission)
|
19
|
+
end
|
20
|
+
end
|
21
|
+
end
|
22
|
+
end
|
23
|
+
end
|
data/lib/warframe/rest/api.rb
CHANGED
@@ -1,13 +1,19 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
-
require_relative 'api/nightwave'
|
4
|
-
require_relative 'api/news'
|
5
3
|
require_relative 'api/alerts'
|
6
|
-
require_relative 'api/
|
4
|
+
require_relative 'api/cambion_drift'
|
5
|
+
require_relative 'api/cetus'
|
6
|
+
require_relative 'api/conclave_challenges'
|
7
7
|
require_relative 'api/global_upgrades'
|
8
|
+
require_relative 'api/invasions'
|
9
|
+
require_relative 'api/news'
|
10
|
+
require_relative 'api/nightwave'
|
11
|
+
require_relative 'api/sortie'
|
12
|
+
require_relative 'api/steel_path'
|
13
|
+
require_relative 'api/syndicate_missions'
|
8
14
|
|
9
15
|
module Warframe
|
10
|
-
# A REST-ful API service, provided by https://api.warframestat.us
|
16
|
+
# A REST-ful API service, provided by https://api.warframestat.us.
|
11
17
|
module REST
|
12
18
|
# The API Router for getting live data.
|
13
19
|
#
|
@@ -16,10 +22,16 @@ module Warframe
|
|
16
22
|
# Module names are 'routes' to this API. See {Warframe::REST::API::Alerts Alerts} for example.
|
17
23
|
module API
|
18
24
|
include Warframe::REST::API::Alerts
|
25
|
+
include Warframe::REST::API::CambionDrift
|
26
|
+
include Warframe::REST::API::Cetus
|
27
|
+
include Warframe::REST::API::ConclaveChallenges
|
19
28
|
include Warframe::REST::API::GlobalUpgrades
|
20
29
|
include Warframe::REST::API::Invasions
|
21
30
|
include Warframe::REST::API::News
|
22
31
|
include Warframe::REST::API::Nightwave
|
32
|
+
include Warframe::REST::API::Sortie
|
33
|
+
include Warframe::REST::API::SteelPath
|
34
|
+
include Warframe::REST::API::SyndicateMissions
|
23
35
|
end
|
24
36
|
end
|
25
37
|
end
|
@@ -21,6 +21,7 @@ module Warframe
|
|
21
21
|
# @return [Warframe:REST:Request]
|
22
22
|
def initialize(client, path, klass)
|
23
23
|
@client = client
|
24
|
+
@route = path
|
24
25
|
@path = client.base_url + path + "?language=#{@client.language}"
|
25
26
|
@klass = klass
|
26
27
|
end
|
@@ -31,7 +32,8 @@ module Warframe
|
|
31
32
|
def send
|
32
33
|
uri = URI(path)
|
33
34
|
req = Net::HTTP::Get.new(uri)
|
34
|
-
|
35
|
+
resp = get_response uri, req
|
36
|
+
return_parsed resp
|
35
37
|
end
|
36
38
|
|
37
39
|
private
|
@@ -41,6 +43,10 @@ module Warframe
|
|
41
43
|
# @return [Warframe::Models, Array<[Warframe::Models]>]
|
42
44
|
def return_parsed(resp)
|
43
45
|
parsed = JSON.parse(resp)
|
46
|
+
|
47
|
+
# Return Empty array if no data found.
|
48
|
+
return [] if parsed.is_a?(Array) && parsed.empty?
|
49
|
+
|
44
50
|
@klass.new parsed
|
45
51
|
end
|
46
52
|
|
data/lib/warframe/rest/utils.rb
CHANGED
@@ -12,7 +12,11 @@ module Warframe
|
|
12
12
|
# @param path [String]
|
13
13
|
# @param klass [Warframe::Models]
|
14
14
|
def get(path, klass)
|
15
|
-
|
15
|
+
inst = @client || self
|
16
|
+
return inst.get_from_cache(path) if inst.find_in_cache(path)
|
17
|
+
|
18
|
+
result = Warframe::REST::Request.new(inst, path, klass).send
|
19
|
+
inst.add_to_cache(path, result)
|
16
20
|
end
|
17
21
|
end
|
18
22
|
end
|
data/lib/warframe/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: warframe
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.3.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- A.J. Romaniello
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2021-
|
11
|
+
date: 2021-12-13 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: fast_underscore
|
@@ -104,26 +104,6 @@ dependencies:
|
|
104
104
|
- - ">="
|
105
105
|
- !ruby/object:Gem::Version
|
106
106
|
version: 2.2.31
|
107
|
-
- !ruby/object:Gem::Dependency
|
108
|
-
name: rake
|
109
|
-
requirement: !ruby/object:Gem::Requirement
|
110
|
-
requirements:
|
111
|
-
- - "~>"
|
112
|
-
- !ruby/object:Gem::Version
|
113
|
-
version: '13.0'
|
114
|
-
- - ">="
|
115
|
-
- !ruby/object:Gem::Version
|
116
|
-
version: 13.0.6
|
117
|
-
type: :development
|
118
|
-
prerelease: false
|
119
|
-
version_requirements: !ruby/object:Gem::Requirement
|
120
|
-
requirements:
|
121
|
-
- - "~>"
|
122
|
-
- !ruby/object:Gem::Version
|
123
|
-
version: '13.0'
|
124
|
-
- - ">="
|
125
|
-
- !ruby/object:Gem::Version
|
126
|
-
version: 13.0.6
|
127
107
|
- !ruby/object:Gem::Dependency
|
128
108
|
name: rspec
|
129
109
|
requirement: !ruby/object:Gem::Requirement
|
@@ -158,6 +138,20 @@ dependencies:
|
|
158
138
|
- - ">="
|
159
139
|
- !ruby/object:Gem::Version
|
160
140
|
version: 1.22.3
|
141
|
+
- !ruby/object:Gem::Dependency
|
142
|
+
name: thor
|
143
|
+
requirement: !ruby/object:Gem::Requirement
|
144
|
+
requirements:
|
145
|
+
- - "~>"
|
146
|
+
- !ruby/object:Gem::Version
|
147
|
+
version: 0.19.1
|
148
|
+
type: :development
|
149
|
+
prerelease: false
|
150
|
+
version_requirements: !ruby/object:Gem::Requirement
|
151
|
+
requirements:
|
152
|
+
- - "~>"
|
153
|
+
- !ruby/object:Gem::Version
|
154
|
+
version: 0.19.1
|
161
155
|
- !ruby/object:Gem::Dependency
|
162
156
|
name: yard
|
163
157
|
requirement: !ruby/object:Gem::Requirement
|
@@ -178,16 +172,11 @@ executables: []
|
|
178
172
|
extensions: []
|
179
173
|
extra_rdoc_files: []
|
180
174
|
files:
|
181
|
-
- ".rspec"
|
182
|
-
- ".rubocop.yml"
|
183
175
|
- ".yardopts"
|
184
|
-
- CODE_OF_CONDUCT.md
|
185
|
-
- Gemfile
|
186
|
-
- Gemfile.lock
|
187
176
|
- LICENSE.txt
|
188
177
|
- README.md
|
189
|
-
- Rakefile
|
190
178
|
- lib/warframe.rb
|
179
|
+
- lib/warframe/cache.rb
|
191
180
|
- lib/warframe/client_wrapper.rb
|
192
181
|
- lib/warframe/models/alert.rb
|
193
182
|
- lib/warframe/models/attributes/active.rb
|
@@ -199,28 +188,37 @@ files:
|
|
199
188
|
- lib/warframe/models/attributes/start_string.rb
|
200
189
|
- lib/warframe/models/attributes/translations.rb
|
201
190
|
- lib/warframe/models/base.rb
|
191
|
+
- lib/warframe/models/cambion_drift.rb
|
192
|
+
- lib/warframe/models/cetus.rb
|
193
|
+
- lib/warframe/models/conclave_challenge.rb
|
202
194
|
- lib/warframe/models/global_upgrade.rb
|
203
195
|
- lib/warframe/models/invasion.rb
|
204
196
|
- lib/warframe/models/news.rb
|
205
197
|
- lib/warframe/models/nightwave.rb
|
198
|
+
- lib/warframe/models/sortie.rb
|
199
|
+
- lib/warframe/models/steel_path.rb
|
200
|
+
- lib/warframe/models/syndicate_mission.rb
|
206
201
|
- lib/warframe/rest/api.rb
|
207
202
|
- lib/warframe/rest/api/alerts.rb
|
203
|
+
- lib/warframe/rest/api/cambion_drift.rb
|
204
|
+
- lib/warframe/rest/api/cetus.rb
|
205
|
+
- lib/warframe/rest/api/conclave_challenges.rb
|
208
206
|
- lib/warframe/rest/api/global_upgrades.rb
|
209
207
|
- lib/warframe/rest/api/invasions.rb
|
210
208
|
- lib/warframe/rest/api/news.rb
|
211
209
|
- lib/warframe/rest/api/nightwave.rb
|
210
|
+
- lib/warframe/rest/api/sortie.rb
|
211
|
+
- lib/warframe/rest/api/steel_path.rb
|
212
|
+
- lib/warframe/rest/api/syndicate_missions.rb
|
212
213
|
- lib/warframe/rest/client.rb
|
213
214
|
- lib/warframe/rest/request.rb
|
214
215
|
- lib/warframe/rest/utils.rb
|
215
216
|
- lib/warframe/version.rb
|
216
|
-
- warframe.gemspec
|
217
217
|
homepage: https://github.com/aj-rom/warframe-ruby
|
218
218
|
licenses:
|
219
219
|
- MIT
|
220
220
|
metadata:
|
221
|
-
|
222
|
-
bug_tracker_uri: https://github.com/aj-rom/warframe-ruby/issues
|
223
|
-
documentation_uri: https://rubydoc.info/gems/warframe
|
221
|
+
rubygems_mfa_required: 'true'
|
224
222
|
post_install_message:
|
225
223
|
rdoc_options: []
|
226
224
|
require_paths:
|
data/.rspec
DELETED
data/.rubocop.yml
DELETED
data/CODE_OF_CONDUCT.md
DELETED
@@ -1,84 +0,0 @@
|
|
1
|
-
# Contributor Covenant Code of Conduct
|
2
|
-
|
3
|
-
## Our Pledge
|
4
|
-
|
5
|
-
We as members, contributors, and leaders pledge to make participation in our community a harassment-free experience for everyone, regardless of age, body size, visible or invisible disability, ethnicity, sex characteristics, gender identity and expression, level of experience, education, socio-economic status, nationality, personal appearance, race, religion, or sexual identity and orientation.
|
6
|
-
|
7
|
-
We pledge to act and interact in ways that contribute to an open, welcoming, diverse, inclusive, and healthy community.
|
8
|
-
|
9
|
-
## Our Standards
|
10
|
-
|
11
|
-
Examples of behavior that contributes to a positive environment for our community include:
|
12
|
-
|
13
|
-
* Demonstrating empathy and kindness toward other people
|
14
|
-
* Being respectful of differing opinions, viewpoints, and experiences
|
15
|
-
* Giving and gracefully accepting constructive feedback
|
16
|
-
* Accepting responsibility and apologizing to those affected by our mistakes, and learning from the experience
|
17
|
-
* Focusing on what is best not just for us as individuals, but for the overall community
|
18
|
-
|
19
|
-
Examples of unacceptable behavior include:
|
20
|
-
|
21
|
-
* The use of sexualized language or imagery, and sexual attention or
|
22
|
-
advances of any kind
|
23
|
-
* Trolling, insulting or derogatory comments, and personal or political attacks
|
24
|
-
* Public or private harassment
|
25
|
-
* Publishing others' private information, such as a physical or email
|
26
|
-
address, without their explicit permission
|
27
|
-
* Other conduct which could reasonably be considered inappropriate in a
|
28
|
-
professional setting
|
29
|
-
|
30
|
-
## Enforcement Responsibilities
|
31
|
-
|
32
|
-
Community leaders are responsible for clarifying and enforcing our standards of acceptable behavior and will take appropriate and fair corrective action in response to any behavior that they deem inappropriate, threatening, offensive, or harmful.
|
33
|
-
|
34
|
-
Community leaders have the right and responsibility to remove, edit, or reject comments, commits, code, wiki edits, issues, and other contributions that are not aligned to this Code of Conduct, and will communicate reasons for moderation decisions when appropriate.
|
35
|
-
|
36
|
-
## Scope
|
37
|
-
|
38
|
-
This Code of Conduct applies within all community spaces, and also applies when an individual is officially representing the community in public spaces. Examples of representing our community include using an official e-mail address, posting via an official social media account, or acting as an appointed representative at an online or offline event.
|
39
|
-
|
40
|
-
## Enforcement
|
41
|
-
|
42
|
-
Instances of abusive, harassing, or otherwise unacceptable behavior may be reported to the community leaders responsible for enforcement at ajiellodev@gmail.com. All complaints will be reviewed and investigated promptly and fairly.
|
43
|
-
|
44
|
-
All community leaders are obligated to respect the privacy and security of the reporter of any incident.
|
45
|
-
|
46
|
-
## Enforcement Guidelines
|
47
|
-
|
48
|
-
Community leaders will follow these Community Impact Guidelines in determining the consequences for any action they deem in violation of this Code of Conduct:
|
49
|
-
|
50
|
-
### 1. Correction
|
51
|
-
|
52
|
-
**Community Impact**: Use of inappropriate language or other behavior deemed unprofessional or unwelcome in the community.
|
53
|
-
|
54
|
-
**Consequence**: A private, written warning from community leaders, providing clarity around the nature of the violation and an explanation of why the behavior was inappropriate. A public apology may be requested.
|
55
|
-
|
56
|
-
### 2. Warning
|
57
|
-
|
58
|
-
**Community Impact**: A violation through a single incident or series of actions.
|
59
|
-
|
60
|
-
**Consequence**: A warning with consequences for continued behavior. No interaction with the people involved, including unsolicited interaction with those enforcing the Code of Conduct, for a specified period of time. This includes avoiding interactions in community spaces as well as external channels like social media. Violating these terms may lead to a temporary or permanent ban.
|
61
|
-
|
62
|
-
### 3. Temporary Ban
|
63
|
-
|
64
|
-
**Community Impact**: A serious violation of community standards, including sustained inappropriate behavior.
|
65
|
-
|
66
|
-
**Consequence**: A temporary ban from any sort of interaction or public communication with the community for a specified period of time. No public or private interaction with the people involved, including unsolicited interaction with those enforcing the Code of Conduct, is allowed during this period. Violating these terms may lead to a permanent ban.
|
67
|
-
|
68
|
-
### 4. Permanent Ban
|
69
|
-
|
70
|
-
**Community Impact**: Demonstrating a pattern of violation of community standards, including sustained inappropriate behavior, harassment of an individual, or aggression toward or disparagement of classes of individuals.
|
71
|
-
|
72
|
-
**Consequence**: A permanent ban from any sort of public interaction within the community.
|
73
|
-
|
74
|
-
## Attribution
|
75
|
-
|
76
|
-
This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 2.0,
|
77
|
-
available at https://www.contributor-covenant.org/version/2/0/code_of_conduct.html.
|
78
|
-
|
79
|
-
Community Impact Guidelines were inspired by [Mozilla's code of conduct enforcement ladder](https://github.com/mozilla/diversity).
|
80
|
-
|
81
|
-
[homepage]: https://www.contributor-covenant.org
|
82
|
-
|
83
|
-
For answers to common questions about this code of conduct, see the FAQ at
|
84
|
-
https://www.contributor-covenant.org/faq. Translations are available at https://www.contributor-covenant.org/translations.
|
data/Gemfile
DELETED
data/Gemfile.lock
DELETED
@@ -1,103 +0,0 @@
|
|
1
|
-
PATH
|
2
|
-
remote: .
|
3
|
-
specs:
|
4
|
-
warframe (0.1.2)
|
5
|
-
fast_underscore (~> 0.3.2)
|
6
|
-
http (~> 5.0, >= 5.0.4)
|
7
|
-
json (~> 2.6, >= 2.6.1)
|
8
|
-
|
9
|
-
GEM
|
10
|
-
remote: https://rubygems.org/
|
11
|
-
specs:
|
12
|
-
activesupport (5.2.6)
|
13
|
-
concurrent-ruby (~> 1.0, >= 1.0.2)
|
14
|
-
i18n (>= 0.7, < 2)
|
15
|
-
minitest (~> 5.1)
|
16
|
-
tzinfo (~> 1.1)
|
17
|
-
addressable (2.8.0)
|
18
|
-
public_suffix (>= 2.0.2, < 5.0)
|
19
|
-
ast (2.4.2)
|
20
|
-
concurrent-ruby (1.1.9)
|
21
|
-
diff-lcs (1.4.4)
|
22
|
-
domain_name (0.5.20190701)
|
23
|
-
unf (>= 0.0.5, < 1.0.0)
|
24
|
-
fast_underscore (0.3.2)
|
25
|
-
ffi (1.15.4)
|
26
|
-
ffi (1.15.4-x64-mingw32)
|
27
|
-
ffi-compiler (1.0.1)
|
28
|
-
ffi (>= 1.0.0)
|
29
|
-
rake
|
30
|
-
http (5.0.4)
|
31
|
-
addressable (~> 2.8)
|
32
|
-
http-cookie (~> 1.0)
|
33
|
-
http-form_data (~> 2.2)
|
34
|
-
llhttp-ffi (~> 0.4.0)
|
35
|
-
http-cookie (1.0.4)
|
36
|
-
domain_name (~> 0.5)
|
37
|
-
http-form_data (2.3.0)
|
38
|
-
i18n (1.8.11)
|
39
|
-
concurrent-ruby (~> 1.0)
|
40
|
-
json (2.6.1)
|
41
|
-
llhttp-ffi (0.4.0)
|
42
|
-
ffi-compiler (~> 1.0)
|
43
|
-
rake (~> 13.0)
|
44
|
-
minitest (5.14.4)
|
45
|
-
parallel (1.21.0)
|
46
|
-
parser (3.0.2.0)
|
47
|
-
ast (~> 2.4.1)
|
48
|
-
public_suffix (4.0.6)
|
49
|
-
rainbow (3.0.0)
|
50
|
-
rake (13.0.6)
|
51
|
-
regexp_parser (2.1.1)
|
52
|
-
rexml (3.2.5)
|
53
|
-
rspec (3.10.0)
|
54
|
-
rspec-core (~> 3.10.0)
|
55
|
-
rspec-expectations (~> 3.10.0)
|
56
|
-
rspec-mocks (~> 3.10.0)
|
57
|
-
rspec-core (3.10.1)
|
58
|
-
rspec-support (~> 3.10.0)
|
59
|
-
rspec-expectations (3.10.1)
|
60
|
-
diff-lcs (>= 1.2.0, < 2.0)
|
61
|
-
rspec-support (~> 3.10.0)
|
62
|
-
rspec-mocks (3.10.2)
|
63
|
-
diff-lcs (>= 1.2.0, < 2.0)
|
64
|
-
rspec-support (~> 3.10.0)
|
65
|
-
rspec-support (3.10.3)
|
66
|
-
rubocop (1.22.3)
|
67
|
-
parallel (~> 1.10)
|
68
|
-
parser (>= 3.0.0.0)
|
69
|
-
rainbow (>= 2.2.2, < 4.0)
|
70
|
-
regexp_parser (>= 1.8, < 3.0)
|
71
|
-
rexml
|
72
|
-
rubocop-ast (>= 1.12.0, < 2.0)
|
73
|
-
ruby-progressbar (~> 1.7)
|
74
|
-
unicode-display_width (>= 1.4.0, < 3.0)
|
75
|
-
rubocop-ast (1.13.0)
|
76
|
-
parser (>= 3.0.1.1)
|
77
|
-
ruby-progressbar (1.11.0)
|
78
|
-
thread_safe (0.3.6)
|
79
|
-
tzinfo (1.2.9)
|
80
|
-
thread_safe (~> 0.1)
|
81
|
-
unf (0.1.4)
|
82
|
-
unf_ext
|
83
|
-
unf_ext (0.0.8)
|
84
|
-
unf_ext (0.0.8-x64-mingw32)
|
85
|
-
unicode-display_width (2.1.0)
|
86
|
-
yard (0.9.26)
|
87
|
-
|
88
|
-
PLATFORMS
|
89
|
-
x64-mingw32
|
90
|
-
x86_64-darwin-19
|
91
|
-
x86_64-linux
|
92
|
-
|
93
|
-
DEPENDENCIES
|
94
|
-
activesupport (~> 5.0, >= 5.0.0.1)
|
95
|
-
bundler (~> 2.1, >= 2.2.31)
|
96
|
-
rake (~> 13.0, >= 13.0.6)
|
97
|
-
rspec (~> 3.10)
|
98
|
-
rubocop (~> 1.22, >= 1.22.3)
|
99
|
-
warframe!
|
100
|
-
yard (~> 0.9.26)
|
101
|
-
|
102
|
-
BUNDLED WITH
|
103
|
-
2.2.31
|
data/Rakefile
DELETED
@@ -1,12 +0,0 @@
|
|
1
|
-
# frozen_string_literal: true
|
2
|
-
|
3
|
-
require 'bundler/gem_tasks'
|
4
|
-
require 'rspec/core/rake_task'
|
5
|
-
require 'rubocop/rake_task'
|
6
|
-
|
7
|
-
RSpec::Core::RakeTask.new(:test)
|
8
|
-
RuboCop::RakeTask.new(:lint) do |t|
|
9
|
-
t.options = %w[-A --extra-details]
|
10
|
-
end
|
11
|
-
|
12
|
-
task default: :spec
|
data/warframe.gemspec
DELETED
@@ -1,45 +0,0 @@
|
|
1
|
-
# frozen_string_literal: true
|
2
|
-
|
3
|
-
require_relative 'lib/warframe/version'
|
4
|
-
|
5
|
-
Gem::Specification.new do |spec|
|
6
|
-
# Required
|
7
|
-
spec.name = 'warframe'
|
8
|
-
spec.version = Warframe::VERSION
|
9
|
-
spec.authors = ['A.J. Romaniello']
|
10
|
-
|
11
|
-
# Descriptive
|
12
|
-
spec.summary = 'A Ruby interface to the WarframeStat API.'
|
13
|
-
spec.description = spec.summary
|
14
|
-
spec.license = 'MIT'
|
15
|
-
spec.homepage = 'https://github.com/aj-rom/warframe-ruby'
|
16
|
-
|
17
|
-
# MetaData
|
18
|
-
spec.metadata['source_code_uri'] = 'https://github.com/aj-rom/warframe-ruby'
|
19
|
-
spec.metadata['bug_tracker_uri'] = "#{spec.metadata['source_code_uri']}/issues"
|
20
|
-
spec.metadata['documentation_uri'] = "https://rubydoc.info/gems/#{spec.name}"
|
21
|
-
|
22
|
-
# Executables / Files
|
23
|
-
spec.bindir = 'exe'
|
24
|
-
spec.require_paths = ['lib']
|
25
|
-
|
26
|
-
# Specify which files should be added to the gem when it is released.
|
27
|
-
# The `git ls-files -z` loads the files in the RubyGem that have been added into git.
|
28
|
-
spec.files = Dir.chdir(File.expand_path(__dir__)) do
|
29
|
-
`git ls-files -z`.split("\x0").reject do |f|
|
30
|
-
(f == __FILE__) || f.match(%r{\A(?:(?:test|spec|features)/|\.(?:git|travis|circleci)|appveyor)})
|
31
|
-
end
|
32
|
-
end
|
33
|
-
|
34
|
-
# Dependencies
|
35
|
-
spec.required_ruby_version = '>= 2.5.0'
|
36
|
-
spec.add_dependency 'fast_underscore', '~> 0.3.2'
|
37
|
-
spec.add_dependency 'http', '~> 5.0', '>= 5.0.4'
|
38
|
-
spec.add_dependency 'json', '~> 2.6', '>= 2.6.1'
|
39
|
-
spec.add_development_dependency 'activesupport', '~> 5.0', '>= 5.0.0.1'
|
40
|
-
spec.add_development_dependency 'bundler', '~> 2.1', '>= 2.2.31'
|
41
|
-
spec.add_development_dependency 'rake', '~> 13.0', '>= 13.0.6'
|
42
|
-
spec.add_development_dependency 'rspec', '~> 3.10'
|
43
|
-
spec.add_development_dependency 'rubocop', '~> 1.22', '>= 1.22.3'
|
44
|
-
spec.add_development_dependency 'yard', '~> 0.9.26'
|
45
|
-
end
|