chassis 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 +17 -0
- data/Gemfile +4 -0
- data/LICENSE.txt +22 -0
- data/README.md +362 -0
- data/Rakefile +33 -0
- data/chassis.gemspec +41 -0
- data/examples/repo.rb +40 -0
- data/lib/chassis.rb +81 -0
- data/lib/chassis/array_utils.rb +8 -0
- data/lib/chassis/circuit_panel.rb +22 -0
- data/lib/chassis/core_ext/array.rb +5 -0
- data/lib/chassis/core_ext/hash.rb +5 -0
- data/lib/chassis/core_ext/string.rb +13 -0
- data/lib/chassis/delegate.rb +29 -0
- data/lib/chassis/dirty_session.rb +105 -0
- data/lib/chassis/error.rb +7 -0
- data/lib/chassis/faraday.rb +226 -0
- data/lib/chassis/form.rb +56 -0
- data/lib/chassis/hash_utils.rb +16 -0
- data/lib/chassis/heroku.rb +5 -0
- data/lib/chassis/initializable.rb +11 -0
- data/lib/chassis/logger.rb +8 -0
- data/lib/chassis/observable.rb +19 -0
- data/lib/chassis/persistence.rb +49 -0
- data/lib/chassis/rack/bouncer.rb +33 -0
- data/lib/chassis/rack/builder_shim_patch.rb +7 -0
- data/lib/chassis/rack/health_check.rb +45 -0
- data/lib/chassis/rack/instrumentation.rb +20 -0
- data/lib/chassis/rack/json_body_parser.rb +20 -0
- data/lib/chassis/rack/no_robots.rb +24 -0
- data/lib/chassis/registry.rb +30 -0
- data/lib/chassis/repo.rb +73 -0
- data/lib/chassis/repo/base_repo.rb +99 -0
- data/lib/chassis/repo/delegation.rb +78 -0
- data/lib/chassis/repo/lazy_association.rb +57 -0
- data/lib/chassis/repo/memory_repo.rb +7 -0
- data/lib/chassis/repo/null_repo.rb +64 -0
- data/lib/chassis/repo/pstore_repo.rb +54 -0
- data/lib/chassis/repo/record_map.rb +44 -0
- data/lib/chassis/repo/redis_repo.rb +55 -0
- data/lib/chassis/serializable.rb +52 -0
- data/lib/chassis/string_utils.rb +50 -0
- data/lib/chassis/version.rb +3 -0
- data/lib/chassis/web_service.rb +61 -0
- data/test/array_utils_test.rb +23 -0
- data/test/chassis_test.rb +7 -0
- data/test/circuit_panel_test.rb +22 -0
- data/test/core_ext/array_test.rb +8 -0
- data/test/core_ext/hash_test.rb +8 -0
- data/test/core_ext/string_test.rb +16 -0
- data/test/delegate_test.rb +41 -0
- data/test/dirty_session_test.rb +138 -0
- data/test/error_test.rb +12 -0
- data/test/faraday_test.rb +749 -0
- data/test/form_test.rb +29 -0
- data/test/hash_utils_test.rb +17 -0
- data/test/initializable_test.rb +22 -0
- data/test/logger_test.rb +43 -0
- data/test/observable_test.rb +27 -0
- data/test/persistence_test.rb +112 -0
- data/test/prox_test.rb +7 -0
- data/test/rack/bouncer_test.rb +42 -0
- data/test/rack/builder_patch_test.rb +36 -0
- data/test/rack/health_check_test.rb +35 -0
- data/test/rack/instrumentation_test.rb +38 -0
- data/test/rack/json_body_parser_test.rb +38 -0
- data/test/rack/no_robots_test.rb +34 -0
- data/test/registry_test.rb +26 -0
- data/test/repo/delegation_test.rb +101 -0
- data/test/repo/lazy_association_test.rb +115 -0
- data/test/repo/memory_repo_test.rb +25 -0
- data/test/repo/null_repo_test.rb +48 -0
- data/test/repo/pstore_repo_test.rb +28 -0
- data/test/repo/redis_repo_test.rb +26 -0
- data/test/repo/repo_tests.rb +120 -0
- data/test/repo_test.rb +76 -0
- data/test/serializable_test.rb +77 -0
- data/test/string_utils_test.rb +21 -0
- data/test/test_helper.rb +10 -0
- data/test/web_service_test.rb +107 -0
- metadata +426 -0
data/test/repo_test.rb
ADDED
@@ -0,0 +1,76 @@
|
|
1
|
+
require_relative 'test_helper'
|
2
|
+
|
3
|
+
class RepoTest < MiniTest::Unit::TestCase
|
4
|
+
class TestAdapter < Chassis::MemoryRepo
|
5
|
+
def query_test_empty_array_query(klass, q)
|
6
|
+
[ ]
|
7
|
+
end
|
8
|
+
|
9
|
+
def query_test_nil_query(klass, q)
|
10
|
+
nil
|
11
|
+
end
|
12
|
+
|
13
|
+
def query_person_by_name(klass, q)
|
14
|
+
all(klass).find do |record|
|
15
|
+
record.name == q.name
|
16
|
+
end
|
17
|
+
end
|
18
|
+
|
19
|
+
def update(record)
|
20
|
+
record.name = 'updated'
|
21
|
+
end
|
22
|
+
end
|
23
|
+
|
24
|
+
CustomError = Class.new RuntimeError
|
25
|
+
TestEmptyArrayQuery = Struct.new :foo
|
26
|
+
TestNilQuery = Struct.new :foo
|
27
|
+
PersonByName = Struct.new :name
|
28
|
+
Person = Struct.new :id, :name
|
29
|
+
|
30
|
+
def repo
|
31
|
+
Chassis.repo
|
32
|
+
end
|
33
|
+
|
34
|
+
def setup
|
35
|
+
repo.register :test, TestAdapter.new
|
36
|
+
repo.use :test
|
37
|
+
end
|
38
|
+
|
39
|
+
def test_query_bang_raises_an_exception_if_empty
|
40
|
+
assert_raises Chassis::NoQueryResultError do
|
41
|
+
repo.query! Person, TestEmptyArrayQuery.new(:foo)
|
42
|
+
end
|
43
|
+
end
|
44
|
+
|
45
|
+
def test_query_bang_raises_an_exception_if_nil
|
46
|
+
assert_raises Chassis::NoQueryResultError do
|
47
|
+
repo.query! Person, TestNilQuery.new(:foo)
|
48
|
+
end
|
49
|
+
end
|
50
|
+
|
51
|
+
def test_query_bang_can_take_a_block_to_customize_exception
|
52
|
+
assert_raises CustomError do
|
53
|
+
repo.query! Person, TestNilQuery.new(:foo) do |klass, selector|
|
54
|
+
fail CustomError
|
55
|
+
end
|
56
|
+
end
|
57
|
+
end
|
58
|
+
|
59
|
+
def test_query_bang_works_when_a_non_array_object_is_returned
|
60
|
+
person = Person.new nil, 'ahawkins'
|
61
|
+
repo.save person
|
62
|
+
assert_equal person, repo.query!(Person, PersonByName.new('ahawkins'))
|
63
|
+
end
|
64
|
+
|
65
|
+
def test_save_creates_records_without_ids
|
66
|
+
person = Person.new nil, 'ahawkins'
|
67
|
+
repo.save person
|
68
|
+
assert person.id
|
69
|
+
end
|
70
|
+
|
71
|
+
def test_save_updates_records_otherwise
|
72
|
+
person = Person.new 1, 'ahawkins'
|
73
|
+
repo.save person
|
74
|
+
assert_equal 'updated', person.name
|
75
|
+
end
|
76
|
+
end
|
@@ -0,0 +1,77 @@
|
|
1
|
+
require_relative 'test_helper'
|
2
|
+
|
3
|
+
class SerializationTest < MiniTest::Unit::TestCase
|
4
|
+
class Post
|
5
|
+
include Chassis::Serializable
|
6
|
+
|
7
|
+
attr_accessor :title
|
8
|
+
|
9
|
+
def initialize(hash = {})
|
10
|
+
hash.each do |key, value|
|
11
|
+
send "#{key}=", value
|
12
|
+
end
|
13
|
+
end
|
14
|
+
|
15
|
+
def marshal_dump
|
16
|
+
{ title: title }
|
17
|
+
end
|
18
|
+
|
19
|
+
def marshal_load(hash)
|
20
|
+
@title = hash.fetch :title
|
21
|
+
end
|
22
|
+
end
|
23
|
+
|
24
|
+
class BrokenPost
|
25
|
+
include Chassis::Serializable
|
26
|
+
end
|
27
|
+
|
28
|
+
def test_round_trips_with_marshal
|
29
|
+
post = Post.new title: 'foo'
|
30
|
+
round_tripped = Marshal.load(Marshal.dump(post))
|
31
|
+
assert_equal post.title, round_tripped.title
|
32
|
+
end
|
33
|
+
|
34
|
+
def test_round_trips_with_yaml
|
35
|
+
post = Post.new title: 'foo'
|
36
|
+
round_tripped = Post.from_yaml(post.to_yaml)
|
37
|
+
assert_equal post.title, round_tripped.title
|
38
|
+
end
|
39
|
+
|
40
|
+
def test_round_trips_with_json
|
41
|
+
post = Post.new title: 'foo'
|
42
|
+
round_tripped = Post.from_json(post.to_json)
|
43
|
+
assert_equal post.title, round_tripped.title
|
44
|
+
end
|
45
|
+
|
46
|
+
def test_round_trips_with_a_hash
|
47
|
+
post = Post.new title: 'foo'
|
48
|
+
round_tripped = Post.from_hash(post.to_hash)
|
49
|
+
assert_equal post.title, round_tripped.title
|
50
|
+
end
|
51
|
+
|
52
|
+
def test_to_hash_is_implemented
|
53
|
+
post = Post.new title: 'foo'
|
54
|
+
assert_equal({ title: 'foo' }, post.to_hash)
|
55
|
+
end
|
56
|
+
|
57
|
+
def test_to_h_uses_to_hash
|
58
|
+
post = Post.new title: 'foo'
|
59
|
+
assert_equal post.to_hash, post.to_h
|
60
|
+
end
|
61
|
+
|
62
|
+
def test_fails_without_marshal_load
|
63
|
+
error = assert_raises NotImplementedError do
|
64
|
+
BrokenPost.from_hash({})
|
65
|
+
end
|
66
|
+
|
67
|
+
assert_includes error.message, 'marshal_load'
|
68
|
+
end
|
69
|
+
|
70
|
+
def test_fails_without_marshal_load
|
71
|
+
error = assert_raises NotImplementedError do
|
72
|
+
BrokenPost.new.to_hash
|
73
|
+
end
|
74
|
+
|
75
|
+
assert_includes error.message, 'marshal_dump'
|
76
|
+
end
|
77
|
+
end
|
@@ -0,0 +1,21 @@
|
|
1
|
+
require_relative 'test_helper'
|
2
|
+
|
3
|
+
class StringUtilsTest < MiniTest::Unit::TestCase
|
4
|
+
def utils
|
5
|
+
Chassis::StringUtils
|
6
|
+
end
|
7
|
+
|
8
|
+
def test_underscore
|
9
|
+
result = utils.underscore 'FooBar'
|
10
|
+
assert_equal 'foo_bar', result
|
11
|
+
end
|
12
|
+
|
13
|
+
def test_demodulize
|
14
|
+
result = utils.demodulize 'Foo::Bar::Baz'
|
15
|
+
assert_equal 'Baz', result
|
16
|
+
end
|
17
|
+
|
18
|
+
def test_constantize
|
19
|
+
assert_equal utils, utils.constantize('Chassis::StringUtils')
|
20
|
+
end
|
21
|
+
end
|
data/test/test_helper.rb
ADDED
@@ -0,0 +1,107 @@
|
|
1
|
+
require_relative 'test_helper'
|
2
|
+
|
3
|
+
class WebServiceTest < MiniTest::Unit::TestCase
|
4
|
+
include Rack::Test::Methods
|
5
|
+
|
6
|
+
attr_reader :app
|
7
|
+
|
8
|
+
def setup
|
9
|
+
@app = Chassis::WebService
|
10
|
+
end
|
11
|
+
|
12
|
+
def test_form_errors_return_400
|
13
|
+
@app = Class.new Chassis::WebService do
|
14
|
+
get '/' do
|
15
|
+
raise Chassis::UnknownFormFieldError, :test
|
16
|
+
end
|
17
|
+
end
|
18
|
+
|
19
|
+
get '/'
|
20
|
+
|
21
|
+
assert_equal 400, last_response.status
|
22
|
+
assert_json last_response
|
23
|
+
assert_error_message last_response
|
24
|
+
end
|
25
|
+
|
26
|
+
def test_repo_record_not_found_returns_404
|
27
|
+
@app = Class.new Chassis::WebService do
|
28
|
+
get '/' do
|
29
|
+
raise Chassis::RecordNotFoundError.new(Object, 'some-id')
|
30
|
+
end
|
31
|
+
end
|
32
|
+
|
33
|
+
get '/'
|
34
|
+
|
35
|
+
assert_equal 404, last_response.status
|
36
|
+
assert_json last_response
|
37
|
+
assert_error_message last_response
|
38
|
+
end
|
39
|
+
|
40
|
+
def test_raise_an_error_when_required_param_is_not_given
|
41
|
+
@app = Class.new Chassis::WebService do
|
42
|
+
get '/' do
|
43
|
+
extract! :post
|
44
|
+
end
|
45
|
+
end
|
46
|
+
|
47
|
+
get '/'
|
48
|
+
|
49
|
+
assert_equal 400, last_response.status
|
50
|
+
assert_json last_response
|
51
|
+
assert_error_message last_response
|
52
|
+
end
|
53
|
+
|
54
|
+
def test_parses_json_requests
|
55
|
+
assert_middleware app.middleware, Chassis::Rack::JsonBodyParser
|
56
|
+
end
|
57
|
+
|
58
|
+
def test_blocks_robots
|
59
|
+
assert_middleware app.middleware, Chassis::Rack::NoRobots
|
60
|
+
end
|
61
|
+
|
62
|
+
def test_bounces_bad_requests
|
63
|
+
assert_middleware app.middleware, Chassis::Rack::Bouncer
|
64
|
+
end
|
65
|
+
|
66
|
+
def test_blocks_noob_favicon
|
67
|
+
assert_middleware app.middleware, Rack::BounceFavicon
|
68
|
+
end
|
69
|
+
|
70
|
+
def test_uses_gzip
|
71
|
+
assert_middleware app.middleware, Rack::Deflater
|
72
|
+
end
|
73
|
+
|
74
|
+
def test_can_enable_cors
|
75
|
+
@app = Class.new Chassis::WebService do
|
76
|
+
enable :cors
|
77
|
+
|
78
|
+
get '/' do
|
79
|
+
'hi'
|
80
|
+
end
|
81
|
+
end
|
82
|
+
|
83
|
+
options '/'
|
84
|
+
|
85
|
+
assert_equal '*', last_response.headers.fetch('Access-Control-Allow-Origin')
|
86
|
+
end
|
87
|
+
|
88
|
+
private
|
89
|
+
def assert_json(response)
|
90
|
+
assert_includes response.content_type, 'application/json'
|
91
|
+
end
|
92
|
+
|
93
|
+
def assert_error_message(response)
|
94
|
+
json = JSON.load(response.body)
|
95
|
+
assert json.fetch('error').fetch('message')
|
96
|
+
end
|
97
|
+
|
98
|
+
def assert_middleware(stack, klass)
|
99
|
+
klasses = stack.map { |m| m.first }
|
100
|
+
assert_includes klasses, klass, "#{klass} should be in the middleware stack"
|
101
|
+
end
|
102
|
+
|
103
|
+
def refute_middleware(stack, klass)
|
104
|
+
klasses = stack.map { |m| m.first }
|
105
|
+
refute_includes klasses, klass, "#{klass} should not be in the middleware stack"
|
106
|
+
end
|
107
|
+
end
|
metadata
ADDED
@@ -0,0 +1,426 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: chassis
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.1.0
|
5
|
+
platform: ruby
|
6
|
+
authors:
|
7
|
+
- ahawkins
|
8
|
+
autorequire:
|
9
|
+
bindir: bin
|
10
|
+
cert_chain: []
|
11
|
+
date: 2014-05-13 00:00:00.000000000 Z
|
12
|
+
dependencies:
|
13
|
+
- !ruby/object:Gem::Dependency
|
14
|
+
name: sinatra
|
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: sinatra-contrib
|
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: rack-contrib
|
43
|
+
requirement: !ruby/object:Gem::Requirement
|
44
|
+
requirements:
|
45
|
+
- - ">="
|
46
|
+
- !ruby/object:Gem::Version
|
47
|
+
version: '0'
|
48
|
+
type: :runtime
|
49
|
+
prerelease: false
|
50
|
+
version_requirements: !ruby/object:Gem::Requirement
|
51
|
+
requirements:
|
52
|
+
- - ">="
|
53
|
+
- !ruby/object:Gem::Version
|
54
|
+
version: '0'
|
55
|
+
- !ruby/object:Gem::Dependency
|
56
|
+
name: manifold
|
57
|
+
requirement: !ruby/object:Gem::Requirement
|
58
|
+
requirements:
|
59
|
+
- - ">="
|
60
|
+
- !ruby/object:Gem::Version
|
61
|
+
version: '0'
|
62
|
+
type: :runtime
|
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: prox
|
71
|
+
requirement: !ruby/object:Gem::Requirement
|
72
|
+
requirements:
|
73
|
+
- - ">="
|
74
|
+
- !ruby/object:Gem::Version
|
75
|
+
version: '0'
|
76
|
+
type: :runtime
|
77
|
+
prerelease: false
|
78
|
+
version_requirements: !ruby/object:Gem::Requirement
|
79
|
+
requirements:
|
80
|
+
- - ">="
|
81
|
+
- !ruby/object:Gem::Version
|
82
|
+
version: '0'
|
83
|
+
- !ruby/object:Gem::Dependency
|
84
|
+
name: harness
|
85
|
+
requirement: !ruby/object:Gem::Requirement
|
86
|
+
requirements:
|
87
|
+
- - ">="
|
88
|
+
- !ruby/object:Gem::Version
|
89
|
+
version: '0'
|
90
|
+
type: :runtime
|
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: harness-rack
|
99
|
+
requirement: !ruby/object:Gem::Requirement
|
100
|
+
requirements:
|
101
|
+
- - ">="
|
102
|
+
- !ruby/object:Gem::Version
|
103
|
+
version: '0'
|
104
|
+
type: :runtime
|
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: virtus
|
113
|
+
requirement: !ruby/object:Gem::Requirement
|
114
|
+
requirements:
|
115
|
+
- - ">="
|
116
|
+
- !ruby/object:Gem::Version
|
117
|
+
version: '0'
|
118
|
+
type: :runtime
|
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: virtus-dirty_attribute
|
127
|
+
requirement: !ruby/object:Gem::Requirement
|
128
|
+
requirements:
|
129
|
+
- - ">="
|
130
|
+
- !ruby/object:Gem::Version
|
131
|
+
version: '0'
|
132
|
+
type: :runtime
|
133
|
+
prerelease: false
|
134
|
+
version_requirements: !ruby/object:Gem::Requirement
|
135
|
+
requirements:
|
136
|
+
- - ">="
|
137
|
+
- !ruby/object:Gem::Version
|
138
|
+
version: '0'
|
139
|
+
- !ruby/object:Gem::Dependency
|
140
|
+
name: faraday
|
141
|
+
requirement: !ruby/object:Gem::Requirement
|
142
|
+
requirements:
|
143
|
+
- - "~>"
|
144
|
+
- !ruby/object:Gem::Version
|
145
|
+
version: 0.9.0
|
146
|
+
type: :runtime
|
147
|
+
prerelease: false
|
148
|
+
version_requirements: !ruby/object:Gem::Requirement
|
149
|
+
requirements:
|
150
|
+
- - "~>"
|
151
|
+
- !ruby/object:Gem::Version
|
152
|
+
version: 0.9.0
|
153
|
+
- !ruby/object:Gem::Dependency
|
154
|
+
name: logger-better
|
155
|
+
requirement: !ruby/object:Gem::Requirement
|
156
|
+
requirements:
|
157
|
+
- - ">="
|
158
|
+
- !ruby/object:Gem::Version
|
159
|
+
version: '0'
|
160
|
+
type: :runtime
|
161
|
+
prerelease: false
|
162
|
+
version_requirements: !ruby/object:Gem::Requirement
|
163
|
+
requirements:
|
164
|
+
- - ">="
|
165
|
+
- !ruby/object:Gem::Version
|
166
|
+
version: '0'
|
167
|
+
- !ruby/object:Gem::Dependency
|
168
|
+
name: breaker
|
169
|
+
requirement: !ruby/object:Gem::Requirement
|
170
|
+
requirements:
|
171
|
+
- - ">="
|
172
|
+
- !ruby/object:Gem::Version
|
173
|
+
version: '0'
|
174
|
+
type: :runtime
|
175
|
+
prerelease: false
|
176
|
+
version_requirements: !ruby/object:Gem::Requirement
|
177
|
+
requirements:
|
178
|
+
- - ">="
|
179
|
+
- !ruby/object:Gem::Version
|
180
|
+
version: '0'
|
181
|
+
- !ruby/object:Gem::Dependency
|
182
|
+
name: interchange
|
183
|
+
requirement: !ruby/object:Gem::Requirement
|
184
|
+
requirements:
|
185
|
+
- - ">="
|
186
|
+
- !ruby/object:Gem::Version
|
187
|
+
version: '0'
|
188
|
+
type: :runtime
|
189
|
+
prerelease: false
|
190
|
+
version_requirements: !ruby/object:Gem::Requirement
|
191
|
+
requirements:
|
192
|
+
- - ">="
|
193
|
+
- !ruby/object:Gem::Version
|
194
|
+
version: '0'
|
195
|
+
- !ruby/object:Gem::Dependency
|
196
|
+
name: tnt
|
197
|
+
requirement: !ruby/object:Gem::Requirement
|
198
|
+
requirements:
|
199
|
+
- - ">="
|
200
|
+
- !ruby/object:Gem::Version
|
201
|
+
version: '0'
|
202
|
+
type: :runtime
|
203
|
+
prerelease: false
|
204
|
+
version_requirements: !ruby/object:Gem::Requirement
|
205
|
+
requirements:
|
206
|
+
- - ">="
|
207
|
+
- !ruby/object:Gem::Version
|
208
|
+
version: '0'
|
209
|
+
- !ruby/object:Gem::Dependency
|
210
|
+
name: bundler
|
211
|
+
requirement: !ruby/object:Gem::Requirement
|
212
|
+
requirements:
|
213
|
+
- - "~>"
|
214
|
+
- !ruby/object:Gem::Version
|
215
|
+
version: '1.3'
|
216
|
+
type: :development
|
217
|
+
prerelease: false
|
218
|
+
version_requirements: !ruby/object:Gem::Requirement
|
219
|
+
requirements:
|
220
|
+
- - "~>"
|
221
|
+
- !ruby/object:Gem::Version
|
222
|
+
version: '1.3'
|
223
|
+
- !ruby/object:Gem::Dependency
|
224
|
+
name: rake
|
225
|
+
requirement: !ruby/object:Gem::Requirement
|
226
|
+
requirements:
|
227
|
+
- - ">="
|
228
|
+
- !ruby/object:Gem::Version
|
229
|
+
version: '0'
|
230
|
+
type: :development
|
231
|
+
prerelease: false
|
232
|
+
version_requirements: !ruby/object:Gem::Requirement
|
233
|
+
requirements:
|
234
|
+
- - ">="
|
235
|
+
- !ruby/object:Gem::Version
|
236
|
+
version: '0'
|
237
|
+
- !ruby/object:Gem::Dependency
|
238
|
+
name: rack-test
|
239
|
+
requirement: !ruby/object:Gem::Requirement
|
240
|
+
requirements:
|
241
|
+
- - ">="
|
242
|
+
- !ruby/object:Gem::Version
|
243
|
+
version: '0'
|
244
|
+
type: :development
|
245
|
+
prerelease: false
|
246
|
+
version_requirements: !ruby/object:Gem::Requirement
|
247
|
+
requirements:
|
248
|
+
- - ">="
|
249
|
+
- !ruby/object:Gem::Version
|
250
|
+
version: '0'
|
251
|
+
- !ruby/object:Gem::Dependency
|
252
|
+
name: mocha
|
253
|
+
requirement: !ruby/object:Gem::Requirement
|
254
|
+
requirements:
|
255
|
+
- - ">="
|
256
|
+
- !ruby/object:Gem::Version
|
257
|
+
version: '0'
|
258
|
+
type: :development
|
259
|
+
prerelease: false
|
260
|
+
version_requirements: !ruby/object:Gem::Requirement
|
261
|
+
requirements:
|
262
|
+
- - ">="
|
263
|
+
- !ruby/object:Gem::Version
|
264
|
+
version: '0'
|
265
|
+
- !ruby/object:Gem::Dependency
|
266
|
+
name: redis
|
267
|
+
requirement: !ruby/object:Gem::Requirement
|
268
|
+
requirements:
|
269
|
+
- - ">="
|
270
|
+
- !ruby/object:Gem::Version
|
271
|
+
version: '0'
|
272
|
+
type: :development
|
273
|
+
prerelease: false
|
274
|
+
version_requirements: !ruby/object:Gem::Requirement
|
275
|
+
requirements:
|
276
|
+
- - ">="
|
277
|
+
- !ruby/object:Gem::Version
|
278
|
+
version: '0'
|
279
|
+
description: A collection of modules and helpers for building mantainable Ruby applications
|
280
|
+
email:
|
281
|
+
- adam@hawkins.io
|
282
|
+
executables: []
|
283
|
+
extensions: []
|
284
|
+
extra_rdoc_files: []
|
285
|
+
files:
|
286
|
+
- ".gitignore"
|
287
|
+
- Gemfile
|
288
|
+
- LICENSE.txt
|
289
|
+
- README.md
|
290
|
+
- Rakefile
|
291
|
+
- chassis.gemspec
|
292
|
+
- examples/repo.rb
|
293
|
+
- lib/chassis.rb
|
294
|
+
- lib/chassis/array_utils.rb
|
295
|
+
- lib/chassis/circuit_panel.rb
|
296
|
+
- lib/chassis/core_ext/array.rb
|
297
|
+
- lib/chassis/core_ext/hash.rb
|
298
|
+
- lib/chassis/core_ext/string.rb
|
299
|
+
- lib/chassis/delegate.rb
|
300
|
+
- lib/chassis/dirty_session.rb
|
301
|
+
- lib/chassis/error.rb
|
302
|
+
- lib/chassis/faraday.rb
|
303
|
+
- lib/chassis/form.rb
|
304
|
+
- lib/chassis/hash_utils.rb
|
305
|
+
- lib/chassis/heroku.rb
|
306
|
+
- lib/chassis/initializable.rb
|
307
|
+
- lib/chassis/logger.rb
|
308
|
+
- lib/chassis/observable.rb
|
309
|
+
- lib/chassis/persistence.rb
|
310
|
+
- lib/chassis/rack/bouncer.rb
|
311
|
+
- lib/chassis/rack/builder_shim_patch.rb
|
312
|
+
- lib/chassis/rack/health_check.rb
|
313
|
+
- lib/chassis/rack/instrumentation.rb
|
314
|
+
- lib/chassis/rack/json_body_parser.rb
|
315
|
+
- lib/chassis/rack/no_robots.rb
|
316
|
+
- lib/chassis/registry.rb
|
317
|
+
- lib/chassis/repo.rb
|
318
|
+
- lib/chassis/repo/base_repo.rb
|
319
|
+
- lib/chassis/repo/delegation.rb
|
320
|
+
- lib/chassis/repo/lazy_association.rb
|
321
|
+
- lib/chassis/repo/memory_repo.rb
|
322
|
+
- lib/chassis/repo/null_repo.rb
|
323
|
+
- lib/chassis/repo/pstore_repo.rb
|
324
|
+
- lib/chassis/repo/record_map.rb
|
325
|
+
- lib/chassis/repo/redis_repo.rb
|
326
|
+
- lib/chassis/serializable.rb
|
327
|
+
- lib/chassis/string_utils.rb
|
328
|
+
- lib/chassis/version.rb
|
329
|
+
- lib/chassis/web_service.rb
|
330
|
+
- test/array_utils_test.rb
|
331
|
+
- test/chassis_test.rb
|
332
|
+
- test/circuit_panel_test.rb
|
333
|
+
- test/core_ext/array_test.rb
|
334
|
+
- test/core_ext/hash_test.rb
|
335
|
+
- test/core_ext/string_test.rb
|
336
|
+
- test/delegate_test.rb
|
337
|
+
- test/dirty_session_test.rb
|
338
|
+
- test/error_test.rb
|
339
|
+
- test/faraday_test.rb
|
340
|
+
- test/form_test.rb
|
341
|
+
- test/hash_utils_test.rb
|
342
|
+
- test/initializable_test.rb
|
343
|
+
- test/logger_test.rb
|
344
|
+
- test/observable_test.rb
|
345
|
+
- test/persistence_test.rb
|
346
|
+
- test/prox_test.rb
|
347
|
+
- test/rack/bouncer_test.rb
|
348
|
+
- test/rack/builder_patch_test.rb
|
349
|
+
- test/rack/health_check_test.rb
|
350
|
+
- test/rack/instrumentation_test.rb
|
351
|
+
- test/rack/json_body_parser_test.rb
|
352
|
+
- test/rack/no_robots_test.rb
|
353
|
+
- test/registry_test.rb
|
354
|
+
- test/repo/delegation_test.rb
|
355
|
+
- test/repo/lazy_association_test.rb
|
356
|
+
- test/repo/memory_repo_test.rb
|
357
|
+
- test/repo/null_repo_test.rb
|
358
|
+
- test/repo/pstore_repo_test.rb
|
359
|
+
- test/repo/redis_repo_test.rb
|
360
|
+
- test/repo/repo_tests.rb
|
361
|
+
- test/repo_test.rb
|
362
|
+
- test/serializable_test.rb
|
363
|
+
- test/string_utils_test.rb
|
364
|
+
- test/test_helper.rb
|
365
|
+
- test/web_service_test.rb
|
366
|
+
homepage: ''
|
367
|
+
licenses:
|
368
|
+
- MIT
|
369
|
+
metadata: {}
|
370
|
+
post_install_message:
|
371
|
+
rdoc_options: []
|
372
|
+
require_paths:
|
373
|
+
- lib
|
374
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
375
|
+
requirements:
|
376
|
+
- - ">="
|
377
|
+
- !ruby/object:Gem::Version
|
378
|
+
version: '0'
|
379
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
380
|
+
requirements:
|
381
|
+
- - ">="
|
382
|
+
- !ruby/object:Gem::Version
|
383
|
+
version: '0'
|
384
|
+
requirements: []
|
385
|
+
rubyforge_project:
|
386
|
+
rubygems_version: 2.2.2
|
387
|
+
signing_key:
|
388
|
+
specification_version: 4
|
389
|
+
summary: ''
|
390
|
+
test_files:
|
391
|
+
- test/array_utils_test.rb
|
392
|
+
- test/chassis_test.rb
|
393
|
+
- test/circuit_panel_test.rb
|
394
|
+
- test/core_ext/array_test.rb
|
395
|
+
- test/core_ext/hash_test.rb
|
396
|
+
- test/core_ext/string_test.rb
|
397
|
+
- test/delegate_test.rb
|
398
|
+
- test/dirty_session_test.rb
|
399
|
+
- test/error_test.rb
|
400
|
+
- test/faraday_test.rb
|
401
|
+
- test/form_test.rb
|
402
|
+
- test/hash_utils_test.rb
|
403
|
+
- test/initializable_test.rb
|
404
|
+
- test/logger_test.rb
|
405
|
+
- test/observable_test.rb
|
406
|
+
- test/persistence_test.rb
|
407
|
+
- test/prox_test.rb
|
408
|
+
- test/rack/bouncer_test.rb
|
409
|
+
- test/rack/builder_patch_test.rb
|
410
|
+
- test/rack/health_check_test.rb
|
411
|
+
- test/rack/instrumentation_test.rb
|
412
|
+
- test/rack/json_body_parser_test.rb
|
413
|
+
- test/rack/no_robots_test.rb
|
414
|
+
- test/registry_test.rb
|
415
|
+
- test/repo/delegation_test.rb
|
416
|
+
- test/repo/lazy_association_test.rb
|
417
|
+
- test/repo/memory_repo_test.rb
|
418
|
+
- test/repo/null_repo_test.rb
|
419
|
+
- test/repo/pstore_repo_test.rb
|
420
|
+
- test/repo/redis_repo_test.rb
|
421
|
+
- test/repo/repo_tests.rb
|
422
|
+
- test/repo_test.rb
|
423
|
+
- test/serializable_test.rb
|
424
|
+
- test/string_utils_test.rb
|
425
|
+
- test/test_helper.rb
|
426
|
+
- test/web_service_test.rb
|