morpheus 0.4.0 → 0.5.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/.rspec +1 -1
- data/CHANGELOG.md +17 -0
- data/Gemfile +1 -1
- data/lib/morpheus.rb +3 -23
- data/lib/morpheus/base.rb +11 -11
- data/lib/morpheus/client.rb +10 -0
- data/lib/morpheus/client/associations.rb +6 -6
- data/lib/morpheus/client/cached_request_formatter.rb +20 -0
- data/lib/morpheus/client/log_subscriber.rb +2 -28
- data/lib/morpheus/client/railtie.rb +4 -4
- data/lib/morpheus/client/request_formatter.rb +50 -0
- data/lib/morpheus/client/uncached_request_formatter.rb +40 -0
- data/lib/morpheus/configuration.rb +30 -9
- data/lib/morpheus/mixins.rb +16 -0
- data/lib/morpheus/mixins/associations.rb +39 -37
- data/lib/morpheus/mixins/associations/association.rb +112 -0
- data/lib/morpheus/mixins/associations/belongs_to_association.rb +47 -0
- data/lib/morpheus/mixins/associations/has_many_association.rb +72 -0
- data/lib/morpheus/mixins/associations/has_one_association.rb +48 -0
- data/lib/morpheus/mixins/attributes.rb +97 -95
- data/lib/morpheus/mixins/conversion.rb +16 -14
- data/lib/morpheus/mixins/filtering.rb +13 -11
- data/lib/morpheus/mixins/finders.rb +47 -45
- data/lib/morpheus/mixins/introspection.rb +15 -13
- data/lib/morpheus/mixins/persistence.rb +32 -30
- data/lib/morpheus/mixins/reflections.rb +17 -15
- data/lib/morpheus/mixins/request_handling.rb +27 -25
- data/lib/morpheus/mixins/response_parsing.rb +10 -8
- data/lib/morpheus/mixins/url_support.rb +27 -25
- data/lib/morpheus/reflection.rb +5 -2
- data/lib/morpheus/type_caster.rb +1 -1
- data/lib/morpheus/version.rb +1 -1
- data/morpheus.gemspec +2 -2
- data/spec/dummy/app/resources/book.rb +1 -1
- data/spec/morpheus/base_spec.rb +35 -35
- data/spec/morpheus/client/cached_request_formatter_spec.rb +28 -0
- data/spec/morpheus/client/log_subscriber_spec.rb +53 -10
- data/spec/morpheus/client/request_formatter_spec.rb +5 -0
- data/spec/morpheus/client/uncached_request_formatter_spec.rb +29 -0
- data/spec/morpheus/configuration_spec.rb +49 -11
- data/spec/morpheus/{associations → mixins/associations}/association_spec.rb +1 -1
- data/spec/morpheus/{associations → mixins/associations}/belongs_to_association_spec.rb +1 -1
- data/spec/morpheus/{associations → mixins/associations}/has_many_association_spec.rb +1 -1
- data/spec/morpheus/{associations → mixins/associations}/has_one_association_spec.rb +1 -1
- data/spec/morpheus/mixins/associations_spec.rb +1 -1
- data/spec/morpheus/mixins/attributes_spec.rb +27 -6
- data/spec/morpheus/mixins/conversion_spec.rb +1 -1
- data/spec/morpheus/mixins/filtering_spec.rb +2 -2
- data/spec/morpheus/mixins/finders_spec.rb +1 -1
- data/spec/morpheus/mixins/introspection_spec.rb +1 -1
- data/spec/morpheus/mixins/persistence_spec.rb +1 -1
- data/spec/morpheus/mixins/reflections_spec.rb +1 -1
- data/spec/morpheus/mixins/request_handling_spec.rb +2 -2
- data/spec/morpheus/mixins/response_parsing_spec.rb +2 -2
- data/spec/morpheus/mixins/url_support_spec.rb +2 -2
- data/spec/morpheus/response_parser_spec.rb +5 -1
- data/spec/regressions/sorting_resources_spec.rb +119 -0
- data/spec/spec_helper.rb +3 -2
- metadata +159 -87
- data/lib/morpheus/associations/association.rb +0 -110
- data/lib/morpheus/associations/belongs_to_association.rb +0 -45
- data/lib/morpheus/associations/has_many_association.rb +0 -70
- data/lib/morpheus/associations/has_one_association.rb +0 -46
@@ -1,6 +1,6 @@
|
|
1
1
|
require 'spec_helper'
|
2
2
|
|
3
|
-
describe Morpheus::Attributes do
|
3
|
+
describe Morpheus::Mixins::Attributes do
|
4
4
|
let(:book) { Book.new }
|
5
5
|
|
6
6
|
describe '.property' do
|
@@ -23,11 +23,23 @@ describe Morpheus::Attributes do
|
|
23
23
|
end
|
24
24
|
|
25
25
|
describe '.typecast_attributes' do
|
26
|
-
|
26
|
+
it 'returns the attributes that will be typecasted' do
|
27
|
+
Book.typecast_attributes.should eql(HashWithIndifferentAccess.new({ :id => nil, :title => :string, :author_id => nil }))
|
28
|
+
end
|
27
29
|
end
|
28
30
|
|
29
31
|
describe '.attribute_defined?' do
|
30
|
-
|
32
|
+
context 'when the attribute exists as one of the default attributes' do
|
33
|
+
it 'returns true' do
|
34
|
+
Book.attribute_defined?(:title).should be_true
|
35
|
+
end
|
36
|
+
end
|
37
|
+
|
38
|
+
context 'when the attribute does not exist as one of teh default attributes' do
|
39
|
+
it 'returns false' do
|
40
|
+
Book.attribute_defined?(:publisher).should be_false
|
41
|
+
end
|
42
|
+
end
|
31
43
|
end
|
32
44
|
|
33
45
|
describe '#attributes' do
|
@@ -37,15 +49,24 @@ describe Morpheus::Attributes do
|
|
37
49
|
end
|
38
50
|
|
39
51
|
describe '#read_attribute_for_validation' do
|
40
|
-
|
52
|
+
before { book.title = 'Horton Hears a Who' }
|
53
|
+
|
54
|
+
it 'returns the value of the attribute' do
|
55
|
+
book.read_attribute_for_validation(:title).should eql('Horton Hears a Who')
|
56
|
+
end
|
41
57
|
end
|
42
58
|
|
43
59
|
describe '#typecast' do
|
44
|
-
|
60
|
+
it 'delegates to TypeCaster' do
|
61
|
+
Morpheus::TypeCaster.should_receive(:cast).with('Horton Hears a Who', :string)
|
62
|
+
book.typecast(:title, 'Horton Hears a Who')
|
63
|
+
end
|
45
64
|
end
|
46
65
|
|
47
66
|
describe '#attributes_without_basic_attributes' do
|
48
|
-
|
67
|
+
it 'returns a hash with basic attributes and associations removed' do
|
68
|
+
book.attributes_without_basic_attributes.should eql(HashWithIndifferentAccess.new(:title => nil, :author_id => nil))
|
69
|
+
end
|
49
70
|
end
|
50
71
|
|
51
72
|
describe "#update_attribute" do
|
@@ -1,6 +1,6 @@
|
|
1
1
|
require 'spec_helper'
|
2
2
|
|
3
|
-
describe Morpheus::RequestHandling do
|
3
|
+
describe Morpheus::Mixins::RequestHandling do
|
4
4
|
let(:path) { mock }
|
5
5
|
let(:params) { mock }
|
6
6
|
let(:metadata) { mock }
|
@@ -8,7 +8,7 @@ describe Morpheus::RequestHandling do
|
|
8
8
|
let(:block) { lambda {} }
|
9
9
|
let(:klass) do
|
10
10
|
Class.new do
|
11
|
-
include Morpheus::RequestHandling
|
11
|
+
include Morpheus::Mixins::RequestHandling
|
12
12
|
end
|
13
13
|
end
|
14
14
|
|
@@ -1,9 +1,9 @@
|
|
1
1
|
require 'spec_helper'
|
2
2
|
|
3
|
-
describe Morpheus::ResponseParsing do
|
3
|
+
describe Morpheus::Mixins::ResponseParsing do
|
4
4
|
let(:model) do
|
5
5
|
Class.new do
|
6
|
-
include Morpheus::ResponseParsing
|
6
|
+
include Morpheus::Mixins::ResponseParsing
|
7
7
|
end
|
8
8
|
end
|
9
9
|
let(:request) { mock }
|
@@ -215,7 +215,11 @@ describe Morpheus::ResponseParser do
|
|
215
215
|
|
216
216
|
module Handler; end
|
217
217
|
|
218
|
-
before
|
218
|
+
before do
|
219
|
+
@original_parse_error_handler = Morpheus::Configuration.parse_error_handler
|
220
|
+
Morpheus::Configuration.parse_error_handler = Handler
|
221
|
+
end
|
222
|
+
after { Morpheus::Configuration.parse_error_handler = @original_parse_error_handler }
|
219
223
|
|
220
224
|
it 'calls #handle on a handler instance, passing the offending string' do
|
221
225
|
Handler.should_receive(:handle).with(offending_string)
|
@@ -0,0 +1,119 @@
|
|
1
|
+
require 'spec_helper'
|
2
|
+
|
3
|
+
# We get this error when trying to sort objects returned from a service using Morpheus.
|
4
|
+
# ArgumentError: comparison of Student with Student failed
|
5
|
+
# /morpheus-0.3.6/lib/morpheus/associations/association.rb:104
|
6
|
+
#
|
7
|
+
# Usage:
|
8
|
+
# @students = @course.students.sort { |a,b| a.first_name <=> b.first_name }
|
9
|
+
#
|
10
|
+
# Top of backtrace:
|
11
|
+
# /morpheus-0.3.6/lib/morpheus/associations/association.rb:104:in "sort"
|
12
|
+
# /morpheus-0.3.6/lib/morpheus/associations/association.rb:104:in "send"
|
13
|
+
# /morpheus-0.3.6/lib/morpheus/associations/association.rb:104:in "method_missing"
|
14
|
+
# /app/controllers/courses_and_proctorings_controller.rb:24:in "attendance"
|
15
|
+
# One can assume method missing results in the loading of students, then sort is called on the result, I'm curious if the first_name call is lost or if it is null, self (in this case a Student) is being returned.
|
16
|
+
#
|
17
|
+
# Changing the code to this solved (or at least hid) the issue:
|
18
|
+
# @students = @course.students.sort { |a,b| a.first_name.to_s <=> b.first_name.to_s }
|
19
|
+
|
20
|
+
describe 'Github Issue #2' do
|
21
|
+
context 'when the sort types are all the same' do
|
22
|
+
let(:dogs) { Dog.all }
|
23
|
+
|
24
|
+
before { stub_web! }
|
25
|
+
|
26
|
+
it 'sorts the resources correctly' do
|
27
|
+
dogs.sort { |a,b| a.name <=> b.name }.map(&:id).should == [3, 1, 2]
|
28
|
+
end
|
29
|
+
|
30
|
+
def stub_web!
|
31
|
+
Morpheus::Configuration.hydra.stub(:get, "#{Morpheus::Configuration.host}/dogs").and_return(build_morpheus_response(
|
32
|
+
200,
|
33
|
+
[
|
34
|
+
{
|
35
|
+
:id => 1,
|
36
|
+
:valid => true,
|
37
|
+
:errors => {},
|
38
|
+
:name => 'Fido',
|
39
|
+
:breed => 'Boxer'
|
40
|
+
},
|
41
|
+
{
|
42
|
+
:id => 2,
|
43
|
+
:valid => true,
|
44
|
+
:errors => {},
|
45
|
+
:name => 'Winslow',
|
46
|
+
:breed => 'Corgi'
|
47
|
+
},
|
48
|
+
{
|
49
|
+
:id => 3,
|
50
|
+
:valid => true,
|
51
|
+
:errors => {},
|
52
|
+
:name => 'Daisy',
|
53
|
+
:breed => 'English Bulldog'
|
54
|
+
}
|
55
|
+
]
|
56
|
+
))
|
57
|
+
end
|
58
|
+
end
|
59
|
+
|
60
|
+
context 'when the sort types are different' do
|
61
|
+
let(:dogs) { Dog.all }
|
62
|
+
|
63
|
+
before { stub_web! }
|
64
|
+
|
65
|
+
it 'raises an ArgumentError' do
|
66
|
+
expect {
|
67
|
+
dogs.sort { |a,b| a.name <=> b.name }
|
68
|
+
}.to raise_error(ArgumentError, /comparison of Dog with Dog failed|block returned nil/)
|
69
|
+
end
|
70
|
+
|
71
|
+
def stub_web!
|
72
|
+
Morpheus::Configuration.hydra.stub(:get, "#{Morpheus::Configuration.host}/dogs").and_return(build_morpheus_response(
|
73
|
+
200,
|
74
|
+
[
|
75
|
+
{
|
76
|
+
:id => 1,
|
77
|
+
:valid => true,
|
78
|
+
:errors => {},
|
79
|
+
:name => 'Fido',
|
80
|
+
:breed => 'Boxer'
|
81
|
+
},
|
82
|
+
{
|
83
|
+
:id => 2,
|
84
|
+
:valid => true,
|
85
|
+
:errors => {},
|
86
|
+
:name => nil,
|
87
|
+
:breed => 'Corgi'
|
88
|
+
},
|
89
|
+
{
|
90
|
+
:id => 3,
|
91
|
+
:valid => true,
|
92
|
+
:errors => {},
|
93
|
+
:name => 'Daisy',
|
94
|
+
:breed => 'English Bulldog'
|
95
|
+
}
|
96
|
+
]
|
97
|
+
))
|
98
|
+
end
|
99
|
+
end
|
100
|
+
|
101
|
+
context 'with any other type of Object' do
|
102
|
+
class Thing
|
103
|
+
attr_reader :name
|
104
|
+
def initialize(name = nil)
|
105
|
+
@name = name
|
106
|
+
end
|
107
|
+
end
|
108
|
+
|
109
|
+
let(:thing) { Thing.new('Thingy') }
|
110
|
+
let(:another_thing) { Thing.new }
|
111
|
+
let(:things) { [thing, another_thing] }
|
112
|
+
|
113
|
+
it 'raises an ArgumentError' do
|
114
|
+
expect {
|
115
|
+
things.sort { |a,b| a.name <=> b.name }
|
116
|
+
}.to raise_error(ArgumentError, /comparison of Thing with Thing failed|block returned nil/)
|
117
|
+
end
|
118
|
+
end
|
119
|
+
end
|
data/spec/spec_helper.rb
CHANGED
@@ -20,8 +20,9 @@ Rails.backtrace_cleaner.remove_silencers!
|
|
20
20
|
|
21
21
|
ActiveRecord::Migrator.migrate File.expand_path('../dummy/db/migrate/', __FILE__)
|
22
22
|
|
23
|
-
|
24
|
-
Dir["#{File.dirname(__FILE__)}
|
23
|
+
%w{ support shared regressions }.each do |dir|
|
24
|
+
Dir["#{File.dirname(__FILE__)}/#{dir}/**/*.rb"].each { |f| require f }
|
25
|
+
end
|
25
26
|
|
26
27
|
RSpec.configure do |config|
|
27
28
|
require 'rspec/expectations'
|
metadata
CHANGED
@@ -1,134 +1,189 @@
|
|
1
|
-
--- !ruby/object:Gem::Specification
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
2
|
name: morpheus
|
3
|
-
version: !ruby/object:Gem::Version
|
4
|
-
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
hash: 11
|
5
5
|
prerelease:
|
6
|
+
segments:
|
7
|
+
- 0
|
8
|
+
- 5
|
9
|
+
- 0
|
10
|
+
version: 0.5.0
|
6
11
|
platform: ruby
|
7
|
-
authors:
|
12
|
+
authors:
|
8
13
|
- Ryan Moran
|
9
14
|
autorequire:
|
10
15
|
bindir: bin
|
11
16
|
cert_chain: []
|
12
|
-
|
13
|
-
|
14
|
-
|
17
|
+
|
18
|
+
date: 2012-10-10 00:00:00 Z
|
19
|
+
dependencies:
|
20
|
+
- !ruby/object:Gem::Dependency
|
15
21
|
name: yajl-ruby
|
16
|
-
|
22
|
+
prerelease: false
|
23
|
+
requirement: &id001 !ruby/object:Gem::Requirement
|
17
24
|
none: false
|
18
|
-
requirements:
|
25
|
+
requirements:
|
19
26
|
- - ~>
|
20
|
-
- !ruby/object:Gem::Version
|
27
|
+
- !ruby/object:Gem::Version
|
28
|
+
hash: 19
|
29
|
+
segments:
|
30
|
+
- 1
|
31
|
+
- 1
|
32
|
+
- 0
|
21
33
|
version: 1.1.0
|
22
34
|
type: :runtime
|
23
|
-
|
24
|
-
|
25
|
-
- !ruby/object:Gem::Dependency
|
35
|
+
version_requirements: *id001
|
36
|
+
- !ruby/object:Gem::Dependency
|
26
37
|
name: typhoeus
|
27
|
-
|
38
|
+
prerelease: false
|
39
|
+
requirement: &id002 !ruby/object:Gem::Requirement
|
28
40
|
none: false
|
29
|
-
requirements:
|
41
|
+
requirements:
|
30
42
|
- - ~>
|
31
|
-
- !ruby/object:Gem::Version
|
32
|
-
|
43
|
+
- !ruby/object:Gem::Version
|
44
|
+
hash: 11
|
45
|
+
segments:
|
46
|
+
- 0
|
47
|
+
- 4
|
48
|
+
- 2
|
49
|
+
version: 0.4.2
|
33
50
|
type: :runtime
|
34
|
-
|
35
|
-
|
36
|
-
- !ruby/object:Gem::Dependency
|
51
|
+
version_requirements: *id002
|
52
|
+
- !ruby/object:Gem::Dependency
|
37
53
|
name: activemodel
|
38
|
-
|
54
|
+
prerelease: false
|
55
|
+
requirement: &id003 !ruby/object:Gem::Requirement
|
39
56
|
none: false
|
40
|
-
requirements:
|
41
|
-
- -
|
42
|
-
- !ruby/object:Gem::Version
|
57
|
+
requirements:
|
58
|
+
- - ">="
|
59
|
+
- !ruby/object:Gem::Version
|
60
|
+
hash: 7
|
61
|
+
segments:
|
62
|
+
- 3
|
63
|
+
- 0
|
64
|
+
- 0
|
43
65
|
version: 3.0.0
|
44
66
|
type: :runtime
|
45
|
-
|
46
|
-
|
47
|
-
- !ruby/object:Gem::Dependency
|
67
|
+
version_requirements: *id003
|
68
|
+
- !ruby/object:Gem::Dependency
|
48
69
|
name: activesupport
|
49
|
-
|
70
|
+
prerelease: false
|
71
|
+
requirement: &id004 !ruby/object:Gem::Requirement
|
50
72
|
none: false
|
51
|
-
requirements:
|
52
|
-
- -
|
53
|
-
- !ruby/object:Gem::Version
|
73
|
+
requirements:
|
74
|
+
- - ">="
|
75
|
+
- !ruby/object:Gem::Version
|
76
|
+
hash: 7
|
77
|
+
segments:
|
78
|
+
- 3
|
79
|
+
- 0
|
80
|
+
- 0
|
54
81
|
version: 3.0.0
|
55
82
|
type: :runtime
|
56
|
-
|
57
|
-
|
58
|
-
- !ruby/object:Gem::Dependency
|
83
|
+
version_requirements: *id004
|
84
|
+
- !ruby/object:Gem::Dependency
|
59
85
|
name: i18n
|
60
|
-
|
86
|
+
prerelease: false
|
87
|
+
requirement: &id005 !ruby/object:Gem::Requirement
|
61
88
|
none: false
|
62
|
-
requirements:
|
63
|
-
- -
|
64
|
-
- !ruby/object:Gem::Version
|
89
|
+
requirements:
|
90
|
+
- - ">="
|
91
|
+
- !ruby/object:Gem::Version
|
92
|
+
hash: 11
|
93
|
+
segments:
|
94
|
+
- 0
|
95
|
+
- 5
|
96
|
+
- 0
|
65
97
|
version: 0.5.0
|
66
98
|
type: :runtime
|
67
|
-
|
68
|
-
|
69
|
-
- !ruby/object:Gem::Dependency
|
99
|
+
version_requirements: *id005
|
100
|
+
- !ruby/object:Gem::Dependency
|
70
101
|
name: rails
|
71
|
-
|
102
|
+
prerelease: false
|
103
|
+
requirement: &id006 !ruby/object:Gem::Requirement
|
72
104
|
none: false
|
73
|
-
requirements:
|
74
|
-
- -
|
75
|
-
- !ruby/object:Gem::Version
|
105
|
+
requirements:
|
106
|
+
- - ">="
|
107
|
+
- !ruby/object:Gem::Version
|
108
|
+
hash: 7
|
109
|
+
segments:
|
110
|
+
- 3
|
111
|
+
- 0
|
112
|
+
- 0
|
76
113
|
version: 3.0.0
|
77
114
|
type: :development
|
78
|
-
|
79
|
-
|
80
|
-
- !ruby/object:Gem::Dependency
|
115
|
+
version_requirements: *id006
|
116
|
+
- !ruby/object:Gem::Dependency
|
81
117
|
name: sqlite3
|
82
|
-
|
118
|
+
prerelease: false
|
119
|
+
requirement: &id007 !ruby/object:Gem::Requirement
|
83
120
|
none: false
|
84
|
-
requirements:
|
121
|
+
requirements:
|
85
122
|
- - ~>
|
86
|
-
- !ruby/object:Gem::Version
|
123
|
+
- !ruby/object:Gem::Version
|
124
|
+
hash: 29
|
125
|
+
segments:
|
126
|
+
- 1
|
127
|
+
- 3
|
128
|
+
- 3
|
87
129
|
version: 1.3.3
|
88
130
|
type: :development
|
89
|
-
|
90
|
-
|
91
|
-
- !ruby/object:Gem::Dependency
|
131
|
+
version_requirements: *id007
|
132
|
+
- !ruby/object:Gem::Dependency
|
92
133
|
name: rspec-rails
|
93
|
-
|
134
|
+
prerelease: false
|
135
|
+
requirement: &id008 !ruby/object:Gem::Requirement
|
94
136
|
none: false
|
95
|
-
requirements:
|
137
|
+
requirements:
|
96
138
|
- - ~>
|
97
|
-
- !ruby/object:Gem::Version
|
139
|
+
- !ruby/object:Gem::Version
|
140
|
+
hash: 43
|
141
|
+
segments:
|
142
|
+
- 2
|
143
|
+
- 9
|
144
|
+
- 0
|
98
145
|
version: 2.9.0
|
99
146
|
type: :development
|
100
|
-
|
101
|
-
version_requirements: *70093023807800
|
147
|
+
version_requirements: *id008
|
102
148
|
description: RESTful API Client
|
103
|
-
email:
|
149
|
+
email:
|
104
150
|
- ryan.moran@revolutionprep.com
|
105
151
|
executables: []
|
152
|
+
|
106
153
|
extensions: []
|
154
|
+
|
107
155
|
extra_rdoc_files: []
|
108
|
-
|
156
|
+
|
157
|
+
files:
|
109
158
|
- .autotest
|
110
159
|
- .gitignore
|
111
160
|
- .rspec
|
112
161
|
- .travis.yml
|
162
|
+
- CHANGELOG.md
|
113
163
|
- Gemfile
|
114
164
|
- LICENSE.txt
|
115
165
|
- README.md
|
116
166
|
- Rakefile
|
117
167
|
- lib/ext/typhoeus.rb
|
118
168
|
- lib/morpheus.rb
|
119
|
-
- lib/morpheus/associations/association.rb
|
120
|
-
- lib/morpheus/associations/belongs_to_association.rb
|
121
|
-
- lib/morpheus/associations/has_many_association.rb
|
122
|
-
- lib/morpheus/associations/has_one_association.rb
|
123
169
|
- lib/morpheus/base.rb
|
170
|
+
- lib/morpheus/client.rb
|
124
171
|
- lib/morpheus/client/associations.rb
|
172
|
+
- lib/morpheus/client/cached_request_formatter.rb
|
125
173
|
- lib/morpheus/client/inflections.rb
|
126
174
|
- lib/morpheus/client/log_subscriber.rb
|
127
175
|
- lib/morpheus/client/railtie.rb
|
176
|
+
- lib/morpheus/client/request_formatter.rb
|
177
|
+
- lib/morpheus/client/uncached_request_formatter.rb
|
128
178
|
- lib/morpheus/configuration.rb
|
129
179
|
- lib/morpheus/errors.rb
|
130
180
|
- lib/morpheus/filter.rb
|
181
|
+
- lib/morpheus/mixins.rb
|
131
182
|
- lib/morpheus/mixins/associations.rb
|
183
|
+
- lib/morpheus/mixins/associations/association.rb
|
184
|
+
- lib/morpheus/mixins/associations/belongs_to_association.rb
|
185
|
+
- lib/morpheus/mixins/associations/has_many_association.rb
|
186
|
+
- lib/morpheus/mixins/associations/has_one_association.rb
|
132
187
|
- lib/morpheus/mixins/attributes.rb
|
133
188
|
- lib/morpheus/mixins/conversion.rb
|
134
189
|
- lib/morpheus/mixins/filtering.rb
|
@@ -189,15 +244,18 @@ files:
|
|
189
244
|
- spec/dummy/public/favicon.ico
|
190
245
|
- spec/dummy/public/stylesheets/.gitkeep
|
191
246
|
- spec/dummy/script/rails
|
192
|
-
- spec/morpheus/associations/association_spec.rb
|
193
|
-
- spec/morpheus/associations/belongs_to_association_spec.rb
|
194
|
-
- spec/morpheus/associations/has_many_association_spec.rb
|
195
|
-
- spec/morpheus/associations/has_one_association_spec.rb
|
196
247
|
- spec/morpheus/base_spec.rb
|
197
248
|
- spec/morpheus/client/associations_spec.rb
|
249
|
+
- spec/morpheus/client/cached_request_formatter_spec.rb
|
198
250
|
- spec/morpheus/client/log_subscriber_spec.rb
|
199
251
|
- spec/morpheus/client/railtie_spec.rb
|
252
|
+
- spec/morpheus/client/request_formatter_spec.rb
|
253
|
+
- spec/morpheus/client/uncached_request_formatter_spec.rb
|
200
254
|
- spec/morpheus/configuration_spec.rb
|
255
|
+
- spec/morpheus/mixins/associations/association_spec.rb
|
256
|
+
- spec/morpheus/mixins/associations/belongs_to_association_spec.rb
|
257
|
+
- spec/morpheus/mixins/associations/has_many_association_spec.rb
|
258
|
+
- spec/morpheus/mixins/associations/has_one_association_spec.rb
|
201
259
|
- spec/morpheus/mixins/associations_spec.rb
|
202
260
|
- spec/morpheus/mixins/attributes_spec.rb
|
203
261
|
- spec/morpheus/mixins/conversion_spec.rb
|
@@ -218,34 +276,44 @@ files:
|
|
218
276
|
- spec/morpheus/response_spec.rb
|
219
277
|
- spec/morpheus/type_caster_spec.rb
|
220
278
|
- spec/morpheus/url_builder_spec.rb
|
279
|
+
- spec/regressions/sorting_resources_spec.rb
|
221
280
|
- spec/shared/active_model_lint_test.rb
|
222
281
|
- spec/spec_helper.rb
|
223
282
|
- spec/support/configuration.rb
|
224
|
-
homepage:
|
283
|
+
homepage: https://github.com/ryanmoran/morpheus
|
225
284
|
licenses: []
|
285
|
+
|
226
286
|
post_install_message:
|
227
287
|
rdoc_options: []
|
228
|
-
|
288
|
+
|
289
|
+
require_paths:
|
229
290
|
- lib
|
230
|
-
required_ruby_version: !ruby/object:Gem::Requirement
|
291
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
231
292
|
none: false
|
232
|
-
requirements:
|
233
|
-
- -
|
234
|
-
- !ruby/object:Gem::Version
|
235
|
-
|
236
|
-
|
293
|
+
requirements:
|
294
|
+
- - ">="
|
295
|
+
- !ruby/object:Gem::Version
|
296
|
+
hash: 3
|
297
|
+
segments:
|
298
|
+
- 0
|
299
|
+
version: "0"
|
300
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
237
301
|
none: false
|
238
|
-
requirements:
|
239
|
-
- -
|
240
|
-
- !ruby/object:Gem::Version
|
241
|
-
|
302
|
+
requirements:
|
303
|
+
- - ">="
|
304
|
+
- !ruby/object:Gem::Version
|
305
|
+
hash: 3
|
306
|
+
segments:
|
307
|
+
- 0
|
308
|
+
version: "0"
|
242
309
|
requirements: []
|
310
|
+
|
243
311
|
rubyforge_project:
|
244
|
-
rubygems_version: 1.8.
|
312
|
+
rubygems_version: 1.8.24
|
245
313
|
signing_key:
|
246
314
|
specification_version: 3
|
247
315
|
summary: RESTful API Client
|
248
|
-
test_files:
|
316
|
+
test_files:
|
249
317
|
- spec/dummy/Rakefile
|
250
318
|
- spec/dummy/app/controllers/application_controller.rb
|
251
319
|
- spec/dummy/app/helpers/application_helper.rb
|
@@ -285,15 +353,18 @@ test_files:
|
|
285
353
|
- spec/dummy/public/favicon.ico
|
286
354
|
- spec/dummy/public/stylesheets/.gitkeep
|
287
355
|
- spec/dummy/script/rails
|
288
|
-
- spec/morpheus/associations/association_spec.rb
|
289
|
-
- spec/morpheus/associations/belongs_to_association_spec.rb
|
290
|
-
- spec/morpheus/associations/has_many_association_spec.rb
|
291
|
-
- spec/morpheus/associations/has_one_association_spec.rb
|
292
356
|
- spec/morpheus/base_spec.rb
|
293
357
|
- spec/morpheus/client/associations_spec.rb
|
358
|
+
- spec/morpheus/client/cached_request_formatter_spec.rb
|
294
359
|
- spec/morpheus/client/log_subscriber_spec.rb
|
295
360
|
- spec/morpheus/client/railtie_spec.rb
|
361
|
+
- spec/morpheus/client/request_formatter_spec.rb
|
362
|
+
- spec/morpheus/client/uncached_request_formatter_spec.rb
|
296
363
|
- spec/morpheus/configuration_spec.rb
|
364
|
+
- spec/morpheus/mixins/associations/association_spec.rb
|
365
|
+
- spec/morpheus/mixins/associations/belongs_to_association_spec.rb
|
366
|
+
- spec/morpheus/mixins/associations/has_many_association_spec.rb
|
367
|
+
- spec/morpheus/mixins/associations/has_one_association_spec.rb
|
297
368
|
- spec/morpheus/mixins/associations_spec.rb
|
298
369
|
- spec/morpheus/mixins/attributes_spec.rb
|
299
370
|
- spec/morpheus/mixins/conversion_spec.rb
|
@@ -314,6 +385,7 @@ test_files:
|
|
314
385
|
- spec/morpheus/response_spec.rb
|
315
386
|
- spec/morpheus/type_caster_spec.rb
|
316
387
|
- spec/morpheus/url_builder_spec.rb
|
388
|
+
- spec/regressions/sorting_resources_spec.rb
|
317
389
|
- spec/shared/active_model_lint_test.rb
|
318
390
|
- spec/spec_helper.rb
|
319
391
|
- spec/support/configuration.rb
|