la_maquina 1.0.0 → 1.1.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: e105bcb7993122b4bb988002ab8b18bc7eec6cf1
4
- data.tar.gz: 6611913c1eacfe261935e89d4c1d841cb7c3344f
3
+ metadata.gz: 5a89beff8f1273d9f405dd8d3688cab29d46d0ed
4
+ data.tar.gz: 8579494fde2abdfa66c2269ba60c594ab79e6c4d
5
5
  SHA512:
6
- metadata.gz: 03dd116c53d0a2780daec310bae5321d13f1b8b76eb07f409e4c8439589147b65c41bd5411bd2ca7e1cd1218f6fb6ed595917407e277c1cf927344f3bad622cc
7
- data.tar.gz: 3abddd32d8049cee0e3a6078ae7baadbe4b02cc8555ae7aaac21a8693364fc0c88e79dae271db399c3b7a0017080b61ab4f669ec80eb9beb2230ec6b8a8a7b0d
6
+ metadata.gz: 13bdd3d29f2ca0b9623a7670b1719af725b58619a107da724aca4b208458c2cc4414b5a736adb0c8bf974851a0050cd2a471f204e01828f8249b817f804350fa
7
+ data.tar.gz: 664e006fd2771cbf4c0a7fbe39a80a7f17ab9789e69f04f32e071e5ac246c35d62d0cf4548e6eb2ef7965716bcb8e80357dfb401d936c7b97b93d057ff4e43d2
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- la_maquina (0.2.0)
4
+ la_maquina (1.0.1)
5
5
 
6
6
  GEM
7
7
  remote: https://rubygems.org/
@@ -146,3 +146,6 @@ DEPENDENCIES
146
146
  sunspot_rails
147
147
  sunspot_solr
148
148
  test_after_commit
149
+
150
+ BUNDLED WITH
151
+ 1.10.6
data/README.md CHANGED
@@ -36,11 +36,19 @@ end
36
36
  class Machete < ActiveRecord::Base
37
37
  belongs_to :danny_trejo
38
38
 
39
+ # all you need to add to get danny_trejo to reindex on machete update
39
40
  include LaMaquina::Notifier
40
41
  notifies_about :danny_trejo
41
42
  end
42
43
  ```
43
44
 
45
+ With the config of
46
+ ```ruby
47
+ LaMaquina::Engine.install LaMaquina::Piston::SunspotPison
48
+ ```
49
+
50
+ When a `machete` updates, the piston will fire, re-indexing its `danny_trejo`.
51
+
44
52
  ## Usage
45
53
 
46
54
  There are 4 main components to this gem:
@@ -3,10 +3,7 @@ module LaMaquina
3
3
  class ConstantMap < LaMaquina::DependencyMap::Base
4
4
 
5
5
  def find(notified_class)
6
- notified_class.camelize.constantize
7
- rescue => e
8
- LaMaquina.error_notifier.notify( e,
9
- missing_class: notified_class )
6
+ notified_class.to_s.camelize.constantize
10
7
  end
11
8
  end
12
9
  end
@@ -7,8 +7,6 @@ module LaMaquina
7
7
  submap = submap[key]
8
8
  end
9
9
  submap
10
- rescue => e
11
- LaMaquina.error_notifier.notify( e )
12
10
  end
13
11
  end
14
12
  end
@@ -1,3 +1,3 @@
1
1
  module LaMaquina
2
- VERSION = "1.0.0"
2
+ VERSION = "1.1.0"
3
3
  end
@@ -11,10 +11,10 @@ class ConstantMapTest < ActiveSupport::TestCase
11
11
  assert Admin, @map.find(:admin)
12
12
  end
13
13
 
14
- def test_catches_mapless_lookup
15
- @map.find :lol
16
-
17
- assert_equal NoMethodError, $error.class
14
+ def test_throws_on_mapless_lookup
15
+ assert_raise NameError do
16
+ @map.find :lol
17
+ end
18
18
  end
19
19
 
20
20
  def test_is_with_indifferent_access
@@ -12,11 +12,11 @@ class YamlMapTest < ActiveSupport::TestCase
12
12
  assert 'admin', @map.find(:admin)
13
13
  end
14
14
 
15
- def test_catches_mapless_lookup
16
- map = LaMaquina::DependencyMap::YamlMap.new
17
- map.find :admin
18
-
19
- assert_equal NoMethodError, $error.class
15
+ def test_throws_mapless_lookup
16
+ assert_raise NoMethodError do
17
+ map = LaMaquina::DependencyMap::YamlMap.new
18
+ map.find :admin
19
+ end
20
20
  end
21
21
 
22
22
  def test_is_with_indifferent_access
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.0.0
4
+ version: 1.1.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Greg Orlov
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-09-25 00:00:00.000000000 Z
11
+ date: 2015-11-16 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -180,7 +180,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
180
180
  version: '0'
181
181
  requirements: []
182
182
  rubyforge_project:
183
- rubygems_version: 2.4.5
183
+ rubygems_version: 2.4.6
184
184
  signing_key:
185
185
  specification_version: 4
186
186
  summary: depnendency tree update notifications