roo_on_rails 1.0.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA1:
3
+ metadata.gz: ddca6dd3088fbd3a988a01081fda700a2ad9d792
4
+ data.tar.gz: 381468ec1f033cb280647887867927c602427ec1
5
+ SHA512:
6
+ metadata.gz: d731ec405dd68504fa14659f0cd0770715e7607f356d87b91a4a97a2871cdb226a33d66f6405d316f2f0c2539fa335579a2d959643c434fc293c633356c81d34
7
+ data.tar.gz: 241732ddbaf8db907b2c64ec15454b08f273d483b52ae220630218ea214bb22bf13ae4d2f392d5a9dce8c9738b48c26409b54ce90ae4979bdeca0efa12067a53
data/.gitignore ADDED
@@ -0,0 +1,10 @@
1
+ /.bundle/
2
+ /.yardoc
3
+ /Gemfile.lock
4
+ /_yardoc/
5
+ /coverage/
6
+ /doc/
7
+ /pkg/
8
+ /spec/reports/
9
+ /tmp/
10
+ /vendor/
data/.rspec ADDED
@@ -0,0 +1,2 @@
1
+ --format documentation
2
+ --color
data/.travis.yml ADDED
@@ -0,0 +1,11 @@
1
+ sudo: false
2
+ language: ruby
3
+ rvm:
4
+ - 2.3.3
5
+ - 2.4.0
6
+ install:
7
+ - bundle install --jobs=3 --retry=3 --path=vendor/bundle
8
+ cache:
9
+ bundler: false
10
+ directories:
11
+ - vendor/bundle
data/CHANGELOG.md ADDED
@@ -0,0 +1,4 @@
1
+ # v1.0.0 (2017-01-19)
2
+
3
+ - Automatic New Relic configuration, with safeguards:w
4
+
data/Gemfile ADDED
@@ -0,0 +1,4 @@
1
+ source 'https://rubygems.org'
2
+
3
+ # Specify your gem's dependencies in roo_on_rails.gemspec
4
+ gemspec
data/LICENSE.txt ADDED
@@ -0,0 +1,21 @@
1
+ The MIT License (MIT)
2
+
3
+ Copyright (c) 2017 Julien Letessier
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in
13
+ all copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
21
+ THE SOFTWARE.
data/README.md ADDED
@@ -0,0 +1,44 @@
1
+ # `roo_on_rails` [![Build
2
+ Status](https://travis-ci.org/deliveroo/roo_on_rails.svg?branch=master)](https://travis-ci.org/deliveroo/roo_on_rails)[![Code
3
+ Climate](https://codeclimate.com/repos/58809e664ab8420081007382/badges/3489b7689ab2e0cf5d61/gpa.svg)](https://codeclimate.com/repos/58809e664ab8420081007382/feed)
4
+
5
+ A gem that makes following our [guidelines](http://deliveroo.engineering/guidelines/services/) easy.
6
+
7
+ ## Installation
8
+
9
+ Add this line to your Rails application's Gemfile:
10
+
11
+ ```ruby
12
+ gem 'roo_on_rails'
13
+ ```
14
+
15
+ And then execute:
16
+
17
+ $ bundle
18
+
19
+
20
+ ## Features
21
+
22
+ ### New Relic configuration
23
+
24
+ We enforce configuration of New Relic.
25
+
26
+ 1. Your app must be loaded with a `NEW_RELIC_LICENSE_KEY` environment variable,
27
+ otherwise it will abort.
28
+ 2. No `new_relic.yml` file may be presentin your app. Overrides to New Relic settings
29
+ through [environment
30
+ variables](https://docs.newrelic.com/docs/agents/ruby-agent/installation-configuration/ruby-agent-configuration)
31
+ is permitted.
32
+
33
+ No further configuration is required as the gem confiures our standard settings.
34
+
35
+
36
+ ## Contributing
37
+
38
+ Bug reports and pull requests are welcome on GitHub at https://github.com/deliveroo/roo_on_rails.
39
+
40
+
41
+ ## License
42
+
43
+ The gem is available as open source under the terms of the [MIT License](http://opensource.org/licenses/MIT).
44
+
data/Rakefile ADDED
@@ -0,0 +1,6 @@
1
+ require "bundler/gem_tasks"
2
+ require "rspec/core/rake_task"
3
+
4
+ RSpec::Core::RakeTask.new(:spec)
5
+
6
+ task :default => :spec
data/bin/console ADDED
@@ -0,0 +1,14 @@
1
+ #!/usr/bin/env ruby
2
+
3
+ require "bundler/setup"
4
+ require "roo_on_rails"
5
+
6
+ # You can add fixtures and/or initialization code here to make experimenting
7
+ # with your gem easier. You can also use a different console, if you like.
8
+
9
+ # (If you use this, don't forget to add pry to your Gemfile!)
10
+ # require "pry"
11
+ # Pry.start
12
+
13
+ require "irb"
14
+ IRB.start
data/bin/setup ADDED
@@ -0,0 +1,8 @@
1
+ #!/usr/bin/env bash
2
+ set -euo pipefail
3
+ IFS=$'\n\t'
4
+ set -vx
5
+
6
+ bundle install
7
+
8
+ # Do any other automated setup that you need to do here
data/exe/roo_on_rails ADDED
@@ -0,0 +1,3 @@
1
+ #!/usr/bin/env ruby
2
+
3
+ require "roo_on_rails"
@@ -0,0 +1,7 @@
1
+ require 'roo_on_rails/version'
2
+ require 'dotenv/rails-now'
3
+
4
+ module RooOnRails
5
+ end
6
+
7
+ require 'roo_on_rails/railtie' if defined?(Rails)
@@ -0,0 +1,9 @@
1
+ NEW_RELIC_LOG=stdout
2
+ NEW_RELIC_AGENT_ENABLED=true
3
+ NEW_RELIC_MONITOR_MODE=true
4
+ NEW_RELIC_BROWSER_MONITORING_AUTO_INSTRUMENT=true
5
+ NEW_RELIC_CAPTURE_PARAMS=true
6
+ NEW_RELIC_TRANSACTION_TRACER_RECORD_SQL=obfuscated
7
+ NEW_RELIC_TRANSACTION_TRACER_RECORD_REDIS_ARGUMENTS=true
8
+ NEW_RELIC_DEVELOPER_MODE=false
9
+
@@ -0,0 +1,35 @@
1
+ $stderr.puts 'loading roo_on_rails railtie'
2
+
3
+ module RooOnRails
4
+ class Railtie < Rails::Railtie
5
+ initializer 'roo_on_rails.default_env' do
6
+ $stderr.puts 'initializer roo_on_rails.default_env'
7
+ Dotenv.load File.expand_path('../default.env', __FILE__)
8
+ end
9
+
10
+ # initializer 'roo_on_rails.print_env' do
11
+ # ENV.to_a.sort.each do |k,v|
12
+ # puts "#{k}: #{v}"
13
+ # end
14
+ # end
15
+
16
+ initializer 'roo_on_rails.new_relic' do
17
+ $stderr.puts 'initializer roo_on_rails.new_relic'
18
+
19
+ unless ENV['NEW_RELIC_LICENSE_KEY']
20
+ abort 'Aborting: NEW_RELIC_LICENSE_KEY is required'
21
+ end
22
+
23
+ path = %w[newrelic.yml config/newrelic.yml].map { |p|
24
+ Pathname.new(p)
25
+ }.find(&:exist?)
26
+ if path
27
+ abort "Aborting: newrelic.yml detected in '#{path.parent.realpath}', should not exist"
28
+ end
29
+
30
+ require 'newrelic_rpm'
31
+ ::NewRelic::Agent.manual_start
32
+ end
33
+ end
34
+ end
35
+
@@ -0,0 +1,3 @@
1
+ module RooOnRails
2
+ VERSION = '1.0.0'
3
+ end
@@ -0,0 +1,33 @@
1
+ # coding: utf-8
2
+ lib = File.expand_path('../lib', __FILE__)
3
+ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
4
+ require 'roo_on_rails/version'
5
+
6
+ Gem::Specification.new do |spec|
7
+ spec.name = "roo_on_rails"
8
+ spec.version = RooOnRails::VERSION
9
+ spec.authors = ["Julien Letessier"]
10
+ spec.email = ["julien.letessier@gmail.com"]
11
+
12
+ spec.summary = %q{Scaffolding for building services}
13
+ spec.description = %q{Scaffolding for building services}
14
+ spec.homepage = 'https://github.com/deliveroo/roo_on_rails'
15
+ spec.license = "MIT"
16
+
17
+ spec.files = `git ls-files -z`.split("\x0").reject do |f|
18
+ f.match(%r{^(test|spec|features)/})
19
+ end
20
+ spec.bindir = "exe"
21
+ spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
22
+ spec.require_paths = ["lib"]
23
+
24
+ spec.add_runtime_dependency 'dotenv-rails', '~> 2.1'
25
+ spec.add_runtime_dependency 'newrelic_rpm', '~> 3.17'
26
+ spec.add_runtime_dependency 'rails', '~> 5.0'
27
+
28
+ spec.add_development_dependency "bundler", "~> 1.13"
29
+ spec.add_development_dependency "rake", "~> 10.0"
30
+ spec.add_development_dependency "rspec", "~> 3.0"
31
+ spec.add_development_dependency 'thor', '~> 0.19'
32
+ spec.add_development_dependency 'byebug'
33
+ end
metadata ADDED
@@ -0,0 +1,173 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: roo_on_rails
3
+ version: !ruby/object:Gem::Version
4
+ version: 1.0.0
5
+ platform: ruby
6
+ authors:
7
+ - Julien Letessier
8
+ autorequire:
9
+ bindir: exe
10
+ cert_chain: []
11
+ date: 2017-01-19 00:00:00.000000000 Z
12
+ dependencies:
13
+ - !ruby/object:Gem::Dependency
14
+ name: dotenv-rails
15
+ requirement: !ruby/object:Gem::Requirement
16
+ requirements:
17
+ - - "~>"
18
+ - !ruby/object:Gem::Version
19
+ version: '2.1'
20
+ type: :runtime
21
+ prerelease: false
22
+ version_requirements: !ruby/object:Gem::Requirement
23
+ requirements:
24
+ - - "~>"
25
+ - !ruby/object:Gem::Version
26
+ version: '2.1'
27
+ - !ruby/object:Gem::Dependency
28
+ name: newrelic_rpm
29
+ requirement: !ruby/object:Gem::Requirement
30
+ requirements:
31
+ - - "~>"
32
+ - !ruby/object:Gem::Version
33
+ version: '3.17'
34
+ type: :runtime
35
+ prerelease: false
36
+ version_requirements: !ruby/object:Gem::Requirement
37
+ requirements:
38
+ - - "~>"
39
+ - !ruby/object:Gem::Version
40
+ version: '3.17'
41
+ - !ruby/object:Gem::Dependency
42
+ name: rails
43
+ requirement: !ruby/object:Gem::Requirement
44
+ requirements:
45
+ - - "~>"
46
+ - !ruby/object:Gem::Version
47
+ version: '5.0'
48
+ type: :runtime
49
+ prerelease: false
50
+ version_requirements: !ruby/object:Gem::Requirement
51
+ requirements:
52
+ - - "~>"
53
+ - !ruby/object:Gem::Version
54
+ version: '5.0'
55
+ - !ruby/object:Gem::Dependency
56
+ name: bundler
57
+ requirement: !ruby/object:Gem::Requirement
58
+ requirements:
59
+ - - "~>"
60
+ - !ruby/object:Gem::Version
61
+ version: '1.13'
62
+ type: :development
63
+ prerelease: false
64
+ version_requirements: !ruby/object:Gem::Requirement
65
+ requirements:
66
+ - - "~>"
67
+ - !ruby/object:Gem::Version
68
+ version: '1.13'
69
+ - !ruby/object:Gem::Dependency
70
+ name: rake
71
+ requirement: !ruby/object:Gem::Requirement
72
+ requirements:
73
+ - - "~>"
74
+ - !ruby/object:Gem::Version
75
+ version: '10.0'
76
+ type: :development
77
+ prerelease: false
78
+ version_requirements: !ruby/object:Gem::Requirement
79
+ requirements:
80
+ - - "~>"
81
+ - !ruby/object:Gem::Version
82
+ version: '10.0'
83
+ - !ruby/object:Gem::Dependency
84
+ name: rspec
85
+ requirement: !ruby/object:Gem::Requirement
86
+ requirements:
87
+ - - "~>"
88
+ - !ruby/object:Gem::Version
89
+ version: '3.0'
90
+ type: :development
91
+ prerelease: false
92
+ version_requirements: !ruby/object:Gem::Requirement
93
+ requirements:
94
+ - - "~>"
95
+ - !ruby/object:Gem::Version
96
+ version: '3.0'
97
+ - !ruby/object:Gem::Dependency
98
+ name: thor
99
+ requirement: !ruby/object:Gem::Requirement
100
+ requirements:
101
+ - - "~>"
102
+ - !ruby/object:Gem::Version
103
+ version: '0.19'
104
+ type: :development
105
+ prerelease: false
106
+ version_requirements: !ruby/object:Gem::Requirement
107
+ requirements:
108
+ - - "~>"
109
+ - !ruby/object:Gem::Version
110
+ version: '0.19'
111
+ - !ruby/object:Gem::Dependency
112
+ name: byebug
113
+ requirement: !ruby/object:Gem::Requirement
114
+ requirements:
115
+ - - ">="
116
+ - !ruby/object:Gem::Version
117
+ version: '0'
118
+ type: :development
119
+ prerelease: false
120
+ version_requirements: !ruby/object:Gem::Requirement
121
+ requirements:
122
+ - - ">="
123
+ - !ruby/object:Gem::Version
124
+ version: '0'
125
+ description: Scaffolding for building services
126
+ email:
127
+ - julien.letessier@gmail.com
128
+ executables:
129
+ - roo_on_rails
130
+ extensions: []
131
+ extra_rdoc_files: []
132
+ files:
133
+ - ".gitignore"
134
+ - ".rspec"
135
+ - ".travis.yml"
136
+ - CHANGELOG.md
137
+ - Gemfile
138
+ - LICENSE.txt
139
+ - README.md
140
+ - Rakefile
141
+ - bin/console
142
+ - bin/setup
143
+ - exe/roo_on_rails
144
+ - lib/roo_on_rails.rb
145
+ - lib/roo_on_rails/default.env
146
+ - lib/roo_on_rails/railtie.rb
147
+ - lib/roo_on_rails/version.rb
148
+ - roo_on_rails.gemspec
149
+ homepage: https://github.com/deliveroo/roo_on_rails
150
+ licenses:
151
+ - MIT
152
+ metadata: {}
153
+ post_install_message:
154
+ rdoc_options: []
155
+ require_paths:
156
+ - lib
157
+ required_ruby_version: !ruby/object:Gem::Requirement
158
+ requirements:
159
+ - - ">="
160
+ - !ruby/object:Gem::Version
161
+ version: '0'
162
+ required_rubygems_version: !ruby/object:Gem::Requirement
163
+ requirements:
164
+ - - ">="
165
+ - !ruby/object:Gem::Version
166
+ version: '0'
167
+ requirements: []
168
+ rubyforge_project:
169
+ rubygems_version: 2.5.2
170
+ signing_key:
171
+ specification_version: 4
172
+ summary: Scaffolding for building services
173
+ test_files: []