elasticonf-rails 1.0.0.beta → 1.0.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: 7648e7de52fea84667e6dbd59afdb779c3e842d9
4
- data.tar.gz: 4893c59581906c5cec7b4a12a1026f2cbc21ded5
3
+ metadata.gz: 1b7953d9b2c79d4cd58ae84986e3d4de7ef20cbc
4
+ data.tar.gz: 0cb5a67e4f600ffcadd0e194441547cfb1bf2801
5
5
  SHA512:
6
- metadata.gz: 4fa7a7c1acbf024e97252e6ac935c70c468c0100835f0cb773ff28287c2bc1a25ccac88b769694317bc4c1fd604db2585abb5ce2b5b8479fac6a84f12434d6bd
7
- data.tar.gz: 23bc585a79a1be9cabe710146bbde947237e62ac6f2bea7ea78627ece6cc293b656f6efda72089373988f2c48e68da02cbc2f8c879aaae9fd7dfa51085a7be43
6
+ metadata.gz: e63ee603fb7c768c67a1763473f63ba9e307b341c98dad8549d5648cb6c9eb0c2c45d0f18a7942b9ef063a14e3c7bcc9d40273a46f6673e556cef4ccd2a126ca
7
+ data.tar.gz: 7646c033e908b8d29538ca8031b902e59757923c3de11234a1fb79dee181945679424a564d158bb1760419b07ee2ba75a0a6c51318684a31f42ce2be380e5812
data/.travis.yml CHANGED
@@ -2,6 +2,7 @@ language: ruby
2
2
 
3
3
  rvm:
4
4
  - ruby-head
5
+ - 2.1.2
5
6
  - 2.1.1
6
7
  - 2.1.0
7
8
  - 2.0.0
data/Gemfile.lock CHANGED
@@ -1,46 +1,46 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- elasticonf-rails (1.0.0.beta)
4
+ elasticonf-rails (1.0.0)
5
5
  elasticonf (~> 1.1)
6
6
  rails (>= 3.0)
7
7
 
8
8
  GEM
9
9
  remote: https://rubygems.org/
10
10
  specs:
11
- actionmailer (4.1.4)
12
- actionpack (= 4.1.4)
13
- actionview (= 4.1.4)
14
- mail (~> 2.5.4)
15
- actionpack (4.1.4)
16
- actionview (= 4.1.4)
17
- activesupport (= 4.1.4)
11
+ actionmailer (4.1.6)
12
+ actionpack (= 4.1.6)
13
+ actionview (= 4.1.6)
14
+ mail (~> 2.5, >= 2.5.4)
15
+ actionpack (4.1.6)
16
+ actionview (= 4.1.6)
17
+ activesupport (= 4.1.6)
18
18
  rack (~> 1.5.2)
19
19
  rack-test (~> 0.6.2)
20
- actionview (4.1.4)
21
- activesupport (= 4.1.4)
20
+ actionview (4.1.6)
21
+ activesupport (= 4.1.6)
22
22
  builder (~> 3.1)
23
23
  erubis (~> 2.7.0)
24
- activemodel (4.1.4)
25
- activesupport (= 4.1.4)
24
+ activemodel (4.1.6)
25
+ activesupport (= 4.1.6)
26
26
  builder (~> 3.1)
27
- activerecord (4.1.4)
28
- activemodel (= 4.1.4)
29
- activesupport (= 4.1.4)
27
+ activerecord (4.1.6)
28
+ activemodel (= 4.1.6)
29
+ activesupport (= 4.1.6)
30
30
  arel (~> 5.0.0)
31
- activesupport (4.1.4)
31
+ activesupport (4.1.6)
32
32
  i18n (~> 0.6, >= 0.6.9)
33
33
  json (~> 1.7, >= 1.7.7)
34
34
  minitest (~> 5.1)
35
35
  thread_safe (~> 0.1)
36
36
  tzinfo (~> 1.1)
37
- appraisal (1.0.0)
37
+ appraisal (1.0.2)
38
38
  bundler
39
39
  rake
40
40
  thor (>= 0.14.0)
41
41
  arel (5.0.1.20140414130214)
42
42
  builder (3.2.2)
43
- coveralls (0.7.0)
43
+ coveralls (0.7.1)
44
44
  multi_json (~> 1.3)
45
45
  rest-client
46
46
  simplecov (>= 0.7)
@@ -48,41 +48,39 @@ GEM
48
48
  thor
49
49
  diff-lcs (1.2.5)
50
50
  docile (1.1.5)
51
- elasticonf (1.1.2)
52
- hashie (~> 3.1)
51
+ elasticonf (1.1.3)
52
+ hashie (>= 2.0)
53
53
  erubis (2.7.0)
54
- hashie (3.2.0)
54
+ hashie (3.3.1)
55
55
  hike (1.2.3)
56
56
  i18n (0.6.11)
57
57
  json (1.8.1)
58
- mail (2.5.4)
59
- mime-types (~> 1.16)
60
- treetop (~> 1.4.8)
61
- mime-types (1.25.1)
62
- minitest (5.4.0)
58
+ mail (2.6.1)
59
+ mime-types (>= 1.16, < 3)
60
+ mime-types (2.3)
61
+ minitest (5.4.1)
63
62
  multi_json (1.10.1)
64
63
  netrc (0.7.7)
65
- polyglot (0.3.5)
66
64
  rack (1.5.2)
67
65
  rack-test (0.6.2)
68
66
  rack (>= 1.0)
69
- rails (4.1.4)
70
- actionmailer (= 4.1.4)
71
- actionpack (= 4.1.4)
72
- actionview (= 4.1.4)
73
- activemodel (= 4.1.4)
74
- activerecord (= 4.1.4)
75
- activesupport (= 4.1.4)
67
+ rails (4.1.6)
68
+ actionmailer (= 4.1.6)
69
+ actionpack (= 4.1.6)
70
+ actionview (= 4.1.6)
71
+ activemodel (= 4.1.6)
72
+ activerecord (= 4.1.6)
73
+ activesupport (= 4.1.6)
76
74
  bundler (>= 1.3.0, < 2.0)
77
- railties (= 4.1.4)
75
+ railties (= 4.1.6)
78
76
  sprockets-rails (~> 2.0)
79
- railties (4.1.4)
80
- actionpack (= 4.1.4)
81
- activesupport (= 4.1.4)
77
+ railties (4.1.6)
78
+ actionpack (= 4.1.6)
79
+ activesupport (= 4.1.6)
82
80
  rake (>= 0.8.7)
83
81
  thor (>= 0.18.1, < 2.0)
84
82
  rake (10.3.2)
85
- rest-client (1.7.1)
83
+ rest-client (1.7.2)
86
84
  mime-types (>= 1.16, < 3.0)
87
85
  netrc (~> 0.7)
88
86
  rspec-core (2.14.8)
@@ -97,17 +95,17 @@ GEM
97
95
  rspec-core (~> 2.14.0)
98
96
  rspec-expectations (~> 2.14.0)
99
97
  rspec-mocks (~> 2.14.0)
100
- simplecov (0.8.2)
98
+ simplecov (0.9.0)
101
99
  docile (~> 1.1.0)
102
100
  multi_json
103
101
  simplecov-html (~> 0.8.0)
104
102
  simplecov-html (0.8.0)
105
- sprockets (2.12.1)
103
+ sprockets (2.12.2)
106
104
  hike (~> 1.2)
107
105
  multi_json (~> 1.0)
108
106
  rack (~> 1.0)
109
107
  tilt (~> 1.1, != 1.3.0)
110
- sprockets-rails (2.1.3)
108
+ sprockets-rails (2.1.4)
111
109
  actionpack (>= 3.0)
112
110
  activesupport (>= 3.0)
113
111
  sprockets (~> 2.8)
@@ -117,11 +115,8 @@ GEM
117
115
  thor (0.19.1)
118
116
  thread_safe (0.3.4)
119
117
  tilt (1.4.1)
120
- tins (1.3.0)
121
- treetop (1.4.15)
122
- polyglot
123
- polyglot (>= 0.3.1)
124
- tzinfo (1.2.1)
118
+ tins (1.3.2)
119
+ tzinfo (1.2.2)
125
120
  thread_safe (~> 0.1)
126
121
  yard (0.8.7.4)
127
122
 
@@ -1,2 +1,3 @@
1
1
  require 'elasticonf_rails/version'
2
- require 'elasticonf_rails/railtie'
2
+ require 'elasticonf_rails/railtie'
3
+ require 'elasticonf_rails/reloader'
@@ -14,5 +14,12 @@ module ElasticonfRails
14
14
 
15
15
  Elasticonf.load!
16
16
  end
17
+
18
+ if Rails.env.development? || Rails.env.test?
19
+ initializer 'elasticonf.reloader' do |app|
20
+ # Middleware that reloads Elasticonf on every request
21
+ app.middleware.use ElasticonfRails::Reloader
22
+ end
23
+ end
17
24
  end
18
25
  end
@@ -0,0 +1,12 @@
1
+ module ElasticonfRails
2
+ class Reloader
3
+ def initialize(app)
4
+ @app = app
5
+ end
6
+
7
+ def call(env)
8
+ Elasticonf.reload!
9
+ @app.call env
10
+ end
11
+ end
12
+ end
@@ -1,3 +1,3 @@
1
1
  module ElasticonfRails
2
- VERSION = '1.0.0.beta'
2
+ VERSION = '1.0.0'
3
3
  end
@@ -1,3 +1,7 @@
1
1
  class ApplicationController < ActionController::Base
2
2
  protect_from_forgery
3
- end
3
+
4
+ def index
5
+ head :ok
6
+ end
7
+ end
@@ -1,2 +1,3 @@
1
1
  Rails3::Application.routes.draw do
2
+ root to: 'application#index'
2
3
  end
@@ -1,3 +1,7 @@
1
1
  class ApplicationController < ActionController::Base
2
2
  protect_from_forgery
3
- end
3
+
4
+ def index
5
+ head :ok
6
+ end
7
+ end
@@ -1,2 +1,3 @@
1
1
  Rails3::Application.routes.draw do
2
+ root to: 'application#index'
2
3
  end
@@ -1,3 +1,7 @@
1
1
  class ApplicationController < ActionController::Base
2
2
  protect_from_forgery
3
- end
3
+
4
+ def index
5
+ head :ok
6
+ end
7
+ end
@@ -1,2 +1,3 @@
1
1
  Rails3::Application.routes.draw do
2
+ root to: 'application#index'
2
3
  end
@@ -2,4 +2,8 @@ class ApplicationController < ActionController::Base
2
2
  # Prevent CSRF attacks by raising an exception.
3
3
  # For APIs, you may want to use :null_session instead.
4
4
  protect_from_forgery with: :exception
5
- end
5
+
6
+ def index
7
+ head :ok
8
+ end
9
+ end
@@ -1,2 +1,3 @@
1
1
  Rails4::Application.routes.draw do
2
+ root 'application#index'
2
3
  end
@@ -2,4 +2,8 @@ class ApplicationController < ActionController::Base
2
2
  # Prevent CSRF attacks by raising an exception.
3
3
  # For APIs, you may want to use :null_session instead.
4
4
  protect_from_forgery with: :exception
5
- end
5
+
6
+ def index
7
+ head :ok
8
+ end
9
+ end
@@ -1,2 +1,3 @@
1
1
  Rails4::Application.routes.draw do
2
+ root 'application#index'
2
3
  end
@@ -0,0 +1,14 @@
1
+ require 'spec_helper'
2
+
3
+ describe 'Root request' do
4
+ let(:url) { '/' }
5
+
6
+ it 'should not raise an error' do
7
+ expect { get(url) }.not_to raise_error
8
+ end
9
+
10
+ it 'should reload Elasticonf on every request' do
11
+ Elasticonf.should_receive :reload!
12
+ get url
13
+ end
14
+ end
metadata CHANGED
@@ -1,111 +1,111 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: elasticonf-rails
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.0.beta
4
+ version: 1.0.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Sergey Rezvanov
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-07-11 00:00:00.000000000 Z
11
+ date: 2014-09-16 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails
15
15
  requirement: !ruby/object:Gem::Requirement
16
16
  requirements:
17
- - - '>='
17
+ - - ">="
18
18
  - !ruby/object:Gem::Version
19
19
  version: '3.0'
20
20
  type: :runtime
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
- - - '>='
24
+ - - ">="
25
25
  - !ruby/object:Gem::Version
26
26
  version: '3.0'
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: elasticonf
29
29
  requirement: !ruby/object:Gem::Requirement
30
30
  requirements:
31
- - - ~>
31
+ - - "~>"
32
32
  - !ruby/object:Gem::Version
33
33
  version: '1.1'
34
34
  type: :runtime
35
35
  prerelease: false
36
36
  version_requirements: !ruby/object:Gem::Requirement
37
37
  requirements:
38
- - - ~>
38
+ - - "~>"
39
39
  - !ruby/object:Gem::Version
40
40
  version: '1.1'
41
41
  - !ruby/object:Gem::Dependency
42
42
  name: appraisal
43
43
  requirement: !ruby/object:Gem::Requirement
44
44
  requirements:
45
- - - '>='
45
+ - - ">="
46
46
  - !ruby/object:Gem::Version
47
47
  version: '0'
48
48
  type: :development
49
49
  prerelease: false
50
50
  version_requirements: !ruby/object:Gem::Requirement
51
51
  requirements:
52
- - - '>='
52
+ - - ">="
53
53
  - !ruby/object:Gem::Version
54
54
  version: '0'
55
55
  - !ruby/object:Gem::Dependency
56
56
  name: sqlite3
57
57
  requirement: !ruby/object:Gem::Requirement
58
58
  requirements:
59
- - - '>='
59
+ - - ">="
60
60
  - !ruby/object:Gem::Version
61
61
  version: '0'
62
62
  type: :development
63
63
  prerelease: false
64
64
  version_requirements: !ruby/object:Gem::Requirement
65
65
  requirements:
66
- - - '>='
66
+ - - ">="
67
67
  - !ruby/object:Gem::Version
68
68
  version: '0'
69
69
  - !ruby/object:Gem::Dependency
70
70
  name: rake
71
71
  requirement: !ruby/object:Gem::Requirement
72
72
  requirements:
73
- - - ~>
73
+ - - "~>"
74
74
  - !ruby/object:Gem::Version
75
75
  version: '10.3'
76
76
  type: :development
77
77
  prerelease: false
78
78
  version_requirements: !ruby/object:Gem::Requirement
79
79
  requirements:
80
- - - ~>
80
+ - - "~>"
81
81
  - !ruby/object:Gem::Version
82
82
  version: '10.3'
83
83
  - !ruby/object:Gem::Dependency
84
84
  name: rspec-rails
85
85
  requirement: !ruby/object:Gem::Requirement
86
86
  requirements:
87
- - - ~>
87
+ - - "~>"
88
88
  - !ruby/object:Gem::Version
89
89
  version: 2.14.0
90
90
  type: :development
91
91
  prerelease: false
92
92
  version_requirements: !ruby/object:Gem::Requirement
93
93
  requirements:
94
- - - ~>
94
+ - - "~>"
95
95
  - !ruby/object:Gem::Version
96
96
  version: 2.14.0
97
97
  - !ruby/object:Gem::Dependency
98
98
  name: yard
99
99
  requirement: !ruby/object:Gem::Requirement
100
100
  requirements:
101
- - - ~>
101
+ - - "~>"
102
102
  - !ruby/object:Gem::Version
103
103
  version: '0.8'
104
104
  type: :development
105
105
  prerelease: false
106
106
  version_requirements: !ruby/object:Gem::Requirement
107
107
  requirements:
108
- - - ~>
108
+ - - "~>"
109
109
  - !ruby/object:Gem::Version
110
110
  version: '0.8'
111
111
  description: ElasticonfRails integrates Elasticonf to your Ruby on Rails application
@@ -115,9 +115,9 @@ executables: []
115
115
  extensions: []
116
116
  extra_rdoc_files: []
117
117
  files:
118
- - .gitignore
119
- - .rspec
120
- - .travis.yml
118
+ - ".gitignore"
119
+ - ".rspec"
120
+ - ".travis.yml"
121
121
  - Appraisals
122
122
  - Gemfile
123
123
  - Gemfile.lock
@@ -140,6 +140,7 @@ files:
140
140
  - lib/elasticonf-rails.rb
141
141
  - lib/elasticonf_rails.rb
142
142
  - lib/elasticonf_rails/railtie.rb
143
+ - lib/elasticonf_rails/reloader.rb
143
144
  - lib/elasticonf_rails/version.rb
144
145
  - spec/apps/rails_3.0/Rakefile
145
146
  - spec/apps/rails_3.0/app/controllers/application_controller.rb
@@ -289,6 +290,7 @@ files:
289
290
  - spec/apps/rails_4.1/public/422.html
290
291
  - spec/apps/rails_4.1/public/500.html
291
292
  - spec/lib/elasticonf_rails_spec.rb
293
+ - spec/requests/root_spec.rb
292
294
  - spec/spec_helper.rb
293
295
  homepage: https://github.com/rezwyi/elasticonf-rails
294
296
  licenses:
@@ -300,14 +302,14 @@ require_paths:
300
302
  - lib
301
303
  required_ruby_version: !ruby/object:Gem::Requirement
302
304
  requirements:
303
- - - '>='
305
+ - - ">="
304
306
  - !ruby/object:Gem::Version
305
307
  version: '1.9'
306
308
  required_rubygems_version: !ruby/object:Gem::Requirement
307
309
  requirements:
308
- - - '>'
310
+ - - ">="
309
311
  - !ruby/object:Gem::Version
310
- version: 1.3.1
312
+ version: '0'
311
313
  requirements: []
312
314
  rubyforge_project:
313
315
  rubygems_version: 2.2.2