harbinger 0.2.2 → 0.2.3

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: 41674176d795f9d3ac2fbcb2d24bfacecd07566a
4
- data.tar.gz: eac7b7fe3cf0729dcc8e264a0d73210d19ebffb2
3
+ metadata.gz: b0bea4c48dcc7229a5fad10890156d7bd4f2eacd
4
+ data.tar.gz: ca2757f4f3c39c94d1dc2729627f51b9d169026a
5
5
  SHA512:
6
- metadata.gz: 8a72f34ec36870117d26b5194a8c269b59e63d038dba7c73e140f17efd3e5c14aea004e6966b35c83c3707b3f0ea9e8c667ee9b8dc1f65a663a9e1fe9d624afa
7
- data.tar.gz: 46912c4dc3094163fcbb201ad8b4fa7808cc9405ef23bebd046ccb6b7993d9445d6752bc99d1d19834d6158947e2f2cd397e8cb3b0d67257ff6acfc694f58e57
6
+ metadata.gz: b2d294197b4351ebb4e5f8cedb0dccd755848b85070415134ad9c9ffce602145e67e92be2fd48069b909ecccdce7b64b43ea3e79b4e3ba29fadd1e40a9098570
7
+ data.tar.gz: 72e24439e10044ccc947a137b6fc682b598558fc8a81469cad0daa5a175fdd01b4a3b95c5da913d737c0d4fb14f2117ffb3995dca6c6dde82efeb4e5143a91d3
@@ -17,8 +17,6 @@
17
17
  </fieldset>
18
18
  <% end %>
19
19
 
20
- <%= paginate messages %>
21
-
22
20
  <table>
23
21
  <caption>Messages</caption>
24
22
  <thead>
@@ -107,4 +107,19 @@ module Harbinger
107
107
  configuration.database_storage
108
108
  end
109
109
 
110
+
111
+ # As per an isolated_namespace Rails engine.
112
+ # But the isolated namespace creates issues.
113
+ # @api private
114
+ def table_name_prefix
115
+ 'harbinger_'
116
+ end
117
+
118
+ # Because I am not using isolate_namespace for Orcid::Engine
119
+ # I need this for the application router to find the appropriate routes.
120
+ # @api private
121
+ def use_relative_model_naming?
122
+ true
123
+ end
124
+
110
125
  end
@@ -5,7 +5,7 @@ module Harbinger
5
5
  private :method_names
6
6
  def initialize(request, config = {})
7
7
  @request = request
8
- @method_names = config.fetch(:method_names) { ['path', 'params', 'user_agent'] }
8
+ @method_names = config.fetch(:method_names) { ['path', 'user_agent'] }
9
9
  end
10
10
 
11
11
  def accept(message)
@@ -1,3 +1,3 @@
1
1
  module Harbinger
2
- VERSION = "0.2.2"
2
+ VERSION = "0.2.3"
3
3
  end
@@ -15,7 +15,6 @@ module Harbinger::Reporters
15
15
 
16
16
  When { reporter.accept(message) }
17
17
  Then { expect(message).to have_received(:append).with('request', 'path', request.path) }
18
- And { expect(message).to have_received(:append).with('request', 'params', request.params) }
19
18
  And { expect(message).to have_received(:append).with('request', 'user_agent', request.user_agent) }
20
19
 
21
20
  end
@@ -18,7 +18,6 @@ describe Harbinger do
18
18
  Then do expect(message.attributes).to eq(
19
19
  'user.username' => [user.username],
20
20
  'request.path' => [request.path],
21
- 'request.params' => [request.params],
22
21
  'request.user_agent' => [request.user_agent]
23
22
  )
24
23
  end
@@ -31,7 +30,6 @@ describe Harbinger do
31
30
  Then do expect(message.attributes).to eq(
32
31
  'user.username' => [user.username],
33
32
  'request.path' => [request.path],
34
- 'request.params' => [request.params],
35
33
  'request.user_agent' => [request.user_agent]
36
34
  )
37
35
  end
@@ -12,5 +12,13 @@ module Harbinger
12
12
  expect(message_path('1')).to eq('/harbinger/messages/1')
13
13
  end
14
14
 
15
+ it 'should route actions based on namespace' do
16
+ expect(
17
+ url_for(
18
+ { action: "index", controller: "harbinger/messages", page: nil, only_path: true }
19
+ )
20
+ ).to eq('/harbinger/messages')
21
+ end
22
+
15
23
  end
16
24
  end
@@ -16,7 +16,7 @@ describe 'harbinger/messages/index.html.erb', type: :view do
16
16
  end
17
17
  let(:harbinger) { double("Engine", message_path: true, messages_path: '/messages/') }
18
18
  it 'renders the object and fieldsets' do
19
- expect(view).to receive(:paginate).with([message])
19
+ expect(view).to_not receive(:paginate).with([message])
20
20
  expect(harbinger).to receive(:message_path).with(message.to_param).and_return("/messages/#{message.to_param}")
21
21
  render template: "harbinger/messages/index.html.erb", locals: { messages: [message], harbinger: harbinger }
22
22
  expect(rendered).to have_tag('.search-form') do
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: harbinger
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.2
4
+ version: 0.2.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jeremy Friesen
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-08-19 00:00:00.000000000 Z
11
+ date: 2014-10-09 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: kaminari