la_maquina 1.1.0 → 1.1.1
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.
- checksums.yaml +4 -4
- data/Gemfile.lock +2 -2
- data/lib/la_maquina.rb +1 -0
- data/lib/la_maquina/dependency_map/yaml_map.rb +3 -0
- data/lib/la_maquina/errors.rb +5 -0
- data/lib/la_maquina/errors/invalid_mapping_error.rb +6 -0
- data/lib/la_maquina/version.rb +1 -1
- data/test/dummy/db/schema.rb +0 -16
- data/test/unit/dependency_maps/{yamp_map_test.rb → yaml_map_test.rb} +7 -1
- metadata +6 -5
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA1:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: e1fe1bcbcd73db3dbdb212fd054cb6b073e6d282
|
|
4
|
+
data.tar.gz: 91f55d38d57196ea2f95ca632648d89823439252
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 94215f87f61b34999536559d41d4d6cbbdefaae29ea8979032e1e26b7ebf8e4ed6b091031d0ef6cef6989a0e40d69559a9b9252cf4d3dc1e946249f99da21d11
|
|
7
|
+
data.tar.gz: 2aec762f2f3b7c8afb91dd15acc623367a3c5579a158a0ffff745fe6174ed44cb7eab574343f7ba885b31590d1ba9d56de0a2c8729e7df199985a3874111ad67
|
data/Gemfile.lock
CHANGED
data/lib/la_maquina.rb
CHANGED
|
@@ -6,6 +6,7 @@ module LaMaquina
|
|
|
6
6
|
autoload :ErrorNotifier, 'la_maquina/error_notifier'
|
|
7
7
|
autoload :Piston, 'la_maquina/piston'
|
|
8
8
|
autoload :Notifier, 'la_maquina/notifier'
|
|
9
|
+
autoload :Errors, 'la_maquina/errors'
|
|
9
10
|
|
|
10
11
|
mattr_accessor :error_notifier
|
|
11
12
|
error_notifier ||= LaMaquina::ErrorNotifier::Base
|
data/lib/la_maquina/version.rb
CHANGED
data/test/dummy/db/schema.rb
CHANGED
|
@@ -13,12 +13,6 @@
|
|
|
13
13
|
|
|
14
14
|
ActiveRecord::Schema.define(version: 20150228015009) do
|
|
15
15
|
|
|
16
|
-
create_table "admin_thing", force: :cascade do |t|
|
|
17
|
-
t.integer "admin_id"
|
|
18
|
-
t.string "value"
|
|
19
|
-
t.integer "thing_id"
|
|
20
|
-
end
|
|
21
|
-
|
|
22
16
|
create_table "admin_things", force: :cascade do |t|
|
|
23
17
|
t.integer "admin_id"
|
|
24
18
|
t.string "value"
|
|
@@ -40,12 +34,6 @@ ActiveRecord::Schema.define(version: 20150228015009) do
|
|
|
40
34
|
t.string "name"
|
|
41
35
|
end
|
|
42
36
|
|
|
43
|
-
create_table "guest_thing", force: :cascade do |t|
|
|
44
|
-
t.integer "guest_id"
|
|
45
|
-
t.string "value"
|
|
46
|
-
t.integer "thing_id"
|
|
47
|
-
end
|
|
48
|
-
|
|
49
37
|
create_table "guest_things", force: :cascade do |t|
|
|
50
38
|
t.integer "guest_id"
|
|
51
39
|
t.string "value"
|
|
@@ -77,10 +65,6 @@ ActiveRecord::Schema.define(version: 20150228015009) do
|
|
|
77
65
|
t.string "value"
|
|
78
66
|
end
|
|
79
67
|
|
|
80
|
-
create_table "thing", force: :cascade do |t|
|
|
81
|
-
t.string "value"
|
|
82
|
-
end
|
|
83
|
-
|
|
84
68
|
create_table "things", force: :cascade do |t|
|
|
85
69
|
t.string "value"
|
|
86
70
|
end
|
|
@@ -13,12 +13,18 @@ class YamlMapTest < ActiveSupport::TestCase
|
|
|
13
13
|
end
|
|
14
14
|
|
|
15
15
|
def test_throws_mapless_lookup
|
|
16
|
-
assert_raise NoMethodError do
|
|
16
|
+
assert_raise NoMethodError do
|
|
17
17
|
map = LaMaquina::DependencyMap::YamlMap.new
|
|
18
18
|
map.find :admin
|
|
19
19
|
end
|
|
20
20
|
end
|
|
21
21
|
|
|
22
|
+
def test_handles_invalid_notifier
|
|
23
|
+
assert_raise LaMaquina::Errors::InvalidMappingError do
|
|
24
|
+
@map.find 'totally fake thing', 'I raise an exception!'
|
|
25
|
+
end
|
|
26
|
+
end
|
|
27
|
+
|
|
22
28
|
def test_is_with_indifferent_access
|
|
23
29
|
assert :admin, @map.find("admin")
|
|
24
30
|
assert :admin, @map.find(:admin)
|
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: la_maquina
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 1.1.
|
|
4
|
+
version: 1.1.1
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Greg Orlov
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date:
|
|
11
|
+
date: 2016-03-14 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: bundler
|
|
@@ -78,6 +78,8 @@ files:
|
|
|
78
78
|
- lib/la_maquina/error_notifier/base.rb
|
|
79
79
|
- lib/la_maquina/error_notifier/honeybadger_notifier.rb
|
|
80
80
|
- lib/la_maquina/error_notifier/silent_notifier.rb
|
|
81
|
+
- lib/la_maquina/errors.rb
|
|
82
|
+
- lib/la_maquina/errors/invalid_mapping_error.rb
|
|
81
83
|
- lib/la_maquina/notifier.rb
|
|
82
84
|
- lib/la_maquina/piston.rb
|
|
83
85
|
- lib/la_maquina/piston/base.rb
|
|
@@ -152,7 +154,7 @@ files:
|
|
|
152
154
|
- test/dummy/test/fixtures/traits.yml
|
|
153
155
|
- test/test_helper.rb
|
|
154
156
|
- test/unit/dependency_maps/constant_map_test.rb
|
|
155
|
-
- test/unit/dependency_maps/
|
|
157
|
+
- test/unit/dependency_maps/yaml_map_test.rb
|
|
156
158
|
- test/unit/engine_test.rb
|
|
157
159
|
- test/unit/error_notifier_test.rb
|
|
158
160
|
- test/unit/la_maquina_test.rb
|
|
@@ -253,7 +255,7 @@ test_files:
|
|
|
253
255
|
- test/dummy/test/fixtures/traits.yml
|
|
254
256
|
- test/test_helper.rb
|
|
255
257
|
- test/unit/dependency_maps/constant_map_test.rb
|
|
256
|
-
- test/unit/dependency_maps/
|
|
258
|
+
- test/unit/dependency_maps/yaml_map_test.rb
|
|
257
259
|
- test/unit/engine_test.rb
|
|
258
260
|
- test/unit/error_notifier_test.rb
|
|
259
261
|
- test/unit/la_maquina_test.rb
|
|
@@ -261,4 +263,3 @@ test_files:
|
|
|
261
263
|
- test/unit/piston_test.rb
|
|
262
264
|
- test/unit/pistons/cache_piston_test.rb
|
|
263
265
|
- test/unit/pistons/sunspot_piston_test.rb
|
|
264
|
-
has_rdoc:
|