raygun 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 +5 -5
- data/.rubocop.yml +99 -0
- data/.ruby-version +1 -1
- data/CHANGES.md +38 -0
- data/Gemfile +1 -1
- data/README.md +81 -39
- data/Rakefile +9 -1
- data/bin/raygun +2 -2
- data/bin/setup +6 -0
- data/lib/colorize.rb +55 -55
- data/lib/raygun/raygun.rb +159 -148
- data/lib/raygun/template_repo.rb +78 -0
- data/lib/raygun/version.rb +1 -1
- data/raygun.gemspec +13 -8
- data/spec/raygun/raygun.rb +3 -0
- data/spec/raygun/runner_spec.rb +27 -0
- data/spec/spec_helper.rb +1 -0
- metadata +76 -11
data/lib/raygun/version.rb
CHANGED
data/raygun.gemspec
CHANGED
@@ -1,23 +1,28 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
File.expand_path('../lib', __FILE__).tap do |lib|
|
1
|
+
File.expand_path("lib", __dir__).tap do |lib|
|
4
2
|
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
5
3
|
end
|
6
4
|
|
7
|
-
require
|
5
|
+
require "raygun/version"
|
8
6
|
|
9
7
|
Gem::Specification.new do |gem|
|
10
8
|
gem.name = "raygun"
|
11
9
|
gem.version = Raygun::VERSION
|
12
10
|
gem.authors = ["Christian Nelson", "Jonah Williams", "Jason Wadsworth"]
|
13
11
|
gem.email = ["christian@carbonfive.com"]
|
14
|
-
gem.description =
|
15
|
-
gem.summary =
|
12
|
+
gem.description = "Carbon Five Rails application generator"
|
13
|
+
gem.summary = "Generates and customizes Rails applications with Carbon Five best practices baked in."
|
16
14
|
gem.homepage = "https://github.com/carbonfive/raygun"
|
17
|
-
gem.license =
|
15
|
+
gem.license = "MIT"
|
18
16
|
|
19
|
-
gem.files = `git ls-files`.split(
|
17
|
+
gem.files = `git ls-files`.split($INPUT_RECORD_SEPARATOR)
|
20
18
|
gem.executables = gem.files.grep(%r{^bin/}).map { |f| File.basename(f) }
|
21
19
|
gem.test_files = gem.files.grep(%r{^(test|spec|features)/})
|
22
20
|
gem.require_paths = ["lib"]
|
21
|
+
|
22
|
+
gem.required_ruby_version = "~> 2.4"
|
23
|
+
|
24
|
+
gem.add_development_dependency "bundler", "~> 2.0"
|
25
|
+
gem.add_development_dependency "rake", "~> 13.0"
|
26
|
+
gem.add_development_dependency "rspec", "~> 3.9"
|
27
|
+
gem.add_development_dependency "rubocop", "0.79.0"
|
23
28
|
end
|
@@ -0,0 +1,27 @@
|
|
1
|
+
require_relative "../spec_helper"
|
2
|
+
require_relative "../../lib/raygun/raygun"
|
3
|
+
|
4
|
+
describe Raygun::Runner do
|
5
|
+
describe "#fetch_rubocop_file" do
|
6
|
+
context "the repo is the standard carbonfive raygun-rails repo" do
|
7
|
+
before do
|
8
|
+
@runner = described_class.new("target/dir", "carbonfive/raygun-rails")
|
9
|
+
allow(URI).to receive(:open).and_return(StringIO.new("# rubocop contents"))
|
10
|
+
allow(IO).to receive(:write)
|
11
|
+
allow(@runner).to receive(:shell).and_return("GitSHAgoeshere")
|
12
|
+
end
|
13
|
+
it "inserts a copy of the rubocop file pulled from the carbonfive/c5-conventions repo" do
|
14
|
+
@runner.send(:fetch_rubocop_file)
|
15
|
+
expect(@runner).to have_received(:shell)
|
16
|
+
.with("git ls-remote https://github.com/carbonfive/c5-conventions master")
|
17
|
+
expect(URI).to have_received(:open)
|
18
|
+
.with("https://raw.githubusercontent.com/carbonfive/c5-conventions/master/rubocop/rubocop.yml")
|
19
|
+
expect(IO).to have_received(:write) do |path, contents|
|
20
|
+
expect(path).to eq(File.absolute_path("target/dir/.rubocop.yml"))
|
21
|
+
expect(contents).to include("@ GitSHA")
|
22
|
+
expect(contents).to include("# rubocop contents")
|
23
|
+
end
|
24
|
+
end
|
25
|
+
end
|
26
|
+
end
|
27
|
+
end
|
data/spec/spec_helper.rb
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
require "rspec"
|
metadata
CHANGED
@@ -1,26 +1,84 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: raygun
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: 1.1.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Christian Nelson
|
8
8
|
- Jonah Williams
|
9
9
|
- Jason Wadsworth
|
10
|
-
autorequire:
|
10
|
+
autorequire:
|
11
11
|
bindir: bin
|
12
12
|
cert_chain: []
|
13
|
-
date:
|
14
|
-
dependencies:
|
13
|
+
date: 2020-07-02 00:00:00.000000000 Z
|
14
|
+
dependencies:
|
15
|
+
- !ruby/object:Gem::Dependency
|
16
|
+
name: bundler
|
17
|
+
requirement: !ruby/object:Gem::Requirement
|
18
|
+
requirements:
|
19
|
+
- - "~>"
|
20
|
+
- !ruby/object:Gem::Version
|
21
|
+
version: '2.0'
|
22
|
+
type: :development
|
23
|
+
prerelease: false
|
24
|
+
version_requirements: !ruby/object:Gem::Requirement
|
25
|
+
requirements:
|
26
|
+
- - "~>"
|
27
|
+
- !ruby/object:Gem::Version
|
28
|
+
version: '2.0'
|
29
|
+
- !ruby/object:Gem::Dependency
|
30
|
+
name: rake
|
31
|
+
requirement: !ruby/object:Gem::Requirement
|
32
|
+
requirements:
|
33
|
+
- - "~>"
|
34
|
+
- !ruby/object:Gem::Version
|
35
|
+
version: '13.0'
|
36
|
+
type: :development
|
37
|
+
prerelease: false
|
38
|
+
version_requirements: !ruby/object:Gem::Requirement
|
39
|
+
requirements:
|
40
|
+
- - "~>"
|
41
|
+
- !ruby/object:Gem::Version
|
42
|
+
version: '13.0'
|
43
|
+
- !ruby/object:Gem::Dependency
|
44
|
+
name: rspec
|
45
|
+
requirement: !ruby/object:Gem::Requirement
|
46
|
+
requirements:
|
47
|
+
- - "~>"
|
48
|
+
- !ruby/object:Gem::Version
|
49
|
+
version: '3.9'
|
50
|
+
type: :development
|
51
|
+
prerelease: false
|
52
|
+
version_requirements: !ruby/object:Gem::Requirement
|
53
|
+
requirements:
|
54
|
+
- - "~>"
|
55
|
+
- !ruby/object:Gem::Version
|
56
|
+
version: '3.9'
|
57
|
+
- !ruby/object:Gem::Dependency
|
58
|
+
name: rubocop
|
59
|
+
requirement: !ruby/object:Gem::Requirement
|
60
|
+
requirements:
|
61
|
+
- - '='
|
62
|
+
- !ruby/object:Gem::Version
|
63
|
+
version: 0.79.0
|
64
|
+
type: :development
|
65
|
+
prerelease: false
|
66
|
+
version_requirements: !ruby/object:Gem::Requirement
|
67
|
+
requirements:
|
68
|
+
- - '='
|
69
|
+
- !ruby/object:Gem::Version
|
70
|
+
version: 0.79.0
|
15
71
|
description: Carbon Five Rails application generator
|
16
72
|
email:
|
17
73
|
- christian@carbonfive.com
|
18
74
|
executables:
|
19
75
|
- raygun
|
76
|
+
- setup
|
20
77
|
extensions: []
|
21
78
|
extra_rdoc_files: []
|
22
79
|
files:
|
23
80
|
- ".gitignore"
|
81
|
+
- ".rubocop.yml"
|
24
82
|
- ".ruby-gemset"
|
25
83
|
- ".ruby-version"
|
26
84
|
- CHANGES.md
|
@@ -29,34 +87,41 @@ files:
|
|
29
87
|
- README.md
|
30
88
|
- Rakefile
|
31
89
|
- bin/raygun
|
90
|
+
- bin/setup
|
32
91
|
- lib/colorize.rb
|
33
92
|
- lib/raygun/raygun.rb
|
93
|
+
- lib/raygun/template_repo.rb
|
34
94
|
- lib/raygun/version.rb
|
35
95
|
- marvin.jpg
|
36
96
|
- raygun.gemspec
|
97
|
+
- spec/raygun/raygun.rb
|
98
|
+
- spec/raygun/runner_spec.rb
|
99
|
+
- spec/spec_helper.rb
|
37
100
|
homepage: https://github.com/carbonfive/raygun
|
38
101
|
licenses:
|
39
102
|
- MIT
|
40
103
|
metadata: {}
|
41
|
-
post_install_message:
|
104
|
+
post_install_message:
|
42
105
|
rdoc_options: []
|
43
106
|
require_paths:
|
44
107
|
- lib
|
45
108
|
required_ruby_version: !ruby/object:Gem::Requirement
|
46
109
|
requirements:
|
47
|
-
- - "
|
110
|
+
- - "~>"
|
48
111
|
- !ruby/object:Gem::Version
|
49
|
-
version: '
|
112
|
+
version: '2.4'
|
50
113
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
51
114
|
requirements:
|
52
115
|
- - ">="
|
53
116
|
- !ruby/object:Gem::Version
|
54
117
|
version: '0'
|
55
118
|
requirements: []
|
56
|
-
|
57
|
-
|
58
|
-
signing_key:
|
119
|
+
rubygems_version: 3.0.3
|
120
|
+
signing_key:
|
59
121
|
specification_version: 4
|
60
122
|
summary: Generates and customizes Rails applications with Carbon Five best practices
|
61
123
|
baked in.
|
62
|
-
test_files:
|
124
|
+
test_files:
|
125
|
+
- spec/raygun/raygun.rb
|
126
|
+
- spec/raygun/runner_spec.rb
|
127
|
+
- spec/spec_helper.rb
|