namely 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/.gitignore +3 -0
- data/.travis.yml +5 -0
- data/Gemfile +3 -0
- data/Gemfile.lock +51 -0
- data/LICENSE +22 -0
- data/LICENSE.txt +22 -0
- data/README.md +125 -0
- data/Rakefile +16 -0
- data/lib/namely.rb +114 -0
- data/lib/namely/authenticator.rb +164 -0
- data/lib/namely/country.rb +9 -0
- data/lib/namely/currency_type.rb +9 -0
- data/lib/namely/event.rb +9 -0
- data/lib/namely/exceptions.rb +13 -0
- data/lib/namely/field.rb +9 -0
- data/lib/namely/job_tier.rb +9 -0
- data/lib/namely/profile.rb +13 -0
- data/lib/namely/report.rb +9 -0
- data/lib/namely/resource_gateway.rb +81 -0
- data/lib/namely/restful_model.rb +150 -0
- data/lib/namely/version.rb +3 -0
- data/namely.gemspec +30 -0
- data/spec/fixtures/vcr_cassettes/country_head.yml +51 -0
- data/spec/fixtures/vcr_cassettes/country_head_missing.yml +50 -0
- data/spec/fixtures/vcr_cassettes/country_index.yml +121 -0
- data/spec/fixtures/vcr_cassettes/country_show.yml +68 -0
- data/spec/fixtures/vcr_cassettes/country_show_missing.yml +54 -0
- data/spec/fixtures/vcr_cassettes/currencytype_index.yml +64 -0
- data/spec/fixtures/vcr_cassettes/event_head.yml +51 -0
- data/spec/fixtures/vcr_cassettes/event_head_missing.yml +50 -0
- data/spec/fixtures/vcr_cassettes/event_index.yml +88 -0
- data/spec/fixtures/vcr_cassettes/event_show.yml +62 -0
- data/spec/fixtures/vcr_cassettes/event_show_missing.yml +54 -0
- data/spec/fixtures/vcr_cassettes/field_index.yml +207 -0
- data/spec/fixtures/vcr_cassettes/jobtier_index.yml +103 -0
- data/spec/fixtures/vcr_cassettes/profile_create.yml +85 -0
- data/spec/fixtures/vcr_cassettes/profile_create_failed.yml +54 -0
- data/spec/fixtures/vcr_cassettes/profile_head.yml +51 -0
- data/spec/fixtures/vcr_cassettes/profile_head_missing.yml +50 -0
- data/spec/fixtures/vcr_cassettes/profile_index.yml +979 -0
- data/spec/fixtures/vcr_cassettes/profile_show.yml +91 -0
- data/spec/fixtures/vcr_cassettes/profile_show_missing.yml +54 -0
- data/spec/fixtures/vcr_cassettes/profile_show_updated.yml +91 -0
- data/spec/fixtures/vcr_cassettes/profile_update.yml +95 -0
- data/spec/fixtures/vcr_cassettes/profile_update_revert.yml +95 -0
- data/spec/fixtures/vcr_cassettes/report_head.yml +51 -0
- data/spec/fixtures/vcr_cassettes/report_head_missing.yml +50 -0
- data/spec/fixtures/vcr_cassettes/report_show.yml +185 -0
- data/spec/fixtures/vcr_cassettes/report_show_missing.yml +54 -0
- data/spec/fixtures/vcr_cassettes/token.yml +57 -0
- data/spec/fixtures/vcr_cassettes/token_refresh.yml +57 -0
- data/spec/namely/authenticator_spec.rb +143 -0
- data/spec/namely/configuration_spec.rb +33 -0
- data/spec/namely/country_spec.rb +11 -0
- data/spec/namely/currency_type_spec.rb +5 -0
- data/spec/namely/event_spec.rb +11 -0
- data/spec/namely/field_spec.rb +5 -0
- data/spec/namely/job_tier_spec.rb +5 -0
- data/spec/namely/profile_spec.rb +25 -0
- data/spec/namely/report_spec.rb +8 -0
- data/spec/namely/resource_gateway_spec.rb +93 -0
- data/spec/shared_examples/a_model_with_a_create_action.rb +24 -0
- data/spec/shared_examples/a_model_with_a_show_action.rb +38 -0
- data/spec/shared_examples/a_model_with_an_index_action.rb +17 -0
- data/spec/shared_examples/a_model_with_an_update_action.rb +37 -0
- data/spec/spec_helper.rb +49 -0
- metadata +280 -0
@@ -0,0 +1,33 @@
|
|
1
|
+
require "spec_helper"
|
2
|
+
|
3
|
+
describe Namely::Configuration do
|
4
|
+
before :each do
|
5
|
+
unset_configuration!
|
6
|
+
end
|
7
|
+
|
8
|
+
after :each do
|
9
|
+
set_configuration!
|
10
|
+
end
|
11
|
+
|
12
|
+
it "contains a subdomain and access_token when those have been set" do
|
13
|
+
Namely.configure do |config|
|
14
|
+
config.access_token = "my_token"
|
15
|
+
config.subdomain = "my_subdomain"
|
16
|
+
end
|
17
|
+
|
18
|
+
expect(Namely.configuration.access_token).to eq "my_token"
|
19
|
+
expect(Namely.configuration.subdomain).to eq "my_subdomain"
|
20
|
+
end
|
21
|
+
|
22
|
+
it "raises an error when the configuration block hasn't been run" do
|
23
|
+
expect { Namely.configuration }.to raise_error Namely::ImproperlyConfiguredError
|
24
|
+
end
|
25
|
+
|
26
|
+
it "raises an error when variables haven't been set in the config" do
|
27
|
+
Namely.configure do
|
28
|
+
end
|
29
|
+
|
30
|
+
expect { Namely.configuration.access_token }.to raise_error Namely::ImproperlyConfiguredError
|
31
|
+
expect { Namely.configuration.subdomain }.to raise_error Namely::ImproperlyConfiguredError
|
32
|
+
end
|
33
|
+
end
|
@@ -0,0 +1,11 @@
|
|
1
|
+
require "spec_helper"
|
2
|
+
|
3
|
+
describe Namely::Country do
|
4
|
+
it_behaves_like "a model with an index action", [:id, :name, :subdivision_type]
|
5
|
+
it_behaves_like(
|
6
|
+
"a model with a show action",
|
7
|
+
id: "US",
|
8
|
+
name: "United States",
|
9
|
+
subdivision_type: "State"
|
10
|
+
)
|
11
|
+
end
|
@@ -0,0 +1,25 @@
|
|
1
|
+
require "spec_helper"
|
2
|
+
|
3
|
+
describe Namely::Profile do
|
4
|
+
it_behaves_like "a model with an index action", [:first_name, :last_name]
|
5
|
+
|
6
|
+
it_behaves_like(
|
7
|
+
"a model with a show action",
|
8
|
+
id: "20332458-c1fe-412f-bcb8-01622f04a35d",
|
9
|
+
first_name: "Leighton",
|
10
|
+
last_name: "Meester"
|
11
|
+
)
|
12
|
+
|
13
|
+
it_behaves_like(
|
14
|
+
"a model with a create action",
|
15
|
+
first_name: "Beardsly",
|
16
|
+
last_name: "McDog",
|
17
|
+
email: "beardsly-#{Time.now.utc.to_f}@namely.com"
|
18
|
+
)
|
19
|
+
|
20
|
+
it_behaves_like(
|
21
|
+
"a model with an update action",
|
22
|
+
"20332458-c1fe-412f-bcb8-01622f04a35d",
|
23
|
+
middle_name: "Beardsly"
|
24
|
+
)
|
25
|
+
end
|
@@ -0,0 +1,93 @@
|
|
1
|
+
require "spec_helper"
|
2
|
+
|
3
|
+
describe Namely::ResourceGateway do
|
4
|
+
def gateway
|
5
|
+
@gateway ||= Namely::ResourceGateway.new(
|
6
|
+
access_token: Namely.configuration.access_token,
|
7
|
+
endpoint: "widgets",
|
8
|
+
resource_name: "widgets",
|
9
|
+
subdomain: Namely.configuration.subdomain
|
10
|
+
)
|
11
|
+
end
|
12
|
+
|
13
|
+
def valid_id
|
14
|
+
"this-is-a-valid-id"
|
15
|
+
end
|
16
|
+
|
17
|
+
def invalid_id
|
18
|
+
"this-is-not-a-valid-id"
|
19
|
+
end
|
20
|
+
|
21
|
+
describe "#json_index" do
|
22
|
+
it "returns the parsed JSON representation of #index" do
|
23
|
+
stub_request(
|
24
|
+
:get,
|
25
|
+
"https://#{Namely.configuration.subdomain}.namely.com/api/v1/widgets"
|
26
|
+
).with(
|
27
|
+
query: {
|
28
|
+
access_token: Namely.configuration.access_token,
|
29
|
+
limit: :all
|
30
|
+
}
|
31
|
+
).to_return(
|
32
|
+
body: "{\"widgets\": [\"woo!\"]}",
|
33
|
+
status: 200
|
34
|
+
)
|
35
|
+
|
36
|
+
expect(gateway.json_index).to eq ["woo!"]
|
37
|
+
end
|
38
|
+
end
|
39
|
+
|
40
|
+
describe "#json_show" do
|
41
|
+
it "returns the parsed JSON representation of #show" do
|
42
|
+
stub_request(
|
43
|
+
:get,
|
44
|
+
"https://#{Namely.configuration.subdomain}.namely.com/api/v1/widgets/#{valid_id}"
|
45
|
+
).with(
|
46
|
+
query: {
|
47
|
+
access_token: Namely.configuration.access_token
|
48
|
+
}
|
49
|
+
).to_return(
|
50
|
+
body: "{\"widgets\": [{\"name\": \"wilbur\", \"favorite_color\": \"chartreuse\"}]}",
|
51
|
+
status: 200
|
52
|
+
)
|
53
|
+
|
54
|
+
widget = gateway.json_show(valid_id)
|
55
|
+
|
56
|
+
expect(widget["name"]).to eq "wilbur"
|
57
|
+
expect(widget["favorite_color"]).to eq "chartreuse"
|
58
|
+
end
|
59
|
+
end
|
60
|
+
|
61
|
+
describe "#show_head" do
|
62
|
+
it "returns an empty response if it succeeds" do
|
63
|
+
stub_request(
|
64
|
+
:head,
|
65
|
+
"https://#{Namely.configuration.subdomain}.namely.com/api/v1/widgets/#{valid_id}"
|
66
|
+
).with(
|
67
|
+
query: {
|
68
|
+
access_token: Namely.configuration.access_token
|
69
|
+
}
|
70
|
+
).to_return(
|
71
|
+
body: "",
|
72
|
+
status: 200
|
73
|
+
)
|
74
|
+
|
75
|
+
expect(gateway.show_head(valid_id)).to be_empty
|
76
|
+
end
|
77
|
+
|
78
|
+
it "raises a RestClient::ResourceNotFound error if it fails" do
|
79
|
+
stub_request(
|
80
|
+
:head,
|
81
|
+
"https://#{Namely.configuration.subdomain}.namely.com/api/v1/widgets/#{invalid_id}"
|
82
|
+
).with(
|
83
|
+
query: {
|
84
|
+
access_token: Namely.configuration.access_token
|
85
|
+
}
|
86
|
+
).to_return(
|
87
|
+
status: 404
|
88
|
+
)
|
89
|
+
|
90
|
+
expect { gateway.show_head(invalid_id) }.to raise_error RestClient::ResourceNotFound
|
91
|
+
end
|
92
|
+
end
|
93
|
+
end
|
@@ -0,0 +1,24 @@
|
|
1
|
+
shared_examples_for "a model with a create action" do |model_attributes|
|
2
|
+
def invalid_attributes
|
3
|
+
{}
|
4
|
+
end
|
5
|
+
|
6
|
+
describe ".create" do
|
7
|
+
it "creates a model based on a hash of attributes" do
|
8
|
+
model = nil
|
9
|
+
|
10
|
+
VCR.use_cassette("#{classname}_create") do
|
11
|
+
model = described_class.create!(model_attributes)
|
12
|
+
end
|
13
|
+
|
14
|
+
expect(model).to respond_to :id
|
15
|
+
expect(model.id).not_to be_empty
|
16
|
+
end
|
17
|
+
|
18
|
+
it "raises a FailedRequestError when the create action fails" do
|
19
|
+
VCR.use_cassette("#{classname}_create_failed") do
|
20
|
+
expect { described_class.create!(invalid_attributes) }.to raise_error Namely::FailedRequestError
|
21
|
+
end
|
22
|
+
end
|
23
|
+
end
|
24
|
+
end
|
@@ -0,0 +1,38 @@
|
|
1
|
+
shared_examples_for "a model with a show action" do |model_attributes|
|
2
|
+
def invalid_id
|
3
|
+
"this-is-almost-certainly-not-the-id-of-any-model"
|
4
|
+
end
|
5
|
+
|
6
|
+
describe ".find" do
|
7
|
+
it "finds a model by its unique id" do
|
8
|
+
VCR.use_cassette("#{classname}_show") do
|
9
|
+
object = described_class.find(model_attributes[:id])
|
10
|
+
|
11
|
+
expect(object).to be_a described_class
|
12
|
+
model_attributes.each do |method, value|
|
13
|
+
expect(object.public_send(method)).to eq value
|
14
|
+
end
|
15
|
+
end
|
16
|
+
end
|
17
|
+
|
18
|
+
it "raises an error if that model can't be found" do
|
19
|
+
VCR.use_cassette("#{classname}_show_missing") do
|
20
|
+
expect { described_class.find(invalid_id) }.to raise_error Namely::NoSuchModelError
|
21
|
+
end
|
22
|
+
end
|
23
|
+
end
|
24
|
+
|
25
|
+
describe ".exists?" do
|
26
|
+
it "returns true if a model exists" do
|
27
|
+
VCR.use_cassette("#{classname}_head") do
|
28
|
+
expect(described_class.exists?(model_attributes[:id])).to eq true
|
29
|
+
end
|
30
|
+
end
|
31
|
+
|
32
|
+
it "returns false if a model doesn't exist" do
|
33
|
+
VCR.use_cassette("#{classname}_head_missing") do
|
34
|
+
expect(described_class.exists?(invalid_id)).to eq false
|
35
|
+
end
|
36
|
+
end
|
37
|
+
end
|
38
|
+
end
|
@@ -0,0 +1,17 @@
|
|
1
|
+
shared_examples_for "a model with an index action" do |instance_methods = []|
|
2
|
+
describe ".all" do
|
3
|
+
it "returns every model" do
|
4
|
+
VCR.use_cassette("#{classname}_index") do
|
5
|
+
objects = described_class.all
|
6
|
+
|
7
|
+
expect(objects).not_to be_empty
|
8
|
+
objects.each do |object|
|
9
|
+
expect(object).to be_a described_class
|
10
|
+
instance_methods.each do |instance_method|
|
11
|
+
expect(object).to respond_to instance_method
|
12
|
+
end
|
13
|
+
end
|
14
|
+
end
|
15
|
+
end
|
16
|
+
end
|
17
|
+
end
|
@@ -0,0 +1,37 @@
|
|
1
|
+
shared_examples_for "a model with an update action" do |valid_id, changes|
|
2
|
+
describe "#update" do
|
3
|
+
it "updates an existing object" do
|
4
|
+
model = nil
|
5
|
+
original_values = nil
|
6
|
+
|
7
|
+
VCR.use_cassette("#{classname}_show") do
|
8
|
+
model = described_class.find(valid_id)
|
9
|
+
end
|
10
|
+
|
11
|
+
changes.each do |attribute, value|
|
12
|
+
expect(model[attribute]).not_to eq value
|
13
|
+
end
|
14
|
+
|
15
|
+
original_values = model.to_h.select { |attribute, _| changes.keys.include?(attribute) }
|
16
|
+
|
17
|
+
VCR.use_cassette("#{classname}_update") do
|
18
|
+
model.update(changes)
|
19
|
+
end
|
20
|
+
|
21
|
+
VCR.use_cassette("#{classname}_show_updated") do
|
22
|
+
model = described_class.find(valid_id)
|
23
|
+
end
|
24
|
+
changes.each do |attribute, value|
|
25
|
+
expect(model[attribute]).to eq value
|
26
|
+
end
|
27
|
+
|
28
|
+
revert_changes(model, original_values)
|
29
|
+
end
|
30
|
+
end
|
31
|
+
|
32
|
+
def revert_changes(model, original_values)
|
33
|
+
VCR.use_cassette("#{classname}_update_revert") do
|
34
|
+
model.update(original_values)
|
35
|
+
end
|
36
|
+
end
|
37
|
+
end
|
data/spec/spec_helper.rb
ADDED
@@ -0,0 +1,49 @@
|
|
1
|
+
$LOAD_PATH.unshift(File.dirname(__FILE__))
|
2
|
+
$LOAD_PATH.unshift(File.join(File.dirname(__FILE__), "..", "lib"))
|
3
|
+
|
4
|
+
Dir[File.join(File.dirname(__FILE__), "shared_examples", "*")].each { |f| require f }
|
5
|
+
|
6
|
+
require "namely"
|
7
|
+
require "dotenv"
|
8
|
+
require "vcr"
|
9
|
+
require "webmock/rspec"
|
10
|
+
|
11
|
+
Dotenv.load
|
12
|
+
|
13
|
+
VCR.configure do |config|
|
14
|
+
config.cassette_library_dir = "spec/fixtures/vcr_cassettes"
|
15
|
+
config.hook_into :webmock
|
16
|
+
|
17
|
+
environment_variables = [
|
18
|
+
"AUTH_CODE",
|
19
|
+
"CLIENT_ID",
|
20
|
+
"CLIENT_REDIRECT_URI",
|
21
|
+
"CLIENT_SECRET",
|
22
|
+
"TEST_ACCESS_TOKEN",
|
23
|
+
"TEST_REFRESH_TOKEN",
|
24
|
+
"TEST_SUBDOMAIN",
|
25
|
+
]
|
26
|
+
|
27
|
+
environment_variables.each do |env_var|
|
28
|
+
config.filter_sensitive_data("<#{env_var}>") do
|
29
|
+
ENV.fetch(env_var)
|
30
|
+
end
|
31
|
+
end
|
32
|
+
end
|
33
|
+
|
34
|
+
def classname
|
35
|
+
described_class.name.split("::").last.downcase
|
36
|
+
end
|
37
|
+
|
38
|
+
def set_configuration!
|
39
|
+
Namely.configure do |config|
|
40
|
+
config.access_token = ENV.fetch("TEST_ACCESS_TOKEN")
|
41
|
+
config.subdomain = ENV.fetch("TEST_SUBDOMAIN")
|
42
|
+
end
|
43
|
+
end
|
44
|
+
|
45
|
+
def unset_configuration!
|
46
|
+
Namely.configuration = nil
|
47
|
+
end
|
48
|
+
|
49
|
+
set_configuration!
|
metadata
ADDED
@@ -0,0 +1,280 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: namely
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.0.1
|
5
|
+
platform: ruby
|
6
|
+
authors:
|
7
|
+
- Harry Schwartz
|
8
|
+
autorequire:
|
9
|
+
bindir: bin
|
10
|
+
cert_chain: []
|
11
|
+
date: 2014-11-05 00:00:00.000000000 Z
|
12
|
+
dependencies:
|
13
|
+
- !ruby/object:Gem::Dependency
|
14
|
+
name: backports
|
15
|
+
requirement: !ruby/object:Gem::Requirement
|
16
|
+
requirements:
|
17
|
+
- - ">="
|
18
|
+
- !ruby/object:Gem::Version
|
19
|
+
version: '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'
|
27
|
+
- !ruby/object:Gem::Dependency
|
28
|
+
name: rest_client
|
29
|
+
requirement: !ruby/object:Gem::Requirement
|
30
|
+
requirements:
|
31
|
+
- - ">="
|
32
|
+
- !ruby/object:Gem::Version
|
33
|
+
version: '0'
|
34
|
+
type: :runtime
|
35
|
+
prerelease: false
|
36
|
+
version_requirements: !ruby/object:Gem::Requirement
|
37
|
+
requirements:
|
38
|
+
- - ">="
|
39
|
+
- !ruby/object:Gem::Version
|
40
|
+
version: '0'
|
41
|
+
- !ruby/object:Gem::Dependency
|
42
|
+
name: bundler
|
43
|
+
requirement: !ruby/object:Gem::Requirement
|
44
|
+
requirements:
|
45
|
+
- - "~>"
|
46
|
+
- !ruby/object:Gem::Version
|
47
|
+
version: '1.7'
|
48
|
+
type: :development
|
49
|
+
prerelease: false
|
50
|
+
version_requirements: !ruby/object:Gem::Requirement
|
51
|
+
requirements:
|
52
|
+
- - "~>"
|
53
|
+
- !ruby/object:Gem::Version
|
54
|
+
version: '1.7'
|
55
|
+
- !ruby/object:Gem::Dependency
|
56
|
+
name: dotenv
|
57
|
+
requirement: !ruby/object:Gem::Requirement
|
58
|
+
requirements:
|
59
|
+
- - ">="
|
60
|
+
- !ruby/object:Gem::Version
|
61
|
+
version: '0'
|
62
|
+
type: :development
|
63
|
+
prerelease: false
|
64
|
+
version_requirements: !ruby/object:Gem::Requirement
|
65
|
+
requirements:
|
66
|
+
- - ">="
|
67
|
+
- !ruby/object:Gem::Version
|
68
|
+
version: '0'
|
69
|
+
- !ruby/object:Gem::Dependency
|
70
|
+
name: rake
|
71
|
+
requirement: !ruby/object:Gem::Requirement
|
72
|
+
requirements:
|
73
|
+
- - "~>"
|
74
|
+
- !ruby/object:Gem::Version
|
75
|
+
version: '10.0'
|
76
|
+
type: :development
|
77
|
+
prerelease: false
|
78
|
+
version_requirements: !ruby/object:Gem::Requirement
|
79
|
+
requirements:
|
80
|
+
- - "~>"
|
81
|
+
- !ruby/object:Gem::Version
|
82
|
+
version: '10.0'
|
83
|
+
- !ruby/object:Gem::Dependency
|
84
|
+
name: rspec
|
85
|
+
requirement: !ruby/object:Gem::Requirement
|
86
|
+
requirements:
|
87
|
+
- - ">="
|
88
|
+
- !ruby/object:Gem::Version
|
89
|
+
version: '0'
|
90
|
+
type: :development
|
91
|
+
prerelease: false
|
92
|
+
version_requirements: !ruby/object:Gem::Requirement
|
93
|
+
requirements:
|
94
|
+
- - ">="
|
95
|
+
- !ruby/object:Gem::Version
|
96
|
+
version: '0'
|
97
|
+
- !ruby/object:Gem::Dependency
|
98
|
+
name: vcr
|
99
|
+
requirement: !ruby/object:Gem::Requirement
|
100
|
+
requirements:
|
101
|
+
- - ">="
|
102
|
+
- !ruby/object:Gem::Version
|
103
|
+
version: '0'
|
104
|
+
type: :development
|
105
|
+
prerelease: false
|
106
|
+
version_requirements: !ruby/object:Gem::Requirement
|
107
|
+
requirements:
|
108
|
+
- - ">="
|
109
|
+
- !ruby/object:Gem::Version
|
110
|
+
version: '0'
|
111
|
+
- !ruby/object:Gem::Dependency
|
112
|
+
name: webmock
|
113
|
+
requirement: !ruby/object:Gem::Requirement
|
114
|
+
requirements:
|
115
|
+
- - ">="
|
116
|
+
- !ruby/object:Gem::Version
|
117
|
+
version: '0'
|
118
|
+
type: :development
|
119
|
+
prerelease: false
|
120
|
+
version_requirements: !ruby/object:Gem::Requirement
|
121
|
+
requirements:
|
122
|
+
- - ">="
|
123
|
+
- !ruby/object:Gem::Version
|
124
|
+
version: '0'
|
125
|
+
- !ruby/object:Gem::Dependency
|
126
|
+
name: yard
|
127
|
+
requirement: !ruby/object:Gem::Requirement
|
128
|
+
requirements:
|
129
|
+
- - ">="
|
130
|
+
- !ruby/object:Gem::Version
|
131
|
+
version: '0'
|
132
|
+
type: :development
|
133
|
+
prerelease: false
|
134
|
+
version_requirements: !ruby/object:Gem::Requirement
|
135
|
+
requirements:
|
136
|
+
- - ">="
|
137
|
+
- !ruby/object:Gem::Version
|
138
|
+
version: '0'
|
139
|
+
description:
|
140
|
+
email:
|
141
|
+
- harry@thoughtbot.com
|
142
|
+
executables: []
|
143
|
+
extensions: []
|
144
|
+
extra_rdoc_files: []
|
145
|
+
files:
|
146
|
+
- ".gitignore"
|
147
|
+
- ".travis.yml"
|
148
|
+
- Gemfile
|
149
|
+
- Gemfile.lock
|
150
|
+
- LICENSE
|
151
|
+
- LICENSE.txt
|
152
|
+
- README.md
|
153
|
+
- Rakefile
|
154
|
+
- lib/namely.rb
|
155
|
+
- lib/namely/authenticator.rb
|
156
|
+
- lib/namely/country.rb
|
157
|
+
- lib/namely/currency_type.rb
|
158
|
+
- lib/namely/event.rb
|
159
|
+
- lib/namely/exceptions.rb
|
160
|
+
- lib/namely/field.rb
|
161
|
+
- lib/namely/job_tier.rb
|
162
|
+
- lib/namely/profile.rb
|
163
|
+
- lib/namely/report.rb
|
164
|
+
- lib/namely/resource_gateway.rb
|
165
|
+
- lib/namely/restful_model.rb
|
166
|
+
- lib/namely/version.rb
|
167
|
+
- namely.gemspec
|
168
|
+
- spec/fixtures/vcr_cassettes/country_head.yml
|
169
|
+
- spec/fixtures/vcr_cassettes/country_head_missing.yml
|
170
|
+
- spec/fixtures/vcr_cassettes/country_index.yml
|
171
|
+
- spec/fixtures/vcr_cassettes/country_show.yml
|
172
|
+
- spec/fixtures/vcr_cassettes/country_show_missing.yml
|
173
|
+
- spec/fixtures/vcr_cassettes/currencytype_index.yml
|
174
|
+
- spec/fixtures/vcr_cassettes/event_head.yml
|
175
|
+
- spec/fixtures/vcr_cassettes/event_head_missing.yml
|
176
|
+
- spec/fixtures/vcr_cassettes/event_index.yml
|
177
|
+
- spec/fixtures/vcr_cassettes/event_show.yml
|
178
|
+
- spec/fixtures/vcr_cassettes/event_show_missing.yml
|
179
|
+
- spec/fixtures/vcr_cassettes/field_index.yml
|
180
|
+
- spec/fixtures/vcr_cassettes/jobtier_index.yml
|
181
|
+
- spec/fixtures/vcr_cassettes/profile_create.yml
|
182
|
+
- spec/fixtures/vcr_cassettes/profile_create_failed.yml
|
183
|
+
- spec/fixtures/vcr_cassettes/profile_head.yml
|
184
|
+
- spec/fixtures/vcr_cassettes/profile_head_missing.yml
|
185
|
+
- spec/fixtures/vcr_cassettes/profile_index.yml
|
186
|
+
- spec/fixtures/vcr_cassettes/profile_show.yml
|
187
|
+
- spec/fixtures/vcr_cassettes/profile_show_missing.yml
|
188
|
+
- spec/fixtures/vcr_cassettes/profile_show_updated.yml
|
189
|
+
- spec/fixtures/vcr_cassettes/profile_update.yml
|
190
|
+
- spec/fixtures/vcr_cassettes/profile_update_revert.yml
|
191
|
+
- spec/fixtures/vcr_cassettes/report_head.yml
|
192
|
+
- spec/fixtures/vcr_cassettes/report_head_missing.yml
|
193
|
+
- spec/fixtures/vcr_cassettes/report_show.yml
|
194
|
+
- spec/fixtures/vcr_cassettes/report_show_missing.yml
|
195
|
+
- spec/fixtures/vcr_cassettes/token.yml
|
196
|
+
- spec/fixtures/vcr_cassettes/token_refresh.yml
|
197
|
+
- spec/namely/authenticator_spec.rb
|
198
|
+
- spec/namely/configuration_spec.rb
|
199
|
+
- spec/namely/country_spec.rb
|
200
|
+
- spec/namely/currency_type_spec.rb
|
201
|
+
- spec/namely/event_spec.rb
|
202
|
+
- spec/namely/field_spec.rb
|
203
|
+
- spec/namely/job_tier_spec.rb
|
204
|
+
- spec/namely/profile_spec.rb
|
205
|
+
- spec/namely/report_spec.rb
|
206
|
+
- spec/namely/resource_gateway_spec.rb
|
207
|
+
- spec/shared_examples/a_model_with_a_create_action.rb
|
208
|
+
- spec/shared_examples/a_model_with_a_show_action.rb
|
209
|
+
- spec/shared_examples/a_model_with_an_index_action.rb
|
210
|
+
- spec/shared_examples/a_model_with_an_update_action.rb
|
211
|
+
- spec/spec_helper.rb
|
212
|
+
homepage: https://github.com/namely/ruby-client
|
213
|
+
licenses:
|
214
|
+
- MIT
|
215
|
+
metadata: {}
|
216
|
+
post_install_message:
|
217
|
+
rdoc_options: []
|
218
|
+
require_paths:
|
219
|
+
- lib
|
220
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
221
|
+
requirements:
|
222
|
+
- - ">="
|
223
|
+
- !ruby/object:Gem::Version
|
224
|
+
version: '0'
|
225
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
226
|
+
requirements:
|
227
|
+
- - ">="
|
228
|
+
- !ruby/object:Gem::Version
|
229
|
+
version: '0'
|
230
|
+
requirements: []
|
231
|
+
rubyforge_project:
|
232
|
+
rubygems_version: 2.2.2
|
233
|
+
signing_key:
|
234
|
+
specification_version: 4
|
235
|
+
summary: Wraps the Namely HTTP API in lovely Ruby.
|
236
|
+
test_files:
|
237
|
+
- spec/fixtures/vcr_cassettes/country_head.yml
|
238
|
+
- spec/fixtures/vcr_cassettes/country_head_missing.yml
|
239
|
+
- spec/fixtures/vcr_cassettes/country_index.yml
|
240
|
+
- spec/fixtures/vcr_cassettes/country_show.yml
|
241
|
+
- spec/fixtures/vcr_cassettes/country_show_missing.yml
|
242
|
+
- spec/fixtures/vcr_cassettes/currencytype_index.yml
|
243
|
+
- spec/fixtures/vcr_cassettes/event_head.yml
|
244
|
+
- spec/fixtures/vcr_cassettes/event_head_missing.yml
|
245
|
+
- spec/fixtures/vcr_cassettes/event_index.yml
|
246
|
+
- spec/fixtures/vcr_cassettes/event_show.yml
|
247
|
+
- spec/fixtures/vcr_cassettes/event_show_missing.yml
|
248
|
+
- spec/fixtures/vcr_cassettes/field_index.yml
|
249
|
+
- spec/fixtures/vcr_cassettes/jobtier_index.yml
|
250
|
+
- spec/fixtures/vcr_cassettes/profile_create.yml
|
251
|
+
- spec/fixtures/vcr_cassettes/profile_create_failed.yml
|
252
|
+
- spec/fixtures/vcr_cassettes/profile_head.yml
|
253
|
+
- spec/fixtures/vcr_cassettes/profile_head_missing.yml
|
254
|
+
- spec/fixtures/vcr_cassettes/profile_index.yml
|
255
|
+
- spec/fixtures/vcr_cassettes/profile_show.yml
|
256
|
+
- spec/fixtures/vcr_cassettes/profile_show_missing.yml
|
257
|
+
- spec/fixtures/vcr_cassettes/profile_show_updated.yml
|
258
|
+
- spec/fixtures/vcr_cassettes/profile_update.yml
|
259
|
+
- spec/fixtures/vcr_cassettes/profile_update_revert.yml
|
260
|
+
- spec/fixtures/vcr_cassettes/report_head.yml
|
261
|
+
- spec/fixtures/vcr_cassettes/report_head_missing.yml
|
262
|
+
- spec/fixtures/vcr_cassettes/report_show.yml
|
263
|
+
- spec/fixtures/vcr_cassettes/report_show_missing.yml
|
264
|
+
- spec/fixtures/vcr_cassettes/token.yml
|
265
|
+
- spec/fixtures/vcr_cassettes/token_refresh.yml
|
266
|
+
- spec/namely/authenticator_spec.rb
|
267
|
+
- spec/namely/configuration_spec.rb
|
268
|
+
- spec/namely/country_spec.rb
|
269
|
+
- spec/namely/currency_type_spec.rb
|
270
|
+
- spec/namely/event_spec.rb
|
271
|
+
- spec/namely/field_spec.rb
|
272
|
+
- spec/namely/job_tier_spec.rb
|
273
|
+
- spec/namely/profile_spec.rb
|
274
|
+
- spec/namely/report_spec.rb
|
275
|
+
- spec/namely/resource_gateway_spec.rb
|
276
|
+
- spec/shared_examples/a_model_with_a_create_action.rb
|
277
|
+
- spec/shared_examples/a_model_with_a_show_action.rb
|
278
|
+
- spec/shared_examples/a_model_with_an_index_action.rb
|
279
|
+
- spec/shared_examples/a_model_with_an_update_action.rb
|
280
|
+
- spec/spec_helper.rb
|