jt-rails-toolbox 1.0.3 → 1.0.4

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: f7a38a4b48aa7a0ebeae62e39ea779e4dd3185f6
4
- data.tar.gz: 07e71be0bc4275e67343c5ac37e4adb31ce5a26e
3
+ metadata.gz: 278ac27db6f2baf0183f79be1da653a138f17d9e
4
+ data.tar.gz: f7f127dc522c71f51d7be0f5c54a2adf672ea814
5
5
  SHA512:
6
- metadata.gz: be1fa5274efd9d1f364dd0a985850a861fac60eba9453ac0f53f43ac58cd36db2e0d3cfb661aa019193cf330c1baae2bf1c11eb18acb552c797279484f8a7d38
7
- data.tar.gz: c7247c272ba29899e8ec6ac627f97b8858b53131d181ed810c03b26b02a8c20c5a31c2e0ad2a16a9703c090910f16a897764e05b85a4d914bb42694b8c6864df
6
+ metadata.gz: 4a23e2e8450321fe8868ccb38b45362035f53b95ec69eafe34923c99ca0c76297fcb1f73f86905a9b169e3e98db60cc56c6ad19e548caec00d0baf02f52b8614
7
+ data.tar.gz: f4e0e3188bf97cda4b2fe42318f39ebeb6133a5496f842094bfbb4be455fd148a397ab5b5bed64f6ece3c7cce3a706060187eae628f09cdef096609cd01b992b
data/README.md CHANGED
@@ -42,11 +42,11 @@ In addition to the default ignored exceptions, the following exceptions are also
42
42
 
43
43
  - configured for `ActiveJob`
44
44
  - configured to send notification error with Exception Notification
45
- - redis url is by default `"redis://localhost:6379/#{name of your}"`
45
+ - redis url is by default `"redis://localhost:6379/#{name of your application}"`
46
46
 
47
47
  #### Warning
48
48
 
49
- Don't forget to install redis server and to launch sidekiq with
49
+ Don't forget to install redis server and to launch sidekiq with:
50
50
 
51
51
  `bundle exec sidekiq -q default -q mailers`
52
52
 
@@ -3,7 +3,7 @@ Gem::Specification.new do |s|
3
3
  s.summary = "Common libs used for Ruby On Rails development."
4
4
  s.description = "JTRailsToolbox contains a list of common libs used for Ruby On Rails development."
5
5
  s.homepage = 'https://github.com/jonathantribouharet/jt-rails-toolbox'
6
- s.version = '1.0.3'
6
+ s.version = '1.0.4'
7
7
  s.files = `git ls-files`.split("\n")
8
8
  s.require_paths = ['lib']
9
9
  s.authors = ['Jonathan TRIBOUHARET']
@@ -9,29 +9,29 @@
9
9
  # cdn_host: same as host
10
10
  # sidekiq:
11
11
  # redis_url: redis://localhost:6379/nameoftheapp
12
-
13
- production:
14
- exception:
15
- email_prefix: '[ERROR]'
16
- sender_address: "Your website <error@example.com>"
17
- exception_recipients:
18
- - my_email_for_errors@example.com
19
- files:
20
- folder: upload
21
- mail:
22
- from: "Your website <contact@example.com>"
23
- delivery_method: smtp
24
- smtp_settings:
25
- address: smtp.gmail.com
26
- port: 587
27
- domain: example.com
28
- user_name: username
29
- password: password
30
- authentication: plain
31
- enable_starttls_auto: true
32
- hosts:
33
- host: https://www.example.com
34
- asset_host: https://asset.example.com
35
- cdn_host: https://cdn.example.com
36
- sidekiq:
37
- redis_url: redis://localhost:6379/my_app
12
+ #
13
+ # production:
14
+ # exception:
15
+ # email_prefix: '[ERROR]'
16
+ # sender_address: "Your website <error@example.com>"
17
+ # exception_recipients:
18
+ # - my_email_for_errors@example.com
19
+ # files:
20
+ # folder: upload
21
+ # mail:
22
+ # from: "Your website <contact@example.com>"
23
+ # delivery_method: smtp
24
+ # smtp_settings:
25
+ # address: smtp.gmail.com
26
+ # port: 587
27
+ # domain: example.com
28
+ # user_name: username
29
+ # password: password
30
+ # authentication: plain
31
+ # enable_starttls_auto: true
32
+ # hosts:
33
+ # host: https://www.example.com
34
+ # asset_host: https://asset.example.com
35
+ # cdn_host: https://cdn.example.com
36
+ # sidekiq:
37
+ # redis_url: redis://localhost:6379/my_app
@@ -18,20 +18,20 @@ module JTRailsToolbox
18
18
  class Railtie < ::Rails::Railtie
19
19
 
20
20
  initializer "jt-rails-toolbox" do |app|
21
- if ::File.exists?('config/jt-toolbox.yml')
22
- load_params(app)
21
+ @params = {}
23
22
 
24
- configure_exception_notification(app)
25
- configure_mail(app)
26
- configure_paperclip(app)
27
- configure_sidekiq(app)
23
+ if ::File.exists?('config/jt-toolbox.yml')
24
+ yaml = YAML.load_file('config/jt-toolbox.yml')
25
+ if yaml
26
+ @params = yaml[Rails.env.to_s] || {}
27
+ end
28
28
  end
29
- end
30
-
31
- def load_params(app)
32
- @params = YAML.load_file('config/jt-toolbox.yml')[Rails.env.to_s] || {}
33
29
 
34
30
  process_params
31
+ configure_exception_notification(app)
32
+ configure_mail(app)
33
+ configure_paperclip(app)
34
+ configure_sidekiq(app)
35
35
  end
36
36
 
37
37
  def process_params
metadata CHANGED
@@ -1,97 +1,97 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: jt-rails-toolbox
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.3
4
+ version: 1.0.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jonathan TRIBOUHARET
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-06-04 00:00:00.000000000 Z
11
+ date: 2015-06-30 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: exception_notification
15
15
  requirement: !ruby/object:Gem::Requirement
16
16
  requirements:
17
- - - "~>"
17
+ - - ~>
18
18
  - !ruby/object:Gem::Version
19
19
  version: '4.1'
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: '4.1'
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: paperclip
29
29
  requirement: !ruby/object:Gem::Requirement
30
30
  requirements:
31
- - - "~>"
31
+ - - ~>
32
32
  - !ruby/object:Gem::Version
33
33
  version: '4.2'
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: '4.2'
41
41
  - !ruby/object:Gem::Dependency
42
42
  name: quiet_assets
43
43
  requirement: !ruby/object:Gem::Requirement
44
44
  requirements:
45
- - - "~>"
45
+ - - ~>
46
46
  - !ruby/object:Gem::Version
47
47
  version: '1.1'
48
48
  type: :runtime
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: '1.1'
55
55
  - !ruby/object:Gem::Dependency
56
56
  name: sidekiq
57
57
  requirement: !ruby/object:Gem::Requirement
58
58
  requirements:
59
- - - "~>"
59
+ - - ~>
60
60
  - !ruby/object:Gem::Version
61
61
  version: '3.3'
62
62
  type: :runtime
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: '3.3'
69
69
  - !ruby/object:Gem::Dependency
70
70
  name: validates_email_format_of
71
71
  requirement: !ruby/object:Gem::Requirement
72
72
  requirements:
73
- - - "~>"
73
+ - - ~>
74
74
  - !ruby/object:Gem::Version
75
75
  version: '1.6'
76
76
  type: :runtime
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: '1.6'
83
83
  - !ruby/object:Gem::Dependency
84
84
  name: rails-i18n
85
85
  requirement: !ruby/object:Gem::Requirement
86
86
  requirements:
87
- - - "~>"
87
+ - - ~>
88
88
  - !ruby/object:Gem::Version
89
89
  version: '4.0'
90
90
  type: :runtime
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: '4.0'
97
97
  description: JTRailsToolbox contains a list of common libs used for Ruby On Rails
@@ -101,7 +101,7 @@ executables: []
101
101
  extensions: []
102
102
  extra_rdoc_files: []
103
103
  files:
104
- - ".gitignore"
104
+ - .gitignore
105
105
  - LICENSE
106
106
  - README.md
107
107
  - jt-rails-toolbox.gemspec
@@ -119,12 +119,12 @@ require_paths:
119
119
  - lib
120
120
  required_ruby_version: !ruby/object:Gem::Requirement
121
121
  requirements:
122
- - - ">="
122
+ - - '>='
123
123
  - !ruby/object:Gem::Version
124
124
  version: '0'
125
125
  required_rubygems_version: !ruby/object:Gem::Requirement
126
126
  requirements:
127
- - - ">="
127
+ - - '>='
128
128
  - !ruby/object:Gem::Version
129
129
  version: '0'
130
130
  requirements: []