nxt_support 0.1.0
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 +7 -0
- data/.circleci/config.yml +62 -0
- data/.editorconfig +15 -0
- data/.gitignore +8 -0
- data/.rspec +1 -0
- data/.ruby_version +1 -0
- data/.travis.yml +7 -0
- data/Gemfile +8 -0
- data/Gemfile.lock +163 -0
- data/LICENSE.txt +21 -0
- data/README.md +57 -0
- data/Rakefile +10 -0
- data/bin/console +14 -0
- data/bin/setup +8 -0
- data/lib/nxt_support/models/safely_find_or_createable.rb +25 -0
- data/lib/nxt_support/models.rb +1 -0
- data/lib/nxt_support/version.rb +3 -0
- data/lib/nxt_support.rb +6 -0
- data/nxt_support.gemspec +35 -0
- metadata +135 -0
checksums.yaml
ADDED
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
---
|
|
2
|
+
SHA256:
|
|
3
|
+
metadata.gz: ccf77d9e246edf43e011d66dfb2486622819c28adf921c8dfa28812c36d83028
|
|
4
|
+
data.tar.gz: b75dfe040f31444f331cfb6d772429c3f3a1cc8659265fb80fdf4757fb05af30
|
|
5
|
+
SHA512:
|
|
6
|
+
metadata.gz: 402f17412b26c3c04a0945f075b52bafe3ca3f533bc61d427154572262d53eb74d730f12638efe27c923742e2ce8924431dce4a5f575e395f5651f24779810cc
|
|
7
|
+
data.tar.gz: ddc4fc3c424dbc88c4b8431e022bf098510bdeea72df77414b16482c8491abb71ab447aa5d48112988f4374c4a71ba46b2c57f5f8208822950ae490aee95e901
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
# Ruby CircleCI 2.0 configuration file
|
|
2
|
+
#
|
|
3
|
+
# Check https://circleci.com/docs/2.0/language-ruby/ for more details
|
|
4
|
+
#
|
|
5
|
+
version: 2
|
|
6
|
+
jobs:
|
|
7
|
+
build:
|
|
8
|
+
docker:
|
|
9
|
+
# specify the version you desire here
|
|
10
|
+
- image: circleci/ruby:2.6.4-node
|
|
11
|
+
|
|
12
|
+
working_directory: ~/repo
|
|
13
|
+
|
|
14
|
+
steps:
|
|
15
|
+
- checkout
|
|
16
|
+
|
|
17
|
+
- run:
|
|
18
|
+
name: Install apt dependencies
|
|
19
|
+
command: |
|
|
20
|
+
sudo apt update -q \
|
|
21
|
+
&& sudo apt upgrade -q \
|
|
22
|
+
&& sudo apt install -qy --no-install-recommends \
|
|
23
|
+
sqlite3 libsqlite3-dev
|
|
24
|
+
|
|
25
|
+
# Download and cache dependencies
|
|
26
|
+
- restore_cache:
|
|
27
|
+
keys:
|
|
28
|
+
- v1-dependencies-{{ checksum "Gemfile.lock" }}
|
|
29
|
+
|
|
30
|
+
- run: gem install bundler
|
|
31
|
+
|
|
32
|
+
- run:
|
|
33
|
+
name: install dependencies
|
|
34
|
+
command: |
|
|
35
|
+
bundle install --jobs=4 --retry=3 --path vendor/bundle
|
|
36
|
+
|
|
37
|
+
- save_cache:
|
|
38
|
+
paths:
|
|
39
|
+
- ./vendor/bundle
|
|
40
|
+
key: v1-dependencies-{{ checksum "Gemfile.lock" }}
|
|
41
|
+
|
|
42
|
+
# run tests!
|
|
43
|
+
- run:
|
|
44
|
+
name: run tests
|
|
45
|
+
command: |
|
|
46
|
+
mkdir /tmp/test-results
|
|
47
|
+
TEST_FILES="$(circleci tests glob "spec/**/*_spec.rb" | \
|
|
48
|
+
circleci tests split --split-by=timings)"
|
|
49
|
+
|
|
50
|
+
bundle exec rspec \
|
|
51
|
+
--format progress \
|
|
52
|
+
--format RspecJunitFormatter \
|
|
53
|
+
--out /tmp/test-results/rspec.xml \
|
|
54
|
+
--format progress \
|
|
55
|
+
$TEST_FILES
|
|
56
|
+
|
|
57
|
+
# collect reports
|
|
58
|
+
- store_test_results:
|
|
59
|
+
path: /tmp/test-results
|
|
60
|
+
- store_artifacts:
|
|
61
|
+
path: /tmp/test-results
|
|
62
|
+
destination: test-results
|
data/.editorconfig
ADDED
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
# EditorConfig is awesome: http://EditorConfig.org
|
|
2
|
+
|
|
3
|
+
# top-most EditorConfig file
|
|
4
|
+
root = true
|
|
5
|
+
|
|
6
|
+
# Unix-style newlines with a newline ending every file
|
|
7
|
+
[*]
|
|
8
|
+
end_of_line = lf
|
|
9
|
+
insert_final_newline = true
|
|
10
|
+
charset = utf-8
|
|
11
|
+
|
|
12
|
+
[*.{rb,yml,json,rake}]
|
|
13
|
+
indent_style = space
|
|
14
|
+
indent_size = 2
|
|
15
|
+
trim_trailing_whitespace = true
|
data/.gitignore
ADDED
data/.rspec
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
--require spec_helper
|
data/.ruby_version
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
2.6.4
|
data/.travis.yml
ADDED
data/Gemfile
ADDED
data/Gemfile.lock
ADDED
|
@@ -0,0 +1,163 @@
|
|
|
1
|
+
PATH
|
|
2
|
+
remote: .
|
|
3
|
+
specs:
|
|
4
|
+
nxt_support (0.1.0)
|
|
5
|
+
rails
|
|
6
|
+
|
|
7
|
+
GEM
|
|
8
|
+
remote: https://rubygems.org/
|
|
9
|
+
specs:
|
|
10
|
+
actioncable (6.0.0)
|
|
11
|
+
actionpack (= 6.0.0)
|
|
12
|
+
nio4r (~> 2.0)
|
|
13
|
+
websocket-driver (>= 0.6.1)
|
|
14
|
+
actionmailbox (6.0.0)
|
|
15
|
+
actionpack (= 6.0.0)
|
|
16
|
+
activejob (= 6.0.0)
|
|
17
|
+
activerecord (= 6.0.0)
|
|
18
|
+
activestorage (= 6.0.0)
|
|
19
|
+
activesupport (= 6.0.0)
|
|
20
|
+
mail (>= 2.7.1)
|
|
21
|
+
actionmailer (6.0.0)
|
|
22
|
+
actionpack (= 6.0.0)
|
|
23
|
+
actionview (= 6.0.0)
|
|
24
|
+
activejob (= 6.0.0)
|
|
25
|
+
mail (~> 2.5, >= 2.5.4)
|
|
26
|
+
rails-dom-testing (~> 2.0)
|
|
27
|
+
actionpack (6.0.0)
|
|
28
|
+
actionview (= 6.0.0)
|
|
29
|
+
activesupport (= 6.0.0)
|
|
30
|
+
rack (~> 2.0)
|
|
31
|
+
rack-test (>= 0.6.3)
|
|
32
|
+
rails-dom-testing (~> 2.0)
|
|
33
|
+
rails-html-sanitizer (~> 1.0, >= 1.2.0)
|
|
34
|
+
actiontext (6.0.0)
|
|
35
|
+
actionpack (= 6.0.0)
|
|
36
|
+
activerecord (= 6.0.0)
|
|
37
|
+
activestorage (= 6.0.0)
|
|
38
|
+
activesupport (= 6.0.0)
|
|
39
|
+
nokogiri (>= 1.8.5)
|
|
40
|
+
actionview (6.0.0)
|
|
41
|
+
activesupport (= 6.0.0)
|
|
42
|
+
builder (~> 3.1)
|
|
43
|
+
erubi (~> 1.4)
|
|
44
|
+
rails-dom-testing (~> 2.0)
|
|
45
|
+
rails-html-sanitizer (~> 1.1, >= 1.2.0)
|
|
46
|
+
activejob (6.0.0)
|
|
47
|
+
activesupport (= 6.0.0)
|
|
48
|
+
globalid (>= 0.3.6)
|
|
49
|
+
activemodel (6.0.0)
|
|
50
|
+
activesupport (= 6.0.0)
|
|
51
|
+
activerecord (6.0.0)
|
|
52
|
+
activemodel (= 6.0.0)
|
|
53
|
+
activesupport (= 6.0.0)
|
|
54
|
+
activestorage (6.0.0)
|
|
55
|
+
actionpack (= 6.0.0)
|
|
56
|
+
activejob (= 6.0.0)
|
|
57
|
+
activerecord (= 6.0.0)
|
|
58
|
+
marcel (~> 0.3.1)
|
|
59
|
+
activesupport (6.0.0)
|
|
60
|
+
concurrent-ruby (~> 1.0, >= 1.0.2)
|
|
61
|
+
i18n (>= 0.7, < 2)
|
|
62
|
+
minitest (~> 5.1)
|
|
63
|
+
tzinfo (~> 1.1)
|
|
64
|
+
zeitwerk (~> 2.1, >= 2.1.8)
|
|
65
|
+
builder (3.2.3)
|
|
66
|
+
concurrent-ruby (1.1.5)
|
|
67
|
+
crass (1.0.4)
|
|
68
|
+
diff-lcs (1.3)
|
|
69
|
+
erubi (1.9.0)
|
|
70
|
+
globalid (0.4.2)
|
|
71
|
+
activesupport (>= 4.2.0)
|
|
72
|
+
i18n (1.6.0)
|
|
73
|
+
concurrent-ruby (~> 1.0)
|
|
74
|
+
loofah (2.3.0)
|
|
75
|
+
crass (~> 1.0.2)
|
|
76
|
+
nokogiri (>= 1.5.9)
|
|
77
|
+
mail (2.7.1)
|
|
78
|
+
mini_mime (>= 0.1.1)
|
|
79
|
+
marcel (0.3.3)
|
|
80
|
+
mimemagic (~> 0.3.2)
|
|
81
|
+
method_source (0.9.2)
|
|
82
|
+
mimemagic (0.3.3)
|
|
83
|
+
mini_mime (1.0.2)
|
|
84
|
+
mini_portile2 (2.4.0)
|
|
85
|
+
minitest (5.12.2)
|
|
86
|
+
nio4r (2.5.2)
|
|
87
|
+
nokogiri (1.10.4)
|
|
88
|
+
mini_portile2 (~> 2.4.0)
|
|
89
|
+
rack (2.0.7)
|
|
90
|
+
rack-test (1.1.0)
|
|
91
|
+
rack (>= 1.0, < 3)
|
|
92
|
+
rails (6.0.0)
|
|
93
|
+
actioncable (= 6.0.0)
|
|
94
|
+
actionmailbox (= 6.0.0)
|
|
95
|
+
actionmailer (= 6.0.0)
|
|
96
|
+
actionpack (= 6.0.0)
|
|
97
|
+
actiontext (= 6.0.0)
|
|
98
|
+
actionview (= 6.0.0)
|
|
99
|
+
activejob (= 6.0.0)
|
|
100
|
+
activemodel (= 6.0.0)
|
|
101
|
+
activerecord (= 6.0.0)
|
|
102
|
+
activestorage (= 6.0.0)
|
|
103
|
+
activesupport (= 6.0.0)
|
|
104
|
+
bundler (>= 1.3.0)
|
|
105
|
+
railties (= 6.0.0)
|
|
106
|
+
sprockets-rails (>= 2.0.0)
|
|
107
|
+
rails-dom-testing (2.0.3)
|
|
108
|
+
activesupport (>= 4.2.0)
|
|
109
|
+
nokogiri (>= 1.6)
|
|
110
|
+
rails-html-sanitizer (1.2.0)
|
|
111
|
+
loofah (~> 2.2, >= 2.2.2)
|
|
112
|
+
railties (6.0.0)
|
|
113
|
+
actionpack (= 6.0.0)
|
|
114
|
+
activesupport (= 6.0.0)
|
|
115
|
+
method_source
|
|
116
|
+
rake (>= 0.8.7)
|
|
117
|
+
thor (>= 0.20.3, < 2.0)
|
|
118
|
+
rake (10.5.0)
|
|
119
|
+
rspec (3.8.0)
|
|
120
|
+
rspec-core (~> 3.8.0)
|
|
121
|
+
rspec-expectations (~> 3.8.0)
|
|
122
|
+
rspec-mocks (~> 3.8.0)
|
|
123
|
+
rspec-core (3.8.2)
|
|
124
|
+
rspec-support (~> 3.8.0)
|
|
125
|
+
rspec-expectations (3.8.4)
|
|
126
|
+
diff-lcs (>= 1.2.0, < 2.0)
|
|
127
|
+
rspec-support (~> 3.8.0)
|
|
128
|
+
rspec-mocks (3.8.1)
|
|
129
|
+
diff-lcs (>= 1.2.0, < 2.0)
|
|
130
|
+
rspec-support (~> 3.8.0)
|
|
131
|
+
rspec-support (3.8.2)
|
|
132
|
+
rspec_junit_formatter (0.4.1)
|
|
133
|
+
rspec-core (>= 2, < 4, != 2.12.0)
|
|
134
|
+
sprockets (3.7.2)
|
|
135
|
+
concurrent-ruby (~> 1.0)
|
|
136
|
+
rack (> 1, < 3)
|
|
137
|
+
sprockets-rails (3.2.1)
|
|
138
|
+
actionpack (>= 4.0)
|
|
139
|
+
activesupport (>= 4.0)
|
|
140
|
+
sprockets (>= 3.0.0)
|
|
141
|
+
sqlite3 (1.4.1)
|
|
142
|
+
thor (0.20.3)
|
|
143
|
+
thread_safe (0.3.6)
|
|
144
|
+
tzinfo (1.2.5)
|
|
145
|
+
thread_safe (~> 0.1)
|
|
146
|
+
websocket-driver (0.7.1)
|
|
147
|
+
websocket-extensions (>= 0.1.0)
|
|
148
|
+
websocket-extensions (0.1.4)
|
|
149
|
+
zeitwerk (2.1.10)
|
|
150
|
+
|
|
151
|
+
PLATFORMS
|
|
152
|
+
ruby
|
|
153
|
+
|
|
154
|
+
DEPENDENCIES
|
|
155
|
+
bundler
|
|
156
|
+
nxt_support!
|
|
157
|
+
rake
|
|
158
|
+
rspec
|
|
159
|
+
rspec_junit_formatter
|
|
160
|
+
sqlite3
|
|
161
|
+
|
|
162
|
+
BUNDLED WITH
|
|
163
|
+
2.0.2
|
data/LICENSE.txt
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
The MIT License (MIT)
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2019 Nils Sommer
|
|
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,57 @@
|
|
|
1
|
+
[](https://circleci.com/gh/nxt-insurance/nxt_support)
|
|
2
|
+
|
|
3
|
+
# NxtSupport
|
|
4
|
+
|
|
5
|
+
This is a collection of mixins, helpers and classes that cover several aspects of a ruby on rails application, such as models, controllers and job processing. At [Getsafe](https://hellogetsafe.com), we run multiple Ruby on Rails apps as part of our insurance infrastructure and we found that we wrote quite some shared helpers that are duplicated among applications and serve a generic purpose that we could share in this gem. Look at it as our version of ActiveSupport (which is amazing! ❤️), droping in the pieces we sometimes miss in the beautiful puzzle of Rails.
|
|
6
|
+
|
|
7
|
+
## Installation
|
|
8
|
+
|
|
9
|
+
Add this line to your application's Gemfile:
|
|
10
|
+
|
|
11
|
+
```ruby
|
|
12
|
+
gem 'nxt_support'
|
|
13
|
+
```
|
|
14
|
+
|
|
15
|
+
And then execute:
|
|
16
|
+
|
|
17
|
+
$ bundle
|
|
18
|
+
|
|
19
|
+
Or install it yourself as:
|
|
20
|
+
|
|
21
|
+
$ gem install nxt_support
|
|
22
|
+
|
|
23
|
+
## Usage
|
|
24
|
+
|
|
25
|
+
Here's an overview all the supporting features.
|
|
26
|
+
|
|
27
|
+
### NxtSupport::Models
|
|
28
|
+
|
|
29
|
+
Enjoy support for your models.
|
|
30
|
+
|
|
31
|
+
#### NxtSupport::Models::SafelyFindOrCreateable
|
|
32
|
+
|
|
33
|
+
The `NxtSupport::Models::SafelyFindOrCreateable` concern is aimed at ActiveRecord models with a uniqueness database constraint. If you use `find_or_create_by` from ActiveRecord, it can happen that the `find_by` call returns `nil` (because no record for the given conditions exists), but in the small timeframe between the `find_by` and the `create` call, another thread inserts a record, so that the `create` call raises an error.
|
|
34
|
+
|
|
35
|
+
The `safely_find_or_create_by` method provided by this concern catches such an error and performs `find_by` another time. It also offers a bang variant.
|
|
36
|
+
|
|
37
|
+
```ruby
|
|
38
|
+
class Book < ApplicationRecord
|
|
39
|
+
include NxtSupport::Models::SafelyFindOrCreateable
|
|
40
|
+
end
|
|
41
|
+
|
|
42
|
+
Book.safely_find_or_create_by!(market: 'de', title: 'Moche!')
|
|
43
|
+
```
|
|
44
|
+
|
|
45
|
+
## Development
|
|
46
|
+
|
|
47
|
+
After checking out the repo, run `bin/setup` to install dependencies. Then, run `rake test` to run the tests. You can also run `bin/console` for an interactive prompt that will allow you to experiment.
|
|
48
|
+
|
|
49
|
+
To install this gem onto your local machine, run `bundle exec rake install`. To release a new version, update the version number in `version.rb`, and then run `bundle exec rake release`, which will create a git tag for the version, push git commits and tags, and push the `.gem` file to [rubygems.org](https://rubygems.org).
|
|
50
|
+
|
|
51
|
+
## Contributing
|
|
52
|
+
|
|
53
|
+
Bug reports and pull requests are welcome on GitHub at https://github.com/nxt_insurance/nxt_support.
|
|
54
|
+
|
|
55
|
+
## License
|
|
56
|
+
|
|
57
|
+
The gem is available as open source under the terms of the [MIT License](https://opensource.org/licenses/MIT).
|
data/Rakefile
ADDED
data/bin/console
ADDED
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
#!/usr/bin/env ruby
|
|
2
|
+
|
|
3
|
+
require "bundler/setup"
|
|
4
|
+
require "nxt_support"
|
|
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(__FILE__)
|
data/bin/setup
ADDED
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
module NxtSupport
|
|
2
|
+
module Models
|
|
3
|
+
module SafelyFindOrCreateable
|
|
4
|
+
extend ActiveSupport::Concern
|
|
5
|
+
|
|
6
|
+
module ClassMethods
|
|
7
|
+
def safely_find_or_create_by(attributes, &block)
|
|
8
|
+
transaction(requires_new: true) { create(attributes, &block) }
|
|
9
|
+
rescue ActiveRecord::RecordNotUnique
|
|
10
|
+
find_by(attributes)
|
|
11
|
+
end
|
|
12
|
+
|
|
13
|
+
def safely_find_or_create_by!(attributes, &block)
|
|
14
|
+
transaction(requires_new: true) { create!(attributes, &block) }
|
|
15
|
+
rescue ActiveRecord::RecordNotUnique
|
|
16
|
+
find_by!(attributes)
|
|
17
|
+
rescue ActiveRecord::RecordInvalid => e
|
|
18
|
+
all_errors_are_uniqueness_failures = e.record.errors.details.all? { |_key, errs| errs.all? { |err| err[:error] == :taken } }
|
|
19
|
+
raise unless all_errors_are_uniqueness_failures
|
|
20
|
+
find_by!(attributes)
|
|
21
|
+
end
|
|
22
|
+
end
|
|
23
|
+
end
|
|
24
|
+
end
|
|
25
|
+
end
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
require "nxt_support/models/safely_find_or_createable"
|
data/lib/nxt_support.rb
ADDED
data/nxt_support.gemspec
ADDED
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
lib = File.expand_path("lib", __dir__)
|
|
2
|
+
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
|
3
|
+
require "nxt_support/version"
|
|
4
|
+
|
|
5
|
+
Gem::Specification.new do |spec|
|
|
6
|
+
spec.name = "nxt_support"
|
|
7
|
+
spec.version = NxtSupport::VERSION
|
|
8
|
+
spec.authors = ["Nils Sommer"]
|
|
9
|
+
spec.email = ["mail@nilssommer.de"]
|
|
10
|
+
|
|
11
|
+
spec.summary = "Support through reusable Mixins and Helpers for Ruby on Rails Applications"
|
|
12
|
+
spec.homepage = "https://github.com/nxt-insurance/nxt_support"
|
|
13
|
+
spec.license = "MIT"
|
|
14
|
+
|
|
15
|
+
spec.metadata["allowed_push_host"] = "https://rubygems.org"
|
|
16
|
+
|
|
17
|
+
spec.metadata["homepage_uri"] = spec.homepage
|
|
18
|
+
spec.metadata["source_code_uri"] = "https://github.com/nxt-insurance/nxt_init"
|
|
19
|
+
spec.metadata["changelog_uri"] = "https://github.com/nxt-insurance/nxt_init/CHANGELOG.md"
|
|
20
|
+
|
|
21
|
+
# Specify which files should be added to the gem when it is released.
|
|
22
|
+
# The `git ls-files -z` loads the files in the RubyGem that have been added into git.
|
|
23
|
+
spec.files = Dir.chdir(File.expand_path('..', __FILE__)) do
|
|
24
|
+
`git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(test|spec|features)/}) }
|
|
25
|
+
end
|
|
26
|
+
spec.bindir = "exe"
|
|
27
|
+
spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
|
|
28
|
+
spec.require_paths = ["lib"]
|
|
29
|
+
|
|
30
|
+
spec.add_dependency "rails"
|
|
31
|
+
spec.add_development_dependency "bundler"
|
|
32
|
+
spec.add_development_dependency "rake"
|
|
33
|
+
spec.add_development_dependency "rspec"
|
|
34
|
+
spec.add_development_dependency "sqlite3"
|
|
35
|
+
end
|
metadata
ADDED
|
@@ -0,0 +1,135 @@
|
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
|
2
|
+
name: nxt_support
|
|
3
|
+
version: !ruby/object:Gem::Version
|
|
4
|
+
version: 0.1.0
|
|
5
|
+
platform: ruby
|
|
6
|
+
authors:
|
|
7
|
+
- Nils Sommer
|
|
8
|
+
autorequire:
|
|
9
|
+
bindir: exe
|
|
10
|
+
cert_chain: []
|
|
11
|
+
date: 2019-09-29 00:00:00.000000000 Z
|
|
12
|
+
dependencies:
|
|
13
|
+
- !ruby/object:Gem::Dependency
|
|
14
|
+
name: rails
|
|
15
|
+
requirement: !ruby/object:Gem::Requirement
|
|
16
|
+
requirements:
|
|
17
|
+
- - ">="
|
|
18
|
+
- !ruby/object:Gem::Version
|
|
19
|
+
version: '0'
|
|
20
|
+
type: :runtime
|
|
21
|
+
prerelease: false
|
|
22
|
+
version_requirements: !ruby/object:Gem::Requirement
|
|
23
|
+
requirements:
|
|
24
|
+
- - ">="
|
|
25
|
+
- !ruby/object:Gem::Version
|
|
26
|
+
version: '0'
|
|
27
|
+
- !ruby/object:Gem::Dependency
|
|
28
|
+
name: bundler
|
|
29
|
+
requirement: !ruby/object:Gem::Requirement
|
|
30
|
+
requirements:
|
|
31
|
+
- - ">="
|
|
32
|
+
- !ruby/object:Gem::Version
|
|
33
|
+
version: '0'
|
|
34
|
+
type: :development
|
|
35
|
+
prerelease: false
|
|
36
|
+
version_requirements: !ruby/object:Gem::Requirement
|
|
37
|
+
requirements:
|
|
38
|
+
- - ">="
|
|
39
|
+
- !ruby/object:Gem::Version
|
|
40
|
+
version: '0'
|
|
41
|
+
- !ruby/object:Gem::Dependency
|
|
42
|
+
name: rake
|
|
43
|
+
requirement: !ruby/object:Gem::Requirement
|
|
44
|
+
requirements:
|
|
45
|
+
- - ">="
|
|
46
|
+
- !ruby/object:Gem::Version
|
|
47
|
+
version: '0'
|
|
48
|
+
type: :development
|
|
49
|
+
prerelease: false
|
|
50
|
+
version_requirements: !ruby/object:Gem::Requirement
|
|
51
|
+
requirements:
|
|
52
|
+
- - ">="
|
|
53
|
+
- !ruby/object:Gem::Version
|
|
54
|
+
version: '0'
|
|
55
|
+
- !ruby/object:Gem::Dependency
|
|
56
|
+
name: rspec
|
|
57
|
+
requirement: !ruby/object:Gem::Requirement
|
|
58
|
+
requirements:
|
|
59
|
+
- - ">="
|
|
60
|
+
- !ruby/object:Gem::Version
|
|
61
|
+
version: '0'
|
|
62
|
+
type: :development
|
|
63
|
+
prerelease: false
|
|
64
|
+
version_requirements: !ruby/object:Gem::Requirement
|
|
65
|
+
requirements:
|
|
66
|
+
- - ">="
|
|
67
|
+
- !ruby/object:Gem::Version
|
|
68
|
+
version: '0'
|
|
69
|
+
- !ruby/object:Gem::Dependency
|
|
70
|
+
name: sqlite3
|
|
71
|
+
requirement: !ruby/object:Gem::Requirement
|
|
72
|
+
requirements:
|
|
73
|
+
- - ">="
|
|
74
|
+
- !ruby/object:Gem::Version
|
|
75
|
+
version: '0'
|
|
76
|
+
type: :development
|
|
77
|
+
prerelease: false
|
|
78
|
+
version_requirements: !ruby/object:Gem::Requirement
|
|
79
|
+
requirements:
|
|
80
|
+
- - ">="
|
|
81
|
+
- !ruby/object:Gem::Version
|
|
82
|
+
version: '0'
|
|
83
|
+
description:
|
|
84
|
+
email:
|
|
85
|
+
- mail@nilssommer.de
|
|
86
|
+
executables: []
|
|
87
|
+
extensions: []
|
|
88
|
+
extra_rdoc_files: []
|
|
89
|
+
files:
|
|
90
|
+
- ".circleci/config.yml"
|
|
91
|
+
- ".editorconfig"
|
|
92
|
+
- ".gitignore"
|
|
93
|
+
- ".rspec"
|
|
94
|
+
- ".ruby_version"
|
|
95
|
+
- ".travis.yml"
|
|
96
|
+
- Gemfile
|
|
97
|
+
- Gemfile.lock
|
|
98
|
+
- LICENSE.txt
|
|
99
|
+
- README.md
|
|
100
|
+
- Rakefile
|
|
101
|
+
- bin/console
|
|
102
|
+
- bin/setup
|
|
103
|
+
- lib/nxt_support.rb
|
|
104
|
+
- lib/nxt_support/models.rb
|
|
105
|
+
- lib/nxt_support/models/safely_find_or_createable.rb
|
|
106
|
+
- lib/nxt_support/version.rb
|
|
107
|
+
- nxt_support.gemspec
|
|
108
|
+
homepage: https://github.com/nxt-insurance/nxt_support
|
|
109
|
+
licenses:
|
|
110
|
+
- MIT
|
|
111
|
+
metadata:
|
|
112
|
+
allowed_push_host: https://rubygems.org
|
|
113
|
+
homepage_uri: https://github.com/nxt-insurance/nxt_support
|
|
114
|
+
source_code_uri: https://github.com/nxt-insurance/nxt_init
|
|
115
|
+
changelog_uri: https://github.com/nxt-insurance/nxt_init/CHANGELOG.md
|
|
116
|
+
post_install_message:
|
|
117
|
+
rdoc_options: []
|
|
118
|
+
require_paths:
|
|
119
|
+
- lib
|
|
120
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
|
121
|
+
requirements:
|
|
122
|
+
- - ">="
|
|
123
|
+
- !ruby/object:Gem::Version
|
|
124
|
+
version: '0'
|
|
125
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
|
126
|
+
requirements:
|
|
127
|
+
- - ">="
|
|
128
|
+
- !ruby/object:Gem::Version
|
|
129
|
+
version: '0'
|
|
130
|
+
requirements: []
|
|
131
|
+
rubygems_version: 3.0.3
|
|
132
|
+
signing_key:
|
|
133
|
+
specification_version: 4
|
|
134
|
+
summary: Support through reusable Mixins and Helpers for Ruby on Rails Applications
|
|
135
|
+
test_files: []
|